Display method and device for page header

By loading and displaying interactive resources in the web page header interface, the problem of lack of interaction in the page header area in the existing technology is solved, and users' browsing interest and usage stickiness are enhanced.

CN114996612BActive Publication Date: 2025-07-18SHANGHAI HODE INFORMATION TECH CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202210542298.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-05-18
Publication Date
2025-07-18
Estimated Expiration
2042-05-18

AI Technical Summary

Technical Problem

In the prior art, the web page header area is usually displayed in the form of pictures or videos, and lacks interaction with users, resulting in low user interest in browsing and unable to improve user stickiness.

Method used

By receiving the page header loading request, we judge whether the page header control can display interactive resources, and when it can display interactive resources, it loads and displays interactive interfaces, such as game resources, allowing users to interact in web page header.

Benefits of technology

It realizes displaying interactive game resources in the page header control, which improves user's browsing interest and usage stickiness.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114996612B_ABST
    Figure CN114996612B_ABST
Patent Text Reader

Abstract

The present application provides a method and apparatus for displaying a page header. The method for displaying the page header includes: receiving a header loading request for a target page, where the header loading request is used to load a header control of the target page; loading static resources corresponding to the header control according to the header loading request, and determining whether the header control can display interactive resources; in the case where the header control can display the interactive resources, loading the interactive resources and displaying an interactive interface corresponding to the interactive resources in the header control, where the interactive interface is used for a user to interact with the interactive resources. The purpose of displaying interactive game resources in the header control is achieved, enabling the user to play games in the web page header, thereby improving the user's browsing interest and usage viscosity.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the technical field of page header information processing, and particularly to a method for displaying a page header. This application also relates to a display device for a page header, a computing device, and a computer-readable storage medium. Background Art

[0002] With the development and application of the Internet, more and more users will browse relevant information, watch videos, live broadcasts, etc. on the Internet. When a user accesses a web page through a browser, especially some web pages with the nature of a home page or a main page, the page can usually be functionally divided into two areas. One part is the header, and the other part is the area for displaying the main content. Among them, the header is usually displayed at the top of the page in the form of a horizontal banner. Therefore, it is often called a "banner". Its main function is to beautify the page and set off the page atmosphere. The header area in a web page may be the area that users notice first. Therefore, setting relevant content in the header area is a means to attract users and improve users' browsing interest for the web page. Currently, the header area of a web page is usually presented in the form of a picture or a video. Such a presentation method is too boring for users and there is no interaction with users, lacking attraction to users. Therefore, how to improve the attraction of the web page header area to users is an urgent problem to be solved currently. Summary of the Invention

[0003] In view of this, an embodiment of this application provides a method for displaying a page header. This application also relates to a display device for a page header, a computing device, and a computer-readable storage medium to solve the problem in the prior art that the page header cannot interact with users, resulting in low user browsing interest.

[0004] According to the first aspect of the embodiment of this application, a method for displaying a page header is provided, which is applied to a browser and includes:

[0005] Receiving a header loading request for a target page, where the header loading request is used to load a header control of the target page;

[0006] Loading static resources corresponding to the header control according to the header loading request, and determining whether the header control can display interactive resources;

[0007] When the header control can display the interactive resources, loading the interactive resources and displaying an interactive interface corresponding to the interactive resources in the header control, where the interactive interface is used for users to interact with the interactive resources.

[0008] According to a second aspect of the embodiments of the present application, a display device for a page header is provided, which is applied to a browser and includes:

[0009] A receiving module, configured to receive a header loading request for a target page, where the header loading request is used to load a header control of the target page;

[0010] A judging module, configured to load static resources corresponding to the header control according to the header loading request, and judge whether the header control can display interactive resources;

[0011] A display module, configured to load the interactive resources and display an interactive interface corresponding to the interactive resources in the header control when the header control can display the interactive resources, where the interactive interface is used for a user to interact with the interactive resources.

[0012] According to a third aspect of the embodiments of the present application, a computing device is provided, including a memory, a processor, and computer instructions stored on the memory and executable on the processor. When the processor executes the computer instructions, the steps of the display method for the page header are implemented.

[0013] According to a fourth aspect of the embodiments of the present application, a computer-readable storage medium is provided, which stores computer instructions. When the computer instructions are executed by a processor, the steps of the display method for the page header are implemented.

[0014] The display method for the page header provided by the present application is applied to a browser and includes: receiving a header loading request for a target page, where the header loading request is used to load a header control of the target page; loading static resources corresponding to the header control according to the header loading request, and judging whether the header control can display interactive resources; when the header control can display the interactive resources, loading the interactive resources and displaying an interactive interface corresponding to the interactive resources in the header control, where the interactive interface is used for a user to interact with the interactive resources.

[0015] In an embodiment of the present application, by judging whether a header control can display interactive resources, when the header control can display the interactive resources, an interactive interface corresponding to the interactive resources is displayed in the header control. The purpose of displaying interactive game resources in the header control is achieved, enabling users to play games in the web page header to improve user browsing interest and usage viscosity. Description of the Drawings

[0016] Figure 1 is a flowchart of a display method for a page header provided by an embodiment of the present application;

[0017] Figure 2 It is a processing flow chart of a method for displaying a page header applied to a loading header game provided by an embodiment of the present application;

[0018] Figure 3 It is a schematic structural diagram of a page header display device provided by an embodiment of the present application;

