CN112214712A - Automatic browser switching method and device, storage medium and electronic equipment - Google Patents

Automatic browser switching method and device, storage medium and electronic equipment Download PDF

Info

Publication number
CN112214712A
CN112214712A CN202011170298.2A CN202011170298A CN112214712A CN 112214712 A CN112214712 A CN 112214712A CN 202011170298 A CN202011170298 A CN 202011170298A CN 112214712 A CN112214712 A CN 112214712A
Authority
CN
China
Prior art keywords
browser
switching
component
browser switching
window handle
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
Application number
CN202011170298.2A
Other languages
Chinese (zh)
Inventor
徐达
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
New H3C Big Data Technologies Co Ltd
Original Assignee
New H3C Big Data Technologies Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by New H3C Big Data Technologies Co Ltd filed Critical New H3C Big Data Technologies Co Ltd
Priority to CN202011170298.2A priority Critical patent/CN112214712A/en
Publication of CN112214712A publication Critical patent/CN112214712A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/958Organisation or management of web site content, e.g. publishing, maintaining pages or automatic linking
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/957Browsing optimisation, e.g. caching or content distillation

Landscapes

  • Engineering & Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • User Interface Of Digital Computer (AREA)

Abstract

The invention discloses an automatic browser switching method, an automatic browser switching device, a storage medium and electronic equipment, wherein the method comprises the following steps: receiving a browser switching request; analyzing the browser switching request to generate a browser window name; loading a pre-configured browser switching component, and acquiring a window handle corresponding to the browser window name from a memory address of a current system according to a window handle acquisition component in the pre-configured browser switching component; calling a browser switching function from an application programming interface set of the current system according to a browser switching function calling component in the browser switching components which are configured in advance; and inputting the window handle into the browser switching function, and switching the currently displayed browser to the browser corresponding to the window handle based on the browser switching function of the input window handle. Therefore, by adopting the embodiment of the application, the operation complexity of the product can be reduced, and the user experience is improved.

Description

