WO2017193822A1 - 一种网页运行方法及装置、终端、存储介质 - Google Patents

一种网页运行方法及装置、终端、存储介质 Download PDF

Info

Publication number
WO2017193822A1
WO2017193822A1 PCT/CN2017/082290 CN2017082290W WO2017193822A1 WO 2017193822 A1 WO2017193822 A1 WO 2017193822A1 CN 2017082290 W CN2017082290 W CN 2017082290W WO 2017193822 A1 WO2017193822 A1 WO 2017193822A1
Authority
WO
WIPO (PCT)
Prior art keywords
page
response
payment
terminal
game
Prior art date
Application number
PCT/CN2017/082290
Other languages
English (en)
French (fr)
Inventor
王视鎏
杨三金
邓磊
于洲
Original Assignee
腾讯科技(深圳)有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 腾讯科技(深圳)有限公司 filed Critical 腾讯科技(深圳)有限公司
Publication of WO2017193822A1 publication Critical patent/WO2017193822A1/zh
Priority to US15/982,189 priority Critical patent/US20180264361A1/en

Links

Images

Classifications

    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F13/00Video games, i.e. games using an electronically generated display having two or more dimensions
    • A63F13/45Controlling the progress of the video game
    • A63F13/49Saving the game status; Pausing or ending the game
    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F13/00Video games, i.e. games using an electronically generated display having two or more dimensions
    • A63F13/30Interconnection arrangements between game servers and game devices; Interconnection arrangements between game devices; Interconnection arrangements between game servers
    • A63F13/33Interconnection arrangements between game servers and game devices; Interconnection arrangements between game devices; Interconnection arrangements between game servers using wide area network [WAN] connections
    • A63F13/335Interconnection arrangements between game servers and game devices; Interconnection arrangements between game devices; Interconnection arrangements between game servers using wide area network [WAN] connections using Internet
    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F13/00Video games, i.e. games using an electronically generated display having two or more dimensions
    • A63F13/30Interconnection arrangements between game servers and game devices; Interconnection arrangements between game devices; Interconnection arrangements between game servers
    • A63F13/35Details of game servers
    • A63F13/352Details of game servers involving special game server arrangements, e.g. regional servers connected to a national server or a plurality of servers managing partitions of the game world
    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F13/00Video games, i.e. games using an electronically generated display having two or more dimensions
    • A63F13/70Game security or game management aspects
    • A63F13/79Game security or game management aspects involving player-related data, e.g. identities, accounts, preferences or play histories
    • A63F13/792Game security or game management aspects involving player-related data, e.g. identities, accounts, preferences or play histories for payment purposes, e.g. monthly subscriptions
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/957Browsing optimisation, e.g. caching or content distillation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/958Organisation or management of web site content, e.g. publishing, maintaining pages or automatic linking
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0481Interaction techniques based on graphical user interfaces [GUI] based on specific properties of the displayed interaction object or a metaphor-based environment, e.g. interaction with desktop elements like windows or icons, or assisted by a cursor's changing behaviour or appearance
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/08Payment architectures
    • G06Q20/12Payment architectures specially adapted for electronic shopping systems
    • G06Q20/123Shopping for digital content

