Web browsing device, system and method based on Qt framework

By adopting a web browsing device based on the Qt framework in the industrial Internet system, combining the browser module and the Qt module, the existing interactive software development cycle and operating system dependence are solved, and efficient and multi-platform compatible user interaction is achieved.

CN119760264APending Publication Date: 2025-04-04THE 711TH RES INST OF CHINA STATE SHIPBUILDING CORP
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411795608.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-09
Publication Date
2025-04-04

AI Technical Summary

Technical Problem

In the existing industrial Internet systems, the software development cycle between users and industrial equipment is relatively long and the operating system environment is high, resulting in inconvenient promotion and use.

Method used

The web browsing device based on the Qt framework is adopted, and the web browsing function is realized through the combination of the browser module and the Qt module, reducing the development cycle and compatible with multiple operating systems.

Benefits of technology

It improves the development efficiency of web browsing software, reduces dependence on the operating system, realizes multi-platform compatibility, and simplifies the interaction between users and industrial equipment.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119760264A_ABST
    Figure CN119760264A_ABST
Patent Text Reader

Abstract

The present application discloses a web browsing device, system and method based on the Qt framework, which relates to the field of software design. The device includes a browser module and a Qt module. The browser module is used to receive a first input instruction from a user, and the first input instruction includes a first target URL for requesting browsing; the Qt module is used to parse the first input instruction to obtain a target IP address and generate web page request data; establish a connection with a corresponding network server based on the target IP address; send web page request data to the network server; receive and parse the web page response data sent by the network server; send the parsed data to the browser module, so that the browser module displays the first target web page corresponding to the first target URL. The application is applicable to a wide range of operating systems, and can be developed accordingly using the modular characteristics of Qt, which can greatly improve development efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of software design technology, and in particular to a web browsing device, system and method based on the Qt framework. Background Art

[0002] With the in-depth development of the Industrial Internet, users need to interact with industrial equipment, such as browsing the production parameters and current status of industrial equipment. Currently, the interaction between users and industrial equipment can be achieved through the Industrial Internet system, which can be equipped with relevant software to support user operations. However, the commonly used software has a long development cycle and high requirements for the operating system environment, which is not conducive to its promotion and use. Summary of the invention

[0003] The embodiments of the present application provide a web browsing device, system and method based on the Qt framework to reduce the development cycle of web browsing software and make the web browsing software compatible with various operating systems.

[0004] In a first aspect, a web browsing device based on a Qt framework is provided, comprising:

[0005] A browser module, wherein the browser module is configured to receive a first input instruction from a user, wherein the first input instruction includes a first target website requested for browsing;

[0006] Qt module, the Qt module is configured to perform the following steps:

[0007] Parsing the first input instruction to obtain a target IP address and generate web page request data;

[0008] Establishing a connection with a corresponding network server based on the target IP address;

[0009] Sending the web page request data to the network server;

[0010] Receiving webpage response data sent by the network server, the webpage response data is data obtained after the network server parses the webpage request data, obtains the current business logic, searches for webpage data corresponding to the current business logic from a preset database, and processes the webpage data;

[0011] The webpage response data is parsed, and the parsed data is sent to the browser module, so that the browser module displays the first target webpage corresponding to the first target website address.

[0012] In some embodiments, the Qt module includes a storage unit, the storage unit is used to store the web page to be displayed; the Qt module is also configured to perform the following steps:

[0013] After the browser module is started, each pre-configured pre-loaded web page is loaded;

[0014] Each of the preloaded web pages is stored in the storage unit.

[0015] In some embodiments, after parsing the first input instruction, the Qt module is further configured to perform the following steps:

[0016] If the first target website address is a website address corresponding to a preloaded web page, the first target web page is determined from the storage unit based on the first target website address, and the first target web page is sent to the browser module for display.

[0017] In some embodiments, the browser module is further configured to receive a second input instruction from a user, the second input instruction including a request to close a second target webpage; and in response to the second input instruction, cancel display of the second target webpage;

[0018] The Qt module is also configured to perform the following steps:

[0019] If the second target webpage is a preloaded webpage, hiding the second target webpage in the storage unit;