Automatic browser switching method and device, storage medium and electronic equipment
Technical Field
The present invention relates to the field of computer technologies, and in particular, to an automatic browser switching method and apparatus, a storage medium, and an electronic device.
Background
In daily work and project development, different browsers are used for project development, such as google Chrome browser, microsoft IE browser and FireFox browser, which are mainstream browsers. There are many other brands of browsers, but basically developed based on these three browser kernels, the core functions are similar. Because the three browser kernels have different functions, a product developed based on the browser often has a browser compatibility problem, for example, one product function can be opened by using Chrome and Firefox browsers, but IE does not support and cannot be opened.
For the problem of browser incompatibility, in the application of the actual project at present, because products are developed by different manufacturers, the situation that the product function A only supports an IE browser and the product B only supports a Chrome browser occurs. However, the product a and the product B have relevance and have the same control terminal, so that when the product a and the product B are used in a mixed manner, the function button needs to be clicked on the control terminal, and then the result can be seen only by manually switching the browser at the product use terminal.
Disclosure of Invention
The embodiment of the application provides an automatic browser switching method and device, a storage medium and electronic equipment. The following presents a simplified summary in order to provide a basic understanding of some aspects of the disclosed embodiments. This summary is not an extensive overview and is intended to neither identify key/critical elements nor delineate the scope of such embodiments. Its sole purpose is to present some concepts in a simplified form as a prelude to the more detailed description that is presented later.
In a first aspect, an embodiment of the present application provides an automatic browser switching method, which is applied to a product side, and the method includes:
receiving a browser switching request, wherein the browser switching request carries a browser window name;
analyzing the browser switching request to obtain a browser window name;
loading a pre-configured browser switching component, and acquiring a window handle corresponding to the browser window name from a memory address of a current system according to a window handle acquisition component in the pre-configured browser switching component;
calling a browser switching function from an application programming interface set of the current system according to a browser switching function calling component in the browser switching components which are configured in advance;
and inputting the window handle into the browser switching function, and switching the currently displayed browser to the browser corresponding to the window handle based on the browser switching function of the input window handle.
Optionally, after the browser switching function based on the input window handle switches the currently displayed browser to the browser corresponding to the window handle, the method further includes:
acquiring data information to be filled;
and filling the data information to be filled into the browser corresponding to the window handle for display to generate a display result, and sending the display result to the control end.
Optionally, before receiving the browser switching request, the method further includes:
when a browser switching component configuration instruction is received, a browser switching component which is integrated in advance is obtained;
and configuring the pre-integrated browser switching component to a product end to obtain the pre-configured browser switching component.
Optionally, before receiving the browser switching component configuration instruction, the method further includes:
creating a browser switching component;
adopting JNA frame technology to create a window handle acquisition component and a function calling component of a browser switching function;
integrating the window handle acquisition component and a function calling component of a browser switching function into a browser switching component to generate an integrated browser switching component;
and determining the integrated browser switching component as a pre-integrated browser switching component.
In a second aspect, an embodiment of the present application provides an automatic browser switching method, which is applied to a control end, and the method includes:
receiving a browser switching instruction, and generating a browser window name based on the browser switching instruction;
generating a browser switching request based on the browser window name;
and sending the browser switching request to a product end.
Optionally, after sending the browser switching request to the product end, the method further includes:
and when receiving the display result sent by the product end, displaying the display result.
In a third aspect, an embodiment of the present application provides an automatic switching apparatus for a browser, which is applied to a product side, and the apparatus includes:
the switching request receiving module is used for receiving a browser switching request, and the browser switching request carries a browser window name;
the switching request analysis module is used for analyzing the browser switching request to obtain a browser window name;
the switching component loading module is used for loading a pre-configured browser switching component and acquiring a window handle corresponding to the browser window name from a memory address of a current system according to a window handle acquiring component in the pre-configured browser switching component;
the interface calling module is used for calling a browser switching function from an application programming interface set of the current system according to a browser switching function calling component in the browser switching components which are configured in advance;
and the browser switching module is used for inputting the window handle into the browser switching function and switching the currently displayed browser to the browser corresponding to the window handle based on the browser switching function of the input window handle.
Optionally, the apparatus further comprises:
the information filling module is used for acquiring data information to be filled by a product end;
and the information display module is used for filling the data information to be filled into the browser corresponding to the window handle by the product side for display to generate a display result and sending the display result to the control end.
In a fourth aspect, embodiments of the present application provide a computer storage medium having stored thereon a plurality of instructions adapted to be loaded by a processor and to perform the above-mentioned method steps.
In a fifth aspect, an embodiment of the present application provides an electronic device, which may include: a processor and a memory; wherein the memory stores a computer program adapted to be loaded by the processor and to perform the above-mentioned method steps.
The technical scheme provided by the embodiment of the application can have the following beneficial effects:
in the embodiment of the application, the automatic browser switching device receives a browser switching request through a product end, loads a pre-configured browser switching component, analyzes the browser switching request through the product end to generate a browser window name, acquires a window handle corresponding to the browser window name according to the pre-configured browser switching component through the product end, calls an application programming interface, switches to a browser corresponding to the window handle through the product end based on the window handle and the application programming interface, acquires data information to be filled through the product end, fills the data information to be filled into the browser corresponding to the window handle through the product end to display to generate a display result, and sends the display result to a control end. According to the method and the device, the browser switching component is configured at the product end, when the product end receives the browser switching request, the browser corresponding to the browser switching request can be switched to in real time through the browser switching component configured in advance, and the browser is not required to be manually switched at the product end, so that the product operation complexity is reduced, and the user experience is improved.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the invention, as claimed.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and together with the description, serve to explain the principles of the invention.
Fig. 1 is a schematic diagram illustrating an automatic switching method applied to a browser on a product side according to an embodiment of the present application;
fig. 2 is a scene schematic diagram of an implementation scenario of automatic switching of a browser provided in an embodiment of the present application;
FIG. 3 is a process diagram of an automatic browser switching process provided in an embodiment of the present application;
fig. 4 is a schematic diagram illustrating another automatic switching method applied to a browser on a product side according to an embodiment of the present application;
fig. 5 is a schematic diagram illustrating an automatic switching method applied to a browser at a control end according to an embodiment of the present application;
fig. 6 is a schematic structural diagram of an automatic switching apparatus of a browser according to an embodiment of the present application;
fig. 7 is a schematic structural diagram of an automatic switching apparatus of a browser according to an embodiment of the present application;
fig. 8 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
The following description and the drawings sufficiently illustrate specific embodiments of the invention to enable those skilled in the art to practice them.
It should be understood that the described embodiments are only some embodiments of the invention, and not all 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.
When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present invention. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the invention, as detailed in the appended claims.
In the description of the present invention, it is to be understood that the terms "first," "second," and the like are used for descriptive purposes only and are not to be construed as indicating or implying relative importance. The specific meanings of the above terms in the present invention can be understood in specific cases to those skilled in the art. In addition, in the description of the present invention, "a plurality" means two or more unless otherwise specified. "and/or" describes the association relationship of the associated objects, meaning that there may be three relationships, e.g., a and/or B, which may mean: a exists alone, A and B exist simultaneously, and B exists alone. The character "/" generally indicates that the former and latter associated objects are in an "or" relationship.
To date, aiming at the problem of browser incompatibility, in the application of actual projects, since products are developed by different manufacturers, the situation that the product function a only supports an IE browser and the product B only supports a Chrome browser occurs. However, the product a and the product B have relevance and have the same control terminal, so that when the product a and the product B are used in a mixed manner, the function button needs to be clicked on the control terminal, and then the result can be seen only by manually switching the browser at the product use terminal. Therefore, the present application provides an automatic browser switching method, an automatic browser switching apparatus, a storage medium, and an electronic device, so as to solve the problems in the related art. According to the technical scheme, the browser switching component is configured at the product end, when the product end receives the browser switching request, the browser corresponding to the browser switching request can be switched to in real time through the browser switching component configured in advance, manual browser switching at the product end is omitted, the operation complexity of the product is reduced, the user experience degree is improved, and detailed description is carried out by adopting an exemplary embodiment.
The method for automatically switching browsers according to the embodiment of the present application will be described in detail below with reference to fig. 1 to 5. The method may be implemented in dependence on a computer program, operable on an automatic switching device for a browser based on the von neumann architecture. The computer program may be integrated into the application or may run as a separate tool-like application. The automatic switching device of the browser in the embodiment of the application may be an electronic device.
Referring to fig. 1, a flow chart of an automatic browser switching method according to an embodiment of the present application is provided, and is applied to a product side. As shown in fig. 1, the method of the embodiment of the present application may include the following steps:
s101, receiving a browser switching request, wherein the browser switching request carries a browser window name;
the product end is a user terminal which actually runs the functions of the project products, the browsers mainly comprise a google Chrome browser, a microsoft IE browser and a FireFox browser and are used for displaying the functions of the project products, and the browser switching request is a request message sent by the control end. The message carries the name of the browser window.
S102, analyzing the browser switching request to obtain a browser window name;
for example, the control end has two web pages respectively showing two different scenes, i.e., a scene one supported to be opened in a browser one (e.g., a Chrom browser), and a scene two supported to be opened only in a browser two (e.g., an IE browser) due to development technology limitations. When the scene one is switched to the scene two, which is displayed currently, the two scenes are in different browsers, so that the scenes cannot be switched through the jump of the front-end page. Therefore, the method in the embodiment of the application can realize automatic switching to the scene two.
In a possible implementation manner, after the product end receives the browser switching request in step S101, the product end parses the browser switching request, and extracts the name of the browser window to be switched from the browser switching request.
S103, loading a pre-configured browser switching component, and acquiring a window handle corresponding to the browser window name from a memory address of a current system according to a window handle acquisition component in the pre-configured browser switching component;
the browser switching component is a program which is configured to the product end in advance and is used for triggering the browser switching function. The handle refers to the identification of an object, and the window handle is the identification of an operation window in the Windows system.
Generally, the control end and the product end are connected through a wire or a wireless manner, the product function of the product end can be remotely checked, and the integrated browser switching component and the configuration browser switching component are further included before the product end receives a browser switching request.
Specifically, when the browser switching component is created, the browser switching component is created according to a programming language, a jna (java Native access) framework technology is adopted to create a window handle acquisition component and a browser switching function calling component, the window handle acquisition component and the browser switching function calling component are integrated into the browser switching component to generate an integrated browser switching component, and finally the integrated browser switching component is determined to be a pre-integrated browser switching component.
Specifically, when the browser switching component is configured, firstly, a user generates a configuration instruction when the user performs configuration through a terminal button, then, when the user terminal receives the browser switching component configuration instruction, the pre-integrated browser switching component is obtained, and finally, the pre-integrated browser switching component is configured to a product end, so that the pre-configured browser switching component is obtained. For example, after the browser switching component is created through a JAVA programming language, a jar package of the JNA is introduced into a maven warehouse for managing the jar package of the browser switching component program, the introduced process is called integration, the browser switching component program can call a method in the JNA after the integration, and the browser switching function is realized through the calling method.
In a possible implementation manner, firstly, a user checks the product function of the product end through the control end, when the product function needs another browser to be opened, because the control end is provided with two control buttons corresponding to two product functions, when the user wants to switch from the first scene to the second scene, clicking a button corresponding to a second scene on the control end, generating a browser switching request by the control end based on the browser name corresponding to the second scene, sending the browser switching request to the product end by the control end in an http request manner, receiving the browser switching request by the product end, loading a browser switching component configured in the product end in advance after the product end receives a browser switching request, and acquiring a window handle corresponding to the name of a browser window from a memory address of a current system according to a window handle acquisition component in the browser switching component configured in advance; .
S104, calling a browser switching function from an application programming interface set of the current system according to a browser switching function calling component in the pre-configured browser switching component;
the Application Programming Interface is a Win32 API of the current terminal, and the Win32 API is an Application Programming Interface (Application Programming Interface) of a Microsoft 32-bit platform.
In a possible implementation manner, after the name of the browser window to be switched is obtained according to step S102, the browser switching component may call a method function corresponding to a JNA program of a window handle acquisition component integrated inside the browser switching component, the method function corresponding to the JNA program acquires the window handle corresponding to the window name according to the window name parameter, and finally, the browser switching function is called from the application programming interface set of the current system according to a browser switching function calling component in the browser switching component configured in advance.
For example, as shown in fig. 2, fig. 2 is a scene schematic diagram of a real-time scene provided in an embodiment of the present application, the schematic diagram includes a product end and a control end, the product end and the control end are connected by a wire or a wireless, a user operates a product function of the product end through the control end, it is found during operation that the product function of the product end needs to be switched to another browser to complete a function page display, at this time, a message including a name of the switched browser is sent to the control end through the control end (step 1), the control end completes browser switching at the product end through a browser switching program configured in advance (step 2), and after switching, data is filled and sent to the control end (step 3).
S104, inputting the window handle into the browser switching function, and switching the currently displayed browser to the browser corresponding to the window handle based on the browser switching function of the input window handle;
in a possible implementation manner, after the window handle corresponding to the browser window name is acquired based on step S103 and the application programming interface is called, the window handle is used as a parameter of the application programming interface, the application programming interface inputs the parameter into its own method function to complete the switching operation of the browser, after the switching is completed, the product end acquires data from the database and fills the data into the page of the switched browser to display the data to generate a display result, and finally the display result is sent to the control end.
Further, the control end receives the display result sent by the product end and displays the display result to the user.
For example, as shown in fig. 3, fig. 3 is a schematic diagram of a switching process of automatic switching of a browser provided in an embodiment of the present application, where a control end first sends an http request for switching the browser to a product end, the product end receives the switching request and loads a browser switching program (the browser switching program is developed by Java and integrates jna framework technology), and the product end then calls a Win32 API to obtain a window handle of the product end corresponding to the browser, and then controls the corresponding browser to be switched to a display through the handle, so as to achieve a dynamic switching effect.
In the embodiment of the application, the automatic browser switching device receives a browser switching request through a product end, loads a pre-configured browser switching component, analyzes the browser switching request through the product end to generate a browser window name, acquires a window handle corresponding to the browser window name according to the pre-configured browser switching component through the product end, calls an application programming interface, switches to a browser corresponding to the window handle through the product end based on the window handle and the application programming interface, acquires data information to be filled through the product end, fills the data information to be filled into the browser corresponding to the window handle through the product end to display to generate a display result, and sends the display result to a control end. According to the method and the device, the browser switching component is configured at the product end, when the product end receives the browser switching request, the browser corresponding to the browser switching request can be switched to in real time through the browser switching component configured in advance, and the browser is not required to be manually switched at the product end, so that the product operation complexity is reduced, and the user experience is improved.
Please refer to fig. 4, which is a flowchart illustrating an automatic browser switching method according to an embodiment of the present disclosure. The present embodiment is exemplified by applying the automatic switching method of the browser to the electronic device. The automatic switching method of the browser can comprise the following steps:
s201, a control end receives a browser switching instruction and generates a browser window name based on the browser switching instruction;
s202, the control end generates a browser switching request based on the browser window name;
s203, the control end sends the browser switching request to the product end;
s204, a product end receives a browser switching request, wherein the browser switching request carries a browser window name;
s205, the product side analyzes the browser switching request to generate a browser window name;
s206, loading a browser switching component configured in advance by the product, and acquiring a window handle corresponding to the browser window name from a memory address of a current system according to a window handle acquiring component in the browser switching component configured in advance;
s207, the product side calls a browser switching function from an application programming interface set of the current system according to a browser switching function calling component in the pre-configured browser switching component;
s208, inputting the window handle into the browser switching function, and switching the currently displayed browser to the browser corresponding to the window handle based on the browser switching function of the input window handle;
s209, the product side acquires data information to be filled;
s210, the product side fills the data information to be filled into a browser corresponding to the window handle for display to generate a display result, and sends the display result to the control side;
and S211, when the control end receives the display result sent by the product end, displaying the display result.
In the embodiment of the application, the automatic browser switching device receives a browser switching request through a product end, loads a pre-configured browser switching component, analyzes the browser switching request through the product end to generate a browser window name, acquires a window handle corresponding to the browser window name according to the pre-configured browser switching component through the product end, calls an application programming interface, switches to a browser corresponding to the window handle through the product end based on the window handle and the application programming interface, acquires data information to be filled through the product end, fills the data information to be filled into the browser corresponding to the window handle through the product end to display to generate a display result, and sends the display result to a control end. According to the method and the device, the browser switching component is configured at the product end, when the product end receives the browser switching request, the browser corresponding to the browser switching request can be switched to in real time through the browser switching component configured in advance, and the browser is not required to be manually switched at the product end, so that the product operation complexity is reduced, and the user experience is improved.
Referring to fig. 5, a flow chart of an automatic browser switching method according to an embodiment of the present application is provided, and is applied to a control end. As shown in fig. 5, the method of the embodiment of the present application may include the following steps:
s301, receiving a browser switching instruction, and generating a browser window name based on the browser switching instruction;
s302, generating a browser switching request based on the browser window name;
and S303, sending the browser switching request to a product side.
In the embodiment of the application, a user firstly checks product functions at a control end, when a certain product function node needs to be switched to a browser, the control end clicks a browser switching button under the function node to generate a browser switching instruction, receives the browser switching instruction, generates a name of a browser to be switched based on the browser switching instruction, generates a browser switching request based on the browser switching name, and finally sends the browser switching request to the product end, so that the browser at the product end can be controlled to be automatically switched through the control end, and the user experience is improved.
The following are embodiments of the apparatus of the present invention that may be used to perform embodiments of the method of the present invention. For details which are not disclosed in the embodiments of the apparatus of the present invention, reference is made to the embodiments of the method of the present invention.
Referring to fig. 6, a schematic structural diagram of an automatic switching apparatus of a browser according to an exemplary embodiment of the present invention is shown. The automatic switching device of the browser can be realized by software, hardware or a combination of the two into all or part of the electronic equipment. The device 1 comprises a switching component loading module 10, a window name generating module 20, an interface calling module 30 and a browser switching module 40.
The switching component loading module 10 is used for receiving a browser switching request by a product end and loading a browser switching component configured in advance;
the window name generating module 20 is used for the product side to analyze the browser switching request to generate a browser window name;
the interface calling module 30 is used for the product side to obtain a window handle corresponding to the browser window name according to a pre-configured browser switching component and call an application programming interface;
and the browser switching module 40 is used for switching the product end to the browser corresponding to the window handle based on the window handle and the application programming interface.
Optionally, as shown in fig. 7, the apparatus 1 further includes:
the information filling module 50 is used for the product side to obtain the data information to be filled;
and the information display module 60 is configured to fill the data information to be filled into the browser corresponding to the window handle for display by the product side to generate a display result, and send the display result to the control side.
It should be noted that, when the automatic switching apparatus for a browser provided in the foregoing embodiment executes an automatic switching method for a browser, the division of each function module is merely used as an example, and in practical applications, the function distribution may be completed by different function modules according to needs, that is, the internal structure of the device may be divided into different function modules to complete all or part of the functions described above. In addition, the automatic switching device of the browser and the automatic switching method of the browser provided by the above embodiments belong to the same concept, and the embodiment of the method embodies the implementation process, and is not described herein again.
The above-mentioned serial numbers of the embodiments of the present application are merely for description and do not represent the merits of the embodiments.
In the embodiment of the application, the automatic browser switching device receives a browser switching request through a product end, loads a pre-configured browser switching component, analyzes the browser switching request through the product end to generate a browser window name, acquires a window handle corresponding to the browser window name according to the pre-configured browser switching component through the product end, calls an application programming interface, switches to a browser corresponding to the window handle through the product end based on the window handle and the application programming interface, acquires data information to be filled through the product end, fills the data information to be filled into the browser corresponding to the window handle through the product end to display to generate a display result, and sends the display result to a control end. According to the method and the device, the browser switching component is configured at the product end, when the product end receives the browser switching request, the browser corresponding to the browser switching request can be switched to in real time through the browser switching component configured in advance, and the browser is not required to be manually switched at the product end, so that the product operation complexity is reduced, and the user experience is improved.
The invention also provides a computer readable medium, on which program instructions are stored, and the program instructions, when executed by a processor, implement the automatic switching method of the browser provided by the above method embodiments.
The present invention also provides a computer program product containing instructions which, when run on a computer, cause the computer to perform the method for automatic switching of a browser of the above-described method embodiments.
Please refer to fig. 8, which is a schematic structural diagram of an electronic device applied to a product end according to an embodiment of the present disclosure. As shown in fig. 8, the electronic device 1000 may include: at least one processor 1001, at least one network interface 1004, a user interface 1003, memory 1005, at least one communication bus 1002.
Wherein a communication bus 1002 is used to enable connective communication between these components.
The user interface 1003 may include a Display screen (Display) and a Camera (Camera), and the optional user interface 1003 may also include a standard wired interface and a wireless interface.
The network interface 1004 may optionally include a standard wired interface, a wireless interface (e.g., WI-FI interface), among others.
Processor 1001 may include one or more processing cores, among other things. The processor 1001 interfaces various components throughout the electronic device 1000 using various interfaces and lines to perform various functions of the electronic device 1000 and to process data by executing or executing instructions, programs, code sets, or instruction sets stored in the memory 1005 and invoking data stored in the memory 1005. Alternatively, the processor 1001 may be implemented in at least one hardware form of Digital Signal Processing (DSP), Field-Programmable Gate Array (FPGA), and Programmable Logic Array (PLA). The processor 1001 may integrate one or more of a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), a modem, and the like. Wherein, the CPU mainly processes an operating system, a user interface, an application program and the like; the GPU is used for rendering and drawing the content required to be displayed by the display screen; the modem is used to handle wireless communications. It is understood that the modem may not be integrated into the processor 1001, but may be implemented by a single chip.
The Memory 1005 may include a Random Access Memory (RAM) or a Read-Only Memory (Read-Only Memory). Optionally, the memory 1005 includes a non-transitory computer-readable medium. The memory 1005 may be used to store an instruction, a program, code, a set of codes, or a set of instructions. The memory 1005 may include a stored program area and a stored data area, wherein the stored program area may store instructions for implementing an operating system, instructions for at least one function (such as a touch function, a sound playing function, an image playing function, etc.), instructions for implementing the various method embodiments described above, and the like; the storage data area may store data and the like referred to in the above respective method embodiments. The memory 1005 may optionally be at least one memory device located remotely from the processor 1001. As shown in fig. 8, a memory 1005, which is a kind of computer storage medium, may include therein an operating system, a network communication module, a user interface module, and an auto-switching application of a browser.
In the electronic device 1000 shown in fig. 8, the user interface 1003 is mainly used as an interface for providing input for a user, and acquiring data input by the user; and the processor 1001 may be configured to call an auto-switching application of the browser stored in the memory 1005, and specifically perform the following operations:
receiving a browser switching request, wherein the browser switching request carries a browser window name;
analyzing the browser switching request to obtain a browser window name;
loading a pre-configured browser switching component, and acquiring a window handle corresponding to the browser window name from a memory address of a current system according to a window handle acquisition component in the pre-configured browser switching component;
calling a browser switching function from an application programming interface set of the current system according to a browser switching function calling component in the browser switching components which are configured in advance;
inputting the window handle into the browser switching function, and switching the currently displayed browser to the browser corresponding to the window handle based on the browser switching function of the input window handle;
acquiring data information to be filled;
and filling the data information to be filled into the browser corresponding to the window handle for display to generate a display result, and sending the display result to the control end.
In one embodiment, after executing the browser switching function based on the input window handle to switch the currently displayed browser to the browser corresponding to the window handle, the processor 1001 further performs the following operations:
acquiring data information to be filled;
and filling the data information to be filled into the browser corresponding to the window handle for display to generate a display result, and sending the display result to the control end.
In one embodiment, the processor 1001, when performing the receiving the browser switching request, further performs the following:
when a browser switching component configuration instruction is received, a browser switching component which is integrated in advance is obtained;
and the product end configures a pre-integrated browser switching component to the product end to obtain a pre-configured browser switching component.
In one embodiment, the processor 1001, prior to executing when receiving the browser switching component configuration instruction, further performs the following:
creating a browser switching component;
adopting JNA frame technology to create a window handle acquisition component;
integrating the window handle acquisition component into a browser switching component to generate an integrated browser switching component;
and determining the integrated browser switching component as a pre-integrated browser switching component.
In the embodiment of the application, the automatic browser switching device receives a browser switching request through a product end, loads a pre-configured browser switching component, analyzes the browser switching request through the product end to generate a browser window name, acquires a window handle corresponding to the browser window name according to the pre-configured browser switching component through the product end, calls an application programming interface, switches to a browser corresponding to the window handle through the product end based on the window handle and the application programming interface, acquires data information to be filled through the product end, fills the data information to be filled into the browser corresponding to the window handle through the product end to display to generate a display result, and sends the display result to a control end. According to the method and the device, the browser switching component is configured at the product end, when the product end receives the browser switching request, the browser corresponding to the browser switching request can be switched to in real time through the browser switching component configured in advance, and the browser is not required to be manually switched at the product end, so that the product operation complexity is reduced, and the user experience is improved.
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 hardware that is related to instructions of a computer program, and the program 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 or a random access memory.
The above disclosure is only for the purpose of illustrating the preferred embodiments of the present application and is not to be construed as limiting the scope of the present application, so that the present application is not limited thereto, and all equivalent variations and modifications can be made to the present application.