[0019] Figure 4 It is a structural block diagram of a computing device provided by an embodiment of the present application. Detailed implementation manners

[0020] In the following description, many specific details are set forth in order to provide a thorough understanding of the present application. However, the present application can be implemented in many other ways different from those described herein, and those skilled in the art can make similar generalizations without departing from the connotation of the present application. Therefore, the present application is not limited by the specific implementations disclosed below.

[0021] The terms used in one or more embodiments of the present application are for the purpose of describing specific embodiments only and are not intended to limit one or more embodiments of the present application. The singular forms "a", "said", and "the" used in one or more embodiments of the present application and the appended claims are also intended to include the plural forms unless the context clearly indicates otherwise. It should also be understood that the term "and / or" used in one or more embodiments of the present application refers to and includes any or all possible combinations of one or more of the associated listed items.

[0022] It should be understood that although the terms first, second, etc. may be used in one or more embodiments of the present application to describe various information, these information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. For example, without departing from the scope of one or more embodiments of the present application, the first may also be referred to as the second, and similarly, the second may also be referred to as the first. Depending on the context, the word "if" as used herein may be interpreted as "when" or "while" or "in response to determining".

[0023] First, the noun terms involved in one or more embodiments of the present application are explained.

[0024] Web page header: The focus map area on the home page of the web - end website.

[0025] Document Object Model (DOM): It connects the web page with scripts or programming languages. Usually it refers to JavaScript, but modeling HTML, SVG, or XML documents as objects is not part of the JavaScript language. Therefore, the DOM model represents a document with a logical tree, and the end point of each branch of the tree is a node, and each node contains objects.

[0026] WebGL: WebGL is a JavaScript API used to render interactive 2D and 3D graphics in any compatible web browser without using plug-ins.

[0027] Shadow DOM: It can attach a hidden and independent DOM to an element, hide the markup structure, styles, and behaviors, and isolate them from other code on the page to ensure that different parts do not mix together, making the code cleaner and neater.

[0028] Currently, some web pages include a web page header, which is usually displayed at the top of the page and used to display the main content. When a user accesses a web page through a browser on the web side, the web page header can display relevant information to the user to attract the user to browse. However, in the prior art, pictures and videos are usually used as the header of the page. However, such a header conveys less information to the user, cannot interact effectively with the user, easily causes the user to have little interest in browsing the web page header, and cannot increase the user's usage viscosity.

[0029] Based on this, in the present application, a method for displaying a page header is provided, which realizes adding game resources that can interact with users to the page header and improves the user's browsing interest. The present application also relates to a display device for a page header, a computing device, and a computer-readable storage medium, which will be described in detail one by one in the following embodiments.

[0030] Figure 1 The flowchart of a method for displaying a page header according to an embodiment of the present application is shown, which specifically includes the following steps:

[0031] Step 102: Receive a header loading request for a target page, where the header loading request is used to load the header control of the target page.

[0032] Among them, the target page can be understood as the page that the user browses this time. A header control is set on the target page, and the header control is used to display recommended information to the user. For example, some activity pictures, recommended videos and other information can be displayed in the header control. In the embodiments of the present application, a game entry and game animations can also be displayed in the header control. The header loading request can be understood as a request to load the header of the target page. When the user opens a page including a header, the browser will receive a request to load the header, and load the header control through this header loading request, so as to display relevant information to the user.

[0033] In practical applications, when the user uses a browser to access some pages including a header on the web side, the browser will receive a browsing request from the user client, and at the same time, will receive a header loading request sent by the server or the client, and load the header control of the target page according to the header loading request.

[0034] In an embodiment of the present application, the browser receives a header loading request for the target page A. The header loading request is used to load the header control of the target page A, and pictures, videos or games can be displayed in the header control.

[0035] Step 104: Load the static resources corresponding to the header control according to the header loading request, and determine whether the header control can display interactive resources.

[0036] Among them, the static resources can be understood as the picture resources displayed by the header control. In practical applications, before determining whether the header control can display interactive resources, default picture resources can be displayed in the header control to ensure that the user can view the corresponding picture resources before seeing the interactive resources, so that the header control will not be in an idle state, so as to avoid that when loading video resources or game resources, the user cannot view the display content of the header control and reduce the user's browsing interest. The interactive resources can be understood as the game resources displayed by the header control. After loading the static resources, it is possible to determine whether the header control can display interactive resources, so as to determine whether to provide the display of game resources to the user. Determining whether the header control can display interactive resources is essentially determining whether the current browser supports header games. If the browser supports header games, the header control can display the corresponding interactive resources, that is, game resources.

[0037] In practical applications, static resources can be replaced and determined periodically, or determined according to the static resource identifier carried in the header loading request. In the case of periodic replacement, the static resources loaded by default on the target page are determined; in the case of determination according to the static resource identifier, the static resource identifier is carried in the header loading request, and the static resources to be displayed are determined according to the static resource identifier. When determining the display content of the header control according to the configuration information of the header control, the browser can first obtain the picture resource file and load the picture resource file to first display the picture resource in the header control, reducing the boredom of the user while waiting for the loading and improving the user's browsing interest.

[0038] In an embodiment of the present application, the default picture corresponding to the header control is loaded according to the header loading request, and it is determined whether the header control of the target page can display interactive resources.

[0039] Specifically, determining whether the header control can display interactive resources includes: obtaining the configuration information of the header control according to the header loading request, where the configuration information includes an interactive configuration file;

