Method and device for accessing simulation terminal at Web end and electronic equipment

By accessing the emulated terminal on the web side, using transit pages and two-way communication protocols, the problem of sensitive information exposure in cross-domain data transmission is solved, and data security and user experience are improved.

CN119011574APending Publication Date: 2024-11-22KYLAND TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410992418.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-23
Publication Date
2024-11-22

AI Technical Summary

Technical Problem

In cross-domain data transmission scenarios, sensitive information is easily exposed to the address bar, posing a security risk, and the prior art is difficult to effectively protect sensitive information from intercepting.

Method used

By accessing the emulation terminal on the web side, using the window.open function to jump to the redirect page with the target parameters, and store it in the redirect page locally, redirect to the home page of the emulation terminal, and obtain parameters from the browser locally. Avoid direct transmission in URLs and combine the two-way communication protocol to realize data transmission.

Benefits of technology

It realizes sensorless transmission of sensitive information, reduces the risk of information exposure and interception, improves data security during cross-domain communication, and provides user-friendly operation experience and flexible simulation operation capabilities.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119011574A_ABST
    Figure CN119011574A_ABST
Patent Text Reader

Abstract

The invention discloses a method and device for accessing a simulation terminal at a Web end and electronic equipment, and belongs to the technical field of communication. The method comprises the following steps: based on an access event of a simulation terminal triggered by a user on a current webpage, jumping to a transit page of the simulation terminal by carrying a target parameter of the current webpage; storing the target parameter in a browser local in the transit page, and redirecting the webpage to a homepage of the simulation terminal; and in the homepage loading process, obtaining the target parameter from the browser locally. According to the method and the device, the target parameter is carried to jump to the transit page when the current webpage of the user triggers the access event, and the target parameter is stored in the local browser instead of being directly added to the homepage URL of the simulation terminal, so that the target parameter does not need to be acquired from the URL when the homepage of the simulation terminal is loaded, and the loading efficiency of the simulation terminal is improved. According to the method, the target parameter is acquired from the browser, non-inductive transmission of the sensitive information is realized, the risk of exposure of the sensitive information is reduced, and the data security in a cross-domain communication process is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application belongs to the field of communication technology, and in particular, relates to a method, device and electronic device for accessing a simulation terminal on a Web side. Background Art

[0002] With the rapid development of Internet technology, Web applications have become one of the main platforms for information interaction, and the demand for cross-domain data transmission in Web applications is increasing.

[0003] In the related technology, in the cross-domain data transmission scenario, when jumping from address A to address B, when the terminal entrance is opened, the parameters to be transmitted are spliced ​​behind the request address (uniform resource locator, URL). This method is often used in scenarios carrying non-sensitive data. When carrying sensitive information such as tokens, it will be exposed in the address bar, which is very unfriendly. Summary of the invention

[0004] The present application aims to solve at least one of the technical problems existing in the prior art. To this end, the present application proposes a method, device and electronic device for accessing a simulated terminal on a Web terminal to reduce the risk of sensitive information exposure and improve data security during cross-domain communication.

[0005] In a first aspect, the present application provides a method for accessing a simulation terminal on a Web side, comprising:

[0006] Based on the access event of the simulation terminal triggered by the user on the current webpage, jump to the transfer page of the simulation terminal with the target parameter of the current webpage;

[0007] In the transfer page, the target parameter is stored locally in the browser, and the web page is redirected to the homepage of the simulation terminal;

[0008] During the loading process of the homepage, the target parameter is obtained locally from the browser.

[0009] According to the method of accessing the simulation terminal on the Web side of the present application, based on the access event of the simulation terminal triggered by the user on the current web page, the target parameters of the current web page are carried to jump to the transfer page of the simulation terminal; the target parameters are stored locally in the browser in the transfer page, and the web page is redirected to the homepage of the simulation terminal; during the loading of the homepage, the target parameters are obtained from the local browser. The embodiment of the present application jumps to the transfer page with only the target parameters when the user's current web page triggers an access event, and stores the target parameters locally in the browser, instead of directly adding the target parameters to the homepage URL of the simulation terminal, so that when the simulation terminal homepage is loaded, it is not necessary to obtain the target parameters from the URL, but to obtain the target parameters from the local browser, thereby reducing the possibility of information being intercepted during network transmission, realizing the senseless transmission of sensitive information, reducing the risk of sensitive information exposure, and improving data security during cross-domain communication.

[0010] According to an embodiment of the present application, the step of carrying the target parameter of the current webpage to jump to the transfer page of the simulation terminal includes:

[0011] Obtaining the target parameter;

[0012] The target parameter is carried through the window.open function to jump to the transfer page of the simulation terminal.

[0013] In this embodiment, by using the window.open function to carry the target parameters of the current web page to jump to the transfer page of the simulation terminal, the parameters can be transferred when leaving the current web page environment, thereby improving the convenience of user operation.

[0014] According to an embodiment of the present application, storing the target parameter locally in the browser in the transfer page includes:

[0015] Through the window.onload event, after the transfer page is loaded, the target parameter in the URL is parsed;

[0016] The target parameters are stored in the browser's localStorage.

[0017] In this embodiment, the window.onload event can ensure that after the transfer page is loaded, the process of parsing the target parameter in the URL is triggered, so that the loading of the transfer page will not be affected by the parsing process, thereby improving the loading efficiency. Furthermore, using localStorage to store the target parameter reduces the risk of sensitive information being exposed on the network.