Claims (10)

1. An automatic browser switching method is applied to a product side, and is characterized by comprising the following steps:
receiving a browser switching request, wherein the browser switching request carries a browser window name;
analyzing the browser switching request to obtain a browser window name;
loading a pre-configured browser switching component, and acquiring a window handle corresponding to the browser window name from a memory address of a current system according to a window handle acquisition component in the pre-configured browser switching component;
calling a browser switching function from an application programming interface set of the current system according to a browser switching function calling component in the browser switching components which are configured in advance;
and inputting the window handle into the browser switching function, and switching the currently displayed browser to the browser corresponding to the window handle based on the browser switching function of the input window handle.
2. The method according to claim 1, wherein after the browser switching function based on the input window handle switches the currently displayed browser to the browser corresponding to the window handle, further comprising:
acquiring data information to be filled;
and filling the data information to be filled into a browser corresponding to the window handle for display to generate a display result, and sending the display result to a control end.
3. The method of claim 1, wherein before receiving the browser switching request, further comprising:
when a browser switching component configuration instruction is received, a browser switching component which is integrated in advance is obtained;
and configuring the pre-integrated browser switching component to a product end to obtain a pre-configured browser switching component.
4. The method of claim 3, wherein prior to when receiving a browser switching component configuration instruction, further comprising:
creating a browser switching component;
adopting JNA frame technology to create a window handle acquisition component and a function calling component of a browser switching function;
integrating the window handle acquisition component and a function calling component of a browser switching function into the browser switching component to generate an integrated browser switching component;
and determining the integrated browser switching component as a pre-integrated browser switching component.
5. An automatic browser switching method is applied to a control end, and is characterized by comprising the following steps:
receiving a browser switching instruction, and generating a browser window name based on the browser switching instruction;
generating a browser switching request based on the browser window name;
and sending the browser switching request to a product end.
6. The method of claim 5, wherein after sending the browser switching request to the product side, further comprising:
and when receiving a display result sent by the product end, displaying the display result.
7. An automatic switching device of a browser is applied to a product end, and is characterized in that the device comprises:
the switching request receiving module is used for receiving a browser switching request, and the browser switching request carries a browser window name;
the switching request analysis module is used for analyzing the browser switching request to obtain a browser window name;
the switching component loading module is used for loading a pre-configured browser switching component and acquiring a window handle corresponding to the browser window name from a memory address of a current system according to a window handle acquiring component in the pre-configured browser switching component;
the interface calling module is used for calling a browser switching function from an application programming interface set of the current system according to a browser switching function calling component in the browser switching components which are configured in advance;
and the browser switching module is used for inputting the window handle into the browser switching function and switching the currently displayed browser to the browser corresponding to the window handle based on the browser switching function of the input window handle.
8. The apparatus of claim 7, further comprising:
the information filling module is used for acquiring data information to be filled by a product end;
and the information display module is used for filling the data information to be filled into the browser corresponding to the window handle by the product side for display to generate a display result and sending the display result to the control side.
9. A computer storage medium, characterized in that it stores a plurality of instructions adapted to be loaded by a processor and to perform the method steps according to any of claims 1 to 6.
10. An electronic device, comprising: a processor and a memory; wherein the memory stores a computer program adapted to be loaded by the processor and to perform the method steps of any of claims 1 to 6.
CN202011170298.2A 2020-10-28 2020-10-28 Automatic browser switching method and device, storage medium and electronic equipment Pending CN112214712A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011170298.2A CN112214712A (en) 2020-10-28 2020-10-28 Automatic browser switching method and device, storage medium and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011170298.2A CN112214712A (en) 2020-10-28 2020-10-28 Automatic browser switching method and device, storage medium and electronic equipment