[0040] Determining whether the header control can display interactive resources according to the interactive configuration file.

[0041] Among them, the configuration information of the header control can be understood as the information of the content to be displayed by the header control. For example, the configuration information may include resource information such as pictures and videos or an interactive configuration file. The interactive configuration file can be understood as the configuration file required before the header control displays a game. The interactive configuration file may include a self-check program for the browser to support displaying game resources or configuration files such as game types and names. The browser can determine the content to be displayed for the user this time according to the configuration information.

[0042] In practical applications, when a user browses the target page through a browser, the browser obtains the configuration information of the header control of the target page according to the header loading request. When the configuration information includes an interactive configuration file, the browser will first determine whether the header control can display game resources according to the interactive configuration file. When the judgment result is that the header control cannot display game resources, picture resources or video resources are displayed to the user.

[0043] In an embodiment of the present application, following the above example, the browser obtains the configuration information of the header control according to the header loading request. The configuration information includes a self-check program for the header control to display game resources. According to the self-check program, it can be determined whether the browser supports displaying game resources in the header control.

[0044] Specifically, the interactive configuration file includes an interactive detection file;

[0045] Determining whether the header control can display interactive resources according to the interactive configuration file includes:

[0046] When the interactive detection file can be run, it is determined that the header control can display interactive resources;

[0047] When the interactive detection file cannot be run, it is determined that the header control cannot display interactive resources.

[0048] Among them, the interactive detection file can be understood as a file for detecting whether the header control can display interactive resources. The browser determines whether to support the header control to load the interactive resource file by whether it can run the interactive detection file.

[0049] In practical applications, when the browser cannot run the interactive detection file, it means that the browser does not support loading the interactive resource file in the header control, so pictures and video resources are loaded in the header control; when the browser can run the interactive detection file, it means that the browser supports loading the interactive resource file in the header control, so the interactive resource file is loaded in the header control.

[0050] In a specific embodiment of the present application, following the above example, the browser obtains the interactive configuration file of the header control. The interactive configuration file is a game self-check program. When the browser detects that it can run the game self-check program, it means that the browser supports displaying game resources in the header control, so game resources can be displayed in the header control.

[0051] In a specific embodiment of the present application, following the above example, the browser obtains the interactive configuration file of the header control. The interactive configuration file is a game self-check program. When it is detected that the browser cannot run the game self-check program, it means that the browser does not support displaying game resources in the header control, so picture resources or video resources can be displayed in the header control.

[0052] Step 106: When the header control can display the interactive resources, load the interactive resources and display the interactive interface corresponding to the interactive resources in the header control, where the interactive interface is used for the user to interact with the interactive resources.

[0053] Among them, that the header control can display interactive resources can be understood as that the browser supports displaying game resources in the header control. When the header control can display interactive resources, the browser will obtain the interactive resources and load the interactive resource file corresponding to the interactive resources. The interactive resource file is the game resource file. Loading the game resource file in the header control means that the game resources corresponding to the game resource file can be displayed in the header control, and the interactive resources can be understood as game resources.

[0054] In actual implementation, the interaction interface corresponding to the interaction resource may include the display animation of the game and the game entry control. When the user clicks the game entry control, the user can enter the game and play the game in the header control of the target page, thereby improving the user's browsing interest and usage viscosity.

[0055] In an embodiment of the present application, following the above example, when the browser supports loading the game resource file in the header control, the browser obtains the game resource file and loads the game resource file in the header control so that the header control can display the game resource.

[0056] In actual applications, there are also cases where the browser does not support displaying the interaction resource in the header control. Specifically, the configuration information further includes a video resource file. Determining whether the header control can display the interaction resource according to the interaction configuration file further includes:

[0057] When the header control cannot display the interaction resource, load the video resource file and load and display the video resource corresponding to the video resource file in the header control.

[0058] The video resource file is a non-interactive resource file. In actual applications, when the header control cannot display the interaction resource, that is, when the browser does not support running the header game in the header control, the video resource file can be obtained, and the video resource will be displayed in the header control subsequently.

[0059] In an embodiment of the present application, following the above example, when the header control cannot display the game resource, obtain the video resource file and load and display the video resource corresponding to the video resource file in the header control.

[0060] When the header control can display the interaction resource, the browser needs to obtain the interaction resource file corresponding to the interaction resource to be displayed. Specifically, the configuration information includes a target interaction resource identifier;

[0061] Loading the interaction resource includes:

[0062] Search for and determine the target interaction resource file in the resource database according to the target interaction resource identifier;

[0063] Load the target interaction resource file.

[0064] Among them, the target interaction resource identifier can be understood as the identifier of the interaction resource file of the interaction resource loaded by the current header control. The interaction resource identifier can be understood as the unique serial number or unique name of the resource. The resource database can be understood as a database that stores all resource files. The database can be stored on the server. When the browser needs the target interaction resource file, it can find the target interaction resource file in the resource database according to the target interaction resource identifier corresponding to the target interaction resource, so as to load the target interaction resource file subsequently.

[0065] In practical applications, many types of interaction resources can be displayed in the header control of the page, that is, many different game resources can be displayed. Specifically in implementation, the display rules can be determined by the page developers. For example, different game resources can be displayed according to different times. When the same game resources are displayed within a certain time period, the browser can determine the target interaction resource file to be displayed this time according to the target interaction resource identifier in the configuration information obtained at this time, and load and display the target interaction resource in the header control.

