The invention discloses an OPC UA 
information model automatic construction method based on a structured 
database, which mainly solves the problems of high professional knowledge requirement, large 
workload and the like of manual construction of an OPC UA 
information model during traditional factory 
interconnection and interworking upgrading and reconstruction, and comprises the following implementation steps: importing an existing structured 
database of a 
production line; analyzing 
database mode information containing equipment and attributes, and mapping the database mode information into a triple set; generating an OWL file based on the triple; mapping to generate an 
XML file; converting to generate an 
information model XML file conforming to the OPC UA specification; generating a. C file and a. H file; creating an OPC UA 
server, and instantiating the information model. Starting from the requirement of automatically and efficiently constructing the OPC UA information model, the information model is automatically constructed according to the defined mapping rule on the basis of the existing structured database, so that the tedious operation of manually constructing the informationmodel one by one during OPC UA data communication transformation is greatly reduced, the 
transformation efficiency is improved, the practicability is high, the practicability is high, and wide application prospects are realized.