Publications (1)

Publication Number Publication Date
CN112214712A true CN112214712A (en) 2021-01-12

Family

ID=74057244

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011170298.2A Pending CN112214712A (en) 2020-10-28 2020-10-28 Automatic browser switching method and device, storage medium and electronic equipment

Country Status (1)

Country Link
CN (1) CN112214712A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112883309A (en) * 2021-02-24 2021-06-01 江苏保旺达软件技术有限公司 Method, device, equipment and medium for accessing application through browser

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1881883A (en) * 2005-06-17 2006-12-20 株式会社Ntt都科摩 Communication apparatus and browser switching method
US20110258562A1 (en) * 2010-04-14 2011-10-20 Microsoft Corporation Cross-browser web dialog platform
CN102915366A (en) * 2012-10-25 2013-02-06 北京奇虎科技有限公司 Method and device for loading webpage on browser
CN103488508A (en) * 2013-09-18 2014-01-01 贝壳网际(北京)安全技术有限公司 Browser working method, browser and terminal equipment
US20150161277A1 (en) * 2011-03-14 2015-06-11 Browsium, Inc. Methods and systems for one browser version to use a rendering engine of another browser version for displaying information
CN104881318A (en) * 2015-05-07 2015-09-02 北京金山安全软件有限公司 Interface calling method and device and terminal
US20160094613A1 (en) * 2014-09-29 2016-03-31 D2L Corporation Method and system for determining browser compatibility
CN110889066A (en) * 2018-08-16 2020-03-17 广州金山移动科技有限公司 Method and device for opening webpage in client software and electronic equipment
US10733260B1 (en) * 2019-05-03 2020-08-04 Microsoft Technology Licensing, Llc Page display by hosted browser within controlling browser

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1881883A (en) * 2005-06-17 2006-12-20 株式会社Ntt都科摩 Communication apparatus and browser switching method
US20110258562A1 (en) * 2010-04-14 2011-10-20 Microsoft Corporation Cross-browser web dialog platform
US20150161277A1 (en) * 2011-03-14 2015-06-11 Browsium, Inc. Methods and systems for one browser version to use a rendering engine of another browser version for displaying information
CN102915366A (en) * 2012-10-25 2013-02-06 北京奇虎科技有限公司 Method and device for loading webpage on browser
CN103488508A (en) * 2013-09-18 2014-01-01 贝壳网际(北京)安全技术有限公司 Browser working method, browser and terminal equipment
US20160094613A1 (en) * 2014-09-29 2016-03-31 D2L Corporation Method and system for determining browser compatibility
CN104881318A (en) * 2015-05-07 2015-09-02 北京金山安全软件有限公司 Interface calling method and device and terminal
CN110889066A (en) * 2018-08-16 2020-03-17 广州金山移动科技有限公司 Method and device for opening webpage in client software and electronic equipment
US10733260B1 (en) * 2019-05-03 2020-08-04 Microsoft Technology Licensing, Llc Page display by hosted browser within controlling browser

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112883309A (en) * 2021-02-24 2021-06-01 江苏保旺达软件技术有限公司 Method, device, equipment and medium for accessing application through browser
CN112883309B (en) * 2021-02-24 2024-05-28 江苏保旺达软件技术有限公司 Method, device, equipment and medium for accessing application through browser

