A method and system for constructing a multi-scene adaptive human-computer interface for power services
Patent Information
- Application Number
- CN202511472754.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-10-15
- Publication Date
- 2026-09-25
- Estimated Expiration
- 2045-10-15
AI Technical Summary
由于界面构建技术栈的差异,相同的功能模块在生产控制大区和管理信息大区需要重复开发,重复的内容既包括HMI部分,也包括支撑HMI的数据服务模块,限制了电力业务应用的快速开发
[0019]本发明的有益效果在于,与现有技术相比,本发明提供了一种面向电力业务的多场景适配的人机界面构建方法和系统,针对电力业务不同安全区人机界面构建技术的差异,提出了可跨区复用的人机界面及数据交互适配方法,实现了电力业务生产控制大区和管理信息大区的人机界面和数据服务技术栈统一,模块复用,便于电力业务功能模块在跨区应用中迁移,为电力业务应用快速实现多场景适配提供了可行的解决方案。
Smart Images

Figure CN121680989B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of power business, and specifically relates to a method and system for constructing human-machine interfaces that are adapted to multiple scenarios in power business. Background Technology
[0002] The power industry is one of the main pillars of the national energy sector. In 2015, the National Energy Administration of China issued the "Overall Plan for Security Protection of Power Monitoring Systems" (National Energy Safety
[2015] No. 36), aiming to strengthen the security protection of power monitoring systems. This plan was formulated in accordance with the requirements of the "Regulations on Security Protection of Power Monitoring Systems," clarifying the objectives of security protection for power monitoring systems and proposing the overall principles of "security zoning, dedicated networks, horizontal isolation, and vertical authentication." It stipulates that the power monitoring system be divided into a production control zone and a management information zone, and that physical isolation devices be set up between the production control zone and the management information zone to ensure unidirectional data transmission between the two zones while preventing any possible bidirectional connection attempts.
[0003] The production control zone can be further divided into a control zone (also known as safety zone one) and a non-control zone (also known as safety zone two). The control zone is a crucial link in power production, directly enabling real-time monitoring of the primary power system and serving as a key area for safety protection. The non-control zone is a necessary link in power production, operating online but without control functions. The management information zone (also known as safety zone three) is a collection of power enterprise management business systems outside the production control zone.
[0004] The "Overall Security Protection Plan for Power Monitoring Systems" clearly stipulates the security protection requirements within the production control area, prohibiting email services within the production control area and prohibiting common WEB services within the control area. Business systems outside the control area are allowed to adopt a B / S structure, but only for internal use within the business system.
[0005] In response to the security requirements of power monitoring systems, the human-machine interface (HMI) technology stack in the power industry's production control areas, especially for SCADA systems and monitoring applications, is typically built using dedicated client / server interface technologies. The main technologies include the cross-platform C++ graphical user interface library Qt, the cross-platform Java graphical user interface library Swing / AWT, etc. The vector graphics file format adopts the CIM / G format based on SVG (Scalable Vector Graphics) technology, and most other HMI interfaces are custom-developed based on graphical interface libraries.
[0006] In the management information area, web technologies are typically used for construction. Aside from a limited number of graphical files that can be migrated between the production control area and the management information area, other customized interfaces do not need to be reused. Due to differences in the interface construction technology stack, the same functional modules need to be repeatedly developed in both the production control area and the management information area. This duplication includes both the HMI (Host Management Interface) and the data service modules supporting the HMI, limiting the rapid development of power business applications. Summary of the Invention
[0007] To address the shortcomings of existing technologies, this invention provides a method and system for constructing human-machine interfaces that are adaptable to multiple scenarios in power business. This method not only meets the overall security protection requirements of power monitoring systems but also unifies the technology stack for cross-regional applications, enabling code reuse and unification in cross-regional applications and improving the application development efficiency of power business.
[0008] To solve the above-mentioned technical problems, the present invention adopts the following technical solution.
[0009] This invention first discloses a method for constructing a human-machine interface that adapts to multiple scenarios in the power industry, the method comprising the following steps: Step 1: Separate the interface and data service parts of the production control area application into a front-end interface layer and a back-end data service layer. Use browser front-end technology to build the front-end interface layer of the production control area. Embed the browser runtime in the desktop application to achieve the integration of the desktop software of the production control area with the browser runtime environment, thereby unifying the interface runtime environment with the management information area. Step 2: Compare and update the static web resources on the desktop of the production control area through the file service of the production control area to realize the reuse of interface resources; Step 3: For desktop and web clients, the backend data service layer is encapsulated through an interface adaptation layer to achieve isolation and consistent encapsulation of the dynamic data interaction interface of the application interface. Step 4: Establish communication between the front-end data proxy module and the data service gateway. Through the service bus mode of the data service gateway, realize the registration management, request and response routing and load balancing of various services, and realize the unified reuse of data services in the production control area and management information area. Step 5: Use the data service module to process the service requests of the RPC service proxy using the RPC remote service call protocol and locate the RPC service provider, and perform data processing and response according to the request parameters.
[0010] The present invention further includes the following preferred embodiments: The method of constructing the front-end interface layer of the production control area using browser front-end technology, embedding a browser in the desktop application, and integrating the browser runtime environment of the desktop software further includes: After the application process starts, it initializes the browser component engine, which starts the browser process group and performs IPC cross-process communication with the browser main process. According to the application layout requirements, a browser rendering component is initialized under the interface container. The browser rendering component communicates with the rendering process in the corresponding browser process group via IPC. After initialization, the browser rendering component loads page resources as needed and renders the page through the browser rendering process, then displays it in the corresponding area. The browser component engine interacts with other components of the local application process, injecting local objects into the JavaScript runtime environment to achieve bidirectional operation between the web page and local objects.
[0011] When the application window is closed or the user exits, the local browser component object is destroyed by calling the destruction method of the browser rendering component or the destruction method of the browser component engine. During destruction, the browser process group is notified to destroy the corresponding browser rendering process.
[0012] The step of comparing and updating the static web resources on the desktop of the production control zone through the file service of the production control zone further includes: The static resource proxy module deployed in the production control area interacts with the remote file service. Static resource requests from the presentation layer are intercepted by an interceptor and forwarded to the static resource proxy module injected into the browser environment. The static resource proxy module first checks if the resource exists in the local static resource cache. If the resource does not exist, it constructs the absolute path of the resource on the file server based on the application root address and the resource's relative path, retrieves the resource from the file service in the production control area via the file service network protocol, writes it to the local static resource cache directory, and returns the local resource address to the front end. If the resource already exists, it verifies the local resource's summary information against the file service's summary information. If the summary information does not match, it retrieves the resource from the file service and updates the local cache; if the summary information matches, it returns the local resource address.
[0013] The interaction between the desktop and web clients and the backend data service layer via their respective protocols further includes: On the desktop, a service proxy object is injected into the browser runtime and interacts with the backend data service layer via the RPC protocol; on the web, data is interacted with the web server via the HTTP protocol.
[0014] The process of implementing registration management, request-response routing, and load balancing for various services through the service bus mode of the data service gateway, and achieving unified reuse of data services in the production control area and management information area, further includes: For dynamic data in the production control area, a JavaScript library is encapsulated to handle dynamic data interfaces. All dynamic data requests are proxied by this JavaScript library and proxied through an RPC service proxy module injected into the browser environment. The RPC service proxy communicates with the backend RPC service gateway through the remote service call protocol. The RPC service proxy forwards the request from the dynamic data interface library to the RPC service gateway. After the service gateway processes the request, it returns the response data. After receiving the response data, the RPC service proxy returns it to the dynamic data interface library. The dynamic data interface library then returns the returned data to the front-end presentation layer for result data processing or rendering. The dynamic data of the management information area uses a dynamic data JavaScript interface library. When the JavaScript library processes backend requests, it only needs to be replaced with an AJAX interface layer. The AJAX interface layer implements the same functions as the RPC service proxy module, except that it uses the HTTP protocol to communicate with the interface layer in the backend web container. In the backend web container, AJAX requests from dynamic data from the frontend are handled by encapsulating a unified interface. This unified interface interfaces with the RPC service proxy inside the web container, forwarding the request to the RPC service proxy. The request is then forwarded to the RPC service gateway, which processes the request and returns response data. After receiving the response data, the RPC service proxy returns it to the frontend AJAX interface layer through the web interface layer.
[0015] In the production control zone and management information zone, the modules and code of the data service gateway are completely reused, and the static resources and dynamic data of the interface presentation layer remain consistent in cross-zone applications.
[0016] This invention also discloses a human-machine interface construction system for multiple scenarios of power business, utilizing the aforementioned human-machine interface construction method for multiple scenarios of power business, comprising: The browser runtime environment encapsulation module is used to separate the interface and data service parts of the production control area application, which is divided into a front-end interface layer and a back-end data service layer. The front-end interface layer of the production control area is built using browser front-end technology. The browser runtime is embedded in the desktop application to realize the integration of the desktop software of the production control area with the browser runtime environment, thereby unifying the interface runtime environment with the management information area. The production control zone front-end resource proxy module is used to compare and update the static web resources on the desktop through the file service of the production control zone, so as to achieve unification and reuse with the interface resources of the management information zone. The front-end data proxy module is used to encapsulate the back-end data service layer through an interface adaptation layer for desktop and web clients, respectively, and to achieve isolation and consistent encapsulation of dynamic data interaction interfaces in the application interface. The backend data service gateway module is used to establish communication between the frontend data proxy module and the data service gateway. Through the service bus mode of the data service gateway, it realizes the registration management, request and response routing and load balancing of various services, and realizes the unified reuse of data services in the production control area and management information area. The backend data service module is used to process service requests from RPC service proxies and locate the RPC service provider using the RPC remote service call protocol, and to perform data processing and response based on the request parameters.
[0017] Accordingly, this application also discloses a terminal, including a processor and a storage medium; The storage medium is used to store instructions; The processor is used to operate according to the instructions to execute the steps of the aforementioned human-machine interface construction method adapted to multiple scenarios for power services.
[0018] Accordingly, this application also discloses a computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements the steps of the aforementioned human-machine interface construction method for multi-scenario adaptation in power business.
[0019] The beneficial effects of this invention are that, compared with the prior art, this invention provides a method and system for constructing human-machine interfaces that are adapted to multiple scenarios in the power business. Addressing the differences in human-machine interface construction technologies across different security zones in the power business, it proposes a cross-zone reusable human-machine interface and data interaction adaptation method. This achieves the unification of the human-machine interface and data service technology stack in the power business production control zone and management information zone, enabling module reuse and facilitating the migration of power business functional modules in cross-zone applications. It provides a feasible solution for the rapid multi-scenario adaptation of power business applications. Attached Figure Description
[0020] Figure 1 This is the overall framework diagram of the power monitoring system in this invention.
[0021] Figure 2 This is a schematic diagram of the embedded browser module in the production control area application process of this invention; Figure 3This is a schematic diagram of the static resource update steps for the production control area page in this invention; Figure 4 This is a schematic diagram of the dynamic data update steps for the production control area in this invention; Figure 5 This is a schematic diagram of the dynamic data update steps for the management information area in this invention; Figure 6 This is a schematic diagram illustrating the calling relationship between the RPC service proxy, RPC service gateway, and RPC service in this invention. Detailed Implementation
[0022] To make the objectives, technical solutions, and advantages of the present invention clearer, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention.
[0023] The embodiments described in this application are merely some, not all, embodiments of the present invention. Based on the spirit of the present invention, other embodiments obtained by those skilled in the art without inventive effort are all within the protection scope of the present invention.
[0024] To address the shortcomings of existing technologies, this invention proposes a method and system for constructing a human-machine interface (HMI) that is adaptable to multiple scenarios in the power business. It reuses a single set of front-end and server-side code across the desktop environment of the power business production control zone and the web environment of the management information zone. It also provides an integrated application development framework for adapting HMI and data interaction to different security zones within the power business, allowing for code reuse. Figure 1As shown, the interface and data service components of the production control area application are separated into a front-end interface layer and a back-end data service layer. For parts with differences across different areas, an adapter pattern is used for encapsulation. After cross-area adaptation, the interface, interface, and service layers unify the technology stack, facilitating the migration of cross-area applications. This framework includes a browser runtime environment encapsulation module for integrating the desktop software's browser runtime environment in the power business production control area; a front-end data proxy module for dynamic data exchange between the front-end module running in the browser and the back-end data service gateway; a production control area front-end resource proxy module for intercepting requests for various static resource files in the browser runtime environment and updating them from the file service; a back-end data service gateway module for managing the registration and routing of back-end services, routing requests from the front-end data proxy module to the back-end data service, and returning responses to the front-end data proxy module; and a back-end data service module for performing dynamic data processing based on requests and returning results. In the management information area, an RPC service model consistent with that of the production control area is introduced within the web container. The framework of this invention enables the reuse of the same set of front-end and server-side code in the desktop environment of the power business production control area and the web environment of the management information area, facilitating the migration of power business functional modules in cross-regional applications.
[0025] The present invention discloses a method for constructing a human-machine interface adapted to multiple scenarios in the power industry, comprising the following steps: Step 1: Separate the interface and data service parts of the production control area application into a front-end interface layer and a back-end data service layer. Use browser front-end technology to build the front-end interface layer of the production control area. Embed the browser runtime in the desktop application to achieve integration between the desktop software of the production control area and the browser runtime environment, thereby unifying the interface runtime environment with the management information area.
[0026] By adopting a browser integration mode adapted to desktop application development frameworks, the browser runtime rendering interface is integrated with the desktop software, and browser front-end technology is used to develop the application interface, so that the front-end interface can be reused with the web interface of the management information area.
[0027] In traditional production control areas, especially in safety zone 1, some monitoring screens are stored and rendered using SVG vector graphics in a configured manner to meet requirements such as high efficiency of real-time monitoring. Other functional interfaces are generally developed using specific graphical interface libraries, such as QtWidget / QML libraries based on C++ or Swing / AWT libraries based on Java. Although some interface libraries can be converted into web front-end page content through translation, due to different design intentions, they cannot be completely converted. This results in interfaces with the same functions not being usable in the web browser environment of the management information area, requiring repeated development.
[0028] This invention separates the application's interface and service components, and directly embeds a browser runtime environment into the desktop of the production control area, integrating the embedded browser with other parts of the desktop application. With the development of computer hardware and browser technologies, the performance of the embedded browser meets the performance requirements of the security zone.
[0029] In this model, the interface of the Security Zone 1 application is developed using Web front-end technology, and the technology stack is consistent with that of the Management Information Zone, allowing the front-end code to be reused across zones.
[0030] The specific steps for embedding a desktop application into a browser are as follows: After the application process starts, the browser component engine is initialized. This engine starts the browser process group and performs inter-process communication (IPC) with the main browser process. Based on the application layout requirements, a browser rendering component is initialized under the interface container. This interface component communicates with the rendering process in the corresponding browser process group via IPC. After the browser rendering component is initialized, page resources are loaded as needed, and the page is rendered and displayed in the corresponding area by the browser rendering process. The browser page has a complete web front-end runtime environment, capable of loading and rendering the DOM, loading JavaScript scripts, etc. The browser component engine is responsible for interacting with other components in the local application process, injecting local objects into the JavaScript runtime environment to achieve bidirectional operations between the web page and local objects. When the application window is closed or the application exits, the local browser component object is destroyed by calling the destruction method of the browser rendering component or the destruction method of the browser component engine. During destruction, the browser process group is notified to destroy the corresponding browser rendering process.
[0031] By following the steps described above to embed a browser, a browser runtime environment can be integrated into a local desktop application to load and render web page resources.
[0032] Desktop application browser embedding methods are categorized into in-process embedding and cross-process embedding, depending on the development language and libraries used. In in-process embedding, the browser component, as a dynamic library, runs within the same process space as the application process. This mode facilitates data and event interaction with other in-process components, but the browser component's resource consumption can impact the stability of the application process. In cross-process embedding, after the application process starts, the browser component engine launches an external browser process group and interacts with the external browser's main process via IPC (Inter-Process Communication). A browser rendering component is initialized within the application's interface container. This component communicates with the rendering process in the corresponding external browser process group via IPC, and the page is rendered and displayed in the appropriate area by the external rendering process. The browser page possesses a complete web front-end runtime environment, capable of loading and rendering DOM resources and running JavaScript. The browser component engine is responsible for interacting with other components in the local application process, injecting local objects into the JavaScript runtime environment to enable bidirectional operations between the web page and local objects. The request proxying of browser resources described below is achieved through local objects injected into the browser runtime environment. See the diagram for a cross-process browser embedding. Figure 2 .
[0033] In the management information zone, the application software uses a general-purpose browser as the front-end interface display and interaction environment. This environment is consistent with the embedded browser runtime environment in the production control zone, allowing for the reuse of various development resources for the front-end interface. Through step 1 above, a browser runtime environment is introduced into the production control zone, unifying the browser environment of the front-end presentation layer with that of the management information zone. This enables the interface layer code to be reused in both the production control zone and the management information zone, thus unifying the technology stack of the front-end presentation layer.
[0034] Step 2: Compare and update the static web resources on the desktop through the file service of the production control area to achieve unification and reuse of the interface resources of the management information area.
[0035] Static resources in the desktop application interface, including images, style files, script files, etc., are intercepted through the static resource proxy module. The module compares the digests of local resources with those in the file server and updates any inconsistent resource files from the file server.
[0036] Due to management requirements, the production control area prohibits general web services. Therefore, web page resources cannot be obtained from general web servers via HTTP protocol. Instead, local static resources are loaded, which leads to the problem of consistency in updating local static resources.
[0037] This invention updates static resources from the file service in the production control zone. A static resource proxy module deployed in the production control zone interacts with the remote file service. Static resource requests from the interface presentation layer are intercepted by an interceptor and forwarded to the static resource proxy module injected into the browser environment. The static resource proxy module first checks if the resource exists in the local static resource cache. If the resource does not exist, it constructs the absolute path of the resource on the file server based on the application root address and the resource's relative path, retrieves the resource from the file service in the production control zone via the file service network protocol, writes it to the local static resource cache directory, and returns the local resource address to the front end. If the resource already exists, it verifies the digest information of the local resource with the digest information of the file service. If the digest information does not match, it means the resource file has been updated on the file service; therefore, the resource is retrieved from the file service and the local cache is updated. If the digest information matches, the local resource address is returned.
[0038] The static resource proxy module returns an address from a local resource cache to the front-end interface. The front-end interface can then retrieve the static resources from the local cache and perform subsequent parsing and rendering, avoiding the need to retrieve static resources using the HTTP protocol in the production control zone. See [link to production control zone static resource update steps] for details. Figure 3 .
[0039] In the management information zone, application software requests and updates static resources with the web service through a browser and the HTTP protocol. The web page resources are consistent with the resources provided by the file service in the production control zone, including the directory hierarchy, thus enabling the reuse of static resources for cross-zone applications.
[0040] Step 3: Adapt the interface layer for both desktop and web applications to achieve a unified interaction with the backend data service layer, ensuring consistent dynamic data interaction across application interfaces in different regions.
[0041] Dynamic resources in the application interface, including various dynamic data in request / response patterns and various push dynamic data in subscription / publish patterns, are relayed by the front-end data proxy module. To meet the overall security requirements of the power industry, the front-end data proxy module interacts with the back-end data service layer on both the desktop and web platforms using different protocols. On the desktop, it injects a service proxy object into the browser runtime and interacts with the back-end data service layer via RPC protocol; on the web platform, it interacts with the web server via HTTP protocol. The dynamic data proxy module provides a unified interface encapsulation for the application layer, maintaining consistency between cross-regional applications and the front-end data interface.
[0042] For dynamic data in the production control area, a JavaScript library is used to encapsulate the dynamic data interface. All dynamic data requests are proxied by this JavaScript library, and the requests are proxied through an RPC service proxy module injected into the browser environment.
[0043] In its implementation, the RPC service proxy module is implemented using cross-language methods such as C++ / Java, depending on the front-end application development framework. This RPC service proxy communicates with the back-end RPC service gateway via a remote service call protocol. The RPC service proxy forwards requests from the dynamic data interface library to the RPC service gateway. After processing the request, the service gateway returns response data. Upon receiving the response data, the RPC service proxy returns it to the dynamic data interface library, which then sends the returned data back to the front-end presentation layer for result data processing or rendering. For the dynamic data update steps in the production control area, please refer to [link to relevant documentation]. Figure 4 .
[0044] The dynamic data JavaScript interface library and RPC service proxy module support request / response and publish / subscribe patterns.
[0045] The request / response mode includes synchronous blocking mode and asynchronous non-blocking mode. In synchronous blocking mode, the request is blocked until the response is returned; in asynchronous non-blocking mode, the call flow can continue after the request is sent. A callback function is provided for asynchronous mode. After the response is returned, the execution framework will call the corresponding callback function to perform asynchronous processing or rendering.
[0046] In publish / subscribe mode, similar to asynchronous mode, a callback function is provided when requesting subscribed data. When the subscribed data receives push data, the execution framework will call the corresponding callback function.
[0047] In order to reuse the data interface layer module in the management information area, the dynamic data in the management information area still uses the dynamic data JavaScript interface library. When the JavaScript library processes backend requests, it is replaced with the AJAX interface layer. The AJAX interface layer implements the same functions as the RPC service proxy module, except that it uses the HTTP protocol to communicate with the interface layer in the backend web container.
[0048] In the backend web container of the management information zone, AJAX requests from dynamic data from the frontend are handled by encapsulating a unified interface. This unified interface interfaces with an RPC service proxy within the web container, forwarding requests to the RPC service proxy. Subsequent data processing flows are consistent with the methods in the production control zone. For the dynamic data update steps in the management information zone, please refer to [link to relevant documentation]. Figure 5 .
[0049] The request is further forwarded to the RPC service gateway. After processing the request, the service gateway returns response data. Upon receiving the response data, the RPC service proxy returns it to the front-end AJAX interface layer through the Web interface layer. Subsequent processing is consistent with conventional Web data processing and rendering. The request / response and publish / subscribe patterns are also supported in the management information area front-end.
[0050] Through the data interface layer adaptation described in step 3, JavaScript interfaces are encapsulated in the production control area and the management information area respectively, providing a consistent access interface for the front-end interface layer and the back-end service layer, realizing the consistency of dynamic data interfaces for cross-regional applications, and unifying the technology stack of the data interface layer.
[0051] Step 4: Establish communication between the front-end data proxy module and the data service gateway. Through the service bus mode of the data service gateway, realize the registration management, request and response routing and load balancing of various services, and realize the unified reuse of data services in the production control area and management information area.
[0052] The data service gateway module operates in a typical service bus mode. The service bus provides service registration, location, and query interfaces, as well as information interaction mechanisms such as service publishing, subscription, request, and response. The service bus shields the technical details of network communication and serialization and deserialization of interactive data, allowing service providers and consumers to focus only on the business of request and response data processing.
[0053] A service gateway is a special role in a service bus, responsible for managing and routing client requests to various backend services. It also provides additional functionalities to enhance system security, observability, and stability, including service request routing and load balancing. When multiple service providers offer the same service, load balancing can be performed based on the service nature. Furthermore, a service gateway can provide functions such as service request authorization verification, logging, and service monitoring.
[0054] In both the production control and management information zones, the data service gateway modules and code are completely reused to achieve consistent functionality. Typically, services in the production control zone are developed and deployed using a service bus approach, and these services can also be reused in the management information zone. The data service gateway's external interfaces use the RPC remote service protocol, meeting the network protocol security requirements of the production control zone.
[0055] After receiving an RPC service request from the RPC service proxy module, the service gateway parses the request parameters, searches for and locates the corresponding service provider in the registry, and, based on load balancing and other strategies, locates the specific information of the service provider. Then, it returns the URL address of the service to the RPC service proxy, establishes direct communication between the RPC service proxy and the specific service, and exchanges data through the RPC protocol.
[0056] Step 5: Use the data service module to process the service requests of the RPC service proxy using the RPC remote service call protocol and locate the RPC service provider, and perform data processing and response according to the request parameters.
[0057] Depending on the business scenario, the data service module consists of multiple modules and is registered with the RPC service gateway. The data service module has request / response and publish / subscribe working modes to meet different data processing scenarios.
[0058] In the production control area, existing modules can be directly reused for data services already provided using the service bus working mode; for application services not using service bus, a cross-language service bus framework can be used for service migration. In the management information area, the data service modules from the production control area are fully reused.
[0059] The data service module provides various specific application services. When an RPC service proxy initiates a service request, the RPC service gateway locates the provider of the specific data service. The data service provider then directly establishes a connection with the service requester. The data service module communicates with external systems using the RPC remote service call protocol. Depending on the programming language, different general-purpose or customized RPC protocols are used. The RPC development framework is responsible for network communication processing and the serialization and deserialization of network data. The data service module implements service registration, function entry points, and parameter descriptions according to the interfaces agreed upon by the RPC development framework. The data service supports scenarios with multiple concurrent requests, implemented using a multi-threaded approach. Each concurrent request is handled by a separate thread. Typically, multiple consecutive requests are stateless, meaning requests with the same parameters will return the same result, and there is no contextual relationship between different requests. When multiple requests occur concurrently, the RPC development framework creates a multi-threaded working mode to handle the requests. The internal functions of the data service module consider the scenario of multiple concurrent requests to avoid concurrency conflicts. See [link to RPC service proxy, RPC service gateway, and RPC service call relationship] for details. Figure 6 .
[0060] Steps 4 and 5 apply to the production control zone and management information zone, describing the processing of service requests at the backend service layer. Various services in the service layer are registered to the service gateway. Service requests are routed to the specific service access address through the service gateway. The frontend data proxy module interacts with the specific service via the RPC protocol. This process remains consistent across cross-region applications. The service gateway and various service modules are reusable across cross-region applications, unifying the technology stack of the backend service layer for cross-region applications.
[0061] The beneficial effects of this invention are that, compared with the prior art, this invention provides a method and system for constructing human-machine interfaces that are adapted to multiple scenarios in the power business. Addressing the differences in human-machine interface construction technologies across different security zones in the power business, it proposes a cross-zone reusable human-machine interface and data interaction adaptation method. By adapting the front-end display layer, data interface layer, and back-end service layer, it achieves a unified human-machine interface and data service technology stack for the power business production control zone and management information zone, enabling module reuse and facilitating the migration of power business functional modules in cross-zone applications. This provides a feasible solution for the rapid multi-scenario adaptation of power business applications.
[0062] This invention can be a system, method, and / or computer program product. This invention also discloses a human-machine interface construction system for power business scenarios based on the aforementioned multi-scenario adaptation method for power business, comprising: The browser runtime environment encapsulation module is used to separate the interface and data service parts of the production control area application, which is divided into a front-end interface layer and a back-end data service layer. The front-end interface layer of the production control area is built using browser front-end technology, and the browser is embedded in the desktop application to realize the integration of the browser runtime environment of the desktop software. The production control zone front-end resource proxy module is used to compare and update the static web resources on the desktop through the file service of the production control zone, so as to achieve unification and reuse with the interface resources of the management information zone. The front-end data proxy module is used to encapsulate the back-end data service layer through an interface adaptation layer for desktop and web clients, respectively, and to achieve isolation and consistent encapsulation of dynamic data interaction interfaces in the application interface. The backend data service gateway module is used to establish communication between the frontend data proxy module and the data service gateway. Through the service bus mode of the data service gateway, it realizes the registration management, request and response routing and load balancing of various services, and realizes the unified reuse of data services in the production control area and management information area. The backend data service module is used to process service requests from RPC service proxies and locate the RPC service provider using the RPC remote service call protocol, and to perform data processing and response based on the request parameters.
[0063] Based on the spirit of this invention, those skilled in the art will readily conceive that a computer program product can be obtained based on the aforementioned method for constructing a human-machine interface adapted for multiple scenarios in the power industry. The computer program product may include a computer-readable storage medium on which computer-readable program instructions are loaded to enable a processor to implement various aspects of this disclosure. That is, this application also includes a terminal, comprising a processor and a storage medium; the storage medium is used to store instructions; the processor is used to operate according to the instructions to execute the steps of the aforementioned method for constructing a human-machine interface adapted for multiple scenarios in the power industry.
[0064] Computer-readable storage media can be tangible devices capable of holding and storing instructions for use by an instruction execution device. Computer-readable storage media can be, for example, but not limited to, electrical storage devices, magnetic storage devices, optical storage devices, electromagnetic storage devices, semiconductor storage devices, or any suitable combination of the foregoing. More specific examples (a non-exhaustive list) of computer-readable storage media include: portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), static random access memory (SRAM), portable compact disc read-only memory (CD-ROM), digital multifunction disc (DVD), memory sticks, floppy disks, mechanical encoding devices, such as punch cards or recessed protrusions storing instructions thereon, and any suitable combination of the foregoing. The computer-readable storage media used herein are not to be construed as transient signals themselves, such as radio waves or other freely propagating electromagnetic waves, electromagnetic waves propagating through waveguides or other transmission media (e.g., light pulses through fiber optic cables), or electrical signals transmitted through wires.
[0065] The computer-readable program instructions described herein can be downloaded from computer-readable storage media to various computing / processing devices, or downloaded via a network, such as the Internet, local area network, wide area network, and / or wireless network, to an external computer or external storage device. The network may include copper transmission cables, fiber optic transmission, wireless transmission, routers, firewalls, switches, gateway computers, and / or edge servers. A network adapter card or network interface in each computing / processing device receives the computer-readable program instructions from the network and forwards them to the computer-readable storage media in the respective computing / processing device.
[0066] Computer program instructions used to perform the operations of this disclosure may be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-dependent instructions, microcode, firmware instructions, status setting data, or source code or object code written in any combination of one or more programming languages, including object-oriented programming languages such as Smalltalk, C++, etc., and conventional procedural programming languages such as the "C" language or similar programming languages. The computer-readable program instructions may execute entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or may be connected to an external computer (e.g., via the Internet using an Internet service provider). In some embodiments, electronic circuitry, such as programmable logic circuitry, field-programmable gate arrays (FPGAs), or programmable logic arrays (PLAs), is personalized by utilizing the status information of the computer-readable program instructions to implement various aspects of this disclosure.
[0067] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and not to limit it. Although the present invention has been described in detail with reference to the above embodiments, those skilled in the art should understand that modifications or equivalent substitutions can still be made to the specific implementation of the present invention. Any modifications or equivalent substitutions that do not depart from the spirit and scope of the present invention should be covered within the protection scope of the claims of the present invention.
Claims
1. A method for constructing a human-machine interface that adapts to multiple scenarios in the power industry, characterized in that, Includes the following steps: Step 1: Separate the interface and data service parts of the production control area application into a front-end interface layer and a back-end data service layer. Use browser front-end technology to build the front-end interface layer of the production control area. Embed the browser runtime in the desktop application to achieve integration between the desktop software of the production control area and the browser runtime environment, thereby unifying the interface runtime environment with the management information area. Step 2: Compare and update the static web resources on the desktop through the file service of the production control zone to achieve unification and reuse of interface resources with the management information zone. Specifically, this includes: interacting with the remote file service through the static resource proxy module deployed in the production control zone. Static resource requests in the interface display layer are intercepted by an interceptor and forwarded to the static resource proxy module injected into the browser environment. The static resource proxy module first checks whether the resource exists in the local static resource cache. If the resource does not exist, it constructs the absolute path of the resource on the file server based on the application root address and the relative path of the resource, obtains the resource from the file service of the production control zone through the file service network protocol, writes it to the local static resource cache directory, and returns the local resource address to the front end. If the resource already exists, it verifies the summary information of the local resource and the summary information of the file service. If the summary information is inconsistent, it obtains the resource from the file service and updates the local cache. If the summary information is consistent, it returns the local resource address. Step 3: For desktop and web clients, the backend data service layer is encapsulated through an interface adaptation layer to isolate and consistently encapsulate the dynamic data interaction interfaces of the application interface. Specifically, this includes: on the desktop client, injecting a service proxy object into the browser runtime and interacting with the backend data service layer via the RPC protocol; on the web client, interacting with the web server via the HTTP protocol. Step 4: Establish communication between the front-end data proxy module and the data service gateway. Through the service bus mode of the data service gateway, realize the registration management, request and response routing and load balancing of various services, and realize the unified reuse of data services in the production control area and management information area. Step 5: Use the data service module to process the service requests of the RPC service proxy using the RPC remote service call protocol and locate the RPC service provider, and perform data processing and response according to the request parameters.
2. The method for constructing a human-machine interface for multi-scenario adaptation in power business according to claim 1, characterized in that, The method of constructing the front-end interface layer of the production control area using browser front-end technology, embedding a browser in the desktop application, and integrating the browser runtime environment of the desktop software further includes: After the application process starts, it initializes the browser component engine, which starts the browser process group and performs IPC cross-process communication with the browser main process. According to the application layout requirements, a browser rendering component is initialized under the interface container. The browser rendering component communicates with the rendering process in the corresponding browser process group via IPC. After initialization, the browser rendering component loads page resources as needed and renders the page through the browser rendering process, then displays it in the corresponding area. The browser component engine interacts with other components of the local application process, injecting local objects into the JavaScript runtime environment to achieve bidirectional operation between the web page and local objects.
3. The method for constructing a human-machine interface for multi-scenario adaptation in power business according to claim 2, characterized in that, When the application window is closed or the user exits, the local browser component object is destroyed by calling the destruction method of the browser rendering component or the destruction method of the browser component engine. During destruction, the browser process group is notified to destroy the corresponding browser rendering process.
4. The method for constructing a human-machine interface for multi-scenario adaptation in power business according to claim 3, characterized in that, The process of implementing registration management, request-response routing, and load balancing for various services through the service bus mode of the data service gateway, and achieving unified reuse of data services in the production control area and management information area, further includes: For dynamic data in the production control area, a JavaScript library is encapsulated to handle dynamic data interfaces. All dynamic data requests are proxied by this JavaScript library and proxied through an RPC service proxy module injected into the browser environment. The RPC service proxy communicates with the backend RPC service gateway through the remote service call protocol. The RPC service proxy forwards the request from the dynamic data interface library to the RPC service gateway. After the service gateway processes the request, it returns the response data. After receiving the response data, the RPC service proxy returns it to the dynamic data interface library. The dynamic data interface library then returns the returned data to the front-end presentation layer for result data processing or rendering. The dynamic data of the management information area uses a dynamic data JavaScript interface library. When the JavaScript library processes backend requests, it only needs to be replaced with an AJAX interface layer. The AJAX interface layer implements the same functions as the RPC service proxy module, except that it uses the HTTP protocol to communicate with the interface layer in the backend web container. In the backend web container, AJAX requests from dynamic data from the frontend are handled by encapsulating a unified interface. This unified interface interfaces with the RPC service proxy inside the web container, forwarding the request to the RPC service proxy. The request is then forwarded to the RPC service gateway, which processes the request and returns response data. After receiving the response data, the RPC service proxy returns it to the frontend AJAX interface layer through the web interface layer.
5. The method for constructing a human-machine interface for multi-scenario adaptation in power business according to claim 3, characterized in that, In the production control zone and management information zone, the modules and code of the data service gateway are completely reused, and the static resources and dynamic data of the interface display layer remain consistent in cross-zone applications.
6. A human-machine interface construction system adapted for multiple scenarios in the power industry, characterized in that, include: The browser runtime environment encapsulation module is used to separate the interface and data service parts of the production control area application, which is divided into a front-end interface layer and a back-end data service layer. The front-end interface layer of the production control area is built using browser front-end technology. The browser runtime is embedded in the desktop application to realize the integration of the desktop software of the production control area with the browser runtime environment, thereby unifying the interface runtime environment with the management information area. The production control zone front-end resource proxy module is used to compare and update static web resources on the desktop through the file service of the production control zone, achieving unification and reuse of interface resources with the management information zone. Specifically, it includes: interacting with the remote file service through a static resource proxy module deployed in the production control zone; intercepting static resource requests in the interface presentation layer and forwarding them to the static resource proxy module injected into the browser environment; the static resource proxy module first checks if the resource exists in the local static resource cache; if the resource does not exist, it constructs the absolute path of the resource on the file server based on the application root address and the resource relative path, obtains the resource from the file service of the production control zone through the file service network protocol, writes it to the local static resource cache directory, and returns the local resource address to the front-end; if the resource already exists, it verifies the summary information of the local resource and the summary information of the file service; if the summary information does not match, it obtains the resource from the file service and updates the local cache; if the summary information matches, it returns the local resource address. The front-end data proxy module is used to encapsulate the interfaces of the back-end data service layer for desktop and web clients respectively through an interface adaptation layer, and to achieve isolation and consistent encapsulation of dynamic data interaction interfaces in the application interface; specifically, it includes: injecting a service proxy object into the browser runtime on the desktop client and interacting with the back-end data service layer through the RPC protocol; and interacting with the web server through the HTTP protocol on the web client. The backend data service gateway module is used to establish communication between the frontend data proxy module and the data service gateway. Through the service bus mode of the data service gateway, it realizes the registration management, request and response routing and load balancing of various services, and realizes the unified reuse of data services in the production control area and management information area. The backend data service module is used to process service requests from RPC service proxies and locate the RPC service provider using the RPC remote service call protocol, and to perform data processing and response based on the request parameters.
7. A terminal, comprising a processor and a storage medium; characterized in that: The storage medium is used to store instructions; The processor is configured to operate according to the instructions to execute the steps of the human-machine interface construction method for multi-scenario adaptation of power services according to any one of claims 1-5.
8. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the program is executed by the processor, it implements the steps of the human-machine interface construction method for multi-scenario adaptation of power business as described in any one of claims 1-5.
Citation Information
Patent Citations
Integration method for multi-information systems of production control region and asset management region of power grid
CN108052634A
Cross-regional data transmission method and system for physical isolation device
CN111614618A