[0066] In an embodiment of the present application, the configuration information includes the target interaction resource identifier A. By searching in the resource database according to the target interaction resource identifier A, the target interaction resource file A corresponding to the target interaction resource identifier A is found, and then the target interaction resource A can be loaded and displayed in the header control.

[0067] Specifically, the interaction resources include game resource files;

[0068] Loading the interaction resources and displaying the interaction interface corresponding to the interaction resources in the header control includes:

[0069] Loading the game resource files;

[0070] Displaying the game interaction interface corresponding to the game resource files in the header control.

[0071] Among them, the interaction resource file corresponding to the interaction resource is the game resource file. Since the user can play games through the header control, that is, the user can interact with the game resources in the header control. The game interaction interface can be understood as a game interface where the user can interact. Specifically in implementation, the game interaction interface includes the header game entrance and the game standby animation.

[0072] In practical applications, the game resource files can include the initial display animation of the game and the game entrance control. After the header control loads the game resource files, the header game entrance and the game standby animation can be displayed in the header control. The user can start playing the game by clicking the game entrance control in the header.

[0073] Specifically, the game resource file includes a standby resource file;

[0074] Loading the game resource file includes:

[0075] Loading the standby resource file;

[0076] Correspondingly, displaying the game interaction interface corresponding to the game resource file in the header control includes:

[0077] Displaying the standby resources corresponding to the standby resource file in the header control.

[0078] Among them, the standby resources can be understood as game standby animation resources, and the standby resource file can be understood as the resource file corresponding to the game standby animation.

[0079] In an embodiment of the present application, following the previous example, load the game resource file and display the game entry control and the game standby animation corresponding to the game resource file in the header control.

[0080] In practical applications, after the browser loads and displays the game entry control and the game standby animation in the header control, the user can interact with the interactive resources displayed in the header control, that is, click the game entry control to start playing the game. Specifically, the method further includes:

[0081] Receiving an interaction instruction for the game interaction interface;

[0082] Obtaining the game running resource file in response to the interaction instruction;

[0083] Loading the game running resource file and starting the target game corresponding to the game running resource in the header control.

[0084] Among them, the interaction instruction can be understood as an interaction instruction for the user and the game resource, that is, the instruction for the user to click the game entry control. The game running resource file can be understood as the resource file required to run the game. The game running resource file can be a JavaScript file for running the header game, and loading the game running resource can initialize the game object and start the game.

[0085] In practical applications, when the user sees the game resources displayed in the header control and has the idea of playing, they will start the game by clicking the game entry control, that is, the start game button. At this time, the browser will obtain and load the game running resource file, so as to start the game in the header control and provide a playing channel for the user.

[0086] In an embodiment of the present application, upon receiving a start instruction from the user for game resources, that is, upon receiving a click instruction from the user for the game entry control in the game resources, a script file for running the game is obtained and the script file is loaded, so as to start the target game in the header control.

[0087] Specifically, the game running resource file further includes an animation resource file, and the method further includes:

[0088] Loading the animation resource file and playing the corresponding animation resource of the animation resource file in the header control.

[0089] Among them, the animation resource file can be understood as an animation file displayed when loading the game. After loading the animation resource file, the corresponding game animation can be played in the header control, which can be to display the corresponding plot animation for the user simultaneously when loading the script file of the game, avoiding the boredom of loading the animation and reducing the user's game experience.

[0090] In practical applications, when the user clicks to start the game, the game running resource file starts to be loaded. During the loading process, the animation resource file can be loaded first to display the relevant plot animation of the game for the user, improving the user's playing interest and game experience.

[0091] In an embodiment of the present application, following the above example, the game running resource file includes an animation resource file and a game script file. When loading the game running resource file, the animation resource file can be loaded first, and the corresponding animation resource of the animation resource file is played in the header control.

[0092] Specifically, after playing the corresponding animation resource of the animation resource file in the header control, the method further includes:

[0093] Determining the loading status of the game running resource file;

[0094] In the case where the loading status is not completed, displaying the loading progress of the loading status in the header control.

[0095] Among them, the loading status can be understood as the loading situation of the game running resource file, and the loading status can include loading and loaded. When the loading status is loading, it means that the user cannot start playing the game yet and needs to wait for the game to load. At this time, the loading progress of the game can be displayed in the header control.

[0096] In practical applications, when loading the game running resource file, the plot animation of the game can be displayed for the user. After the plot animation is played, if the game running resource file has not been loaded yet, the current loading progress will be displayed for the user.

[0097] In an embodiment of the present application, after the plot animation of the game is played to the end, the loading status of the game running resource file is determined. When the loading status is incomplete, the loading progress is displayed in the header control.

[0098] Specifically, the method further includes:

[0099] Receiving an operation instruction for the target game;

[0100] Obtaining the initial game screen of the target game according to the operation instruction;

[0101] Generating a target game screen corresponding to the operation instruction based on the operation instruction and the initial game screen.

[0102] Among them, the operation instruction can be understood as the instruction input by the user when playing the game. The operation instruction can be an instruction to move the game character. The initial game screen can be understood as the current game screen. After receiving the user's operation instruction, it is necessary to generate a target game screen corresponding to the operation instruction according to the current game screen and the operation instruction. The target game screen is the screen after performing the operation corresponding to the operation instruction.

[0103] In practical applications, when the user plays the game, operation instructions for the target game will be continuously issued, and the game screen of the target game needs to be continuously rendered according to the operation instructions.