[0018] According to an embodiment of the present application, redirecting the web page to the homepage of the simulation terminal includes:

[0019] Use _self as the parameter of the window.open function to redirect the web page to the homepage of the emulated terminal.

[0020] In this embodiment, the web page is redirected to the homepage of the simulation terminal by using the _self parameter, so that users can continue their sessions in the current browser window or tab without opening a new window or tab. The current transfer page will be overwritten by the homepage of the simulation terminal, and the user will not be able to see the transfer page, but will directly see the content of the simulation terminal homepage, so that the user will not be aware of the intermediate jump process, thereby improving the user's browsing experience. In addition, since the transfer page will not be displayed to the user, the seamless transmission of sensitive information is further realized, reducing the risk of sensitive information leakage.

[0021] According to an embodiment of the present application, during the process of loading the homepage, obtaining the target parameter from the browser locally includes:

[0022] During the loading process of the homepage, the target parameter stored in localStorage is obtained through the localStorage.getItem method.

[0023] In this embodiment, the localStorage.getItem method can be used to quickly retrieve and obtain local target parameters, which helps to improve the overall performance and response speed of the system. At the same time, because sensitive information is stored locally on the user rather than transmitted over the public network, the risk of being intercepted is reduced.

[0024] According to one embodiment of the present application, the method further includes:

[0025] After the homepage obtains the target parameter from the browser locally, a two-way communication protocol is used to carry the target parameter to communicate with the background server of the simulation terminal.

[0026] In this embodiment, a two-way communication protocol is used to enable data to flow between the web page and the server in real time and synchronously, so that the user's operations and inputs can be immediately received and responded to by the server. This communication method also allows the server to actively push data to the web page, maintaining the immediacy and relevance of the user interface.

[0027] According to one embodiment of the present application, the method further includes:

[0028] Establishing a simulation interface of the simulation terminal in the homepage;

[0029] When an input event of the user's simulated interface is monitored, the command input by the user is sent to the background server of the simulation terminal through a two-way communication protocol, so that the background server returns the corresponding target data based on the command input by the user;

[0030] The target data is parsed, and the parsed target data is written into the simulation interface.

[0031] In this embodiment, by establishing a simulation interface of the simulation terminal on the homepage, a user is provided with an experience similar to the operation of the simulation terminal, so that the user can operate in the Web environment without having to operate directly on the simulation terminal, and by monitoring the input events on the simulation interface, the user's commands can be captured and sent to the background server, and the server then returns the target data based on the user input, and the front end parses and displays it, thereby realizing a closed-loop interaction process, thereby enabling the user to perform simulation operations on the Web browser, thereby improving the flexibility of the simulation operation.

[0032] According to one embodiment of the present application, the method further includes:

[0033] When the browser window size changes, obtaining the change parameter of the simulation terminal in adapting to the browser window size;

[0034] The change parameter is sent to the background server, so that the background server interacts with the simulation interface based on the change parameter.

[0035] In this embodiment, by obtaining the parameters for the simulation terminal to adapt to the changes in the browser window size, the interface can be dynamically adjusted according to the size of the browser window without manually adjusting the settings or reloading the page, and these parameters are sent to the background server. The server can adjust the returned data format and content layout according to these parameters, further making the data display match the user's browser window size, thereby reducing the problem of content misalignment or incomplete display.

[0036] In a second aspect, the present application provides a device for accessing a simulation terminal on a Web side, comprising:

[0037] A jump module, used to carry the target parameters of the current web page and jump to the transfer page of the simulation terminal based on the access event of the simulation terminal triggered by the user on the current web page;

[0038] A storage module, used for storing the target parameters locally in the browser in the transfer page, and redirecting the web page to the homepage of the simulation terminal;

[0039] The acquisition module is used to acquire the target parameter from the local browser during the loading process of the homepage.

[0040] According to the device for accessing the simulation terminal on the Web side of the present application, based on the access event of the simulation terminal triggered by the user on the current web page, the target parameters of the current web page are carried to jump to the transfer page of the simulation terminal; the target parameters are stored locally in the browser in the transfer page, and the web page is redirected to the homepage of the simulation terminal; during the loading of the homepage, the target parameters are obtained from the local browser. The embodiment of the present application jumps to the transfer page with only the target parameters when the user's current web page triggers an access event, and stores the target parameters locally in the browser, instead of directly adding the target parameters to the homepage URL of the simulation terminal, so that when the simulation terminal homepage is loaded, it is not necessary to obtain the target parameters from the URL, but to obtain the target parameters from the local browser, thereby reducing the possibility of information being intercepted during network transmission, realizing the senseless transmission of sensitive information, reducing the risk of sensitive information exposure, and improving data security during cross-domain communication.

[0041] In a third aspect, the present application provides an electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the method for accessing a simulated terminal on a Web side as described in the first aspect above is implemented.

[0042] In a fourth aspect, the present application provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the method for accessing a simulation terminal on a Web side as described in the first aspect above.

[0043] In a fifth aspect, the present application provides a chip, comprising a processor and a communication interface, wherein the communication interface is coupled to the processor, and the processor is used to run a program or instruction to implement the method of accessing a simulation terminal on a Web side as described in the first aspect above.

