CN114089985A - Automatic code generation graphical method and system for intelligent cockpit - Google Patents

Automatic code generation graphical method and system for intelligent cockpit Download PDF

Info

Publication number
CN114089985A
CN114089985A CN202111361722.6A CN202111361722A CN114089985A CN 114089985 A CN114089985 A CN 114089985A CN 202111361722 A CN202111361722 A CN 202111361722A CN 114089985 A CN114089985 A CN 114089985A
Authority
CN
China
Prior art keywords
software
file
code generation
program
qml
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.)
Pending
Application number
CN202111361722.6A
Other languages
Chinese (zh)
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.)
South Sagittarius Integration Co Ltd
Original Assignee
South Sagittarius Integration 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 South Sagittarius Integration Co Ltd filed Critical South Sagittarius Integration Co Ltd
Priority to CN202111361722.6A priority Critical patent/CN114089985A/en
Publication of CN114089985A publication Critical patent/CN114089985A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/34Graphical or visual programming
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/38Creation or generation of source code for implementing user interfaces
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/40Transformation of program code
    • G06F8/41Compilation
    • G06F8/42Syntactic analysis

Abstract

The invention belongs to the technical field of intelligent cabins, and particularly provides an automatic code generation graphical method and system for an intelligent cabin, wherein the method comprises the following steps: s1, configuring a Gimp basic environment, and then loading a PSD graphic design file; s2, reading PSD graphic design files, then performing color format conversion and reading image layer information, and finally outputting character elements, public attributes and picture elements; s3, converting the data output in S2 into corresponding grammar format requirements according to the specified software rules, encoding and packaging packets and outputting QML program files; s4, writing QML program syntax format file to automatically generate software code. The method can be applied to various HMI programming software and has cross-platform capability. Meanwhile, the problem of efficiency of converting intelligent cabin product UI design into software design is solved, the fault tolerance of software development is improved, the development quality of software is improved, the project cost is reduced, and the need of purchasing a third-party solution is eliminated.

Description

