Method, device, equipment and storage medium for converting configuration file into XML file

By converting configuration files into XML files, the problem of closed human-machine interface software systems is solved, and cross-platform data interaction and sharing is realized. By dividing configuration files into screen sets, variable sets, etc., and saving them in XML format , achieving interoperability between systems.

CN113221511BActive Publication Date: 2024-09-03ZHEJIANG SUPCON RES
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202110394542.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-04-13
Publication Date
2024-09-03
Estimated Expiration
2041-04-13

AI Technical Summary

Technical Problem

The human-machine interface software system lacks a unified technical foundation, resulting in various enterprise systems being closed and unable to interact and share. Configuration files lack a unified description method and expansion method, resulting in mutual incompatibility.

Method used

Divide the configuration file into a screen set, a variable set, an IO driver set, a data type set, a function set and a script set, and use separate conversion methods to map this information to an XML file and save it in the standard XML format to achieve Cross-platform data interaction and sharing.

Benefits of technology

The configuration projects of human-machine interface software of different enterprises can be exported to interactive XML files, realizing cross-platform data interaction and sharing, and solving the problem of system closure.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113221511B
    Figure CN113221511B
Patent Text Reader

Abstract

The present invention discloses a method, device, equipment and storage medium for converting a configuration file into an XML file. Aiming at the problem that human-machine interface systems of different enterprises are currently closed and cannot interact and share with each other, the human-machine interface configuration file is divided into a picture set, a variable set, an IO driver set, a data type set, a function set and a script set, and a separate conversion form is adopted to map the information contained in the picture set, the variable set, the IO driver set, the data type set, the function set and the script set one by one into the XML file, and the information is saved in a standard XML format, so that the configuration projects of human-machine interface software developed by different enterprises can export interactive XML files, and realize cross-platform data interaction and sharing.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of data file conversion, and in particular relates to a method, device, equipment and storage medium for converting a human-machine interface configuration file into an XML file. Background Art

[0002] Monitoring configuration software is a configurable software commonly used in the field of industrial control. The usual practice is to create a new project, create a screen in the project, add graphic controls, define variables, write scripts, etc. After configuring it, run the project, view the monitoring screen in the monitoring View interface, and monitor the production process of the industrial control industry.

[0003] For a long time, the human-machine interface industry lacked a unified technical foundation, resulting in the human-machine interface software systems of various enterprises being closed and unable to interact and share with each other. There is no unified object model between different human-machine interface platform software. Human-machine interface configuration files lack a unified description method and no unified extension method. The platform software adopts different methods to extend the configuration software. Some software uses attribute configuration, and some software uses scripting language. In addition, the use of scripting languages ​​is also varied, with differences in syntax, semantic representation, execution methods, etc. In addition, due to the lack of a unified configuration software model, when developers use different scripting languages ​​for configuration software development, they face inconsistent programming models, information models, and behavior models of configuration software, which leads to incompatibility of human-machine interface configuration files of various enterprises.

[0004] Since the monitoring configuration software of each enterprise is independent, the variable set, screen set and IO driver set are also independent. If you want to import the screen of enterprise A's software into enterprise B's software, it is impossible. You can only redraw the screen, redefine the variables and IO device drivers, and cannot achieve cross-platform data interaction and sharing. Summary of the invention

[0005] The purpose of the present invention is to provide a method, device, equipment and storage medium for converting a configuration file into an XML file, which divides the configuration file into a screen set, a variable set, an IO driver set, a data type set, a function set and a script set, and adopts a separate conversion form to map the information contained in the screen set, the variable set, the IO driver set, the data type set, the function set and the script set into the XML file one by one, and save the information in a standard XML format, so that the configuration projects of human-machine interface software developed by different enterprises can export interactive XML files, thereby realizing cross-platform data interaction and sharing.

[0006] To solve the above problems, the technical solution of the present invention is:

[0007] A method for converting a configuration file into an XML file is used for exporting an interactive XML file by human-machine interface software. The method for converting a configuration file into an XML file comprises:

[0008] Divide the configuration files into screen sets, variable sets, IO device driver sets, data type sets, function sets and script sets;

[0009] According to the data characteristics of the picture set, standardize the information description of the graphic elements and convert the picture set into an XML file;

[0010] According to the data characteristics of the variable set, standardize the variable name, variable source, variable type, and value range information description, and convert the variable set into an XML file;

