CN111355783A - Online education system based on browser driver - Google Patents
Online education system based on browser driver Download PDFInfo
- Publication number
- CN111355783A CN111355783A CN202010102543.XA CN202010102543A CN111355783A CN 111355783 A CN111355783 A CN 111355783A CN 202010102543 A CN202010102543 A CN 202010102543A CN 111355783 A CN111355783 A CN 111355783A
- Authority
- CN
- China
- Prior art keywords
- browser
- driver application
- remote server
- hardware
- webdriver
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/12—Protocols specially adapted for proprietary or special-purpose networking environments, e.g. medical networks, sensor networks, networks in vehicles or remote metering networks
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/90—Details of database functions independent of the retrieved data types
- G06F16/95—Retrieval from the web
- G06F16/958—Organisation or management of web site content, e.g. publishing, maintaining pages or automatic linking
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/02—Protocols based on web technology, e.g. hypertext transfer protocol [HTTP]
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Theoretical Computer Science (AREA)
- Databases & Information Systems (AREA)
- Signal Processing (AREA)
- General Health & Medical Sciences (AREA)
- Medical Informatics (AREA)
- Health & Medical Sciences (AREA)
- Data Mining & Analysis (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Computing Systems (AREA)
- Management, Administration, Business Operations System, And Electronic Commerce (AREA)
- Electrically Operated Instructional Devices (AREA)
Abstract
The embodiment of the invention discloses an online education system based on a browser driver, which comprises a browser driver application, hardware equipment and a browser; the browser driver application monitors an operation request on the browser based on a communication protocol; the browser driver application is also communicated with the hardware equipment and transmits the operation instruction corresponding to the monitored operation request to the hardware equipment. By adopting the invention, the control to the hardware and the access to the network teaching resource can be realized simultaneously simply and quickly based on the browser.
Description
Technical Field
The invention relates to the technical field of online education, in particular to an online education system based on a browser driver.
Background
The information revolution has profound influence on various social fields, and the development of the society needs people to have an updated knowledge system and grasp the epoch change of the immense change more quickly. But the traditional education mode obviously cannot keep pace with knowledge replacement and information explosion. The network is used as a natural carrier of information, and necessarily responds to information trend through the specific function of the network in the field of education. The network-based education training platform is widely applied. Some training projects need to operate some hardware, and most of the existing network-based education platforms adopt a B/S (Browser/Server) mode, namely, a Browser is operated at a client terminal to access resources at a Server terminal. The method is simple and quick, software does not need to be installed on the client, and the requirement on the computer of the client is low, so that the method is widely applied. But hardware cannot be directly controlled through a browser because the current methods do not meet the requirements for training programs that require direct hardware control.
Disclosure of Invention
The embodiment of the invention provides an online education system based on a browser driver, which can realize hardware control and network teaching resource access simultaneously and simply and quickly based on a browser.
An embodiment of the present invention provides an online education system based on a browser driver, which may include: a browser driver application, a hardware device, and a browser;
the browser driver application monitors an operation request on the browser based on a communication protocol;
and the browser driver application is also communicated with the hardware equipment and transmits the monitored operation instruction corresponding to the operation request to the hardware equipment.
Further, the browser driver application is further configured to receive response information fed back by the hardware device, and transmit the response information to the interface of the browser for display.
Further, the browser driver application binds to the browser based on a communication protocol when detecting the browser launch.
Further, the hardware devices include at least one or more of a robot, a drone, and an unmanned vehicle.
Further, a hardware interface between the hardware device and the browser is any one of bluetooth, a serial port and a USB.
Further, the browser driver application listens for an operation request on the browser based on a communication protocol, including:
starting the browser by adopting a Selenium2.0, taking a Web Service based on a WebDriver Wire protocol as a Remote Server of the Selenium2.0, and binding the Remote Server with the browser;
and monitoring an operation request on the browser in a client by adopting the Remote Server.
Further, the browser driver application is further configured to send an operation Request to be executed to the Remote Server in an Http Request manner;
and the Remote Server analyzes the received operation request and sends an analysis result to the Webdriver so that the Webdriver executes the operation of the browser.
Further, before starting the browser with Selenium2.0, the system further includes:
and detecting whether the native component of the browser has a version matched with the Selenium 2.0.
Further, when detecting that the version of the native component of the browser is matched with the Selenium2.0, executing a step of starting the browser by using the Selenium2.0, using the WebService based on the WebDriver Wire protocol as a Remote Server of the Selenium2.0, and binding the Remote Server with the browser.
The invention has the beneficial effects that: two basic functions are simultaneously realized by setting a browser driver application, namely, the browser driver application is communicated with hardware, and the browser is bound with a communication protocol while the browser is started, wherein the content of the communication protocol is used for monitoring the browser, so that an application program can monitor an operation request on a browser page. The control and the communication of the browser to the hardware equipment are realized, so that the teaching platform can simultaneously control the hardware and access teaching resources and perform interaction.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
Fig. 1 is a schematic structural diagram of a browser driver-based online education system provided by an embodiment of the present invention;
FIG. 2 is a schematic diagram of the Selenium Webdriver according to the embodiment of the present invention;
FIG. 3 is a schematic diagram of an example interface provided by an embodiment of the invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The terms "including" and "having," and any variations thereof, in the description and claims of this invention and the above-described drawings are intended to cover non-exclusive inclusions. For example, a process, method, system, article, or apparatus that comprises a list of steps or elements is not limited to only those steps or elements listed, but may alternatively include other steps or elements not listed, or inherent to such process, method, article, or apparatus.
Furthermore, the terms "mounted," "disposed," "provided," "connected," and "sleeved" are to be construed broadly. For example, it may be a fixed connection, a removable connection, or a unitary construction; can be a mechanical connection, or an electrical connection; may be directly connected, or indirectly connected through intervening media, or may be in internal communication between two devices, elements or components. The specific meaning of the above terms in the present invention can be understood according to specific situations by those skilled in the art.
It should be noted that the embodiments and features of the embodiments in the present application may be combined with each other without conflict. The present application will be described in detail below with reference to the embodiments with reference to the attached drawings.
As shown in fig. 1, a connection relationship between a browser driver application, a hardware device, and a browser in a browser driver-based online education system is provided, in which the browser driver mainly implements two functions: the method comprises the following steps of communication with hardware equipment and interaction with a browser.
In an embodiment of the application, the browser driver application may listen for operation requests on the browser based on the communication protocol. Preferably, the browser driver application may bind with the browser based on a communication protocol upon detecting the browser launch. Interaction with the browser is then effected based on the protocol.
In a preferred implementation, a Selenium2.0, also known as Selenium WebDriver, may be used to launch the browser (the working process of Selenium2.0 is shown in fig. 2).
The method mainly comprises the following steps of binding: namely, the background can simultaneously start the WebService based on the WebDriver Wire protocol as the Remote Server of the Selenium and bind with the Browser Web Browser, and then the Remote Server starts to monitor the operation request on the Browser in the Client terminal.
Step two, sending an Http Request based on a WebDriver Wire protocol: when the browser driver application code is executed, the browser driver application code serves as a Client terminal, and a page operation Request needing to be executed is sent to a RemoteServer in an Http Request mode. The body of the Http Request describes specific operations to be executed by the browser in a JSON format specified by a WebDriver Wire protocol.
Step three, requesting the Webdriver to operate the browser: after receiving the request, the Remote Server can analyze the request and send an analysis result to the WebDriver.
Step four, operating the browser by the Webdriver: the operation of the browser is actually performed by WebDriver. The WebDriver can be regarded as a Native Component (Native Component) for directly operating the browser, and generally, when a test environment is built, the WebDriver corresponding to the browser needs to be downloaded first.
It should be noted that after selenium2.x has proposed the concept of WebDriver, it provides an entirely alternative way to interact with the browser, i.e. using the native API of the browser, packing into a set of more object-oriented selenium WebDriver APIs, and operating directly the elements in the browser page, even operating the browser itself (screen capture, window size, start, close, install plug-ins, configure certificates, etc.). Because the native API of the browser is used, the speed is greatly improved, and the calling stability is handed to the browser manufacturer, which is obviously more scientific. However, the side effect is that different browser vendors have some differences in the operation and presentation of Web elements, which directly results in that the SeleniumWebDriver needs to be different from browser vendor to provide different implementations. For example, Firefox has a special FirefoxDrver, Chrome has a special Chrome driver, and so on. (even including android driver and iOSWebdriver)
The WebDriver Wire protocol is universal, that is to say, whether FirefoxDriver or ChromeDriver, after starting, Web Service based on the set of protocol is started at a certain port. For example, FirefoxDrver initialization succeeds by default, starting with http:// localhost:7055, while ChromeDriver is roughly like http:// localhost: 46350. Based on the above, it can be known that any API calling WebDriver needs to send a command, actually an HTTP request, to a Web Service on the listening port by means of a commandexecutor. In the body of the HTTP request of the present application, a JSON-formatted character string specified by the WebDriver Wire protocol tells the Selenium user what the browser wants to do next.
In creating a WebDriver, the Selenium first confirms whether the native component of the browser is available and the version matches. Then, a whole set of Web Service is started in The target browser, and The Web Service uses The protocol defined by The self design of The Selenium and is named as The Webdriver WireProtocol. The set of protocols is very powerful and can operate a browser to do almost anything, including open, close, maximize, minimize, element locate, element click, upload file, etc.
In a preferred implementation manner, the hardware interface between the hardware device and the browser is any one of bluetooth, a serial port, and a USB. And the browser driver application carries out hardware communication through the hardware equipment through a hardware interface and transmits the monitored operation instruction corresponding to the operation request to the hardware equipment. For example: the Google Chrome browser adds WebUSB and WebBluetooth APIs, allows a website to interact with equipment connected to the running browser, and controls a serial port by using an ActiveX control and JS call a serial port control of MSCOMM32. dll. For another example, the JavaScript language is generally a web page programming language, and is more suitable for some application designs of the foreground, or controls of the C # language are used to control the serial port, and then JS + AJAX is used to interact with the C # language to obtain the serial port data.
In the following, a specific example of online education will be described, such as the interface of the computer-operated robot experiment shown in fig. 3, the whole screen is a browser interface. The upper right part is an experimental guide providing prompts for the operation of the robot, the contents of which can be dynamically updated according to the state of the robot or manually reviewed. The lower right part is an experimental record, and data in the experiment can be input in the area. The browser driver application starts the browser and at the same time starts a service that listens to the browser's operations. When the student presses the button of the operation (representing front, back, left and right respectively), the service monitors the operation and transmits the operation to the browser driver application, the browser driver application transmits the instruction to the robot through a communication protocol with the robot, and then the robot moves according to the instruction. The position or number of steps of the robot's motion as response information may be passed from the robot to a browser driver application which passes the response information to a browser for display on an interface, or the next output position may be calculated from the current position.
In the embodiment of the invention, two basic functions are simultaneously realized by setting a browser driver application, namely, the browser is communicated with hardware, and the browser is bound with a communication protocol while the browser is started, wherein the content of the communication protocol is that the browser is monitored, so that an application program can monitor an operation request on a browser page. The control and communication of the browser to the hardware equipment are realized, so that the teaching platform can simultaneously control the hardware and access teaching resources and carry out interaction; the method comprises the steps that a Web Service bound with a browser is started to serve as a Remote Server, and an operation request of a Client terminal is monitored, so that interaction with the browser is realized; by adopting the communication between the browser and the hardware, the access to the hardware based on the B/S architecture is realized.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by a computer program, which can be stored in a computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. The storage medium may be a magnetic disk, an optical disk, a Read-only memory (ROM), a Random Access Memory (RAM), or the like.
The above disclosure is only for the purpose of illustrating the preferred embodiments of the present invention, and it is therefore to be understood that the invention is not limited by the scope of the appended claims.
Claims (9)
1. An online education system based on a browser driver, comprising: a browser driver application, a hardware device, and a browser;
the browser driver application monitors an operation request on the browser based on a communication protocol;
and the browser driver application is also communicated with the hardware equipment and transmits the monitored operation instruction corresponding to the operation request to the hardware equipment.
2. The system of claim 1,
the browser driver application is further used for receiving response information fed back by the hardware equipment and transmitting the response information to an interface of the browser for display.
3. The system of claim 1,
the browser driver application binds with the browser based on a communication protocol upon detecting the browser launch.
4. The system of claim 1,
the hardware devices include at least one or more of a robot, a drone, and an unmanned vehicle.
5. The system of claim 1,
and a hardware interface between the hardware equipment and the browser is any one of Bluetooth, a serial port and a USB.
6. The system of claim 1, wherein the browser driver application listens for operation requests on the browser based on a communication protocol, comprising:
starting the browser by adopting a Selenium2.0, taking a Web Service based on a WebDriver Wire protocol as a Remote Server of the Selenium2.0, and binding the Remote Server with the browser;
and monitoring an operation request on the browser in a client by adopting the Remote Server.
7. The system of claim 6,
the browser driver application is also used for sending an operation Request to be executed to the Remote Server in an Http Request mode;
and the Remote Server analyzes the received operation request and sends an analysis result to the Webdriver so that the Webdriver executes the operation of the browser.
8. The system of claim 6, wherein before launching the browser using Selenium2.0, the system further comprises:
and detecting whether the native component of the browser has a version matched with the Selenium 2.0.
9. The system of claim 8,
and when detecting that the version of the native component of the browser is matched with the Selenium2.0, executing a step of starting the browser by adopting the Selenium2.0, using a Web Service based on a WebDriver Wire protocol as a Remote Server of the Selenium2.0, and binding the Remote Server and the browser.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010102543.XA CN111355783A (en) | 2020-02-19 | 2020-02-19 | Online education system based on browser driver |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010102543.XA CN111355783A (en) | 2020-02-19 | 2020-02-19 | Online education system based on browser driver |
Publications (1)
Publication Number | Publication Date |
---|---|
CN111355783A true CN111355783A (en) | 2020-06-30 |
Family
ID=71197012
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202010102543.XA Pending CN111355783A (en) | 2020-02-19 | 2020-02-19 | Online education system based on browser driver |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN111355783A (en) |
Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1655156A (en) * | 2004-02-13 | 2005-08-17 | 上海安凌计算机科技有限公司 | Customer relationship management system based on WEB card swiping mode |
CN103019679A (en) * | 2012-11-19 | 2013-04-03 | 四川长虹电器股份有限公司 | Interaction method of browser and hardware |
CN107111465A (en) * | 2014-12-19 | 2017-08-29 | Zih公司 | Method for the communication between enabled user equipment browser and local device |
CN107862810A (en) * | 2017-09-28 | 2018-03-30 | 中国民生银行股份有限公司 | A kind of self-aided terminal control system based on browser |
CN109800021A (en) * | 2018-12-29 | 2019-05-24 | 浙江工商大学 | The method, system and device of local hardware device can be driven by any browser |
CN109885792A (en) * | 2019-01-04 | 2019-06-14 | 石化盈科信息技术有限责任公司 | A kind of APP bridging method based on webdriver technology |
CN110730208A (en) * | 2019-09-16 | 2020-01-24 | 深圳市国信合成科技有限公司 | Local device calling method and device, storage medium and device |
-
2020
- 2020-02-19 CN CN202010102543.XA patent/CN111355783A/en active Pending
Patent Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1655156A (en) * | 2004-02-13 | 2005-08-17 | 上海安凌计算机科技有限公司 | Customer relationship management system based on WEB card swiping mode |
CN103019679A (en) * | 2012-11-19 | 2013-04-03 | 四川长虹电器股份有限公司 | Interaction method of browser and hardware |
CN107111465A (en) * | 2014-12-19 | 2017-08-29 | Zih公司 | Method for the communication between enabled user equipment browser and local device |
CN107862810A (en) * | 2017-09-28 | 2018-03-30 | 中国民生银行股份有限公司 | A kind of self-aided terminal control system based on browser |
CN109800021A (en) * | 2018-12-29 | 2019-05-24 | 浙江工商大学 | The method, system and device of local hardware device can be driven by any browser |
CN109885792A (en) * | 2019-01-04 | 2019-06-14 | 石化盈科信息技术有限责任公司 | A kind of APP bridging method based on webdriver technology |
CN110730208A (en) * | 2019-09-16 | 2020-01-24 | 深圳市国信合成科技有限公司 | Local device calling method and device, storage medium and device |
Non-Patent Citations (1)
Title |
---|
OSC_PLL3H24T: "极客时间测试专栏阅读总结——软件测试总体方案", 《HTTPS://MY.OSCHINA.NET/U/4317749/BLOG/3294089》 * |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN108733738B (en) | Page loading method, system, server and terminal | |
CN105989841B (en) | Vehicle-mounted voice control method and device | |
EP3635524A1 (en) | Connecting multiple mobile devices to a smart home assistant account | |
US20200276707A1 (en) | Method and system for cloud-based programming and control of robotic platform | |
WO2015041932A1 (en) | Real-time code instrumentation | |
CN104598267B (en) | The tune of application plays method and device | |
CN112121411A (en) | Vibration control method, device, electronic equipment and computer readable storage medium | |
CN108965420A (en) | A kind of adjustment method of car-mounted terminal, device, equipment and storage medium | |
US11876854B2 (en) | Network browser engine | |
CN113608812A (en) | Remote control method, device, system and storage medium | |
CN113094613A (en) | Online programming system, online programming method and related product | |
CN112866312A (en) | Script generation method, remote operation method and related equipment | |
CN112463618A (en) | Automated testing method, device, medium and equipment | |
CN113709243B (en) | Equipment remote control method and device, electronic equipment and storage medium | |
US20210097787A1 (en) | Information presentation method and apparatus | |
US20070073843A1 (en) | Method and device for video projection | |
CN103685491B (en) | A kind of application service provides method, system and relevant device | |
CN107590062B (en) | Multi-client interaction testing method and device | |
CN111355783A (en) | Online education system based on browser driver | |
CN110442806B (en) | Method and apparatus for recognizing image | |
CN108897689B (en) | Embedded application program simulation debugging method and device and readable storage medium | |
CN111107100B (en) | Equipment for transmitting industrial protocol flow message | |
CN114281563A (en) | Application program reconstruction method and device | |
CN115705284A (en) | Automatic test system, method, equipment and medium | |
CN110324412B (en) | Ubiquitous sensor network experiment teaching system and experiment teaching method thereof |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
RJ01 | Rejection of invention patent application after publication | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20200630 |