Test situation display configuration method based on embedded B / S architecture and storage medium

Through the experimental situation display configuration method of embedded B/S architecture, the interaction between the browser client and the server-side database is solved, and the problem of difficult development and insufficient flexibility in the existing technology is achieved, and flexible and convenient experimental situation display configuration is achieved. and multi-user management.

CN119179730APending Publication Date: 2024-12-24KUNMING SHIP EQUIPMENT RESEARCH & TESTING CENTER (CHINA SHIPBUILDING CORP 750 TEST SITE)
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411248507.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-06
Publication Date
2024-12-24

AI Technical Summary

Technical Problem

The existing experimental situation shows that the development of configuration modules is difficult and has a long cycle, and does not support multiple clients to configure and view information independently at the same time, which lacks flexibility and convenience.

Method used

Adopt the experimental situation display configuration method based on embedded B/S architecture, and realize network deployment without a dedicated client through Qt/C++ and JavaScript, use browser client configuration information and interact with server-side databases, and support multi-user intervention and real-time data. Interaction.

Benefits of technology

It realizes low-cost and flexible experimental situation display configuration, simplifies development and maintenance, supports multi-user configuration and permission management, reduces front-end operation complexity, and is suitable for highly responsive task scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119179730A_ABST
    Figure CN119179730A_ABST
Patent Text Reader

Abstract

The invention discloses a test situation display configuration method based on an embedded B / S architecture and a storage medium, aiming at a display configuration module of test situation software based on Qt / C + +, the B / S architecture comprising an application layer, a service layer and a data layer which are separated from one another is adopted, and the method comprises the following steps: setting a situation display configuration module trigger event; the situation display information is configured through the browser client; storing the configuration information into a database; and the electronic chart display module reads configuration information from the database and takes the configuration information as an input parameter of a drawing function so as to realize drawing and calculation functions of graphic images such as environment construction, equipment tracking, navigation trajectory and behavior representation. The multi-layer separation structure is flexible in deployment, a user can complete configuration input of situation display information, addition, deletion, modification and checking of a database form and other operations by using a common browser, multi-user-interface independent operation is supported, multi-user-interface authority management is achieved, and use is convenient.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to the field of situation display, and in particular to a test situation display configuration method and a storage medium based on an embedded B / S architecture. Background Art

[0002] With the vigorous development of digital technology for manned and unmanned equipment testing, various elements such as test environment, force structure, coordinated actions, offensive and defensive behaviors can be transformed into quantifiable forms. Usually, for underwater equipment testing, in order to facilitate test personnel to grasp the progress of the test task and its internal laws, not only the test time, task flow and other information should be digitized, but also the static environment structure, red test objects, blue target simulation, target characteristic configuration, as well as coordinated situation, offensive and defensive situation and other information should be digitized, so as to objectively describe the environment of the entire test and the execution of the test task. Finally, based on the diversity and multidimensionality of multi-source information, data mining technology and evaluation technology are used to conduct qualitative and quantitative comprehensive analysis of the test situation information from different angles.

[0003] As an important component of the test situational software with the above functions, the electronic chart display module integrates factors such as equipment, routes, targets and environment into one system, and is mainly responsible for the drawing and calculation of graphics and images such as environment construction, equipment tracking, navigation trajectory, behavior, and target characteristic representation. This module usually encapsulates the drawing algorithms of various graphics and images, but the configuration information such as the layout plan of the test area, the shape of the area, color, object symbol, component, trajectory style and other display information needs to be obtained through external input. The traditional configuration module is usually developed as an internal module of the situational software in an integrated manner. The development is difficult and the cycle is long. In addition, the software load is increased during the use of the situational software, and the requirements and difficulty of software maintenance are increased. If the configuration module is separated from the main body and used alone, all environmental parameters of the development software also need to be configured, which is not flexible and convenient, and does not support multiple clients to perform independent configuration and information viewing at the same time.

[0004] Therefore, there is an urgent need for a test situation display configuration method that is low-cost, flexible, stable, and can be intervened at any time. Summary of the invention

[0005] The purpose of the present invention is to provide a test situation display configuration method based on an embedded B / S architecture in order to solve the technical problems of the existing test situation display configuration mentioned above. The present invention is aimed at a test situation software display configuration module based on JavaScript, adopts a B / S architecture, does not require a dedicated client, and is deployed in a network manner, and performs convenient test situation display configuration and real-time database interaction capabilities in a low-cost, flexible, stable, and multi-user intervention-supporting manner.

[0006] To achieve the above object, the present invention adopts the following technical solutions:

[0007] A test situation display configuration method based on an embedded B / S architecture comprises the following steps:

[0008] S1, configure the situation display configuration module of embedded B / S architecture in the test situation software based on Qt / C++;

[0009] S2, setting the trigger event of the situation display configuration module;

[0010] S3, after completing step S2, open the situation display configuration module, configure the situation display information through the browser client, the configuration information includes the test static environment configuration information, the force configuration information and other configuration information, and the configuration information is received by the server;

[0011] S4, the server interacts with the Oracle database and stores the configuration information of step S3 in the database;