[0011] According to the data characteristics of the IO device driver set, the information description of heterogeneous devices and communication protocols in the network is standardized and defined, and the IO device driver set is converted into an XML file;

[0012] According to the data characteristics of the data type set, the conversion between different data types is standardized and defined, and the data type set is converted into an XML file;

[0013] According to the data characteristics of the function set, a unified function description method is defined in a standardized manner, and the function set including mathematical functions, string functions and time functions is converted into an XML file;

[0014] According to the data characteristics of the script set, the object description of the trigger event is defined in a standardized manner, and the script set including the screen script and database script is converted into an XML file.

[0015] According to an embodiment of the present invention, the step of defining the information description of the graphic elements in a standardized manner according to the data characteristics of the picture set and converting the picture set into an XML file further comprises:

[0016] Abstract and encapsulate graphic elements in an object-oriented manner to obtain graphic primitive components;

[0017] Configure the properties and parameters of the graphic element components, and construct the graphic element components according to the requirements of TC6_XML_V201.xsd that can describe the document structure to obtain an XML file that complies with the XML standard.

[0018] According to an embodiment of the present invention, the information description of heterogeneous devices and communication protocols in the network is standardized and defined according to the data characteristics of the IO device driver set, and the IO device driver set is converted into an XML file, which further includes:

[0019] Define attributes for the elements of the IO device driver set, including device name, device description, communication protocol, device address and connection type;

[0020] Convert the IO device driver set to an XML file according to the XML Schema or DTD standard.

[0021] According to an embodiment of the present invention, the conversion between different data types is defined in a standardized manner according to the data characteristics of the data type set, and the conversion of the data type set into an XML file further includes:

[0022] Define attributes for elements in the data type set, including variable name, variable description, data type, variable initial value, upper value limit, and lower value limit;

[0023] Unify the formats of various data types and convert them into XML files.

[0024] According to an embodiment of the present invention, the step of defining a unified function description method based on data characteristics of the function set and converting the function set including mathematical functions, string functions and time functions into an XML file further includes:

[0025] Define attributes for the elements in the function set, including function name, function description, function return type and function implementation code;

[0026] Define attributes for the sub-elements of the function element, including parameter name, parameter description, parameter type, parameter passing method and default value;

[0027] Converts a set of functions into an XML file according to the XML Schema or DTD standard.

[0028] According to an embodiment of the present invention, the step of defining the object description of the trigger event according to the data characteristics of the script set and converting the script set including the screen script and the database script into an XML file further comprises:

[0029] Define attributes for the elements in the script set, including script name, script description and script body;

[0030] Convert script sets to XML files according to XML Schema or DTD standards.

[0031] According to an embodiment of the present invention, the method for converting the configuration file into an XML file is used for cross-platform XML data interaction between multiple application systems;

[0032] Any application system extracts the configuration file in the memory and generates a DOM tree, which is a document object with a standard interface; uses JAXP to perform XML Schema mode analysis on the document object in the DOM tree, generates an XML file, and stores it in the database;

[0033] Any application system can transmit the XML file in the database to another application system through the network, and the other application system receives the XML file and parses it into a configuration file.

[0034] A device for converting a configuration file into an XML file, used for exporting interactive XML files by human-machine interface software, comprising:

[0035] Classification module, used to classify configuration files into screen sets, variable sets, IO device driver sets, data type sets, function sets and script sets;

[0036] The first conversion module is used to standardize the information description of the graphic elements according to the data characteristics of the picture set, and convert the picture set into an XML file;

[0037] The second conversion module is used to standardize the information description of variable name, variable source, variable type, and value range according to the data characteristics of the variable set, and convert the variable set into an XML file;

[0038] The third conversion module is used to standardize the information description of heterogeneous devices and communication protocols in the network according to the data characteristics of the IO device driver set, and convert the IO device driver set into an XML file;

[0039] A fourth conversion module, used to define conversion between different data types in a standardized manner according to data characteristics of the data type set, and convert the data type set into an XML file;

[0040] A fifth conversion module, used to define a unified function description method in accordance with data characteristics of the function set, and convert the function set including mathematical functions, string functions and time functions into an XML file;

[0041] The sixth conversion module is used to define the object description of the trigger event according to the data characteristics of the script set, and convert the script set including the screen script and the database script into an XML file.