Automatic code generation graphical method and system for intelligent cockpit
Technical Field
The invention relates to the technical field of intelligent cabins, in particular to an automatic code generation graphical method and system for an intelligent cabin.
Background
The intelligent cockpit adopts a plurality of LCD screens to replace a traditional pointer instrument panel and a radio panel, replaces traditional stepping motor pointer indication, entity keys and the like with embedded software, and has the advantages of rich display phenomena, attractive and gorgeous interface, high display sensitivity and high precision. Along with the functions of the automobile, the intelligent cockpit has more and more complex information to be presented. Therefore, an intelligent cockpit with a harsh experience of interface design of HMI is necessary.
The requirements for a graphical interface are higher and higher due to the generation of a new intelligent cabin, more graphical effects are required by users, the requirements for the graphs of the users are changed more obviously, and different users have different feelings on visual effects, so that the products need to deal with the rapid change of the users, the product output efficiency is improved, and the products can be presented more quickly for the user to evaluate and select.
The common methods of the existing intelligent cabin products are as follows:
1. and the UI design engineer outputs the cutting picture and the picture position coordinate, and the software engineer manually writes program codes and runs a program confirmation result according to the output of the UI design engineer. However, UI design and software design are clearly divided, program implementation needs to depend on the ability of software engineers to determine the development efficiency and development quality, and human work always has a probability of error, which results in a situation of repeated coding and low efficiency.
2. Using commercial version of cockpit dedicated software, a UI design engineer performs design in the software, and the software engineer directly generates program code through the software and runs a program confirmation result. On one hand, the problem of certain cost exists in the commercial version software; on the other hand, the UI design engineer needs to relearn the development process of the software, which results in a reduction in development efficiency compared to the use of the custom design software.
Disclosure of Invention
The invention aims to solve the technical problem that manual programming in the prior art cannot efficiently meet the diversity of graphical interface requirements.
The invention provides an automatic code generation graphical method for an intelligent cabin, which comprises the following steps:
s1, configuring a Gimp basic environment, and then loading a PSD graphic design file;
s2, reading the PSD graphic design file, then performing color format conversion and reading image layer information, and finally outputting character elements, public attributes and picture elements;
s3, converting the data output in S2 into corresponding grammar format requirements according to the specified software rules, encoding and packaging packets and outputting QML program files;
and S4, writing the QML program syntax format file to automatically generate software codes.
Preferably, the S1 specifically includes: the Gimp base environment is configured under the development environment of Python.
Preferably, the S2 specifically includes:
extracting text resource information and picture resource information, obtaining coordinates, size, transparency and public program attribute output, and performing color format conversion for packaging to generate a QML program file.
Preferably, the S3 specifically includes: the output file rule of the software is automatically generated according to the applied platform software coding rule, the data output in S2 is converted into the data required by the corresponding syntax format according to the output file rule, and then the coding group is assembled into a QML program file.
The invention also provides an automatic code generation graphical system for the intelligent cabin, which comprises the following steps:
the Gimp basic environment configuration module is used for configuring a Gimp basic environment and then loading a PSD graphic design file;
the reading output module is used for reading the PSD graphic design file, then performing color format conversion, reading image layer information, and finally outputting character elements, public attributes and picture elements;
and the execution file generation module is used for converting the output data into a corresponding syntax format requirement according to a specified software rule, and encoding and packaging the packets to output QML program files.
The invention also provides electronic equipment which comprises a memory and a processor, wherein the processor is used for realizing the steps of the automatic code generation graphical method for the intelligent cabin when executing the computer management program stored in the memory.
The invention also provides a computer readable storage medium having stored thereon a computer management like program which, when executed by a processor, implements the steps of an automated code generation graphical method for intelligent cabins.
Has the advantages that: the invention provides an automatic code generation graphical method and system for an intelligent cabin, wherein the method comprises the following steps: s1, configuring a Gimp basic environment, and then loading a PSD graphic design file; s2, reading the PSD graphic design file, then performing color format conversion and reading image layer information, and finally outputting character elements, public attributes and picture elements; s3, converting the data output in S2 into corresponding grammar format requirements according to the specified software rules, encoding and packaging packets and outputting QML program files; and S4, writing the QML program syntax format file to automatically generate software codes. The technology can be applied to various HMI programming software, has cross-platform capability, and can adjust the output file rule of the automatic generation software according to different software coding rules. Meanwhile, the problem of efficiency of converting intelligent cabin product UI design into software design is solved, the fault tolerance of software development is improved, the development quality of software is improved, the project cost is reduced, and the need of purchasing a third-party solution is eliminated.
Drawings
FIG. 1 is a flow chart of an automated code generation graphical method for an intelligent cockpit according to the present invention;
FIG. 2 is a schematic diagram of a hardware structure of a possible electronic device provided in the present invention;
FIG. 3 is a schematic diagram of a hardware structure of a possible computer-readable storage medium provided by the present invention;
fig. 4 is a schematic diagram of a schematic framework of an automated code generation graphical system for an intelligent cabin according to the present invention.
Detailed Description
The following detailed description of embodiments of the present invention is provided in connection with the accompanying drawings and examples. The following examples are intended to illustrate the invention but are not intended to limit the scope of the invention.
As shown in fig. 1, an embodiment of the present invention provides an automated code generation graphical method for an intelligent cockpit, including: s1, configuring the Gimp basic environment, and then loading a PSD graphic design file. The Gimp base environment is configured under the development environment of Python.
And S2, reading the PSD graphic design file, then performing color format conversion and reading image layer information, and finally outputting character elements, public attributes and picture elements. Extracting text resource information and picture resource information, obtaining coordinates, size, transparency and public program attribute output, and performing color format conversion for packaging to generate a QML program file.
And S3, converting the data output in S2 into corresponding syntax format requirements according to specified software rules, and encoding and packaging the packets to output QML program files. The output file rule of the software is automatically generated according to the applied platform software coding rule, the data output in S2 is converted into the data required by the corresponding syntax format according to the output file rule, and then the coding group is assembled into a QML program file.
And S4, writing the QML program syntax format file to automatically generate software codes.
The scheme adopts an independent research and development mode, and realizes the method for automatically converting the graphic design file of UI design into the software coding file required by the product by adding the independently researched and developed code cost software based on the open source project GIMP. The method can be applied to various HMI programming software, has cross-platform capability, and can adjust the output file rule of the automatic generation software according to different software coding rules. Meanwhile, the problem of efficiency of converting intelligent cabin product UI design into software design is solved, the fault tolerance of software development is improved, the development quality of software is improved, the project cost is reduced, and the need of purchasing a third-party solution is eliminated.
The development of the method is to realize the automatic code generation of the intelligent cockpit into the graphical software, the graphical design software environment based on the GIMP uses Python as a cross-platform computer programming language, and the automatic code generation of the graphical software is required. The UI designer of the intelligent cabin can output a special format of the graphic design software of the PSD file, a software engineer uses the GIMP software to apply the PSD file and runs an automatic code generation graphic software, namely, the automatic code generation can be realized, a development environment of Python is used in the software, a QML programming Language of the intelligent cabin image interface development software Qt, a C + + application environment of Qt and a QML (Qt Meta Language or Qt Modeling Language) are automatically generated as a substitute of the C + + Language, and the rapid development of the intelligent cabin image interface software is realized.
Based on a Gimp environment, software is used for reading the content of the PDS file, various picture resource files are automatically output, the position coordinates and corresponding effect characteristics of the picture resources are automatically acquired, code generation meeting the QML language is carried out, and the effect of automatic code generation and imaging is achieved. The intelligent cabin is mainly applied to products of intelligent cabins.
In order to realize the automatic code generation graphical software of the intelligent cockpit, a graphics design software environment based on the GIMP uses Python as a cross-platform computer programming language, and the automatic code generation graphical software is required. The UI designer of the intelligent cabin can output a special format of the graphic design software of the PSD file, a software engineer uses the GIMP software to apply the PSD file and runs an automatic code generation graphic software, namely, the automatic code generation can be realized, a development environment of Python is used in the software, a QML programming Language of the intelligent cabin image interface development software Qt, a C + + application environment of Qt and a QML (Qt Meta Language or Qt Modeling Language) are automatically generated as a substitute of the C + + Language, and the rapid development of the intelligent cabin image interface software is realized.
Based on the environment, software is used for reading the content of the PDS file, various picture resource files are automatically output, the position coordinates and corresponding effect characteristics of the picture resources are automatically acquired, code generation meeting the QML language is performed, and the effect of automatically generating the code into the graphics is achieved.
As shown in fig. 4, an embodiment of the present invention further provides an automated code generation graphical system for an intelligent cabin, including:
the Gimp basic environment configuration module is used for configuring a Gimp basic environment and then loading a PSD graphic design file;
the reading output module is used for reading the PSD graphic design file, then performing color format conversion, reading image layer information, and finally outputting character elements, public attributes and picture elements;
and the execution file generation module is used for converting the output data into a corresponding syntax format requirement according to a specified software rule, and encoding and packaging the packets to output QML program files.
It should be noted that the system is used for implementing any of the aforementioned automated code generation graphical methods for intelligent cabins, and will not be described in detail here.
The main program is a main program for integrally scheduling each module, and the QML program file is output from the input of the graphic design file, the reading of the content of the image design file, the sorting, recombination and packaging of the content of each file.
Fig. 2 is a schematic diagram of an embodiment of an electronic device according to an embodiment of the invention. As shown in fig. 2, an embodiment of the present invention provides an electronic device, which includes a memory 1310, a processor 1320, and a computer program 1311 stored in the memory 1310 and executable on the processor 1320, where the processor 1320 executes the computer program 1311 to implement the following steps: s1, configuring a Gimp basic environment, and then loading a PSD graphic design file; s2, reading the PSD graphic design file, then performing color format conversion and reading image layer information, and finally outputting character elements, public attributes and picture elements; s3, converting the data output in S2 into corresponding grammar format requirements according to the specified software rules, encoding and packaging packets and outputting QML program files; and S4, writing the QML program syntax format file to automatically generate software codes. The technology can be applied to various HMI programming software, has cross-platform capability, and can adjust the output file rule of the automatic generation software according to different software coding rules. Meanwhile, the problem of efficiency of converting intelligent cabin product UI design into software design is solved, the fault tolerance of software development is improved, the development quality of software is improved, the project cost is reduced, and the need of purchasing a third-party solution is eliminated.
Please refer to fig. 3, which is a schematic diagram of an embodiment of a computer-readable storage medium according to the present invention. As shown in fig. 3, the present embodiment provides a computer-readable storage medium 1400, on which a computer program 1411 is stored, which computer program 1411, when executed by a processor, implements the steps of: s1, configuring a Gimp basic environment, and then loading a PSD graphic design file; s2, reading the PSD graphic design file, then performing color format conversion and reading image layer information, and finally outputting character elements, public attributes and picture elements; s3, converting the data output in S2 into corresponding grammar format requirements according to the specified software rules, encoding and packaging packets and outputting QML program files; and S4, writing the QML program syntax format file to automatically generate software codes. The technology can be applied to various HMI programming software, has cross-platform capability, and can adjust the output file rule of the automatic generation software according to different software coding rules. Meanwhile, the problem of efficiency of converting intelligent cabin product UI design into software design is solved, the fault tolerance of software development is improved, the development quality of software is improved, the project cost is reduced, and the need of purchasing a third-party solution is eliminated.
It should be noted that, in the foregoing embodiments, the descriptions of the respective embodiments have respective emphasis, and reference may be made to relevant descriptions of other embodiments for parts that are not described in detail in a certain embodiment.
Has the advantages that:
1. the method is based on an open source project GIMP, and code cost software which is independently developed is added, the project can be well compatible with Photoshop which is commonly used in UI design, and the technology solves the problem of efficiency of transferring the UI design of an intelligent cockpit product to software design;
2. the method improves the fault tolerance of software development and improves the development quality of software;
3. the method is independently developed, so that the project cost is reduced, and the need of purchasing a third-party solution is eliminated;
4. the method is suitable for various HMI programming software, has cross-platform capability, and can adjust the output file rule of the automatic generation software according to different software coding rules.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded computer, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
While preferred embodiments of the present invention have been described, additional variations and modifications in those embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. Therefore, it is intended that the appended claims be interpreted as including preferred embodiments and all such alterations and modifications as fall within the scope of the invention.
It will be apparent to those skilled in the art that various changes and modifications may be made in the present invention without departing from the spirit and scope of the invention. Thus, if such modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include such modifications and variations.