[0044] In a sixth aspect, the present application provides a computer program product, including a computer program, which, when executed by a processor, implements the method for accessing a simulation terminal on a Web side as described in the first aspect above.

[0045] The above one or more technical solutions in the embodiments of the present application have at least one of the following technical effects:

[0046] According to the method of accessing the simulation terminal on the Web side of the present application, based on the access event of the simulation terminal triggered by the user on the current web page, the target parameters of the current web page are carried to jump to the transfer page of the simulation terminal; the target parameters are stored locally in the browser in the transfer page, and the web page is redirected to the homepage of the simulation terminal; during the loading of the homepage, the target parameters are obtained from the local browser. The embodiment of the present application jumps to the transfer page with only the target parameters when the user's current web page triggers an access event, and stores the target parameters locally in the browser, instead of directly adding the target parameters to the homepage URL of the simulation terminal, so that when the simulation terminal homepage is loaded, it is not necessary to obtain the target parameters from the URL, but to obtain the target parameters from the local browser, thereby reducing the possibility of information being intercepted during network transmission, realizing the senseless transmission of sensitive information, reducing the risk of sensitive information exposure, and improving data security during cross-domain communication.

[0047] Furthermore, in some embodiments, by using the window.open function to carry the target parameters of the current web page to jump to the transfer page of the simulation terminal, the parameters can be passed without leaving the current web page environment, thereby improving the convenience of user operation.

[0048] Furthermore, in some embodiments, the window.onload event can be used to ensure that after the transfer page is loaded, the process of parsing the target parameter in the URL is triggered, so that the loading of the transfer page will not be affected by the parsing process, thereby improving the loading efficiency. Furthermore, using localStorage to store the target parameter reduces the risk of sensitive information being exposed on the network.

[0049] Furthermore, in some embodiments, the web page is redirected to the homepage of the simulation terminal by using the _self parameter, so that users can continue their sessions in the current browser window or tab without opening a new window or tab. The current transfer page will be overwritten by the homepage of the simulation terminal, and the user will not be able to see the transfer page, but can directly see the content of the simulation terminal homepage, so that the user will not be aware of the intermediate jump process, thereby improving the user's browsing experience. In addition, since the transfer page will not be displayed to the user, the seamless transmission of sensitive information is further achieved, reducing the risk of sensitive information leakage.

[0050] Furthermore, in some embodiments, the localStorage.getItem method can be used to quickly retrieve and obtain local target parameters, which helps improve the overall performance and response speed of the system. At the same time, because sensitive information is stored locally on the user rather than transmitted over a public network, the risk of being intercepted is reduced.

[0051] Furthermore, in some embodiments, a two-way communication protocol is used to enable data to flow between the web page and the server in real time and synchronously, so that the user's operations and inputs can be immediately received and responded to by the server, and this communication method can also allow the server to actively push data to the web page, maintaining the immediacy and relevance of the user interface.

[0052] Furthermore, in some embodiments, by establishing a simulation interface of the simulation terminal on the homepage, a user is provided with an experience similar to the operation of the simulation terminal, so that the user can operate in the Web environment without having to operate directly on the simulation terminal, and by monitoring input events on the simulation interface, the user's commands can be captured and sent to the background server, and the server then returns the target data based on the user input, and the front end parses and displays it, thereby realizing a closed-loop interaction process, thereby enabling the user to perform simulation operations on the Web browser, thereby improving the flexibility of the simulation operation.

[0053] Furthermore, in some embodiments, by obtaining parameters for the simulation terminal to adapt to changes in browser window size, the interface can be dynamically adjusted according to the size of the browser window without manually adjusting settings or reloading the page, and these parameters are sent to the background server. The server can adjust the returned data format and content layout according to these parameters, further matching the data display with the user's browser window size, thereby reducing the problem of content misalignment or incomplete display.

[0054] Additional aspects and advantages of the present application will be given in part in the description below, and in part will become apparent from the description below, or will be learned through the practice of the present application. BRIEF DESCRIPTION OF THE DRAWINGS

[0055] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments will be briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.

[0056] Figure 1 It is a flowchart of a method for accessing a simulation terminal on a Web terminal provided by an embodiment of the present application;

[0057] Figure 2 It is a structural diagram of a device for accessing a simulation terminal on a Web side provided in an embodiment of the present application;

[0058] Figure 3 It is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0059] The following will be combined with the drawings in the embodiments of the present application to clearly describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, rather than all the embodiments. All other embodiments obtained by ordinary technicians in this field based on the embodiments in the present application belong to the scope of protection of this application.

[0060] The terms "first", "second", etc. in the specification and claims of the present application are used to distinguish similar objects, and are not used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable under appropriate circumstances, so that the embodiments of the present application can be implemented in an order other than those illustrated or described here, and the objects distinguished by "first", "second", etc. are generally of one type, and the number of objects is not limited. For example, the first object can be one or more. In addition, "and / or" in the specification and claims represents at least one of the connected objects, and the character " / " generally indicates that the objects associated with each other are in an "or" relationship.

[0061] Cross-domain data transfer refers to the process of transferring data between different sources (domain names, protocols or ports). A web application is an application that can be accessed through the web. Its biggest advantage is that it can be used by users with browsers without installing other software. Due to the browser's homology policy, web pages are restricted when making cross-domain requests for security reasons.