[0042] A device for converting a configuration file into an XML file comprises a memory and a processor. The memory stores computer-readable instructions. When the processor executes the computer-readable instructions, a method for converting a configuration file into an XML file in an embodiment of the present invention is implemented.

[0043] A computer-readable medium stores a computer program, wherein when the computer program is executed by one or more processors, the method for converting a configuration file into an XML file in an embodiment of the present invention is implemented.

[0044] Due to the adoption of the above technical solution, the present invention has the following advantages and positive effects compared with the prior art:

[0045] The method for converting a configuration file into an XML file in one embodiment of the present invention aims at the problem that the human-machine interface systems of different enterprises are currently closed and cannot interact and share with each other. By dividing the human-machine interface configuration file into a screen set, a variable set, an IO driver set, a data type set, a function set and a script set, a separate conversion form is adopted, and the information contained in the screen set, the variable set, the IO driver set, the data type set, the function set and the script set is mapped one by one into the XML file, and the information is saved in the standard XML format. This enables the configuration projects of the human-machine interface software developed by different enterprises to export interactive XML files, thereby realizing cross-platform data interaction and sharing. BRIEF DESCRIPTION OF THE DRAWINGS

[0046] Figure 1 A flow chart of a method for converting a configuration file into an XML file in one embodiment of the present invention;

[0047] Figure 2 A configuration file classification diagram in an embodiment of the present invention;

[0048] Figure 3 This is a diagram of the XML file format of a graphic element in one embodiment of the present invention;

[0049] Figure 4 This is a diagram of the variable XML file format in one embodiment of the present invention;

[0050] Figure 5 This is a diagram of the IO device driver XML file format in one embodiment of the present invention;

[0051] Figure 6 A data type XML file format diagram in one embodiment of the present invention;

[0052] Figure 7 This is a function XML file format diagram in one embodiment of the present invention;

[0053] Figure 8 This is a script XML file format diagram in one embodiment of the present invention;

[0054] Fig. 9 A block diagram of a device for converting a configuration file into an XML file in an embodiment of the present invention;

[0055] Fig.10 A schematic diagram of a device for converting a configuration file into an XML file in an embodiment of the present invention. DETAILED DESCRIPTION

[0056] The following is a further detailed description of a method, device, equipment and storage medium for converting a configuration file into an XML file proposed by the present invention in conjunction with the accompanying drawings and specific embodiments. The advantages and features of the present invention will become more apparent from the following description and claims.

[0057] Embodiment 1

[0058] In view of the problem that the human-machine interface systems of different enterprises are currently closed and cannot interact and share with each other, this embodiment proposes a method for converting configuration files into XML files, which is used for human-machine interface software to export interactive XML files to achieve cross-platform data interaction and sharing.

[0059] For details, please see Figure 1 , the method of converting the configuration file into an XML file includes:

[0060] S1: Divide the configuration file into screen set, variable set, IO device driver set, data type set, function set and script set;

[0061] S2: Based on the data characteristics of the picture set, standardize the information description of the graphic elements and convert the picture set into an XML file;

[0062] S3: According to the data characteristics of the variable set, standardize the information description of the variable name, variable source, variable type, and value range, and convert the variable set into an XML file;

[0063] S4: According to the data characteristics of the IO device driver set, standardize the information description of heterogeneous devices and communication protocols in the network, and convert the IO device driver set into an XML file;

[0064] S5: According to the data characteristics of the data type set, standardize the conversion between different data types and convert the data type set into an XML file;

[0065] S6: Based on the data characteristics of the function set, a unified function description method is standardized and defined, and the function set including mathematical functions, string functions and time functions is converted into an XML file;

[0066] S7: According to the data characteristics of the script set, the object description of the trigger event is standardized and defined, and the script set including the screen script and the database script is converted into an XML file.

[0067] In step S1, since there is no unified object model between the human-machine interface platform software of different enterprises, the human-machine interface configuration files lack a unified description method and no unified extension method. The platform software adopts different methods to extend the configuration software. Some software adopts the attribute configuration method, and some software adopts the script language method. The use of script languages ​​is also varied, and there are differences in syntax, semantic representation, execution method, etc. In order to cover as many description methods of all configuration files as possible, this embodiment classifies the configuration project files into screen sets, variable sets, IO device driver sets, data type sets, function sets and script sets. Please refer to Figure 2 .

[0068] Among them, the screen set is a collection that stores one or more screens. The screen node contains node information such as attributes, events, containers and menus, and the container node contains element collection information.