[0012] S5, if the information in step S4 needs to be modified or reset, the browser interacts with the database through the Web Server, reads the database storage configuration information, and executes step S4 again after the modification is completed;

[0013] S6, the electronic chart display module reads the configuration information from the database as the input parameter of the drawing function, and realizes the drawing and calculation functions of graphic images such as environment construction, equipment tracking, navigation trajectory, and behavior representation.

[0014] Further:

[0015] The test situation software in step S1 uses a configuration method based on QtWebkit to implement the configuration of the embedded B / S architecture situation display module;

[0016] Setting the situation display configuration module trigger event in step S2 includes: adding a button to open the situation configuration system in the test situation software, adding a trigger event to the button, and defining the trigger event as jumping to the situation display configuration browser page when the user clicks the button.

[0017] In step S3, the situation display configuration information mainly includes the test static environment configuration information and the force configuration information. Specifically, the test static environment configuration information includes the test designated area, special function area, static target, static target characteristics, drawing scheme, etc.; the force configuration information includes the test equipment, communication load, equipment characteristics, drawing scheme, etc.

[0018] In step S5, the browser client is a common browser such as Chrome and Firefox. The browser function is embedded in the Qt application, and there is no need to develop a client interface separately. The request is sent to the Web server through the Web browser, and the Web server processes it and passes the processed results back to the browser step by step;

[0019] In step S3, the configuration information is regularized and checked;

[0020] In step S6, the corresponding drawing function parameters are read through the configuration fields.

[0021] A computer-readable storage medium stores a computer program, which can be executed by a processor to implement the steps of a test situation display configuration method based on an embedded B / S architecture described in the present invention.

[0022] Compared with the traditional test situation display configuration method, the test situation display configuration method based on the embedded B / S architecture of the present invention has the following beneficial effects:

[0023] (1) Traditional situation configuration modules are usually developed together with situation software, which is difficult to develop and takes a long time. The configuration method based on B / S architecture proposed in the present invention is easy to develop, has strong portability, and does not require the configuration of a dedicated environment. The client only needs to install a general browser, and the general browser realizes many powerful functions that originally required complex special software to achieve. The module expansion is extremely convenient, and new functions can be added by adding new web pages. In addition, the upgrade and maintenance are relatively simple.

[0024] (2) The throughput of the test situation software is usually large during operation, and the server operation data load is heavy. The embedded B / S architecture system of the present invention is only installed on the server side. The back-end operator only needs to manage the server and complete hardware maintenance. The main transaction logic of the front-end user operation interface is completely implemented on the server side through the browser, and a very small part of the transaction logic is implemented on the front end. All clients have only browsers, which can support multi-user configuration reading and permission allocation. It has strong flexibility and users can intervene at any time without affecting the execution of the main process.

[0025] (3) The embedded B / S architecture developed based on the present invention can be widely used in task scenarios where the system has high requirements for real-time responsiveness and human intervention is not desired to affect the operating efficiency, such as military software, industrial control, and measurement and control fields in the electronics industry. BRIEF DESCRIPTION OF THE DRAWINGS

[0026] Figure 1 Flowchart of the test situation display configuration method based on B / S architecture

[0027] Figure 2The framework diagram of the test situation display configuration method based on B / S architecture.

[0028] Figure 3 This is a diagram showing the relationship between the browser and the server in this architecture. DETAILED DESCRIPTION

[0029] An implementation case is provided here, and the present invention is further described in detail below in conjunction with the accompanying drawings and specific implementation methods.

[0030] like Figure 1 and Figure 2 As shown, the test situation configuration method based on the B / S architecture of the present invention includes a mutually separated application layer, service layer and data layer. The advantage of using the multi-layer separation structure of the B / S architecture is that the deployment is flexible. Users can complete the configuration entry of situation display information, database form addition, deletion, modification and query and other operations using an ordinary browser, and support multi-user interface independent operation, realize multi-user authority management, and are easy to use. Specifically, it includes the following steps:

[0031] S1. In the QT / C++ based situational software application, add QtWebkit dependency. Add the following code in the QT project file (.pro):

[0032] QT+=core gui

[0033] QT+=webkit

[0034] QT + = webkitwidgets

[0035] Next, add the following code to the main function:

[0036] #include <qapplication>

[0037] #include <qwebview>

[0038] #include <qurl>

[0039] int main(int argc,char*argv[]){

[0040] QApplication app(argc,argv);

[0041] QWebView view;

[0042] view.load(QUrl("http: / / www.example.com")); / / Load the URL of the status display configuration page

[0043] view.show();

[0044] return app.exec(); / / Enter the Qt event loop

[0045] }

[0046] The above code creates a QApplication object, and then creates a QWebView object to display the web page. The load function is used to load the specified URL. In the example, "http: / / www.example.com" is the URL of the browser-side page for displaying the situation information. Finally, the show function is called to display the window and enter Qt's event loop app.exec() to wait for user interaction. In particular, in the Qt5 version, the QtWebkit module has been deprecated. If you are using Qt5 or higher, it is recommended to use the Chromium-based QtWebEngine module instead of QtWebkit.