[0062] In the related art, in the cross-domain data transmission scenario, when jumping from address A to address B, the following solutions are usually included:

[0063] Window.open() with address bar parameters: This is a simple cross-domain data transmission method, which appends the data to be transmitted in the query parameters of the URL. For example, use window.open('https: / / A / terminal.html?token=XCVBNM&user_id=123'). This method is suitable for the transmission of non-sensitive data, because it exposes the data in plain text in the address bar, which poses a security risk.

[0064] Window.open() with window.postMessage(): This method is suitable for scenarios where longer data needs to be transmitted. It allows messages to be sent and received between windows of different sources. However, when using window.postMessage(), you need to ensure that the target window has been loaded and can receive messages, which usually requires delayed sending through setTimeout, increasing the complexity and instability of the implementation.

[0065] Window.postMessage() with iframe tag: When using iframe tag to embed site B into site A, you can use window.postMessage() to safely pass messages between site A and site B. However, the limitation of this method is that it cannot be used to open a new browser tab and can only work in the context of the current web page.

[0066] The present application considers that if it is possible to jump to the transfer page of the simulated terminal with the target parameters of the current web page based on the access event of the simulated terminal triggered by the user on the current web page; the target parameters are stored locally in the browser in the transfer page, and the web page is redirected to the homepage of the simulated terminal; during the loading process of the homepage, the target parameters are obtained from the local browser, then it is expected to solve the problem of easy exposure of sensitive information in the prior art.

[0067] In conjunction with the accompanying drawings, the method, device and electronic device for accessing a simulated terminal on a Web side provided by the embodiments of the present application are described in detail through specific embodiments and their application scenarios.

[0068] The method for accessing a simulated terminal on a Web terminal may be applied to a terminal, and may be specifically executed by hardware or software in the terminal.

[0069] The terminal includes, but is not limited to, a portable communication device such as a mobile phone or tablet computer with a touch-sensitive surface (e.g., a touch screen display and / or a touch pad). It should also be understood that in some embodiments, the terminal may not be a portable communication device, but a desktop computer with a touch-sensitive surface (e.g., a touch screen display and / or a touch pad).

[0070] In the following various embodiments, a terminal including a display and a touch-sensitive surface is described. However, it should be understood that the terminal may include one or more other physical user interface devices such as a physical keyboard, a mouse and a joystick.

[0071] The method for accessing a simulated terminal on a Web side provided in an embodiment of the present application may be executed by an electronic device or a functional module or functional entity in the electronic device that can implement the method for accessing a simulated terminal on a Web side. The electronic devices mentioned in the embodiment of the present application include but are not limited to mobile phones, tablet computers, computers, cameras, and wearable devices. The method for accessing a simulated terminal on a Web side provided in an embodiment of the present application is described below using an electronic device as an example of an execution subject.

[0072] like Figure 1 As shown, the method for accessing the simulation terminal on the Web side includes: step 110, step 120 and step 130.

[0073] Step 110: Based on the access event of the simulation terminal triggered by the user on the current webpage, jump to the transfer page of the simulation terminal with the target parameter of the current webpage.

[0074] In the embodiment of the present application, the simulation terminal can be a software interface that simulates a real operating environment, which allows users to practice operations or test systems on a safe, simulated platform without worrying about affecting the real system. The simulation terminal can be applied to different scenarios, such as education and training, system testing, demonstration, etc.

[0075] In an embodiment of the present application, the simulation terminal can be accessed through the Web end, for example, a page provided by the simulation terminal can be opened in a browser, and various simulation operations can be performed on the page without operating on the software of the simulation terminal. In a specific operation scenario, a user can click a link on the internal portal website of the enterprise with the intention of accessing the homepage of the simulation terminal. After detecting the user's request, but because sensitive information needs to be transmitted securely, it is not directly redirected to the simulation terminal homepage, but first jumps to the transfer page of the simulation terminal.

[0076] The transition page of the simulation terminal can be a temporary page. The transition page can serve as a visual and logical transition to allow users to anticipate the upcoming changes. For example, the transition page can display "Loading simulation environment, please wait..." Of course, the transition page can also not be displayed in the browser interface, but directly covered by the homepage of the subsequent simulation terminal, so that the user will not perceive the adjustment process of the transition page.

[0077] In an embodiment of the present application, the user's access events can be monitored in the current web page of the browser. For example, if the user clicks the access link or button of the home page of the simulation terminal, the target parameters of the current web page can be carried to jump to the transfer page of the simulation terminal.

[0078] Among them, the target parameter may be a parameter required to access the homepage of the simulation terminal. For example, if the homepage of the simulation terminal needs to verify the user's authority, the target parameter may include the user name, access token, user's rank, user's department, etc., or may also include some other information, such as the user's operation type, simulation scenario, etc. Of course, in addition to the above-mentioned sensitive information, the target information may also include some non-sensitive information, such as the user's request time, access source, and other parameters, which are not limited in this application.

[0079] In some embodiments, any method can be used to implement the jump to the transfer page, such as using an HTML link, a window.open function, using a JavaScript window.location object to change the URL of the current web page to jump to the transfer page, obtaining data or status through an AJAX request, and then using JavaScript to jump to the page, etc. This application specification does not limit this.

[0080] Step 120: Store the target parameters locally in the browser in the transfer page, and redirect the web page to the homepage of the simulation terminal.