[0069] A variable set is a collection of variable declarations that describes a configuration project. A variable node contains the variable name, data type, variable description, and variable initial value.

[0070] The IO device driver set is a set that describes the IO device driver configuration in the configuration project. The properties of the IO device driver include the device name, enterprise name, enterprise-specified model, protocol name, encoding format (GB2312, UTF8, etc.), byte order (big endian mode, little endian mode), data update cycle, and communication timeout.

[0071] The data type set is a collection of data types that describe the configuration project. Data types include integer data types, real data types, string data types, and Boolean data types.

[0072] Function set is a collection of user-defined function declarations and implementations in a configuration project. Users can encapsulate some common and general operations or operations into custom functions and then call them in scripts. The attributes of function elements include function name, function description, function return data type and function implementation code.

[0073] A script set is a collection of global script definitions that describe the configuration in a configuration project. Script is a programming language based on objects and events. Each script is closely associated with an object or a triggering event. The attributes of a script element include the script name, script description, and script definition.

[0074] The emergence of XML (Extensible Markup Language) standards can become the core technology for the realization of various complex heterogeneous data exchanges. The information exchange platform based on XML technology does not force all node enterprises participating in information exchange to use a unified data format and data processing standard, but achieves the unification of data formats between different systems through customized interfaces. The use of XML technology in the enterprise information exchange platform can realize information interaction between enterprises, directly drive the operation of enterprises with enterprise operation information, and timely feedback the operation information to the internal information management system of the enterprise.

[0075] In step S2, according to the data characteristics of the picture set, the information description of the graphic element is standardized and defined, and converting the picture set into an XML file further includes:

[0076] Abstract and encapsulate graphic elements in an object-oriented manner to obtain graphic primitive components;

[0077] Configure the properties and parameters of the graphic element components, and construct the graphic element components according to the requirements of TC6_XML_V201.xsd that can describe the document structure to obtain an XML file that complies with the XML standard.

[0078] The XML conversion of the picture set mainly includes the picture set within the visible range of human-computer interaction. The key technology lies in the information description of the container storing graphics elements and graphics element combinations, the normative definition of graphics elements such as graphics elements and flow charts, the trigger association between menus and events, etc.

[0079] This embodiment creates corresponding primitive components according to different primitives or graphics, such as ellipse components, rectangular components, etc. The primitive components are maintained according to the needs to update the status information such as selection, addition, deletion, property modification, etc. of the primitive components in real time.

[0080] By storing the attributes and logical relationships of the graphic element components and describing the graphic element according to the TC6_XML_V201.xsd file that can describe the document structure, an XML file that complies with the XML standard is obtained. Figure 3, taking the rectangular element as an example, its attributes include element name "name", upper left corner X coordinate "left", upper left corner Y coordinate "top", width "width", height "height", layer ID "layerID", rotation center point X coordinate "origionX", rotation center point Y coordinate "origionY" and rotation angle "rotateGon" attributes; pen color "penColor", line width "penWidth", line type "penType"; brush style "brushStyle", fill color "color", etc. After constructing the screen elements in the configuration software, map the element information to the XML file one by one. The resulting XML file is as follows: Figure 3 shown.

[0081] In step S3, according to the data characteristics of the variable set, the information description of the variable name, variable source, variable type, and value range is standardized and defined, and the variable set is converted into an XML file.

[0082] The XML conversion of variable sets mainly includes the core data processing of human-computer interaction software. The key technology lies in the normative definition of range class, alarm class, historical record, etc. The attributes of variable set elements include variable name "name", data type "dataType", variable description "description", variable initial value "initValue", variable unit group number "unit", range conversion "Scale", alarm "Alarms" and historical record "History". For the content of the generated XML file, please refer to Figure 4 .

[0083] In step S4, according to the data characteristics of the IO device driver set, the information description of the heterogeneous devices and communication protocols in the network is standardized and defined, and the IO device driver set is converted into an XML file, which further includes:

[0084] Define attributes for the elements of the IO device driver set, including device name, device description, communication protocol, device address and connection type;

[0085] Convert the IO device driver set to an XML file according to the XML Schema or DTD standard.

[0086] The XML conversion of the IO device driver set mainly includes the key implementation links of communication data interconnection and interoperability. The key technology lies in the description definition of IO devices in the network and the normative definition of communication protocols (such as Modbus, OPC). The attributes of the IO device driver set elements include the device name "name", the device description "desc", the communication protocol "protocol", the device address "devAddress" and the connection type "linkType". For the converted XML file, please refer to Figure 5 .