[0020] If the second target webpage is not a preloaded webpage, the second target webpage is deleted from the storage unit.

[0021] In some embodiments, the browser module includes an interactive interface, which includes multiple menu controls and multiple window tabs, the menu controls are used to generate corresponding input instructions, and the window tabs are used to indicate the status of corresponding web pages.

[0022] In some embodiments, when the browser module displays the first target webpage, the browser module is further configured to perform the following steps:

[0023] Receiving a third input instruction from a user, wherein the third input instruction includes a third target website requested for browsing;

[0024] hiding the first target web page;

[0025] Displaying a third target webpage corresponding to the third target URL;

[0026] In response to a user switching operation on the window tab, the display of the first target web page is switched from the display of the third target web page.

[0027] In some embodiments, the Qt module is configured to parse the first input instruction to obtain a target IP address and generate web page request data, including:

[0028] Parsing the first input instruction to obtain URL data, wherein the URL data includes a protocol, a domain name, a port number, a path, a query parameter, and a fragment identifier;

[0029] Performing DNS resolution to resolve the domain name into the target IP address;

[0030] The web page request data is generated based on the URL data, the preset request method, the preset request header and the preset request body.

[0031] In some embodiments, the Qt module is configured to perform DNS resolution to resolve the domain name into the target IP address, including:

[0032] Sending a query request to a domain name server based on the domain name;

[0033] Receive the target IP address corresponding to the domain name sent by the domain name server.

[0034] In some embodiments, the Qt module is configured to establish a connection with a corresponding network server based on the target IP address, including:

[0035] Sending a connection request to the network server corresponding to the target IP address;

[0036] Receiving request response data sent by the network server;

[0037] Sending request confirmation data to the network server to successfully establish a connection with the network server.

[0038] In some embodiments, after the browser module displays the first target webpage, the Qt module is further configured to perform the following steps:

[0039] Closes the connection to the network server.

[0040] In a second aspect, a web browsing system based on a Qt framework is provided, comprising:

[0041] A web browsing device based on a Qt framework, the web browsing device comprising a browser module and a Qt module, the browser module being configured to receive a first input instruction from a user, the first input instruction comprising a first target website for requesting browsing; the Qt module being configured to parse the first input instruction to obtain a target IP address and generate web page request data; and to establish a connection with a corresponding network server based on the target IP address; and to send the web page request data to the network server; and to receive web page response data sent by the network server; and to parse the web page response data and send the parsed data to the browser module, so that the browser module displays a first target web page corresponding to the first target website;

[0042] The network server is configured to parse the web page request data to obtain the current business logic; search for the web page data corresponding to the current business logic from a preset database; process the web page data to obtain the web page response data; and send the web page response data to the Qt module.

[0043] In a third aspect, a web browsing method based on a Qt framework is provided, which is applied to the web browsing system as described in the second aspect; the method comprises:

[0044] Receiving a first input instruction from a user through a browser module, wherein the first input instruction includes a first target website requested for browsing;

[0045] Parsing the first input instruction through the Qt module to obtain the target IP address and generate web page request data;

[0046] Establishing a connection with a corresponding network server based on the target IP address through the Qt module;

[0047] Sending the web page request data to the network server through the Qt module;

[0048] The web server parses the web page request data to obtain the current business logic, searches for web page data corresponding to the current business logic in a preset database, and then processes the web page data to obtain the web page response data;

[0049] The webpage response data sent by the network server is received and parsed by the Qt module, and the parsed data is sent to the browser module, so that the browser module displays the first target webpage corresponding to the first target website address.

[0050] The web browsing device based on Qt framework of the present application includes a browser module and a Qt module, wherein the browser module is used to receive a first input instruction from a user, wherein the first input instruction includes a first target website address requested for browsing; the Qt module is used to parse the first input instruction to obtain a target IP address and generate web page request data; establish a connection with a corresponding network server based on the target IP address; send web page request data to the network server; receive web page response data sent by the network server, wherein the web page response data is the data obtained after the network server parses the web page request data, obtains the current business logic, searches for the web page data corresponding to the current business logic from a preset database, and processes the web page data; parses the web page response data, and sends the parsed data to the browser module, so that the browser module displays the first target web page corresponding to the first target website address. The web browsing device provided by the present application embeds the browser module in the Qt framework, which not only does not require developers to write and maintain multiple sets of codes for different operating systems, but also covers a wide range of operating systems, and can use the modular characteristics of Qt to carry out corresponding development as needed, which can greatly improve development efficiency.

