CN117648510B - Information display method, information display device, computer equipment and storage medium - Google Patents

Information display method, information display device, computer equipment and storage medium Download PDF

Info

Publication number
CN117648510B
CN117648510B CN202410123414.7A CN202410123414A CN117648510B CN 117648510 B CN117648510 B CN 117648510B CN 202410123414 A CN202410123414 A CN 202410123414A CN 117648510 B CN117648510 B CN 117648510B
Authority
CN
China
Prior art keywords
service
page
thread
service information
main thread
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202410123414.7A
Other languages
Chinese (zh)
Other versions
CN117648510A (en
Inventor
张葛
田明
李园明
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN202410123414.7A priority Critical patent/CN117648510B/en
Publication of CN117648510A publication Critical patent/CN117648510A/en
Application granted granted Critical
Publication of CN117648510B publication Critical patent/CN117648510B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Information Transfer Between Computers (AREA)

Abstract

The present application relates to an information presentation method, apparatus, computer device, storage medium and computer program product. The method comprises the following steps: responding to a display event of the service initiation page in the browser, displaying the service initiation page through the main thread and sending a service information acquisition request to a working thread, wherein the working thread sends the service information acquisition request to a service end corresponding to the service initiation page; the working thread acquires service information corresponding to the service identifier returned by the service end, and sends the service information to the main thread and stores the service information in a browser cache; the main thread displays service information in a service starting page, and the browser caches the service information acquisition request sent by the working thread after the main thread displays the service page corresponding to the service identifier, sends the corresponding service information to the main thread through the working thread, and displays the corresponding service information on the service page through the main thread. By adopting the method, bandwidth resources can be saved and information display efficiency can be provided.

Description

Information display method, information display device, computer equipment and storage medium
Technical Field
The present application relates to the field of front-end technologies, and in particular, to an information display method, an information display apparatus, a computer device, a storage medium, and a computer program product.
Background
With the development of web front-end technology, multi-page applications, which means that a website contains multiple pages, each with its own URL (uniform resource locator, uniform resource location system), and users navigate between different pages. Currently, when a user requests a new page in a multi-page application, the browser sends a request to the server, which then returns the new page. That is, in a multi-page application, each page jump requires interaction with the server to load new page data. Then, each time page data is loaded, service interaction is requested, redundant requests exist, and waste of bandwidth resources is caused.
Disclosure of Invention
In view of the foregoing, it is desirable to provide an information presentation method, apparatus, computer device, computer-readable storage medium, and computer program product that can save bandwidth resources.
In a first aspect, the present application provides an information display method. The method comprises the following steps:
Responding to a display event of the service starting page in the browser, displaying the service starting page through the main thread, and establishing a working thread corresponding to the main thread;
The main thread sends a service information acquisition request to the working thread, wherein the service information acquisition request carries a service identifier associated with a service starting page, and the working thread receives the service information acquisition request and sends the service information acquisition request to a service end corresponding to the service starting page;
The method comprises the steps that a working thread obtains service information corresponding to a service identifier returned by a service end, the service information is sent to a main thread, the service information is stored in a browser cache, the browser cache is used for obtaining a service information obtaining request sent by the working thread after the main thread displays a service page corresponding to the service identifier, the corresponding service information is sent to the main thread through the working thread based on the service information obtaining request, and the corresponding service information is displayed on the service page through the main thread;
The main thread presents service information in a service initiation page.
In a second aspect, the application further provides an information display device. The device comprises:
the page display module is used for responding to a display event of the service starting page in the browser, displaying the service starting page through the main thread and establishing a working thread corresponding to the main thread;
The request sending module is used for sending a service information acquisition request to the working thread by the main thread, wherein the service information acquisition request carries a service identifier associated with a service starting page, and the working thread receives the service information acquisition request and sends the service information acquisition request to a service end corresponding to the service starting page;
the information cache module is used for acquiring service information corresponding to the service identifier returned by the service end by the working thread, sending the service information to the main thread, storing the service information in the browser cache, acquiring a service information acquisition request sent by the working thread after the service page corresponding to the service identifier is displayed by the main thread by the browser cache, sending the corresponding service information to the main thread through the working thread based on the service information acquisition request, and displaying the corresponding service information on the service page through the main thread;
And the information display module is used for displaying the service information in the service starting page by the main thread.
In a third aspect, the present application also provides a computer device. The computer device comprises a memory storing a computer program and a processor which when executing the computer program performs the steps of:
Responding to a display event of the service starting page in the browser, displaying the service starting page through the main thread, and establishing a working thread corresponding to the main thread;
The main thread sends a service information acquisition request to the working thread, wherein the service information acquisition request carries a service identifier associated with a service starting page, and the working thread receives the service information acquisition request and sends the service information acquisition request to a service end corresponding to the service starting page;
The method comprises the steps that a working thread obtains service information corresponding to a service identifier returned by a service end, the service information is sent to a main thread, the service information is stored in a browser cache, the browser cache is used for obtaining a service information obtaining request sent by the working thread after the main thread displays a service page corresponding to the service identifier, the corresponding service information is sent to the main thread through the working thread based on the service information obtaining request, and the corresponding service information is displayed on the service page through the main thread;
The main thread presents service information in a service initiation page.
In a fourth aspect, the present application also provides a computer-readable storage medium. The computer readable storage medium having stored thereon a computer program which when executed by a processor performs the steps of:
Responding to a display event of the service starting page in the browser, displaying the service starting page through the main thread, and establishing a working thread corresponding to the main thread;
The main thread sends a service information acquisition request to the working thread, wherein the service information acquisition request carries a service identifier associated with a service starting page, and the working thread receives the service information acquisition request and sends the service information acquisition request to a service end corresponding to the service starting page;
The method comprises the steps that a working thread obtains service information corresponding to a service identifier returned by a service end, the service information is sent to a main thread, the service information is stored in a browser cache, the browser cache is used for obtaining a service information obtaining request sent by the working thread after the main thread displays a service page corresponding to the service identifier, the corresponding service information is sent to the main thread through the working thread based on the service information obtaining request, and the corresponding service information is displayed on the service page through the main thread;
The main thread presents service information in a service initiation page.
In a fifth aspect, the present application also provides a computer program product. The computer program product comprises a computer program which, when executed by a processor, implements the steps of:
Responding to a display event of the service starting page in the browser, displaying the service starting page through the main thread, and establishing a working thread corresponding to the main thread;
The main thread sends a service information acquisition request to the working thread, wherein the service information acquisition request carries a service identifier associated with a service starting page, and the working thread receives the service information acquisition request and sends the service information acquisition request to a service end corresponding to the service starting page;
The method comprises the steps that a working thread obtains service information corresponding to a service identifier returned by a service end, the service information is sent to a main thread, the service information is stored in a browser cache, the browser cache is used for obtaining a service information obtaining request sent by the working thread after the main thread displays a service page corresponding to the service identifier, the corresponding service information is sent to the main thread through the working thread based on the service information obtaining request, and the corresponding service information is displayed on the service page through the main thread;
The main thread presents service information in a service initiation page.
The information display method, the information display device, the computer equipment, the storage medium and the computer program product are used for responding to the display event of the service start page in the browser, displaying the service start page through the main thread and establishing a working thread corresponding to the main thread; the main thread sends a service information acquisition request to the working thread, wherein the service information acquisition request carries a service identifier associated with a service starting page, and the working thread receives the service information acquisition request and sends the service information acquisition request to a service end corresponding to the service starting page; the method comprises the steps that a working thread obtains service information corresponding to a service identifier returned by a service end, the service information is sent to a main thread, the service information is stored in a browser cache, the browser cache is used for obtaining a service information obtaining request sent by the working thread after the main thread displays a service page corresponding to the service identifier, the corresponding service information is sent to the main thread through the working thread based on the service information obtaining request, and the corresponding service information is displayed on the service page through the main thread; the main thread presents service information in a service initiation page. The service information corresponding to the service identification is obtained through the working thread and stored in the browser cache, then after the service page corresponding to the service identification is displayed, the corresponding service information can be directly searched from the cache through the working thread, and the service information is displayed on the service page through the main thread, namely, when the service page is displayed, the service information is not required to be obtained through interaction with the service end, redundant requests are avoided, and therefore bandwidth resources can be saved. And the waiting time for interaction with the server is reduced, so that the efficiency of service information display is improved.
Drawings
FIG. 1 is an application environment diagram of a method of information presentation in one embodiment;
FIG. 2 is a flow chart of a method for information presentation in one embodiment;
FIG. 3 is a flow chart illustrating a service information presentation in one embodiment;
FIG. 4 is a timing diagram of message passing in one embodiment;
FIG. 5 is a flow diagram of request transmission in one embodiment;
FIG. 6 is a flow diagram of rights verification in one embodiment;
FIG. 7 is a flow chart of a method for information presentation in an embodiment;
FIG. 8 is a timing diagram of a method for information presentation in one embodiment;
FIG. 9 is a diagram of a transaction initiation page in one embodiment;
FIG. 10 is a diagram of a staged transaction page in one embodiment;
FIG. 11 is a diagram of a transaction completion page in one embodiment;
FIG. 12 is a block diagram of an information presentation device in one embodiment;
FIG. 13 is an internal block diagram of a computer device in one embodiment;
Fig. 14 is an internal structural diagram of a computer device in one embodiment.
Detailed Description
The present application will be described in further detail with reference to the drawings and examples, in order to make the objects, technical solutions and advantages of the present application more apparent. It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the scope of the application.
The information display method provided by the embodiment of the application can be applied to an application environment shown in fig. 1. The terminal 102 communicates with a server 104, which may be a computer device, such as a server or a terminal, through a network. The data storage system may store data that the server 104 needs to process. The data storage system may be integrated on the server 104 or may be located on a cloud or other server. The terminal 102 responds to a display event of the service initiation page in the browser, displays the service initiation page through the main thread, and establishes a working thread corresponding to the main thread; the terminal 102 main thread sends a service information acquisition request to a working thread, wherein the service information acquisition request carries a service identifier associated with a service starting page, and the working thread receives the service information acquisition request and sends the service information acquisition request to a service end 104 corresponding to the service starting page; the terminal 102 working thread acquires service information corresponding to the service identifier returned by the service end, sends the service information to the main thread, stores the service information in a browser cache, and after the browser cache is used for displaying a service page corresponding to the service identifier by the main thread, acquires a service information acquisition request sent by the working thread, sends the corresponding service information to the main thread through the working thread based on the service information acquisition request, and displays the corresponding service information on the service page through the main thread; the terminal 102 main thread presents service information in a service initiation page. The terminal 102 may be, but not limited to, various desktop computers, notebook computers, smart phones, tablet computers, internet of things devices, and portable wearable devices, where the internet of things devices may be smart speakers, smart televisions, smart air conditioners, smart vehicle devices, and the like. The portable wearable device may be a smart watch, smart bracelet, headset, or the like. The server 104 may be implemented as a stand-alone server or as a server cluster of multiple servers.
In one embodiment, as shown in fig. 2, an information display method is provided, and the method is applied to the terminal in fig. 1 for illustration, it is to be understood that the method can also be applied to a server, and can also be applied to a system including the terminal and the server, and implemented through interaction between the terminal and the server. In this embodiment, the method includes the steps of:
S202, responding to a display event of the service start page in the browser, displaying the service start page through the main thread, and establishing a working thread corresponding to the main thread.
Wherein, the browser refers to an application program used for retrieving, displaying and transmitting webpage information resources. The Web page information resource is marked by a uniform resource identifier (Uniform Resource Identifier, URI), which is a Web page, a picture, a piece of video, or any content presented on the Web. The user can browse the information related to each other through the browser by means of the hyperlink. The browser may be built using different kernels. The service start page refers to a start page of an internet service, and may be, for example, a first page of the service. The internet service may be a variety of convenient and efficient services provided to the user based on internet technology. The presentation event refers to a trigger event of presenting a service initiation page, which may be triggered by a trigger operation including, but not limited to, a click operation, a slide operation, a press operation, a voice operation, a gesture operation, and the like. The main thread refers to a page thread, which is a thread for processing page related logic, for example, can handle page user interaction with a page, can handle page control update, and the like. The work thread may perform tasks in the background that are not directly interacted with the page, and is a thread for processing non-page related logic, for example, may perform operations such as downloading data, calculating data, requesting a network, and the like. The worker thread may perform complex computations or operations without blocking the host thread. The worker thread runs in a separate thread and communication with the main thread is accomplished through messaging.
Specifically, the terminal detects an operation event for starting the browser, and responds to the operation event, the browser is started and displayed. The operation event refers to an event triggered by an operation of a user, which may include, but is not limited to, a click operation, a slide operation, a press operation, a voice operation, a gesture operation, and the like. The service initiation page may then be entered in the browser, i.e., the terminal detects an operation event in the browser to display the service initiation page, which refers to an event to display the service initiation page through a user operation, which may include, but is not limited to, a click operation, a slide operation, a press operation, a voice operation, a gesture operation, an input operation, and the like. Then, the terminal responds to an operation event for showing the service start page, calls an initialized main thread, and shows the service start page through the main thread. At this time, the terminal creates a working thread of the service corresponding to the service start page, and connects the main thread with the working thread in a communication manner. In one embodiment, the browser may be a browser in an application program through which a service initiation page may be exposed using a main thread in the application program. In one embodiment, the browser may be a browser of a different kernel, such as a browser using a Trident rendering engine, a browser of a web layout engine of open source code, a browser of a browser layout engine, a browser of open source items, and so forth.
S204, the main thread sends a service information acquisition request to the working thread, the service information acquisition request carries a service identifier associated with the service start page, and the working thread receives the service information acquisition request and sends the service information acquisition request to a service end corresponding to the service start page.
Wherein the service information acquisition request refers to a browser for acquiring service information. The service information refers to information related to a corresponding service, such as operation activity information, which may be a service, recommendation information, which may be a service, introduction information, which may be a service, and the like. The service identifier is used to identify the corresponding service, and may be a name, a number, a character string, etc. of the service. The service initiation page may include one service identifier, or may include at least two service identifiers. When there are multiple service identifiers in the service start page, the multiple service identifiers may be different sub-service identifiers of the same service, or may be service identifiers of completely different services. Different sub-service identities are used to represent different service methods that can provide the same service. The service end refers to an equipment end capable of providing a service corresponding to the service initiation page, the service end is provided with the service corresponding to the service initiation page, and the corresponding service can be provided for a user through the terminal.
Specifically, the main thread in the terminal may generate a service information acquisition request by using the service identifier associated with the starting page, and then the main thread may send the service information acquisition request to the working thread through a message passing manner. The working thread receives the service information acquisition request, responds to the service information acquisition request, and can send the service information acquisition request to the service end corresponding to the service starting page. The server acquires the service information acquisition request, and searches corresponding service information by using the service identifier in response to the service information acquisition request, for example, the service information can be searched in a preset service information list, the service information can be searched in a database, and the like. When the corresponding service information is found, the service end can return the service information to the terminal. When the corresponding service information is not found, the server side can generate prompt information of the service information, and the prompt information is returned to the terminal.
In one embodiment, the start page may associate a plurality of service identifiers, and then the main thread may generate a service information acquisition request corresponding to each service identifier, send the plurality of service information acquisition requests to a work thread, and send the plurality of service information acquisition requests to a service end corresponding to the service start page in the background by using the work thread.
In one embodiment, the worker thread receives a service information acquisition request, responds to the service information acquisition request, searches for whether service information corresponding to the service identifier exists in the browser cache, and sends the service information acquisition request to the service end corresponding to the service initiation page when the service information corresponding to the service identifier does not exist in the browser cache. When the service information corresponding to the service identifier exists in the browser cache, the service information can be directly sent to the main thread, and then the main thread displays the service information in the service starting page.
S206, the working thread acquires service information corresponding to the service identifier returned by the service end, sends the service information to the main thread, stores the service information in a browser cache, and after the main thread displays a service page corresponding to the service identifier, the browser cache acquires a service information acquisition request sent by the working thread, sends the corresponding service information to the main thread through the working thread based on the service information acquisition request, and displays the corresponding service information on the service page through the main thread.
The browser cache refers to a cache of stored data corresponding to the browser. The browser cache may store the processing results of the worker threads, and the data in the browser cache may be read and used in other browser pages. The service page refers to a page of related service corresponding to the service identifier, and can provide related service corresponding to the corresponding service identifier.
Specifically, a working thread running in the background in the terminal acquires service information corresponding to the service identifier returned by the service end, sends the service information to the main thread in a message transmission mode, and simultaneously stores the service identifier and the service information in a browser cache in an associated manner. And then the terminal detects that the service information acquisition request is sent to the working thread after the terminal jumps from the service starting page to the service page corresponding to the service identifier in the browser, namely after the main thread displays the service page corresponding to the service identifier, and the service information acquisition request carries the service identifier. The working thread receives the service information acquisition request, searches service information corresponding to the service identifier in the browser cache, returns the service information to the main thread, receives the service information returned by the working thread, and displays the corresponding service information at the display position in the service page.
S208, the main thread displays the service information in the service start page.
Specifically, the main thread in the terminal may obtain a display position of the service information, where the display position of the service information may be set in page data of the service start page. And then the main thread displays the service information at the corresponding display position in the service starting page. The display position may be set in the corresponding page data, for example, the display position may be a preset page coordinate, or may be a preset page area, etc.
The information display method, the information display device, the computer equipment, the storage medium and the computer program product are used for responding to the display event of the service start page in the browser, displaying the service start page through the main thread and establishing a working thread corresponding to the main thread; the main thread sends a service information acquisition request to the working thread, wherein the service information acquisition request carries a service identifier associated with a service starting page, and the working thread receives the service information acquisition request and sends the service information acquisition request to a service end corresponding to the service starting page; the method comprises the steps that a working thread obtains service information corresponding to a service identifier returned by a service end, the service information is sent to a main thread, the service information is stored in a browser cache, the browser cache is used for obtaining a service information obtaining request sent by the working thread after the main thread displays a service page corresponding to the service identifier, the corresponding service information is sent to the main thread through the working thread based on the service information obtaining request, and the corresponding service information is displayed on the service page through the main thread; the main thread presents service information in a service initiation page. The service information corresponding to the service identification is obtained through the working thread and stored in the browser cache, then after the service page corresponding to the service identification is displayed, the corresponding service information can be directly searched from the cache through the working thread, and the service information is displayed on the service page through the main thread, namely, when the service page is displayed, the service information is not required to be obtained through interaction with the service end, redundant requests are avoided, and therefore bandwidth resources can be saved. And the waiting time for interaction with the server is reduced, so that the efficiency of service information display is improved.
In one embodiment, as shown in fig. 3, after S208, i.e. after the main thread presents the service information in the service initiation page, the steps are further included:
s302, responding to a jump event of a service page corresponding to a service identifier in a service starting page, displaying the service page, and sending a service information acquisition request to a working thread;
S304, the working thread searches service information corresponding to the service identifier in the browser cache based on the service acquisition request, and returns the service information corresponding to the service identifier to the main thread;
s306, the main thread displays service information corresponding to the service identification in the service page.
The jump event is used to characterize an operation event of jumping from the service start page to the service page for presentation, and the operation event may be an event triggered by an operation on the service start page, including, but not limited to, a click operation, a sliding operation, a pressing operation, a voice operation, a gesture operation, and the like, for example, clicking a service page link of the service start page to trigger the jump event, for example, pressing a service page link button in the service start page to trigger the jump event, and the like.
Specifically, when the user needs to jump to the service page, the user can click on the service page link displayed in the service start page to jump, and the service page link can be displayed in a button mode or in a hyperlink mode. And then the terminal detects a jump event of a service page corresponding to the service identifier in the service starting page through the main thread, responds to the jump event and sends a page display request to the service end, the server receives the page display request, and searches corresponding page data according to the page display request, wherein the page data can be front-end code information of the service page. The page data is then returned to the terminal. The terminal obtains page data through the main thread, and displays the service page according to the page data. And then the terminal generates a service information acquisition request according to the service identifier through the main thread and sends the service information acquisition request to the working thread. The working thread receives the service acquisition request, responds to the service acquisition request, searches the service identifier in the browser cache, acquires service information corresponding to the service identifier when the service identifier is found to be consistent, and returns the service information corresponding to the service identifier to the main thread. Finally, the main thread acquires service information sent by the working thread, and then displays service information corresponding to the service identifier in the service page according to a preset service information display position in the page data.
In the above embodiment, the service page is presented by responding to a jump event in the service initiation page to identify the corresponding service page to the service. And then, the corresponding service information can be directly searched from the cache through the working thread and displayed in the service page, and the service information does not need to be acquired interactively with the service end, so that redundant requests are avoided, and bandwidth resources can be saved. And the waiting time for interaction with the server is reduced, so that the efficiency of service information display is improved.
In one embodiment, after the main thread presents the service information corresponding to the service identifier in the service page, the method further includes the steps of:
Responding to a jump event of a service end page corresponding to the service identifier in the service page, displaying the service end page, sending a service information acquisition request to a working thread, searching service information corresponding to the service identifier in a browser cache based on the service acquisition request by the working thread, and returning the service information corresponding to the service identifier to a main thread; and the main thread displays the service information corresponding to the service identifier in the service ending page.
The service end page refers to a browser page for displaying corresponding service end information. The jump event is used to characterize an operational event that is presented by jumping from the service page to the service end page, which may be an event triggered by an operation on the service page. For example, the jump event triggered by clicking the completion button when the service of the service page is completed may be processed, for example, the jump event triggered when the main thread in the terminal detects that the service of the service page is completed may be triggered.
Specifically, when the service page completes the corresponding service, the user may click a service completion button displayed in the service page to perform the jump, or may perform the page jump when a trigger event of service completion is detected. At this time, the terminal detects a jump event from the service page to the service end page through the main thread, responds to the jump event and sends a page display request to the service end, the server receives the page display request, and searches the page data of the corresponding service end page according to the page display request, wherein the page data can be the front end code information of the service end page. And then returning the page data of the service end page to the terminal. The terminal obtains the page data of the service end page through the main thread, and displays the service end page according to the page data of the service end page. And then the terminal generates a service information acquisition request according to the service identifier through the main thread and sends the service information acquisition request to the working thread. The working thread receives the service acquisition request, responds to the service acquisition request, searches the service identifier in the browser cache, acquires service information corresponding to the service identifier when the service identifier is found to be consistent, and returns the service information corresponding to the service identifier to the main thread. Finally, the main thread acquires service information sent by the working thread, and then displays service information corresponding to the service identifier in the service end page according to a preset service information display position in page data of the service end page.
In one embodiment, the service page may include a plurality of service information corresponding to the service identifier may be searched from the browser cache through the work thread after each jump from the current service page to the next service page, and the service information may be displayed on the service page. The service information of the same service can be displayed in all the service pages corresponding to the service, so that the problem that the display of the service information in the multi-page position is not consistent is solved, and the consistency of the display of the service information is improved.
In the above embodiment, the service end page is displayed in response to a jump event of the service end page corresponding to the service identifier in the service page. And then, the corresponding service information can be directly searched from the cache through the working thread and displayed in the service end page, and the service information does not need to be acquired interactively with the service end, so that redundant requests are avoided, and bandwidth resources can be saved. And the waiting time for interaction with the server is reduced, so that the efficiency of service information display is improved.
In one embodiment, the service identification includes at least two;
s206, the working thread acquires service information corresponding to the service identifier returned by the service end, sends the service information to the main thread, and stores the service information in the browser cache, comprising the following steps:
the working thread acquires service information corresponding to at least two service identifiers returned by the service end, sends the service information corresponding to the at least two service identifiers to the main thread, and stores the service information corresponding to the at least two service identifiers to the browser cache.
S208, namely, the main thread displays service information in a service start page, comprising the following steps:
the main thread acquires service information display positions corresponding to the at least two service identifiers respectively, and displays the service information corresponding to the at least two service identifiers respectively in the service starting page based on the service information display positions.
In particular, the service initiation page may be associated with at least two service identifiers, which may be shown in the service initiation page or may be stored in page data of the service initiation page. The main thread can send a service information acquisition request to the working thread, wherein the service information acquisition request carries all service identifiers, and then the working thread can forward the service information acquisition request to a service end corresponding to a service starting page after receiving the service information acquisition request. The server receives the service information acquisition request, and searches the service information corresponding to each service identifier in the database, namely, different service identifiers have different service information. And then returning the service information corresponding to each service identifier to the terminal. The working thread of the terminal acquires service information corresponding to at least two service identifiers returned by the service terminal, sends the service information corresponding to the at least two service identifiers to the main thread, and simultaneously stores each service identifier and the corresponding service information in a browser cache in an associated manner. And then the main thread acquires the service information display position corresponding to each service identifier from the page data of the service starting page, and displays the service information corresponding to each service identifier in the service starting page according to the service information display position. The main thread of the terminal can also only display the service information corresponding to one service identifier in all the service identifiers in the service starting page, and the service identifier for displaying the service information can be preset by a user or can be the service identifier most relevant to the user.
When the main thread of the terminal detects a jump event of a target service page corresponding to a target service identifier in the service identifiers, the target service page is displayed in response to the jump event, wherein the target service identifier can be any one service identifier in all service identifiers associated with the service initiation page or can be a service identifier selected by a user in the service initiation page. And then sending a service information acquisition request corresponding to the target service identifier to the working thread, searching target service information corresponding to the target service identifier in the browser cache by the working thread, and returning the target service information corresponding to the target service identifier to the main thread. And finally, the main thread displays the service information corresponding to the target service identifier at the service information display position of the target service page.
In the above embodiment, when at least two service identifiers are associated in the service initiation page, the working thread may acquire service information corresponding to the at least two service identifiers returned by the service end, send the service information corresponding to the at least two service identifiers to the main thread, store the service information corresponding to the at least two service identifiers in the browser cache, and then display the service information corresponding to the at least two service identifiers in the service initiation page, that is, may display the service information corresponding to each service identifier in the service initiation page, thereby improving accuracy of displaying the service information.
In one embodiment, S202, a working thread corresponding to a main thread is established, including the steps of:
Creating a working thread corresponding to the service identifier by the main thread, generating a connection message, and sending the connection message to the working thread; the working thread receives the connection message, generates a reply message corresponding to the connection message, sends the reply message to the main thread, and updates the preset initial connection quantity to obtain the current connection quantity; the main thread receives a reply message returned by the working thread, and a communication connection result between the main thread and the working thread is determined based on the reply message.
Wherein the connection message is a message for making a communication connection. The reply message is a message for replying to the communication connection. The preset initial connection amount is a preset initial connection amount, and the connection amount is used for representing the number of main threads connected with the working thread. The current connection amount is the number of main threads currently connected to the worker thread.
Specifically, the main thread of the terminal creates a working thread corresponding to the service identifier, generates a connection message for communication connection, and then sends the connection message to the working thread. The working thread receives the connection message, generates a reply message corresponding to the connection message, and returns the reply message to the main thread. And updating the preset initial connection quantity to obtain the current connection quantity, wherein the preset initial connection quantity can be zero, each of the preset initial connection quantity is connected with one main thread, the initial connection quantity can be increased by a target value, and the target value can be one. The main thread receives a reply message returned by the working thread, and a communication connection result between the main thread and the working thread is determined based on the reply message.
In one particular embodiment, a terminal may create a worker thread, and then may share data between multiple pages using the worker thread. For example, the worker thread may be SharedWorker (shared worker thread). An example code for creating this SharedWorker is then as follows:
Creating a SharedWorker
var myWorker = new SharedWorker('worker.js');
myWorker.port.start();
Data transmission/reception to SharedWorker
myWorker.port.postMessage('Hello, worker');
Receive data from SharedWorker
myWorker.port.onmessage = function(e) {
console.log('Message received from worker: ' + e.data);
};
Var connections =0;// number of connections
onconnect = function(e) {
var port = e.ports[0];
connections++;
port.onmessage = function(e) {
console.log('Message received from main script: ' + e.data);
port.postMessage('Hello, main script');
};
Port start ()// start receiving message
};
The working thread sends the message to the main thread through a postMessage method, and receives the message of the main thread through a onmessage event processor. The communication connection is detected by a connect event, which is triggered whenever the main thread of the new page is connected to the worker thread. Setting the initial connection number to 0, and performing self-increase on the connection number every time a thread is connected to a working thread.
Then, as shown in fig. 4, a timing diagram of message passing between the main thread and the work thread is provided, specifically: the main thread sends a connection message to the working message through a message sending method postMessage (data), the working thread detects that there is a main thread connection, triggers a communication connection event, sends onmessage (event) the communication connection event to the main thread, the main thread sequences data in response to the communication connection event, and then sends the sequenced data to the working thread through data transmission. And the working thread receives the serialized data to perform deserialization, so as to obtain the original data. The worker thread then returns reply data postMessage (replyData) via the messaging method. The main thread receives the reply data, sequences the reply data, sends the serialized reply data to the working thread through data transmission, and the working thread receives the serialized reply data to perform deserialization to obtain the reply data.
In the above embodiment, a working thread corresponding to a service identifier is created through a main thread, a connection message is generated, the connection message is sent to the working thread, the working thread receives the connection message, a reply message corresponding to the connection message is generated, the reply message is sent to the main thread, and a preset initial connection quantity is updated to obtain a current connection quantity; the main thread receives the reply message returned by the working thread, and determines the communication connection result between the main thread and the working thread based on the reply message, namely, the communication connection between the main thread and the working thread is established by establishing the working thread, so that the subsequent direct communication can be facilitated, and the message transfer efficiency of the main thread and the working thread is improved.
In one embodiment, as shown in fig. 5, in response to a jump event to a service page corresponding to a service identifier in a service start page, the service page is displayed, and a service information acquisition request is sent to a work thread, including:
s502, initializing a main thread to obtain a current main thread in response to a jump event of a service page corresponding to a service identifier in a service starting page;
S504, the current main thread displays a service page and generates a current connection message, the current connection message is sent to a working thread, the working thread receives the connection message and generates a current reply message corresponding to the current connection message, the current reply message is sent to the current main thread, the connection quantity is acquired, and the connection quantity is updated to obtain an updated connection quantity;
S506, the current main thread receives the current reply message returned by the working thread, determines a communication connection result between the current main thread and the working thread based on the current reply message, and sends a service information acquisition request to the working thread.
The current main thread refers to the main thread corresponding to the service page, namely the main thread executing the task related to the current service page. The current connection message refers to a message that the current main thread is connected to the worker thread. The current reply message refers to a reply message of the worker thread to the current connection message.
Specifically, the main thread of the terminal detects a jump event of a service page corresponding to a user identifier to a service in a service start page, for example, the user may click a hyperlink of the service page in the service start page, and at this time, the terminal detects the jump event. The user can click the service identification button in the service starting page to trigger a jump event, at the moment, the terminal detects that the jump event is triggered, and the main thread is initialized in response to the jump event of the service page corresponding to the service identification in the service starting page, so that the current main thread corresponding to the service page is obtained. And then the terminal displays the service page through the current main thread, wherein the terminal can send a page display request to a service end corresponding to the service page through the current main thread, and the service end acquires page data corresponding to the service page according to the page display request and returns the page data to the terminal. The terminal receives page data corresponding to the service page, and performs drawing rendering of the page according to the page data, so that the service page is displayed. And then the terminal generates a current connection message with the working thread through the current main thread and sends the current connection message to the working thread. The working thread receives the connection message of the main thread, generates a current reply message corresponding to the current connection message, and sends the current reply message to the current main thread. Meanwhile, the working thread acquires the connection quantity, updates the connection quantity according to a preset update rule of the connection quantity to obtain an updated connection quantity, wherein the preset update rule of the connection quantity can be that the connection quantity of each main thread is increased by 1. And then the current main thread receives the current reply message returned by the working thread, and determines the communication connection result between the current main thread and the working thread based on the current reply message, at this time, the current main thread can communicate with the working thread, namely, can send a service information acquisition request to the working thread.
In the embodiment, the main thread is initialized by responding to the jump event of the service page corresponding to the service identifier in the service starting page, the current main thread is obtained, and after the current main thread is connected with the working thread, the service information acquisition request is sent to the working thread, so that the normal communication connection between the current main thread and the working thread is ensured, the situation that communication with the working thread cannot be carried out after the page jumps is avoided, and the normal display of service information is ensured.
In one embodiment, the service information includes initial service information corresponding to a service initial page and target service information corresponding to a service page:
S206, the working thread acquires service information corresponding to the service identifier returned by the service end, sends the service information to the main thread, and stores the service information in the browser cache, wherein the method comprises the following steps:
The working thread acquires initial service information corresponding to a service initial page returned by the service end and target service information corresponding to the service page; and sending the initial service information corresponding to the service initial page to a main thread, and storing the initial service information corresponding to the service initial page and the target service information corresponding to the service page into a browser cache.
The initial service information refers to service information which needs to be displayed in a service initial page. The target service information refers to service information that needs to be presented in a service page. The initial service information and the target service information are service information of the same service identifier corresponding to the service. The start service information and the target service information may be service information of different contents, for example, the start service information may be service recommendation information, the target service information may be service description information, and the like. The start service information and the target service information may also be service information of the same content.
Specifically, when the service end obtains the service information obtaining request, the service end finds corresponding service information according to the service identifier in the service information obtaining request, where the service information includes service information of each page corresponding to the service identifier, for example, the service information may include starting service information corresponding to a service starting page and target service information corresponding to a service page, and may also include ending service information corresponding to a service ending page. And then the service end returns the service information of all the pages corresponding to the searched service identifier to the terminal. The service thread of the terminal obtains service information of all pages returned by the service end, for example, the service information may include initial service information corresponding to a service initial page and target service information corresponding to a service page, and may also include end service information corresponding to a service end page, and so on. At this time, the working thread sends the initial service information corresponding to the service initial page to the main thread, and simultaneously saves the service information of all pages in the browser cache, namely saves the initial service information corresponding to the service initial page, the target service information corresponding to the service page and the end service information corresponding to the service end page in the browser cache, namely, the working thread stores the service identifier, the page identifier and the service information corresponding to the page identifier in the browser cache in an associated manner, wherein the page identifier can be the name of the page, the link address of the page and the like, different pages have different page identifiers, and each page has the corresponding page identifier. And then when any page corresponding to the service identifier is displayed, the corresponding service information can be obtained from the browser cache and displayed in the displayed service page.
S208, the main thread displays service information in a service start page, including:
The main thread acquires the initial service information display position, and displays initial service information corresponding to the service initial page in the service initial page based on the initial service information display position.
Specifically, the main thread of the terminal may obtain a preset initial service information display position in page data of an initial service page, where the display position may be a position coordinate, may be a page area range, and then display corresponding initial service information at the initial service information display position of the service initial page.
In the above embodiment, the working thread acquires the initial service information corresponding to the service initial page and the target service information corresponding to the service page returned by the service end, and then stores the initial service information corresponding to the service initial page and the target service information corresponding to the service page in the browser cache, so that when different pages are displayed, the corresponding service information can be acquired from the browser cache for displaying, and different pages can display different service information, thereby improving the flexibility of displaying the service information.
In one embodiment, after displaying the initial service information corresponding to the service initiation page in the service initiation page based on the initial service information display position, the method further includes:
Responding to a jump event of a service page corresponding to the service identifier in a service starting page, displaying the service page, and sending a target service information acquisition request to a working thread, wherein the target service information acquisition request carries the service identifier and the page identifier corresponding to the service page; the working thread searches corresponding target service information in the browser cache by using the service identifier and the page identifier based on the target service acquisition request, and returns the target service information to the main thread; the main thread acquires a target service information display position, and displays target service information in a service page based on the target service information display position.
Specifically, the user can click the displayed service page button in the service starting page to enter the service page to use the corresponding service, namely, the main thread of the terminal detects the clicking operation for the service page button in the service starting page, and the page jump is performed in response to the clicking operation. When the main thread of the terminal jumps pages, a display request corresponding to the jumped pages can be sent to the server, the server receives the display request to acquire page data to be displayed, the page data is returned to the terminal, and the main thread of the terminal performs page rendering drawing according to the page data so as to display the corresponding service pages. After the corresponding service page is displayed, whether service information exists or not needs to be further judged to be displayed, at the moment, the terminal generates a service information acquisition request according to the service identification through the main thread and sends the service information acquisition request to the working thread, and the service information acquisition request carries the service identification and the page identification of the service page. The working thread receives a service acquisition request, responds to the service acquisition request, searches for a service identifier and a page identifier in a browser cache, acquires service information associated with the service identifier and the page identifier from the browser cache when the service identifier and the page identifier are consistent, wherein the service information is target service information to be displayed by a service page, and then returns the target service information to the main thread. And finally, the main thread acquires target service information sent by the working thread, and displays the target service information in the service page according to a preset target service information display position in the page data.
In the embodiment, by responding to the jump event of the service page corresponding to the service identifier in the service starting page, the service page is displayed, and then the target service information corresponding to the service page can be directly searched from the cache through the working thread and displayed in the service page, so that the target service information corresponding to the service page does not need to be acquired interactively with the service end, redundant requests are avoided, and bandwidth resources can be saved. And the waiting time for interaction with the server is reduced, so that the efficiency of service information display is improved.
In one embodiment, S202, in response to a presentation event to a service initiation page in a browser, presents the service initiation page through a main thread, including the steps of:
Responding to an operation event of the target application program, and operating the target application program; and responding to the showing event of the service starting page in the target application program, and showing the service starting page in a browser of the target application program through a main thread.
S204, sending the service information acquisition request to the service end corresponding to the service start page, comprising the following steps:
and sending the service information acquisition request to a server corresponding to the target application program.
The target application program is an application program capable of providing a service corresponding to the service identifier, and a browser is embedded in the target application program, so that a browser page can be displayed. The target application may be various types of applications, such as an instant messaging application, an audio video playback application, an e-commerce application, and the like. The target application may also be various business service applications, such as a payment service application, and the like.
Specifically, the browser may be a browser embedded in the target application program, and the browser embedded in the target application program may be a browser of a third party or a browser developed by a server corresponding to the target application program. The user may then first run the target application when he needs to use the services in the target application. At this time, the terminal detects an operation event for the target application, which is an event for operating the target application, and is triggered by a trigger operation. The target application is then run in response to the run event for the target application. And then the terminal detects the triggering operation of displaying the service starting page, responds to the display event of the service starting page in the target application program, and displays the service starting page in the browser of the target application program through the main thread. And then, a working thread corresponding to the main thread is established, the main thread sends a service information acquisition request to the working thread, the working thread receives the service information acquisition request, and the service information acquisition request is sent to a server corresponding to the target application program.
In the above embodiment, the target application is executed by responding to the execution event for the target application. And then, responding to a display event of the service initiation page in the target application program, displaying the service initiation page in a browser of the target application program through a main thread, and then, sending a service information acquisition request to a service end corresponding to the target application program through a working thread to acquire and cache the service information, so that the service information is acquired and run in a background thread, the main thread of the target application program is not blocked, and complex calculation or operation can be executed under the condition that the responsiveness of the target application program is not influenced, thereby improving the performance of the target application program and providing smoother experience.
In one embodiment, as shown in fig. 6, S204, a main thread sends a service information acquisition request to a working thread, where the service information acquisition request carries a service identifier associated with a service initiation page, and the working thread receives the service information acquisition request and sends the service information acquisition request to a service end corresponding to the service initiation page, where the step includes:
S602, a main thread sends a permission verification request to a working thread, wherein the permission verification request carries a service identifier associated with a service start page and a target object identifier corresponding to the service identifier;
S604, the working thread receives the permission verification request, sends the permission verification request to a service end corresponding to the service start page, and the service end searches a target object identifier corresponding to the service identifier in a preset service information display permission list based on the permission verification request, and generates permission verification passing information when the target object identifier is searched;
S606, the worker thread acquires right verification passing information returned by the service end, generates a service information acquisition request corresponding to the service identifier based on the right verification passing information, and sends the service information acquisition request corresponding to the service identifier to the service end corresponding to the service start page.
The permission verification request refers to a request for verifying whether the service information permission is displayed. The target object identifier refers to an object identifier of the current service start page, and the object identifier refers to an object for uniquely identifying the service start page, and may be a name, a number, a character string, and the like of the object. The object may be a real object, such as a person, an animal, etc., or a virtual object, such as a virtual artificial intelligence, a virtual idol, etc. Different object identifiers correspond to different service information display rights. The preset service information display authority list refers to a data table of preset service information display authorities. The data table stores the respective object identifications of the rights expression service information. The rights verification passing information is used for representing that the target object is identified with rights display service information.
Specifically, before sending a service information acquisition i request to a service end corresponding to a service start page, a main thread of a terminal needs to determine whether a target object identifier using the service start page has authority to display service information on the service start page. At this time, the main thread of the terminal sends a permission verification request to the working thread, where the permission verification request carries a service identifier associated with the service initiation page and a target object identifier corresponding to the service identifier. The permission verification request is used for requesting to judge whether the target object corresponding to the target object identifier has permission for displaying service information corresponding to the service identifier when the service corresponding to the service identifier is used. The working thread receives the authority verification request, sends the authority verification request to a service end corresponding to the service initiation page, the service end uses the service identifier to find a corresponding preset service information display authority list based on the authority verification request, then searches whether a target object identifier exists in each object identifier in the preset service information display authority list, when the target object identifier is not searched, the service end generates authority verification failed information, returns the authority verification failed information to the terminal, the working thread in the terminal receives the authority verification failed information, does not perform subsequent processing according to the authority verification failed information, and does not display service information in the service initiation page. And the server side judges that when the target object identifier is found, authority verification passing information is generated, and the authority verification passing information is returned to the terminal. And the working thread in the terminal acquires the authority verification passing information returned by the service end, generates a service information acquisition request corresponding to the service identifier based on the authority verification passing information, and sends the service information acquisition request corresponding to the service identifier to the service end corresponding to the service starting page.
In the above embodiment, the permission verification request is sent to the working thread through the main thread, then the working thread performs the permission verification with the service end, and when the permission verification passes, the service information acquisition request corresponding to the service identifier is generated, and the service information acquisition request corresponding to the service identifier is sent to the service end corresponding to the service initiation page, namely, the service information is displayed only for the object identifier with the permission when the service initiation page is used, so that the accuracy of service information display is improved.
In one embodiment, S204, the worker thread receives the service information acquisition request and sends the service information acquisition request to the server corresponding to the service initiation page, and the method further includes the steps of:
The main thread responds to a background operation event of the service initiation page, and converts a foreground operation state corresponding to the service initiation page into a background operation state; when the service starting page is in a background running state, the working thread receives a service information acquisition request and sends the service information acquisition request to a service end corresponding to the service starting page.
The background operation event refers to an event that a service starting page is converted into a background operation, and the background operation event can be triggered by a triggering operation. The foreground running state refers to a state that the service initiation page is in a state capable of directly interacting with a user, that is, the service initiation page is displayed on a terminal screen. The background running state refers to a state that the service start page is in a state that the service start page cannot directly interact with a user, but keeps running, namely the service start page is not displayed on a terminal screen.
Specifically, the main thread in the terminal detects a background operation on the service start page, and triggers a background operation event, where the background operation includes, but is not limited to, a click operation, a slide operation, a press operation, a voice operation, a gesture operation, and the like. For example, the user switches from the service initiation page to other pages or the user minimizes the service initiation page, and the main thread in the terminal detects a background operation on the service initiation page, and triggers a background operation event. And then the terminal responds to a background running event of the service starting page through the main thread, and converts a foreground running state corresponding to the service starting page into a background running state. When the service start page is in a background running state, the main thread can send a service information acquisition request to the working thread, and then the working thread receives the service information acquisition request and sends the service information acquisition request to a service end corresponding to the service start page.
In one embodiment, when the working thread is performing service information acquisition processing, the main thread may also respond to a background running event of the service start page, and convert a foreground running state corresponding to the service start page into a background running state, that is, the working thread and the main thread do not affect each other, so that blocking of the main thread may be avoided.
In the above embodiment, when the service start page is in the background running state, the worker thread may still acquire service information, that is, may process a corresponding task in the background, and at the same time, the user may process other tasks, that is, ensure information display and improve the resource utilization rate.
In one embodiment, the service initiation page comprises a transaction service initiation page, the service identifier associated with the service initiation page comprises a recommended transaction service identifier, and the service information comprises transaction service recommendation information corresponding to the recommended transaction service identifier; the information display method further comprises the following steps:
The method comprises the steps that a working thread obtains transaction service recommendation information corresponding to a recommendation transaction service identifier returned by a service end, the transaction service recommendation information is sent to a main thread, the transaction service recommendation information is stored in a browser cache, the browser cache is used for obtaining a service information obtaining request sent by the working thread after the main thread displays a recommendation transaction service page corresponding to the recommendation transaction service identifier, the corresponding transaction service recommendation information is sent to the main thread through the working thread based on the service information obtaining request, and the corresponding transaction service recommendation information is displayed on the recommendation transaction service page through the main thread; and the main thread displays transaction service recommendation information corresponding to the recommended transaction service identifier in the service starting page.
The transaction service start page refers to a start page of a transaction service. The transaction service refers to a service that performs a transaction with another object. Recommended transaction service identification refers to an identification of a recommended transaction service. The transaction service recommendation information refers to recommendation information of a transaction service, which may be operation activity information of a corresponding transaction service, description information of the transaction service, etc., for example, transaction service recommendation information may be transaction service commission discount information, etc.
Specifically, the user can conduct transaction through the transaction service in the target application program, namely when the terminal detects the triggering operation for payment in the target application program, the terminal responds to the triggering operation, a transaction service starting page is displayed in the browser of the target application program, and a working thread corresponding to the main thread is established. The main thread sends a transaction service recommendation information acquisition request to a working thread, the working thread sends the transaction service recommendation information acquisition request to a service end, the transaction service recommendation information acquisition request carries a recommendation transaction service identifier and a user identifier, and then whether the user identifier has authority to display the transaction service recommendation information in a transaction service starting page is judged. When the permission displays the transaction service recommendation information, the service end acquires the transaction service recommendation information corresponding to the recommended transaction service identifier and returns the transaction service recommendation information to the terminal. The terminal acquires transaction service recommendation information corresponding to the recommended transaction service identifier returned by the service end through a working thread, sends the transaction service recommendation information to a main thread, stores the transaction service recommendation information in a browser cache, and then the browser cache is used for acquiring a service information acquisition request sent by the working thread after the main thread displays a recommended transaction service page corresponding to the recommended transaction service identifier, sends the corresponding transaction service recommendation information to the main thread through the working thread based on the service information acquisition request, and displays the corresponding transaction service recommendation information on the recommended transaction service page through the main thread; the main thread displays transaction service recommendation information corresponding to the recommendation transaction service identification in the service initiation page
In the embodiment, the working thread acquires the transaction service recommendation information corresponding to the recommended transaction service identifier returned by the server, sends the transaction service recommendation information to the main thread, and stores the transaction service recommendation information in the browser cache, so that the transaction service recommendation information can be directly acquired from the browser cache and displayed when the recommended transaction service page is displayed, the server does not need to interact again, broadband resources are saved, the waiting time for interaction with the server is reduced, and the information display efficiency is improved.
In a specific embodiment, as shown in fig. 7, there is provided an information presentation method, which is executed by a computer device, and specifically includes the steps of:
S702, responding to an operation event of a target application program, operating the target application program, responding to a display event of a service starting page in the target application program, displaying the service starting page in a browser of the target application program through a main thread, and establishing a working thread corresponding to the main thread.
S704, the main thread sends a permission verification request to the working thread, wherein the permission verification request carries a service identifier associated with a service start page and a target object identifier corresponding to the service identifier.
S706, the worker thread receives the authority verification request, sends the authority verification request to the service end corresponding to the service start page, and the service end searches the target object identifier corresponding to the service identifier in the preset service information display authority list based on the authority verification request, and generates authority verification passing information when the target object identifier is searched.
S708, the working thread acquires right verification passing information returned by the service end, generates a service information acquisition request corresponding to the service identifier based on the right verification passing information, and sends the service information acquisition request corresponding to the service identifier to the service end corresponding to the service start page.
S710, the working thread acquires service information corresponding to the service identifier returned by the service end, sends the service information to the main thread, and stores the service information in the browser cache. The main thread presents service information in a service initiation page.
S712, responding to the jump event of the service page corresponding to the service identifier in the service start page, displaying the service page, and sending a service information acquisition request to the working thread.
S714, the working thread searches the service information corresponding to the service identifier in the browser cache based on the service acquisition request, and returns the service information corresponding to the service identifier to the main thread, and the main thread displays the service information corresponding to the service identifier in the service page.
In the embodiment, the target service information corresponding to the service page can be directly searched from the cache and displayed in the service page through the working thread, the target service information corresponding to the service page does not need to be acquired interactively with the service end, redundant requests are avoided, and therefore bandwidth resources can be saved. And the waiting time for interaction with the server is reduced, so that the efficiency of service information display is improved.
In a specific embodiment, as shown in fig. 8, a timing diagram of the information display method is shown, specifically: and the user runs the target application program in the terminal, and then when the terminal detects the operation of entering the page A, the terminal displays the page A in the target application program through the browser. At this time, the terminal initializes the service of the working thread through the main thread, then the main thread sends a display information acquisition request to the working thread, and the working thread receives the service information acquisition request, wherein the service information acquisition request carries the user identifier and the service identifier. Then the working thread sends a permission verification request to the server through the server interface 1. And the server verifies whether the user identifier has the authority for displaying the service information according to the authority verification request, and returns the authority verification passing information to the working thread if the user identifier has the authority for displaying the service information. The working thread sends a service information acquisition request to the service end through the service end interface 2 according to the authority verification passing information, and the service end searches corresponding service information by using the service identifier according to the service information acquisition request and returns the service information to the working thread. The service end can also directly inquire and obtain the service information through the service end interface 2 when the service end detects that the service information is displayed with the authority, and return the service information to the working thread. The working thread acquires the service information, keeps the service information in the browser cache, sends the information to the main thread of the page A, and carries the service information. The main thread of the page A receives the service information sent by the working thread service and displays the service information in the page A, and the process is ended at the moment. Then when the user opens the page B through the page A, the terminal detects the triggering operation of opening the page B, and the page B is displayed in response to the triggering operation. And then requesting service of the working thread, namely sending a service information acquisition request to the working thread, receiving the service information acquisition request by the working thread, searching corresponding service information in a browser cache, and directly returning the service information to the main thread of the page B when the service information corresponding to the service identifier is searched. The main thread of the page B acquires the service information and displays the service information in the page B. Then, the method comprises the steps of. When a user opens the page C through the page B, the terminal detects the triggering operation of opening the page C, and the page C is displayed in response to the triggering operation. And then requesting the service of the working thread, namely sending a service information acquisition request to the working thread, wherein the working thread receives the service information acquisition request, searches corresponding service information in a browser cache, and returns the service information to the main thread of the page C directly when the service information corresponding to the service identifier is found. The main thread of the page C acquires the service information and displays the service information in the page C. The target service information corresponding to the service page can be directly searched from the cache and displayed in the service page through the working thread, the target service information corresponding to the service page does not need to be acquired interactively with the service end, redundant requests are avoided, and therefore bandwidth resources can be saved. And the waiting time for interaction with the server is reduced, so that the efficiency of service information display is improved.
In a specific embodiment, the information presentation method is applied in a transaction application, in particular: as shown in fig. 9, a schematic diagram of a transaction initiation page in a browser of a transaction application program is shown, wherein a user needs to conduct a transaction with an object a, and a terminal detects a transaction operation, and in response to the transaction operation, the transaction initiation page is displayed through a main thread, the transaction initiation page is a disposable transaction page, and the transaction initiation page includes a disposable transaction button and a staged transaction button. Then, a working thread corresponding to the main thread is established, a transaction service information acquisition request is sent to the working thread through the main thread, the transaction service information acquisition request carries a staged transaction associated with a service starting page, and the working thread receives the service information acquisition request and sends the service information acquisition request to a service end corresponding to the service starting page. The working thread acquires transaction service information corresponding to the staged transaction returned by the service end, wherein the transaction service information comprises service information corresponding to a transaction starting page, such as preferential information, namely, 50% less of the handling fee, the transaction service information is sent to the main thread, the transaction service information is stored in a browser cache, and then the preferential information, namely, 50% less of the handling fee, is displayed at a preset position in the transaction starting page through the main thread. And then when the user clicks the staged transaction button. At this time, the terminal sends a transaction service information acquisition request to the working thread through the main thread by displaying the staged transaction page, as shown in fig. 10, where the working thread receives the transaction service information acquisition request, searches the browser cache for the transaction service information corresponding to the staged transaction page, and the transaction service information also includes the service information corresponding to the staged transaction page, for example, may be "preferential: the amount of money is delivered 10 coupons in the current stage). The working thread returns service information corresponding to the staged transaction page to the main thread, and the main thread displays the service information 'preferential' in the preset position of the staged transaction page: the amount of money is delivered 10 coupons in the current stage). At this time, when the user clicks to confirm the transaction, the terminal performs the transaction through the main thread and displays a transaction completion page after the transaction is completed. As shown in fig. 11, a schematic diagram of a transaction completion page is shown. Then, the terminal sends a transaction service information acquisition request to the working thread through the main thread, the working thread receives the transaction service information acquisition request, and searches the corresponding transaction service information of the transaction page in the browser cache, wherein the transaction service information also comprises the service information corresponding to the transaction completion page, for example, the transaction service information can be staged transaction advertisement information. The working thread returns the service information corresponding to the transaction completion page to the main thread, and the main thread displays the service information in the preset position of the transaction completion page, so that a user can see different service information of the same service in different pages, more coherent user experience is provided, the redundant request of a service end interface can be reduced, the bandwidth is saved, and the cost is reduced.
It should be understood that, although the steps in the flowcharts related to the embodiments described above are sequentially shown as indicated by arrows, these steps are not necessarily sequentially performed in the order indicated by the arrows. The steps are not strictly limited to the order of execution unless explicitly recited herein, and the steps may be executed in other orders. Moreover, at least some of the steps in the flowcharts described in the above embodiments may include a plurality of steps or a plurality of stages, which are not necessarily performed at the same time, but may be performed at different times, and the order of the steps or stages is not necessarily performed sequentially, but may be performed alternately or alternately with at least some of the other steps or stages.
Based on the same inventive concept, the embodiment of the application also provides an information display device for realizing the information display method. The implementation of the solution provided by the device is similar to the implementation described in the above method, so the specific limitation of one or more embodiments of the information display device provided below may refer to the limitation of the information display method hereinabove, and will not be repeated herein.
In one embodiment, as shown in fig. 12, there is provided an information presentation apparatus 1200 including: a page presentation module 1202, a request sending module 1204, an information caching module 1206, and an information presentation module 1208, wherein:
The page display module 1202 is configured to respond to a display event for a service start page in the browser, display the service start page through a main thread, and establish a working thread corresponding to the main thread;
The request sending module 1204 is configured to send, by the main thread, a service information obtaining request to the working thread, where the service information obtaining request carries a service identifier associated with a service start page, and the working thread receives the service information obtaining request and sends the service information obtaining request to a service end corresponding to the service start page;
The information caching module 1206 is configured to obtain service information corresponding to a service identifier returned by the service end by using a service thread, send the service information to a main thread, and store the service information in a browser cache, where the browser cache is configured to obtain a service information obtaining request sent by the service thread after the main thread displays a service page corresponding to the service identifier, send the corresponding service information to the main thread through the service thread based on the service information obtaining request, and display the corresponding service information on the service page through the main thread;
the information display module 1208 is configured to display service information in a service start page by using a main thread.
In one embodiment, information presentation apparatus 1202 further comprises:
The service page display module is used for responding to a jump event of the service page corresponding to the service identifier in the service starting page, displaying the service page and sending a service information acquisition request to the working thread; the working thread searches service information corresponding to the service identifier in the browser cache based on the service acquisition request, and returns the service information corresponding to the service identifier to the main thread; and the main thread displays service information corresponding to the service identifier in the service page.
In one embodiment, information presentation apparatus 1202 further comprises:
The end page display module is used for responding to a jump event of a service end page corresponding to the service identifier in the service page, displaying the service end page, sending a service information acquisition request to the working thread, searching service information corresponding to the service identifier in the browser cache based on the service acquisition request, and returning the service information corresponding to the service identifier to the main thread; and the main thread displays the service information corresponding to the service identifier in the service ending page.
In one embodiment, the service identification includes at least two; the information caching module 1206 is further configured to obtain service information corresponding to at least two service identifiers returned by the service end, send the service information corresponding to the at least two service identifiers to the main thread, and store the service information corresponding to the at least two service identifiers in the browser cache;
the information display module 1208 is further configured to obtain service information display positions corresponding to the at least two service identifiers respectively by using the main thread, and display service information corresponding to the at least two service identifiers respectively in the service start page based on the service information display positions.
In one embodiment, the page presentation module 1202 is further configured to create a working thread corresponding to the service identifier by the main thread, generate a connection message, and send the connection message to the working thread; the working thread receives the connection message, generates a reply message corresponding to the connection message, sends the reply message to the main thread, and updates the preset initial connection quantity to obtain the current connection quantity; the main thread receives a reply message returned by the working thread, and a communication connection result between the main thread and the working thread is determined based on the reply message.
In one embodiment, the service page display module is further configured to initialize a main thread to obtain a current main thread in response to a jump event of a service page corresponding to a service identifier in a service start page; the current main thread displays a service page and generates a current connection message, the current connection message is sent to a working thread, the working thread receives the connection message and generates a current reply message corresponding to the current connection message, the current reply message is sent to the current main thread, the connection quantity is acquired, and the connection quantity is updated to obtain an updated connection quantity; the current main thread receives the current reply message returned by the working thread, determines a communication connection result between the current main thread and the working thread based on the current reply message, and sends a service information acquisition request to the working thread.
In one embodiment, the service information includes initial service information corresponding to a service initial page and target service information corresponding to a service page:
the information cache module 1206 is further configured to obtain initial service information corresponding to a service initial page returned by the service end and target service information corresponding to the service page by using the working thread; transmitting initial service information corresponding to the service initial page to a main thread, and storing the initial service information corresponding to the service initial page and target service information corresponding to the service page into a browser cache;
The information display module 1208 is further configured to obtain a starting service information display position from the main thread, and display starting service information corresponding to the service starting page in the service starting page based on the starting service information display position.
In one embodiment, the information presentation apparatus 1200 further comprises:
the target information display module is used for responding to a jump event of a service page corresponding to the service identifier in the service starting page, displaying the service page, and sending a target service information acquisition request to the working thread, wherein the target service information acquisition request carries the service identifier and the page identifier corresponding to the service page; the working thread searches corresponding target service information in the browser cache by using the service identifier and the page identifier based on the target service acquisition request, and returns the target service information to the main thread; the main thread acquires a target service information display position, and displays target service information in a service page based on the target service information display position.
In one embodiment, page presentation module 1202 is further configured to run the target application in response to a run event to the target application; responding to a display event of the service starting page in the target application program, and displaying the service starting page in a browser of the target application program through a main thread;
The request sending module 1204 is further configured to send a service information obtaining request to a server corresponding to the target application program.
In one embodiment, the request sending module 1204 is further configured to send, by the main thread, a permission verification request to the worker thread, where the permission verification request carries a service identifier associated with the service initiation page and a target object identifier corresponding to the service identifier; the working thread receives the authority verification request, sends the authority verification request to a service end corresponding to the service initiation page, and the service end searches a target object identifier corresponding to the service identifier in a preset service information display authority list based on the authority verification request, and generates authority verification passing information when the target object identifier is searched; the working thread acquires right verification passing information returned by the service end, generates a service information acquisition request corresponding to the service identifier based on the right verification passing information, and sends the service information acquisition request corresponding to the service identifier to the service end corresponding to the service starting page.
In one embodiment, the request sending module 1204 is further configured to, in response to a background running event of the service start page, convert a foreground running state corresponding to the service start page into a background running state; when the service starting page is in a background running state, the working thread receives a service information acquisition request and sends the service information acquisition request to a service end corresponding to the service starting page.
In one embodiment, the service initiation page comprises a transaction service initiation page, the service identifier associated with the service initiation page comprises a recommended transaction service identifier, and the service information comprises transaction service recommendation information corresponding to the recommended transaction service identifier; the information presentation apparatus 1200 further includes:
The recommendation information display module is used for acquiring transaction service recommendation information corresponding to the recommendation transaction service identification returned by the service end by the working thread, sending the transaction service recommendation information to the main thread, storing the transaction service recommendation information in the browser cache, acquiring a service information acquisition request sent by the working thread after the browser cache is used for displaying a recommendation transaction service page corresponding to the recommendation transaction service identification by the main thread, sending the corresponding transaction service recommendation information to the main thread through the working thread based on the service information acquisition request, and displaying the corresponding transaction service recommendation information on the recommendation transaction service page through the main thread; and the main thread displays transaction service recommendation information corresponding to the recommended transaction service identifier in the service starting page.
The various modules in the information presentation apparatus described above may be implemented in whole or in part by software, hardware, and combinations thereof. The above modules may be embedded in hardware or may be independent of a processor in the computer device, or may be stored in software in a memory in the computer device, so that the processor may call and execute operations corresponding to the above modules.
In one embodiment, a computer device is provided, which may be a server, and the internal structure of which may be as shown in fig. 13. The computer device includes a processor, a memory, an Input/Output interface (I/O) and a communication interface. The processor, the memory and the input/output interface are connected through a system bus, and the communication interface is connected to the system bus through the input/output interface. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, computer programs, and a database. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage media. The database of the computer device is used to store service information, page data, etc. The input/output interface of the computer device is used to exchange information between the processor and the external device. The communication interface of the computer device is used for communicating with an external terminal through a network connection. The computer program is executed by a processor to implement an information presentation method.
In one embodiment, a computer device is provided, which may be a terminal, and the internal structure thereof may be as shown in fig. 14. The computer device includes a processor, a memory, an input/output interface, a communication interface, a display unit, and an input means. The processor, the memory and the input/output interface are connected through a system bus, and the communication interface, the display unit and the input device are connected to the system bus through the input/output interface. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage media. The input/output interface of the computer device is used to exchange information between the processor and the external device. The communication interface of the computer device is used for carrying out wired or wireless communication with an external terminal, and the wireless mode can be realized through WIFI, a mobile cellular network, NFC (near field communication) or other technologies. The computer program is executed by a processor to implement an information presentation method. The display unit of the computer equipment is used for forming a visual picture, and can be a display screen, a projection device or a virtual reality imaging device, wherein the display screen can be a liquid crystal display screen or an electronic ink display screen, the input device of the computer equipment can be a touch layer covered on the display screen, can also be a key, a track ball or a touch pad arranged on a shell of the computer equipment, and can also be an external keyboard, a touch pad or a mouse and the like.
It will be appreciated by those skilled in the art that the structures shown in fig. 13 or 14 are merely block diagrams of portions of structures associated with aspects of the present application and are not intended to limit the computer apparatus to which aspects of the present application may be applied, and that a particular computer apparatus may include more or less components than those shown, or may combine some of the components, or have a different arrangement of components.
In an embodiment, there is also provided a computer device comprising a memory and a processor, the memory having stored therein a computer program, the processor implementing the steps of the method embodiments described above when the computer program is executed.
In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored which, when executed by a processor, carries out the steps of the method embodiments described above.
In an embodiment, a computer program product is provided, comprising a computer program which, when executed by a processor, implements the steps of the method embodiments described above.
It should be noted that, the user information (including but not limited to user equipment information, user personal information, etc.) and the data (including but not limited to data for analysis, stored data, presented data, etc.) related to the present application are information and data authorized by the user or sufficiently authorized by each party, and the collection, use and processing of the related data need to comply with the related laws and regulations and standards of the related country and region.
Those skilled in the art will appreciate that implementing all or part of the above described methods may be accomplished by way of a computer program stored on a non-transitory computer readable storage medium, which when executed, may comprise the steps of the embodiments of the methods described above. Any reference to memory, database, or other medium used in embodiments provided herein may include at least one of non-volatile and volatile memory. The nonvolatile Memory may include Read-Only Memory (ROM), magnetic tape, floppy disk, flash Memory, optical Memory, high density embedded nonvolatile Memory, resistive random access Memory (ReRAM), magneto-resistive random access Memory (Magnetoresistive Random Access Memory, MRAM), ferroelectric Memory (Ferroelectric Random Access Memory, FRAM), phase change Memory (PHASE CHANGE Memory, PCM), graphene Memory, and the like. Volatile memory can include random access memory (Random Access Memory, RAM) or external cache memory, and the like. By way of illustration, and not limitation, RAM can be in various forms such as static random access memory (Static Random Access Memory, SRAM) or dynamic random access memory (Dynamic Random Access Memory, DRAM), etc. The databases referred to in the embodiments provided herein may include at least one of a relational database and a non-relational database. The non-relational database may include, but is not limited to, a blockchain-based distributed database, and the like. The processor referred to in the embodiments provided in the present application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic unit, a data processing logic unit based on quantum computing, or the like, but is not limited thereto.
The technical features of the above embodiments may be arbitrarily combined, and all possible combinations of the technical features in the above embodiments are not described for brevity of description, however, as long as there is no contradiction between the combinations of the technical features, they should be considered as the scope of the description.
The foregoing examples illustrate only a few embodiments of the application and are described in detail herein without thereby limiting the scope of the application. It should be noted that it will be apparent to those skilled in the art that several variations and modifications can be made without departing from the spirit of the application, which are all within the scope of the application. Accordingly, the scope of the application should be assessed as that of the appended claims.

Claims (25)

1. An information display method, characterized in that the method comprises:
Responding to a display event of a service starting page in a browser, displaying the service starting page through a main thread, creating a working thread corresponding to a service identifier through the main thread, and establishing communication connection between the main thread and the working thread;
The main thread sends a service information acquisition request to the working thread, wherein the service information acquisition request carries the service identifier associated with the service starting page, the working thread receives the service information acquisition request and sends the service information acquisition request to a service end corresponding to the service starting page, and the service identifier comprises at least two service identifiers;
the method comprises the steps that a working thread obtains service information corresponding to at least two service identifiers returned by a service end respectively, service information corresponding to the at least two service identifiers respectively is sent to a main thread, the service information corresponding to the at least two service identifiers respectively is stored in a browser cache, the service information comprises initial service information corresponding to a service starting page and target service information corresponding to a service page, the browser cache is used for displaying the service page corresponding to the service identifier in the current main thread, the current main thread is connected with the working thread, a service information obtaining request sent by the working thread is obtained, the target service information corresponding to the service page is sent to the current main thread through the working thread based on the service information obtaining request, the target service information corresponding to the service page is displayed in the service page through the current main thread, and the current main thread is obtained by initializing the main thread in response to a jump event of the service page corresponding to the service identifier in the service starting page;
And the main line Cheng Huoqu displays the initial service information respectively corresponding to the at least two service identifiers in the service initial page based on the service information display positions.
2. The method of claim 1, further comprising, after displaying the initial service information respectively corresponding to the at least two service identifiers in the service initiation page based on the service information display positions at the service information display positions respectively corresponding to the at least two service identifiers of the main line Cheng Huoqu:
responding to a jump event of a service page corresponding to the service identifier in the service starting page, displaying the service page, and sending the service information acquisition request to the working thread;
The working thread searches service information corresponding to the service identifier in the browser cache based on the service information acquisition request, and returns the service information corresponding to the service identifier to the main thread;
and the main thread displays service information corresponding to the service identifier in the service page.
3. The method of claim 2, further comprising, after the main thread presents the service information corresponding to the service identifier in the service page:
responding to a jump event of a service end page corresponding to the service identifier in the service page, displaying the service end page, sending the service information acquisition request to the working thread,
The working thread searches service information corresponding to the service identifier in the browser cache based on the service acquisition request, and returns the service information corresponding to the service identifier to the main thread;
And the main thread displays the service information corresponding to the service identifier in the service ending page.
4. The method according to claim 1, wherein the creating, by the main thread, a work thread corresponding to a service identifier, and establishing a communication connection between the main thread and the work thread, includes:
the main thread creates a working thread corresponding to the service identifier, generates a connection message and sends the connection message to the working thread;
The working thread receives the connection message, generates a reply message corresponding to the connection message, sends the reply message to the main thread, and updates a preset initial connection quantity to obtain a current connection quantity;
and the main thread receives a reply message returned by the working thread, and determines a communication connection result between the main thread and the working thread based on the reply message.
5. The method of claim 2, wherein responding to a jump event in the service initiation page to a service page corresponding to the service identifier, exposing the service page, and sending the service information acquisition request to the worker thread comprises:
initializing the main thread to obtain a current main thread in response to a jump event of a service page corresponding to the service identifier in the service starting page;
The current main thread displays the service page and generates a current connection message, the current connection message is sent to the working thread, the working thread receives the connection message and generates a current reply message corresponding to the current connection message, the current reply message is sent to the current main thread, the connection quantity is acquired, and the connection quantity is updated to obtain an updated connection quantity;
and the current main thread receives a current reply message returned by the working thread, determines a communication connection result between the current main thread and the working thread based on the current reply message, and sends the service information acquisition request to the working thread.
6. The method of claim 1, wherein the service information includes start service information corresponding to the service start page and target service information corresponding to the service page:
The working thread obtaining service information corresponding to at least two service identifiers returned by the service end, sending the service information corresponding to the at least two service identifiers to the main thread, and storing the service information corresponding to the at least two service identifiers to a browser cache, wherein the method comprises the following steps:
The working thread acquires initial service information corresponding to the service initial page and target service information corresponding to the service page returned by the service end;
Transmitting the initial service information corresponding to the service initial page to the main thread, and storing the initial service information corresponding to the service initial page and the target service information corresponding to the service page into a browser cache;
the service information display position corresponding to the at least two service identifiers of the main line Cheng Huoqu respectively displays initial service information corresponding to the at least two service identifiers in the service initial page based on the service information display position, and the method includes:
And the main thread acquires an initial service information display position, and displays initial service information corresponding to the service initial page in the service initial page based on the initial service information display position.
7. The method of claim 6, further comprising, after the displaying the initial service information corresponding to the service initiation page in the service initiation page based on the initial service information display position:
Responding to a jump event of a service page corresponding to the service identifier in the service starting page, displaying the service page, and sending a target service information acquisition request to the working thread, wherein the target service information acquisition request carries the service identifier and the page identifier corresponding to the service page;
The working thread searches corresponding target service information in the browser cache by using the service identifier and the page identifier based on the target service information acquisition request, and returns the target service information to the main thread;
and the main thread acquires a target service information display position, and displays the target service information in the service page based on the target service information display position.
8. The method of claim 1, wherein exposing the service initiation page through the main thread in response to the exposing event to the service initiation page in the browser comprises:
Responding to an operation event of a target application program, and operating the target application program;
responding to a display event of a service start page in the target application program, and displaying the service start page in a browser of the target application program through a main thread;
the sending the service information obtaining request to the service end corresponding to the service starting page includes:
and sending the service information acquisition request to a service end corresponding to the target application program.
9. The method of claim 1, wherein the main thread sends a service information acquisition request to the working thread, the service information acquisition request carrying the service identifier associated with the service initiation page, the working thread receiving the service information acquisition request and sending the service information acquisition request to a server corresponding to the service initiation page, comprising:
The main thread sends a permission verification request to the working thread, wherein the permission verification request carries a service identifier associated with the service starting page and a target object identifier corresponding to the service identifier;
The worker thread receives the permission verification request, sends the permission verification request to a server corresponding to the service initiation page, searches a target object identifier corresponding to the service identifier in a preset service information display permission list based on the permission verification request, and generates permission verification passing information when the target object identifier is searched;
And the working thread acquires right verification passing information returned by the service end, generates a service information acquisition request corresponding to the service identifier based on the right verification passing information, and sends the service information acquisition request corresponding to the service identifier to the service end corresponding to the service start page.
10. The method of claim 1, wherein the worker thread receives the service information acquisition request and sends the service information acquisition request to a server corresponding to the service initiation page, and further comprising:
the main thread responds to a background operation event of the service starting page, and converts a foreground operation state corresponding to the service starting page into a background operation state;
when the service starting page is in a background running state, the working thread receives the service information acquisition request and sends the service information acquisition request to a service end corresponding to the service starting page.
11. The method of claim 1, wherein the service initiation page comprises a transaction service initiation page, wherein the service identification associated with the service initiation page comprises a recommended transaction service identification, and wherein the service information comprises transaction service recommendation information corresponding to the recommended transaction service identification; the method further comprises the steps of:
The working thread acquires transaction service recommendation information corresponding to the recommended transaction service identifier returned by the service end, transmits the transaction service recommendation information to the main thread, stores the transaction service recommendation information in a browser cache, and the browser cache is used for acquiring a service information acquisition request transmitted by the working thread after the main thread displays a recommended transaction service page corresponding to the recommended transaction service identifier, transmitting the corresponding transaction service recommendation information to the main thread through the working thread based on the service information acquisition request, and displaying the corresponding transaction service recommendation information on the recommended transaction service page through the main thread;
And the main thread displays transaction service recommendation information corresponding to the recommended transaction service identifier in the service start page.
12. An information presentation apparatus, the apparatus comprising:
The page display module is used for responding to a display event of a service starting page in the browser, displaying the service starting page through a main thread, creating a working thread corresponding to a service identifier through the main thread, and establishing communication connection between the main thread and the working thread;
The request sending module is used for sending a service information acquisition request to the working thread by the main thread, wherein the service information acquisition request carries the service identifier associated with the service start page, the working thread receives the service information acquisition request and sends the service information acquisition request to a service end corresponding to the service start page, and the service identifier comprises at least two service identifiers;
The information cache module is used for acquiring service information corresponding to at least two service identifiers returned by the service end by the working thread, sending the service information corresponding to the at least two service identifiers to the main thread, storing the service information corresponding to the at least two service identifiers to a browser cache, wherein the service information comprises starting service information corresponding to a service starting page and target service information corresponding to a service page, the browser cache is used for displaying the service page corresponding to the service starting page in the current main thread, acquiring a service information acquisition request sent by the working thread after connecting the current main thread with the working thread, sending the target service information corresponding to the service page to the current main thread through the working thread based on the service information acquisition request, displaying the target service information corresponding to the service page in the service page through the current main thread, and initializing the main thread to obtain the target service information in response to a jump event of the service page corresponding to the service identifier in the service starting page;
And the information display module is used for displaying the initial service information respectively corresponding to the at least two service identifiers in the service initial page by the main thread.
13. The apparatus of claim 12, wherein the apparatus further comprises:
The service page display module is used for responding to a jump event of the service page corresponding to the service identifier in the service starting page, displaying the service page and sending the service information acquisition request to the working thread; the working thread searches service information corresponding to the service identifier in the browser cache based on the service acquisition information request, and returns the service information corresponding to the service identifier to the main thread; and the main thread displays service information corresponding to the service identifier in the service page.
14. The apparatus of claim 13, wherein the apparatus further comprises:
The end page display module is used for responding to a jump event of a service end page corresponding to the service identifier in the service page, displaying the service end page, sending the service information acquisition request to the working thread, searching service information corresponding to the service identifier in the browser cache based on the service acquisition request, and returning the service information corresponding to the service identifier to the main thread; and the main thread displays the service information corresponding to the service identifier in the service ending page.
15. The apparatus of claim 12, wherein the page presentation module is further configured to generate a connection message for a work thread corresponding to the service identifier of the main line Cheng Chuangjian, and send the connection message to the work thread; the working thread receives the connection message, generates a reply message corresponding to the connection message, sends the reply message to the main thread, and updates a preset initial connection quantity to obtain a current connection quantity; and the main thread receives a reply message returned by the working thread, and determines a communication connection result between the main thread and the working thread based on the reply message.
16. The apparatus of claim 13, wherein the service page presentation module is further configured to initialize the main thread to obtain a current main thread in response to a jump event in the service initiation page to a service page corresponding to the service identifier; the current main thread displays the service page and generates a current connection message, the current connection message is sent to the working thread, the working thread receives the connection message and generates a current reply message corresponding to the current connection message, the current reply message is sent to the current main thread, the connection quantity is acquired, and the connection quantity is updated to obtain an updated connection quantity; and the current main thread receives a current reply message returned by the working thread, determines a communication connection result between the current main thread and the working thread based on the current reply message, and sends the service information acquisition request to the working thread.
17. The apparatus of claim 12, wherein the service information comprises start service information corresponding to the service start page and target service information corresponding to the service page:
The information caching module is further used for the working thread to acquire initial service information corresponding to the service initial page and target service information corresponding to the service page, wherein the initial service information and the target service information correspond to the service page are returned by the service end; transmitting the initial service information corresponding to the service initial page to the main thread, and storing the initial service information corresponding to the service initial page and the target service information corresponding to the service page into a browser cache;
The information display module is further used for acquiring a starting service information display position by the main thread, and displaying starting service information corresponding to the service starting page in the service starting page based on the starting service information display position.
18. The apparatus of claim 17, wherein the apparatus further comprises:
The target information display module is used for responding to a jump event of a service page corresponding to the service identifier in the service starting page, displaying the service page, and sending a target service information acquisition request to the working thread, wherein the target service information acquisition request carries the service identifier and the page identifier corresponding to the service page; the working thread searches corresponding target service information in the browser cache by using the service identifier and the page identifier based on the target service information acquisition request, and returns the target service information to the main thread; and the main thread acquires a target service information display position, and displays the target service information in the service page based on the target service information display position.
19. The apparatus of claim 12, wherein the page presentation module is further configured to run the target application in response to a run event to the target application; responding to a display event of a service start page in the target application program, and displaying the service start page in a browser of the target application program through a main thread;
the request sending module is further configured to send the service information obtaining request to a server corresponding to the target application program.
20. The apparatus of claim 12, wherein the request sending module is further configured to send, by the main thread, a permission verification request to the worker thread, where the permission verification request carries a service identifier associated with the service initiation page and a target object identifier corresponding to the service identifier; the worker thread receives the permission verification request, sends the permission verification request to a server corresponding to the service initiation page, searches a target object identifier corresponding to the service identifier in a preset service information display permission list based on the permission verification request, and generates permission verification passing information when the target object identifier is searched; and the working thread acquires right verification passing information returned by the service end, generates a service information acquisition request corresponding to the service identifier based on the right verification passing information, and sends the service information acquisition request corresponding to the service identifier to the service end corresponding to the service start page.
21. The apparatus of claim 12, wherein the request sending module is further configured to, in response to a background running event of the service initiation page, convert a foreground running state corresponding to the service initiation page to a background running state; when the service starting page is in a background running state, the working thread receives the service information acquisition request and sends the service information acquisition request to a service end corresponding to the service starting page.
22. The apparatus of claim 12, wherein the service initiation page comprises a transaction service initiation page, wherein the service identification associated with the service initiation page comprises a recommended transaction service identification, and wherein the service information comprises transaction service recommendation information corresponding to the recommended transaction service identification; the apparatus further comprises:
The recommended information display module is used for acquiring transaction service recommended information corresponding to the recommended transaction service identifier returned by the service end by the working thread, sending the transaction service recommended information to the main thread, storing the transaction service recommended information in a browser cache, and after the main thread displays a recommended transaction service page corresponding to the recommended transaction service identifier, acquiring a service information acquisition request sent by the working thread, sending the corresponding transaction service recommended information to the main thread through the working thread based on the service information acquisition request, and displaying the corresponding transaction service recommended information on the recommended transaction service page through the main thread; and the main thread displays transaction service recommendation information corresponding to the recommended transaction service identifier in the service start page.
23. A computer device comprising a memory and a processor, the memory storing a computer program, characterized in that the processor implements the steps of the method of any one of claims 1 to 11 when the computer program is executed.
24. A computer readable storage medium, on which a computer program is stored, characterized in that the computer program, when being executed by a processor, implements the steps of the method of any of claims 1 to 11.
25. A computer program product comprising a computer program, characterized in that the computer program, when being executed by a processor, implements the steps of the method of any one of claims 1 to 11.
CN202410123414.7A 2024-01-30 2024-01-30 Information display method, information display device, computer equipment and storage medium Active CN117648510B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202410123414.7A CN117648510B (en) 2024-01-30 2024-01-30 Information display method, information display device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202410123414.7A CN117648510B (en) 2024-01-30 2024-01-30 Information display method, information display device, computer equipment and storage medium

Publications (2)

Publication Number Publication Date
CN117648510A CN117648510A (en) 2024-03-05
CN117648510B true CN117648510B (en) 2024-05-28

Family

ID=90048125

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202410123414.7A Active CN117648510B (en) 2024-01-30 2024-01-30 Information display method, information display device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN117648510B (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112380468A (en) * 2020-10-16 2021-02-19 华帝股份有限公司 Page loading method, computer equipment and storage medium
CN112530549A (en) * 2020-12-03 2021-03-19 武汉联影医疗科技有限公司 Image display method and device and computer equipment
CN113468448A (en) * 2020-03-31 2021-10-01 腾讯科技(深圳)有限公司 Page rendering method and device
CN114760521A (en) * 2022-06-16 2022-07-15 北京搜狐新动力信息技术有限公司 Video processing method and system
CN116010733A (en) * 2022-12-29 2023-04-25 中移动信息技术有限公司 Page display method, device, equipment and computer readable storage medium
CN116302175A (en) * 2023-02-09 2023-06-23 平安付科技服务有限公司 Concurrent network request processing method, device, equipment and storage medium
CN116304421A (en) * 2023-02-28 2023-06-23 西部证券股份有限公司 Report page loading method, storage medium and electronic equipment thereof

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10169091B2 (en) * 2012-10-25 2019-01-01 Nvidia Corporation Efficient memory virtualization in multi-threaded processing units

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113468448A (en) * 2020-03-31 2021-10-01 腾讯科技(深圳)有限公司 Page rendering method and device
CN112380468A (en) * 2020-10-16 2021-02-19 华帝股份有限公司 Page loading method, computer equipment and storage medium
CN112530549A (en) * 2020-12-03 2021-03-19 武汉联影医疗科技有限公司 Image display method and device and computer equipment
CN114760521A (en) * 2022-06-16 2022-07-15 北京搜狐新动力信息技术有限公司 Video processing method and system
CN116010733A (en) * 2022-12-29 2023-04-25 中移动信息技术有限公司 Page display method, device, equipment and computer readable storage medium
CN116302175A (en) * 2023-02-09 2023-06-23 平安付科技服务有限公司 Concurrent network request processing method, device, equipment and storage medium
CN116304421A (en) * 2023-02-28 2023-06-23 西部证券股份有限公司 Report page loading method, storage medium and electronic equipment thereof

Also Published As

Publication number Publication date
CN117648510A (en) 2024-03-05

Similar Documents

Publication Publication Date Title
CN109145078B (en) The application page of the machine application is indexed
CN109542427B (en) System customization method and device, electronic equipment and storage medium
CN110245069B (en) Page version testing method and device and page display method and device
CN105931107B (en) Sharing method and device
CN112445579B (en) Zero terminal data processing system and file copying method and device thereof
CN110175306B (en) Method and device for processing advertisement information
CN108809811B (en) Object sharing method and device
US20120079009A1 (en) Method and apparatus for choosing resources based on context and inheritance
CN105723364A (en) Transition from first search results environment to second search results environment
CN111597466A (en) Display method and device and electronic equipment
CA3154763A1 (en) Data operation method, device and system
CN111309991A (en) Query statement generation method and device and data query method and system
CN110147184B (en) Navigation backspacing method and control
CN107943921B (en) Page sharing information generation method and device, computer equipment and storage medium
CN113159870A (en) Display method and device of push information and computer equipment
CN112905936A (en) Page recording animation generation method, page operation log query method and computer equipment
CN117648510B (en) Information display method, information display device, computer equipment and storage medium
US9020970B2 (en) Embeddable web application agent
CN116127219A (en) Method and device for displaying pages in applet and computer equipment
CN115130002A (en) Recommendation request processing method and device, computer equipment and storage medium
CN109313771A (en) The degree of reiability of real-time auction
CN112748835A (en) Terminal, server, recent task list display method and application recommendation method
CN117112089A (en) Payment service processing method, device, equipment, storage medium and product
CN114896489A (en) Object recommendation information generation method, object recommendation information display method, object recommendation information generation device, object recommendation information display device, electronic equipment and medium
CN114943045A (en) Terminal webpage loading method and device based on offline cache and computer equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant