Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The embodiment of the invention provides a content display method, a content display device and a computer readable storage medium. The content presentation apparatus may be integrated in an electronic device, and the electronic device may be a server or a terminal.
The server may be an independent physical server, a server cluster or a distributed system formed by a plurality of physical servers, or a cloud server providing basic cloud computing services such as cloud service, a cloud database, cloud computing, a cloud function, cloud storage, Network service, cloud communication, middleware service, domain name service, security service, Network acceleration service (CDN), big data and an artificial intelligence platform. The terminal may be, but is not limited to, a smart phone, a tablet computer, a laptop computer, a desktop computer, a smart speaker, a smart watch, and the like. The terminal and the server may be directly or indirectly connected through wired or wireless communication, and the application is not limited herein.
For example, referring to fig. 1, taking an example that a content presentation apparatus is integrated in an electronic device, the electronic device sends a content presentation request to a server, where the content presentation request carries page attribute information of a currently displayed content page, obtains content data of content to be presented in the content page from the server, where the content data corresponds to the content presentation request, then screens out a target content style corresponding to the content data from a preset content style set stored locally, assembles the target content style and the content data to obtain the content to be presented, and presents the content to be presented on the content page.
The server can be a cloud server, that is, content data of content to be displayed can be acquired from the cloud server, the cloud server mainly stores the content data through cloud storage, the cloud storage (cloud storage) is a new concept extended and developed on the cloud computing concept, and the distributed cloud storage system (hereinafter referred to as a storage system) refers to a storage system which cooperatively works a large number of storage devices (storage devices are also referred to as storage nodes) of different types in a network through application software or an application set interface by functions of cluster application, grid technology, distributed storage file system and the like to provide data storage and service access functions to the outside.
At present, a storage method of a storage system is as follows: logical volumes are created, and when created, each logical volume is allocated physical storage space, which may be the disk composition of a certain storage device or of several storage devices. The client stores data on a certain logical volume, that is, the data is stored on a file system, the file system divides the data into a plurality of parts, each part is an object, the object not only contains the data but also contains additional information such as data identification (ID, ID entry), the file system writes each object into a physical storage space of the logical volume, and the file system records storage location information of each object, so that when the client requests to access the data, the file system can allow the client to access the data according to the storage location information of each object.
The process of allocating physical storage space for the logical volume by the storage system specifically includes: physical storage space is divided in advance into stripes according to a group of capacity measures of objects stored in a logical volume (the measures often have a large margin with respect to the capacity of the actual objects to be stored) and Redundant Array of Independent Disks (RAID), and one logical volume can be understood as one stripe, thereby allocating physical storage space to the logical volume.
The following are detailed below. It should be noted that the following description of the embodiments is not intended to limit the preferred order of the embodiments.
The embodiment will be described from the perspective of a content presentation apparatus, where the content presentation apparatus may be specifically integrated in an electronic device, and the electronic device may be a server or a terminal; the terminal may include a tablet Computer, a notebook Computer, a Personal Computer (PC), and other devices.
A method of content presentation, comprising:
sending a content display request to a server, wherein the content display request carries page attribute information of a content page displayed currently, acquiring content data of content to be displayed in the content page from the server, the content data corresponds to the content display request, screening a target content style corresponding to the content data from a preset content style set stored locally, assembling the target content style and the content data to obtain the content to be displayed, and displaying the content to be displayed on the content page
As shown in fig. 2, the specific flow of the content display method is as follows:
101. and sending a content display request to the server.
For example, the current content information displayed in the content page and the page attribute information of the content page may be obtained first, the type of the content to be displayed is determined according to the current content information, the number of the content to be displayed is determined based on the page attribute information, then, a content display request is generated, the number and the type of the content to be displayed are added to the content display request, and the content display request is sent to the server. Specifically, the following may be mentioned:
(1) and acquiring the current content information displayed in the content page and the page attribute information of the content page.
The page attribute information is basic attribute information of a page displayed on the terminal or the server, and may include, for example, a page address, a page size, page identification information, and the like.
For example, when a content page displayed on the content presentation apparatus exists, the page attribute information of the currently displayed content page and the current content information already presented in the content page may be directly extracted, for example, the page attribute information is directly extracted in the process of the currently displayed page, some content information already presented on the content page, such as picture, link, video, voice or text information on the current content page, may also be obtained, and information of a user logged in on the current page, such as identity, age, hobby, and contact information of the user, and the like. When the content page does not exist on the content display device, the page display request can be received, the content page is displayed on the content display device according to the received page display request, and then the page attribute information of the content page and the current content information displayed in the content page are directly extracted from the page display request.
(2) And determining the type of the content to be displayed according to the current content information.
For example, the type of the content to be displayed is determined by comprehensively analyzing the acquired current content information, for example, if the current content information on the content page is the financial information, the type of the content to be displayed can be determined to be the financial content, and for example, if the information of the user shows that the user is age 18-25, gender is female, and the interest and hobby are shopping, the type of the content to be displayed can be determined to be the content of the female shopping category.
The type of the content to be displayed may be one or more, and may be set according to actual application. If the type of the content to be displayed is one, different types of information in the current content information can be weighted, the weights of the various types of information are compared, and the type of the content to be displayed is determined according to the information type with the maximum weight. If the types of the contents to be displayed are various, the types of the contents to be displayed can be determined according to part or all types of information in the current type information.
(3) And determining the number of the contents to be displayed based on the page attribute information.
For example, the structure information of the content page is screened from the page attribute information, and the number of the contents to be displayed in the content page is determined according to the structure information, for example, the number of display areas which can be used for displaying the contents to be displayed in the content page is determined from the structure information of the content page, and the number of the display areas is used as the number of the contents to be displayed.
(4) And generating a content display request, and adding the quantity and the type of the content to be displayed as the information of the content page to the content display request.
For example, after the type and the number of the contents to be displayed are determined, the generation of the content display request is triggered, and then the determined type and the number of the contents to be displayed are added to the generated content display request as the information of the content page.
(5) And sending a content display request to the server.
For example, the content presentation request with the added type and amount of the content to be presented may be sent to the server in real time, for example, once the addition of the type and amount of the content to be presented in the content presentation request is completed, the content presentation request is sent to the server. When the content to be displayed needs to be displayed in a delayed manner, the content to be displayed can be transmitted in a delayed manner, for example, after the content is added, the content is transmitted according to a preset time, for example, after one minute or after 10 seconds.
Optionally, not every displayed page may show the content to be shown, and the content pages may be divided into two types, for example, a content showing page and a non-showing page, where the content showing page may be that some content to be shown exists on the page, for example, some specific advertisement content is shown. The non-shown page may be a page that cannot show the specific advertisement content. Therefore, it is necessary to determine the type of the content page currently displayed in the content display apparatus, and when the type of the content page currently displayed is the content display page, the content display request may be sent to the server, so before the step "sending the content display request to the server", the content display method may further include:
extracting page identification information of the content page from the page attribute information, identifying the page identification information to obtain an identification result, screening a page type corresponding to the identification result from a preset page type set, and taking the page type as the type of the content page. And when the page type is the content display page, sending a content display request to the server.
For example, the page identification information of the content page is extracted from the page attribute information, and the page identification information is identified to obtain an identification result, for example, the page identification information may be information identifying the content page, for example, the page identification information may be identification information of a top page of an XX application program, and the identification result may be the top page of the XX application program. And screening a page type corresponding to the identification result from the preset page type set, and taking the page type as the type of the content page, for example, if the home page of the XX application program corresponds to the content presentation page in the preset page type set, the type of the content page is the content presentation page. And when the type of the content page is the content display page, sending a content display request to the server.
102. And acquiring content data of the content to be displayed in the content page from the server.
Wherein the content data corresponds to the content presentation request. For example, the type and the number of the content to be displayed carried in the content display request, the content data returned by the server may be data corresponding to the type and the number of the content to be displayed.
For example, the content data of the content to be displayed in the content page returned by the receiving server for the content display request, for example, if the type of the content to be displayed carried in the content display request is the a type and the number to be displayed is 10, then the 10 pieces of content data of the a type returned by the receiving server may be received, and each piece of content data may further include an identifier of a content style matched with the content data, for example, if the first content data of the a type needs to be matched with the content style of the a type, then the content data of the a type may carry the identifier of the content style of the a type. The received content data may also be stored.
103. And screening out a target content style corresponding to the content data from a preset content style set stored locally.
The target content style may be layout information of the content data in the content page, for example, the target content style may be layout information of the current page view element. The preset content style set may be data stored locally at the content presentation device.
For example, content style identification information corresponding to the content data is extracted from the content data, and a target content style corresponding to the content data is screened from a preset content style set according to the content style identification information. For example, if the identification information of the content style corresponding to the content data extracted from the content data is the content style a, the content style a is extracted from the preset content style set, and the content style a is used as the target content style corresponding to the content data.
Since the preset content style set includes all content styles and the number of the content styles is limited, there may be a case where a plurality of content data correspond to the same content style, and at this time, the content style may be a target style corresponding to the plurality of content data.
Optionally, before the target content style corresponding to the content data is screened from the preset content style set, the content style in the preset content style set may be updated. The specific updating process is as follows:
(1) under a predetermined condition, a content style update request is generated.
For example, the predetermined condition may be various, for example, when the user opens the content presentation device, the generation of the content style update request may be triggered, for example, an update time may be set, for example, a fixed time of day, for example, 8 am, and for example, a fixed time interval, for example, every two days or every 12 hours. It is also possible for the content presentation means to trigger the generation of a content style update request upon opening a new page. Even when the content style corresponding to the content data is not queried in the preset content style set, the content style updating request can be triggered to be generated.
The trigger timing may be synchronous trigger or interval trigger, for example, after a preset time after a predetermined condition is reached, a content style update request is generated by the trigger.
(2) And updating the preset content style set based on the content style updating request.
For example, a content style update request is sent to the server, and current attribute information of the content style set sent by the server is received, for example, a current version number of the content style set sent by the server may be received. The preset content style set is updated according to the current attribute information, for example, the current attribute information is compared with the historical attribute information of the preset content style set, for example, taking the attribute information as the version number, the current version number of the server can be compared with the historical version number of the preset content style set. When the current attribute information is different from the historical attribute information, the preset content style set can be determined to need to be updated, then the current content style is obtained from the server, and the preset content style set is updated. For example, taking the attribute information as a version number, when the current version number is different from the historical version number of the preset content style set, it may be determined that the preset content style set needs to be updated, and then, the current content style is pulled from the server, where the pulling process is as shown in fig. 3, for example, a content style pulling request may be sent to the server through a content Development tool (SDK), the current content style returned by the server is received, the current content style is stored in the preset content style set, and the updating of the preset content style set is completed. When the current attribute information is the same as the historical attribute information, the content style in the preset content style set is indicated to be the latest, and therefore, the preset content style set can be determined not to need to be updated.
104. And assembling the target content style and the content data to obtain the content to be displayed, and displaying the content to be displayed on the content page.
For example, the content data may be combined according to the target content style to obtain initial content to be displayed, the initial content to be displayed is rendered to obtain content to be displayed, and the content to be displayed is displayed on the content page.
Specifically, the following may be mentioned:
and S1, combining the content data according to the target content style to obtain the initial content to be displayed.
For example, a content template is extracted from the target content style, and the content template includes a plurality of filling positions, which may be as shown in fig. 4, for example, this filling position may be a title filling position, a text filling position, an audio-video filling position, and/or an image filling position, etc. Target content data corresponding to the filling position is screened out from the content data, for example, title data corresponding to the title filling position is screened out from the content data, text data corresponding to the text filling position is screened out from the content data, audio and video data corresponding to the audio and video filling position is screened out from the content data, image data corresponding to the image filling position is screened out from the content data, and the screened content data is used as the target content data. Filling the target content data to the filling position, for example, as shown in fig. 5 in the filling process, filling the header data in the target content data to the header filling position, filling the text data to the text filling position, filling the audio/video data to the audio/video filling position, and filling the image data to the image filling position, so as to obtain the initial content to be displayed.
For example, when the content template a only has a title filling position and a text filling position, only the title data and the text data need to be respectively filled into the title filling position and the text filling position.
And S2, rendering the initial content to be displayed to obtain the content to be displayed.
For example, the rendering parameters and the controls to be added of the initial content to be displayed are extracted from the target content style. And adding the control to be added to the initial content to be displayed to obtain the content to be rendered, for example, adding a closing control, a returning control or an entering control to be added to the initial content to be displayed to obtain the content to be rendered. Then, rendering the content to be rendered according to the rendering parameters to obtain the content to be displayed, for example, when the control to be added includes a close control, a return control, and/or an enter control, the content to be rendered may be rendered by webview (a browser control), or the content to be rendered may be rendered and page content may be drawn by directly using a view element of Android or ios to obtain the content to be displayed, as shown in fig. 6.
And S3, displaying the content to be displayed on the content page.
For example, the display position information of the content to be displayed on the content page is extracted from the target content style, and the display area corresponding to the display position information is identified on the content page, for example, according to the coordinate information of the display area in the display position information, the display area corresponding to each coordinate information is identified on the content page, as shown in fig. 7, the display areas may be adjusted and laid out according to the display size of the terminal. The content to be displayed is added to the display area for displaying, for example, taking the content to be displayed as a certain game advertisement content as an example, the game advertisement content is added to the game advertisement display area for displaying, as shown in fig. 8.
Optionally, after the content to be displayed is displayed on the content page, the displayed content may be replaced according to the display time, which may specifically be as follows:
the content to be displayed is timed to be displayed on the content page, and when the display time exceeds the preset display time, the content to be displayed can be used as the content to be replaced, for example, when the preset display time is 5 minutes, and when the display time of the content to be displayed exceeds 5 minutes, the content to be displayed needs to be marked as the content to be replaced. The replacement content data is then obtained, for example, from sending a replacement request to the server and receiving the replacement content data back from the server. Replacing the marked content to be replaced according to the replacement content data, for example, screening out a replacement content style corresponding to the replacement content data from a preset style set, splicing the replacement content data and the replacement content style to obtain display content, and replacing the content to be replaced with the display content on a content page, as shown in fig. 9. The specific assembling process has been described in detail in the previous steps, and is not described herein again.
For the replacement of the display content, at least one content database exists in the server, and if the content in the content database is completely replaced, a new round of display content display can be started from the beginning, one display content can be replaced at a time, and a plurality of display contents can also be replaced.
Under the condition of isolating the content patterns from the content data, only two content patterns need to be issued for the ABtest test, and the influence of a plurality of content data under the condition of variable change can be infinitely tested. Moreover, by the isolation method, when the subsequent web rendering is changed into Android or ios native rendering, the cost of transformation is lower due to isolation of content data and content styles.
As can be seen from the above, after a content display request is sent to a server, the content display request carries information of a currently displayed content page, content data of content to be displayed in the currently displayed content page is obtained from the server, the content data corresponds to the content display request, a target content style corresponding to the content data is screened out from a preset content style set stored locally, the target content style and the content data are assembled to obtain the content to be displayed, and the content to be displayed is displayed on the content page; when the content needs to be displayed in the scheme, only the content data needs to be acquired, and the content data is spliced with the preset content style without repeatedly acquiring the content style, so that the acquisition speed of the displayed content can be greatly increased, and the flow consumption for acquiring the displayed content is reduced.
The method described in the above examples is further illustrated in detail below by way of example.
In this embodiment, the content display apparatus is specifically integrated in an electronic device, the electronic device is a terminal, content to be displayed is advertisement content, the terminal opens an application display page to trigger updating of a preset content style set, and a content display request is sent after the updating is completed.
As shown in fig. 10, a content display method specifically includes the following processes:
201. the terminal receives a page display request to display a content page.
For example, when a current content page in an application program of a terminal is updated or a new content page needs to be displayed, a page display request is received, after the terminal receives the page display request, content page information and rendering information carried in the page display request are read, the content page information is rendered according to the rendering information by adopting a webview control or a rendering control in an Android or ios system of the terminal system, a content page is generated, and then the content page is displayed on the application program of the terminal.
202. And the terminal generates a content style updating request according to the page display request.
For example, after receiving the page display request, the terminal displays the content page on the one hand, and on the other hand, the advertisement SDK may trigger the content style update request, and the timing for triggering the content style update request may be triggered simultaneously, that is, after receiving the page display request, the terminal also triggers the content style update request to be generated at the same time of displaying the content page, or may trigger the content style update request to be generated within a preset time interval, for example, taking the preset time interval as 10 seconds, and after receiving the page display request, the terminal triggers the content style update request to be generated within 10 seconds.
Optionally, the trigger condition for generating the content style update request may be a trigger that sets a time or a time interval to generate the content style update request periodically, for example, a specific update time may be set, for example, 7 am triggers each day are generated as the content style update request, and a fixed time interval may be set, for example, every two days or every 12 hours are triggered to generate the content style update request. The trigger condition may be that when the content style corresponding to the content data is not queried in the preset content style set, the content style update request is generated by triggering.
203. And the terminal updates the preset content style set based on the content style updating request.
For example, the terminal transmits a content style update request to the content server, then receives a current version number of the content style set transmitted by the content server, and compares the current version number of the content server with a historical version number of a preset content style set. When the current version number is different from the historical version number of the preset content style set, the preset content style set can be determined to need updating, then the terminal sends a content style pulling request to the content server, receives the current content style returned by the content server, stores the current content style into the preset content style set, and finishes updating the preset content style set. When the current version number is the same as the historical version number of the preset content style set, the content style in the preset content style set is indicated to be the latest version, and the preset content style set can be determined not to need to be updated.
204. The terminal sends a content presentation request to the server.
For example, the terminal may first obtain the current content information displayed in the content page and the page attribute information of the content page, determine the type of the content to be displayed according to the current content information, determine the number of the content to be displayed based on the page attribute information, then generate a content display request, add the number and the type of the content to be displayed to the content display request, and send the content display request to the server. Specifically, the following may be mentioned:
(1) the terminal acquires the current content information displayed in the content page and the page attribute information of the content page.
For example, when a content page exists on the terminal, the terminal may directly extract page attribute information of the currently displayed content page and current content information already shown in the content page, for example, directly extract page attribute information in the process of the currently displayed page, obtain some content information already shown on the content page, such as picture, link, video, voice or text information on the current content page, and also obtain information of a user logged in on the current page, such as information of the identity, age, interests, and contact ways of the user. When the terminal does not have the displayed content page, the terminal can also receive a page display request, display the content page on the content display device according to the received page display request, and then directly extract the page attribute information of the content page and the current content information displayed in the content page in the page display request.
(2) And the terminal determines the type of the advertisement content according to the current content information.
For example, the terminal comprehensively analyzes the acquired current content information to determine the type of the advertisement content, for example, if the current content information on the content page is the financial information, the type of the advertisement content can be determined to be the financial content, and for example, if the information of the user shows that the user is an age group of 18-25, a gender is female, and the interest and hobby are shopping, the type of the advertisement content can be determined to be the content of the female shopping category.
(3) The terminal determines the number of advertisement contents based on the page attribute information.
For example, the terminal screens out the structure information of the content page from the page attribute information, and determines the number of the advertisement contents in the content page according to the structure information, for example, determines the number of the display areas which can be used for displaying the advertisement contents in the content page from the structure information of the content page, and takes the number of the display areas as the number of the advertisement contents.
(4) The terminal generates a content presentation request and adds the number and type of advertisement content as information of a content page to the content presentation request.
For example, the terminal triggers generation of a content presentation request after determining the type and amount of advertisement content, and then adds the determined type and amount of advertisement content to the generated content presentation request as information of a content page.
(5) The terminal sends a content presentation request to the server.
For example, the terminal sends the content presentation request to which the type and the number of the advertisement content are added to the server in real time, for example, once the addition of the type and the number of the advertisement content in the content presentation request is completed, the content presentation request is sent to the server. When the content to be displayed needs to be displayed in a delayed manner, the content to be displayed can be transmitted in a delayed manner, for example, after the content is added, the content is transmitted according to a preset time, for example, after one minute or after 10 seconds.
Optionally, not every displayed page may show the advertisement content, and the content pages may be divided into two types, for example, an advertisement display page and a non-advertisement display page, where the advertisement display page has a right to show the advertisement content. And non-presentation pages are not able to present such advertising content. Therefore, the terminal needs to determine the type of the currently displayed content page, and may send the content display request to the server only when the type of the currently displayed content page is the advertisement display page, and therefore, before the step "sending the content display request to the server", the content display method may further include:
the terminal extracts page identification information of the content page from the page attribute information, identifies the page identification information to obtain an identification result, screens a page type corresponding to the identification result from a preset page type set, and takes the page type as the type of the content page. And when the page type is the content display page, sending a content display request to the server.
For example, the terminal extracts page identification information of the content page from the page attribute information, and identifies the page identification information to obtain an identification result, for example, the page identification information may be information identifying the content page, for example, identification information of a top page of an XX application program, and the identification result may be the top page of the XX application program. And screening a page type corresponding to the identification result from the preset page type set, and taking the page type as the type of the content page, for example, if the home page of the XX application program corresponds to the advertisement display page in the preset page type set, the type of the content page is the advertisement display page. And when the type of the content page is the advertisement display page, sending a content display request to the server.
205. The terminal acquires content data of the advertisement content in the content page from the server.
For example, the terminal receives content data of advertisement content in a content page returned by the server for the content presentation request, for example, if the type of the advertisement content to be presented is carried in the content presentation request is type a and the number to be presented is 10, then 10 pieces of content data of type a returned by the server may be received, and each piece of content data may further include an identifier of a content style matched with the content data, for example, if the first content data of type a needs to be matched with the content style of type a, then the content data of type a may carry the identifier of the content style of type a. The received content data may also be stored.
206. And the terminal screens out a target content style corresponding to the content data from a preset content style set stored locally.
For example, the terminal extracts content style identification information corresponding to the content data from the content data, and screens out a target content style corresponding to the content data from a preset content style set stored locally according to the content style identification information. For example, if the identification information of the content style corresponding to the content data extracted from the content data is the content style a, the content style a is extracted from the preset content style set, and the content style a is used as the target content style corresponding to the content data.
207. And the terminal combines the content data according to the target content style to obtain the initial advertisement content.
For example, the terminal extracts a content template in the target content style, where the content template includes a plurality of filling positions, for example, the filling position may be a title filling position, a text filling position, an audio/video filling position, and/or an image filling position. Target content data corresponding to the filling position is screened out from the content data, for example, title data corresponding to the title filling position is screened out from the content data, text data corresponding to the text filling position is screened out from the content data, audio and video data corresponding to the audio and video filling position is screened out from the content data, image data corresponding to the image filling position is screened out from the content data, and the screened content data is used as the target content data. The target content data is filled into the filling position, for example, the header data in the target content data can be filled into the header filling position, the text data is filled into the text filling position, the audio and video data is filled into the audio and video filling position, and the image data is filled into the image filling position, so that the initial advertisement content can be obtained.
208. And rendering the initial advertisement content by the terminal to obtain the advertisement content.
For example, the terminal extracts the rendering parameters and the controls to be added of the initial content to be displayed in the target content style. And adding the control to be added to the initial content to be displayed to obtain the content to be rendered, for example, adding a closing control, a returning control or an entering control to be added to the initial content to be displayed to obtain the content to be rendered. And then, rendering the content to be rendered according to the rendering parameters to obtain the content to be displayed, for example, when the control to be added includes a closing control, a returning control and/or an entering control, rendering the content to be rendered by webview, and rendering the content to be rendered and drawing page content by directly adopting a view element of Android or ios to obtain advertisement content.
209. The terminal presents the advertising content on the content page.
For example, the terminal extracts the display position information of the advertisement content on the content page in the target content style, identifies the display area corresponding to each coordinate information on the content page according to the coordinate information of the display area in the display position information, and adds the advertisement content to the display area of the content page of the application program for display through the advertisement SDK.
Optionally, in order to increase effective clicks for pushing the advertisement content on the content page, the displayed advertisement content needs to be replaced appropriately, and the replacement process is to replace the displayed advertisement content according to the display time after the advertisement content is displayed on the content page, and specifically may be as follows:
for example, the terminal counts the display time of the advertisement content on the content page, taking the preset display time as 5 minutes as an example, when the display time of the advertisement content exceeds 5 minutes, the advertisement content needs to be marked as the content to be replaced, and a replacement request can be sent to the server and the replacement content data returned by the server can be received. And replacing the marked content to be replaced according to the replacement content data, for example, screening a replacement content style corresponding to the replacement content data from a preset style set, splicing the replacement content data and the replacement content style to obtain display content, and replacing the content to be replaced with the display content in a content page.
As can be seen from the above, after the electronic device sends a content display request to the server, the content display request carries information of a currently displayed content page, content data of a content to be displayed in the content page is acquired from the server, the content data corresponds to the content display request, a target content style corresponding to the content data is screened out from a preset content style set stored locally, the target content style and the content data are assembled to obtain the content to be displayed, and the content to be displayed is displayed on the content page; when the content needs to be displayed in the scheme, only the content data needs to be acquired, and the content data is spliced with the preset content style without repeatedly acquiring the content style, so that the acquisition speed of the displayed content can be greatly increased, and the flow consumption for acquiring the displayed content is reduced.
In order to better implement the above method, the embodiment of the present invention further provides a content presentation apparatus, which may be integrated in an electronic device, such as a server or a terminal, and the terminal may include a tablet computer, a notebook computer, and/or a personal computer.
For example, as shown in fig. 11, the text content presentation apparatus may include a sendingunit 301, an obtainingunit 302, ascreening unit 303, and apresentation unit 304, as follows:
(1) atransmission unit 301;
a sendingunit 301, configured to send a content display request to a server, where the content display request carries information of a currently displayed content page.
For example, the sendingunit 301 may be specifically configured to obtain current content information already shown in a content page and page attribute information of the content page, determine a type of content to be shown according to the current content information, determine the number of the content to be shown based on the page attribute information, then generate a content display request, add the number and the type of the content to be shown to the content display request, and send the content display request to the server.
(2) Anacquisition unit 302;
an obtainingunit 302, configured to obtain content data of content to be shown in the content page from the server, where the content data corresponds to the content showing request.
For example, the obtainingunit 302 may be specifically configured to receive content data of content to be displayed in a content page returned by the server for the content display request.
(3) Ascreening unit 303;
thefiltering unit 303 is configured to filter out a target content style corresponding to the content data from a preset content style set stored locally.
For example, thescreening unit 303 may be specifically configured to extract content style identification information corresponding to the content data from the content data, and screen a target content style corresponding to the content data from a preset content style set stored locally according to the content style identification information.
(4) Apresentation unit 304;
thedisplay unit 304 is configured to assemble the target content style and the content data to obtain a content to be displayed, and display the content to be displayed on a content page.
Thedisplay unit 304 may further include acombination subunit 3041, arendering subunit 3042, and adisplay subunit 3043, as shown in fig. 12, the following may be specifically included:
acombination subunit 3041, configured to combine the content data according to the target content style, so as to obtain an initial content to be displayed;
arendering subunit 3042, configured to render the initial content to be displayed, so as to obtain the content to be displayed;
the displayingsubunit 3043 is configured to display the content to be displayed on the content page.
For example, the combiningsubunit 3041 combines the content data according to the target content style to obtain an initial content to be displayed, therendering subunit 3042 renders the initial content to be displayed to obtain a content to be displayed, and the displayingsubunit 3043 displays the content to be displayed on the content page.
Optionally, the content presentation apparatus may further include anupdate unit 305, as shown in fig. 13, which may specifically be as follows:
an updatingunit 305, configured to generate a content style update request under a predetermined condition, and update the preset content style set based on the content style update request.
Optionally, the content presentation apparatus may further include a replacingunit 306, as shown in fig. 14, which may specifically be as follows:
the replacingunit 306 is configured to time display time of the content to be displayed on the content page, take the content to be displayed as the content to be replaced when the display time exceeds preset display time, acquire replacement content data, and replace the content to be replaced according to the replacement content data.
In a specific implementation, the above units may be implemented as independent entities, or may be combined arbitrarily to be implemented as the same or several entities, and the specific implementation of the above units may refer to the foregoing method embodiments, which are not described herein again.
As can be seen from the above, in this embodiment, after the extractingunit 301 sends a content display request to the server, the content display request carries information of a currently displayed content page, the obtainingunit 302 obtains content data of a content to be displayed in the content page from the server, where the content data corresponds to the content display request, thescreening unit 303 screens a target content style corresponding to the content data from a preset content style set stored locally, and the displayingunit 304 assembles the target content style and the content data to obtain the content to be displayed, and displays the content to be displayed on the content page; when the content needs to be displayed in the scheme, only the content data needs to be acquired, and the content data is spliced with the preset content style without repeatedly acquiring the content style, so that the acquisition speed of the displayed content can be greatly increased, and the flow consumption for acquiring the displayed content is reduced.
An embodiment of the present invention further provides an electronic device, as shown in fig. 15, which shows a schematic structural diagram of the electronic device according to the embodiment of the present invention, specifically:
the electronic device may include components such as aprocessor 401 of one or more processing cores,memory 402 of one or more computer-readable storage media, apower supply 403, and aninput unit 404. Those skilled in the art will appreciate that the electronic device configuration shown in fig. 15 does not constitute a limitation of the electronic device and may include more or fewer components than those shown, or some components may be combined, or a different arrangement of components. Wherein:
theprocessor 401 is a control center of the electronic device, connects various parts of the whole electronic device by various interfaces and lines, performs various functions of the electronic device and processes data by running or executing software programs and/or modules stored in thememory 402 and calling data stored in thememory 402, thereby performing overall monitoring of the electronic device. Optionally,processor 401 may include one or more processing cores; preferably, theprocessor 401 may integrate an application processor, which mainly handles operating systems, user interfaces, application programs, etc., and a modem processor, which mainly handles wireless communications. It will be appreciated that the modem processor described above may not be integrated into theprocessor 401.
Thememory 402 may be used to store software programs and modules, and theprocessor 401 executes various functional applications and data processing by operating the software programs and modules stored in thememory 402. Thememory 402 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application program required by at least one function (such as a sound playing function, an image playing function, etc.), and the like; the storage data area may store data created according to use of the electronic device, and the like. Further, thememory 402 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid state storage device. Accordingly, thememory 402 may also include a memory controller to provide theprocessor 401 access to thememory 402.
The electronic device further comprises apower supply 403 for supplying power to the various components, and preferably, thepower supply 403 is logically connected to theprocessor 401 through a power management system, so that functions of managing charging, discharging, and power consumption are realized through the power management system. Thepower supply 403 may also include any component of one or more dc or ac power sources, recharging systems, power failure detection circuitry, power converters or inverters, power status indicators, and the like.
The electronic device may further include aninput unit 404, and theinput unit 404 may be used to receive input numeric or character information and generate keyboard, mouse, joystick, optical or trackball signal inputs related to user settings and function control.
Although not shown, the electronic device may further include a display unit and the like, which are not described in detail herein. Specifically, in this embodiment, theprocessor 401 in the electronic device loads the executable file corresponding to the process of one or more application programs into thememory 402 according to the following instructions, and theprocessor 401 runs the application program stored in thememory 402, thereby implementing various functions as follows:
sending a content display request to a server, wherein the content display request carries information of a content page displayed currently, acquiring content data of content to be displayed in the content page from the server, the content data corresponds to the content display request, screening a target content style corresponding to the content data from a preset content style set stored locally, assembling the target content style and the content data to obtain the content to be displayed, and displaying the content to be displayed on the content page.
For example, the page attribute information and the current content information already displayed in the content page are directly extracted in the process of the currently displayed page, a page display request can be received, the content page is displayed on the content display device according to the received page display request, and then the page attribute information of the content page and the current content information already displayed in the content page are directly extracted from the page display request. The method comprises the steps of comprehensively analyzing the obtained current content information to determine the type of the content to be displayed, screening out structural information of a content page from page attribute information, determining the number of the content to be displayed in the content page according to the structural information, triggering and generating a content display request after determining the type and the number of the content to be displayed, and then adding the determined type and the number of the content to be displayed as the information of the content page to the generated content display request. And sending the content display request added with the type and the number of the content to be displayed to a server, and receiving content data of the content to be displayed in a content page returned by the server according to the content display request. Extracting content style identification information corresponding to the content data from the content data, and screening a target content style corresponding to the content data from a preset content style set stored locally according to the content style identification information. And extracting a content template from the target content style, wherein the content template comprises a plurality of filling positions, screening target content data corresponding to the filling positions from the content data, and filling the target content data to the filling positions to obtain initial content to be displayed. And extracting the rendering parameters and the controls to be added of the initial contents to be displayed from the target content style. Adding the control to be added to the initial content to be displayed to obtain the content to be rendered, rendering the content to be rendered according to the rendering parameters to obtain the content to be displayed, extracting the display position information of the content to be displayed on the content page from the target content style, identifying a display area corresponding to the display position information on the content page, and adding the content to be displayed to the display area for displaying. After the content to be displayed is displayed on the content page, the display time of the content to be displayed on the content page can be timed, when the display time exceeds the preset display time, the content to be displayed can be used as the content to be replaced, a replacement request can be sent to the server, and the replacement content data returned by the server can be received. And replacing the marked content to be replaced according to the replacement content data.
The above operations can be implemented in the foregoing embodiments, and are not described in detail herein.
As can be seen from the above, in the embodiment of the present application, a content display request is sent to a server, where the content display request carries information of a currently displayed content page, content data of a content to be displayed in the content page is obtained from the server, where the content data corresponds to the content display request, a target content style corresponding to the content data is screened from a preset content style set stored in a local volume, the target content style and the content data are assembled to obtain the content to be displayed, and the content to be displayed is displayed on the content page; when the content needs to be displayed in the scheme, only the content data needs to be acquired, and the content data is spliced with the preset content style without repeatedly acquiring the content style, so that the acquisition speed of the displayed content can be greatly increased, and the flow consumption for acquiring the displayed content is reduced.
It will be understood by those skilled in the art that all or part of the steps of the methods of the above embodiments may be performed by instructions or by associated hardware controlled by the instructions, which may be stored in a computer readable storage medium and loaded and executed by a processor.
To this end, the embodiment of the present invention provides a computer-readable storage medium, in which a plurality of instructions are stored, and the instructions can be loaded by a processor to execute the steps in any content presentation method provided by the embodiment of the present invention. For example, the instructions may perform the steps of:
sending a content display request to a server, wherein the content display request carries information of a content page displayed currently, acquiring content data of content to be displayed in the content page from the server, the content data corresponds to the content display request, screening a target content style corresponding to the content data from a preset content style set stored locally, assembling the target content style and the content data to obtain the content to be displayed, and displaying the content to be displayed on the content page.
For example, the page attribute information and the current content information already displayed in the content page are directly extracted in the process of the currently displayed page, a page display request can be received, the content page is displayed on the content display device according to the received page display request, and then the page attribute information of the content page and the current content information already displayed in the content page are directly extracted from the page display request. And triggering to generate a content display request, adding the page attribute information to the content display request, and sending the content display request added with the page attribute information to a server. The method comprises the steps of comprehensively analyzing the obtained current content information to determine the type of the content to be displayed, screening out structural information of a content page from page attribute information, determining the number of the content to be displayed in the content page according to the structural information, triggering and generating a content display request after determining the type and the number of the content to be displayed, and then adding the determined type and the number of the content to be displayed as the information of the content page to the generated content display request. And sending the content display request added with the type and the number of the content to be displayed to a server, and receiving content data of the content to be displayed in a content page returned by the server according to the content display request. Extracting content style identification information corresponding to the content data from the content data, and screening a target content style corresponding to the content data from a preset content style set stored locally according to the content style identification information. And extracting a content template from the target content style, wherein the content template comprises a plurality of filling positions, screening target content data corresponding to the filling positions from the content data, and filling the target content data to the filling positions to obtain initial content to be displayed. And extracting the rendering parameters and the controls to be added of the initial contents to be displayed from the target content style. Adding the control to be added to the initial content to be displayed to obtain the content to be rendered, rendering the content to be rendered according to the rendering parameters to obtain the content to be displayed, extracting the display position information of the content to be displayed on the content page from the target content style, identifying a display area corresponding to the display position information on the content page, and adding the content to be displayed to the display area for displaying. After the content to be displayed is displayed on the content page, the display time of the content to be displayed on the content page can be timed, when the display time exceeds the preset display time, the content to be displayed can be used as the content to be replaced, a replacement request can be sent to the server, and the replacement content data returned by the server can be received. And replacing the marked content to be replaced according to the replacement content data.
The above operations can be implemented in the foregoing embodiments, and are not described in detail herein.
Wherein the computer-readable storage medium may include: read Only Memory (ROM), Random Access Memory (RAM), magnetic or optical disks, and the like.
Since the instructions stored in the computer-readable storage medium can execute the steps in any content presentation method provided by the embodiment of the present invention, the beneficial effects that can be achieved by any content presentation method provided by the embodiment of the present invention can be achieved, which are detailed in the foregoing embodiments and will not be described again here.
The content display method, the content display device and the computer-readable storage medium according to the embodiments of the present invention are described in detail, and the principles and embodiments of the present invention are described herein by applying specific embodiments, and the descriptions of the embodiments are only used to help understanding the method and the core concept of the present invention; meanwhile, for those skilled in the art, according to the idea of the present invention, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present invention.