[0104] In an embodiment of the present application, a moving character instruction for the target game is received, the current game screen of the target game is obtained according to the operation instruction, and the game screen after executing the operation instruction is generated according to the operation instruction and the current game screen.

[0105] Specifically, generating the target game screen corresponding to the operation instruction based on the operation instruction and the initial game screen includes:

[0106] Obtaining the initial game logic information of the initial game screen;

[0107] Updating the initial game logic information according to the operation instruction to generate target game logic information;

[0108] Rendering and generating a target game screen based on the target game logic information.

[0109] Among them, the initial game logic information can be understood as the logic of the game scene objects in the initial game screen. The initial game logic information can include the logic of the game character standing, running, jumping, etc., and also includes the collision and feedback effect logic of some objects in the game scene. The initial game logic information is updated by the operation instruction to generate target game logic information, and the target game screen can be rendered and generated according to the target game logic information.

[0110] In practical applications, the game architecture of the target game includes components such as a renderer, a scene tree, a physics engine, an animation state machine, a camera, and a game logic system.

[0111] The renderer is an object that obtains camera data, traverses the entire scene tree, and renders all renderable objects on the frame buffer in a certain order. A renderable object is an encapsulation of a WebGL Shader Program, a WebGL VertexArrayObject, a WebGL Texture, and some configurable parameters. By calling its render method, the object described by it can be rendered on the frame buffer using the drawing instructions of WebGL.

[0112] The scene tree organizes all objects in the entire scene through a tree structure. Transformation operations performed on the parent node will be applied to all its child nodes. The game running logic traverses the scene tree from the root node to perform updates. The renderer also traverses the scene tree from the root node to render the renderable objects in the entire scene.

[0113] The physics engine realizes the need for some objects in the scene to have collision and feedback effects similar to the real world. Each object that requires physical effects will additionally include parameters describing its physical properties and its physical state data, and runs the update mechanism of the physics engine in each frame to calculate its updated state data.

[0114] The animation state machine is used when some objects in the scene need to maintain their animation states. For example, a player has different states such as standing, running, jumping, falling, grabbing, etc. and their animations. To facilitate the maintenance of these states and ensure that each state can play different animations correctly, the animation state machine is abstracted separately here, providing the execution logic triggered when switching states and the judgment logic for when to switch from the current state to the next state for maintenance.

[0115] The camera is used to determine the perspective position, including parameters such as the up direction of the perspective, the orientation direction, the field of view size, orthographic or perspective projection, and the actual rendering resolution. It calculates the view matrix and projection matrix of the current camera and provides them to the renderer for use. At the same time, it supports runtime modification of various parameters of the camera to meet the requirements of some scenarios for camera movement effects.

[0116] The game logic system completes the execution of logic and the update of data by referencing and updating part of the game state, resources, and scene objects. When playing the game in the header control, through the Shadow DOM technology, its style and input are isolated from other parts of the page, and the input is read by listening to the input events in the entire header game area, supporting restarting with keyboard operations. The start, end, novice tutorial, and in-game score display HUD of the game are all achieved by adding or removing child elements in the Shadow DOM. Since it does not rely on a large front-end framework, the volume of the game resource files is reduced.

[0117] In an embodiment of the present application, the initial game logic information of the current game screen is obtained. If the user's operation instruction is to control the game character to move forward, then the data of the game character in the initial game logic information is updated according to the operation instruction to generate target game logic information, and a target game screen is generated according to the target game logic information.

[0118] Specifically, the operation instruction further includes a perspective adjustment instruction;

[0119] Generating the target game screen corresponding to the operation instruction based on the operation instruction and the initial game screen further includes:

[0120] Obtaining the initial perspective information of the initial game screen;

[0121] Adjusting the initial perspective information according to the perspective adjustment instruction to generate target perspective information;

[0122] Rendering and generating a target game screen based on the target perspective information.

[0123] Among them, the initial perspective information can be understood as the perspective of the current game screen. When the operation instruction is a perspective adjustment instruction, it means that the user wants to adjust the perspective of the game screen. Then, the initial perspective information can be adjusted according to the perspective adjustment instruction to generate target perspective information, and a target game screen is generated according to the target perspective information.

[0124] In practical applications, the user can dynamically adjust the game perspective. For example, if the current perspective is at a distance a from the game character and the user wants to increase the distance from the game character, a perspective adjustment instruction can be issued. The perspective adjustment instruction includes an instruction to adjust the field of view size. The game field of view size is adjusted according to the perspective adjustment instruction, thereby adjusting the distance from the game character. Specifically, the perspective adjustment instruction can be understood as an instruction to adjust the camera. By adjusting parameters such as the position, direction, and field of view size of the camera, adjustment parameters can be provided for the renderer, and the renderer generates a target game screen.

[0125] In an embodiment of the present application, the operation instruction includes a viewing angle adjustment instruction. If the viewing angle adjustment instruction is to adjust the game screen to move downward, the initial viewing angle information of the current game screen is obtained, and the initial viewing angle information of the current game screen is adjusted according to the viewing angle adjustment instruction to generate target viewing angle information. The target viewing angle information is the viewing angle information after the initial viewing angle information moves downward, and the target game screen is rendered according to the target viewing angle information.