Similar Documents

Publication Publication Date Title
CN108733738B (en) Page loading method, system, server and terminal
CN111433743B (en) APP remote control method and related equipment
CN106997298B (en) Application resource acquisition method and device
CN109683892B (en) Page display method and device, computer equipment and storage medium
EP2854348A1 (en) Interface display method and system of home gateway applicable to multiple display types
US10768947B2 (en) Method for interface refresh synchronization,terminal device, and non-transitory computer-readable storage medium
CN112307403A (en) Page rendering method, device, storage medium and terminal
CN108345683B (en) Webpage display method, device, terminal and storage medium
CN111240776B (en) Dynamic wallpaper setting method and device, storage medium and electronic equipment
CN111367518A (en) Page layout method and device, computing equipment and computer storage medium
CN112214712A (en) Automatic browser switching method and device, storage medium and electronic equipment
CN112948018B (en) Dynamic library loading method, device, equipment and medium for applet
CN108228139B (en) Singlechip development system and device based on HTML5 browser frame
CN106383705B (en) Method and device for setting mouse display state in application thin client
CN116644252A (en) Page loading method and device, electronic equipment and storage medium
CN115878226A (en) H5 offline package loading method and device
CN108156534B (en) Method and device for generating demonstration application and computer readable storage medium
CN111913711B (en) Video rendering method and device
CN111538553B (en) Dual-core Web desktop application access processing method and device and storage medium
CN113760253A (en) Front-end rendering method, apparatus, device, medium, and program product
CN112328940A (en) Method and device for embedding transition page into webpage, computer equipment and storage medium
CN114896018B (en) BMC application interface language switching method, device and medium
CN114265589A (en) Dynamic updating method and device of page data, storage medium and terminal
CN116049020B (en) Automatic test method, device and equipment for software products and readable storage medium
CN111078209B (en) Development processing method, device and equipment for business page

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: 20210112