[0047] S2. In the application and service layer, for the test environment configuration and force configuration elements, the content and format of the fields to be configured are specified, such as configuration personnel selection, configuration date record, detailed attributes and drawing plan of static structures, detailed attributes and drawing plan of participating equipment, etc. Database forms are established, and the form design of each independent configuration interface is completed.

[0048] S2.1, establish a static environment model library, including the type, shape, drawing attributes (color, linearity, line width, radius, number of points, fill transparency, etc.) of abstract elements (artificially demarcated test areas), the type, camp, physical attributes (length, width, height, diameter / rotor diameter, weight, etc.) of concrete elements (static test entities), target characteristics (target, usage characteristics, etc.), drawing attributes (representative icons), etc.

[0049] S2.2, establish a dynamic test equipment model library, including equipment type, default load, functional role, command relationship, physical properties (length, width, height, diameter / rotor diameter, weight, etc.), target characteristics (target, load, use, navigation characteristics, etc.), drawing properties (representative icon, track line type / line width, track color, etc.), etc.

[0050] S2.3, design configuration forms, including but not limited to test task configuration form, basic static element model configuration form, static element model characteristic configuration form, scenario construction configuration form, basic dynamic test equipment model configuration form, dynamic test equipment characteristic configuration form, equipment formation configuration form, etc. to realize the configuration, editing, calling and combination of basic models, and further complete the test task from fine to coarse and bottom-up configuration.

[0051] Specifically, in the application and service layer, the relationship between the browser and the server is as follows: Figure 3 When the client connects to access the server, the server responds to the client's needs or operations.

[0052] In the described example, the front end is based on JavaScript language and uses the JQuery framework to develop the front end page, where ajax is used to create asynchronous HTTP requests to achieve partial updates of the page; the back end uses Java language, Node.js server-side scripting language, Spring framework, and Oracle database to interact with the front end.

[0053] S3, replace "http: / / www.example.com" in step S1 with the URL in step S2.

[0054] It will be apparent to those skilled in the art that the present invention is not limited to the details of the exemplary embodiments described above and that the present invention can be implemented in other specific forms without departing from the spirit or essential features of the present invention. Therefore, the embodiments should be considered exemplary and non-restrictive from any point of view, and the scope of the present invention is defined by the appended claims rather than the above description, and it is intended that all changes falling within the meaning and scope of the equivalent elements of the claims be included in the present invention.< / qurl> < / qwebview> < / qapplication>

Claims

1. A test situation display configuration method based on embedded B / S architecture, characterized in that: The following steps are involved: S1, configure the situation display configuration module of embedded B / S architecture in the test situation software based on Qt / C++; S2, setting the trigger event of the situation display configuration module; S3, opening the situation display configuration module, configuring the situation display information through the browser client, the configuration information includes the test static environment configuration information, the force configuration information and other configuration information, and the server receives the configuration information; S4, the server interacts with the Oracle database and stores the configuration information of step S3 in the database; S5, if the information in step S4 needs to be modified or reset, the browser interacts with the database through the Web Server, reads the database storage configuration information, and executes step S4 again after the modification is completed; S6, the electronic chart display module reads the configuration information from the database as the input parameter of the drawing function, and realizes the drawing and calculation functions of graphic images such as environment construction, equipment tracking, navigation trajectory, and behavior representation.

2. According to claim 1, a test situation display configuration method based on embedded B / S architecture is characterized in that: The test situation software in step S1 uses a configuration method based on QtWebkit to implement the configuration of the embedded B / S architecture situation display module.

3. The test situation display configuration method based on embedded B / S architecture according to claim 1 is characterized in that: Setting the situation display configuration module trigger event in step S2 includes: adding a button to open the situation configuration system in the test situation software, adding a trigger event to the button, and defining the trigger event as jumping to the situation display configuration browser page when the user clicks the button.

4. The test situation display configuration method based on embedded B / S architecture according to claim 1 is characterized in that: In step S3, the situation display configuration information includes the test static environment configuration information and the force configuration information.

5. The test situation display configuration method based on embedded B / S architecture according to claim 4 is characterized in that: The test static environment configuration information includes a test designated area, a special functional area, a static target, static target characteristics and a drawing scheme.

6. The test situation display configuration method based on embedded B / S architecture according to claim 4 is characterized in that: The force configuration information includes test equipment, communication load, equipment characteristics and drawing plan.

7. The test situation display configuration method based on embedded B / S architecture according to claim 1 is characterized in that: In step S5, the browser client is a general browser, and the browser function is embedded in the Qt application. The request is sent to the Web server through the Web browser, and the Web server processes it and transmits the processed results back to the browser step by step.

8. The test situation display configuration method based on embedded B / S architecture according to claim 1 is characterized in that: In step S3, the configuration information is regularized and checked.

9. A test situation display configuration method based on embedded B / S architecture according to any one of claims 1 to 8, characterized in that: In step S6, the corresponding drawing function parameters are read through the configuration fields.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: The computer program can be executed by a processor to implement the steps of a test situation display configuration method based on an embedded B / S architecture as described in any one of claims 1 to 9.