Method and device for quickly developing interactive graphic application based on event table

By developing a rapid interactive graphical application development method and device based on an event-driven platform, and utilizing templates and the Qt framework to directly obtain coordinates from scene events, the problem of rapid visualization in seismic data processing is solved, enabling efficient interactive application development and visualization.

CN121957584APending Publication Date: 2026-05-01CHINA PETROLEUM & CHEMICAL CORP +1
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
CHINA PETROLEUM & CHEMICAL CORP
Filing Date
2024-10-30
Publication Date
2026-05-01

AI Technical Summary

Technical Problem

In the development of interactive graphical applications for earthquake data processing, how to quickly transform complex earthquake data into intuitive visual images, especially in scenarios where visualization of multi-source data is required, is a challenge. Existing technologies struggle to quickly integrate processing algorithms and display results while ensuring comprehensive functionality.

Method used

A rapid development method and apparatus for interactive graphical applications based on an event platform is proposed. By leveraging the data sharing and distribution features of the event platform, the visualization of seismic data on the interactive interface is customized using templates. Standardized event processing templates and tools are provided, and combined with Qt's Graphics View framework, scene coordinates can be directly obtained from scene events, simplifying the processing flow.

Benefits of technology

It improves the development efficiency and scalability of interactive applications, reduces development difficulty and cost, and enables users to quickly integrate processing algorithms and display the results on a visual graphical interface.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121957584A_ABST
    Figure CN121957584A_ABST
Patent Text Reader

Abstract

The invention provides a method and a device for quickly developing an interactive graphic application based on an event table, and belongs to the field of seismic data processing. The method comprises the following steps: S1, acquiring an event source, wherein the event source comprises that a user operates on a man-machine interaction front end; s2, event capture: taking a seismic data processing method as a processing command, and continuously monitoring and obtaining events in event sources of the man-machine interaction front end after the processing command is created; s3, event distribution: when the user needs to carry out data processing, the event is distributed to a processing command corresponding to the data processing through an event table; and S4, event processing: when the processing command is in an activated state and an event concerned by the processing command is captured, processing the event according to a predefined rule or logic. According to the method, rapid development and integrated processing of a user are facilitated, and the development efficiency and expandability of the interactive application program are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of earthquake data processing, specifically relating to a method and apparatus for rapid development of interactive graphical applications based on an event platform. Background Technology

[0002] The concept of a middle platform was first proposed in 2015, aiming to build a more flexible and innovative "large middle platform, small front-end" strategy for the data technology era. It emphasizes the abstraction, modularization, and reuse of organizational business and technical capabilities to support the agile and rapid development of front-end businesses. Specifically, an event middle platform is more of a platform or system built within the middle platform strategic framework to address the needs of event processing and management. By centrally managing and processing various events within the system, the event middle platform achieves business process automation, data integration and sharing, and flexible system expansion and maintenance.

[0003] In the development of interactive graphical applications, the event platform plays a crucial role. As a platform system, it focuses on event processing, data integration, and business process simplification, thereby improving the interactivity, flexibility, and scalability of the application.

[0004] The event platform has the following functions:

[0005] 1. Event Definition and Capture

[0006] An event platform can define and capture various events that occur in an application, such as mouse clicks, form submissions, and page loads. These events are the medium through which users interact with the application and are also key to triggering subsequent business processes.

[0007] 2. Incident handling and distribution

[0008] When an event occurs, the event platform processes it according to predefined rules or logic. This includes verifying the event's validity, executing corresponding business logic, and distributing the processing results to relevant systems or components. Through an event-driven approach, applications can achieve more flexible and efficient business processes.

[0009] 3. Data standardization

[0010] An event processing platform can establish unified data standards and interfaces, ensuring smooth data exchange and integration between different systems or modules. This helps reduce data redundancy and inconsistencies, and improves data accuracy and reliability.

[0011] 4. Data sharing and synchronization