[0051] The present application discloses a web browsing system based on the Qt framework, which uses a web browsing device based on the Qt framework to interact with a network server. The web browsing device is compatible with multiple operating systems and has high development efficiency. In addition, the interaction with the network server is simple and efficient, and the operation difficulty is relatively low, and it has broad application prospects.

[0052] The web browsing method based on the Qt framework of the present application enables users to conveniently and efficiently interact with the industrial Internet system, with low operation difficulty and low system maintenance difficulty. BRIEF DESCRIPTION OF THE DRAWINGS

[0053] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For those skilled in the art, other drawings can be obtained based on these drawings without creative work.

[0054] Figure 1 This is a schematic diagram of the overall interaction of a web browsing system based on the Qt framework according to an embodiment of the present application;

[0055] Figure 2 This is an interactive schematic diagram of a web browsing device based on the Qt framework according to an embodiment of the present application;

[0056] Figure 3 A schematic diagram of a processing flow of a network server according to an embodiment of the present application;

[0057] Figure 4This is a schematic diagram of the overall process of the web browsing method based on the Qt framework according to an embodiment of the present application;

[0058] Reference numerals:

[0059] 10-web browsing device; 100-browser module; 200-Qt module; 210-Qt network engine; 20-network server. DETAILED DESCRIPTION

[0060] The technical solutions in the embodiments of the present application will be described clearly and completely below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present application.

[0061] In the description of the present application, it should be understood that the terms "upper", "lower", "front", "back", "left", "right", "top", "bottom", "inside", "outside" and the like indicate positions or positional relationships based on the positions or positional relationships shown in the accompanying drawings, and are only for the convenience of describing the present application and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as a limitation on the present application. In addition, the terms "first" and "second" are used for descriptive purposes only, and cannot be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, the features defined as "first" and "second" may explicitly or implicitly include one or more features. In the description of the present application, "multiple" means two or more, and at least one means one, two or more, unless otherwise clearly and specifically defined.

[0062] In order to shorten the development cycle of web browsing software, make web browsing software compatible with various operating systems, and improve the convenience of user interaction with industrial equipment, the embodiment of the present application provides a web browsing device based on the Qt framework, embeds a browser module in the Qt framework, and utilizes the modularity and cross-platform advantages of the Qt framework to combine it with the browser module to obtain a new web browsing device, which can shorten the development cycle of web browsing software and is compatible with multiple operating systems.

[0063] The following first introduces the web browsing system based on the Qt framework in an embodiment of the present application.

[0064] See also Figure 1 , Figure 1The overall interaction diagram of the web browsing system based on the Qt framework of the embodiment of the present application is shown. The web browsing system includes a web browsing device 10 and a network server 20 based on the Qt framework. The web browsing device 10 is arranged on the client, and the network server 20 is arranged on the web (network) service end. The web browsing device 10 includes a browser module 100 and a Qt module 200. The browser module 100 is configured to receive a first input instruction from a user, and the first input instruction includes a first target website requested for browsing. The Qt module 200 is configured to parse the first input instruction to obtain a target IP address and generate web page request data; and to establish a connection with the corresponding network server 20 based on the target IP (Internet Protocol) address; and to send web page request data to the network server 20; and to receive web page response data sent by the network server 20; and to parse the web page response data, and send the parsed data to the browser module 100, so that the browser module 100 displays the first target web page corresponding to the first target website.

[0065] The network server 20 is configured to parse the web page request data to obtain the current business logic; search the web page data corresponding to the current business logic from the preset database; process the web page data to obtain the web page response data; and send the web page response data to the Qt module 200 .