[0126] A method for displaying a page header provided by the present application is applied to a browser and includes: receiving a header loading request for a target page, where the header loading request is used to load a header control of the target page; loading static resources corresponding to the header control according to the header loading request, and determining whether the header control can display interactive resources; when the header control can display the interactive resources, loading the interactive resources and displaying an interactive interface corresponding to the interactive resources in the header control, where the interactive interface is used for a user to interact with the interactive resources. By determining whether the header control can display the interactive resources and, when the header control can display the interactive resources, displaying the interactive resources in the header control, the user can interact with the interactive resources in the header control, that is, play games in the header control, improving the user's browsing interest in the page and enhancing the user's usage viscosity and sense of identity.

[0127] The following combines the attached Figure 2 , taking the application of the method for displaying a page header provided by the present application in loading a header game as an example, to further illustrate the method for displaying the page header. Among them, Figure 2 FIG. shows a processing flow chart of a method for displaying a page header applied to loading a header game provided by an embodiment of the present application, which specifically includes the following steps:

[0128] Step 202: Receive a header loading request for a target page, where the header loading request is used to load a header control of the target page.

[0129] Among them, the header loading request is a request to load the header control of the target page, and the target page can be a page of some portal websites.

[0130] Step 204: Obtain configuration information of the header control according to the header loading request, where the configuration information includes a game configuration file.

[0131] Among them, the game configuration file is a self-check program file of the header game run by the browser.

[0132] Step 206: Determine whether the header control can load a game resource file corresponding to the game configuration file.

[0133] Among them, determining whether the header control can load the game resource file is to determine whether the browser can run the header game self-check program file. When the header control can load the game resource file, the game resource file is obtained and loaded to display the game resource in the header control.

[0134] Step 208: Search in the resource database according to the target game resource identifier in the configuration information, and obtain the target game resource file according to the search result.

[0135] Step 210: Load the target game resource file.

[0136] Step 212: Display the game resource corresponding to the target game resource file in the header control.

[0137] The display method for the page header applied to load the header game provided by an embodiment of the present application includes receiving a header loading request for a target page, where the header loading request is used to load the header control of the target page, obtaining the configuration information of the header control according to the header loading request, where the configuration information includes a game configuration file, determining whether the header control can load the game resource file corresponding to the game configuration file, searching in the resource database according to the target game resource identifier in the configuration information, obtaining the target game resource file according to the search result, loading the target game resource file, and displaying the game resource corresponding to the target game resource file in the header control. By determining whether the header control can load the game resource file corresponding to the game configuration file, the actual content finally loaded by the header control is determined. When the header control can load the game resource file, the game resource is loaded and displayed in the header control, enabling the user to play games in the header control of the target page, improving the user's browsing interest, and enhancing the user's usage viscosity and sense of identity.

[0138] Corresponding to the above method embodiment, the present application also provides an embodiment of a display device for a page header. Figure 3 The structural schematic diagram of a display device for a page header provided by an embodiment of the present application is shown. As Figure 3 shown, the device includes:

[0139] A receiving module 302, configured to receive a header loading request for a target page, where the header loading request is used to load the header control of the target page;

[0140] A judgment module 304, configured to load the static resources corresponding to the header control according to the header loading request, and judge whether the header control can display interactive resources;

[0141] The display module 306 is configured to load the interactive resource and display the interactive interface corresponding to the interactive resource in the header control when the header control can display the interactive resource, where the interactive interface is used for a user to interact with the interactive resource.

[0142] Optionally, the determination module 304 is further configured to: obtain the configuration information of the header control according to the header loading request, where the configuration information includes an interactive configuration file;

[0143] Determine whether the header control can display the interactive resource according to the interactive configuration file.

[0144] Optionally, the determination module 304 is further configured to: the interactive configuration file includes an interactive detection file;

[0145] When the interactive detection file can be run, determine that the header control can load the interactive resource file corresponding to the interactive configuration file;

[0146] When the interactive detection file cannot be run, determine that the header control cannot load the interactive resource file corresponding to the interactive configuration file.

[0147] Optionally, the determination module 304 is further configured to: the configuration information includes a target interactive resource identifier;

[0148] Search in the resource database according to the target interactive resource identifier;

[0149] Obtain and load the target interactive resource file according to the search result.

[0150] Optionally, the display module 306 is further configured to: the interactive resource includes a game resource file;

[0151] Load the game resource file;

[0152] Display the game interactive interface corresponding to the game resource file in the header control.

[0153] Optionally, the display module 306 is further configured to: the game resource file further includes a standby resource file;

[0154] Load the standby resource file;

[0155] Display the standby resource corresponding to the standby resource file in the header control.

[0156] Optionally, the device further includes a startup device, configured to:

[0157] Receive an interaction instruction for the game interaction interface;

[0158] In response to the interaction instruction, obtain a game running resource file;

[0159] Load the game running resource file and start the target game corresponding to the game running resource in the header control.

[0160] Optionally, the starting device is further configured that: the game running resource file further includes an animation resource file;

[0161] Load the animation resource file and play the animation resource corresponding to the animation resource file in the header control.

[0162] Optionally, the starting device is further configured that:

[0163] Determine the loading status of the game running resource file;

[0164] When the loading status is not completed, display the loading progress of the loading status in the header control.

[0165] Optionally, the judging module 304 is further configured that: the configuration information further includes a video resource file;

[0166] When the header control cannot display the interaction resource, load the video resource file and load and display the video resource corresponding to the video resource file in the header control.

[0167] Optionally, the starting device is further configured that:

[0168] Receive an operation instruction for the target game;