[0012] The event platform, acting as a central hub for data sharing, can capture and synchronize data changes within applications in real time. This enables multiple systems or modules to obtain the latest data in real time, thereby facilitating data sharing and collaborative work.

[0013] However, in the development of interactive graphical applications for earthquake data processing, scenarios requiring visualization of multi-source data types are frequently encountered. Earthquake data is typically presented in numerical and graphical forms. Transforming complex earthquake data into intuitive visual images for better user understanding and analysis is a significant challenge in user interface design. Due to the specialized and complex nature of earthquake data processing, applications often involve numerous data processing algorithms. Ensuring comprehensive functionality while quickly integrating these algorithms into the application and presenting the results in visual graphics for user reference remains a major challenge. Summary of the Invention

[0014] The purpose of this invention is to solve the problems existing in the prior art. In view of the shortcomings of the prior art, this invention proposes a rapid development method and device for interactive graphical applications based on an event platform. By utilizing the characteristics of data sharing and centralized event distribution of the event platform, the invention customizes the visualization of earthquake data on the interactive interface in the form of templates, and provides standardized event processing templates and tools for the relationship between the event platform and processing commands.

[0015] This invention is achieved through the following technical solution:

[0016] In a first aspect, the present invention provides a rapid development method for interactive graphical applications based on an event-driven platform. The method is based on an event-driven platform-based framework for rapid development of interactive graphical applications, and includes the following specific steps:

[0017] S1. Event source acquisition, wherein the event source includes user operations on the human-computer interaction front end;

[0018] S2, Event Capture: A seismic data processing method is used as a processing command. After the processing command is created, it continuously monitors and obtains events from the event sources on the human-computer interaction front end.

[0019] S3, Event Dispatch: When a user needs to process data, the event is dispatched to the corresponding data processing command through the event platform.

[0020] S4. Event handling: When the processing command is active and an event of interest to the processing command is captured, the event is processed according to predefined rules or logic.

[0021] Furthermore, the method associates scenes with data and directly obtains scene coordinates from scene events.

[0022] Furthermore, step S1 also includes establishing the relationships between user-created views, scenes, primitives, and data models based on Qt's Graphics View framework, and predefining these relationships as templates.

[0023] Furthermore, the continuous monitoring mentioned in step S2 refers to setting the processing command as an event filter to monitor and obtain various events on the scene.

[0024] Furthermore, step S3 consists of the following steps:

[0025] S31 Event Generation: When an interactive operation occurs on the interactive front end, the Qt event loop mechanism will generate a corresponding event;

[0026] S32 Event Filtering: The events are filtered through the eventFilter(QObject*obj,QEvent*event) function of the processing command; if the event is a monitored event, it will not be further dispatched.

[0027] S33 Event Sending: If the event is not a monitored event, it will be passed on to the monitored scene object.

[0028] Furthermore, the operation of step S4 includes: if the processing command is activated and these events are events of interest occurring on the scene, then the algorithm processing function process(QGraphicsSceneEvent*) of the processing command is automatically invoked to perform calculation processing on the data.

[0029] A second aspect of the present invention also provides a rapid development device for interactive graphical applications based on an event middleware, wherein the device customizes the relationship between processing commands, data models, and scenes in the form of templates, and includes:

[0030] Front-end view module: Displays data in visual graphics and provides users with an entry point for human-computer interaction;

[0031] Event platform module: responsible for managing the data and distributing events to the processing commands corresponding to the data, including two sub-modules: scene management module and data model module;

[0032] Processing command module: Allows users to integrate algorithms, process the data, and view the processing results.

[0033] Furthermore, the scene management module manages all events obtained from the front-end view module, and by installing event filters for the scene in the processing command, configuring event filter subclasses to filter out the events of interest to the processing command and send them to the processing command module; the data model module manages the data of the data model used by the processing command and the generated data.

[0034] Furthermore, the template is based on fixed features of the source files, header files, and project files of various subclasses of the Qt Graphics View framework.

[0035] Furthermore, the integration algorithm is implemented by overloading the process() function of the processing command.