[0066] In some examples, the browser module 100 may include an interactive interface, which may include multiple menu controls and multiple window labels, the menu controls are used to generate corresponding input instructions, and the window labels are used to indicate the status of corresponding web pages. Exemplarily, the user may perform a click operation on the relevant menu controls of the interactive interface, such as clicking on the menu control "generator set", and the browser module 100 may receive the user's first input instruction through the interactive interface, and the first target web page corresponding to the first target URL requested to be browsed is the web page corresponding to the generator set.

[0067] Exemplarily, if there is an alarm in the web page corresponding to the window tag, the number of alarms can be displayed on the window tag, and the background color of the number of alarms can also be different according to the alarm level. Click the window tag corresponding to a certain web page, the window tag can be switched to an activated state and the close button on the window tag can be displayed. At the same time, the page displays the web page corresponding to the window tag, and other tags are in an inactive state without a close button. The background color brightness of the window tag in the activated state can be higher than the background color brightness of the window tag in the inactive state. Click the left and right arrow keys on the interface to switch the activation state of the window tag left and right. Click the close button next to the left and right keys to close all inactive window tags, leaving only the active window tags; when the open window tags exceed the page display, click the more button to display the remaining window tags in a drop-down list. When clicking the window tag in the drop-down list, the tag can be placed in the first position of the interface tag and set as the active window tag. In addition, the browser module 100 can also set the zoom of the window on the interactive interface. In this way, by setting a new tab management method, the human-computer interaction efficiency and experience can be effectively improved.

[0068] Exemplarily, the user can customize the configuration of the interactive interface according to the needs, such as: switching between Chinese and English, switching between day and night modes, switching between control mode and observation mode, etc. When the interface is in observation mode, the user can only view, and cannot click on the buttons in the interface, input the input box, etc. When the interface is in control mode, the buttons in the interface can be clicked, the input box can be input, etc. In addition, the browser module 100 also supports data backup functions, including configuration archiving and log archiving; printing functions, including printing the current mimic (simulation) diagram, real-time alarm list, historical alarm list and operation event list, and can also support scheduled printing, so that users can be more handy; time and time zone setting functions, can set the time and time zone of the current operating system. In this way, the browser module 100 is used for user operation, and the Qt module 200 configures and manages the system and data in the background, and the front and back are separated, which can give users a better experience.

[0069] In some examples, when the browser module 100 displays the first target webpage, the browser module 100 is further configured to perform the following steps:

[0070] A third input instruction from the user is received, where the third input instruction includes a third target website requested for browsing.

[0071] Hide the first landing page.

[0072] A third target webpage corresponding to the third target URL is displayed.

[0073] In response to the user's switching operation on the window tab, the display of the first target webpage is switched from the third target webpage.

[0074] Exemplarily, the user can perform a click operation on the relevant menu control of the interactive interface, such as clicking the menu control "propulsion device", then the browser module 100 can receive the user's third input instruction through the interactive interface, and the third target webpage corresponding to the third target URL requested to be browsed is the webpage corresponding to the propulsion device. The browser module 100 hides the first target webpage (for example, the webpage corresponding to the generator set), and the window tag corresponding to the first target webpage is still displayed on the interactive interface, and the third target webpage is displayed at the same time. The user can perform a click operation on the window tag corresponding to the first target webpage of the interactive interface, and the browser module 100 can respond to the operation, hide the third target webpage, and display the first target webpage, and the window tag corresponding to the third target webpage is still displayed on the interactive interface. In this way, the webpage requested to be browsed subsequently can cover the webpage browsed historically, and in the absence of a request to close, the window tag corresponding to the webpage browsed historically can still be retained on the interactive interface, so as to facilitate users to switch quickly and improve the interactive experience.