Definitions

  • the present invention relates to computer technology, and in particular, to a webpage running method and device, a terminal, and a storage medium.
  • the webpage can be opened in the new tab (tab) by popping up a new tab (tab) bar.
  • the A webpage and the B webpage are simultaneously displayed in different tab bars of the browser, and the user can select to browse the A webpage or the B webpage by switching the tab bar operation; or the terminal can also be in the iframe of the A webpage.
  • Open the B webpage, and the B webpage is displayed on the A webpage as the internal signature bar.
  • the user can return to the A webpage by closing the internal signature bar of the B webpage.
  • the terminal opening the B webpage does not affect the display of the A webpage. And running, the user can switch between the A webpage and the B webpage. After returning to the A webpage, the A webpage still shows the state when the user leaves the webpage.
  • the operating system support screens of some mobile terminals are full on the display interface of the terminal, and the browsing scenes in a large number of social applications do not support multi-tab bar browsing, but can only be displayed in a single tab bar, in the tab bar.
  • the B web page is displayed, it is necessary to end the A webpage on the tab bar.
  • the embodiment of the present invention provides a webpage running method and device, a terminal, and a storage medium, which can improve the user experience, in order to solve at least one problem existing in the prior art.
  • An embodiment of the present invention provides a webpage running method, where the method includes:
  • the second operation is for ending the second page
  • An embodiment of the present invention provides a webpage running apparatus, where the apparatus includes: a first acquiring unit, a first responding unit, a jumping unit, a second acquiring unit, and a restoring unit, wherein:
  • the first obtaining unit is configured to acquire a first operation of the user on the first page
  • the first response unit is configured to record status information of the first page and obtain the second page in response to the first operation
  • the jump unit is configured to jump from the first page to the second page
  • the second acquiring unit is configured to acquire a second operation of the user on the second page, where the second operation is used to end the second page;
  • the recovery unit is configured to, in response to the second operation, jump from the second page to the first page according to status information of the first page.
  • An embodiment of the present invention provides a terminal, where the terminal includes a processor and a display, where:
  • the display is configured to display the first page or the second page
  • the processor is configured to acquire a first operation of the user on the first page; in response to the first operation, record status information of the first page and acquire the second page; and control the display from the display
  • the first page jumps to display the second page; acquires a second operation of the user on the second page, the second operation is used to end the second page; and in response to the second operation, according to The status information of the first page controls the display to jump from displaying the second page to displaying the first page.
  • the embodiment of the present invention provides a computer storage medium, where the computer storage medium stores computer executable instructions, and the computer executable instructions are used to execute the webpage running method provided by the embodiment of the present invention.
  • the embodiment of the present invention provides a webpage running method and device, a terminal, and a storage medium, where the terminal acquires a first operation of the user on the first page; in response to the first operation, records state information of the first page and obtains Ending the first page, jumping from the first page to the second page; acquiring a second operation of the user on the second page, the second operation is ending The second page; in response to the second operation, jumping from the second page to the first page according to status information of the first page; thus, the first page that the terminal jumps to is still In the state when the first page is ended, the user can continue to view or operate the first page in the state to improve the user experience.
  • FIG. 1 is a schematic flowchart of a webpage running process according to an embodiment of the present invention
  • FIG. 2 is a schematic flowchart of an implementation process of a webpage running method according to an embodiment of the present invention
  • FIG. 3 is a schematic diagram of a process of returning a webpage page after triggering a login service on a webpage page according to an embodiment of the present invention
  • FIG. 4 is a schematic diagram of an implementation process of returning a webpage page after triggering a login service on a webpage page according to an embodiment of the present invention
  • FIG. 5 is a schematic structural diagram of a system for implementing a method for running a webpage according to an embodiment of the present invention
  • FIG. 6 is a schematic flowchart of returning to a webpage page after triggering a payment service on a webpage page according to an embodiment of the present invention
  • FIG. 7A is a schematic flowchart of an implementation process of returning a webpage after triggering a payment service on a webpage page according to an embodiment of the present invention
  • FIG. 7B is a schematic structural diagram of a system for implementing a method for running a webpage according to an embodiment of the present invention.
  • FIG. 8 is a schematic diagram of a process of returning a network game page after triggering other services on the notification bar when playing a game on the online game page according to an embodiment of the present invention
  • FIG. 9 is a schematic structural diagram of a composition of a webpage running device according to an embodiment of the present invention.
  • FIG. 10A is a schematic structural diagram of hardware components of a terminal according to an embodiment of the present invention.
  • FIG. 10B is a schematic structural diagram of a hardware of a terminal according to an embodiment of the present invention.
  • the terminal displays the online game page, and then according to the operation of the online game page shown by the user in FIG.
  • the online game page shown in Figure B in Figure 1 jumps to the forum page shown in Figure C in Figure 1, and then clicks the "Back to Game” floating box to return to the online game page.
  • the status of the online game page displayed on the terminal is shown as D in Figure 1. The figure shows the status when the online game page was ended.
  • the embodiment of the present invention provides a webpage running method, which is applied to a terminal, and the function implemented by the webpage running method can pass through a processor in the terminal.
  • the program code is called to implement, of course, the program code can be saved in a computer storage medium.
  • the terminal includes at least a processor and a storage medium.
  • FIG. 2 is a schematic flowchart of an implementation process of a webpage running method according to an embodiment of the present invention. As shown in FIG. 2, the method includes:
  • Step S101 Acquire a first operation of the user on the first page.
  • the first page and the second page in the following embodiments may all be web pages, and the resources loaded on the first page include multimedia resources and/or game resources.
  • web pages can use various versions of web pages, for example, H5 (the fifth major modified HTML standard of Hypertext Markup Language (HTML)) page can be used.
  • H5 the fifth major modified HTML standard of Hypertext Markup Language (HTML)
  • the user can perform the online game page on the terminal screen by using a finger or an electric pen. Touch operation.
  • the first operation is an operation of the user requesting the terminal to load a page outside the online game, and the first operation includes an operation of clicking an external link and clicking to perform a certain service (the service cannot be performed on the online game page, and a specific service page is required).
  • the first operation is performed on the online game page.
  • the online game page has two types of requirements for external new pages: external links and business processes.
  • a new page corresponding to the external link that is, the forum page is taken as an example.
  • the online game page displays a menu floating box containing a floating column such as “Forum”.
  • the terminal obtains the user’s click on the “Forum” floating bar to obtain the user’s first on the online game page. operating.
  • Step S102 In response to the first operation, record status information of the first page and acquire the second page.
  • the terminal obtains the operation after the user clicks the "forum" floating bar, and knows
  • the terminal records the status information of the first page, such as the level of the game level where the online game page is currently located, the game progress information of the user's remaining challenge times, and the terminal is The page progress information such as the content of the online game page displayed in the current display interface. According to the status information, the terminal can completely recover the online game page shown in FIG. 1B. At the same time, the terminal will get the forum page.
  • the process of obtaining the forum page by the terminal may be that the terminal obtains the external link corresponding to the forum page according to the obtained first operation, and the external link may be in the form of a Uniform Resource Locator (URL), and the terminal refers to the forum according to the URL.
  • the server sends the request, and the forum server returns the data of the forum page to the terminal. After the terminal obtains the data of the forum page, the forum page is generated accordingly.
  • URL Uniform Resource Locator
  • Step S103 Jump from the first page to the second page.
  • the terminal After receiving the above example, after the terminal obtains the second page, that is, the forum page, as shown in FIG. 1, it will jump from the online game page shown in FIG. 1B to the forum page shown in FIG. .
  • the first page animation may be displayed as a "return game” hovering box on the second page, so that the user has obvious perception and browses the second The game can be returned to the game through this "return game” hover box.
  • the floating menu on the online game page and the “return game” floating frame of the hidden online game page on the first page are always kept at the same position on the display interface, which is convenient for the user to operate and enhance the user experience.
  • Step S104 Acquire a second operation of the user on the second page, where the second operation is used to end the second page.
  • the user can perform a sliding operation on the forum page to view various information in the forum.
  • the second operation can be performed on the second page, and the second operation is used to end.
  • the second page indicates that the user wants to leave the second page, and the second operation may include a return operation and an end operation.
  • the "return game” hover box is the user's second action (return) Operation), or the user clicks the close virtual key "x" on the second page to be the user's second operation (end operation).
  • Step S105 In response to the second operation, jumping from the second page to the first page according to the state information of the first page.
  • the terminal After acquiring the second operation, the terminal ends the second page in response to the second operation, and restores the first page according to the state information of the first page, and the terminal controls the page on the display interface.
  • the forum page shown in Figure C in Figure 1 jumps to the first page shown in Figure D.
  • the method for running the webpage can be run in various browsers, and the user can freely switch between browsing the forum page and the game without losing the progress of the game, so that the experience of the whole game is smoother. Improve the user experience.
  • the terminal when the terminal ends the first page and jumps from displaying the first page to displaying the second page, the terminal records the state information of the first page at this time, so that the terminal is from the When the second page returns to the first page, the first page is restored according to the state information of the first page, so that the first page displayed when returning to the first page is restored to the end state; thus, the user is You can continue to view or operate the first page in the previous state to improve the user experience.
  • an embodiment of the present invention provides a method for running a webpage, which is applied to a terminal, and the terminal only supports single window display, and the full screen of the page displayed by the single window is displayed on the display interface of the terminal.
  • the functions implemented by the webpage running method can be implemented by a processor calling program code in the terminal.
  • the program code can be saved in a computer storage medium.
  • the terminal includes at least a processor and a storage medium. The method includes:
  • Step S201 The terminal acquires a fourth operation of the user on the third page, where the fourth operation is used to trigger the terminal to acquire the online game page as the first page.
  • the user can use the finger on the terminal screen.
  • the touch operation is performed on the displayed public number page on the screen, and the user performs the fourth operation on the public number page: as shown in FIG. 3A, the user clicks the “web game 1” operation with the finger, and triggers the terminal to start acquiring the “webpage”.
  • Game 1" corresponds to the flow of the online game page.
  • Step S202 The terminal responds to the fourth operation, and controls the third page to invoke the game framework, and controls the game framework to send a second request to the third server, where the second request is used to instruct the third server to return. Game data.
  • the WebView control of the terminal acquires a game ID corresponding to “Web Game 1”, invokes a game framework through a Java Script Application Programming Interface (JSAPI), and controls the game framework according to the The game ID generates a second request, and controls the game framework to send a second request to the third server, that is, the game server, the second request is used to instruct the third server to return game data corresponding to “web game 1”.
  • JSAPI Java Script Application Programming Interface
  • Step S203 The terminal receives the game data returned by the third server, and controls the game framework to load the game data to obtain the online game page.
  • the third server After receiving the second request, the third server returns the game data corresponding to “Web Game 1” to the terminal, and after receiving the game data, the terminal sends the game data to the game framework, and controls the The game framework loads the game data to obtain a web game page corresponding to "web game 1".
  • step S202 and step S203 a transition page as shown in FIG. 3B can be displayed on the display interface of the terminal.
  • Step S204 The terminal jumps from the third page to the online game page.
  • the terminal After the terminal obtains the online game page corresponding to the “web game 1”, the user jumps from the third page to the online game page to start running the “web game 1” game; at this time, as shown in FIG. 3C.
  • the online game page displayed on the terminal display interface is in an initial state, that is, to be logged in.
  • Step S205 The terminal acquires a first operation of the user on the online game page.
  • the terminal When the terminal jumps from the third page to the online game page, the online game page is in a state to be logged in, and the user needs to perform a login service. As shown in FIG. 3C, the user clicks on the online game page with the “WeChat friend”. After the game is played, the terminal obtains the user's click operation to obtain the first operation of the user on the online game page.
  • Step S206 The terminal responds to the first operation, records status information of the first page, and acquires the second page.
  • the terminal After receiving the above example, the terminal obtains the user to click the "play with WeChat friends" virtual button operation, and knows that the user wants to enter the second page, that is, the login page.
  • the game framework of the terminal records the status information of the online game page, such as the record office.
  • the online game page is in a state to be logged in.
  • the game framework of the terminal can completely recover the online game page in the login state shown in FIG. 3 according to the state information.
  • the terminal's game framework will call the login interface, and notify the WebView control to load and display the login page through the login interface.
  • Step S207 The terminal jumps from the first page to the second page.
  • the terminal After the WebView control of the terminal obtains the second page, that is, the login page, as shown in FIG. 3, the terminal jumps from the online game page shown in FIG. 3C to the login page shown in FIG. 3D. .
  • Step S208 The terminal acquires a second operation of the user on the second page.
  • the second operation of the user on the second page may be that the user clicks on the “return game” floating box operation on the login page, or the user clicks on the login page. "Confirm Login” virtual key operation.
  • the second operation is when the user clicks the "return game” floating frame operation on the login page, and the terminal responds to the second operation, and only proceeds to step S211.
  • the second operation is when the user clicks the "confirm login” virtual key operation on the login page, and the terminal performs step S209 to step 212 in response to the second operation.
  • Step S209 the terminal responds to the second operation, generates a first request, and the first request The request is sent to the first server, and the first request is used to request the first server to return a first response.
  • the terminal responds to the user clicking the "confirm login" virtual key operation, obtains the WeChat account information, and generates a first request according to the first request.
  • the first request carries the WeChat account information, and the terminal sends the first request to the first server. That is, the WeChat server, the first request is used to request the WeChat server to authorize the WeChat account information for the game.
  • Step S210 The terminal receives the first response returned by the first server, where the first response is used to trigger the terminal to jump from the second page to the first page.
  • the WeChat server After the WeChat server receives the first request and confirms that the user authorizes to use the WeChat account information to log in to the game, the WeChat server returns a first response indicating that the WeChat account information is successfully authorized to the terminal; The WeChat account information is carried; after receiving the first response, the terminal confirms that the user authorizes to use the WeChat account information to log in to the game, and at this time, triggers a jump from the second page to the first page.
  • Step S211 The terminal jumps from the second page to the first page according to the state information of the first page.
  • the terminal After receiving the first response through the external communication interface, the terminal sends the first response to the WebView control. After the first response is obtained, the WebView control directly ends the second page and forwards the game to the game framework through the JSAPI. After the first response is obtained, the game framework of the terminal recovers the online game page shown in FIG. 3B according to the state information of the first page, as shown in FIG. 3D.
  • the login page jumps to the online game page shown in FIG. 3 in FIG. 3; as shown in FIG. 3, the online game page shown in FIG. 3E is in the same state as the online game page shown in FIG.
  • Step S212 The terminal updates the first page from the third state to the fourth state.
  • the first response carries the WeChat account information authorized to log in and the registered game ID.
  • the game framework will use the game client to send the WeChat account information.
  • the game ID is stored in the memory of the terminal as a login ticket, and then the login ticket is encrypted and processed, and then sent to the game server.
  • the game server decrypts and obtains the login ticket, the login data corresponding to the login ticket is acquired, and then the game is played.
  • the login data corresponding to the login ticket is sent to the terminal, the terminal sends the login data to the game framework, and controls the game framework to update the first page from the third state to the fourth state;
  • the third state is a state when the state information is loaded on the first page, that is, a state shown in FIG. 3 and FIG. 3, and the fourth state is a state in which login data is loaded to the online game page.
  • the state shown in Fig. 3 is the state shown in Fig. 3.
  • the user can click on the "Enter Game" virtual button on the F picture in Figure 3 to play the game.
  • Step S501 After the WebView control of the terminal loads and displays the public number page of the WeChat game, the fourth operation of the user on the public number page is obtained. At this time, the WebView control of the terminal responds to the fourth operation to obtain the fourth operation.
  • the game ID the control WebView control calls the game framework through the JSAPI, sends the game ID to the game framework, controls the game framework to start the game, and the terminal can display the game framework to start the game in the form of a transition page, the game framework receives the game After the game ID is described, a second request is generated according to the game ID, and then, as shown in FIG.
  • the terminal 100 controls the game framework to send a second request to the third server, that is, the game server 200, and the game server 200 receives the After the second request, the corresponding game data is returned to the terminal 100, the terminal receives the game data, and sends the game data to the game framework, and controls the game framework to load the game data; the game framework loads the game data to form After the online game page, the terminal jumps from the public number page to the online game page, and the terminal displays the Travel page, the online page in case C in FIG. 3 to be logged.
  • Step S502 The terminal starts the game running on the online game page, and the game is in the pending login state.
  • the user needs to trigger the login service on the online game page.
  • the user performs the first on the online game page in the login state.
  • One operation ie click "play with WeChat friends"
  • the terminal obtains the first operation of the user on the online game page, and triggers the login service.
  • the terminal controls the game framework to invoke the login interface to start the login service; the game framework of the terminal needs to obtain the login ticket.
  • Step S503 The terminal determines whether the login ticket of the previous user is recorded in the game framework.
  • Step S510 If yes, the terminal directly accesses the background server, that is, the game server, and sends the login ticket to the game server, that is, the terminal directly controls the game framework to send the login ticket to the game server.
  • Step S504 If the login ticket is not recorded in the game framework, it is determined to read the pre-identification information. If the WeChat authorized login game operation has been performed before the online game page is opened, the terminal may save the login ticket and the game application (APP) ID pre-identity information in the memory when the user authorizes the login, and the game framework can read The pre-identification information is taken. If the WeChat authorized login game operation is not performed before the online game page is opened this time, the game framework cannot read the pre-identification information.
  • APP game application
  • Step S505 When there is pre-identification information, the terminal controls the game framework to read the pre-identification information, obtains the login ticket from the pre-identification information, and then the terminal controls the game framework to send the login ticket to the game server;
  • the terminal controls the game framework to complete, and the process can refer to the existing login process, and the terminal can always display the online game page on the display interface without performing a page jump.
  • Step S506 When there is no pre-identification information, the terminal invokes external login, and the WebView control of the terminal raises the game framework through JSAPI, that is, hides the game framework, ends the current online game page, records the status information of the first page, and loads the browser.
  • the terminal In the game business public number authorization page, the terminal jumps from the online game page shown in FIG. 3C to the login page of the game business public number authorization page shown in FIG.
  • Step S507 User authorization, that is, the user clicks the “confirm login” virtual key operation on the login page shown in FIG. 3 to perform authorization; at this time, the terminal acquires the user on the login page.
  • the control WebView control generates a first request in response to the user clicking the "confirm login” virtual key operation, and the first request is used to request the first server, that is, the WeChat server to authorize the WeChat account to be used for the game, as shown in FIG.
  • the terminal 100 sends the first request to the WeChat server 300.
  • the WeChat server 300 confirms that the user authorizes to use the WeChat account information to log in to the game, and the WeChat server 300 returns to the terminal. A first response indicating that the authorization was successful.
  • Step S508 After receiving the first response through the external communication interface, the terminal 100 sends the first response to the WebView control. After the first response is obtained, the WebView control directly ends the second page and passes the JSAPI. Forwarding the first response to the game framework, after the game framework of the terminal acquires the first response, the first response triggers the game framework to recover the online game shown in FIG. 3B according to the state information of the first page. The page, the terminal jumps from the login page shown in FIG. 3D to the online game page shown in FIG.
  • Step S509 The game framework acquires the login ticket, and the terminal may obtain the login ticket by reading the pre-identification information in step S505 or perform step S508 to control the game framework to obtain the login ticket from the received first response, and the terminal will pass the game.
  • the client saves the WeChat account information and the game ID as the login ticket in the memory.
  • Step S510 The terminal controls the game framework to perform processing such as encryption on the login ticket, and then sends the registration ticket to the game server.
  • Step S511 After the game server acquires the login ticket, the login ticket may be verified for validity.
  • Step S512 When the verification authorization ticket is invalid, as shown in FIG. 5, the game server 200 sends an exit game notification to the terminal, and after receiving the exit game notification, the terminal 100 controls the game framework to exit the game, closes the online game page, and returns to the public number. page.
  • Step S513 When the login ticket is valid, the game server 200 calls back the game, and sends the login data corresponding to the login ticket to the terminal, and the terminal performs the game operation according to the login data, and the root According to the login data, the online game page is controlled to run from the state shown in FIG. 3B to the state shown in FIG. 3E.
  • the service used in the method of this embodiment may also be a service of sharing, brushing, and pulling a friend.
  • the process may refer to the foregoing, and will not be described in detail herein.
  • the game framework on the terminal controls the operation of the online game page independently of the WebView control to control the displayed page.
  • the user can freely switch between the WebView control control display page and the game framework control online game page without losing the game progress on the online game page.
  • the method of this embodiment is applicable to various browsers.
  • the terminal when the terminal enters a certain service process, when the terminal jumps from displaying the first page to displaying the second page, the terminal records the status information of the first page at this time, such that the terminal When returning from the second page to the first page, the first page is restored according to the state information of the first page, so that the first page displayed when returning is restored to the end state, so that the user You can continue to view or operate the first page in the previous state to improve the user experience.
  • an embodiment of the present invention provides a method for running a webpage, which is applied to a terminal, and the terminal only supports single window display, and the full screen of the page displayed by the single window is displayed on the display interface of the terminal.
  • the functions implemented by the webpage running method can be implemented by a processor calling program code in the terminal.
  • the program code can be saved in a computer storage medium.
  • the terminal includes at least a processor and a storage medium. The method includes:
  • Step S301 The terminal acquires a first operation of the user on the first page.
  • the user can perform a touch operation on the displayed online game page on the terminal screen by using a finger or an electric pen; as shown in FIG. 6A, the user clicks
  • the game framework responds to the operation, and the option box “Select purchase times” pops up on the online game page for the user to place an order.
  • the user selects the number of purchases "10 times” in the "Select purchase times” option box and clicks the confirmation.
  • Step S302 The terminal stops the operation of the first page in response to the first operation, records status information of the first page, and acquires the second page.
  • the terminal After the game framework of the terminal obtains the first operation of the user clicking the "confirm purchase” virtual key, the terminal starts to pay the service in response to the first operation; at this time, the terminal stops the operation of the first page and records The status information of the first page, such as the level of the game level where the online game page is currently located, the number of remaining challenges of the user today, the game progress information of the remaining gold coins, and the content of the content currently displayed by the terminal in the online game page, etc. Progress information. According to the status information, the terminal can completely recover the online game page shown in FIG. 6B. At the same time, the terminal will obtain the second page, the payment page.
  • the status information of the first page such as the level of the game level where the online game page is currently located, the number of remaining challenges of the user today, the game progress information of the remaining gold coins, and the content of the content currently displayed by the terminal in the online game page, etc. Progress information. According to the status information, the terminal can completely recover the online game page shown in FIG. 6B. At the
  • Step S303 The terminal jumps from the first page to the second page.
  • the terminal After the terminal obtains the second page, that is, the payment page, as shown in FIG. 6, it will jump from the online game page shown in FIG. 6A to the payment page shown in FIG.
  • Step S304 The terminal acquires a third operation from the second page in the first state.
  • the first state is a state when the second page is loaded with a payment information input request, the second page in the first state is as shown in FIG. 6C, and the third operation is a confirmation input operation of the payment information. .
  • the user can also perform an operation of clicking the “return game” hovering box.
  • the terminal acquires the operation from the second page in the first state, in response to the operation, according to the The status information of a page jumps directly from the second page to the first page.
  • Step S305 The terminal responds to the third operation, generates a payment request, and sends the payment request to the second server, where the payment request is used to request the second server to perform a payment service.
  • the WebView control of the terminal in response to the third operation, generates a payment request according to the payment information confirmed by the user and the login ticket of the user, and then sends the payment request to the second server, that is, the payment server; the payment server receives After the payment request, the root The payment service is performed according to the user information and the payment information in the payment request, and after the payment service is completed, the payment response is returned to the terminal.
  • Step S306 The terminal receives the payment response returned by the second server by using an external communication interface, and controls the external communication interface to send the payment response to the second page.
  • the payment response carries a payment result of the payment server completing the payment service.
  • the terminal receives the payment response through an external communication interface, and controls the external communication interface to send the payment response to the WebView control.
  • Step S307 The terminal controls, according to the payment response, that the second page is updated from the first state to the second state.
  • the WebView control loads the payment response on the second page, and updates the second page from the first state to the second state; the second state is the The state when the payment result is loaded on the second page, and the second page in the second state is as shown in FIG. 6D.
  • Step S308 The terminal acquires a second operation of the user on the second page in the second state.
  • the second operation is a return operation of the user clicking "return game” on the second page, or an end operation for the user to click "payment success" on the second page.
  • Step S309 The terminal controls the second page to send the payment response to the first page.
  • the WebView control of the terminal sends the payment response to the game framework through the JSAPI, where the WebView control corresponds to the second page, and the game frame corresponds to the first page.
  • the terminal may not perform steps S307 and A308, and after obtaining the payment response, directly control the WebView control to send the payment response to the game framework through the JSAPI.
  • Step S310 The terminal jumps from the second page to the first page.
  • the node After the second Web view of the terminal's WebView control is obtained, in response to the second operation, the node After the second page is received, after the game framework receives the payment response, the first page is restored according to the state information of the first page, and jumps from the payment page shown in FIG. 6 in FIG. Go to the first page shown in Figure B.
  • Step S311 The terminal controls, according to the payment response, that the first page is updated from the third state to the fourth state.
  • the terminal control game framework loads the payment response onto the first page to update the first page from the third state to the fourth state.
  • the third state is a state when the state information is loaded on the first page
  • the fourth state is that a payment result corresponding to the payment service is loaded on the first page in the third state.
  • the state of the time Exemplarily, in the foregoing embodiment, in the third state, the number of remaining challenges of the user is 5 times, and the obtained payment response is a response to successfully purchase 10 times of challenges, and the number of remaining challenges of the user in the fourth state is 15 times.
  • the process of the method of this embodiment can be as shown in FIG. 7A.
  • Step S701 The terminal displays the public number page of the WeChat game, and obtains the fourth operation of the user on the public number page.
  • the terminal responds to the fourth operation, acquires the game ID corresponding to the fourth operation, and controls the public number page to invoke the game framework through the JSAPI. Controlling the game framework to start the game, and controlling the game framework to generate a second request according to the game ID, and then the terminal controls the game framework to send a second request to the third server, that is, the game server, and the game server receives the second request After the second request, the corresponding game data is returned to the terminal. After receiving the game data, the terminal sends the game data to the game framework, and controls the game framework to load the game data; the terminal controls the game framework to load the game.
  • the process may be displayed in the form of a transition page.
  • the terminal displays the online game page.
  • the online game page is in a state to be logged in, and after the login process is logged in, the user can perform the game task. .
  • Step S702 After the user logs in to the game, the game is started. If the game is running during the game, the user needs to perform the payment service, as shown in FIG. 6A. Clicking "Purchase Times" on the page triggers the payment service. At this time, the terminal controls the game framework to call the payment interface to start the payment service, and the terminal controls the game framework to call the payment interface to start the game order task in response to the first operation to obtain the task information. .
  • Step S703 The terminal acquires the existing ticket, and the existing ticket acquired at this time is a login ticket. Since the user has logged in to the game, the terminal can obtain the login ticket in the memory.
  • Step 704 Accessing the background server, that is, the terminal 100 controls the game framework to call the payment interface to send the login ticket and task information to the background server, that is, the game server 200, as shown in FIG. 7B.
  • Step S705 The game server successfully orders, the game server 200 acquires the user information according to the login ticket, and obtains the game order information such as how much the user purchases the order to purchase the XX times of the challenge, and the game server 200 sends the game order information.
  • the terminal 100 controls the game framework to call the payment interface to display the order box corresponding to the game order information on the online game page, that is, the option box of “select purchase times” shown in FIG. 6B, then the game The server placed the order successfully.
  • Step S706 The user confirms payment, and the user selects the purchased item and clicks the “confirm purchase” virtual button on the floating box of the order, that is, the user confirms payment.
  • the terminal acquires the first operation of the user on the online game page, and generates the first operation in response to the first operation.
  • the user confirms the order request of the game order information, and the terminal controls the game framework to send the order request to the payment server.
  • Step S707 The payment server places an order, and the payment server performs the ordering task according to the order request, and generates order information such as the order serial number.
  • Step S708 The payment server successfully orders, that is, the payment server 400 sends the order information to the terminal.
  • Step S709 The terminal stores the login ticket corresponding to the order information to the cookie of the terminal. It should be noted that the openid corresponding to the WeChat appid must be guaranteed to be the same user when the payment server places an order and the terminal writes the cookie.
  • Step S710 The game framework of the terminal invokes the external payment interface to send the order information (the order information carries the parameter required by the payment service and the unique identification number of the request through the url parameter), and sends the information to the WebView control, the WebView control.
  • the terminal opens the browser game business transfer payment page, that is, the payment page, and the terminal jumps from the online game page to the payment page shown in FIG.
  • Step S711 The user can perform an input confirmation payment operation on the payment page, and the terminal obtains the confirmation payment operation from the payment page shown in FIG. 6C. Then, as shown in FIG. 7B, the terminal controls the WebView control to call the interface of the payment server. Sending the confirmation information to the payment server 400, the payment server 400 performs a payment task, and after the payment server 400 completes the payment task, the payment result is carried in the payment response and sent to the terminal 100, and the terminal receives the payment server through an external communication interface.
  • the payment page in the second state is as shown in FIG. 6D.
  • Step S712 After the user clicks the return operation of "return game” on the second page or clicks the end operation of "payment success", the terminal acquires the second operation, and the WebView of the terminal acquires the second page of the user in the second state.
  • the second operation in response to the second operation, the second page is ended, and the first page is restored by calling the game framework through the JSAPI, and the terminal jumps from the second page to the first page.
  • Step S713 The terminal controls the WebView control to send the payment response to the game framework; thus, the terminal can control the game framework to update the first page from the third state to the payment response according to the a fourth state
  • the process may be: the terminal control game framework sends the payment response to the game server, and the game server responds according to the payment Updating the responded game data, that is, the payment result, and then calling back the game, transmitting the updated game data to the terminal, the terminal controls the game framework to perform the game running, loading the updated game data, and the first page from the third The status is updated to the fourth status.
  • the payment response carries a unique identification code of the payment service, so the game framework corresponds the payment response to the payment service recorded by the game framework by using the unique identification number, and according to the unique identification code, according to the payment result corresponding to the payment response.
  • the corresponding payment service is updated.
  • the terminal when the terminal ends the first page and jumps from displaying the first page to displaying the second page, the terminal records the status information of the first page at this time, so that the terminal is from the first page.
  • the first page is restored according to the state information of the first page, so that the first page displayed when returning is restored to the state at the end; thus, the user can continue to be in the state
  • the first page of the previous state is viewed or operated to enhance the user experience.
  • the second page completes the payment
  • the first page after the second page completes the payment, the first page is not notified, and the first page needs to perform an operation of clicking “complete payment” by the user, and then sends an update request to the game server to update the status.
  • the payment response may be sent to the first page, and the first page may be quickly and actively sent to the game server to update the status of the first page without the user's operation.
  • an embodiment of the present invention provides a method for running a webpage, which is applied to a terminal, and the terminal only supports single window display, and the full screen of the page displayed by the single window is displayed on the display interface of the terminal.
  • the functions implemented by the webpage running method can be implemented by using a processor in the terminal to call the program code, and of course the program code can be saved in a computer storage medium.
  • the terminal includes at least a processor and a storage medium.
  • the method includes:
  • Step S401 The terminal controls the first page to be displayed in full screen on the display interface.
  • Step S402 The terminal acquires a fifth operation of the user on the notification bar of the terminal, where the fifth operation is an operation of entering a fourth page where the notification message is located on the notification bar, where the fourth page is The page on the second application.
  • the terminal receives a notification message sent by the other terminal or the server to the terminal, and the notification message is displayed on the notification bar of the terminal, and the user wants to view the notification message, as shown in FIG. 8
  • the user performs a pull-down operation, and the terminal responds to the pull-down operation, and displays a notification bar on the terminal as shown in FIG. 8B.
  • the user can click the notification bar as shown in FIG. The option of the notification message in the middle music application, so that the terminal obtains the fifth operation.
  • Step S405 The terminal responds to the fifth operation, records status data of the first page, and acquires the fourth page.
  • the terminal After acquiring the fifth operation, the terminal records the status data of the first page at this time in response to the fifth operation, and acquires a music application page where the notification message in the music application is located.
  • Step S406 The terminal control display interface jumps from the first page to the fourth page.
  • the display interface of the terminal jumps from the online game page to the music application page.
  • Step S407 The terminal acquires a sixth operation of the user on the display interface.
  • the terminal controls the fourth page to be displayed in full screen on the display interface.
  • the display interface is displayed with a “return game” floating frame. If the user wants to return to the first page to continue playing the game, the user may Performing a sixth operation on the display interface: clicking the “return game” floating frame as shown in FIG. 8C; thus, the terminal can acquire the sixth operation on the display interface.
  • Step S408 The terminal responds to the sixth operation, and controls the display interface to jump from the fourth page to the first page according to the state information of the first page.
  • the terminal After the terminal obtains the sixth operation, it is known that the user wants to return to the first page to continue the game. At this time, the terminal responds to the sixth operation, and restores the first page according to the state information of the first page, and controls.
  • the display interface jumps directly from the fourth page to the first page. At this time, the first page displayed by the terminal is in the state shown in FIG. 8 and the state shown in FIG. 8 is the state shown in FIG. the same.
  • the fourth page is described by using a music application page as an example.
  • the fourth page may also be a page of a video application, a page of a chat application, or a page for reading an application.
  • the top of the interface displays the "return game” hovering box.
  • the terminal can control the display interface from the current page as long as the user clicks the "return game” hovering box on the interface. Jump to the online game page, so that users can play while playing, while playing and talking, while playing video, live, when the user returns to the game, the game progress will not be lost, the user can continue the previous game.
  • the terminal when the terminal finishes entering the fourth page of the other application, when the terminal jumps from displaying the first page to displaying the fourth page, the terminal records the state of the first page at this time. Information, and display the system-level "return game” hovering box on the display interface of the terminal, so that the terminal clicks the "return game” hovering box as long as the user obtains the sixth operation of the user on the display interface, and the terminal will according to the The status information of the first page is restored to the first page, and the display interface is controlled to jump directly from the fourth page to the first page that is replied, so that the first page displayed on the display interface is still at the end of the previous page.
  • the state when the user returns to the game, the game progress will not be lost, the user can continue the previous game and enhance the user experience.
  • an embodiment of the present invention provides a webpage running apparatus, and each unit included in the webpage running apparatus and each module included in each unit can be implemented by a processor in the apparatus, and of course
  • the logic circuit can be implemented; in the process of the embodiment, the processor can be a central processing unit (CPU), a microprocessor (MPU), a digital signal processor (DSP), or a field programmable gate array (FPGA).
  • CPU central processing unit
  • MPU microprocessor
  • DSP digital signal processor
  • FPGA field programmable gate array
  • FIG. 9 is a schematic structural diagram of a composition of a webpage running apparatus according to an embodiment of the present invention.
  • the apparatus includes a first acquiring unit 901, a first responding unit 902, a redirecting unit 903, a second acquiring unit 904, and a restoring unit 905. ,among them:
  • the first obtaining unit 901 is configured to acquire a first operation of the user on the first page, where the first page is a webpage, and the resources loaded on the first page include multimedia resources and/or game resources.
  • the first response unit 902 is configured to record status information of the first page and acquire the second page in response to the first operation.
  • the jump unit 903 is configured to jump from the first page to the second page.
  • the second obtaining unit 904 is configured to acquire a second operation of the user on the second page, and the second operation is used to end the second page.
  • the recovery unit 905 is configured to, according to the second operation, jump from the second page to the first page according to the second information.
  • the terminal only supports a single window display, and the full screen of the single window is displayed full on the display interface of the terminal, the device further includes: a display unit, wherein the And a display unit configured to control the first page full screen full display on the display interface.
  • the recovery unit 905 is configured to generate a first request in response to the second operation, and send the first request to a first server, where the first request is for request Receiving, by the first server, a first response, receiving a first response returned by the first server, where the first response is used to trigger a terminal to jump from the second page to the first page; Status information of a page, jumping from the second page to the first page.
  • the apparatus further includes: a third obtaining unit, a second responding unit, a receiving unit, and a first updating unit, where
  • the third obtaining unit is configured to acquire a third operation from the second page in the first state,
  • the first state is a state when the second page is loaded with a payment information input request, and the third operation is a confirmation input operation of the payment information.
  • the second response unit is configured to generate a payment request in response to the third operation, and send the payment request to a second server, where the payment request is used to request the second server to perform a payment service.
  • the receiving unit is configured to receive a payment response returned by the second server, where the payment response carries a payment result of the server completing the payment service.
  • the first update unit is configured to control, according to the payment response, that the second page is updated from the first state to a second state, wherein the second state is that the second page is loaded with the The status at the time of payment.
  • the second obtaining unit is configured to acquire a second operation of the user on the second page in the second state.
  • the apparatus further includes a second update unit, wherein:
  • the receiving unit is configured to receive a payment response returned by the second server by using an external communication interface, and control the external communication interface to send the payment response to the second page, and control the second page to be A payment response is sent to the first page.
  • the second update unit is configured to, after the jump from the second page to the first page, control the first page to update from the third state to the fourth state according to the payment response.
  • the third state is a state when the state information is loaded on the first page
  • the fourth state is that a payment result corresponding to the payment service is loaded on the first page in the third state.
  • the state of the time is a state when the state information is loaded on the first page
  • the fourth state is that a payment result corresponding to the payment service is loaded on the first page in the third state.
  • the apparatus further includes: a fourth obtaining unit, a third responding unit, and a second receiving unit, wherein:
  • a fourth obtaining unit configured to acquire a fourth operation of the user on the third page, where the fourth The operation is used to trigger the terminal to acquire the online game page as the first page;
  • a third response unit configured to, in response to the fourth operation, control the third page to invoke a game framework, and control the game framework to send a second request to the third server, the second request for indicating the The three servers return game data.
  • the second receiving unit is configured to receive the game data returned by the third server, and control the game framework to load the game data to obtain the online game page.
  • a jump unit configured to jump from the third page to the online game page.
  • the first page is a page on the first application
  • the apparatus further includes a fifth obtaining unit, a fourth responding unit, a sixth obtaining unit, and a fifth responding unit, where:
  • the fifth obtaining unit is configured to acquire a fifth operation of the user on the notification bar of the terminal, where the fifth operation is an operation of entering a fourth page where the notification message is located on the notification bar,
  • the fourth page is a page on the second application.
  • the fourth response unit is configured to record status data of the first page and acquire the fourth page in response to the fifth operation.
  • the jump unit is configured to control the display interface to jump from the first page to the fourth page;
  • the sixth obtaining unit is configured to acquire a sixth operation of the user on the display interface.
  • the fifth response unit is configured to, according to the sixth operation, control the display interface to jump from the fourth page to the first page according to the state information of the first page.
  • the apparatus method further includes: stopping the unit, wherein the stopping unit is configured to stop operation of the first page in response to the first operation.
  • FIG. 10A is a schematic structural diagram of a terminal according to an embodiment of the present invention. As shown in FIG. 10A, the terminal includes a display 1001 and a processor 1002, where:
  • the display 1001 is configured to display a first page or a second page.
  • the processor 1002 is configured to acquire a first operation of the user on the first page, where the first page is a webpage, and the resources loaded on the first page include multimedia resources and/or game resources; a first operation, recording status information of the first page and acquiring the second page; controlling the display to jump from displaying the first page to displaying the second page; acquiring a user in the second a second operation on the page, the second operation is for ending the second page; in response to the second operation, jumping from the second page to the first page according to status information of the first page One page.
  • the display can display information processed in the terminal.
  • the display can display a game related user interface (UI) or a graphical user interface (GUI).
  • UI game related user interface
  • GUI graphical user interface
  • the display may be a touch screen, that is, the display screen and the touch panel are superimposed on each other in layers to form a touch screen, such that the display can be used as an input device and an output device.
  • the display may include at least one of a liquid crystal display (LCD), a thin film transistor LCD (TFT-LCD), an organic light emitting diode (OLED) display, a flexible display, a three-dimensional (3D) display, and the like.
  • LCD liquid crystal display
  • TFT-LCD thin film transistor LCD
  • OLED organic light emitting diode
  • the terminal can include two or more displays.
  • a transparent display may be configured to be transparent to allow a user to view from the outside, which may be referred to as a transparent display
  • a typical transparent display may be, for example, a transparent organic light emitting diode (TOLED) display or the like.
  • the terminal can include two or more displays.
  • FIG. 10B is a schematic diagram of a hardware entity of a terminal according to an embodiment of the present invention.
  • the hardware entity of the terminal includes:
  • the cellular module 102 carries the mobile communication of the terminal 100 in a manner of establishing a link to the base station, and the cellular module 102 can cause the terminal to communicate with other terminals or servers through the network.
  • the input module 103 can be configured to receive input character information and to generate signal inputs related to user settings and function controls.
  • the input module may include a touch surface that collects touch operations on or near the user (eg, the user uses any suitable object or accessory such as a finger, a stylus, or the like on the touch surface or on the touch surface.
  • the nearby operation acquires a signal from the touch operation, converts the signal into contact coordinates, and sends it to the processor 101 for processing, and can receive and execute the command sent from the processor 101.
  • Display module 104 can be configured to display the functions implemented by processor 101 and related information.
  • the memory 105 is configured to store instructions and applications executable by the processor 101, and may also cache data to be processed or processed by the processor 101 and each module in the terminal 100 (eg, image data, audio data, voice communication data, and video) Communication data) can be realized by flash memory (FLASH) or random access memory 105 (RAM, Random Access Memory).
  • the processor 101 typically controls the overall operation of the terminal 100.
  • the input module 103 can be implemented as a touch screen to which the user operation data representing the operational characteristics of the touch screen (including the contact position, the number of contacts, the trigger pressure) is output, and the processor 101 can parse the user operation data to determine the user.
  • the function triggered in the display interface generates display data corresponding to the triggered function for the display module 104 to load a page corresponding to the triggered function.
  • the technical solution of the embodiments of the present invention may be embodied in the form of a software product in essence or in the form of a software product stored in a storage medium, including a plurality of instructions.
  • a computer device (which may be a personal computer, server, or network device, etc.) is caused to perform all or part of the methods described in various embodiments of the present invention.
  • the foregoing storage medium includes various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read only memory (ROM), a magnetic disk, or an optical disk.
  • program codes such as a USB flash drive, a mobile hard disk, a read only memory (ROM), a magnetic disk, or an optical disk.
  • the embodiment of the present invention further provides a computer storage medium, where the computer storage medium stores computer executable instructions, and the computer executable instructions are used to execute a webpage running method in the embodiment of the present invention.
  • the disclosed apparatus and method may be implemented in other manners.
  • the device embodiments described above are merely illustrative.
  • the division of the unit is only a logical function division, and the actual implementation may have another The way of dividing, such as: multiple units or components can be combined, or can be integrated into another system, or some features can be ignored, or not executed.
  • the coupling, or direct coupling, or communication connection of the components shown or discussed may be indirect coupling or communication connection through some interfaces, devices or units, and may be electrical, mechanical or other forms. of.
  • each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may be separately used as one unit, or two or more units may be integrated into one unit;
  • the unit can be implemented in the form of hardware or in the form of hardware plus software functional units.
  • the foregoing program may be stored in a computer readable storage medium, and when executed, the program includes The foregoing steps of the method embodiment; and the foregoing storage medium includes: a removable storage device, a read only memory (ROM), a magnetic disk, or an optical disk, and the like, which can store program codes.
  • the above-described integrated unit of the present invention may be stored in a computer readable storage medium if it is implemented in the form of a software function module and sold or used as a standalone product.
  • the technical solution of the embodiments of the present invention may be embodied in the form of a software product in essence or in the form of a software product stored in a storage medium, including a plurality of instructions.
  • a computer device (which may be a personal computer, server, or network device, etc.) is caused to perform all or part of the methods described in various embodiments of the present invention.
  • the foregoing storage medium includes various media that can store program codes, such as a mobile storage device, a ROM, a magnetic disk, or an optical disk.

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Theoretical Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Business, Economics & Management (AREA)
  • General Engineering & Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • General Business, Economics & Management (AREA)
  • Accounting & Taxation (AREA)
  • Computer Security & Cryptography (AREA)
  • Finance (AREA)
  • Strategic Management (AREA)
  • Human Computer Interaction (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

本发明实施例公开了一种网页运行方法、装置及终端、存储介质,所述方法包括:获取在第一页面上的第一操作;响应所述第一操作,记录所述第一页面的状态信息并获取所述第二页面;从所述第一页面跳转至所述第二页面;获取在所述第二页面上的第二操作,所述第二操作用于结束所述第二页面;响应所述第二操作,根据所述第一页面的状态信息,从所述第二页面跳转至所述第一页面。

Description

一种网页运行方法及装置、终端、存储介质
本专利申请要求2016年05月12日提交的中国专利申请号为201610319667.7,申请人为腾讯科技(深圳)有限公司,发明名称为“一种网页运行方法及装置、终端”的优先权,该申请的全文以引用的方式并入本申请中。
技术领域
本发明涉及计算机技术,尤其涉及一种网页运行方法及装置、终端、存储介质。
背景技术
用户使用终端上的浏览器浏览A网页的过程中,通过A网页上的链接打开B网页查看其他内容时,可以通过弹出新的标签(tab)栏,在新的标签(tab)栏打开B网页,此时A网页和B网页会同时在浏览器的不同的标签栏显示,用户可以通过切换tab栏操作选择浏览A网页或B网页;或者,终端也可以在A网页的内签(iframe)中打开B网页,B网页作为内签栏显示在A网页上,用户可以通过关闭B网页的内签栏来返回A网页,上述的这两种情况下,终端打开B网页并不影响A网页的显示和运行,用户可以在A网页和B网页之间任意切换,返回到A网页后,A网页仍然呈现用户离开A网页时的状态。
但是,目前一些移动终端的操作系统支持网页全屏充满显示在终端的显示界面上,且大量社交应用中的浏览场景并不支持多tab栏浏览,而是只能单tab栏显示,在该tab栏显示B网页时,就需要结束之前该tab栏上的A网页;另外,目前大部分业务流程并不支持在iframe中进行,即业务页面不支持以内签形式显示在网页上;故在终端仅支持单窗口显示且不支持 多tab栏浏览和iframe显示的情况下,用户想要在单窗口单tab栏中打开B网页就只能先结束A网页;在结束A网页时,终端只会记录A网页的通用属性(如滚动位置等信息),网页业务的状态信息会丢失,这样终端从B网页返回到A网页时,A网页的状态只能是A网页的初始状态,不能恢复到结束A网页时的状态,进而用户也不能继续在之前结束时状态下的A网页下进行查看或操作,用户体验不好。
发明内容
有鉴于此,本发明实施例为解决现有技术中存在的至少一个问题而提供了一种网页运行方法及装置、终端、存储介质,能够提升用户体验。
本发明的技术方案是这样实现的:
本发明实施例提供一种网页运行方法,所述方法包括:
获取用户在第一页面上的第一操作;
响应所述第一操作,记录所述第一页面的状态信息并获取所述第二页面;
从所述第一页面跳转至所述第二页面;
获取用户在所述第二页面上的第二操作,所述第二操作用于结束所述第二页面;
响应所述第二操作,根据所述第一页面的状态信息,从所述第二页面跳转至所述第一页面。
本发明实施例提供一种网页运行装置,所述装置包括:第一获取单元、第一响应单元、跳转单元、第二获取单元和恢复单元,其中:
所述第一获取单元,配置为获取用户在第一页面上的第一操作;
所述第一响应单元,配置为响应所述第一操作,记录所述第一页面的状态信息并获取所述第二页面;
所述跳转单元,配置为从所述第一页面跳转至所述第二页面;
所述第二获取单元,配置为获取用户在所述第二页面上的第二操作,所述第二操作用于结束所述第二页面;
所述恢复单元,配置为响应所述第二操作,根据所述第一页面的状态信息,从所述第二页面跳转至所述第一页面。
本发明实施例提供了一种终端,所述终端包括处理器和显示器,其中:
所述显示器,配置为显示第一页面或第二页面;
所述处理器,配置为获取用户在第一页面上的第一操作;响应所述第一操作,记录所述第一页面的状态信息并获取所述第二页面;控制所述显示器从显示所述第一页面跳转至显示所述第二页面;获取用户在所述第二页面上的第二操作,所述第二操作用于结束所述第二页面;响应所述第二操作,根据所述第一页面的状态信息,控制所述显示器从显示所述第二页面跳转至显示所述第一页面。
本发明实施例提供一种计算机存储介质,所述计算机存储介质中存储有计算机可执行指令,该计算机可执行指令用于执行本发明实施例提供的网页运行方法。
本发明实施例提供了一种网页运行方法及装置、终端、存储介质,终端获取用户在第一页面上的第一操作;响应所述第一操作,记录所述第一页面的状态信息并获取所述第二页面;结束所述第一页面,从所述第一页面跳转至所述第二页面;获取用户在所述第二页面上的第二操作,所述第二操作用于结束所述第二页面;响应所述第二操作,根据所述第一页面的状态信息,从所述第二页面跳转至所述第一页面;如此,终端跳转至的第一页面,仍然处于之前结束该第一页面时的状态,用户就可以继续对该状态下的第一页面进行查看或操作,提升用户体验。
附图说明
图1为本发明实施例一种网页运行流程示意图;
图2为本发明实施例一种网页运行方法的实现流程示意图;
图3为本发明实施例一种在网游页面上触发登录业务后返回网游页面的流程示意图;
图4为本发明实施例一种在网游页面上触发登录业务后返回网游页面的实现流程示意图;
图5为本发明实施例一种实现网游页面运行方法的系统结构示意图;
图6为本发明实施例一种在网游页面上触发支付业务后返回网游页面的流程示意图;
图7A为本发明实施例一种在网游页面上触发支付业务后返回网游页面的实现流程示意图;
图7B为本发明实施例一种实现网游页面运行方法的系统结构示意图;
图8为本发明实施例一种在网游页面玩游戏时触发通知栏上其他业务后返回网游页面的流程示意图;
图9为本发明实施例一种网页运行装置的组成结构示意图;
图10A为本发明实施例一种终端的硬件组成结构示意图;
图10B为本发明实施例一种终端的一个硬件结构示意图。
具体实施方式
本发明实施例中,如图1所示,按照用户在图1中A图所示网游页面的操作,终端显示网游页面,然后按照用户在图1中B图所示网游页面的操作,终端从图1中B图所示的网游页面跳转到图1中C图所示的论坛页面,然后点击“返回游戏”悬浮框返回网游页面时,终端上显示的网游页面的状态如图1中D图所示,为之前结束该网游页面时的状态。
下面结合附图和具体实施例对本发明的技术方案进一步详细阐述。
为了解决背景技术中存在的问题,本发明实施例提供一种网页运行方法,应用于终端,该网页运行方法所实现的功能可以通过终端中的处理器 调用程序代码来实现,当然程序代码可以保存在计算机存储介质中,可见,该终端至少包括处理器和存储介质。
图2为本发明实施例网页运行方法的实现流程示意图,如图2所示,该方法包括:
步骤S101、获取用户在第一页面上的第一操作。
在本实施例中,所述第一页面以及下面实施例中的第二页面都可以为网页,所述第一页面上加载的资源包括多媒体资源和/或游戏资源。其中,网页可以采用各种版本的web页面,例如可以采用H5(超文本标记语言(HTML)的第五次重大修改的HTML标准)页面。
以第一页面为网游页面为例进行说明,如图1所示,所述终端加载并显示第一页面即网游页面后,用户可以通过手指或者电笔在终端屏幕上对显示的网游页面上的进行触控操作。
所述第一操作为用户请求终端加载网游外部的页面的操作,该第一操作包括点击外部链接的操作和点击进行某项业务(该业务不能在网游页面上进行,需要特定的业务页面)的操作,用户在网游页面上进行某游戏关卡时,在所述网游页面上进行第一操作。
用户在网游页面上运行游戏的过程中,网游页面对外部新页面的需求有两类:外部链接和业务流程。本实施例中以外部链接对应的新页面即论坛页面为例进行说明,如图1中A图所示,用户点击网游页面中的菜单虚拟按键后,如图1中B图所示,终端在该网游页面上显示出包含有“论坛”等悬浮栏的菜单悬浮框,用户点击“论坛”悬浮栏后,终端获取该用户点击“论坛”悬浮栏的操作即获取用户在网游页面上的第一操作。
步骤S102、响应所述第一操作,记录所述第一页面的状态信息并获取所述第二页面。
承接上述示例,终端获取到用户点击“论坛”悬浮栏的操作后,知道 到用户要进入第二页面即论坛页面,此时,终端会记录所述第一页面的状态信息如网游页面当前所在的游戏关卡为哪个关卡、用户今日剩余挑战次数等游戏进度信息,以及终端在当前显示界面中显示的网游页面的内容为哪项内容等页面进度信息。终端根据这些状态信息可以将图1中B图所示网游页面完全恢复出来。同时,终端会获取论坛页面。
终端获取论坛页面的过程可以是终端根据获取的第一操作,获取到论坛页面对应的外部链接,该外部链接可以是统一资源定位器(Uniform Resource Locator,URL)形式的,终端根据该URL向论坛服务器发送请求,由论坛服务器向终端返回论坛页面的数据,终端获取论坛页面的数据后,据此生成论坛页面。
步骤S103、从所述第一页面跳转至所述第二页面。
承接上述示例,终端获取所述第二页面即论坛页面后,如图1所示,就会从所述图1中B图所示的网游页面跳转至图1中C图所示的论坛页面。
在从所述第一页面跳转到第二页面时,可以将所述第一页面动画显示为第二页面上的“返回游戏”悬浮框,这样可以让用户有明显的感知,在浏览第二页面时可以通过此“返回游戏”悬浮框返回游戏。另外,网游页面上的悬浮菜单和第一页面上的隐藏网游页面的“返回游戏”悬浮框,始终保持在显示界面的同一位置处,方便用户操作,提升用户体验。
步骤S104、获取用户在所述第二页面上的第二操作,所述第二操作用于结束所述第二页面。
用户可以在论坛页面上进行滑动操作,查看论坛中的各种信息,当用户查看好该游戏关卡的攻略后,就可以在所述第二页面上进行第二操作,该第二操作用于结束所述第二页面,表明用户要离开所述第二页面,所述第二操作可以包括返回操作和结束操作,示例地,如图1中C图所示,用户点击所述第二页面上的“返回游戏”悬浮框即为用户的第二操作(返回 操作),或者,用户点击所述第二页面上的关闭虚拟键“×”即为用户的第二操作(结束操作)。
步骤S105、响应所述第二操作,根据所述第一页面的状态信息,从所述第二页面跳转至所述第一页面。
终端获取到所述第二操作后,响应所述第二操作,结束所述第二页面,并根据所述第一页面的状态信息恢复所述第一页面,终端控制显示界面上的页面从所述图1中C图所示论坛页面跳转至图1中D图所示的第一页面。
本发明实施例中,该网页运行的方法可以在各种浏览器中运行,用户可以自由的在浏览论坛页面和游戏中进行切换,且不会丢失游戏的进度,使得整个游戏的体验更加流畅,提升用户体验。
本发明实施例中,终端在结束所述第一页面,从显示所述第一页面跳转到显示第二页面时,会记录所述第一页面此时的状态信息,如此终端在从所述第二页面返回所述第一页面时,会根据所述第一页面的状态信息,恢复出第一页面,使返回第一页面时显示的第一页面恢复到结束时的状态;这样,用户就可以继续对处于之前结束时状态的第一页面进行查看或操作,提升用户体验。
基于前述的实施例,本发明实施例提供一种网页运行方法,应用于终端,该终端仅支持单窗口显示且所述单窗口显示的页面全屏充满显示在所述终端的显示界面上。该网页运行方法所实现的功能可以通过终端中的处理器调用程序代码来实现,当然程序代码可以保存在计算机存储介质中,可见,该终端至少包括处理器和存储介质。该方法包括:
步骤S201、终端获取用户在第三页面上的第四操作,所述第四操作用于触发终端获取作为所述第一页面的网游页面。
示例地,如图3中A图所示,终端的网络视图(WebView)控件加载并显示第三页面即微信游戏的公众号页面后,用户可以通过手指在终端屏 幕上对显示的公众号页面进行触控操作,用户在公众号页面上进行第四操作:如图3中A图所示用户用手指点击“网页游戏1”的操作,触发终端开始获取“网页游戏1”对应的网游页面的流程。
步骤S202、终端响应所述第四操作,控制所述第三页面调用游戏框架,并控制所述游戏框架向第三服务器发送第二请求,所述第二请求用于指示所述第三服务器返回游戏数据。
终端的WebView控件响应所述第四操作,获取“网页游戏1”对应的游戏ID,通过爪哇脚本应用程序编程接口(Java Script Application Programming Interface,JSAPI)调用游戏框架,控制所述游戏框架根据所述游戏ID生成第二请求,并控制所述游戏框架向第三服务器即游戏服务器发送第二请求,所述第二请求用于指示所述第三服务器返回“网页游戏1”对应的游戏数据。
步骤S203、终端接收所述第三服务器返回的所述游戏数据,控制所述游戏框架加载所述游戏数据以获取所述网游页面。
第三服务器接收到所述第二请求后,就会向终端返回“网页游戏1”对应的游戏数据,终端接收到该游戏数据后,就会把该游戏数据发送给游戏框架,并控制所述游戏框架加载该游戏数据以获取“网页游戏1”对应的网游页面。
在步骤S202和步骤S203时,终端的显示界面上可以显示如图3中B图所示的过渡页面。
步骤S204、终端从所述第三页面跳转至所述网游页面。
终端获取所述“网页游戏1”对应的网游页面后,就会从所述第三页面跳转至所述网游页面,开始运行“网页游戏1”游戏;此时,如图3中C图所示,终端显示界面上显示的网游页面处于初始状态即待登录状态。
步骤S205、终端获取用户在网游页面上的第一操作。
终端从所述第三页面跳转至所述网游页面时,该网游页面处于待登录状态,用户需要进行登录业务,如图3中C图所示,用户点击网游页面中的“与微信好友一起玩”后,终端获取到用户的该点击操作即获取用户在网游页面上的第一操作。
步骤S206、终端响应所述第一操作,记录所述第一页面的状态信息并获取所述第二页面。
承接上述示例,终端获取到用户点击“与微信好友一起玩”虚拟按键操作后,了解到用户要进入第二页面即登录页面,此时,终端的游戏框架会记录网游页面的状态信息如记录所述网游页面处于待登录状态。终端的游戏框架可以根据这些状态信息可以将图3中C图所示的处于登录状态的网游页面完全恢复出来。同时,终端的游戏框架会调用登录接口,并通过登录接口通知WebView控件加载并显示登录页面。
步骤S207、终端从所述第一页面跳转至所述第二页面。
终端的WebView控件获取所述第二页面即登录页面后,如图3所示,终端就会从所述图3中C图所示的网游页面跳转至图3中D图所示的登录页面。
步骤S208、终端获取用户在所述第二页面上的第二操作。
如图3中D图所示,用户在所述第二页面即登录页面上的第二操作,可以是用户点击登录页面上的“返回游戏”悬浮框操作,也可以是用户点击登录页面上的“确认登录”虚拟键操作。
所述第二操作是用户点击登录页面上的“返回游戏”悬浮框操作时,所述终端响应所述第二操作,只进行步骤S211。所述第二操作是用户点击登录页面上的“确认登录”虚拟键操作时,所述终端响应所述第二操作,进行步骤S209到步骤212。
步骤S209、终端响应所述第二操作,生成第一请求,并将所述第一请 求发送给第一服务器,所述第一请求用于请求所述第一服务器返回第一响应。
终端响应用户点击“确认登录”虚拟键操作,获取微信账号信息,并据此生成第一请求,该第一请求中携带有该微信账号信息,终端会将所述第一请求发送给第一服务器即微信服务器,所述第一请求用于请求所述微信服务器授权该微信账号信息用于本游戏。
步骤S210、终端接收所述第一服务器返回的第一响应,所述第一响应用于触发终端从所述第二页面跳转至所述第一页面。
所述微信服务器接收到第一请求,确认用户授权使用该微信账号信息登录本游戏后,该微信服务器会向所述终端返回指示该微信账号信息授权成功的第一响应;所述第一响应中携带有该微信账号信息;终端接收到该第一响应后,确认用户授权使用该微信账号信息登录本游戏,此时,会触发开始从所述第二页面跳转至所述第一页面。
步骤S211、终端根据所述第一页面的状态信息,从所述第二页面跳转至所述第一页面。
终端通过外部通信接口接收到第一响应后,会将第一响应发送给WebView控件,WebView控件获取到所述第一响应后,就会直接结束所述第二页面,通过JSAPI向游戏框架转发所述第一响应,终端的游戏框架获取所述第一响应后,会根据所述第一页面的状态信息恢复出图3中B图所示的网游页面,从所述图3中D图所示的登录页面跳转至图3中E图所示的网游页面;如图3所示,图3中E图所示的网游页面与图3中B图所示的网游页面处于同一状态。
步骤S212、终端将所述第一页面从第三状态更新至第四状态。
所述第一响应中携带有授权登录的微信账号信息和登录的游戏ID,所述游戏框架接收到所述第一响应后,会通过游戏客户端将该微信账号信息 和游戏ID这些身份信息作为登录票据保存在终端的内存中,然后将登录票据进行加密等处理后发送给游戏服务器,游戏服务器解密获取该登录票据后,获取该登录票据对应的登录数据,然后游戏服务器回调游戏,将所述登录票据对应的登录数据发送给终端,终端将所述登录数据发送给游戏框架,并控制游戏框架将所述第一页面从第三状态更新至第四状态;其中,所述第三状态为所述第一页面上加载有所述状态信息时的状态即图3中B图和E图所示的状态,所述第四状态为将登录数据加载到该网游页面后的状态,即图3中F图所示的状态。用户点击图3中F图上的“进入游戏”虚拟按键,就可以玩游戏了。
以上述的登录业务为例,如图4所示说明本实施例方法的实施过程。
步骤S501:终端的WebView控件加载并显示微信游戏的公众号页面后,获取用户在公众号页面上的第四操作,此时,终端的WebView控件响应所述第四操作,获取第四操作对应的游戏ID,控制WebView控件通过JSAPI调用游戏框架,向游戏框架发送所述游戏ID,控制游戏框架启动游戏,终端可以用过渡页面的形式展示该游戏框架启动游戏的过程,所述游戏框架接收到所述游戏ID后,根据所述游戏ID生成第二请求,然后如图5所示,终端100会控制所述游戏框架向第三服务器即游戏服务器200发送第二请求,游戏服务器200接收到所述第二请求后,就会向终端100返回对应的游戏数据,终端接收该游戏数据,并把该游戏数据发送给游戏框架,控制所述游戏框架加载游戏的数据;所述游戏框架加载游戏数据形成网游页面后,终端从所述公众号页面跳转至所述网游页面,终端显示该网游页面,此时该网游页面处于图3中C图待登录状态。
步骤S502:终端在网游页面上开始游戏运行,游戏处于待登录状态,用户需要在该网游页面上触发登录业务,如图3中C图所示,用户在该处于登录状态的网游页面上进行第一操作(即点击“与微信好友一起玩”), 终端获取用户在网游页面上的第一操作,触发登录业务,此时,终端会控制游戏框架调用登录接口开始登录业务;终端的游戏框架需要获取登录票据。
步骤S503:终端判断游戏框架中是否记录有之前用户的登录票据。
步骤S510:如果有,则终端直接访问后台服务器即游戏服务器,将所述登录票据发送给游戏服务器,即终端直接控制所述游戏框架将登录票据发送给游戏服务器。
步骤S504:如果游戏框架中未记录有登录票据,则判断读取前置身份信息。如果本次打开网游页面之前已进行了微信授权登录游戏操作,则终端可以在用户授权登录时将该登录票据和游戏的应用(APP)ID这些前置身份信息保存在内存中,游戏框架可以读取前置身份信息,如果本次打开网游页面之前未进行微信授权登录游戏操作,则游戏框架不能读取前置身份信息。
步骤S505:有前置身份信息时,终端控制游戏框架读取前置身份信息,从所述前置身份信息中获取登录票据,然后终端会控制游戏框架将登录票据发送给游戏服务器;上述过程都由终端控制游戏框架来完成,流程可参考现有的登录流程,终端可以在显示界面上一直显示网游页面,不需要进行页面跳转。
步骤S506:无前置身份信息时,终端调用外部登录,终端的WebView控件通过JSAPI调起游戏框架,即隐藏游戏框架,结束当前网游页面,记录所述第一页面的状态信息,并加载浏览器游戏业务公众号授权页面,终端从图3中C图所示的网游页面跳转至图3中D图所示的游戏业务公众号授权页面即登录页面。
步骤S507:用户授权,即用户点击图3中D图所示的登录页面上的“确认登录”虚拟键操作进行授权;此时,终端获取用户在所述登录页面上的 第二操作,控制WebView控件响应用户点击“确认登录”虚拟键操作,生成第一请求,该第一请求用于请求第一服务器即微信服务器授权本微信账号用于该游戏,如图5所示,终端100会将所述第一请求发送给微信服务器300,所述微信服务器300接收到第一请求,确认用户授权使用该微信账号信息登录本游戏后,该微信服务器300会向所述终端返回指示授权成功的第一响应。
步骤S508:终端100通过外部通信接口接收到第一响应后,会将第一响应发送给WebView控件,WebView控件获取到所述第一响应后,就会直接结束所述第二页面,并通过JSAPI向游戏框架转发所述第一响应,终端的游戏框架获取所述第一响应后,该第一响应会触发游戏框架根据所述第一页面的状态信息恢复出图3中B图所示的网游页面,终端从所述图3中D图所示的登录页面跳转至图3中E图所示的网游页面。
步骤S509:游戏框架获取登录票据,终端可以通过步骤S505读取前置身份信息获取登录票据或者进行步骤S508控制游戏框架从接收到的所述第一响应中获取登录票据,此时终端会通过游戏客户端将该微信账号信息和游戏ID这些身份信息作为登录票据保存在内存中。
步骤S510:终端控制游戏框架将登录票据进行加密等处理后发送给游戏服务器。
步骤S511:所述游戏服务器获取该登录票据后,可以先对该登录票据进行有效性验证。
步骤S512:当验证授权票据无效时,则如图5所示,游戏服务器200向终端发送退出游戏通知,终端100收到退出游戏通知后,控制游戏框架退出游戏,关闭网游页面,回到公众号页面。
步骤S513:当登录票据有效时,游戏服务器200回调游戏,将该登录票据对应的登录数据发送给终端,终端根据该登录数据进行游戏运行,根 据所述登录数据控制所述网游页面从图3中B图所示的状态运行至图3中E图所示的状态。
本实施例方法使用的业务除了登录业务外,还可以是分享、刷票、拉好友等业务,该过程可参考以上所述,在此不再一一详述。
终端上的游戏框架控制网游页面的运行独立于WebView控件控制显示的页面,用户可以自由的在WebView控件控制显示的页面和游戏框架控制网游页面中进行切换,且不会丢失网游页面上的游戏进度,使得整个游戏的体验更加流畅;本实施例方法适用于各种浏览器。
本实施例中,终端在结束所述第一页面进入某业务流程时,从显示所述第一页面跳转到显示第二页面时,会记录所述第一页面此时的状态信息,如此终端在从所述第二页面返回所述第一页面时,会根据所述第一页面的状态信息,恢复出第一页面,使返回时显示的第一页面恢复到结束时的状态,这样,用户就可以继续对处于之前结束时状态的第一页面进行查看或操作,提升用户体验。
基于前述的实施例,本发明实施例提供一种网页运行方法,应用于终端,该终端仅支持单窗口显示且所述单窗口显示的页面全屏充满显示在所述终端的显示界面上。该网页运行方法所实现的功能可以通过终端中的处理器调用程序代码来实现,当然程序代码可以保存在计算机存储介质中,可见,该终端至少包括处理器和存储介质。该方法包括:
步骤S301、终端获取用户在第一页面上的第一操作。
所述终端的游戏框架加载并显示第一页面即网游页面后,用户可以通过手指或者电笔在终端屏幕上对显示的网游页面上的进行触控操作;如图6中A图所示,用户点击“购买次数”虚拟键后,游戏框架响应该操作,在网游页面上弹出“选择购买次数”的选项框,供用户下单。用户在“选择购买次数”的选项框中选择购买次数“10次”并点击确认后,终端获取用 户在第一页面上的第一操作。
步骤S302、终端响应所述第一操作,停止所述第一页面的运行,记录所述第一页面的状态信息并获取所述第二页面。
终端的游戏框架获取到该用户点击“确认购买”虚拟键的第一操作后,终端会响应所述第一操作,开始支付业务;此时,终端会停止所述第一页面的运行,并记录所述第一页面的状态信息如网游页面当前所在的游戏关卡为哪个关卡、用户今日剩余挑战次数,剩余金币等游戏进度信息,以及终端在该网游页面中当前显示的内容为哪项内容等页面进度信息。终端根据这些状态信息可以将图6中B图所示网游页面完全恢复出来。同时,终端会获取第二页面即支付页面。
步骤S303、终端从所述第一页面跳转至所述第二页面。
终端获取所述第二页面即支付页面后,如图6所示,就会从所述图6中A图所示的网游页面跳转至图6中C图所示的支付页面。
步骤S304、终端从处于第一状态的第二页面获取第三操作。
所述第一状态为所述第二页面加载有支付信息输入请求时的状态,处于第一状态的第二页面如图6中C图所示,所述第三操作为支付信息的确认输入操作。
如图6中C图所示,用户还可以进行点击“返回游戏”悬浮框的操作,此时,终端从处于第一状态的第二页面获取该操作后,响应该操作,可以根据所述第一页面的状态信息,直接从所述第二页面跳转至所述第一页面。
步骤S305、终端响应所述第三操作,生成支付请求,并将所述支付请求发送给第二服务器,所述支付请求用于请求第二服务器进行支付业务。
终端的WebView控件获取第三操作后,响应所述第三操作,根据用户确认的支付信息以及用户的登录票据生成支付请求,然后将支付请求发送给第二服务器即支付服务器;所述支付服务器接收到所述支付请求后,根 据支付请求中的用户信息以及支付信息进行支付业务,并在支付业务完成后,向终端返回支付响应。
步骤S306、终端通过外部通信接口接收所述第二服务器返回的支付响应,控制所述外部通信接口将所述支付响应发送给所述第二页面。
所述支付响应中携带有支付服务器完成所述支付业务的支付结果。终端通过外部通信接口接收该支付响应,控制所述外部通信接口将该支付响应发送给所述WebView控件。
步骤S307、终端根据所述支付响应控制所述第二页面从所述第一状态更新至第二状态。
WebView控件获得所述支付响应后,会将所述支付响应加载在所述第二页面上,使所述第二页面从所述第一状态更新至第二状态;所述第二状态为所述第二页面上加载有所述支付结果时的状态,处于所述第二状态的第二页面为如图6中D图所示。
步骤S308、终端获取用户在处于所述第二状态的第二页面上的第二操作。
第二操作为用户在第二页面上点击“返回游戏”的返回操作,或者为用户在第二页面上点击“支付成功”的结束操作。
步骤S309、终端控制所述第二页面将所述支付响应发送给所述第一页面。
终端的WebView控件通过JSAPI将所述支付响应发送给游戏框架,所述WebView控件对应第二页面,所述游戏框架对应第一页面。
终端可以不进行步骤S307和A308,在获取支付响应后,直接将控制所述WebView控件通过JSAPI将所述支付响应发送给游戏框架。
步骤S310、终端从所述第二页面跳转至所述第一页面。
终端的WebView控件获取到所述第二操作后,响应所述第二操作,结 束所述第二页面,所述游戏框架接收到所述支付响应后,会根据所述第一页面的状态信息恢复所述第一页面,从所述图6中D图所示支付页面跳转至图6中B图所示的第一页面。
步骤S311、终端根据所述支付响应,控制所述第一页面从第三状态更新至第四状态。
终端控制游戏框架将所述支付响应加载到第一页面上,使所述第一页面从第三状态更新至第四状态。其中,所述第三状态为所述第一页面上加载有所述状态信息时的状态,所述第四状态为在处于第三状态的第一页面上加载有所述支付业务对应的支付结果时的状态。示例地,承接上述实施例,所述第三状态中用户今日剩余挑战次数为5次,获取的支付响应为成功购买10次挑战次数的响应,则所述第四状态中用户今日剩余挑战次数为15次。
本实施例方法的过程可以如图7A所示。
步骤S701:终端显示微信游戏的公众号页面,获取用户在公众号页面上的第四操作,终端响应所述第四操作,获取第四操作对应的游戏ID,控制公众号页面通过JSAPI调用游戏框架,控制游戏框架启动游戏,并控制所述游戏框架根据所述游戏ID生成第二请求,然后,终端控制所述游戏框架向第三服务器即游戏服务器发送第二请求,游戏服务器接收到所述第二请求后,就会向终端返回对应的游戏数据,终端接收到该游戏数据后,就会把该游戏数据发送给游戏框架,并控制所述游戏框架加载游戏的数据;终端控制游戏框架加载游戏的过程可以用过渡页面的形式展示;所述游戏框架加载游戏数据形成网游页面后,终端显示该网游页面,此时该网游页面处于待登录状态,进行登录流程登录游戏后,用户可以进行游戏任务。
步骤S702:用户登录游戏后,开始游戏运行,若在游戏运行进行游戏任务的过程中,用户需要进行支付业务,如图6中A图所示用户在该网游 页面上点击“购买次数”触发支付业务,此时,终端控制游戏框架调用支付接口来开始支付业务,终端会控制游戏框架调用支付接口响应所述第一操作开始游戏下单任务,以获取任务信息。
步骤S703:终端获取已有票据,此时获取的已有票据为登录票据,由于用户已登录游戏,故终端可以在内存中获取登录票据。
步骤704:访问后台服务器,即如图7B所示终端100控制游戏框架调用支付接口将所述登录票据和任务信息发送给后台服务器即游戏服务器200。
步骤S705:游戏服务器下单成功,游戏服务器200根据登录票据获取用户信息,并获取用户购买下单购买XX次挑战次数需多少钱等游戏下单信息,游戏服务器200将所述游戏下单信息发送给终端100,终端100控制游戏框架调用支付接口在网游页面上显示该游戏下单信息对应的下单选项框即图6中B图所示的“选择购买次数”的选项框,则此时游戏服务器下单成功。
步骤S706:用户确认付钱,用户选择购买的物品并点击下单悬浮框上的“确认购买”虚拟按键即用户确认付钱。用户点击下单悬浮框上的“确认购买”虚拟按键的操作为用户在网游页面上的第一操作,此时,终端获取用户在网游页面上的第一操作,响应所述第一操作,生成用户确认该游戏下单信息的下单请求,终端控制游戏框架将该下单请求发送给支付服务器。
步骤S707:支付服务器下单,支付服务器根据该下单请求进行下单任务,生成下单序列号等下单信息。
步骤S708:支付服务器下单成功,即支付服务器400将所述下单信息发送给终端。
步骤S709:终端将所述下单信息对应的登录票据存储到终端的cookie 中,需要注意的是,必须保证支付服务器下单时和终端写入cookie的是相同的微信appid所对应的openid即保证是同一用户。
步骤S710:终端的游戏框架调用外部支付接口将所述下单信息(所述下单信息中会通过url参数携带该支付业务所需参数和请求的唯一识别号),发送给WebView控件,WebView控件据此生成支付页面,然后终端打开浏览器游戏业务转用付款页面即支付页面,终端从所述网游页面跳转图6中C图所示的支付页面。
步骤S711:用户可以在支付页面上进行输入确认支付操作,终端从处于图6中C图所示的支付页面获取确认支付操作,然后如图7B所示,终端控制WebView控件调用支付服务器的接口,将所述确认信息发送给支付服务器400,支付服务器400进行支付任务,支付服务器400完成支付任务后将支付结果携带在支付响应中发送给终端100,所述终端通过外部通信接口接收所述支付服务器400返回的支付响应,控制所述外部通信接口将所述支付响应发送给所述WebView控件,终端控制WebView控件根据所述支付响应控制所述第二页面从所述第一状态更新至第二状态,处于所述第二状态的支付页面为如图6中D图所示。
步骤S712:用户在第二页面上点击“返回游戏”的返回操作或点击“支付成功”的结束操作后,终端获取第二操作,终端的WebView获取用户在处于所述第二状态的第二页面上的第二操作时,响应所述第二操作,结束第二页面,同时通过JSAPI调用游戏框架恢复所述第一页面,终端从所述第二页面跳转至所述第一页面。
步骤S713:终端控制所述WebView控件将所述支付响应发送给所述发送给游戏框架;这样,终端就可以控制游戏框架就可以根据所述支付响应将所述第一页面从第三状态更新至第四状态,其过程可以为:终端控制游戏框架将所述支付响应发送给游戏服务器,游戏服务器根据所述支付响应 更新响应的游戏数据即支付结果,然后回调游戏,将更新的游戏数据发送给终端,由终端控制所述游戏框架进行游戏运行,加载所述更新的游戏数据,将所述第一页面从第三状态更新至第四状态。
所述支付响应中携带有该支付业务的唯一识别码,故游戏框架通过唯一识别号将支付响应与游戏框架记录的支付业务对应,并根据唯一识别码,根据所述支付响应对应的支付结果对相应的支付业务进行更新。
由上可知,在网游页面运行游戏的过程中,当用户通过第二页面进行业务流程(进行登录和支付)时,会暂停游戏,将游戏框架最小化为一个悬浮框,挂在第二页面上,用户可以随时点击该悬浮框返回网游页面,或者,在支付完成时会第二页面会自动跳转至网游页面,返回游戏,并且该网游页面上的游戏能够保持暂停前的状态。
本实施例中,终端在结束所述第一页面,从显示所述第一页面跳转到显示第二页面时,会记录所述第一页面此时的状态信息,如此终端在从所述第二页面返回所述第一页面时,会根据所述第一页面的状态信息,恢复出第一页面,使返回时显示的第一页面恢复到结束时的状态;这样,用户就可以继续对处于之前结束时状态的第一页面进行查看或操作,提升用户体验。另外,现有技术中,第二页面完成支付后,不会通知第一页面,第一页面需要通过用户进行点击“完成支付”的操作,才会向游戏服务器发送更新请求,进行状态更新,而本实施例中,第二页面完成支付后可以将支付响应发送给第一页面,不需要用户的操作,就可使得第一页面快速主动地向游戏服务器发送更新请求,更新第一页面的状态。
基于前述的实施例,本发明实施例提供一种网页运行方法,应用于终端,该终端仅支持单窗口显示且所述单窗口显示的页面全屏充满显示在所述终端的显示界面上。该网页运行方法所实现的功能可以通过终端中的处理器调用程序代码来实现,当然程序代码可以保存在计算机存储介质中, 可见,该终端至少包括处理器和存储介质。该方法包括:
步骤S401、终端控制所述第一页面全屏显示在所述显示界面。
步骤S402、终端获取用户在所述终端的通知栏上的第五操作,其中,所述第五操作为进入所述通知栏上通知消息所在的第四页面的操作,所述第四页面为所述第二应用上的页面。
终端在第一页面上运行游戏的过程中,接收到其他终端或服务器发送给终端的通知消息,该通知消息显示在所述终端的通知栏上,用户想要查看该通知消息时,如图8中A图所示,用户进行下拉操作,终端响应所述下拉操作,如图8中B图所示在所述终端上显示出通知栏,如图8中B图所示用户可以点击该通知栏中音乐应用中的通知消息所在的选项,这样终端就获得第五操作。
步骤S405、终端响应所述第五操作,记录所述第一页面的状态数据并获取所述第四页面。
终端获取所述第五操作后,响应该第五操作,记录此时所述第一页面的状态数据,并获取所述音乐应用中的通知消息所在的音乐应用页面。
步骤S406、终端控制显示界面从所述第一页面跳转至所述第四页面。
终端的显示界面从网游页面跳转至音乐应用页面。
步骤S407、终端获取用户在所述显示界面上的第六操作。
终端控制所述第四页面全屏显示在所述显示界面,同时,所述显示界面上置顶显示有“返回游戏”悬浮框,若用户想要回到所述第一页面继续玩游戏,则用户可以在所述显示界面上进行第六操作:如图8中C图所示点击“返回游戏”悬浮框;这样终端就可以获取所述显示界面上的第六操作。
步骤S408、终端响应所述第六操作,根据所述第一页面的状态信息,控制所述显示界面从所述第四页面跳转至所述第一页面。
终端获取第六操作后,知道用户想要返回第一页面继续游戏,此时,终端会响应所述第六操作,根据所述第一页面的状态信息,恢复出所述第一页面,并控制所述显示界面从所述第四页面直接跳转至所述第一页面,此时,终端显示的第一页面如图8中D图所示的状态即与图8中A图所示的状态相同。
上述的第四页面是以音乐应用页面为例进行说明的,当然,所述第四页面也可以是视频应用的页面、聊天应用的页面或阅读应用的页面等,本发明实施例在终端的显示界面上置顶显示“返回游戏”悬浮框,不管所述显示界面上显示的界面为哪种应用的界面,只要用户点击界面上的“返回游戏”悬浮框,终端就可以控制显示界面上从当前页面跳转至网游页面,这样用户可以边玩边读,边玩边聊,边玩边视频、直播,当用户返回游戏时,游戏进度不会丢失,用户可以继续之前的游戏。
本发明实施例中,终端在结束所述第一页面进入其他应用的第四页面时,从显示所述第一页面跳转到显示第四页面时,会记录所述第一页面此时的状态信息,并在终端的显示界面上置顶显示系统级的“返回游戏”悬浮框,如此终端只要获取到用户在显示界面上的第六操作即点击“返回游戏”悬浮框,终端就会根据所述第一页面的状态信息,恢复出第一页面,并控制所述显示界面从所述第四页面直接跳转至回复出的第一页面,这样显示界面上显示的第一页面仍然处于之前结束时的状态,当用户返回游戏时,游戏进度不会丢失,用户可以继续之前的游戏,提升用户体验。
基于前述的实施例,本发明实施例提供一种网页运行装置,该网页运行装置所包括的各单元,以及各单元所包括的各模块,都可以通过该装置中的处理器来实现,当然也可通过逻辑电路实现;在实施例的过程中,处理器可以为中央处理器(CPU)、微处理器(MPU)、数字信号处理器(DSP)或现场可编程门阵列(FPGA)等。
图9为本发明实施例网页运行装置的组成结构示意图,如图9所示,该装置包括第一获取单元901、第一响应单元902、跳转单元903、第二获取单元904和恢复单元905,其中:
所述第一获取单元901,配置为获取用户在第一页面上的第一操作,其中,所述第一页面为网页,所述第一页面上加载的资源包括多媒体资源和/或游戏资源。
所述第一响应单元902,配置为响应所述第一操作,记录所述第一页面的状态信息并获取所述第二页面。
所述跳转单元903,配置为从所述第一页面跳转至所述第二页面。
所述第二获取单元904,配置为获取用户在所述第二页面上的第二操作,所述第二操作用于结束所述第二页面。
所述恢复单元905,配置为响应所述第二操作,根据所述第一页面的状态信息,从所述第二页面跳转至所述第一页面。
在本发明的其他实施例中,所述终端仅支持单窗口显示且所述单窗口显示的页面全屏充满显示在所述终端的显示界面上,所述装置还包括:显示单元,其中,所述显示单元,配置为控制所述第一页面全屏充满显示在所述显示界面上。
在本发明的其他实施例中,所述恢复单元905,配置为响应所述第二操作,生成第一请求,并将所述第一请求发送给第一服务器,所述第一请求用于请求所述第一服务器返回第一响应;接收所述第一服务器返回的第一响应,所述第一响应用于触发终端从所述第二页面跳转至所述第一页面;根据所述第一页面的状态信息,从所述第二页面跳转至所述第一页面。
在本发明的其他实施例中,所述装置还包括:第三获取单元、第二响应单元、接收单元和第一更新单元,其中,
所述第三获取单元,配置为从处于第一状态的第二页面获取第三操作, 其中,所述第一状态为所述第二页面加载有支付信息输入请求时的状态,所述第三操作为支付信息的确认输入操作。
所述第二响应单元,配置为响应所述第三操作,生成支付请求,并将所述支付请求发送给第二服务器,所述支付请求用于请求第二服务器进行支付业务。
所述接收单元,配置为接收所述第二服务器返回的支付响应,所述支付响应中携带有服务器完成所述支付业务的支付结果。
所述第一更新单元,配置为根据所述支付响应控制所述第二页面从所述第一状态更新至第二状态,其中,所述第二状态为所述第二页面上加载有所述支付结果时的状态。
所述第二获取单元,配置为获取用户在处于所述第二状态的第二页面上的第二操作。
在本发明的其他实施例中,所述装置还包括第二更新单元,其中:
所述接收单元,配置为通过外部通信接口接收所述第二服务器返回的支付响应,控制所述外部通信接口将所述支付响应发送给所述第二页面,控制所述第二页面将所述支付响应发送给所述第一页面。
所述第二更新单元,配置为在所述从所述第二页面跳转至所述第一页面之后,根据所述支付响应,控制所述第一页面从第三状态更新至第四状态。
其中,所述第三状态为所述第一页面上加载有所述状态信息时的状态,所述第四状态为在处于第三状态的第一页面上加载有所述支付业务对应的支付结果时的状态。
在本发明的其他实施例中,所述装置还包括:第四获取单元,第三响应单元和第二接收单元,其中:
第四获取单元,配置为获取用户在第三页面上的第四操作,所述第四 操作用于触发终端获取作为所述第一页面的网游页面;
第三响应单元,配置为响应所述第四操作,控制所述第三页面调用游戏框架,并控制所述游戏框架向第三服务器发送第二请求,所述第二请求用于指示所述第三服务器返回游戏数据。
所述第二接收单元,配置为接收所述第三服务器返回的所述游戏数据,控制所述游戏框架加载所述游戏数据以获取所述网游页面。
跳转单元,配置为从所述第三页面跳转至所述网游页面。
在本发明的其他实施例中,所述第一页面为第一应用上的页面,所述装置还包括第五获取单元、第四响应单元、第六获取单元和第五响应单元,其中:
所述第五获取单元,配置为获取用户在所述终端的通知栏上的第五操作,其中,所述第五操作为进入所述通知栏上通知消息所在的第四页面的操作,所述第四页面为所述第二应用上的页面。
所述第四响应单元,配置为响应所述第五操作,记录所述第一页面的状态数据并获取所述第四页面。
所述跳转单元,配置为控制显示界面从所述第一页面跳转至所述第四页面;
所述第六获取单元,配置为获取用户在所述显示界面上的第六操作。
所述第五响应单元,配置为响应所述第六操作,根据所述第一页面的状态信息,控制所述显示界面从所述第四页面跳转至所述第一页面。
在本发明的其他实施例中,所述装置方法还包括:停止单元,其中,所述停止单元,配置为响应所述第一操作,停止所述第一页面的运行。
需要指出的是:以上装置实施例的描述,与上述方法实施例的描述是类似的,具有同方法实施例相似的有益效果。对于本发明装置实施例中未披露的技术细节,请参照本发明方法实施例的描述而理解。
基于前述的实施例,本发明实施例提供一种终端,图10A为本发明实施例终端的组成结构示意图,如图10A所示,该终端包括显示器1001和处理器1002,其中:
所述显示器1001,配置为显示第一页面或第二页面。
所述处理器1002,配置为获取用户在第一页面上的第一操作,其中,所述第一页面为网页,所述第一页面上加载的资源包括多媒体资源和/或游戏资源;响应所述第一操作,记录所述第一页面的状态信息并获取所述第二页面;控制所述显示器从显示所述第一页面跳转至显示所述第二页面;获取用户在所述第二页面上的第二操作,所述第二操作用于结束所述第二页面;响应所述第二操作,根据所述第一页面的状态信息,从所述第二页面跳转至所述第一页面。
本实施例中,显示器可以显示在终端中处理的信息。例如,当终端运行游戏应用时,显示器能够显示有游戏相关的用户界面(UI)或图形用户界面(GUI)。显示器可以为触摸屏,即显示屏和触摸板以层的形式彼此叠加以形成触摸屏,这样显示器可以用作输入装置和输出装置。显示器可以包括液晶显示器(LCD)、薄膜晶体管LCD(TFT-LCD)、有机发光二极管(OLED)显示器、柔性显示器、三维(3D)显示器等等中的至少一种。这些显示器中的一些可以被构造为透明状以允许用户从外部观看,这可以称为透明显示器,典型的透明显示器可以例如为透明有机发光二极管(TOLED)显示器等等。在其他的实施中,终端可以包括两个或更多显示器。
图10B为本发明实施例中终端的一种硬件实体示意图,该终端的硬件实体包括:
蜂窝模块102以接入基站的建立链路的方式承载终端100的移动通信,蜂窝模块102可以使终端通过网络与其他终端或服务器通信。
输入模块103可配置为接收输入的字符信息,以及产生与用户设置以及功能控制有关信号输入。其中,输入模块可包括触控表面,该触控表面可收集用户在其上或附近的触摸操作(比如用户使用手指、触笔等任何适合的物体或附件在触控表面上或在触控表面附近的操作),获取触摸操作带来的信号,将信号转换成触点坐标,再送给处理器101处理,并能接收处理器101发来的命令并加以执行。
显示模块104可以配置为显示处理器101实现的功能以及相关的信息。
存储器105配置为存储由处理器101可执行的指令和应用,还可以缓存待处理器101以及终端100中各模块待处理或已经处理的数据(例如,图像数据、音频数据、语音通信数据和视频通信数据),可以通过闪存(FLASH)或随机访问存储器105(RAM,Random Access Memory)实现。
处理器101通常控制终端100的总体操作。例如,输入模块103可以实施为触摸屏,向所述处理器101输出表征触摸屏的操作特征(包括触点位置、触点数量、触发压力)的用户操作数据,处理器101可以解析用户操作数据确定用户在显示界面中触发的功能,生成对应触发的功能的显示数据,以供显示模块104加载对应触发的功能的页面。
需要说明的是,本发明实施例中,如果以软件功能模块的形式实现上述的网页运行方法,并作为独立的产品销售或使用时,也可以存储在一个计算机可读取存储介质中。基于这样的理解,本发明实施例的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机、服务器、或者网络设备等)执行本发明各个实施例所述方法的全部或部分。而前述的存储介质包括:U盘、移动硬盘、只读存储器(ROM,Read Only Memory)、磁碟或者光盘等各种可以存储程序代码的介质。这样,本发明实施例不限制于任何特定的硬件和软件 结合。
相应地,本发明实施例再提供一种计算机存储介质,所述计算机存储介质中存储有计算机可执行指令,该计算机可执行指令用于执行本发明实施例中网页运行方法。
需要指出的是:以上终端或存储介质实施例项的描述,与上述方法描述是类似的,具有同方法实施例相同的有益效果。对于本发明终端或存储介质实施例中未披露的技术细节,本领域的技术人员请参照本发明方法实施例的描述而理解。
应理解,说明书通篇中提到的“一个实施例”或“一实施例”意味着与实施例有关的特定特征、结构或特性包括在本发明的至少一个实施例中。因此,在整个说明书各处出现的“在一个实施例中”或“在一实施例中”未必一定指相同的实施例。此外,这些特定的特征、结构或特性可以任意适合的方式结合在一个或多个实施例中。应理解,在本发明的各种实施例中,上述各过程的序号的大小并不意味着执行顺序的先后,各过程的执行顺序应以其功能和内在逻辑确定,而不应对本发明实施例的实施过程构成任何限定。上述本发明实施例序号仅仅为了描述,不代表实施例的优劣。
需要说明的是,在本文中,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者装置不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者装置所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括该要素的过程、方法、物品或者装置中还存在另外的相同要素。
在本申请所提供的几个实施例中,应该理解到,所揭露的设备和方法,可以通过其它的方式实现。以上所描述的设备实施例仅仅是示意性的,例如,所述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外 的划分方式,如:多个单元或组件可以结合,或可以集成到另一个系统,或一些特征可以忽略,或不执行。另外,所显示或讨论的各组成部分相互之间的耦合、或直接耦合、或通信连接可以是通过一些接口,设备或单元的间接耦合或通信连接,可以是电性的、机械的或其它形式的。
上述作为分离部件说明的单元可以是、或也可以不是物理上分开的,作为单元显示的部件可以是、或也可以不是物理单元;既可以位于一个地方,也可以分布到多个网络单元上;可以根据实际的需要选择其中的部分或全部单元来实现本实施例方案的目的。另外,在本发明各实施例中的各功能单元可以全部集成在一个处理单元中,也可以是各单元分别单独作为一个单元,也可以两个或两个以上单元集成在一个单元中;上述集成的单元既可以采用硬件的形式实现,也可以采用硬件加软件功能单元的形式实现。
本领域普通技术人员可以理解:实现上述方法实施例的全部或部分步骤可以通过程序指令相关的硬件来完成,前述的程序可以存储于计算机可读取存储介质中,该程序在执行时,执行包括上述方法实施例的步骤;而前述的存储介质包括:移动存储设备、只读存储器(Read Only Memory,ROM)、磁碟或者光盘等各种可以存储程序代码的介质。或者,本发明上述集成的单元如果以软件功能模块的形式实现并作为独立的产品销售或使用时,也可以存储在一个计算机可读取存储介质中。基于这样的理解,本发明实施例的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机、服务器、或者网络设备等)执行本发明各个实施例所述方法的全部或部分。而前述的存储介质包括:移动存储设备、ROM、磁碟或者光盘等各种可以存储程序代码的介质。
以上所述,仅为本发明的具体实施方式,但本发明的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本发明揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本发明的保护范围之内。因此,本发明的保护范围应以所述权利要求的保护范围为准。
工业实用性
本发明实施例中,获取在第一页面上的第一操作;响应所述第一操作,记录所述第一页面的状态信息并获取所述第二页面;从所述第一页面跳转至所述第二页面;获取在所述第二页面上的第二操作,所述第二操作用于结束所述第二页面;响应所述第二操作,根据所述第一页面的状态信息,从所述第二页面跳转至所述第一页面;如此,终端跳转至的第一页面,仍然处于之前结束该第一页面时的状态,用户就可以继续对该状态下的第一页面进行查看或操作,提升用户体验。