[0081] In the embodiment of the present application, the target parameters can be stored in the local browser in any way in the transfer page. For example, the target parameters can be stored in the localStorage of the browser using the localStorage.setItem method through JavaScript; they can also be stored in session Storage, in IndexedDB running in the browser, or in other ways, which are not limited in the embodiment of the present application.

[0082] In an embodiment of the present application, the homepage of the simulation terminal can be a page designed to simulate a real operating environment. The homepage can include various simulation controls, input fields and feedback mechanisms. Users can interact on the homepage of the simulation terminal, such as performing corresponding simulation operations.

[0083] After the target parameters are stored, the window.location attribute of JavaScript can be used to redirect to the homepage of the simulation terminal. Of course, other arbitrary methods can also be used to redirect to the homepage of the simulation terminal, such as using HTML links, window.open functions, etc., which are not limited in the present application embodiment.

[0084] Step 130: During the homepage loading process, the target parameters are obtained from the local browser.

[0085] In the embodiment of the present application, the target parameters can be obtained from the browser locally during the homepage loading process, so that the homepage can load information related to the target parameters, such as loading user related information for verification, loading user operations and displaying corresponding information, etc. When the simulation terminal homepage is loaded, it reads the target parameters stored in localStorage through the localStorage.getItem method.

[0086] Of course, if the browser stores the target parameters locally in other ways, you can use the corresponding method to obtain the target parameters. If the target parameters are stored in session Storage, you can use sessionStorage.getItem to obtain the target parameters from sessionStorage; if the target parameters are stored in IndexedDB, you can use IndexedDB APIs, such as open, get, openCursor, etc., to query and retrieve data stored in IndexedDB.

[0087] According to the method of accessing the simulation terminal on the Web side of the present application, based on the access event of the simulation terminal triggered by the user on the current web page, the target parameters of the current web page are carried to jump to the transfer page of the simulation terminal; the target parameters are stored locally in the browser in the transfer page, and the web page is redirected to the homepage of the simulation terminal; during the loading of the homepage, the target parameters are obtained from the local browser. The embodiment of the present application jumps to the transfer page with only the target parameters when the user's current web page triggers an access event, and stores the target parameters locally in the browser, instead of directly adding the target parameters to the homepage URL of the simulation terminal, so that when the simulation terminal homepage is loaded, it is not necessary to obtain the target parameters from the URL, but to obtain the target parameters from the local browser, thereby reducing the possibility of information being intercepted during network transmission, realizing the senseless transmission of sensitive information, reducing the risk of sensitive information exposure, and improving data security during cross-domain communication.

[0088] In some embodiments, carrying the target parameter of the current web page to jump to the transfer page of the emulated terminal includes:

[0089] Get target parameters;

[0090] Use the window.open function to carry the target parameter to jump to the transfer page of the simulation terminal.

[0091] The window.open() function is a method used in JavaScript to open a new window or a new tab. It accepts three parameters: the URL to load, the name of the window (optional, windows opened with the same name in the same page will be reused), and a string containing the window characteristics (such as size, position, whether to display scroll bars, etc.).

[0092] In this embodiment, by using the window.open function to carry the target parameters of the current web page to jump to the transfer page of the simulation terminal, the parameters can be transferred when leaving the current web page environment, thereby improving the convenience of user operation.

[0093] In some embodiments, storing the target parameters locally in the browser in the transfer page includes:

[0094] Through the window.onload event, after the transfer page is loaded, the target parameters in the URL are parsed;

[0095] Store the target parameters in the browser's localStorage.

[0096] In this embodiment, the window.onload event is a JavaScript event that is triggered when all elements of the page, including scripts, images, etc., are loaded. Using this window.onload event can ensure that the page is fully loaded when parsing the parameters in the URL. After the page is fully loaded, the URLSearchParams API of JavaScript can be used to parse the target parameters in the URL.

[0097] localStorage is part of the Web Storage API, which allows Web applications to store data in the user's browser. The data can be retained even after the browser is closed. After parsing the target parameters in the URL, you can use the localStorage.setItem(key,value) method to store key-value pairs to store the target parameters in the browser.

[0098] In this embodiment, the window.onload event can ensure that after the transfer page is loaded, the process of parsing the target parameter in the URL is triggered, so that the loading of the transfer page will not be affected by the parsing process, thereby improving the loading efficiency. Furthermore, using localStorage to store the target parameter reduces the risk of sensitive information being exposed on the network.

[0099] In some embodiments, redirecting a web page to a home page of the emulated terminal includes:

[0100] Use _self as the parameter of the window.open function to redirect the web page to the home page of the emulated terminal.

[0101] In the window.open function, the _self property represents the current window or tab. Using _self as a parameter causes the link to be opened in the same browsing context instead of creating a new window or tab.

[0102] In the embodiment of the present application, after the target parameters are stored locally in the browser, if you need to navigate to the homepage of the emulated terminal, you can use _self to redirect the page. This method can maintain the consistency of the user's browsing history and avoid opening unnecessary new windows or tabs. The user is seamlessly guided to the homepage of the emulated terminal without having to manually close or switch tabs.