[0075] See also Figure 2 , Figure 2This is an interactive schematic diagram of a web browsing device based on the Qt framework in an embodiment of the present application. In some embodiments, the Qt module 200 includes a QtWebEngine (Qt network engine) 210. After the browser module 100 receives the user's first input instruction, an object of QtWebEngine210 can be created in the Qt framework, and then QtWebEngine210 loads the URL corresponding to the web page and waits for the loading to be completed. After the loading is completed, the corresponding web page is displayed in the browser module 100. QtWebEngine210 also supports functions such as forward, backward, reload, and stop of web pages. Specifically, the core functions of QtWebEngine210 in an embodiment of the present application include: page loading and rendering. WebEngine can load and render HTML (Hypertext Mark-up Language), CSS (Cascading Style Sheets, Cascading Style Sheets), JavaScript (a programming language mainly used to enhance the interactivity and dynamism of web pages), and other web content, supporting various mainstream web standards and technologies; user interaction, QtWebEngine210 can provide a rich API, enabling developers to create user interfaces that interact with web pages, such as buttons, input boxes, etc.; cross-platform support, QtWebEngine210 is based on the Qt framework, so it has cross-platform performance and can run on operating systems such as Windows, macOS, and Linux; hardware acceleration, QtWebEngine210 can provide hardware acceleration function and make full use of GPU resources to improve page rendering speed and performance; multi-tab browsing, QtWebEngine210 can support multi-tab browsing, can open multiple pages at the same time, and improve work efficiency; security performance, QtWebEngine210 follows the Chromium security model, has high security, and can effectively prevent the harm of malicious websites and plug-ins.

[0076] The following is a detailed introduction to the steps performed by the Qt module 200 in the embodiment of the present application.

[0077] In some examples, the Qt module 200 may include a storage unit for storing the web page to be displayed. The Qt module 200 is also configured to perform the following steps:

[0078] After the browser module 100 is started, various pre-configured preloaded web pages are loaded.

[0079] Each preloaded web page is stored in a storage unit.

[0080] Among them, the loading step includes obtaining the target IP address of each preloaded web page and generating web page request data; establishing a connection with the corresponding network server 20 based on the target IP address; sending web page request data to the network server 20; receiving web page response data sent by the network server 20; and parsing the web page response data to obtain data of each preloaded web page.

[0081] Through the above solution, the use of web page preloading technology can effectively improve the problem that web pages with a large amount of data and resources to be loaded are opened slowly, which easily affects the user operation experience, thereby greatly improving the user experience.

[0082] In some embodiments, after parsing the input instruction and before obtaining the target IP address and generating the web page request data, the Qt module 200 is further configured to perform the following steps:

[0083] Detect whether the first target URL is the URL corresponding to the preloaded web page. If the first target URL is the URL corresponding to the preloaded web page, determine the first target web page from the second memory based on the first target URL, and send the first target web page to the browser module 100 for display. If the first target URL is not the URL corresponding to the preloaded web page, continue to execute the steps of obtaining the target IP address and generating web page request data.

[0084] It is understandable that if the first target URL is the URL corresponding to the preloaded web page, there is no need to interact with the network server 20 to obtain the data of the first target web page, but it can be directly searched and displayed from the storage unit. If the first target URL is not the URL corresponding to the preloaded web page, it is necessary to continue to interact with the network server 20 to obtain the data of the first target web page.

[0085] In some embodiments, the browser module 100 is further configured to receive a second input instruction from the user, the second input instruction including a second target webpage requested to be closed, and to cancel the display of the second target webpage in response to the second input instruction. Exemplarily, the user may perform a click operation on the window tab of the interactive interface, and the browser module 100 may receive the second input instruction from the user through the interactive interface. At this time, the second target webpage requested to be closed may be the first target webpage, or may be other webpages that have been browsed in history but not closed. After receiving the second input instruction, the browser module 100 may cancel the display of the second target webpage in response to the second input instruction.

[0086] At this time, the Qt module 200 is also configured to perform the following steps: if the second target webpage is a preloaded webpage, the second target webpage is hidden in the storage unit to wait for the next browsing. If the second target webpage is not a preloaded webpage, the second target webpage is deleted from the storage unit. In this way, the processing of the preloaded webpage can be retained to avoid the need to load it during the next browsing. In addition, non-preloaded webpages can be deleted from the storage unit, thereby freeing up storage space and reducing hardware pressure.

[0087] In some embodiments, the Qt module 200 is configured to parse the first input instruction to obtain the target IP address and generate web page request data, which can be specifically implemented by the following steps:

[0088] Step 1: parse the first input instruction to obtain URL data, which includes the protocol, domain name, port number, path, query parameters and fragment identifier.