[0036] Compared with the prior art, the beneficial effects of the present invention are:

[0037] This invention provides a standardized event handling template and tool, allowing users (i.e., secondary developers) to focus only on the implementation of the handling method, facilitating rapid development and integration of the handling process, improving the development efficiency and scalability of interactive applications, and reducing development difficulty and cost. Attached Figure Description

[0038] Figure 1 A flowchart illustrating the rapid development methodology for event-driven platform applications;

[0039] Figure 2 Interactive graphical application rapid development framework;

[0040] Figure 3 A framework for rapid development of interactive graphical applications based on an event-driven platform. Detailed Implementation

[0041] This invention provides a method and apparatus for rapid development of interactive graphical applications based on an event middleware platform. Its rapid development framework for interactive graphical applications based on the event middleware platform concept enables users to quickly integrate seismic data processing methods and rapidly display the processing results on a visual graphical interface.

[0042] This invention is based on the Qt framework's event handling mechanism, specifically how to filter and process events within a custom command class (CuiCmd). The processing procedure is as follows: In the event filtering function CuiCmd::eventFilter(QObject*,QEvent*) of the command base class, it is determined whether the command is active. If the monitored object is the scene base class CuiScene, the event QEvent is converted into a scene event QGraphicsSceneEvent. If the conversion is successful, the algorithm processing function CuiCmd::process(QGraphicsSceneEvent*) is called. The advantage of directly using scene events is that the scene is directly related to actual seismic data, and scene coordinates are directly obtained from the scene events, avoiding the coordinate conversion from device coordinates to scene coordinates in the view. Based on the above understanding, the event handling mechanism of this invention based on the Qt framework can be decomposed into the following operational scenarios:

[0043] (1) Event filtering function: CuiCmd::eventFilter(QObject*,QEvent*) is an event filtering function overridden in the command base class CuiCmd. This function is used to determine whether to intercept and process events sent to its monitored objects.

[0044] (2) Activation status check: In the event filtering function, it first checks whether the processing command is in an active state and whether the monitored object is an instance of the scene base class CuiScene.

[0045] (3) Event Conversion: If the above conditions are met, the function will attempt to convert the generic event QEvent into a scene event QGraphicsSceneEvent. This conversion is crucial because it allows developers to handle specific events related to the graphics scene.

[0046] (4) Event handling: If the event transformation is successful, that is, the event is indeed related to the scene, then the process(QGraphicsSceneEvent*) function of the command class will be called to handle the scene event.

[0047] The most important operation of the event handling mechanism in this invention is as follows:

[0048] Scene and Data Association: The advantage of directly using scene events is that scene coordinates are directly related to actual seismic data. This means that scene coordinates can be obtained directly from scene events without needing to convert from the view's device coordinates to scene coordinates. Typically, in Qt's Graphics View framework, the view's device coordinates need to be converted to scene coordinates before processing. However, in this invention, because scene events are used directly, this conversion step is omitted, thus simplifying the processing flow and improving efficiency.

[0049] The first embodiment of the present invention, as follows: Figure 1 As shown, a rapid development method for interactive graphical applications is provided.

[0050] It is implemented based on the following process:

[0051] S1. Event source acquisition steps: Use the earthquake data processing software interface as the human-computer interaction front end between the user and the earthquake data processing application, and acquire the event source, which includes all operations performed by the user on the human-computer interaction front end, such as mouse and keyboard operations.

[0052] Specifically, the earthquake data processing application creates objects such as views, scenes, primitives, and data models, and establishes relationships between these objects based on Qt's Graphics View framework. For example, primitives are added to the scene, the scene is set to the view, and the data drawing interface is called in the view to draw and display earthquake data or other related data.

[0053] S2. Event Capture Steps: Each seismic data processing method is treated as a processing command, such as filtering or spectrum calculation. After each processing command is created, it continuously monitors various event sources occurring at the human-computer interaction front-end. By setting the processing command object as an event filter, various events can be monitored and obtained on the scene.

[0054] Specifically, it invokes various processing command objects created by the seismic data processing application. All processing commands are derived from the base class CuiCmd. The data model and scene are set for the processing command, and the processing command is installed as an event filter on the scene. All processing commands need to implement the process(QGraphicsSceneEvent*) function, in which the algorithm of the processing command is implemented.

[0055] S3. Event Dispatch Steps: When a user needs to process data, an event is dispatched to the corresponding processing command through the event platform, effectively activating the processing command. Specifically, the program automatically sets a mouse or keyboard event for the command object. When the user clicks the trigger button, a boolean value is used to change the command's activation status.

[0056] Specifically, this invention, based on Qt's event loop mechanism, divides event dispatch into the following steps:

[0057] S31 Event Generation: When a user performs an action, such as clicking the mouse or pressing a key, the Qt event loop mechanism generates the corresponding event.

[0058] S32 Event Filtering: Events are filtered using the QObject::eventFilter() function. If an event is processed, it will not be dispatched further.

[0059] S33 Event Sending: If the event is not filtered, it will be passed to the monitored target object.

[0060] Furthermore, the processing command can be set to an active state in the following ways.

[0061] Preferably, the Command Pattern allows all operation-related information to be encapsulated within a single command object. This includes executing the operation, undoing the operation, and checking if the command is executable. When a command is activated, user input (such as mouse or keyboard events) can be simulated using the `postEvent()` function of `QApplication` to trigger command execution. Within the command's event handler, the command state can be changed based on the event type and the current command state.

[0062] S4. Event handling steps: When various processing commands in the processing command module are active and capture an event of interest to this processing command, the event is processed according to predefined rules or logic.

[0063] Specifically, any mouse or keyboard operation performed by the user on the view will trigger the event filter function eventFilter(QObject*, QEvent*) for all processing commands. If the user clicks a button to activate a processing command, and these events occur on the scene, the algorithm processing function process(QGraphicsSceneEvent*) for that processing command will be automatically called.

[0064] Furthermore, in the algorithm processing function `process(QGraphicsSceneEvent*)`, the data can be calculated and processed using information such as the data model and the scene coordinate range in the scene event, and the calculation results are directly written into the data model. After the data model is updated, the view refresh interface is called to draw and display the updated seismic data or other relevant data.

[0065] The second embodiment of the present invention proposes an interactive graphical application rapid development device based on the above-mentioned event-driven platform application rapid development process.

[0066] like Figure 2 As shown, based on the Qt (The Qt Company) Graphics View framework, this device customizes the relationship between processing commands, data models, and scenarios in the form of templates, which is the event platform and processing command framework in this invention.

[0067] The QGraphicsView, QGraphicsScene, and QGraphicsObject form the foundation of Qt's GraphicsView framework. This invention extends the functionality of this derived framework. Specifically, this invention derives the CuiView base class from QGraphicsView to serve as the base class for views within the framework, thus enabling functionality expansion; it derives the CuiItem base class from QGraphicsObject to serve as the base class for primitives within the framework, also enabling functionality expansion; it sets CuiCmd as the event filter for the CuiScene base class; and each command only focuses on and processes the events it is interested in.

[0068] Furthermore, the template of this invention refers to certain fixed characteristics of the source files, header files, and project files of each subclass. Specifically, this includes specifying the base class when describing subclasses such as CuiScene, CuiView, and CuiItem; installing the event filter CuiCmd for CuiScene; and defining the virtual function process() in CuiCmd. The various source files and header files generated according to the above template constitute the source code of this device.

[0069] like Figure 3 As shown, the rapid development device for interactive graphical applications provided by the present invention includes:

[0070] 1. Front-end View Module: The front-end view module of this invention encapsulates the existing seismic data processing software interface. The graphical display presents the data in visual form and provides an entry point for human-computer interaction. The human-computer interaction module is responsible for displaying various business graphics and facilitating user interaction with these graphics. Specifically, it utilizes Qt's event loop mechanism, specifically event filters, to allow users to intercept and process events from other objects on a single object. This invention primarily focuses on mouse and keyboard interaction events.