[0103] In this embodiment, the web page is redirected to the homepage of the simulation terminal by using the _self parameter, so that users can continue their sessions in the current browser window or tab without opening a new window or tab. The current transfer page will be overwritten by the homepage of the simulation terminal, and the user will not be able to see the transfer page, but can directly see the content of the simulation terminal homepage, so that the user will not be aware of the intermediate jump process, thereby improving the user's browsing experience. In addition, since the transfer page will not be displayed to the user, the seamless transmission of sensitive information is further realized, reducing the risk of sensitive information leakage.

[0104] In some embodiments, during the homepage loading process, the target parameters are obtained from the browser locally, including:

[0105] During the loading of the home page, the target parameters stored in localStorage are obtained through the localStorage.getItem method.

[0106] In this embodiment, the stored data can be retrieved from localStorage through the localStorage.getItem(key) method, where key is the key name used when storing the data.

[0107] In this embodiment, the localStorage.getItem method can be used to quickly retrieve and obtain local target parameters, which helps to improve the overall performance and response speed of the system. At the same time, because sensitive information is stored locally on the user rather than transmitted over the public network, the risk of being intercepted is reduced.

[0108] In some embodiments, after the homepage obtains the target parameters from the local browser, a two-way communication protocol is used to carry the target parameters to communicate with the background server of the simulation terminal.

[0109] In this embodiment, after obtaining the target parameters, the homepage can communicate with the background server of the simulation terminal using a two-way communication protocol, wherein the two-way communication protocol allows real-time exchange of data between the client and the server, and the two-way communication protocol can be WebSocket, Server-Sent Events (SSE), etc.

[0110] During the communication process, the home page can send target parameters as part of the request to the server. The server can use these parameters to customize the response, such as providing personalized content based on the user's selection. After receiving the target parameters, the server will perform corresponding processing, such as querying a database, performing calculations, etc., and send the results back to the home page. After receiving the server's response, the home page can use JavaScript to update the page content to reflect the data returned by the server.

[0111] In this embodiment, a two-way communication protocol is used to enable data to flow between the web page and the server in real time and synchronously, so that the user's operations and inputs can be immediately received and responded to by the server. This communication method also allows the server to actively push data to the web page, maintaining the immediacy and relevance of the user interface.

[0112] In some embodiments, the method further comprises:

[0113] Create a simulated terminal interface on the home page;

[0114] When an input event of the user simulation interface is monitored, the command input by the user is sent to the background server of the simulation terminal through a two-way communication protocol, so that the background server returns the corresponding target data based on the command input by the user;

[0115] Parse the target data and write the parsed target data into the simulation interface.

[0116] In this embodiment, a simulated terminal interface can be embedded in the homepage, which can usually be implemented using a specific JavaScript library. For example, the front-end terminal simulator library Xterm.js is integrated to create and display a simulated terminal simulation interface on the Web page.

[0117] Specifically, when the page is loaded, use Xterm.js to create a Terminal instance, set the font color, background color, cursor style, etc., and then load the adaptive plug-in through the loadAddon method of Xterm.js, so that the terminal width and height can be automatically adjusted to fit its parent element node. For example, use the API of Xterm.js to initialize the Terminal instance, configure its appearance and behavior as needed, call the loadAddon method to load the adaptive plug-in, and obtain the number of rows and columns after the simulation terminal is adapted.

[0118] In this embodiment, the homepage can use the WebSocket protocol to establish a persistent two-way communication connection with the background server of the simulation terminal. For example, the WebSocket connection is established with the above-obtained parameters such as the number of rows and columns to prepare for subsequent communication.

[0119] In this embodiment, the user input events in the Terminal instance can be monitored to capture the commands input by the user. For example, the event monitoring method provided by Xterm.js is used to monitor the user input, and when the input events of the user simulation interface are monitored, the commands input by the user are sent to the background server through the send method of WebSocket.

[0120] In this embodiment, after the background server returns the corresponding target data based on the command input by the user, the target data returned by the background server can be received and parsed in the onmessage callback function of the WebSocket, and the write() method of the Terminal instance can be used to output the parsed data to the simulation interface on the homepage.

[0121] In this embodiment, by establishing a simulation interface of the simulation terminal on the homepage, a user is provided with an experience similar to the operation of the simulation terminal, so that the user can operate in the Web environment without having to operate directly on the simulation terminal, and by monitoring the input events on the simulation interface, the user's commands can be captured and sent to the background server, and the server then returns the target data based on the user input, and the front end parses and displays it, thereby realizing a closed-loop interaction process, thereby enabling the user to perform simulation operations on the Web browser, thereby improving the flexibility of the simulation operation.

[0122] In some embodiments, the method further comprises:

[0123] When the browser window size changes, obtain the change parameters of the emulated terminal in adapting to the browser window size;

[0124] The change parameters are sent to the background server so that the background server can interact with the simulation interface based on the change parameters.

[0125] In this embodiment, when the browser window size changes, the emulation terminal interface needs to be re-adapted and the number of rows and columns needs to be updated. Specifically, the browser resize event can be monitored, and the loadAddon method of Xterm.js can be called to make the emulation terminal re-adapt to the browser window size, obtain the window size change parameters, such as the number of rows and columns after the window changes, and use the send method of WebSocket to send the new number of rows and columns to the background server to keep the data format unified.

[0126] In this embodiment, by obtaining the parameters for the simulation terminal to adapt to the changes in the browser window size, the interface can be dynamically adjusted according to the size of the browser window without manually adjusting the settings or reloading the page, and these parameters are sent to the background server. The server can adjust the returned data format and content layout according to these parameters, further making the data display match the user's browser window size, thereby reducing the problem of content misalignment or incomplete display.