[0089] Specifically, URL (Uniform Resource Locator) is an abbreviation for uniform resource locator, which is used to identify and locate resources on the Internet. URL is a standardized format for specifying the location and access method of resources. Among them, the protocol can be HTTP (Hypertext Transfer Protocol). If the port number is not specifically specified, the port number can be the default port number of the protocol. The path indicates the location of the resource on the specified server. Qt module 200 will decompose and extract these parts for subsequent operations.

[0090] Step 2: Perform DNS (Domain Name Server) resolution to resolve the domain name into a target IP address.

[0091] Specifically, step 2 is implemented in the following way:

[0092] The first step is to send a query request to the domain name server based on the domain name.

[0093] The second step is to receive the target IP address corresponding to the domain name sent by the domain name server.

[0094] Among them, the domain name server is also set on the web server.

[0095] Step three, generating web page request data based on URL data, preset request method, preset request header and preset request body.

[0096] Exemplarily, the web page request data is an HTTP request. The web page request data includes the previously parsed URL data, the preset request method, the preset request header, and the preset request body. Among them, the preset request method can be GET or POST. The preset request header can include information about the browser and the client, the required data format, etc. The preset request body is related to the request method, for example, for a POST request, it usually contains data submitted by the user.

[0097] In some embodiments, the Qt module 200 is configured to establish a connection with the corresponding network server 20 based on the target IP address, which can be specifically implemented by the following steps:

[0098] A connection request is sent to the network server 20 corresponding to the target IP address.

[0099] Receive the request response data sent by the network server 20.

[0100] The request confirmation data is sent to the network server 20 to successfully establish a connection with the network server 20 .

[0101] Specifically, the Qt module 200 will try to establish a TCP (Transfer Control Protocol) connection with the default HTTP port (usually 80) of the network server 20. This process usually involves a "three-way handshake", that is, the Qt module 200 sends a connection request to the network server 20, the network server 20 confirms the request and replies, and finally the Qt module 200 confirms the reply of the network server 20 again. In this way, a TCP connection can be established with the network server 20, which facilitates subsequent data transmission.

[0102] In some embodiments, after the browser module 100 displays the first target web page, the Qt module 200 is further configured to close the connection with the network server 20. In this way, each time a web page transmission is completed, the TCP connection with the network server 20 will be closed in time, thereby being able to better improve the processing performance of the Qt module 200.

[0103] In some embodiments, the Qt module 200 is configured to parse the webpage response data and send the parsed data to the browser module 100 so that the browser module 100 displays the first target webpage corresponding to the first target URL. Exemplarily, this can be achieved by the following steps:

[0104] If the parsed data is HTML data, the browser module 100 will parse the HTML data and build a DOM (Document Object Model) tree, then build a rendering tree according to the CSS style information, and finally combine the DOM tree and the rendering tree for display. If the parsed data is other resources (such as pictures, videos, Java files), the browser module 100 will process it accordingly according to its content type, and display it or perform corresponding operations.

[0105] Through the above scheme, the Qt module 200 of the embodiment of the present application can support almost all mainstream operating systems, including Microsoft Windows, Linux, macOS, etc., and even support some domestic embedded systems such as Yihui. This wide range of operating system support allows developers to write code once and then deploy and run on multiple platforms, greatly improving development efficiency and the coverage of applications. Due to the cross-platform characteristics of the Qt module 200, developers do not need to write and maintain multiple sets of code for different operating systems, thereby reducing development costs and maintenance workload. In addition, the Qt module 200 can use the C++ programming language and improve the execution efficiency of the code through automated tools and optimization techniques. This enables the application of the Qt module 200 to maintain high performance during operation. The good encapsulation mechanism of the Qt module 200 makes Qt very modular and has good reusability. Developers can select corresponding modules for development as needed, thereby improving development efficiency. The embodiment of the present application embeds the browser module 100 in the Qt framework, not only does the developer not need to write and maintain multiple sets of code for different operating systems, the coverage of the operating system is relatively wide, and the modular characteristics of Qt can be used to carry out corresponding development as needed, which can greatly improve development efficiency. Through the web browsing device 10, the user can conveniently interact with the industrial Internet system, for example, can send control instructions to production equipment through the interactive interface, adjust production parameters, or query historical data, etc. This interactive mode can improve work efficiency and reduce operation difficulty.