Claims (18)

  1. 一种网页运行方法,所述方法包括:
    终端获取在第一页面上的第一操作;
    响应所述第一操作,记录所述第一页面的状态信息并获取所述第二页面;
    从所述第一页面跳转至所述第二页面;
    获取在所述第二页面上的第二操作,所述第二操作用于结束所述第二页面;
    响应所述第二操作,根据所述第一页面的状态信息,从所述第二页面跳转至所述第一页面。
  2. 根据权利要求1所述的方法,其中,所述终端仅支持单窗口显示且所述单窗口显示的页面全屏充满显示在所述终端的显示界面上,则所述获取在所述第一页面上的第一操作之前,所述方法包括:
    控制所述第一页面全屏充满显示在所述显示界面上。
  3. 根据权利要求1所述的方法,其中,所述响应所述第二操作,根据所述第一页面的状态信息,从所述第二页面跳转至所述第一页面,包括:
    响应所述第二操作,生成第一请求,并将所述第一请求发送给第一服务器,所述第一请求用于请求所述第一服务器返回第一响应;
    接收所述第一服务器返回的第一响应,所述第一响应用于触发终端从所述第二页面跳转至所述第一页面;
    根据所述第一页面的状态信息,从所述第二页面跳转至所述第一页面。
  4. 根据权利要求1所述的方法,其中,所述获取在所述第二页面上的第二操作之前,所述方法包括:
    从处于第一状态的第二页面获取第三操作,其中,所述第一状态为所述第二页面加载有支付信息输入请求时的状态,所述第三操作为支付信息的确认输入操作;
    响应所述第三操作,生成支付请求,并将所述支付请求发送给第二服务器,所述支付请求用于请求第二服务器进行支付业务;
    接收所述第二服务器返回的支付响应,所述支付响应中携带有所述第二服务器完成所述支付业务的支付结果;
    根据所述支付响应控制所述第二页面从所述第一状态更新至第二状态,其中,所述第二状态为所述第二页面上加载有所述支付结果时的状态;
    所述获取在所述第二页面上的第二操作,包括:获取在处于所述第二状态的第二页面上的第二操作。
  5. 根据权利要求4所述的方法,其中,所述接收所述第二服务器返回的支付响应包括:
    通过外部通信接口接收所述第二服务器返回的支付响应,控制所述外部通信接口将所述支付响应发送给所述第二页面,控制所述第二页面将所述支付响应发送给所述第一页面;
    在所述从所述第二页面跳转至所述第一页面之后,根据所述支付响应,将所述第一页面从第三状态更新至第四状态;
    其中,所述第三状态为所述第一页面上加载有所述状态信息时的状态,所述第四状态为在处于第三状态的第一页面上加载有所述支付业务对应的支付结果时的状态。
  6. 根据权利要求1所述的方法,其中,所述获取在第一页面上的第一操作之前,所述方法还包括:
    获取在第三页面上的第四操作,所述第四操作用于触发终端获取作 为所述第一页面的网游页面;
    响应所述第四操作,控制所述第三页面调用游戏框架,并控制所述游戏框架向第三服务器发送第二请求,所述第二请求用于指示所述第三服务器返回游戏数据;
    接收所述第三服务器返回的所述游戏数据,控制所述游戏框架加载所述游戏数据以获取所述网游页面;
    从所述第三页面跳转至所述网游页面。
  7. 根据权利要求2所述的方法,其中,所述第一页面为第一应用上的页面,则所述控制所述第一页面全屏显示在所述显示界面后,所述方法还包括:
    获取在所述终端的通知栏上的第五操作,其中,所述第五操作为进入所述通知栏上通知消息所在的第四页面的操作,所述第四页面为所述第二应用上的页面;
    响应所述第五操作,记录所述第一页面的状态数据并获取所述第四页面;
    控制显示界面从所述第一页面跳转至所述第四页面;
    获取在所述显示界面上的第六操作;
    响应所述第六操作,根据所述第一页面的状态信息,控制所述显示界面从所述第四页面跳转至所述第一页面。
  8. 根据权利要求1所述的方法,其中,所述方法还包括:
    响应所述第一操作,停止所述第一页面的运行。
  9. 一种网页运行方法装置,所述装置包括:第一获取单元、第一响应单元、跳转单元、第二获取单元和恢复单元,其中:
    所述第一获取单元,配置为获取在第一页面上的第一操作;
    所述第一响应单元,配置为响应所述第一操作,记录所述第一页面 的状态信息并获取所述第二页面;
    所述跳转单元,配置为从所述第一页面跳转至所述第二页面;
    所述第二获取单元,配置为获取在所述第二页面上的第二操作,所述第二操作用于结束所述第二页面;
    所述恢复单元,配置为响应所述第二操作,根据所述第一页面的状态信息,从所述第二页面跳转至所述第一页面。
  10. 根据权利要求9所述的装置,其中,所述终端仅支持单窗口显示且所述单窗口显示的页面全屏充满显示在所述终端的显示界面上,所述装置还包括:显示单元,其中,
    所述显示单元,配置为控制所述第一页面全屏充满显示在所述显示界面上。
  11. 根据权利要求9所述的装置,其中,
    所述恢复单元,配置为响应所述第二操作,生成第一请求,并将所述第一请求发送给第一服务器,所述第一请求用于请求所述第一服务器返回第一响应;接收所述第一服务器返回的第一响应,所述第一响应用于触发终端从所述第二页面跳转至所述第一页面;根据所述第一页面的状态信息,从所述第二页面跳转至所述第一页面。
  12. 根据权利要求9所述的装置,其中,所述装置还包括:第三获取单元、第二响应单元、第一接收单元和第一更新单元,其中,
    所述第三获取单元,配置为从处于第一状态的第二页面获取第三操作,其中,所述第一状态为所述第二页面加载有支付信息输入请求时的状态,所述第三操作为支付信息的确认输入操作;
    所述第二响应单元,配置为响应所述第三操作,生成支付请求,并将所述支付请求发送给第二服务器,所述支付请求用于请求第二服务器进行支付业务;
    所述第一接收单元,配置为接收所述第二服务器返回的支付响应,所述支付响应中携带有服务器完成所述支付业务的支付结果;
    所述第一更新单元,配置为根据所述支付响应控制所述第二页面从所述第一状态更新至第二状态,其中,所述第二状态为所述第二页面上加载有所述支付结果时的状态;
    所述第二获取单元,配置为获取在处于所述第二状态的第二页面上的第二操作。
  13. 根据权利要求12所述的装置,其中,所述装置还包括第二更新单元,其中:
    所述第一接收单元,配置为通过外部通信接口接收所述第二服务器返回的支付响应,控制所述外部通信接口将所述支付响应发送给所述第二页面,控制所述第二页面将所述支付响应发送给所述第一页面;
    所述第二更新单元,配置为在所述从所述第二页面跳转至所述第一页面之后,根据所述支付响应,控制所述第一页面从第三状态更新至第四状态;
    其中,所述第三状态为所述第一页面上加载有所述状态信息时的状态,所述第四状态为在处于第三状态的第一页面上加载有所述支付业务对应的支付结果时的状态。
  14. 根据权利要求9所述的装置,其中,所述装置还包括:第四获取单元,第三响应单元和第二接收单元,其中:
    第四获取单元,配置为获取在第三页面上的第四操作,所述第四操作用于触发终端获取作为所述第一页面的网游页面;
    第三响应单元,配置为响应所述第四操作,控制所述第三页面调用游戏框架,并控制所述游戏框架向第三服务器发送第二请求,所述第二请求用于指示所述第三服务器返回游戏数据;
    所述第二接收单元,配置为接收所述第三服务器返回的所述游戏数据,控制所述游戏框架加载所述游戏数据以获取所述网游页面;
    所述跳转单元,配置为从所述第三页面跳转至所述网游页面。
  15. 根据权利要求10所述的装置,其中,所述第一页面为第一应用上的页面,所述装置还包括第五获取单元、第四响应单元和第六获取单元,其中:
    所述第五获取单元,配置为获取在所述终端的通知栏上的第五操作,其中,所述第五操作为进入所述通知栏上通知消息所在的第四页面的操作,所述第四页面为所述第二应用上的页面;
    所述第四响应单元,配置为响应所述第五操作,记录所述第一页面的状态数据并获取所述第四页面;
    所述跳转单元,配置为控制显示界面从所述第一页面跳转至所述第四页面;
    所述第六获取单元,配置为获取在所述显示界面上的第六操作;
    所述恢复单元,配置为响应所述第六操作,根据所述第一页面的状态信息,控制所述显示界面从所述第四页面跳转至所述第一页面。
  16. 根据权利要求9所述的装置,其中,所述装置方法还包括:停止单元,其中,
    所述停止单元,配置为响应所述第一操作,停止所述第一页面的运行。
  17. 一种终端,所述终端包括处理器和显示器,其中:
    所述显示器,配置为显示第一页面或第二页面;
    所述处理器,配置为获取在第一页面上的第一操作;响应所述第一操作,记录所述第一页面的状态信息并获取所述第二页面;控制所述显示器从显示所述第一页面跳转至显示所述第二页面;获取在所述第二页 面上的第二操作,所述第二操作用于结束所述第二页面;响应所述第二操作,根据所述第一页面的状态信息,控制所述显示器从显示所述第二页面跳转至显示所述第一页面。
  18. 一种计算机存储介质,所述计算机存储介质中存储有计算机可执行指令,该计算机可执行指令用于执行权利要求1至8任一项所述的网页运行方法。