[0087] Among them, XML Schema or DTD standards are two standardized languages ​​of XML. DTD is similar to the grammar of written language, and written grammar stipulates the order of subject, predicate and object. DTD stipulates XML grammar, such as the order of elements, the number of elements, etc. The role of XML Schema is to define the legal building blocks of XML documents, which can replace DTD. XML Schema specifically defines the elements and attributes that can appear in the document; defines which element is a child element; defines the order of child elements; defines the number of child elements; defines whether an element is empty or whether it can contain text; defines the data type of elements and attributes; defines the default values ​​and fixed values ​​of elements and attributes. Therefore, this embodiment mainly uses XML Schema as the format of XML files.

[0088] In step S5, according to the data characteristics of the data type set, the conversion between different data types is defined in a standardized manner, and the conversion of the data type set into an XML file further includes:

[0089] Define attributes for elements in the data type set, including variable name, variable description, data type, variable initial value, upper value limit, and lower value limit;

[0090] Unify the formats of various data types and convert them into XML files.

[0091] The XML conversion of the data type set mainly includes the unified implementation of various data types. The key technology lies in the conversion of data types. The data type elements include the variable name "name", the variable description "desc", the data type "dataType" (int, real, string, bool), the variable initial value "initValue", the upper limit "hiLimit" and the lower limit "lowLimit". For the XML file generated by the data type conversion, please refer to Figure 6 .

[0092] In step S6, according to the data characteristics of the function set, a unified function description method is standardized and defined, and the function set including mathematical functions, string functions and time functions is converted into an XML file, which further includes:

[0093] Define attributes for the elements in the function set, including function name, function description, function return type and function implementation code;

[0094] Define attributes for the sub-elements of the function element, including parameter name, parameter description, parameter type, parameter passing method and default value;

[0095] Converts a set of functions into an XML file according to the XML Schema or DTD standard.

[0096] The XML conversion of function sets mainly includes the XML conversion of mathematical functions, string functions, and time functions. The key technology lies in the unified description method of functions. The attributes of the function "Function" element include the function's name "name", the function's description "desc", the function's return data type "returnType", and the function's implementation code "body". The child elements of the "Function" element are the function's parameter set "Parameters". The "Parameters" element includes the function's parameter name "name", the parameter's description "desc", the parameter's data type "type", the parameter passing method "byRef", and the default value "initValue" attribute. For the XML file generated by the function conversion, please refer to Figure 7 .

[0097] In step S7, according to the data characteristics of the script set, the object description of the trigger event is standardized and defined, and the script set including the screen script and the database script is converted into an XML file, which further includes:

[0098] Define attributes for the elements in the script set, including script name, script description and script body;

[0099] Convert script sets to XML files according to XML Schema or DTD standards.

[0100] The XML conversion of script sets mainly includes the XML conversion of screen scripts and database scripts. The key technology lies in the object description of the trigger event. The attributes of the "Script" element of the script set include the name of the script "name", the description of the script "description" and the definition of the script "body". For the XML file generated by the script conversion, please refer to Figure 8 .

[0101] This embodiment develops a screen set definition XML file, a variable set definition XML file, an IO device driver set definition XML file, a data type set definition XML file, a function set definition XML file, and a script set definition XML file corresponding to the configuration file through the research and decomposition of the human-computer interface interaction description. In practical applications, data persistence technology can be used to convert configuration files into XML files. Data persistence is a general term for converting a data model in memory to a storage model, and converting a storage model to a data model in memory. The data model can be any data structure or object model, and the storage model can be a relational model, an XML file, etc.

[0102] The method for converting the configuration file into an XML file in this embodiment can be used for cross-platform XML data interaction between multiple application systems. Any application system can generate a DOM tree by extracting the configuration file in the memory. The DOM tree is a document object with a standard interface. JAXP can be used to perform XML Schema pattern analysis on the document object in the DOM tree to generate an XML file and store it in a database. Then, the XML file in the database is transmitted to another application system through the network. The other application system receives the XML file and parses it into a configuration file, thereby realizing cross-platform XML data interaction and sharing.

[0103] Embodiment 2

[0104] This embodiment provides a device for converting a configuration file into an XML file, which is used for exporting interactive XML files by human-machine interface software. Fig. 9 , the device for converting the configuration file into an XML file includes:

