CN-121997899-A - Intelligent generation system and method for collecting communication codes among multiple platforms and multiple systems
Abstract
The invention relates to intelligent generation of a multi-platform multi-system acquisition communication code, in particular to an intelligent generation system and method of the multi-platform multi-system acquisition communication code. The intelligent generation system for collecting communication codes among multiple platforms and multiple systems comprises protocol document preprocessing and standardization agents, multiple platform collection component codes for generating agents and a communication protocol knowledge base. The invention provides an intelligent generation system for collecting communication codes among multiple platforms and multiple systems, which aims to solve the problem of protocol island caused by protocol difference among devices in an industrial field and improve the interconnection and intercommunication of industrial data and system integration efficiency. By introducing protocol document preprocessing and standardized agents, unstructured or semi-structured industrial communication protocol documents can be converted into unified protocol description documents, so that the complexity of protocol analysis is simplified. And by combining the multi-platform acquisition component codes to generate the intelligent agent, communication codes adapting to different hardware architectures and operating systems can be generated.
Inventors
- WANG JIANG
- CHEN XIANGYU
- WU HONGCHUAN
Assignees
- 天津大学
Dates
- Publication Date
- 20260508
- Application Date
- 20260122
Claims (10)
- 1. An intelligent generation system for collecting communication codes among multiple platforms and systems, which is characterized by comprising: The protocol document preprocessing and standardization agent is used for converting an unstructured or semi-structured industrial communication protocol document into a unified protocol description document; the multi-platform acquisition component code generates an agent, and is used for generating an industrial data acquisition communication component source code adapting to various hardware architectures and operating systems according to the unified protocol description document; And the communication protocol knowledge base is used for providing knowledge and data support for the protocol document preprocessing and standardization agent and the multi-platform acquisition component code generation agent.
- 2. The intelligent generation system for collecting communication codes between multiple platforms and systems according to claim 1, wherein the protocol document preprocessing and standardization agent comprises: The multi-mode analysis module is used for generating an intermediate representation with clear hierarchical relation and semantic association according to the industrial communication protocol document; The deep semantic understanding module is used for generating a protocol semantic representation according to the intermediate representation; And the structured output module is used for generating a standardized structured protocol description document according to the protocol semantic representation.
- 3. The intelligent generation system for collecting communication codes among multiple platforms and multiple systems according to claim 2, wherein the multi-modal analysis module comprises a document format unified processing unit, an optical character recognition unit, a document layout analysis unit, a table structure modeling unit, a mathematical formula recognition and conversion unit, a timing chart/flow chart analysis unit and a multi-modal joint modeling unit.
- 4. The intelligent generation system for collecting communication codes among multiple platforms and systems according to claim 2, wherein the deep semantic understanding module comprises a key term identification unit, a protocol body alignment unit, a relation extraction and semantic map construction unit, a communication flow reconstruction unit, a context reasoning and semantic aggregation unit, a version evolution identification unit, a long text semantic modeling unit and a small sample learning and semantic enhancement unit.
- 5. The intelligent generation system for collecting communication codes between multiple platforms and multiple systems according to claim 2, wherein the structured output module comprises a protocol meta information generation unit, a communication basic information generation unit, a message structure definition unit, a unique identifier and data point definition unit and an error code and exception handling description unit.
- 6. The intelligent generation system for collecting communication codes between multiple platforms and multiple systems according to claim 2, wherein the intelligent agent for generating the codes of the multiple platform collecting components comprises: the protocol analysis module is used for generating a communication logic model required by realizing communication according to the structured protocol description document; The platform adaptation module is used for mapping the communication logic model into a target hardware architecture and an operating system environment; and the code synthesis and optimization module is used for generating source codes of the collection components which can be compiled.
- 7. The intelligent generation system for collecting communication codes between multiple platforms and multiple systems according to claim 6, wherein the protocol analysis module comprises a protocol field analysis unit, a message assembly and analysis logic generation unit, a check rule generation unit and a communication time sequence analysis unit.
- 8. The intelligent generation system for collecting communication codes between multiple platforms and multiple systems according to claim 6, wherein said platform adaptation module comprises a platform parameter parsing unit, a platform abstraction layer mapping unit, a driving interface adaptation unit, and a tool chain and compiling configuration unit, and/or The code synthesis and optimization module comprises a code template filling unit, a complete source code engineering generation unit, a memory and performance optimization unit, a resource constraint optimization unit, a model light weight and quantization unit, a security mechanism injection unit and a static code analysis and bug repair unit.
- 9. The intelligent generation system for collecting communication codes between multiple platforms and multiple systems according to claim 6, wherein the communication protocol knowledge base comprises: the structured protocol library is used for storing the unified structured protocol description document generated by the protocol document preprocessing and standardized agent; The protocol knowledge graph is used for organizing and expressing semantic relations related to the industrial communication protocol in a graph structure form; The code template and component library is used for storing and managing reusable communication collecting code templates and functional components; And the test case library is used for storing test cases of various industrial communication protocols, communication scenes and abnormal conditions.
- 10. An intelligent generation method for collecting communication codes among multiple platforms and multiple systems, which is characterized in that the intelligent generation method is applied to the intelligent generation system as claimed in any one of claims 1 to 9, and comprises the following steps: S1, uniformly processing protocol documents in different formats through a multi-mode analysis technology, extracting key information and performing standardized processing; S2, carrying out named entity recognition, relation extraction and semantic association on the extracted information through deep semantic analysis and knowledge map mapping, and formatting the result into a unified protocol description document; S3, analyzing the protocol description document and calling a corresponding code template according to the hardware architecture and the operating system of the target platform, and automatically generating a communication code corresponding to the target platform; s4, automatically adding a security check and exception handling mechanism into the generated source code, and improving the security and performance of the code through a static analysis and optimization technology; s5, storing the communication codes into a knowledge base.
Description
Intelligent generation system and method for collecting communication codes among multiple platforms and multiple systems Technical Field The invention relates to intelligent generation of a multi-platform multi-system acquisition communication code, in particular to an intelligent generation system and method of the multi-platform multi-system acquisition communication code. Background Along with the continuous development of industrial Internet and intelligent manufacturing, the types and the number of devices in an industrial field are continuously increased, and various communication protocols are adopted between different devices, namely common industrial protocols such as Modbus, CAN, profinet and the like, and private protocols formed by a large number of manufacturers on the basis of standard protocols are also expanded, and due to the difference of grammar structures, data semantics and interaction mechanisms of the protocols, mutually split protocol islands are easily formed, so that the interconnection and intercommunication of industrial data and system integration are severely restricted. The development of the existing data acquisition system is mainly finished in a manual mode, engineering personnel need to deeply research and read complex protocol documents and manually write analysis and communication codes aiming at different protocols, the development period is long, the efficiency is low, the cost is high and the risk is high in the process of protocol adaptation, maintenance and upgrading, meanwhile, the protocol documents usually exist in unstructured forms such as PDF scanning pieces, complex tables, time sequence diagrams and the like, the traditional optical character recognition and analysis technology is difficult to accurately process, and a large amount of manual correction and arrangement are still needed. Although the general large language model has a certain code generation capability, due to lack of professional knowledge accumulation in the field of industrial communication protocols, complex semantics and context logic in protocol documents are difficult to understand accurately, and the problem of bottom layer adaptation related to a specific hardware platform and an operating system cannot be effectively processed, so that the actual application requirements of industrial data acquisition and protocol analysis are difficult to be directly met. Disclosure of Invention The invention aims to solve the technical problem of overcoming the defects in the prior art and providing an intelligent generation system and method for collecting communication codes among multiple platforms and systems. The invention is realized by the following technical scheme: an intelligent generation system for collecting communication codes among multiple platforms and systems, which is characterized by comprising: The protocol document preprocessing and standardization agent is used for converting an unstructured or semi-structured industrial communication protocol document into a unified protocol description document; the multi-platform acquisition component code generates an agent, and is used for generating an industrial data acquisition communication component source code adapting to various hardware architectures and operating systems according to the unified protocol description document; And the communication protocol knowledge base is used for providing knowledge and data support for the protocol document preprocessing and standardization agent and the multi-platform acquisition component code generation agent. Preferably, the protocol document preprocessing and standardization agent includes: The multi-mode analysis module is used for generating an intermediate representation with clear hierarchical relation and semantic association according to the industrial communication protocol document; The deep semantic understanding module is used for generating a protocol semantic representation according to the intermediate representation; And the structured output module is used for generating a standardized structured protocol description document according to the protocol semantic representation. Preferably, the multi-modal analysis module comprises a document format unified processing unit, an optical character recognition unit, a document layout analysis unit, a table structure modeling unit, a mathematical formula recognition and conversion unit, a timing chart/flow chart analysis unit and a multi-modal joint modeling unit. Preferably, the deep semantic understanding module comprises a key term identification unit, a protocol body alignment unit, a relation extraction and semantic map construction unit, a communication flow reconstruction unit, a context reasoning and semantic aggregation unit, a version evolution identification unit, a long text semantic modeling unit and a small sample learning and semantic enhancement unit. Preferably, the structured output module comprises a protocol