Process-level plug-in integrated framework platform
By adopting a process-level plug-in integration framework platform in application integration, the problem of insufficient plug-in mechanism in the existing technology is solved, and the system's high scalability and data interaction efficiency are improved.
Patent Information
- Application Number
- CN202411767605.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-04
- Publication Date
- 2025-03-25
AI Technical Summary
The existing technology lacks an effective plug-in mechanism in application integration, resulting in poor scalability of the system, difficulty in reusing existing development results, and insufficient abstraction and calling framework of plug-ins.
It adopts a process-level plug-in integration framework platform, supports basic services and accommodates plug-ins through the interface integration framework, and realizes plug-in integration and service requests through the process communication mechanism. The platform includes an interface integration framework, multiple plug-ins and process communication mechanisms, and realizes functional integration and data interaction through module division, plug-in construction and process communication.
It improves the independence and security of software development, enhances the scalability of the system, simplifies the development of specific integrated business nodes, and improves the access and interaction efficiency of multi-source data.
Smart Images

Figure CN119690418A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of plug-in framework development, and more particularly to a process-level plug-in integrated framework platform. Background Art
[0002] At present, application integration technology can be divided into data-oriented integration, process integration and service integration technology in its development. Data integration requires data identification to determine the metadata model and provide defined interfaces to ensure data sharing, but interface modification is time-consuming and labor-intensive and lacks a clear process model; process integration adopts process-oriented integration ideas to define various types of information interactions and reduce the complexity of process design; service integration encapsulates applications and provides abstract interfaces that can be called repeatedly, which is a new generation of application integration technology.
[0003] The essence of integration is information exchange. In addition to file and database-based information exchange, there is also message transmission. If the communication architecture between systems adopts a message architecture, and messages are only responsible for data transmission, then the discovery and functional operation of the system's internal data must be completed by plug-ins.
[0004] The traditional custom business development process is to adapt the code to specific needs, without standard module division and function encapsulation mechanism, which makes it difficult to effectively reuse the development results of existing projects. Although the plug-in mechanism can be used to encapsulate and utilize the business, the existing plug-in mechanism of the platform only provides the function of obtaining and instantiating plug-in objects by category and name, and does not provide a calling framework. It is impossible to further abstract the plug-in to standardize and simplify the development of specific integrated business nodes, and the scalability is poor. Therefore, how to optimize the plug-in mechanism and enhance the scalability of the system is an urgent problem that technicians in this field need to solve. Summary of the invention
[0005] In view of this, the present invention provides a process-level plug-in integrated framework platform to overcome the above-mentioned defects.
[0006] In order to achieve the above object, the present invention adopts the following technical solution:
[0007] A process-level plug-in integrated framework platform, including:
[0008] At least one interface integration framework to support basic services and accommodate plug-ins;
[0009] The multiple plug-ins are integrated into the interface integration framework in a process manner, and message exchange is performed through a process communication mechanism to realize service requests.
[0010] Optionally, the steps of constructing the interface integration framework are:
[0011] Divide modules based on business functions to obtain multiple sub-modules;
[0012] Analyze the plurality of sub-modules to determine whether they are implemented using plug-ins, and if so, build the plug-in; if not, build a configuration file;
[0013] Obtain user requirements, and call the corresponding configuration file based on the user requirements to build the interface integration framework.
[0014] Optionally, the basic services include desktop framework, desktop environment, view management, basic operation and security management.
[0015] Optionally, the security management includes a data security management module, and the data security management module includes:
[0016] A hash generation unit, used to instantiate the original data and convert it into a byte array, and obtain a hash value through the byte data;
[0017] A storage unit, used to store the hash value and the original data in correspondence;
[0018] The data query unit is used to obtain the hash value to be queried, use the hash value to be queried to query the storage unit, and call the original data according to the query result.
[0019] Optionally, the plug-in includes a dynamic library plug-in and a process plug-in.
[0020] Optionally, the steps for building the plug-in are:
[0021] defining at least one interface class for implementing communication between the plug-in and the interface integration framework;
[0022] A plug-in metadata file is defined, working code is generated according to the plug-in metadata file, and a corresponding plug-in is formed according to the code.
[0023] Optionally, the process communication mechanism is specifically:
[0024] Socket communication mechanism, used to realize data flow transmission between processes;
[0025] DBUS communication mechanism, used to implement message transmission between processes;
[0026] The signal-slot mechanism is used to implement data transmission within a process.
[0027] Optionally, the data transmission steps of the socket communication mechanism are:
[0028] The sending end establishes a communication connection with the receiving end, and sends the request data to the receiving end;
[0029] The receiving end calls the transmission data according to the request data, and converts the transmission data into a byte stream and transmits it to the sending end in batches using a socket communication mechanism, wherein a delay is added between two adjacent batches;
[0030] The sending end reads the data stream, parses and stores it according to a predetermined data format.
[0031] It can be seen from the above technical solutions that the present invention discloses a process-level plug-in integrated framework platform, which has the following beneficial effects compared with the prior art:
[0032] 1. Through the "framework + plug-in" model, a functional integration method of the plug-in mechanism is formed, and operating resources and program failures are isolated in a multi-process manner, which improves the independence and security of software development, facilitates the search and location of problems, reduces the dependency between plug-ins, and is conducive to the rapid transplantation and reuse of plug-ins;
[0033] 2. The plug-in is interface-oriented and dynamically called. Project development customizes functions for different seats, which greatly increases the scalability of the system;
[0034] 3. For the access and interaction of multi-source data, multiple methods are adopted to realize data interaction, reduce direct interaction with the DAMO database server, enhance the real-time interaction between local data and shared data, and improve the unified allocation and management of resources. BRIEF DESCRIPTION OF THE DRAWINGS
[0035] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying creative work.
[0036] Figure 1 A schematic diagram of the overall structure provided by the present invention;
[0037] Figure 2 A schematic diagram of the architecture of the plug-in integrated framework provided by the present invention;
[0038] Figure 3 A schematic diagram of the flow of the plug-in loading method provided by the present invention. DETAILED DESCRIPTION
[0039] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0040] On the one hand, this embodiment discloses a process-level plug-in integrated framework platform, such as Figure 1 As shown, including:
[0041] At least one interface integration framework to support basic services and accommodate plug-ins;
[0042] Multiple plug-ins, the called multiple plug-ins are integrated into the interface integration framework in the form of processes, and message exchange is performed through the process communication mechanism to realize service requests.
[0043] Furthermore, the process-level plug-in integration framework technology introduces process plug-in technology based on the original dynamic library plug-in, starts the plug-in as a process and integrates it into the interface window, completes window integration through inter-process window calls, uses sockets to complete inter-process data flow transmission, uses DBUS to complete inter-process message communication, and uses signal slot functions to complete data transmission within the process. The plug-in is in an independent process and is isolated from the memory of other processes. The technical architecture when applied is as follows: Figure 2 As shown, it includes: basic layer, plug-in layer, transport layer and application layer, among which:
[0044] The basic layer includes storage resources and support resources. Storage resources include plug-in name, plug-in address, plug-in description, plug-in source, etc. Support resources include Kylin desktop operating system (V10), Inter(R)Core(TM)i7-9700@3GHzCPU, 5.15.0-34-generic kernel, X86_64 architecture, DM database, system development environment Qt, system operating environment X window manager, etc. The framework structure adopts C / S architecture mode. Among them, Qt programming language is a cross-platform development language that can be adapted to different operating systems. X window manager is a graphical user interface software based on network architecture, including two components, XServer and XClient. XClient application tells XServer the interface it wants to present, and XServer draws the result through the hardware it manages.
[0045] The plug-in layer includes plug-in library management, inter-plug-in messaging, service management, plug-in wizard development, log management, and wizard management, supporting plug-in development and use.
[0046] The transport layer includes relevant transmission data types and transmission protocols. The transmission data types include text, files, pictures, videos and other data types; the transmission protocols include DBUS bus services to complete process calls between processes, TCP / UDP transmission protocols to complete data transmission between different application software, and signal slot mechanisms to complete data transmission between plug-in business modules.
[0047] The application layer is the user development layer. Users develop application plug-ins that meet various business needs based on the development model and interface provided by the framework. Different seats can load different plug-in combinations.
[0048] In one embodiment, the steps of constructing the interface integration framework are:
[0049] Divide modules based on business functions to obtain multiple sub-modules;
[0050] Analyze multiple sub-modules to determine whether they are implemented using plug-ins. If so, build the plug-in; if not, build the configuration file;
[0051] Obtain user needs, call corresponding configuration files based on user needs, and build an interface integration framework.
[0052] In one embodiment, the basic services include desktop framework, desktop environment, view management, basic operation and security management.
[0053] Furthermore, the framework structure adopts visual display technology to build a business process management module, provide basic operation services and core service engines, and realize the collaborative development of business functions. The plug-in adopts plug-in mechanism integration technology to build a plug-in module library and build specific implementations of functions; through interconnection with other functional modules and processes, the business function customization, management, and release based on the integrated framework design are realized. In this embodiment, the modules are divided according to the business functions, and the integrated framework software platform is divided into a login interface program module and a main frame interface program module (including a start menu program unit, a title bar program unit, a task bar program unit, and a central frame program unit), among which the business functions in the title bar program unit and the task bar program unit can be designed as plug-ins.
[0054] Furthermore, the integration framework is based on the C / S software architecture model, and a customized interface integration framework is designed to provide the software system with basic business functions such as desktop framework, desktop environment, view management, basic operation, and security management, realizing a framework platform with separated interface, plug-in, and data. The desktop framework includes menu bar, operation bar, status bar, start menu, etc., which can accommodate various plug-ins.
[0055] Among them, the Xorg.conf file in the desktop environment is the core configuration file of the X window manager. By customizing and adjusting the graphic display configuration, setting the screen resolution display framework interface, defining fonts, and loading font libraries of different fonts, the system can support multiple languages and character sets. The window manager can realize the display of multiple X programs on one screen. The display manager, window manager and file manager are integrated to form an integrated framework desktop environment. The specific implementation method is: locate the startup file path in the startup file Start.sh configuration file and grant executable permissions. First, set the graphic display position in the configuration file, set the Chinese desktop environment, the input method framework under the desktop environment, the desktop resolution, the communication bus, etc.; secondly, set the desktop display background, icons, menus, buttons, etc. in the desktop configuration file, and set the startup framework interface. Finally, read the configuration file to load the framework reference.
[0056] View management includes function view and tool view, which can load function plug-ins and tool plug-ins and display them visually on the interface. Specific implementation method: Create function view and tool view scenes respectively, load local function plug-ins and tool plug-ins, trigger the startup program to display each function and tool plug-in on the interface. Function plug-ins include time plug-ins, weather plug-ins, status plug-ins, etc. Tool plug-ins include close interface plug-ins, minimize interface plug-ins, settings plug-ins, etc. Since the plug-ins are developed independently and generate independent lib libraries, when one of the plug-ins crashes, it will not affect the normal operation of other plug-ins. Using the framework to load and run different plug-in combinations can meet the various types of application needs of different users.
[0057] Basic operations include software startup, plug-in startup, service startup and other basic operations.
[0058] In one embodiment, the security management includes a data security management module, including:
[0059] A hash generation unit is used to instantiate the original data and convert it into a byte array, and obtain a hash value through the byte data;
[0060] A storage unit, used to store the hash value and the original data in correspondence;
[0061] The data query unit is used to obtain the hash value to be queried, use the hash value to be queried to query in the storage unit, and call the original data according to the query result.
[0062] Furthermore, security management includes monitoring behaviors such as data security, standard logs, error pop-ups, dialog box reminders, etc. Data security ensures that data in the database and local sharing center is stored and read using non-plaintext, tamper-proof symmetric encryption AES technology, achieving independence and security of data reading between seats.
[0063] Furthermore, the implementation steps of data security are as follows: (1) Encrypted storage: instantiate the QCryptograph icHash object, and use the MD5 algorithm to convert the string to be converted into a byte array, use the addData() method to add data, obtain the hash result through the result() method, and store it in the database; (2) Decrypted reading: by checking whether the hash value exists in the database, find the corresponding original data, and then read and display it.
[0064] Among them, standard logs include process death, external users modifying key configurations, etc., providing users with the possibility to monitor system status and maintain system information.
[0065] In one embodiment, the steps for building a plug-in are:
[0066] Define at least one interface class for implementing communication between the plug-in and the interface integration framework;
[0067] Define a plugin metadata file, generate working code based on the plugin metadata file, and form a corresponding plugin based on the code.
[0068] Furthermore, a set of interfaces for communicating with plug-ins is defined (a class with only pure virtual functions), and the Q_INTERFACE() macro is used to tell the qt meta-object system about the interface. A plug-in metadata file is defined using Q_PLUGIN_METADATA, which includes information such as the plug-in name, version, author, description, and the functions and methods provided by the plug-in, and is used to generate the necessary code for plug-in-related work, so that the relevant plug-ins can be loaded, unloaded, and function calls can be made later. The plug-in interface embedding position is also defined in the plug-in metadata, and the plug-in is embedded through the interface pointer in the plug-in, so that the plug-in is integrated into the software framework.
[0069] In one embodiment, the plug-in includes a dynamic library plug-in and a process plug-in.
[0070] Furthermore, this embodiment not only realizes the independence and separation of functions, but also instantiates all plug-ins, uniformly manages the instantiation objects of all plug-ins and coordinates the calls between plug-ins. The plug-in entity mainly includes the dynamic library type and the process type; wherein the plug-in information includes the plug-in version, the plug-in name and the corresponding configuration information, the call to the plug-in includes the identification of the plug-in, the loading of the plug-in, the startup of the plug-in, the uninstallation of the plug-in, the combination of the plug-in, etc., and the plug-in display includes the plug-in version information, the plug-in status information, the file type information, the file size, the date, other descriptive information, etc.
[0071] Furthermore, when using a plug-in, use the QPluginLoader class to dynamically load the plug-in, and use the qobject_cast() type conversion operation to test whether the plug-in implements the specified interface, and realize the dynamic display and use of the plug-in by calling the plug-in method; the plug-in loading steps are as follows Figure 3 As shown, when using a plug-in, all files in the plug-in directory are traversed, the plug-in is dynamically loaded using the QPluginLoader class, and the executable program of the process plug-in is started using QProcess. The entry class of each plug-in needs to implement the startup and uninstallation interfaces, register services, obtain services, initialize the interface, etc. when the plug-in is started, and release plug-in resources when uninstalling.
[0072] By making a refined division of the software and developing modules that are not key functions into plug-ins, the degree of coupling between plug-ins is effectively reduced. When facing specific tasks, only task-related plug-ins are loaded, redundant functions are eliminated, and efficient task execution is ensured.
[0073] In one embodiment, the process communication mechanism is specifically:
[0074] Socket communication mechanism, used to realize data flow transmission between processes;
[0075] DBUS communication mechanism, used to implement message transmission between processes;
[0076] The signal-slot mechanism is used to implement data transmission within a process.
[0077] Furthermore, in order to solve the problems of diverse data structures and poor coordination, modular programming is adopted, data is exchanged through the message bus, DBUS bus service is registered, and data is uniformly allocated and managed on the central platform.
[0078] Furthermore, DBUS mainly provides communication for system processes in the Linux desktop environment, and can pass Linux desktop environment and Linux kernel events as messages to processes. An application can connect to multiple buses at the same time, and multiple applications can be connected to any bus at any time. Applications can share global and local messages. The communication between parent and child processes uses the message bus mode remote call. The implementation process is: register the DBUS service, including the service name and object path. After registration, define the interface, use QDBUSInterface to implement communication, and the main process uses the QDBUSmessage() function to send messages. The child process obtains the message transmitted by the main process through the connect() method. The child process can also call the main process method through the call() function to obtain the QDBUSmessage message.
[0079] Message types include text messages, structured messages, and binary stream messages. It can realize message transmission, text transmission, and remote procedure calls between different applications across processes and networks. It provides a communication interface through an integrated framework to realize message sending and receiving functions.
[0080] In one embodiment, the data transmission steps of the socket communication mechanism are:
[0081] The sender establishes a communication connection with the receiver and sends the request data to the receiver;
[0082] The receiving end calls the transmission data according to the request data, and converts the transmission data into a byte stream and transmits it to the sending end in batches using the socket communication mechanism, wherein a delay is added between two adjacent batches;
[0083] The sender reads the data stream, parses it and stores it according to the predetermined data format.
[0084] Furthermore, when a plug-in is upgraded, the latest version of the relevant plug-in can be automatically obtained according to the plug-in description information and compared with the current version to complete the plug-in function update operation, and the executable file, configuration information, etc. can be saved in the local installation package and the basic database for other application seats to download and update.
[0085] When the plug-in is updated, the plug-in file needs to be downloaded from the server for update. The process of inter-process message communication is as follows: the server opens the tcpSocket socket to listen to the client. When the client process starts, the tcpSocket socket will be initialized, the IP and port number will be bound, and the server will be actively connected. After the connection is successful, the connected signal will be triggered to upload local files or the latest version of the plug-in or software installation package to the server. When the software is updated, the installation package needs to be downloaded from the server for update.
[0086] A timeout connection function is provided during network connection to avoid network connection failures caused by network stability. On this basis, a failure reconnection mechanism is designed to ensure successful network connection and provide predictive conditions for data transmission.
[0087] In file transfer, the local file is converted into a byte stream and sent through a TCP socket. QDataStream is a variable-size byte array used to transmit large arrays, and the sent data sequence is converted into a binary stream. When transmitting, the file name and file size are sent first, and the file size is sent after receiving. Each frame sends 1024*64 bytes of data. In order to ensure that the data frame is sent too fast, a delay is added, and the next transmission is continued after the transmission is completed. After the transmission is completed, the data is parsed at the receiving end. By reading the TCP socket data, the data block (file name, file size, etc.) content is read through the defined data format, and the file size data is continued to be parsed after writing to the local file.
[0088] The integrated framework platform is not directly connected to the database server of the business system. Through the independent design and development of functional modules for multi-source data access, data interaction is carried out using message bus, TCP, reading configuration files and other modes, so as to realize the allocation and management of real-time shared data and locally stored data. This not only solves the problem of shared data permissions, but also effectively improves the timeliness of business collaboration.
[0089] In this specification, each embodiment is described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the embodiments can be referred to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part.
[0090] The above description of the disclosed embodiments enables one skilled in the art to implement or use the present invention. Various modifications to these embodiments will be apparent to one skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to the embodiments shown herein, but rather to the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A process-level plug-in integrated framework platform, characterized in that: include: At least one interface integration framework to support basic services and accommodate plug-ins; The multiple plug-ins are integrated into the interface integration framework in a process manner, and message exchange is performed through a process communication mechanism to realize service requests.
2. A process-level plug-in integrated framework platform according to claim 1, characterized in that: The steps for constructing the interface integration framework are: Divide modules based on business functions to obtain multiple sub-modules; Analyze the plurality of sub-modules to determine whether they are implemented using plug-ins, and if so, build the plug-in; if not, build a configuration file; Obtain user requirements, and call the corresponding configuration file based on the user requirements to build the interface integration framework.
3. A process-level plug-in integrated framework platform according to claim 1, characterized in that: The basic business includes desktop framework, desktop environment, view management, basic operation and security management.
4. According to claim 3, a process-level plug-in integrated framework platform is characterized in that: The security management includes a data security management module, and the data security management module includes: A hash generation unit, used to instantiate the original data and convert it into a byte array, and obtain a hash value through the byte data; A storage unit, used to store the hash value and the original data in correspondence; The data query unit is used to obtain the hash value to be queried, use the hash value to be queried to query the storage unit, and call the original data according to the query result.
5. According to the process-level plug-in integrated framework platform of claim 2, it is characterized in that: The plug-ins include dynamic library plug-ins and process plug-ins.
6. A process-level plug-in integrated framework platform according to claim 5, characterized in that: The steps to build the plugin are: defining at least one interface class for implementing communication between the plug-in and the interface integration framework; A plug-in metadata file is defined, working code is generated according to the plug-in metadata file, and a corresponding plug-in is formed according to the code.
7. A process-level plug-in integrated framework platform according to claim 1, characterized in that: The process communication mechanism is specifically: Socket communication mechanism, used to realize data flow transmission between processes; DBUS communication mechanism, used to implement message transmission between processes; The signal-slot mechanism is used to implement data transmission within a process.
8. A process-level plug-in integrated framework platform according to claim 7, characterized in that: The data transmission steps of the socket communication mechanism are: The sending end establishes a communication connection with the receiving end, and sends the request data to the receiving end; The receiving end calls the transmission data according to the request data, and converts the transmission data into a byte stream and transmits it to the sending end in batches using a socket communication mechanism, wherein a delay is added between two adjacent batches; The sending end reads the data stream, parses and stores it according to a predetermined data format.
Citation Information
Cited By
Linux process wrapper calling method suitable for mine control system and mine control system
CN121209981A