[0169] Obtain the initial game screen of the target game according to the operation instruction;

[0170] Generate a target game screen corresponding to the operation instruction based on the operation instruction and the initial game screen.

[0171] Optionally, the starting device is further configured that:

[0172] Obtain the initial game logic information of the initial game screen;

[0173] Update the initial game logic information according to the operation instruction to generate target game logic information;

[0174] Render and generate a target game screen based on the target game logic information.

[0175] Optionally, the starting device is further configured that:

[0176] Obtain the initial perspective information of the initial game screen;

[0177] Adjust the initial perspective information according to the perspective adjustment instruction to generate target perspective information;

[0178] Render and generate a target game screen based on the target perspective information.

[0179] A display device for a page header provided by this application is applied to a browser and includes: a receiving module configured to receive a header loading request for a target page, where the header loading request is used to load a header control of the target page; a judgment module configured to load static resources corresponding to the header control according to the header loading request and judge whether the header control can display interactive resources; a display module configured to, when the header control can display the interactive resources, load the interactive resources and display an interactive interface corresponding to the interactive resources in the header control, where the interactive interface is used for a user to interact with the interactive resources. By judging whether the header control can display interactive resources and, when the header control can display the interactive resources, displaying the interactive resources in the header control, the user can interact with the interactive resources in the header control, that is, perform game-playing interactions in the header control, improving the user's browsing interest in the page and enhancing the user's usage viscosity and sense of identity.

[0180] The above is a schematic solution of a display device for a page header in this embodiment. It should be noted that the technical solution of the display device for the page header and the technical solution of the above-described method for displaying the page header belong to the same concept. For the details not described in the technical solution of the display device for the page header, reference can be made to the description of the technical solution of the method for displaying the page header above.

[0181] Figure 4 FIG. shows a block diagram of a computing device 400 according to an embodiment of the present application. The components of the computing device 400 include, but are not limited to, a memory 410 and a processor 420. The processor 420 is connected to the memory 410 through a bus 430, and a database 450 is used to store data.

[0182] The computing device 400 further includes an access device 440 that enables the computing device 400 to communicate via one or more networks 460. Examples of such networks include the Public Switched Telephone Network (PSTN), Local Area Network (LAN), Wide Area Network (WAN), Personal Area Network (PAN), or a combination of communication networks such as the Internet. The access device 440 may include one or more of any type of wired or wireless network interface (e.g., Network Interface Card (NIC)), such as an IEEE802.11 Wireless Local Area Network (WLAN) wireless interface, a Worldwide Interoperability for Microwave Access (Wi-MAX) interface, an Ethernet interface, a Universal Serial Bus (USB) interface, a cellular network interface, a Bluetooth interface, a Near Field Communication (NFC) interface, and so on.

[0183] In one embodiment of the present application, the above components of the computing device 400 and Figure 4 other components not shown may also be connected to each other, for example, via a bus. It should be understood that Figure 4 the block diagram of the computing device shown is for illustrative purposes only and is not a limitation on the scope of the present application. Those skilled in the art can add or replace other components as needed.

[0184] The computing device 400 can be any type of stationary or mobile computing device, including a mobile computer or mobile computing device (e.g., tablet computer, personal digital assistant, laptop computer, notebook computer, netbook, etc.), a mobile phone (e.g., smartphone), a wearable computing device (e.g., smartwatch, smart glasses, etc.) or other types of mobile devices, or a stationary computing device such as a desktop computer or PC. The computing device 400 can also be a mobile or stationary server.

[0185] Wherein, when the processor 420 executes the computer instructions, the steps of the method for displaying the page header are implemented.

[0186] The above is a schematic solution of a computing device in this embodiment. It should be noted that the technical solution of this computing device and the technical solution of the above method for displaying the page header belong to the same concept. For the details not described in the technical solution of the computing device, reference can be made to the description of the technical solution of the above method for displaying the page header.

[0187] One embodiment of the present application further provides a computer-readable storage medium storing computer instructions, which, when executed by a processor, implement the steps of the method for displaying the page header as described above.

[0188] The above is a schematic solution of a computer-readable storage medium according to this embodiment. It should be noted that the technical solution of this storage medium and the technical solution of the above method for displaying a page header belong to the same concept. For the details not described in the technical solution of the storage medium, reference can be made to the description of the technical solution of the above method for displaying a page header.

[0189] The above describes specific embodiments of the present application. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recited in the claims may be performed in a different order than in the embodiments and still achieve the desired result. Additionally, the processes depicted in the figures do not necessarily require the particular order or sequential order shown to achieve the desired result. In certain embodiments, multitasking and parallel processing are also possible or may be advantageous.

[0190] The computer instructions include computer program code, which may be in source code form, object code form, executable file, or some intermediate form, etc. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, USB flash drive, mobile hard disk, magnetic disk, optical disc, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signal, telecommunication signal, and software distribution medium, etc. It should be noted that the content included in the computer-readable medium may be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, the computer-readable medium does not include electrical carrier signals and telecommunication signals.

[0191] It should be noted that for the foregoing method embodiments, for the sake of simplicity of description, they are all expressed as a series of action combinations. However, those skilled in the art should know that the present application is not limited by the described order of actions, because according to the present application, certain steps may be performed in other orders or simultaneously. Secondly, those skilled in the art should also know that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily essential to the present application.