[0127] The method for accessing a simulated terminal on a Web side provided in the embodiment of the present application can be performed by a device for accessing a simulated terminal on a Web side. In the embodiment of the present application, the device for accessing a simulated terminal on a Web side is used as an example to illustrate the device for accessing a simulated terminal on a Web side provided in the embodiment of the present application.

[0128] The embodiment of the present application also provides a device for accessing a simulation terminal on a Web side.

[0129] like Figure 2 As shown, the device for accessing the simulation terminal on the Web side includes:

[0130] The jump module 210 is used to carry the target parameters of the current web page and jump to the transfer page of the simulation terminal based on the access event of the simulation terminal triggered by the user on the current web page;

[0131] The storage module 220 is used to store the target parameters in the browser locally in the transfer page and redirect the web page to the homepage of the simulation terminal;

[0132] The acquisition module 230 is used to acquire the target parameters from the local browser during the homepage loading process.

[0133] According to the method of accessing the simulation terminal on the Web side of the present application, based on the access event of the simulation terminal triggered by the user on the current web page, the target parameters of the current web page are carried to jump to the transfer page of the simulation terminal; the target parameters are stored locally in the browser in the transfer page, and the web page is redirected to the homepage of the simulation terminal; during the loading of the homepage, the target parameters are obtained from the local browser. The embodiment of the present application jumps to the transfer page with only the target parameters when the user's current web page triggers an access event, and stores the target parameters locally in the browser, instead of directly adding the target parameters to the homepage URL of the simulation terminal, so that when the simulation terminal homepage is loaded, it is not necessary to obtain the target parameters from the URL, but to obtain the target parameters from the local browser, thereby reducing the possibility of information being intercepted during network transmission, realizing the senseless transmission of sensitive information, reducing the risk of sensitive information exposure, and improving data security during cross-domain communication.

[0134] In some embodiments, the jump module 210 is further configured to:

[0135] Get target parameters;

[0136] Use the window.open function to carry the target parameter to jump to the transfer page of the simulation terminal.

[0137] In some embodiments, the storage module 220 is further configured to:

[0138] Through the window.onload event, after the transfer page is loaded, the target parameters in the URL are parsed;

[0139] Store the target parameters in the browser's localStorage.

[0140] In some embodiments, the storage module 220 is further configured to:

[0141] Use _self as the parameter of the window.open function to redirect the web page to the home page of the emulated terminal.

[0142] In some embodiments, the acquisition module 230 is further configured to:

[0143] During the loading of the home page, the target parameters stored in localStorage are obtained through the localStorage.getItem method.

[0144] In some embodiments, the acquisition module 230 is further configured to:

[0145] After the homepage obtains the target parameters from the local browser, a two-way communication protocol is used to carry the target parameters and communicate with the background server of the simulation terminal.

[0146] In some embodiments, the acquisition module 230 is further configured to:

[0147] Create a simulated terminal interface on the home page;

[0148] When an input event of the user simulation interface is monitored, the command input by the user is sent to the background server of the simulation terminal through a two-way communication protocol, so that the background server returns the corresponding target data based on the command input by the user;

[0149] Parse the target data and write the parsed target data into the simulation interface.

[0150] In some embodiments, the acquisition module 230 is further configured to:

[0151] When the browser window size changes, obtain the change parameters of the emulated terminal in adapting to the browser window size;

[0152] The change parameters are sent to the background server so that the background server can interact with the simulation interface based on the change parameters.

[0153] The device for accessing the simulation terminal on the Web side in the embodiment of the present application can be an electronic device, or a component in the electronic device, such as an integrated circuit or a chip. The electronic device can be a terminal, or other devices other than the terminal. Exemplarily, the electronic device can be a mobile phone, a tablet computer, a laptop computer, a palmtop computer, a vehicle-mounted electronic device, a mobile Internet device (Mobile Internet Device, MID), an augmented reality (augmented reality, AR) / virtual reality (virtual reality, VR) device, a robot, a wearable device, an ultra-mobile personal computer (ultra-mobile personal computer, UMPC), a netbook or a personal digital assistant (personal digital assistant, PDA), etc., and can also be a server, a network attached storage (Network Attached Storage, NAS), a personal computer (personal computer, PC), a television (television, TV), a teller machine or a self-service machine, etc., which is not specifically limited in the embodiment of the present application.

[0154] The device for accessing the simulation terminal on the Web side in the embodiment of the present application may be a device having an operating system. The operating system may be a Microsoft (Windows) operating system, an Android (Android) operating system, an IOS operating system, or other possible operating systems, which are not specifically limited in the embodiment of the present application.

[0155] In some embodiments, Figure 3 As shown, an embodiment of the present application also provides an electronic device 300, including a processor 301, a memory 302, and a computer program stored in the memory 302 and executable on the processor 301. When the program is executed by the processor 301, each process of the above-mentioned method embodiment for accessing a simulation terminal on a Web side is implemented, and the same technical effect can be achieved. To avoid repetition, it will not be described here.

[0156] It should be noted that the electronic devices in the embodiments of the present application include the above-mentioned mobile electronic devices and non-mobile electronic devices.

