Webpage switching method and device, electronic equipment and readable storage medium
By installing a browser plug-in in the browser that displays all environment switching interfaces, the complexity of switching between platforms is solved, fast and convenient environment switching is achieved, and maintenance costs are reduced.
Patent Information
- Application Number
- CN202410754021.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-12
- Publication Date
- 2024-08-23
AI Technical Summary
Switching between different environments on the existing platform is too complicated and inconvenient to operate. Especially due to data privacy and compliance requirements, switching entrances to other areas cannot be directly displayed on the browser page.
By installing a browser plug-in in the browser, the plug-in displays all the environment switching interfaces of the platform it belongs to, and after receiving the web page switching instructions, calls the browser's switching interface to switch the current browser page to the target environment.
It realizes rapid switching between different environments within the same platform, simplifies the operation process, avoids switching complexity caused by data privacy and compliance requirements, and reduces platform maintenance costs.
Smart Images

Figure CN118535824A
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of web page processing, and in particular to a web page switching method, device, electronic device and readable storage medium. Background Art
[0002] For a platform that serves as a computer hardware or software operating environment, the platform provides different environments according to different services. Therefore, it is also necessary to switch between different environments or areas in the platform according to different services.
[0003] The existing platforms switch between different environments mostly through the fixed drop-down options of the platform to access the web page of the target environment. However, due to data privacy and compliance requirements, the switching entrances of other areas cannot be directly displayed on the browser page, making the switching between different environments in the platform complicated and inconvenient. Summary of the invention
[0004] In view of this, the embodiments of the present invention provide a web page switching method, device, electronic device and readable storage medium to solve the problem that switching between different environments in a platform is too complicated and inconvenient to operate.
[0005] According to one aspect of the present invention, there is provided a web page switching method, comprising:
[0006] Receiving a webpage switching instruction based on a browser plug-in in a current browser page, wherein the webpage switching instruction is an instruction for switching between environments under a platform to which the current browser page belongs, and the browser plug-in is a program installed by a browser that loads the current browser page and used for rendering and displaying all environments corresponding to the platform to which the browser plug-in belongs, and the browser plug-in displays in the current browser page a switching interface for all environments under the platform to which the current browser page belongs;
[0007] The switching interface of the browser is called to switch the current browser page to a target environment web page corresponding to the web page switching instruction.
[0008] Optionally, before receiving the webpage switching instruction based on the browser plug-in in the current browser page, the method further includes:
[0009] Receiving a loading instruction for loading the current browser page;
[0010] Loading a browser plug-in stored in an internal server of the browser, and obtaining configuration information of the browser plug-in, wherein the configuration information is a list of domains capable of running the browser plug-in;
[0011] Obtain the domain to which the current browser page belongs;
[0012] Determine whether the domain to which the current browser page belongs matches the domain list in the configuration information;
[0013] In the case that the domain to which the current browser page belongs matches the domain list in the configuration information, the browser plug-in obtains the environment list data of the platform to which the current browser page belongs, and renders and displays it on the current browser page;
[0014] In the case that the domain to which the current browser page belongs does not match the domain list in the configuration information, the browser plug-in is not displayed in the current browser page.
[0015] Optionally, before receiving the loading instruction to load the current browser page, the method further includes:
[0016] Receiving file information of the browser plug-in;
[0017] Packaging the file information of the browser plug-in according to the browser plug-in rules set in the browser, and uploading the packed file information of the browser plug-in to the internal server of the browser;
[0018] Receiving a download instruction for downloading the browser plug-in;
[0019] Decompress the file information of the browser plug-in, install the browser plug-in in a storage location corresponding to the browser, and add the browser plug-in to an extension program list of the browser.
[0020] Optionally, before receiving the webpage switching instruction based on the browser plug-in in the current browser page, the method includes:
[0021] Determine the target environment corresponding to the current browser page in the corresponding platform;
[0022] Receiving selection information of other environments under the platform except the target environment acquired by the browser plug-in;
[0023] The webpage switching instruction for switching the current browser webpage to the target environment webpage is generated according to the selection information.
[0024] According to a second aspect of the present invention, there is provided a webpage switching device, comprising:
[0025] A first receiving module is used to receive a webpage switching instruction based on a browser plug-in in a current browser page, wherein the webpage switching instruction is a switching instruction between various environments under the platform to which the current browser page belongs, and the browser plug-in is a program installed by a browser that loads the current browser page and used to render and display all environments corresponding to the platform to which it belongs, and the browser plug-in displays in the current browser page a switching interface for all environments under the platform to which the current browser page belongs;
[0026] The first processing module is used to call the switching interface of the browser to switch the current browser page to a target environment web page corresponding to the web page switching instruction.
[0027] Optionally, the webpage switching device further includes:
[0028] A second receiving module, used to receive a loading instruction for loading the current browser page;
[0029] A second processing module is used to load the browser plug-in stored in the internal server of the browser and obtain configuration information of the browser plug-in, where the configuration information is a list of domains that can run the browser plug-in;
[0030] A third processing module is used to obtain the domain to which the current browser page belongs;
[0031] A fourth processing module, used to determine whether the domain to which the current browser page belongs matches the domain list in the configuration information;
[0032] A fifth processing module, configured to, when the domain to which the current browser page belongs matches the domain list in the configuration information, cause the browser plug-in to obtain environment list data of the platform to which the current browser page belongs, and render and display it on the current browser page;
[0033] The sixth processing module is used to prevent the browser plug-in from being displayed in the current browser page when the domain to which the current browser page belongs does not match the domain list in the configuration information.
[0034] Optionally, the webpage switching device further includes:
[0035] A third receiving module, used to receive file information of the browser plug-in;
[0036] A seventh processing module, configured to package the file information of the browser plug-in according to the browser plug-in rule set in the browser, and upload the packaged file information of the browser plug-in to the internal server of the browser;
[0037] A fourth receiving module, used to receive a download instruction for downloading the browser plug-in;
[0038] The eighth processing module is used to decompress the file information of the browser plug-in, install the browser plug-in in a storage location corresponding to the browser, and add the browser plug-in to the extension program list of the browser.
[0039] Optionally, the webpage switching device further includes:
[0040] A ninth processing module, used to determine a target environment corresponding to the current browser page in the corresponding platform;
[0041] A fifth receiving module, used for receiving selection information of other environments under the platform except the target environment acquired by the browser plug-in;
[0042] The tenth processing module is used to generate the webpage switching instruction for switching the current browser webpage to the target environment webpage according to the selection information.
[0043] According to a third aspect of the present invention, there is provided an electronic device, comprising:
[0044] Processor; and
[0045] Memory for storing programs,
[0046] The program includes instructions, and when the instructions are executed by a processor, the processor executes any one of the methods according to the first aspect of the present invention.
[0047] According to a fourth aspect of the present invention, there is provided a non-transitory computer-readable storage medium storing computer instructions, wherein the computer instructions are used to cause a computer to execute any method according to the first aspect of the present invention.
[0048] One or more technical solutions provided in the embodiments of the present invention install a browser plug-in capable of displaying all environments corresponding to the platform to which it belongs in the browser that loads the current browser page, and the browser plug-in displays the switching interface of all environments under the platform to which it belongs in the current browser page. The setting of the browser plug-in is independent of the current browser page, so that the current browser page is not affected, and the display of the switching interface of all environments under the platform to which the current browser page belongs is realized. After receiving the webpage switching instruction through the browser plug-in, the switching interface of the browser is called to switch the current browser page to the target environment webpage. BRIEF DESCRIPTION OF THE DRAWINGS
[0049] Further details, features and advantages of the invention are disclosed in the following description of exemplary embodiments in conjunction with the accompanying drawings, in which:
[0050] Figure 1A flow chart of a web page switching method according to an exemplary embodiment of the present invention is shown;
[0051] Figure 2 A current browser page display diagram according to an exemplary embodiment of the present invention is shown;
[0052] Figure 3 A schematic block diagram of a web page switching device according to an exemplary embodiment of the present invention is shown;
[0053] Figure 4 A block diagram of an exemplary electronic device that can be used to implement an embodiment of the present invention is shown. DETAILED DESCRIPTION
[0054] Embodiments of the present invention will be described in more detail below with reference to the accompanying drawings. Although certain embodiments of the present invention are shown in the accompanying drawings, it should be understood that the present invention can be implemented in various forms and should not be construed as being limited to the embodiments described herein, which are instead provided for a more thorough and complete understanding of the present invention. It should be understood that the drawings and embodiments of the present invention are only for exemplary purposes and are not intended to limit the scope of protection of the present invention.
[0055] It should be understood that the various steps described in the method embodiments of the present invention may be performed in different orders and / or in parallel. In addition, the method embodiments may include additional steps and / or omit the steps shown. The scope of the present invention is not limited in this respect.
[0056] The term "including" and its variations used in this document are open inclusions, that is, "including but not limited to". The term "based on" means "based at least in part on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one other embodiment"; the term "some embodiments" means "at least some embodiments". Relevant definitions of other terms will be given in the following description. It should be noted that the concepts of "first", "second", etc. mentioned in the present invention are only used to distinguish different devices, modules or units, and are not used to limit the order or interdependence of the functions performed by these devices, modules or units.
[0057] It should be noted that the modifications of "one" and "plurality" mentioned in the present invention are illustrative rather than restrictive, and those skilled in the art should understand that, unless otherwise clearly indicated in the context, it should be understood as "one or more".
[0058] The names of the messages or information exchanged between multiple devices in the embodiments of the present invention are only used for illustrative purposes, and are not used to limit the scope of these messages or information.
[0059] The solution of the present invention is described below with reference to the accompanying drawings, and the technical solution provided by the embodiment of the present invention is explained in detail through specific embodiments and their application scenarios.
[0060] According to the various functions of the platform, the platform has several function pages corresponding to the functions, and each function page is called an environment of the platform. Taking most cloud management and control platforms as an example, the web page switching is based on the navigation button in the current browser page to achieve the purpose of quickly accessing various environments under the platform. The second is to pre-collect the URLs of different environments in the browser bookmarks, and select the target environment in the bookmark list to achieve the purpose of switching the platform environment.
[0061] However, due to data privacy requirements of some web pages, the interface for switching to other environments cannot be directly displayed on the web page, so the only way to switch between different environments is to use bookmarks. This switching method is relatively complicated to operate, and for different platforms, different environments need to be classified and collected in bookmarks, and the target environment cannot be found in the bookmarks intuitively and quickly. However, if the platform is modified to facilitate the environment switching operation of such web pages, the maintenance cost of the platform will increase.
[0062] In view of this, the present invention provides a web page switching method, device, electronic device and readable storage medium, wherein the web page switching method is applied to any electronic device with a web page switching function, and the electronic device includes but is not limited to: personal mobile terminal equipment, computer or server equipment, etc.
[0063] like Figure 1 As shown, Figure 1 1 is a flow chart of a web page switching method provided by an embodiment of the present invention. The web page switching method may include the following steps S101 to S102:
[0064] S101, receiving a web page switching instruction based on a browser plug-in in a current browser page, wherein the web page switching instruction is a switching instruction between various environments under the platform to which the current browser page belongs, and the browser plug-in is a program installed in the browser that loads the current browser page for rendering and displaying all environments corresponding to the platform to which it belongs. The browser plug-in displays in the current browser page a switching interface for all environments under the platform to which the current browser page belongs.
[0065] As an implementation method, for the same platform, each platform includes different environment types, each environment type has its corresponding environment address url, and any page of the platform opened based on the browser is used as the current browser page, where the platform refers to the operating environment of the computer hardware or software. A browser plug-in that can display all environments corresponding to the platform is pre-installed in the browser that loads the current browser page. A browser plug-in is a program written in accordance with a certain specification of the application program interface. It is a software component used to extend the browser function. It can only run on the platform specified by the program and cannot run independently from the platform. Browser plug-ins are usually created by third-party developers and installed and managed through the browser's plug-in system.
[0066] The environment information of each platform is stored in the browser plug-in in advance, so that when any page of the platform is opened, the browser plug-in will display all the environments of the platform in the current browser page.
[0067] Then, the user selects the environment conversion interface corresponding to the target service in the browser plug-in according to the target service he needs, and generates a web page switching instruction to switch the current browser page to the target environment page, where the current browser page and the target environment page belong to different environments of the same platform.
[0068] As a specific implementation method, Figure 2 As shown, taking the credit platform as an example, when the credit platform is opened by a browser, the browser plug-in pre-installed in the browser is loaded. The platform page currently displayed in the browser is used as the current browser page, and the browser plug-in is displayed in the current browser page.
[0069] The browser plug-in displays various environments under the credit platform. For example, the credit platform includes the technology environment, the credit environment and the payment environment. If the current browser page is the technology environment of the credit platform, when the user needs to switch to the credit environment or the payment environment, the user enters the web page switching instruction to switch to the credit environment or the payment environment through the displayed browser plug-in.
[0070] As a specific implementation method, in order not to block the display of various information in the current browser page, the browser plug-in is displayed in the current browser page in the form of a floating icon. The floating icon is a window or icon generated in the browser interface, which can serve as a medium for quickly opening services and can be moved in the current browser page according to the user's movement instructions. The transparency of the floating icon can also be adjusted according to needs to achieve the purpose of not blocking the display of various information in the current browser page.
[0071] S102, calling the switching interface of the browser to switch the current browser page to a target environment web page corresponding to the web page switching instruction.
[0072] As an implementation method, in response to a web page switching instruction, the browser plug-in calls the browser's switching interface to switch the rendered current browser page to the web page content of the rendering target environment web page, thereby realizing fast switching between different environments within the same platform based on the browser plug-in.
[0073] As a specific implementation method, the current browser page of the credit platform is the technology environment of the credit platform. When the user needs to switch to the credit environment or the payment environment, the user inputs a webpage switching instruction to switch to the credit environment or the payment environment through the displayed browser plug-in. The browser plug-in calls the browser's switching interface according to the webpage switching instruction, switches the webpage content of the originally rendered technology environment to the webpage content of the credit environment or the payment environment, and realizes the effect of switching the webpage of the technology environment to the webpage of the credit environment or the payment environment through the browser plug-in.
[0074] In one embodiment of the present invention, S101, before receiving a web page switching instruction based on a browser plug-in in a current browser page, the method further includes:
[0075] S101-1, receiving a loading instruction for loading the current browser page;
[0076] S101-2, loading a browser plug-in stored in an internal server of the browser, and obtaining configuration information of the browser plug-in, wherein the configuration information is a list of domains capable of running the browser plug-in;
[0077] S101-3, obtaining the domain to which the current browser page belongs;
[0078] S101-4, determining whether the domain to which the current browser page belongs matches the domain list in the configuration information;
[0079] S101-5, when the domain to which the current browser page belongs matches the domain list in the configuration information, the browser plug-in obtains environment list data of the platform to which the current browser page belongs, and renders and displays it on the current browser page;
[0080] S101-6, when the domain to which the current browser page belongs does not match the domain list in the configuration information, the browser plug-in is not displayed in the current browser page.
[0081] As an implementation method, when any platform is opened through a browser, a loading instruction for loading the current browser page is generated, and the current browser page in the platform is loaded at this time. While loading the current browser page, the browser plug-in stored in the browser's internal server is also loaded, and the domain list used to represent the ability to run this browser plug-in is also obtained during the loading process.
[0082] A domain is an area or range on a network, which can be a network subnet, a network group or an organization. Domains are usually used to divide a network into different parts for easy management and control. According to the domain name information of the current browser page, the domain to which the current browser page belongs is confirmed, and then it is determined whether the domain to which the current browser page belongs matches the domain list in the configuration information to determine whether the domain to which the current browser page belongs is capable of running this browser plug-in.
[0083] If the browser plug-in can be run, the current browser page is rendered and displayed according to the environment list data obtained when the browser plug-in is installed, so that all the environment information of the current browser page is displayed in the browser plug-in. If the browser plug-in cannot be run, the browser plug-in will not run, and all the environment information of the current browser page cannot be displayed.
[0084] As a specific implementation method, taking the credit platform as an example, when the credit platform is opened through a browser, the current browser page in the credit platform is loaded. For example, the current browser page loaded is the technology environment of the credit platform. While loading the technology environment of the credit platform, the browser plug-in pre-stored in the browser's internal server is also loaded. At this time, the browser plug-in does not start running because the technology environment of the credit platform has not yet successfully matched the domain list.
[0085] During the loading process of the browser plug-in, a domain list used to represent the browser plug-in that can run this browser plug-in will be obtained in the browser plug-in. The domain list is used to represent an area or range on the network that can run the browser plug-in, and is obtained based on the set running permissions when the browser plug-in is written. By obtaining the domain to which the credit platform's technology environment belongs, for example, if the domain name of the technology environment is A, then the domain to which domain name A belongs is B. If B exists in the domain list, it means that when the current browser page is the technology environment of the credit platform, the browser plug-in is allowed to run. At this time, the browser plug-in loads any environment page of the credit platform that is in the environment list data based on the pre-acquired credit platform environment list data. At the same time, the browser plug-in will also render and display it in the current browser page of the credit platform. If B does not exist in the domain list, the browser plug-in cannot run.
[0086] In one embodiment of the present invention, before receiving a loading instruction for loading the current browser page, S101-1 further includes:
[0087] S101-11, receiving file information of the browser plug-in;
[0088] S101-12, packaging the file information of the browser plug-in according to the browser plug-in rule set in the browser, and uploading the packaged file information of the browser plug-in to the internal server of the browser;
[0089] S101-13, receiving a download instruction for downloading the browser plug-in;
[0090] S101-14, decompress the file information of the browser plug-in, install the browser plug-in in a storage location corresponding to the browser, and add the browser plug-in to an extension list of the browser.
[0091] As an implementation method, a browser plug-in is written to obtain file information of the browser plug-in, which refers to a list of domains that the browser plug-in can run, which is set in the configuration information of the browser plug-in when writing, so as to determine the running scenario of the browser plug-in. After writing the file information of the browser plug-in, the file information is packaged according to the browser plug-in rules. Here, the file information can be packaged according to the plug-in rules of a specific target browser or a common browser, so as to install the packaged file information in the internal servers of different browsers. The browser plug-in rules are used to indicate the requirements of different browsers for the installed plug-in file information. For example, the browser plug-in rules may include requirements for the size of the browser plug-in file information, requirements for the compression format of the browser plug-in file information, etc.
[0092] Before switching web pages, the browser plug-in needs to be downloaded, decompressed, and then installed in the extension list of the corresponding browser according to the download instruction, so that the browser plug-in stored in the internal server of the browser is loaded while the current browser page is loaded. The download instruction can be a download instruction output by the user to the browser according to the demand for the browser plug-in, so that the file package of the browser plug-in is downloaded from the browser server and installed in the server.
[0093] As a specific implementation method, a third-party developer develops and configures a browser plug-in, and the file information mainfest.json obtained by the configuration is a manifest file used to describe the browser plug-in. The content of the file information includes the basic configuration information of the browser plug-in, the plug-in running range, and the running file, wherein the basic configuration information is the name information and version information of the browser plug-in; the plug-in running range is the domain list where the browser plug-in can run, so as to determine the running scenario of the browser plug-in; the running file is the code data for running the browser plug-in.
[0094] During the development process, the background script and the front-end script of the browser plug-in are also being developed. The background script file background.js is a code file used to process the background tasks of the browser plug-in. When the browser is loaded and started, background.js will be automatically loaded. The front-end script file contentScript.js is used to display the logic that constitutes the browser plug-in.
[0095] After writing the file information of the browser plug-in, the browser plug-in code data is packaged according to different browser plug-in rules, and the packaged code data is installed in the internal servers of different browsers. When receiving the download instruction of the browser plug-in, the packaged code data is downloaded, decompressed, and then installed in the extension list of the corresponding browser.
[0096] In one embodiment of the present invention, S101, before receiving a web page switching instruction based on a browser plug-in in a current browser page, includes:
[0097] S101-7, determining the target environment corresponding to the current browser page in the corresponding platform;
[0098] S101-8, receiving selection information of other environments under the platform except the target environment acquired by the browser plug-in;
[0099] S101 - 9 , generating the webpage switching instruction for switching the current browser webpage to the target environment webpage according to the selection information.
[0100] As an implementation method, when the browser loads the current browser page, it determines the target environment in the platform to which the current browser page corresponds, and receives selection information of other environments in the platform except the target environment. The target environment web page to be switched is determined based on the selection information, and then a web page switching instruction is generated to switch the current browser web page to the target environment web page.
[0101] As a specific implementation method, when the browser loads the current browser page, the current browser page is determined to correspond to the technology environment of the credit platform, and then the user's selection information for selecting the credit environment or the payment environment is received, and the target environment webpage to be switched is determined to be the credit environment or the payment environment, and a webpage switching instruction for switching to the credit environment or the payment environment is generated. Before receiving the selection information, the technology environment as the current browser page in the browser plug-in does not receive the selection information to avoid invalid webpage switching.
[0102] The webpage switching method provided in the embodiment of the present invention installs a browser plug-in capable of displaying all environments corresponding to the platform to which it belongs in the browser that loads the current browser page, and the browser plug-in displays the switching interface of all environments under the platform to which it belongs in the current browser page. The setting of the browser plug-in is independent of the current browser page, so that the current browser page is not affected, and the display of the switching interface of all environments under the platform to which the current browser page belongs is realized. After receiving the webpage switching instruction through the browser plug-in, the switching interface of the browser is called to switch the current browser page to the target environment webpage.
[0103] Corresponding to the above embodiment, see Figure 3 The embodiment of the present invention further provides a web page switching device 300, which includes:
[0104] The first receiving module 301 is used to receive a webpage switching instruction based on a browser plug-in in a current browser page, wherein the webpage switching instruction is a switching instruction between various environments under the platform to which the current browser page belongs, and the browser plug-in is a program installed in the browser that loads the current browser page and used to render and display all environments corresponding to the platform to which it belongs, and the browser plug-in displays the switching interface of all environments under the platform to which the current browser page belongs in the current browser page;
[0105] The first processing module 302 is used to call the switching interface of the browser to switch the current browser page to a target environment page corresponding to the web page switching instruction.
[0106] Optionally, the webpage switching device 300 further includes:
[0107] The second receiving module 303 is used to receive a loading instruction for loading the current browser page;
[0108] The second processing module 304 is used to load the browser plug-in stored in the internal server of the browser and obtain configuration information of the browser plug-in, where the configuration information is a list of domains that can run the browser plug-in;
[0109] The third processing module 305 is used to obtain the domain to which the current browser page belongs;
[0110] The fourth processing module 306 is used to determine whether the domain to which the current browser page belongs matches the domain list in the configuration information;
[0111] The fifth processing module 307 is used for, when the domain to which the current browser page belongs matches the domain list in the configuration information, the browser plug-in obtains the environment list data of the platform to which the current browser page belongs, and renders and displays it on the current browser page;
[0112] The sixth processing module 308 is configured to prevent the browser plug-in from being displayed in the current browser page when the domain to which the current browser page belongs does not match the domain list in the configuration information.
[0113] Optionally, the webpage switching device 300 further includes:
[0114] The third receiving module 309 is used to receive the file information of the browser plug-in;
[0115] A seventh processing module 310, configured to package the file information of the browser plug-in according to the browser plug-in rule set in the browser, and upload the packaged file information of the browser plug-in to the internal server of the browser;
[0116] The fourth receiving module 311 is used to receive a download instruction for downloading the browser plug-in;
[0117] The eighth processing module 312 is used to decompress the file information of the browser plug-in, install the browser plug-in in the storage location corresponding to the browser, and add the browser plug-in to the extension program list of the browser.
[0118] Optionally, the webpage switching device 300 further includes:
[0119] A ninth processing module 313 is used to determine a target environment corresponding to the current browser page in the corresponding platform;
[0120] A fifth receiving module 314, configured to receive selection information of other environments under the platform except the target environment acquired by the browser plug-in;
[0121] The tenth processing module 315 is used to generate the webpage switching instruction for switching the current browser webpage to the target environment webpage according to the selection information.
[0122] The webpage switching device provided in the embodiment of the present invention installs a browser plug-in capable of displaying all environments corresponding to the platform to which it belongs in the browser that loads the current browser page, and the browser plug-in displays the switching interface of all environments under the platform to which it belongs in the current browser page. The setting of the browser plug-in is independent of the current browser page, so that the current browser page is not affected, and the display of the switching interface of all environments under the platform to which the current browser page belongs is realized. After receiving the webpage switching instruction through the browser plug-in, the switching interface of the browser is called to switch the current browser page to the target environment webpage.
[0123] The exemplary embodiment of the present invention also provides an electronic device, comprising: at least one processor; and a memory connected to the at least one processor in communication. The memory stores a computer program that can be executed by the at least one processor, and the computer program is used to cause the electronic device to perform the method according to the embodiment of the present invention when executed by the at least one processor.
[0124] Exemplary embodiments of the present invention also provide a non-transitory computer-readable storage medium storing a computer program, wherein the computer program, when executed by a processor of a computer, is used to cause the computer to perform a method according to an embodiment of the present invention.
[0125] An exemplary embodiment of the present invention further provides a computer program product, including a computer program, wherein the computer program is used to cause the computer to perform a method according to an embodiment of the present invention when executed by a processor of a computer.
[0126] refer to Figure 4 , a block diagram of an electronic device 400 that can be used as a server or client of the present invention will now be described, which is an example of a hardware device that can be applied to various aspects of the present invention. The electronic device is intended to represent various forms of digital electronic computer devices, such as laptop computers, desktop computers, workbenches, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described and / or required herein.
[0127] like Figure 4As shown, the electronic device 400 includes a computing unit 401, which can perform various appropriate actions and processes according to a computer program stored in a read-only memory (ROM) 402 or a computer program loaded from a storage unit 408 into a random access memory (RAM) 403. In the RAM 403, various programs and data required for the operation of the electronic device 400 can also be stored. The computing unit 401, the ROM 402, and the RAM 403 are connected to each other via a bus 404. An input / output (I / O) interface 405 is also connected to the bus 404.
[0128] A plurality of components in the electronic device 400 are connected to the I / O interface 405, including: an input unit 406, an output unit 407, a storage unit 408, and a communication unit 409. The input unit 406 may be any type of device capable of inputting information to the electronic device 400, and the input unit 406 may receive input digital or character information, and generate key signal inputs related to user settings and / or function control of the electronic device. The output unit 407 may be any type of device capable of presenting information, and may include, but is not limited to, a display, a speaker, a video / audio output terminal, a vibrator, and / or a printer. The storage unit 408 may include, but is not limited to, a disk, an optical disk. The communication unit 409 allows the electronic device 400 to exchange information / data with other devices via a computer network such as the Internet and / or various telecommunication networks, and may include, but is not limited to, a modem, a network card, an infrared communication device, a wireless communication transceiver, and / or a chipset, such as a Bluetooth™ device, a WiFi device, a WiMax device, a cellular communication device, and / or the like.
[0129] The computing unit 401 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the computing unit 401 include, but are not limited to, a central processing module (CPU), a graphics processing module (GPU), various dedicated artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, digital signal processors (DSPs), and any appropriate processors, controllers, microcontrollers, etc. The computing unit 401 performs the various methods and processes described above. For example, in some embodiments, the web page switching method may be implemented as a computer software program, which is tangibly included in a machine-readable medium, such as a storage unit 408. In some embodiments, part or all of the computer program may be loaded and / or installed on the electronic device 400 via ROM 402 and / or communication unit 409. In some embodiments, the computing unit 401 may be configured to perform the web page switching method in any other appropriate manner (e.g., by means of firmware).
[0130] The program code for implementing the method of the present invention can be written in any combination of one or more programming languages. These program codes can be provided to a processor or controller of a general-purpose computer, a special-purpose computer or other programmable web page switching device, so that the program code, when executed by the processor or controller, enables the functions / operations specified in the flow chart and / or block diagram to be implemented. The program code can be executed entirely on the machine, partially on the machine, partially on the machine as a stand-alone software package and partially on a remote machine, or entirely on a remote machine or server.
[0131] In the context of the present invention, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices, or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0132] As used herein, the terms "machine-readable medium" and "computer-readable medium" refer to any computer program product, apparatus, and / or device (e.g., disk, optical disk, memory, programmable logic device (PLD)) for providing machine instructions and / or data to a programmable processor, including a machine-readable medium that receives machine instructions as a machine-readable signal. The term "machine-readable signal" refers to any signal for providing machine instructions and / or data to a programmable processor.
[0133] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the computer. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).
[0134] The systems and techniques described herein may be implemented in a computing system that includes back-end components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes front-end components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such back-end components, middleware components, or front-end components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), and the Internet.
[0135] A computer system may include clients and servers. Clients and servers are generally remote from each other and usually interact through a communication network. The relationship of client and server is generated by computer programs running on respective computers and having a client-server relationship to each other.
Claims
1. A web page switching method, characterized in that: include: Receiving a webpage switching instruction based on a browser plug-in in a current browser page, wherein the webpage switching instruction is an instruction for switching between environments under a platform to which the current browser page belongs, and the browser plug-in is a program installed by a browser that loads the current browser page and used for rendering and displaying all environments corresponding to the platform to which the browser plug-in belongs, and the browser plug-in displays in the current browser page a switching interface for all environments under the platform to which the current browser page belongs; The switching interface of the browser is called to switch the current browser page to a target environment web page corresponding to the web page switching instruction.
2. The webpage switching method according to claim 1, characterized in that: Before receiving the webpage switching instruction based on the browser plug-in in the current browser page, the method further includes: Receiving a loading instruction for loading the current browser page; Loading a browser plug-in stored in an internal server of the browser, and obtaining configuration information of the browser plug-in, wherein the configuration information is a list of domains capable of running the browser plug-in; Obtain the domain to which the current browser page belongs; Determine whether the domain to which the current browser page belongs matches the domain list in the configuration information; In the case that the domain to which the current browser page belongs matches the domain list in the configuration information, the browser plug-in obtains the environment list data of the platform to which the current browser page belongs, and renders and displays it on the current browser page; In the case that the domain to which the current browser page belongs does not match the domain list in the configuration information, the browser plug-in is not displayed in the current browser page.
3. The webpage switching method according to claim 2, characterized in that: Before receiving the loading instruction for loading the current browser page, the method further includes: Receiving file information of the browser plug-in; Packaging the file information of the browser plug-in according to the browser plug-in rules set in the browser, and uploading the packed file information of the browser plug-in to the internal server of the browser; Receiving a download instruction for downloading the browser plug-in; Decompress the file information of the browser plug-in, install the browser plug-in in a storage location corresponding to the browser, and add the browser plug-in to an extension program list of the browser.
4. The webpage switching method according to claim 1, characterized in that: Before receiving the webpage switching instruction based on the browser plug-in in the current browser page, the method includes: Determine the target environment corresponding to the current browser page in the corresponding platform; Receiving selection information of other environments under the platform except the target environment acquired by the browser plug-in; The webpage switching instruction for switching the current browser webpage to the target environment webpage is generated according to the selection information.
5. A web page switching device, characterized in that: include: A first receiving module is used to receive a webpage switching instruction based on a browser plug-in in a current browser page, wherein the webpage switching instruction is a switching instruction between various environments under the platform to which the current browser page belongs, and the browser plug-in is a program installed by a browser that loads the current browser page and used to render and display all environments corresponding to the platform to which it belongs, and the browser plug-in displays in the current browser page a switching interface for all environments under the platform to which the current browser page belongs; The first processing module is used to call the switching interface of the browser to switch the current browser page to a target environment web page corresponding to the web page switching instruction.
6. The webpage switching device according to claim 5, characterized in that: The webpage switching device further includes: A second receiving module, used to receive a loading instruction for loading the current browser page; A second processing module is used to load the browser plug-in stored in the internal server of the browser and obtain configuration information of the browser plug-in, wherein the configuration information is a list of domains capable of running the browser plug-in; A third processing module is used to obtain the domain to which the current browser page belongs; A fourth processing module, used to determine whether the domain to which the current browser page belongs matches the domain list in the configuration information; A fifth processing module, configured to, when the domain to which the current browser page belongs matches the domain list in the configuration information, cause the browser plug-in to obtain environment list data of the platform to which the current browser page belongs, and render and display the data on the current browser page; The sixth processing module is used to prevent the browser plug-in from being displayed in the current browser page when the domain to which the current browser page belongs does not match the domain list in the configuration information.
7. The webpage switching device according to claim 6, characterized in that: The webpage switching device further includes: A third receiving module, used to receive file information of the browser plug-in; A seventh processing module, configured to package the file information of the browser plug-in according to the browser plug-in rule set in the browser, and upload the packaged file information of the browser plug-in to the internal server of the browser; A fourth receiving module, used to receive a download instruction for downloading the browser plug-in; The eighth processing module is used to decompress the file information of the browser plug-in, install the browser plug-in in a storage location corresponding to the browser, and add the browser plug-in to the extension program list of the browser.
8. The webpage switching device according to claim 5, characterized in that: The webpage switching device further includes: A ninth processing module, used to determine a target environment corresponding to the current browser page in the corresponding platform; A fifth receiving module, used for receiving selection information of other environments under the platform except the target environment acquired by the browser plug-in; The tenth processing module is used to generate the webpage switching instruction for switching the current browser webpage to the target environment webpage according to the selection information.
9. An electronic device, comprising: processor; as well as Memory for storing programs, The program includes instructions, which, when executed by the processor, cause the processor to perform the method according to any one of claims 1 to 4.
10. A non-transitory computer-readable storage medium storing computer instructions, wherein: The computer instructions are used to make a computer execute the method according to any one of claims 1-4.