[0106] The following is a detailed introduction to the steps performed by the network server 20 in the embodiment of the present application.

[0107] See also Figure 3 , Figure 3Schematic diagram of the processing flow of the network server of the embodiment of the present application. In some embodiments, the network server 20 receives the HTTP request sent by the Qt module 200, and then parses the request to obtain the current business logic. Read and write operations are performed on the preset database to find the web page data corresponding to the current business logic, and the data is logically processed to obtain the web page response data. Finally, based on the parsing results and the web page response data, HTML data is generated according to the template file rendering, and then the network server 20 generates an HTTP response, including a response status code (indicating the success or failure of the request), a response header (including server information, content type, cache control, etc.) and a response body (the actual content of the requested resource). Finally, an HTTP response is sent to the Qt module 200.

[0108] Through the above scheme, a web browsing device 10 based on the Qt framework is used to interact with a network server 20. The web browsing device 10 is compatible with multiple operating systems and has high development efficiency. In addition, the interaction with the network server 20 is simple and efficient, and the operation difficulty is relatively low, which has broad application prospects.

[0109] Accordingly, the present application embodiment also provides a web browsing method based on the Qt framework. Figure 4 , Figure 4 The overall flow diagram of the web browsing method based on the Qt framework of the embodiment of the present application is shown in FIG. The web browsing method is applied to the web browsing system of the embodiment of the present application, and specifically includes the following steps:

[0110] Step 401: Receive a first input instruction from a user through a browser module, where the first input instruction includes a first target website requested for browsing.

[0111] Step 402: parse the first input instruction through the Qt module to obtain the target IP address and generate web page request data.

[0112] Step 403: Establish a connection with the corresponding network server based on the target IP address through the Qt module.

[0113] Step 404: Send web page request data to the network server through the Qt module.

[0114] Step 405: The web page request data is parsed by the network server to obtain the current business logic, and the web page data corresponding to the current business logic is searched from the preset database, and then the web page data is processed to obtain the web page response data.

[0115] Step 406: receiving and parsing the webpage response data sent by the network server through the Qt module, and sending the parsed data to the browser module, so that the browser module displays the first target webpage corresponding to the first target URL.

[0116] Through the above-mentioned scheme, the method of the embodiment of the present application enables users to conveniently and efficiently interact with the industrial Internet system, with low operation difficulty and low system maintenance difficulty.

[0117] It should be noted that the various embodiments of the present application can refer to each other, and for the content not described in detail in one embodiment, reference can be made to the relevant introduction of other embodiments.

[0118] The above is a detailed introduction to a web browsing device, system and method based on the Qt framework provided in the embodiments of the present application. Specific examples are used in this article to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the technical solution and its core idea of ​​the present application. Ordinary technicians in this field should understand that they can still modify the technical solutions recorded in the aforementioned embodiments, or replace some of the technical features therein with equivalents; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the scope of the technical solutions of the embodiments of the present application.

Claims

1. A web browsing device based on the Qt framework, characterized in that: include: A browser module, wherein the browser module is configured to receive a first input instruction from a user, wherein the first input instruction includes a first target website requested for browsing; Qt module, the Qt module is configured to perform the following steps: Parsing the first input instruction to obtain a target IP address and generate web page request data; Establishing a connection with a corresponding network server based on the target IP address; Sending the web page request data to the network server; Receiving webpage response data sent by the network server, the webpage response data is data obtained after the network server parses the webpage request data, obtains the current business logic, searches for webpage data corresponding to the current business logic from a preset database, and processes the webpage data; The webpage response data is parsed, and the parsed data is sent to the browser module, so that the browser module displays the first target webpage corresponding to the first target website address.

2. The web browsing device based on the Qt framework according to claim 1, characterized in that: The Qt module includes a storage unit, and the storage unit is used to store the web page to be displayed; the Qt module is also configured to perform the following steps: After the browser module is started, each pre-configured pre-loaded web page is loaded; Each of the preloaded web pages is stored in the storage unit.