[0071] Taking spectrum analysis as an example, the user retrieves the seismic profile display from the front-end view; by clicking the spectrum analysis button on the graphical interface, the device's program activates the spectrum analysis processing command.

[0072] 2. Event Management Platform Module: This module comprises two sub-modules: Scene Management and Data Model. It is responsible for managing all data and distributing events to various processing commands. Specifically, in the Scene Management module, users obtain all mouse, keyboard, and other interaction events occurring on the view. Event filters are then installed for the scene within the processing commands. By configuring subclasses such as event filters, the relevant interaction events for each processing command are extracted and sent to the processing command module for processing.

[0073] The scene management module is used to accommodate and manage multiple graphic items. The data model module mainly manages all the data used in the seismic data processing application, including reading, acquiring, writing and refreshing various types of data. The drawing and display of all the graphic elements in the scene is a part of the data in the data model. For example, the seismic profile displays seismic data, and the spectrum plot displays spectrum data. The reading and writing of this data are uniformly managed by the data model object.

[0074] Taking mouse events as an example, when a user selects a rectangular area in the seismic profile scene of the scene management module, the active spectrum analysis processing command captures this mouse event. By setting event filters in the processing commands within the data model module, the interactive events relevant to each processing command are filtered out and transmitted to the processing command module for further processing.

[0075] 3. Command Processing Module: This module handles user-inputted processing commands, i.e., data processing algorithms, such as spectrum analysis algorithms, via the graphical interface. It allows users to easily and quickly integrate algorithms and view the processing results. Users can integrate algorithms by overriding the `process()` function of the processing command; this is a key feature of this framework. The command processing module is responsible for responding to and processing various interactive events on the view.

[0076] Specifically, the data selected by the user through interactive operations is sent to the processing command module for data processing, i.e., activating the processing command response event. In detail, the user selects the processing to be performed through the interactive interface, and the processing command module activates the corresponding processing command, applying the processing algorithm to the data. Changes to the data, such as bandpass filtering of seismic data or obtaining spectral data through spectral analysis, all trigger data updates.

[0077] The most important component of the rapid development device for interactive graphical applications is the CuiDocument located in the event platform. The CuiDocument component contains the rule logic content of the drawing scene, primitives, and all data models of the application. In the seismic data processing application, the processing software shares the same CuiDocument, ensuring smooth data exchange and integration between different views or modules, thereby achieving data sharing and collaborative work. Specifically, as a data model object, CuiDocument sets its pointer to CuiScene and all CuiCmd objects, allowing the entire seismic data processing application to share the data model.

[0078] Taking seismic profile display, a common feature in seismic data processing, as an example, algorithm developers, as users, can quickly integrate seismic data processing algorithms (i.e., spectrum analysis algorithms) into this device and view the processing results of the seismic data, as detailed below:

[0079] When a user clicks the spectrum analysis button on the graphical interface of the rapid development device for interactive graphical applications, the device's program activates the spectrum analysis processing command. The user then selects a rectangular area on the seismic profile with the mouse. The activated spectrum analysis processing command captures this mouse event and immediately performs spectrum analysis on the seismic data within the rectangular area. Finally, the processed spectrum data is plotted and displayed on the graphical interface.

[0080] Users input processing commands, i.e., spectrum analysis algorithms, through a graphical user interface. Upon receiving a response to the processed command, a processing command response event is activated. Once activated, the processing command calls predefined data processing functions to process the data selected by the user's interaction. The processed seismic data, i.e., spectrum data, is finally output to the graphical user interface for display. Throughout this process, users only need to provide the main application framework and select an appropriate scenario in the event dashboard. The active spectrum analysis processing command then captures mouse or keyboard events.