Claims (7)

1. An automated code generation graphical method for intelligent cabins, comprising:
s1, configuring a Gimp basic environment, and then loading a PSD graphic design file;
s2, reading the PSD graphic design file, then performing color format conversion and reading image layer information, and finally outputting character elements, public attributes and picture elements;
s3, converting the data output in S2 into corresponding grammar format requirements according to the specified software rules, encoding and packaging packets and outputting QML program files;
and S4, writing the QML program syntax format file to automatically generate software codes.
2. The automated code generation patterning method for intelligent cabins according to claim 1, wherein the S1 specifically comprises: the Gimp base environment is configured under the development environment of Python.
3. The automated code generation patterning method for intelligent cabins according to claim 1, wherein the S2 specifically comprises:
extracting text resource information and picture resource information, obtaining coordinates, size, transparency and public program attribute output, and performing color format conversion for packaging to generate a QML program file.
4. The automated code generation patterning method for intelligent cabins according to claim 3, wherein the S3 specifically comprises: the output file rule of the software is automatically generated according to the applied platform software coding rule, the data output in S2 is converted into the data required by the corresponding syntax format according to the output file rule, and then the coding group is assembled into a QML program file.
5. An automated code generation graphical system for intelligent pods, comprising:
the Gimp basic environment configuration module is used for configuring a Gimp basic environment and then loading a PSD graphic design file;
the reading output module is used for reading the PSD graphic design file, then performing color format conversion, reading image layer information, and finally outputting character elements, public attributes and picture elements;
and the execution file generation module is used for converting the output data into a corresponding syntax format requirement according to a specified software rule, and encoding and packaging the packets to output QML program files.
6. An electronic device, characterized in that it comprises a memory, a processor for implementing the steps of the method for automated code generation patterning of intelligent cabins according to any of claims 1 to 4 when executing a computer management class program stored in the memory.
7. A computer-readable storage medium, characterized in that it has stored thereon a computer management class program, which when executed by a processor implements the steps of the automated code generation graphical method for intelligent cabins according to any of claims 1 to 4.
CN202111361722.6A 2021-11-17 2021-11-17 Automatic code generation graphical method and system for intelligent cockpit Pending CN114089985A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111361722.6A CN114089985A (en) 2021-11-17 2021-11-17 Automatic code generation graphical method and system for intelligent cockpit

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111361722.6A CN114089985A (en) 2021-11-17 2021-11-17 Automatic code generation graphical method and system for intelligent cockpit