[0105] Classification module 1, used for classifying configuration files into screen sets, variable sets, IO device driver sets, data type sets, function sets and script sets;

[0106] The first conversion module 2 is used to standardize the information description of the graphic elements according to the data characteristics of the picture set, and convert the picture set into an XML file;

[0107] The second conversion module 3 is used to standardize the information description of variable name, variable source, variable type, and value range according to the data characteristics of the variable set, and convert the variable set into an XML file;

[0108] The third conversion module 4 is used to standardize the information description of heterogeneous devices and communication protocols in the network according to the data characteristics of the IO device driver set, and convert the IO device driver set into an XML file;

[0109] A fourth conversion module 5, used to define conversion between different data types in a standardized manner according to data characteristics of the data type set, and convert the data type set into an XML file;

[0110] A fifth conversion module 6 is used to define a unified function description method according to the data characteristics of the function set, and convert the function set including mathematical functions, string functions and time functions into an XML file;

[0111] The sixth conversion module 7 is used to define the object description of the trigger event according to the data characteristics of the script set, and convert the script set including the screen script and the database script into an XML file.

[0112] The functions and implementation methods of the above-mentioned classification module 1, first conversion module 2, second conversion module 3, third conversion module 4, fourth conversion module 5, fifth conversion module 6 and sixth conversion module 7 are as described in the above-mentioned embodiment 1 and will not be repeated here.

[0113] Embodiment 3

[0114] The above-mentioned second embodiment describes in detail the apparatus for converting a configuration file into an XML file of the present invention from the perspective of modular functional entities. The following describes in detail the device for converting a configuration file into an XML file of the present invention from the perspective of hardware processing.

[0115] Please see Fig.10 The device 500 for converting a configuration file into an XML file may have relatively large differences due to different configurations or performances, and may include one or more processors (central processing units, CPU) 510 (for example, one or more processors) and a memory 520, and one or more storage media 530 (for example, one or more mass storage devices) storing application programs 533 or data 532. The memory 520 and the storage medium 530 may be temporary storage or permanent storage. The program stored in the storage medium 530 may include one or more modules (not shown in the figure), and each module may include a series of instruction operations in the device 500 for converting a configuration file into an XML file.

[0116] Furthermore, the processor 510 may be configured to communicate with the storage medium 530 and execute a series of instruction operations in the storage medium 530 on the device 500 for converting a configuration file into an XML file.

[0117] The device 500 for converting a configuration file into an XML file may also include one or more power supplies 540, one or more wired or wireless network interfaces 550, one or more input and output interfaces 560, and / or one or more operating systems 531, such as Windows Serve, Vista, etc.

[0118] Those skilled in the art will understand that Fig.10 The device structure for converting a configuration file into an XML file shown does not constitute a limitation on the device for converting a configuration file into an XML file, and may include more or less components than shown in the figure, or combine certain components, or arrange the components differently.

[0119] The present invention also provides a computer-readable storage medium, which may be a non-volatile computer-readable storage medium or a volatile computer-readable storage medium. The computer-readable storage medium stores instructions, which, when executed on a computer, cause the computer to execute the steps of the method for converting a configuration file into an XML file in the first embodiment.

[0120] If the module in the second embodiment is implemented in the form of a software function module and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of software. The computer software is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), disk or optical disk and other media that can store program codes.

[0121] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the above-described devices and equipment can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0122] The embodiments of the present invention are described in detail above in conjunction with the accompanying drawings, but the present invention is not limited to the above embodiments. Even if various changes are made to the present invention, if these changes fall within the scope of the claims of the present invention and their equivalents, they still fall within the protection scope of the present invention.

Claims

1. A method for converting a configuration file into an XML file, which is used for exporting interactive XML files by human-machine interface software, characterized in that: The method of converting the configuration file into an XML file includes: Divide the configuration files into screen sets, variable sets, IO device driver sets, data type sets, function sets and script sets; According to the data characteristics of the picture set, standardize the information description of the graphic elements and convert the picture set into an XML file; According to the data characteristics of the variable set, standardize the variable name, variable source, variable type, and value range information description, and convert the variable set into an XML file; According to the data characteristics of the IO device driver set, the information description of heterogeneous devices and communication protocols in the network is standardized and defined, and the IO device driver set is converted into an XML file; According to the data characteristics of the data type set, the conversion between different data types is standardized and defined, and the data type set is converted into an XML file; According to the data characteristics of the function set, a unified function description method is defined in a standardized manner, and the function set including mathematical functions, string functions and time functions is converted into an XML file; According to the data characteristics of the script set, the object description of the trigger event is defined in a standardized manner, and the script set including the screen script and database script is converted into an XML file.