[0081] The entire rapid interactive application development framework of this invention consists of key base classes such as CuiMainApp, CuiMainFrame, CuiDocument, CuiView, and CuiCmd. Users derive their own subclasses from these base classes. The class names of these subclasses are entered by the user and selected from the class names of their respective base classes. The device can then automatically generate template files for each class. Users only need to implement the important functions in each template file, such as the required interactive processing functions and key functions like process() in various processing commands. The processed results will refresh the data in the CuiDocument object in the event console, thereby enabling sharing among all views and modules.

[0082] In this way, by displaying data in various intuitive graphical formats through windows, users only need to focus on the implementation of processing methods, making it easier for users to quickly develop and integrate processing methods.

[0083] The above technical solution is only one embodiment of the present invention. For those skilled in the art, based on the principles disclosed in the present invention, it is easy to make various types of improvements or modifications, and not limited to the technical solutions described in the specific embodiments of the present invention. Therefore, the foregoing description is only a preferred option and is not restrictive.

Claims

1. A rapid development method for interactive graphical applications based on an event-driven platform, characterized in that, The method includes: S1. Event source acquisition, wherein the event source includes user operations on the human-computer interaction front end; S2, Event Capture: A seismic data processing method is used as a processing command. After the processing command is created, it continuously monitors and obtains events from the event sources on the human-computer interaction front end. S3, Event Dispatch: When a user needs to process data, the event is dispatched to the corresponding data processing command through the event platform. S4. Event handling: When the processing command is active and an event of interest to the processing command is captured, the event is processed according to predefined rules or logic.

2. The rapid development method for interactive graphical applications based on an event-driven platform according to claim 1, characterized in that, The method associates scenes with data and directly obtains scene coordinates from scene events.

3. The rapid development method for interactive graphical applications based on an event-driven platform according to claim 1 or 2, characterized in that, The S1 step also includes establishing the relationship between user-created views, scenes, primitives, and data models based on Qt's GraphicsView framework, and predefining the relationship between these objects as a template.

4. The rapid development method for interactive graphical applications based on an event-driven platform according to claim 1 or 2, characterized in that, The continuous monitoring mentioned in step S2 refers to setting the processing command as an event filter to monitor and obtain various events on the scene.

5. The rapid development method for interactive graphical applications based on an event-driven platform according to claim 1 or 2, characterized in that, The S3 step includes the following steps: S31 Event Generation: When an interactive operation occurs on the interactive front end, the Qt event loop mechanism will generate a corresponding event; S32 Event Filtering: The events are filtered through the eventFilter(QObject*obj,QEvent*event) function of the processing command; if the event is a monitored event, it will not be further dispatched. S33 Event Sending: If the event is not a monitored event, it will be passed on to the monitored scene object.

6. The rapid development method for interactive graphical applications based on an event-driven platform according to claim 1 or 2, characterized in that, The operation of step S4 includes: if the processing command is activated and these events are events of interest occurring in the scene, the algorithm processing function process(QGraphicsSceneEvent*) of the processing command is automatically invoked to perform calculation processing on the data.

7. A rapid development device for interactive graphical applications based on an event-driven platform, characterized in that, The device customizes the relationship between processing commands, data models, and scenarios in the form of templates, including: Front-end view module: Displays data in visual graphics and provides users with an entry point for human-computer interaction; Event platform module: responsible for managing the data and distributing events to the processing commands corresponding to the data, including two sub-modules: scene management module and data model module; Processing command module: Allows users to integrate algorithms, process the data, and view the processing results.

8. The rapid development device for interactive graphical applications based on an event-driven platform according to claim 7, characterized in that, The scene management module manages all events obtained from the front-end view module, and installs event filters for the scene in the processing command, configures event filter subclasses to filter out the events of interest of the processing command, and sends them to the processing command module. The data model module manages the data and generated data of the data model used in the processing commands.

9. The rapid development device for interactive graphical applications based on an event platform according to claim 7, characterized in that, The template is based on fixed features of the source files, header files, and project files of various subclasses of the Qt Graphics View framework.

10. The rapid development device for interactive graphical applications based on an event-driven platform according to claim 7, characterized in that, The ensemble algorithm is implemented by overloading the process() function of the processing command.