Publications (1)

Publication Number Publication Date
CN114089985A true CN114089985A (en) 2022-02-25

Family

ID=80301290

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111361722.6A Pending CN114089985A (en) 2021-11-17 2021-11-17 Automatic code generation graphical method and system for intelligent cockpit

Country Status (1)

Country Link
CN (1) CN114089985A (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH08227358A (en) * 1995-02-20 1996-09-03 Fujitsu Ltd Device for generating parts generating source program
CN108304183A (en) * 2018-02-26 2018-07-20 北京车和家信息技术有限公司 A kind of user interface creating method, device and electronic equipment
CN110333862A (en) * 2019-06-17 2019-10-15 深圳壹账通智能科技有限公司 UI page code generation method, device and server
CN110442333A (en) * 2019-07-11 2019-11-12 北京磨刀刻石科技有限公司 Method and apparatus based on design drawing automatically generating program code

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH08227358A (en) * 1995-02-20 1996-09-03 Fujitsu Ltd Device for generating parts generating source program
CN108304183A (en) * 2018-02-26 2018-07-20 北京车和家信息技术有限公司 A kind of user interface creating method, device and electronic equipment
CN110333862A (en) * 2019-06-17 2019-10-15 深圳壹账通智能科技有限公司 UI page code generation method, device and server
CN110442333A (en) * 2019-07-11 2019-11-12 北京磨刀刻石科技有限公司 Method and apparatus based on design drawing automatically generating program code

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
YANSMILE1: "photoshop 导出 qml脚本问题(问题解决)", 《HTTPS://BLOG.CSDN.NET/YANSMILE1/ARTICLE/DETAILS/52982375?》 *

Similar Documents

Publication Publication Date Title
CN105487864B (en) The method and apparatus of Code automatic build
CN110032369A (en) A kind of code automatic generation method, device and medium
Fühner et al. Dr. LiTHO: a development and research lithography simulator
CN110851134A (en) Low-code page design device and page design method
CN105528418B (en) A kind of design documentation generation method and device
CN111625226B (en) Prototype-based man-machine interaction design implementation method and system
US8756407B2 (en) Configuration rule prototyping tool
CN115617327A (en) Low code page building system, method and computer readable storage medium
CN102142152B (en) For show method, device and the program of object on computer screen
WO2009140250A1 (en) Framework-based model-driven software development
CN107908608B (en) Method, storage medium and device for converting and displaying manuscript in three-dimensional space
CN108595184A (en) Code conversion method, device, computer storage media and code conversion terminal
CN103793226B (en) Pervasive application code framework fast-generating method and prototype system
CN111045675A (en) Page generation method, device, equipment and storage medium based on Flutter
Schwab et al. Scalable scalable vector graphics: Automatic translation of interactive svgs to a multithread vdom for fast rendering
KR101460794B1 (en) Method and system for generating media art contents
CN102043628A (en) Method and system for developing on screen display (OSD) application software and multimedia terminal
CN114089985A (en) Automatic code generation graphical method and system for intelligent cockpit
CN110312990A (en) Configuration method and system
CN115495069A (en) Model-driven coal industry software flow implementation method, device and equipment
CN110727433B (en) Method for generating multi-channel three-dimensional user interface
CN103597467B (en) mesh sequence file format
US11726748B2 (en) Developing a software product in a no-code development platform to address a problem related to a business domain
US10180822B2 (en) Development environment for real-time application development
EP3834080B1 (en) Static reconcilliation of application view hierarchies

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
RJ01 Rejection of invention patent application after publication

Application publication date: 20220225

RJ01 Rejection of invention patent application after publication