[0192] In the above embodiments, the descriptions of the various embodiments have their own focuses. For the parts not detailed in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0193] The preferred embodiments of the present application disclosed above are only used to help illustrate the present application. The alternative embodiments do not describe all the details in detail, nor do they limit the invention to the specific embodiments described. Obviously, many modifications and variations can be made according to the content of the present application. The present application selects and specifically describes these embodiments in order to better explain the principles and practical applications of the present application, so that those skilled in the art can well understand and utilize the present application. The present application is only limited by the claims and their full scope and equivalents.

Claims

1. A method for displaying a page header, characterized in that, Applied to a browser, including: Receiving a header loading request for a target page, where the header loading request is used to load a header control of the target page; Loading static resources corresponding to the header control according to the header loading request, and determining whether the header control can display interactive resources; When the header control can display the interactive resources, loading the interactive resources and displaying an interactive interface corresponding to the interactive resources in the header control, where the interactive interface is used for a user to interact with the interactive resources; Wherein, the interactive resources include game resource files; Loading the interactive resources and displaying an interactive interface corresponding to the interactive resources in the header control, including: Loading the game resource file; Displaying a game interactive interface corresponding to the game resource file in the header control.

2. The method according to claim 1, wherein Determining whether the header control can display interactive resources, including: Obtaining configuration information of the header control according to the header loading request, where the configuration information includes an interactive configuration file; Determining whether the header control can display interactive resources according to the interactive configuration file.

3. The method according to claim 2, characterized in that, The interactive configuration file includes an interactive detection file; Determining whether the header control can display interactive resources according to the interactive configuration file, including: When the interactive detection file can be run, determining that the header control can display interactive resources; When the interactive detection file cannot be run, determining that the header control cannot display interactive resources.

4. The method according to claim 2, wherein The configuration information includes a target interactive resource identifier; Loading the interactive resources, including: Determining a target interactive resource file in a resource database according to the target interactive resource identifier; Loading the target interactive resource file.

5. The method according to claim 1, characterized in that, The game resource file includes a standby resource file; Loading the game resource file, including: Loading the standby resource file; Correspondingly, displaying a standby resource corresponding to the standby resource file in the header control, including: Displaying a standby resource corresponding to the standby resource file in the header control.

6. The method according to claim 1, wherein The method further includes: Receiving an interaction instruction for the game interactive interface; Obtaining a game running resource file in response to the interaction instruction; Loading the game running resource file and starting a target game corresponding to the game running resource in the header control.

7. The method according to claim 6, wherein The game running resource file further includes an animation resource file, and the method further includes: Loading the animation resource file and playing an animation resource corresponding to the animation resource file in the header control.

8. The method according to claim 7, wherein After playing the animation resource corresponding to the animation resource file in the header control, the method further includes: Determining a loading state of the game running resource file; When the loading state is not completed, displaying a loading progress of the loading state in the header control.

9. The method according to claim 2, characterized in that, The configuration information further includes a video resource file, and determining whether the header control can display interactive resources according to the interactive configuration file further includes: In the case where the header control cannot display the interactive resource, load the video resource file, and load and display the video resource corresponding to the video resource file in the header control.

10. The method according to claim 6, characterized in that The method further includes: Receiving an operation instruction for the target game; Obtaining an initial game screen of the target game according to the operation instruction; Generating a target game screen corresponding to the operation instruction based on the operation instruction and the initial game screen.

11. The method according to claim 10, wherein Generating a target game screen corresponding to the operation instruction based on the operation instruction and the initial game screen includes: Obtaining initial game logic information of the initial game screen; Updating the initial game logic information according to the operation instruction to generate target game logic information; Rendering and generating a target game screen based on the target game logic information.

12. The method according to claim 10, wherein The operation instruction further includes a viewing angle adjustment instruction; Generating a target game screen corresponding to the operation instruction based on the operation instruction and the initial game screen further includes: Obtaining initial viewing angle information of the initial game screen; Adjusting the initial viewing angle information according to the viewing angle adjustment instruction to generate target viewing angle information; Rendering and generating a target game screen based on the target viewing angle information.

13. A display device for a page header, characterized in that, Applied to a browser, it includes: A receiving module configured to receive a header loading request for a target page, where the header loading request is used to load the header control of the target page; A judging module configured to load static resources corresponding to the header control according to the header loading request and judge whether the header control can display an interactive resource; A display module configured to, in the case where the header control can display the interactive resource, load the interactive resource and display an interactive interface corresponding to the interactive resource in the header control, where the interactive interface is used for a user to interact with the interactive resource; Wherein the interactive resource includes a game resource file; Loading the interactive resource and displaying an interactive interface corresponding to the interactive resource in the header control includes: Loading the game resource file; Displaying a game interaction interface corresponding to the game resource file in the header control.

14. A computing device, comprising a memory, a processor, and computer instructions stored on the memory and executable on the processor, characterized in that, When the processor executes the computer instruction, it implements the steps of the method according to any one of claims 1-12.

15. A computer-readable storage medium storing computer instructions, characterized in that, When the computer instruction is executed by the processor, it implements the steps of the method according to any one of claims 1-12.

16. A computer program product, the computer program product comprising computer instructions, characterized in that, When the computer instruction is executed by the processor, it implements the steps of the method according to any one of claims 1-12.

Citation Information

Patent Citations

  • Static page interaction method and device

    CN103605449A

  • Method for transplanting client game into webpage game, webpage game system and terminal

    CN105404539A

  • Game data processing method and device, computer and readable storage medium

    CN111767503A