[0157] An embodiment of the present application also provides a non-transitory computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the various processes of the above-mentioned method embodiment for accessing a simulation terminal on a Web side are implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.

[0158] The processor is the processor in the electronic device in the above embodiment. The readable storage medium includes a computer readable storage medium, such as a computer read-only memory ROM, a random access memory RAM, a magnetic disk or an optical disk.

[0159] The embodiment of the present application also provides a computer program product, including a computer program, which implements the above-mentioned method of accessing a simulation terminal on a Web side when executed by a processor.

[0160] The processor is the processor in the electronic device in the above embodiment. The readable storage medium includes a computer readable storage medium, such as a computer read-only memory ROM, a random access memory RAM, a magnetic disk or an optical disk.

[0161] An embodiment of the present application further provides a chip, which includes a processor and a communication interface, the communication interface and the processor are coupled, and the processor is used to run programs or instructions to implement the various processes of the above-mentioned method embodiment based on accessing the simulation terminal on the Web side, and can achieve the same technical effect. To avoid repetition, it will not be repeated here.

[0162] It should be understood that the chip mentioned in the embodiments of the present application can also be called a system-level chip, a system chip, a chip system or a system-on-chip chip, etc.

[0163] It should be noted that, in this article, the terms "comprise", "include" or any other variant thereof are intended to cover non-exclusive inclusion, so that the process, method, article or device including a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise one..." do not exclude the presence of other identical elements in the process, method, article or device including the element. In addition, it should be pointed out that the scope of the methods and devices in the embodiments of the present application is not limited to performing functions in the order shown or discussed, and may also include performing functions in a substantially simultaneous manner or in reverse order according to the functions involved, for example, the described method may be performed in an order different from that described, and various steps may also be added, omitted, or combined. In addition, the features described with reference to certain examples may be combined in other examples.

[0164] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a computer software product, which is stored in a storage medium (such as ROM / RAM, a disk, or an optical disk), and includes a number of instructions for a terminal (which can be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods described in each embodiment of the present application.

[0165] The embodiments of the present application are described above in conjunction with the accompanying drawings, but the present application is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the guidance of the present application, ordinary technicians in this field can also make many forms without departing from the purpose of the present application and the scope of protection of the claims, all of which are within the protection of the present application.

[0166] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "illustrative embodiments", "examples", "specific examples", or "some examples" means that the specific features, structures, materials, or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present application. In this specification, the schematic representation of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials, or characteristics described may be combined in any one or more embodiments or examples in a suitable manner.

[0167] Although the embodiments of the present application have been shown and described, those skilled in the art will appreciate that various changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the present application, and that the scope of the present application is defined by the claims and their equivalents.

Claims

1. A method for accessing a simulation terminal on a Web terminal. It is characterized in that include: Based on the access event of the simulation terminal triggered by the user on the current webpage, jump to the transfer page of the simulation terminal with the target parameter of the current webpage; In the transfer page, the target parameter is stored locally in the browser, and the web page is redirected to the homepage of the simulation terminal; During the loading process of the homepage, the target parameter is obtained locally from the browser.

2. The method according to claim 1, It is characterized in that The step of carrying the target parameter of the current webpage to jump to the transfer page of the simulation terminal includes: Obtaining the target parameters; The target parameter is carried through the window.open function to jump to the transfer page of the simulation terminal.

3. The method according to claim 1, It is characterized in that Storing the target parameter locally in the browser in the transfer page includes: Through the window.onload event, after the transfer page is loaded, the target parameter in the URL is parsed; The target parameters are stored in the browser's localStorage.

4. The method according to claim 3, It is characterized in that The step of redirecting a web page to a home page of the simulation terminal comprises: Use _self as the parameter of the window.open function to redirect the web page to the homepage of the emulated terminal.

5. The method according to claim 3, It is characterized in that The step of obtaining the target parameter from the browser locally during the loading of the homepage includes: During the loading process of the homepage, the target parameter stored in localStorage is obtained through the localStorage.getItem method.

6. The method according to claim 1, It is characterized in that The method further comprises: After the homepage obtains the target parameter from the browser locally, a two-way communication protocol is used to carry the target parameter to communicate with the background server of the simulation terminal.

7. The method according to claim 1, It is characterized in that The method further comprises: Establishing a simulation interface of the simulation terminal in the homepage; When an input event of the user's simulated interface is monitored, the command input by the user is sent to the background server of the simulation terminal through a two-way communication protocol, so that the background server returns the corresponding target data based on the command input by the user; The target data is parsed, and the parsed target data is written into the simulation interface.

8. The method according to claim 7, It is characterized in that The method further comprises: When the browser window size changes, obtaining the change parameter of the simulation terminal in adapting to the browser window size; The change parameter is sent to the background server, so that the background server interacts with the simulation interface based on the change parameter.

9. A device for accessing a simulation terminal on a Web terminal, It is characterized in that include: A jump module, used to carry the target parameters of the current web page and jump to the transfer page of the simulation terminal based on the access event of the simulation terminal triggered by the user on the current web page; A storage module, used for storing the target parameters locally in the browser in the transfer page, and redirecting the web page to the homepage of the simulation terminal; The acquisition module is used to acquire the target parameter from the local browser during the loading process of the homepage.

10. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, It is characterized in that When the processor executes the program, the method according to any one of claims 1 to 8 is implemented.