3. The web browsing device based on the Qt framework according to claim 2, characterized in that: After parsing the first input instruction, the Qt module is further configured to perform the following steps: If the first target website address is a website address corresponding to a preloaded web page, the first target web page is determined from the storage unit based on the first target website address, and the first target web page is sent to the browser module for display.

4. The web browsing device based on the Qt framework according to claim 3, characterized in that: The browser module is further configured to receive a second input instruction from a user, wherein the second input instruction includes a request to close a second target webpage; and in response to the second input instruction, cancel display of the second target webpage; The Qt module is also configured to perform the following steps: If the second target webpage is a preloaded webpage, hiding the second target webpage in the storage unit; If the second target webpage is not a preloaded webpage, the second target webpage is deleted from the storage unit.

5. The web browsing device based on the Qt framework according to claim 1, characterized in that: The browser module includes an interactive interface, which includes a plurality of menu controls and a plurality of window tags. The menu controls are used to generate corresponding input instructions, and the window tags are used to indicate the status of corresponding web pages.

6. The web browsing device based on the Qt framework according to claim 5, characterized in that: In the case where the browser module displays the first target webpage, the browser module is further configured to perform the following steps: Receiving a third input instruction from a user, wherein the third input instruction includes a third target website requested for browsing; hiding the first target web page; Displaying a third target webpage corresponding to the third target URL; In response to a user switching operation on the window tab, the display of the first target web page is switched from the display of the third target web page.

7. The web browsing device based on the Qt framework according to claim 1, characterized in that: The Qt module is configured to parse the first input instruction to obtain a target IP address and generate web page request data, including: Parsing the first input instruction to obtain URL data, wherein the URL data includes a protocol, a domain name, a port number, a path, a query parameter, and a fragment identifier; Performing DNS resolution to resolve the domain name into the target IP address; The web page request data is generated based on the URL data, the preset request method, the preset request header and the preset request body.

8. The web browsing device based on Qt framework according to claim 7, characterized in that: The Qt module is configured to perform DNS resolution to resolve the domain name into the target IP address, including: Sending a query request to a domain name server based on the domain name; Receive the target IP address corresponding to the domain name sent by the domain name server.

9. The web browsing device based on Qt framework according to claim 1, characterized in that: The Qt module is configured to establish a connection with a corresponding network server based on the target IP address, including: Sending a connection request to the network server corresponding to the target IP address; Receiving request response data sent by the network server; Sending request confirmation data to the network server to successfully establish a connection with the network server.

10. The web browsing device based on Qt framework according to claim 1, characterized in that: After the browser module displays the first target webpage, the Qt module is further configured to perform the following steps: Closes the connection to the network server.

11. A web browsing system based on Qt framework, characterized in that: include: A web browsing device based on a Qt framework, the web browsing device comprising a browser module and a Qt module, the browser module being configured to receive a first input instruction from a user, the first input instruction comprising a first target website for requesting browsing; the Qt module being configured to parse the first input instruction to obtain a target IP address and generate web page request data; and to establish a connection with a corresponding network server based on the target IP address; and to send the web page request data to the network server; and receiving web page response data sent by the network server; and parsing the webpage response data, and sending the parsed data to the browser module, so that the browser module displays a first target webpage corresponding to the first target URL; The network server is configured to parse the web page request data to obtain current business logic; Searching for web page data corresponding to the current business logic from a preset database; The web page data is processed to obtain the web page response data; and the web page response data is sent to the Qt module.

12. A web browsing method based on Qt framework, characterized in that: Applied to the web browsing system as claimed in claim 11; the method comprises: Receiving a first input instruction from a user through a browser module, wherein the first input instruction includes a first target website requested for browsing; Parsing the first input instruction through the Qt module to obtain the target IP address and generate web page request data; Establishing a connection with a corresponding network server based on the target IP address through the Qt module; Sending the web page request data to the network server through the Qt module; The web server parses the web page request data to obtain the current business logic, searches for web page data corresponding to the current business logic in a preset database, and then processes the web page data to obtain the web page response data; The webpage response data sent by the network server is received and parsed by the Qt module, and the parsed data is sent to the browser module, so that the browser module displays the first target webpage corresponding to the first target website address.