PCT/CN2017/082290 2016-05-12 2017-04-27 一种网页运行方法及装置、终端、存储介质 WO2017193822A1 (zh)

Priority Applications (1)

Application Number Priority Date Filing Date Title
US15/982,189 US20180264361A1 (en) 2016-05-12 2018-05-17 Web page running method and apparatus, terminal, and storage medium

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201610319667.7 2016-05-12
CN201610319667.7A CN106021419A (zh) 2016-05-12 2016-05-12 一种网页运行方法及装置、终端

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US15/982,189 Continuation US20180264361A1 (en) 2016-05-12 2018-05-17 Web page running method and apparatus, terminal, and storage medium

Publications (1)

Publication Number Publication Date
WO2017193822A1 true WO2017193822A1 (zh) 2017-11-16

Family

ID=57100530

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2017/082290 WO2017193822A1 (zh) 2016-05-12 2017-04-27 一种网页运行方法及装置、终端、存储介质

Country Status (3)

Country Link
US (1) US20180264361A1 (zh)
CN (1) CN106021419A (zh)
WO (1) WO2017193822A1 (zh)

Families Citing this family (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106021419A (zh) * 2016-05-12 2016-10-12 腾讯科技(深圳)有限公司 一种网页运行方法及装置、终端
CN108234533B (zh) * 2016-12-12 2021-10-15 阿里巴巴集团控股有限公司 用户操作处理方法及相关设备
CN107169026B (zh) * 2017-04-12 2020-03-24 深圳充电网科技有限公司 一种网站页面显示的方法及装置
CN107357861B (zh) * 2017-06-30 2020-04-14 北京百度网讯科技有限公司 一种基于可视化控件呈现数据的方法和装置
CN109002486A (zh) * 2018-06-25 2018-12-14 武汉斗鱼网络科技有限公司 一种页面显示的处理方法、装置、终端和存储介质
CN110968822B (zh) * 2018-09-30 2023-04-18 阿里巴巴集团控股有限公司 页面检测方法、装置、电子设备和存储介质
CN112739432B (zh) * 2018-10-09 2024-04-19 深圳市欢太科技有限公司 游戏控制方法及相关产品
CN109583902A (zh) * 2018-11-20 2019-04-05 咪咕文化科技有限公司 一种信息获取方法及装置、计算机可读存储介质
CN109842616B (zh) * 2018-12-29 2021-09-17 卓米私人有限公司 账号绑定方法、装置及服务器
CN109840418B (zh) * 2019-02-19 2021-01-01 Oppo广东移动通信有限公司 应用程序的跳转控制方法、装置、存储介质及终端
CN110704150A (zh) * 2019-09-26 2020-01-17 中国银行股份有限公司 一种基于业务系统的页面显示方法、设备以及业务系统
CN111399809B (zh) * 2020-03-11 2023-09-12 苏州金羲智慧科技有限公司 一种rn和h5页面进行通信的方法、系统、装置、介质
CN112764958B (zh) * 2021-01-27 2023-01-13 上海淇玥信息技术有限公司 一种辅助修复页面故障的方法、装置和电子设备
CN112965944B (zh) * 2021-02-24 2023-09-19 携程计算机技术(上海)有限公司 可视化的页面还原方法及系统、电子设备及存储介质

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140087883A1 (en) * 2012-09-21 2014-03-27 Beintoo, S-p-A Interactive experience fully contained within an expandable embedded unit
CN104298427A (zh) * 2014-09-24 2015-01-21 腾讯科技(深圳)有限公司 结果界面显示方法和装置
CN105100401A (zh) * 2015-05-25 2015-11-25 努比亚技术有限公司 一种在界面切换后返回原界面的实现方法及装置
CN106021419A (zh) * 2016-05-12 2016-10-12 腾讯科技(深圳)有限公司 一种网页运行方法及装置、终端

Family Cites Families (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7007237B1 (en) * 2000-05-03 2006-02-28 Microsoft Corporation Method and system for accessing web pages in the background
US8607137B2 (en) * 2008-07-05 2013-12-10 Exceedland Incorporated Method and system for enhancing information accessibility via a global communications network
US9747621B1 (en) * 2008-09-23 2017-08-29 Amazon Technologies, Inc. Widget-based integration of payment gateway functionality into transactional sites
CN102880616B (zh) * 2011-07-15 2016-02-17 腾讯科技(深圳)有限公司 浏览器页面加载方法及装置
CN102902805B (zh) * 2012-10-15 2017-06-27 东软集团股份有限公司 一种页面访问方法和装置
US20140157246A1 (en) * 2012-12-04 2014-06-05 Zynga Inc. Building cross-platform asynchronous games
CN103440574B (zh) * 2013-07-29 2018-07-10 广州爱九游信息技术有限公司 游戏支付处理方法、客户端及系统
CN103678536A (zh) * 2013-12-02 2014-03-26 乐视网信息技术(北京)股份有限公司 一种实现页面返回操作的方法及装置

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140087883A1 (en) * 2012-09-21 2014-03-27 Beintoo, S-p-A Interactive experience fully contained within an expandable embedded unit
CN104298427A (zh) * 2014-09-24 2015-01-21 腾讯科技(深圳)有限公司 结果界面显示方法和装置
CN105100401A (zh) * 2015-05-25 2015-11-25 努比亚技术有限公司 一种在界面切换后返回原界面的实现方法及装置
CN106021419A (zh) * 2016-05-12 2016-10-12 腾讯科技(深圳)有限公司 一种网页运行方法及装置、终端

Also Published As

Publication number Publication date
CN106021419A (zh) 2016-10-12
US20180264361A1 (en) 2018-09-20

Similar Documents

Publication Publication Date Title
WO2017193822A1 (zh) 一种网页运行方法及装置、终端、存储介质
US20210037095A1 (en) Systems and methods for synchronizing content and information on multiple computing devices
US20240073278A1 (en) Integrated experience for applications within a mobile application
US10976923B2 (en) Enhanced virtual keyboard
US9904469B2 (en) Keyboard stream logging
US9973374B1 (en) Systems and methods for synchronizing content and information on multiple computing devices
WO2016127797A1 (zh) 用户信息获取方法、装置及服务器
US20130227409A1 (en) Integrating sensation functionalities into social networking services and applications
TWI761385B (zh) 設備配置方法及裝置、系統
US20140344658A1 (en) Enhanced links in curation and collaboration applications
US20130138723A1 (en) Dynamic browser icons
US20120173607A1 (en) Driving a user experience of a web application using rules that establish or change requests based on user behavior
CN103493009A (zh) 建立电子装置之间的连接
US8886819B1 (en) Cross-domain communication in domain-restricted communication environments
CN102918540A (zh) 利用凭证创建并启动万维网应用
WO2018161811A1 (zh) 一种基于h5的页面显示方法和终端
TW201243716A (en) Customized launching of applications
EP4276605A2 (en) Program orchestration method and electronic device
US10768810B2 (en) Enhanced keyboard including multiple application execution
CN110168539A (zh) 混合应用中的快速页面加载
WO2022057393A1 (zh) 事件处理方法、装置、存储介质、移动终端及电脑
US9805181B1 (en) Messaging channel for web pages and web applications
CN103339596B (zh) 基于网络服务的互操作方法、装置及系统
JP6877343B2 (ja) 非構造化メッセージの処理
TW202301156A (zh) 顯示方法、電子設備和電腦可讀儲存媒體

Legal Events

Date Code Title Description
NENP Non-entry into the national phase

Ref country code: DE

121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 17795440

Country of ref document: EP

Kind code of ref document: A1

122 Ep: pct application non-entry in european phase

Ref document number: 17795440

Country of ref document: EP

Kind code of ref document: A1