2. The method for converting a configuration file into an XML file according to claim 1, characterized in that: The step of defining the information description of the graphic elements in a standardized manner according to the data characteristics of the picture set and converting the picture set into an XML file further comprises: Abstract and encapsulate graphic elements in an object-oriented manner to obtain graphic primitive components; Configure the properties and parameters of the graphic element components, and construct the graphic element components according to the requirements of TC6_XML_V201.xsd that can describe the document structure to obtain an XML file that complies with the XML standard.

3. The method for converting a configuration file into an XML file according to claim 1, characterized in that: The step of converting the IO device driver set into an XML file further comprises: Define attributes for the elements of the IO device driver set, including device name, device description, communication protocol, device address and connection type; Convert the IO device driver set to an XML file according to the XML Schema or DTD standard.

4. The method for converting a configuration file into an XML file according to claim 1, characterized in that: The conversion between different data types is defined in a standardized manner according to the data characteristics of the data type set, and the conversion of the data type set into an XML file further includes: Define attributes for elements in the data type set, including variable name, variable description, data type, variable initial value, upper value limit, and lower value limit; Unify the formats of various data types and convert them into XML files.

5. The method for converting a configuration file into an XML file according to claim 1, characterized in that: The method of defining a unified function description method according to the data characteristics of the function set and converting the function set including mathematical functions, string functions and time functions into an XML file further includes: Define attributes for the elements in the function set, including function name, function description, function return type and function implementation code; Define attributes for the sub-elements of the function element, including parameter name, parameter description, parameter type, parameter passing method and default value; Converts a set of functions into an XML file according to the XML Schema or DTD standard.

6. The method for converting a configuration file into an XML file according to claim 1, characterized in that: The step of defining the object description of the trigger event according to the data characteristics of the script set and converting the script set including the screen script and the database script into an XML file further includes: Define attributes for the elements in the script set, including script name, script description and script body; Convert script sets to XML files according to XML Schema or DTD standards.

7. The method for converting a configuration file into an XML file according to any one of claims 1 to 6, characterized in that: Used for cross-platform XML data interaction between multiple application systems; Any application system extracts the configuration file in the memory and generates a DOM tree, wherein the DOM tree is a document object with a standard interface; Use JAXP to analyze the XML Schema pattern of the document objects in the DOM tree, generate XML files, and store them in the database; Any application system can transmit the XML file in the database to another application system through the network, and the other application system receives the XML file and parses it into a configuration file.

8. A device for converting a configuration file into an XML file, used for exporting interactive XML files by human-machine interface software, characterized in that: include: Classification module, used to classify configuration files into screen sets, variable sets, IO device driver sets, data type sets, function sets and script sets; The first conversion module is used to standardize the information description of the graphic elements according to the data characteristics of the picture set, and convert the picture set into an XML file; The second conversion module is used to standardize the information description of variable name, variable source, variable type, and value range according to the data characteristics of the variable set, and convert the variable set into an XML file; The third conversion module is used to standardize the information description of heterogeneous devices and communication protocols in the network according to the data characteristics of the IO device driver set, and convert the IO device driver set into an XML file; A fourth conversion module, used to define conversion between different data types in a standardized manner according to data characteristics of the data type set, and convert the data type set into an XML file; A fifth conversion module, used to define a unified function description method in accordance with data characteristics of the function set, and convert the function set including mathematical functions, string functions and time functions into an XML file; The sixth conversion module is used to define the object description of the trigger event according to the data characteristics of the script set, and convert the script set including the screen script and the database script into an XML file.

9. A device for converting a configuration file into an XML file, characterized in that: The invention comprises a memory and a processor, wherein the memory stores computer-readable instructions, and when the processor executes the computer-readable instructions, the method for converting a configuration file into an XML file as claimed in any one of claims 1 to 7 is implemented.

10. A computer readable medium storing a computer program, characterized in that: When the computer program is executed by one or more processors, the method for converting a configuration file into an XML file as claimed in any one of claims 1 to 7 is implemented.