CN111259276A - Method and device for displaying title content, electronic equipment and storage medium - Google Patents

Method and device for displaying title content, electronic equipment and storage medium Download PDF

Info

Publication number
CN111259276A
CN111259276A CN202010027409.8A CN202010027409A CN111259276A CN 111259276 A CN111259276 A CN 111259276A CN 202010027409 A CN202010027409 A CN 202010027409A CN 111259276 A CN111259276 A CN 111259276A
Authority
CN
China
Prior art keywords
content
information
picture
topic content
topic
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.)
Pending
Application number
CN202010027409.8A
Other languages
Chinese (zh)
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.)
Beijing ByteDance Network Technology Co Ltd
Original Assignee
Beijing ByteDance Network Technology 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 Beijing ByteDance Network Technology Co Ltd filed Critical Beijing ByteDance Network Technology Co Ltd
Priority to CN202010027409.8A priority Critical patent/CN111259276A/en
Publication of CN111259276A publication Critical patent/CN111259276A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/957Browsing optimisation, e.g. caching or content distillation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/955Retrieval from the web using information identifiers, e.g. uniform resource locators [URL]
    • G06F16/9558Details of hyperlinks; Management of linked annotations
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/958Organisation or management of web site content, e.g. publishing, maintaining pages or automatic linking
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q50/00Systems or methods specially adapted for specific business sectors, e.g. utilities or tourism
    • G06Q50/10Services
    • G06Q50/20Education

Abstract

The application relates to a topic content display method, a topic content display device, an electronic device and a storage medium, wherein adaptation information and picture link information of topic content to be displayed are obtained by responding to a topic content display request of a current terminal device, wherein the adaptation information comprises corresponding relation information between topic content pictures with different sizes and the size of the terminal device, furthermore, identification information of a target topic content picture matched with the current terminal device can be determined based on the adaptation information and the size information of the current terminal device, and further, the target topic content picture can be obtained based on the link information corresponding to the identification information of the target topic content picture, so that the current terminal device can display the target topic content picture. Based on the mode, because the theme content pictures which are adaptive to the terminal devices with different sizes are configured in advance, the same theme content can be uniformly displayed on the terminal devices with different sizes in the same form on the premise of spending shorter time.

Description

Method and device for displaying title content, electronic equipment and storage medium
Technical Field
The present application relates to the field of digital teaching technologies, and in particular, to a method and an apparatus for displaying topic content, an electronic device, and a storage medium.
Background
With the introduction of digital teaching into the market, a large amount of digital teaching data becomes a support for teaching, and most importantly, an item library is composed of a plurality of item contents, wherein the item contents are rich text set data containing formulas, fonts, pictures, typesets and special characters. With the development and growth of business lines, the subject content can be applied to different terminal devices for display, however, it is a difficult point to realize the uniform display logic on each terminal. If the display components are independently developed on each terminal, the testing workload is greatly increased; if the title content is displayed in the form of an embedded H5 browser, the user experience is sacrificed due to the time required to load the H5 browser.
Disclosure of Invention
In view of this, embodiments of the present application provide at least a method and an apparatus for displaying topic content, an electronic device, and a storage medium, where because topic content pictures adapted to a plurality of terminal devices with different sizes are configured in advance, the same topic content can be uniformly displayed on terminal devices with different sizes in the same form on the premise of spending a short time.
The application mainly comprises the following aspects:
in a first aspect, an embodiment of the present application provides a method for displaying topic content, where the method for displaying topic content includes:
responding to a question content display request of current terminal equipment, and acquiring label information of question content to be displayed; the label information comprises adaptation information and picture link information; the adaptation information comprises size information of terminal equipment respectively adapted to topic content pictures with different sizes, and the topic content pictures comprise the topic content to be displayed; the picture link information comprises link information corresponding to the title content pictures with different sizes;
searching link information of a target topic content picture matched with the current terminal equipment based on the adaptation information and the size information of the current terminal equipment;
acquiring the target topic content picture through the searched link information;
and sending the target topic content picture to the current terminal equipment so as to display the target topic content picture on the current terminal equipment.
In a possible implementation manner, the size information includes width information, and the searching for link information of a target title content picture matched with the current terminal device based on the adaptation information and the size information of the current terminal device includes:
and selecting a target size which is smaller than or equal to the size of the current terminal equipment and is closest to the size of the current terminal equipment from the size information of the terminal equipment respectively matched with the topic content pictures with different sizes in the matching information, and linking information of the target topic content picture corresponding to the terminal equipment with the target size.
In a possible implementation manner, the display method further includes generating topic content pictures containing the topic content to be displayed in different sizes in advance according to the following steps:
acquiring the title content to be displayed and the size information of the terminal equipment to be adapted;
and generating topic content pictures containing the topic contents to be displayed and with different sizes based on the topic contents to be displayed and the size information of the terminal equipment to be adapted.
In a possible implementation manner, the generating, based on the theme content to be displayed and the size information of the terminal device to be adapted, theme content pictures containing the theme content to be displayed and having different sizes includes:
and typesetting the subject contents to be displayed according to a preset subject template format, and generating subject content pictures containing the subject contents to be displayed in different sizes based on the typeset subject contents to be displayed and the size information of the terminal equipment to be adapted.
In a possible implementation manner, the adaptation information includes picture widths of topic content pictures of different sizes, the size information includes width information, and for each topic content picture in the topic content pictures of different sizes, the presentation method further includes determining a correspondence between the picture width of each topic content picture and the width information of the adapted terminal device according to the following steps:
and determining the width information of the terminal equipment adapted to each topic content picture according to the picture width of each topic content picture and the preset display margin.
In one possible embodiment, for each of the different sized thematic content pictures, the presentation method further comprises generating link information for each thematic content picture according to the following steps:
encoding the content data of the title content to be displayed to generate an MD5 code corresponding to the title content to be displayed;
and generating link information of each topic content picture according to a storage website of each topic content picture, the MD5 code corresponding to the topic content to be displayed and the size information of the terminal equipment corresponding to each topic content picture.
In a second aspect, an embodiment of the present application further provides a device for displaying topic content, where the device includes:
the first acquisition module is used for responding to a question content display request of the current terminal equipment and acquiring label information of question content to be displayed; the label information comprises adaptation information and picture link information; the adaptation information comprises size information of terminal equipment respectively adapted to topic content pictures with different sizes, and the topic content pictures comprise the topic content to be displayed; the picture link information comprises link information corresponding to the title content pictures with different sizes;
the determining module is used for searching link information of a target topic content picture matched with the current terminal equipment based on the adaptive information and the size information of the current terminal equipment;
the second acquisition module is used for acquiring the target topic content picture through the searched link information;
and the sending module is used for sending the target topic content picture to the current terminal equipment so as to display the target topic content picture on the current terminal equipment.
In a possible implementation manner, the size information includes width information, and the determining module is configured to search for link information of a target topic content picture matching the current terminal device according to the following steps:
and selecting a target size which is smaller than or equal to the size of the current terminal equipment and is closest to the size of the current terminal equipment from the size information of the terminal equipment respectively matched with the topic content pictures with different sizes in the matching information, and linking information of the target topic content picture corresponding to the terminal equipment with the target size.
In a possible embodiment, the display device further comprises:
the third acquisition module is used for acquiring the title content to be displayed and the size information of the terminal equipment to be adapted;
and the first generation module is used for generating theme content pictures containing the theme content to be displayed in different sizes based on the theme content to be displayed and the size information of the terminal equipment to be adapted.
In a possible implementation manner, the first generating module is configured to generate topic content pictures with different sizes including the topic content to be displayed according to the following steps:
and typesetting the subject contents to be displayed according to a preset subject template format, and generating subject content pictures containing the subject contents to be displayed in different sizes based on the typeset subject contents to be displayed and the size information of the terminal equipment to be adapted.
In a possible implementation manner, the adaptation information includes picture widths of topic content pictures of different sizes, the size information includes width information, and for each topic content picture in the topic content pictures of different sizes, the first obtaining module is further configured to determine a correspondence between the picture width of each topic content picture and the width information of the adapted terminal device according to the following steps:
and determining the width information of the terminal equipment adapted to each topic content picture according to the picture width of each topic content picture and the preset display margin.
In one possible embodiment, the presentation apparatus further comprises a second generation module for each of the different sized topic content pictures; the second generation module comprises:
the first generating unit is used for encoding the content data of the title content to be displayed and generating an MD5 code corresponding to the title content to be displayed;
and the second generating unit is used for generating link information of each topic content picture according to the storage website of each topic content picture, the MD5 code corresponding to the topic content to be displayed and the size information of the terminal equipment corresponding to each topic content picture.
In a third aspect, an embodiment of the present application further provides an electronic device, including: a processor, a memory and a bus, wherein the memory stores machine-readable instructions executable by the processor, when the electronic device runs, the processor and the memory communicate with each other through the bus, and when the processor runs, the machine-readable instructions perform the steps of the method for presenting title content according to the first aspect or any one of the possible embodiments of the first aspect.
In a fourth aspect, an embodiment of the present application further provides a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the steps of the method for presenting title content described in the first aspect or any one of the possible implementation manners of the first aspect are performed.
In the embodiment of the application, tag information of theme content to be displayed is acquired by responding to a theme content display request of current terminal equipment, wherein the tag information includes adaptation information and picture link information, the adaptation information includes corresponding relationship information between theme content pictures with different sizes and the size of the terminal equipment, further, based on the adaptation information and the size information of the current terminal equipment, identification information of a target theme content picture matched with the current terminal equipment can be determined, and further, based on the link information corresponding to the identification information of the target theme content picture, the target theme content picture can be acquired, so that the current terminal equipment can display the target theme content picture. Based on the mode, because the theme content pictures which are adaptive to the terminal devices with different sizes are configured in advance, the same theme content can be uniformly displayed on the terminal devices with different sizes in the same form on the premise of spending shorter time.
In order to make the aforementioned objects, features and advantages of the present application more comprehensible, preferred embodiments accompanied with figures are described in detail below.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are required to be used in the embodiments will be briefly described below, it should be understood that the following drawings only illustrate some embodiments of the present application and therefore should not be considered as limiting the scope, and for those skilled in the art, other related drawings can be obtained from the drawings without inventive effort.
FIG. 1 is a flow chart illustrating a method for presenting topic content provided by an embodiment of the present application;
2a-2c are schematic diagrams illustrating the presentation of the same title content on three different sizes of terminal devices;
FIG. 3 is a functional block diagram of a title content display apparatus according to an embodiment of the present application;
FIG. 4 is a second functional block diagram of a title display device according to an embodiment of the present application;
FIG. 5 illustrates a functional block diagram of the second generation module of FIG. 4;
fig. 6 shows a schematic structural diagram of an electronic device provided in an embodiment of the present application.
Description of the main element symbols:
in the figure: 300-a presentation device of title content; 310-a first obtaining module; 320-a determination module; 330-a second obtaining module; 340-a sending module; 350-a third obtaining module; 360-a first generation module; 370-a second generation module; 372-a first generating unit; 374 — a second generating unit; 600-an electronic device; 610-a processor; 620-memory; 630-bus.
Detailed Description
To make the purpose, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it should be understood that the drawings in the present application are for illustrative and descriptive purposes only and are not used to limit the scope of protection of the present application. Additionally, it should be understood that the schematic drawings are not necessarily drawn to scale. The flowcharts used in this application illustrate operations implemented according to some embodiments of the present application. It should be understood that the operations of the flow diagrams may be performed out of order, and that steps without logical context may be performed in reverse order or concurrently. One skilled in the art, under the guidance of this application, may add one or more other operations to, or remove one or more operations from, the flowchart.
In addition, the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. The components of the embodiments of the present application, generally described and illustrated in the figures herein, can be arranged and designed in a wide variety of different configurations. Thus, the following detailed description of the embodiments of the present application, presented in the accompanying drawings, is not intended to limit the scope of the claimed application, but is merely representative of selected embodiments of the application. All other embodiments, which can be derived by a person skilled in the art from the embodiments of the present application without making any creative effort, shall fall within the protection scope of the present application.
To enable those skilled in the art to utilize the present disclosure, in connection with a particular application scenario "presentation of title content", the following embodiments are presented to enable those skilled in the art to apply the general principles defined herein to other embodiments and application scenarios without departing from the spirit and scope of the present disclosure.
The method, the apparatus, the electronic device, or the computer-readable storage medium described in the embodiments of the present application may be applied to any scenario in which theme content needs to be displayed, and the embodiments of the present application do not limit the specific application scenario, and any scheme that uses the method, the apparatus, the electronic device, and the storage medium for displaying the theme content provided in the embodiments of the present application is within the protection scope of the present application.
It is noted that, before the present application is proposed, with the development and growth of service lines, subject contents can be displayed on different terminal devices, however, it is a difficult point to implement uniform display logic on each terminal. If the display components are independently developed on each terminal, the testing workload is greatly increased; if the title content is displayed in the form of an embedded H5 browser, the user experience is sacrificed due to the time required to load the H5 browser.
In view of the above problems, in the embodiments of the present application, tag information of a topic content to be displayed is obtained by responding to a topic content display request of a current terminal device, where the tag information includes adaptation information and picture link information, where the adaptation information includes correspondence information between topic content pictures of different sizes and terminal device sizes, and further, based on the adaptation information and the size information of the current terminal device, identification information of a target topic content picture matching the current terminal device may be determined, and further, based on the link information corresponding to the identification information of the target topic content picture, the target topic content picture may be obtained, so that the current terminal device displays the target topic content picture. Based on the mode, because the theme content pictures which are adaptive to the terminal devices with different sizes are configured in advance, the same theme content can be uniformly displayed on the terminal devices with different sizes in the same form on the premise of spending shorter time.
It should be noted that a rich text Format (RichText Format, RTF) is a cross-platform document Format, rich text is a very popular file structure, multiple word editors support it, general Format settings, such as font and paragraph settings, page settings, etc., can be stored in the RTF Format, and rich text can include formulas, fonts, pictures, typesets, special characters, etc.
Here, the terminal device includes a mobile terminal device and a Personal Computer (PC).
For the convenience of understanding of the present application, the technical solutions provided in the present application will be described in detail below with reference to specific embodiments.
Fig. 1 is a flowchart of a title content display method provided in an embodiment of the present application. As shown in fig. 1, the device for executing the title content presentation method may be a cloud platform or a server interacting with a current terminal device. The method for presenting title content provided in the first embodiment of the present application is described below from the perspective of an execution subject being a server. The title content display method provided by the embodiment of the application comprises the following steps:
s101: responding to a question content display request of current terminal equipment, and acquiring label information of question content to be displayed; the label information comprises adaptation information and picture link information; the adaptation information comprises size information of terminal equipment respectively adapted to topic content pictures with different sizes, and the topic content pictures comprise the topic content to be displayed; the picture link information comprises link information corresponding to the title content pictures with different sizes.
In specific implementation, when a display request for displaying the title content sent by the current terminal device is received, the tag information of the title content to be displayed is obtained in response to the display request, specifically, the tag information of the title to be displayed can be obtained through the title identifier of the title content to be displayed, and the title identifier can be a title number. Here, the tag information of the title content to be displayed includes adaptation information and picture link information, where the adaptation information includes size information of terminal devices to which the title content pictures of different sizes corresponding to the title content to be displayed are respectively adapted, that is, the adaptation information includes size information of a preset terminal device to which each title content picture is adapted to be displayed, each title content picture includes title content to be displayed, and the sizes of the different title content pictures are different; the picture link information comprises link information corresponding to topic content pictures with different sizes corresponding to topic contents to be displayed.
It should be noted that, each topic content in the topic library may be respectively converted into topic content pictures of different sizes in advance for storage, and tag information is added to each topic content, where the topic content pictures of different sizes are adaptively displayed on terminal devices of different sizes, for example, a terminal device of 320px size adaptively displays a topic content picture of 280px size, so that when a topic content display request of a terminal device is received, the topic content picture of the topic content to be displayed of the terminal device display size can be provided for the terminal device.
Where px (Pixel) is the smallest unit of a digital image or graphic that can be displayed and represented on a digital display device, a Pixel is the basic logical unit in the digital graphic, a Pixel is also called a picture element, and is a relative unit, and the Pixel resolution of a general computer image is 72ppi (pxper inch) in terms of relative resolution, where 1px is 0.04cm, 1cm is 25px, and if the resolution of the terminal device is 300ppi, where 1px is 0.009 cm.
Further, a plurality of topic content pictures with different sizes corresponding to the topic content to be displayed can be generated in advance, wherein the topic content picture with each size contains the topic content to be displayed, that is, the topic content pictures with different sizes containing the topic content to be displayed are generated in advance according to the following steps:
step a: and acquiring the title content to be displayed and the size information of the terminal equipment to be adapted.
In specific implementation, the theme content to be displayed and the size information of the current mainstream terminal device are obtained first, where the mainstream terminal device may be understood as the size information of the terminal device sold in the market at present, and the size information is, for example, 375px, 534px, 768px, and further, the size information of the mainstream terminal device is used as the size information of the terminal device to be adapted, and the size information of the terminal device to be adapted is used as a basis for converting the theme content to be displayed into theme content pictures of different sizes.
Step b: and generating topic content pictures containing the topic contents to be displayed and with different sizes based on the topic contents to be displayed and the size information of the terminal equipment to be adapted.
In specific implementation, the size information of the terminal device to be adapted can be used as a basis for converting the theme content to be displayed into the theme content pictures with different sizes, and specifically, the theme content pictures with corresponding sizes adapted to the size information of the terminal device to be adapted are generated, for example, the terminal device with 375px size is adapted to display the theme content picture with 335px size.
Further, after the theme content to be displayed is acquired, before generating theme content pictures containing the theme content to be displayed and having different sizes, the method further includes a step of processing the theme content to be displayed, that is, in step b, the theme content pictures containing the theme content to be displayed and having different sizes are generated based on the theme content to be displayed and the size information of the terminal device to be adapted, and the method includes the following steps:
and typesetting the subject contents to be displayed according to a preset subject template format, and generating subject content pictures containing the subject contents to be displayed in different sizes based on the typeset subject contents to be displayed and the size information of the terminal equipment to be adapted.
In a specific implementation, after the theme content to be displayed is obtained, the theme content to be displayed may be firstly composed according to a preset theme template format, so that the theme content may be displayed on the terminal device according to the preset theme template format, specifically, a non-interface browser may be started, the non-interface browser jumps to a theme template page, and then the theme content to be displayed is composed according to the preset theme template format on the theme template page, where the composition includes but is not limited to text rendering, formula rendering, format processing, font rendering, paragraph rendering, and the like in the theme content to be displayed, and further, after the theme content to be displayed is composed, according to the size information of the terminal device to be adapted, theme content pictures of different sizes including the theme content to be displayed are generated, specifically, the non-interface browser is used to perform composition on the theme content to be displayed according to different sizes of the terminal device to be adapted And performing screenshot to obtain topic content pictures with different sizes containing the topic content to be displayed, wherein the topic content pictures with corresponding sizes can be intercepted through the typesetted X and Y coordinate information of a page where the topic content to be displayed with the size matched with the terminal equipment to be matched is located.
It should be noted that a Headless Browser (HB), also called a Headless Browser, can automatically load a page, obtain required data, and even capture a screen of the page, and in short, is a web Browser without a graphical user interface.
Furthermore, the size of each theme content picture can be smaller than the size of the corresponding identified terminal equipment, so that when the theme content picture is displayed on the adaptive terminal equipment, left and right edge distances are reserved on two sides of the theme content picture, and the ornamental value is better. That is, the adaptation information includes the picture widths of the topic content pictures with different sizes, and for each topic content picture in the topic content pictures with different sizes, the corresponding relationship between the picture width of each topic content picture and the width information of the adapted terminal device is determined according to the following steps:
and determining the width information of the terminal equipment adapted to each topic content picture according to the picture width of each topic content picture and the preset display margin.
In specific implementation, a display margin may be preset, the display margin may be set according to actual needs, the display margins corresponding to different terminal devices may be the same or different, preferably, the larger the size of the terminal device is, the larger the display margin that can be set is, the smaller the size of the terminal device is, and the smaller the display margin that can be set is, here, there is a correspondence between the theme content picture of each size and the size of the adapted terminal device, that is, the picture width of each theme content picture is equal to the difference between the width of the adapted terminal device and the corresponding twice display margin, for example, the width of the adapted terminal device is 320px, and the preset display margin is 20px, and then the picture width of the theme content picture suitable for being displayed on the terminal device should be generated as 320px-2 × 20px as 280 px.
Further, topic content pictures of multiple sizes corresponding to topic content to be displayed can be stored, and link information of topic content pictures of each size is provided, that is, for each topic content picture in topic content pictures of different sizes, link information of each topic content picture can be generated according to the following steps:
step A: and encoding the content data of the title content to be displayed to generate an MD5 code corresponding to the title content to be displayed.
In specific implementation, for each topic content picture in topic content pictures with different sizes, a storage website of the topic content picture, an MD5 code corresponding to topic content to be displayed, and width information of a terminal device adapted to the topic content picture may be spliced into link information of the topic content picture, where content data of the topic content to be displayed may be encoded by using an information summarization algorithm to generate an MD5 code corresponding to the topic content to be displayed.
It should be noted that the Message digest algorithm (MD 5) is a widely used cryptographic hash function that can generate a 128-bit hash value to ensure the integrity of the Message transmission.
And B: and generating link information of each topic content picture according to a storage website of each topic content picture, the MD5 code corresponding to the topic content to be displayed and the size information of the terminal equipment corresponding to each topic content picture.
In a specific implementation, for each topic content picture in topic content pictures with different sizes, link information of the topic content picture can be generated according to a storage website of the topic content picture, an MD5 code corresponding to the topic content to be displayed, and size information of a terminal device corresponding to the topic content picture, where the link information of one topic content picture is https:// cdn.com/3b2de33200d0043cbe49c0117c15c800/320 png, where the storage website of the topic content picture is https:// cdn.com, "the MD5 code corresponding to the topic content to be displayed is" 3b2de33200d0043cbe49c0117c15c800, "and the size information of the terminal device corresponding to the topic content picture is" 320 px.
It should be noted that the size information may be width information or length information, if the size information is width, the width information of the terminal device is required to correspond to the picture width of the theme content picture, and if the size information is length, the length information of the terminal device is required to correspond to the picture length of the theme content picture, where the adaptation information of the theme content to be displayed includes multiple sets of information, each set of information may include the width information of the adapted terminal device, the picture width and the picture height of the theme content picture of the corresponding size, and one set of information is, for example, "320 + 280 + 300".
S102: and searching link information of the target topic content picture matched with the current terminal equipment based on the adaptation information and the size information of the current terminal equipment.
In specific implementation, in response to a theme content display request of a current terminal device, in addition to obtaining tag information of theme content to be displayed, size information of the current terminal device is also obtained, so that identification information of a target theme content picture matched with the size information of the current terminal device can be found from matching information in the tag information, wherein the identification information is used for uniquely representing each theme content picture.
Further, the size information of the current terminal device includes width information, and according to the width information of the current terminal device, the identification information of the target topic content picture adapted to the width information of the current terminal device can be found from the adaptation information in the tag information, that is, in step S102, the link information of the target topic content picture matched with the current terminal device is found based on the adaptation information and the size information of the current terminal device, which includes the following steps:
and selecting a target size which is smaller than or equal to the size of the current terminal equipment and is closest to the size of the current terminal equipment from the size information of the terminal equipment respectively matched with the topic content pictures with different sizes in the matching information, and linking information of the target topic content picture corresponding to the terminal equipment with the target size.
In the specific implementation, the topic content to be displayed corresponds to a plurality of topic content pictures with different sizes, the topic content pictures with different sizes are matched with terminal devices with different sizes, that is, each topic content picture with different sizes is displayed on one terminal device in an adaptive manner, and further, in response to the topic content display request of the current terminal device, the size of the terminal device which is smaller than or equal to the size of the current terminal device and is closest to the target size of the current terminal device can be selected from the size information of the terminal devices respectively matched with the topic content pictures with different sizes included in the adaptive information, and the identification of the target topic content picture corresponding to the terminal device with the target size is linked with information, if the size information is width information, that is, the width of the terminal device matched with the selected topic content picture is smaller than or equal to the width of the current terminal device, and closest to the width of the current terminal device. If the topic content picture corresponding to the device terminal to be adapted, which is equal to the width of the current device terminal, is not found, only the topic content picture corresponding to the device terminal to be adapted, which is smaller than the width of the current terminal device and closest to the current terminal device, is selected, and the user can view the topic content by amplifying the topic content picture on the current terminal device, so that the user does not influence the experience of viewing the topic content.
In an example, the adaptation information includes that the sizes of the adapted terminal devices are 400px, 375px, 320px, and 360px, the size of the current terminal device is 380px, wherein 375px is smaller than 380px and is closest to 380px, and then the title content picture corresponding to the size of the terminal device to be adapted corresponding to 375px is selected.
S103: and acquiring the target topic content picture through the searched link information.
In a specific implementation, after determining connection information of a target topic content picture matched with a current terminal device, the target topic content picture is further acquired according to the link information, specifically, width information of the terminal device adapted to the topic content picture can be carried in the link information of each topic content picture, and further, after determining width information of an adapted terminal device corresponding to the target topic content picture matched with the current terminal device, link information of the corresponding target topic content picture is directly determined according to the width information of the adapted terminal device.
In an example, the sizes of the plurality of terminal devices adapted to the topic content to be presented include 400px, 375px, 320px, and 360px, and if the size of the current terminal device is 380px, it is determined that 375px is the best match with the current terminal device, then the link information with 375px is found from the link information of the plurality of topic content pictures corresponding to the topic to be presented, where the link information is https:// cdn.com/3b2de33200d0043cbe49c0117c15c800/375 png.
S104: and sending the target topic content picture to the current terminal equipment so as to display the target topic content picture on the current terminal equipment.
In specific implementation, after the target topic content picture is obtained, the target topic content picture is sent to the current terminal device, so that the current terminal device can be provided to display the target topic content picture.
In the embodiment of the application, tag information of theme content to be displayed is acquired by responding to a theme content display request of current terminal equipment, wherein the tag information includes adaptation information and picture link information, the adaptation information includes corresponding relationship information between theme content pictures with different sizes and the size of the terminal equipment, further, based on the adaptation information and the size information of the current terminal equipment, identification information of a target theme content picture matched with the current terminal equipment can be determined, and further, based on the link information corresponding to the identification information of the target theme content picture, the target theme content picture can be acquired, so that the current terminal equipment can display the target theme content picture. Based on the mode, because the theme content pictures which are adaptive to the terminal devices with different sizes are configured in advance, the same theme content can be uniformly displayed on the terminal devices with different sizes in the same form on the premise of spending shorter time.
2a-2c are schematic diagrams illustrating the presentation of the same title content on three different sizes of terminal devices; FIG. 2a is a schematic diagram of topic content displayed on a terminal device with a size of 320 px; FIG. 2b is a schematic diagram of the presentation of title content on a terminal device of size 375 px; fig. 2c is a schematic diagram of the presentation of title content on a terminal device of size 534 px.
Based on the same application concept, a device for displaying the subject content corresponding to the method for displaying the subject content provided by the embodiment is also provided in the embodiment of the present application, and because the principle of solving the problem of the device in the embodiment of the present application is similar to the method for displaying the subject content in the embodiment of the present application, the implementation of the device can refer to the implementation of the method, and repeated details are not repeated.
As shown in fig. 3 to fig. 5, fig. 3 is a first functional block diagram of a method and apparatus for displaying topic content 300 according to an embodiment of the present application, fig. 4 is a second functional block diagram of the method and apparatus for displaying topic content 300 according to the embodiment of the present application, and fig. 5 is a functional block diagram of a second generating module 370 in fig. 4.
As shown in fig. 3, the presentation apparatus 300 for title content includes:
a first obtaining module 310, configured to respond to a title content display request of a current terminal device, and obtain tag information of a title content to be displayed; the label information comprises adaptation information and picture link information; the adaptation information comprises size information of terminal equipment respectively adapted to topic content pictures with different sizes, and the topic content pictures comprise the topic content to be displayed; the picture link information comprises link information corresponding to the title content pictures with different sizes;
a determining module 320, configured to search, based on the adaptation information and the size information of the current terminal device, link information of a target topic content picture matched with the current terminal device;
the second obtaining module 330 is configured to obtain the target topic content picture according to the searched link information;
a sending module 340, configured to send the target topic content picture to the current terminal device, so that the target topic content picture is displayed on the current terminal device.
In a possible implementation manner, as shown in fig. 3, the size information includes width information, and the determining module 320 is configured to find the link information of the target topic content picture matching the current terminal device according to the following steps:
and selecting a target size which is smaller than or equal to the size of the current terminal equipment and is closest to the size of the current terminal equipment from the size information of the terminal equipment respectively matched with the topic content pictures with different sizes in the matching information, and linking information of the target topic content picture corresponding to the terminal equipment with the target size.
In one possible embodiment, as shown in FIG. 4, the apparatus 300 for presenting title content further comprises: 350
A third obtaining module 350, configured to obtain the title content to be displayed and size information of the terminal device to be adapted;
the first generating module 360 is configured to generate topic content pictures with different sizes including the topic content to be displayed based on the topic content to be displayed and the size information of the terminal device to be adapted.
In a possible implementation manner, as shown in fig. 4, the first generating module 360 is configured to generate topic content pictures with different sizes containing the topic content to be displayed according to the following steps:
and typesetting the subject contents to be displayed according to a preset subject template format, and generating subject content pictures containing the subject contents to be displayed in different sizes based on the typeset subject contents to be displayed and the size information of the terminal equipment to be adapted.
In a possible implementation manner, as shown in fig. 4, the adaptation information includes picture widths of topic content pictures with different sizes, the size information includes width information, and for each topic content picture in the topic content pictures with different sizes, the first obtaining module 310 is further configured to determine a correspondence between the picture width of each topic content picture and the width information of the adapted terminal device according to the following steps:
and determining the width information of the terminal equipment adapted to each topic content picture according to the picture width of each topic content picture and the preset display margin.
In one possible embodiment, as shown in FIG. 5, the apparatus 300 for presenting title content further comprises a second generating module 370; the second generating module 370 includes:
a first generating unit 372, configured to encode content data of the title content to be displayed, and generate an MD5 code corresponding to the title content to be displayed;
and a second generating unit 374, configured to generate link information of each topic content picture according to a storage website of each topic content picture, an MD5 code corresponding to the topic content to be displayed, and size information of a terminal device corresponding to each topic content picture.
In this embodiment of the application, by responding to a theme content display request of a current terminal device, a first obtaining module 310 obtains tag information of a theme content to be displayed, where the tag information includes adaptation information and picture link information, where the adaptation information includes correspondence information between theme content pictures of different sizes and a size of the terminal device, and further, based on the adaptation information and the size information of the current terminal device, identification information of a target theme content picture matched with the current terminal device may be determined by a determining module 320, and further, based on the link information corresponding to the identification information of the target theme content picture, the target theme content picture may be obtained by a second obtaining module 330, so that the current terminal device displays the target theme content picture. Based on the mode, because the theme content pictures which are adaptive to the terminal devices with different sizes are configured in advance, the same theme content can be uniformly displayed on the terminal devices with different sizes in the same form on the premise of spending shorter time.
Based on the same application concept, referring to fig. 6, a schematic structural diagram of an electronic device 600 provided in the embodiment of the present application includes: a processor 610, a memory 620 and a bus 630, wherein the memory 620 stores machine-readable instructions executable by the processor 610, when the electronic device 600 runs, the processor 610 and the memory 620 communicate with each other through the bus 630, and the machine-readable instructions are executed by the processor 610 to perform the steps of the method for displaying title contents as described in any of the above embodiments.
In particular, the machine readable instructions, when executed by the processor 610, may perform the following:
responding to a question content display request of current terminal equipment, and acquiring label information of question content to be displayed; the label information comprises adaptation information and picture link information; the adaptation information comprises size information of terminal equipment respectively adapted to topic content pictures with different sizes, and the topic content pictures comprise the topic content to be displayed; the picture link information comprises link information corresponding to the title content pictures with different sizes;
searching link information of a target topic content picture matched with the current terminal equipment based on the adaptation information and the size information of the current terminal equipment;
acquiring the target topic content picture through the searched link information;
and sending the target topic content picture to the current terminal equipment so as to display the target topic content picture on the current terminal equipment.
In the embodiment of the application, tag information of theme content to be displayed is acquired by responding to a theme content display request of current terminal equipment, wherein the tag information includes adaptation information and picture link information, the adaptation information includes corresponding relationship information between theme content pictures with different sizes and the size of the terminal equipment, further, based on the adaptation information and the size information of the current terminal equipment, identification information of a target theme content picture matched with the current terminal equipment can be determined, and further, based on the link information corresponding to the identification information of the target theme content picture, the target theme content picture can be acquired, so that the current terminal equipment can display the target theme content picture. Based on the mode, because the theme content pictures which are adaptive to the terminal devices with different sizes are configured in advance, the same theme content can be uniformly displayed on the terminal devices with different sizes in the same form on the premise of spending shorter time.
Based on the same application concept, embodiments of the present application further provide a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the steps of the method for displaying topic contents provided by the above embodiments are executed.
Specifically, the storage medium may be a general storage medium, such as a mobile disk, a hard disk, or the like, and when the computer program on the storage medium is executed, the method for displaying the theme content may be executed.
It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the system and the apparatus described above may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again. In the several embodiments provided in the present application, it should be understood that the disclosed system, apparatus and method may be implemented in other ways. The above-described embodiments of the apparatus are merely illustrative, and for example, the division of the units is only one logical division, and there may be other divisions when actually implemented, and for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection of devices or units through some communication interfaces, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit.
The functions, if implemented in the form of software functional units and sold or used as a stand-alone product, may be stored in a non-volatile computer-readable storage medium executable by a processor. Based on such understanding, the technical solutions of the present application may be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the methods described in the embodiments of the present application. And the aforementioned storage medium includes: various media capable of storing program codes, such as a usb disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk.
The above description is only for the specific embodiments of the present application, but the scope of the present application is not limited thereto, and any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present application, and shall be covered by the scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.

Claims (10)

1. A method for displaying topic contents is characterized in that the method comprises the following steps:
responding to a question content display request of current terminal equipment, and acquiring label information of question content to be displayed; the label information comprises adaptation information and picture link information; the adaptation information comprises size information of terminal equipment respectively adapted to topic content pictures with different sizes, and the topic content pictures comprise the topic content to be displayed; the picture link information comprises link information corresponding to the title content pictures with different sizes;
searching link information of a target topic content picture matched with the current terminal equipment based on the adaptation information and the size information of the current terminal equipment;
acquiring the target topic content picture through the searched link information;
and sending the target topic content picture to the current terminal equipment so as to display the target topic content picture on the current terminal equipment.
2. The method according to claim 1, wherein the searching for the link information of the target topic content picture matching the current terminal device based on the adaptation information and the size information of the current terminal device comprises:
and selecting a target size which is smaller than or equal to the size of the current terminal equipment and is closest to the size of the current terminal equipment from the size information of the terminal equipment respectively matched with the topic content pictures with different sizes in the matching information, and linking information of the target topic content picture corresponding to the terminal equipment with the target size.
3. The presentation method according to claim 1, further comprising generating topic content pictures containing the topic content to be presented in different sizes in advance according to the following steps:
acquiring the title content to be displayed and the size information of the terminal equipment to be adapted;
and generating topic content pictures containing the topic contents to be displayed and with different sizes based on the topic contents to be displayed and the size information of the terminal equipment to be adapted.
4. The method according to claim 3, wherein the generating of the theme content pictures containing the theme content to be displayed in different sizes based on the theme content to be displayed and the size information of the terminal device to be adapted comprises:
and typesetting the subject contents to be displayed according to a preset subject template format, and generating subject content pictures containing the subject contents to be displayed in different sizes based on the typeset subject contents to be displayed and the size information of the terminal equipment to be adapted.
5. The displaying method according to claim 1, wherein the adaptation information includes picture widths of topic content pictures of different sizes, the size information includes width information, and for each topic content picture in the topic content pictures of different sizes, the displaying method further includes determining a correspondence between the picture width of each topic content picture and the width information of the adapted terminal device according to the following steps:
and determining the width information of the terminal equipment adapted to each topic content picture according to the picture width of each topic content picture and the preset display margin.
6. The presentation method according to claim 1, wherein for each of the differently sized topic content pictures, the presentation method further comprises generating link information for each topic content picture according to the following steps:
encoding the content data of the title content to be displayed to generate an MD5 code corresponding to the title content to be displayed;
and generating link information of each topic content picture according to a storage website of each topic content picture, the MD5 code corresponding to the topic content to be displayed and the size information of the terminal equipment corresponding to each topic content picture.
7. A presentation apparatus of title content, the presentation apparatus comprising:
the first acquisition module is used for responding to a question content display request of the current terminal equipment and acquiring label information of question content to be displayed; the label information comprises adaptation information and picture link information; the adaptation information comprises size information of terminal equipment respectively adapted to topic content pictures with different sizes, and the topic content pictures comprise the topic content to be displayed; the picture link information comprises link information corresponding to the title content pictures with different sizes;
the determining module is used for searching link information of a target topic content picture matched with the current terminal equipment based on the adaptive information and the size information of the current terminal equipment;
the second acquisition module is used for acquiring the target topic content picture through the searched link information;
and the sending module is used for sending the target topic content picture to the current terminal equipment so as to display the target topic content picture on the current terminal equipment.
8. The apparatus according to claim 7, wherein the determining module is configured to find the link information of the target topic content picture matching the current terminal device according to the following steps:
and selecting a target size which is smaller than or equal to the size of the current terminal equipment and is closest to the size of the current terminal equipment from the size information of the terminal equipment respectively matched with the topic content pictures with different sizes in the matching information, and linking information of the target topic content picture corresponding to the terminal equipment with the target size.
9. An electronic device, comprising: a processor, a memory and a bus, the memory storing machine-readable instructions executable by the processor, the processor and the memory communicating via the bus when an electronic device is operated, the machine-readable instructions being executed by the processor to perform the steps of the method for presenting title content according to any one of claims 1 to 6.
10. A computer-readable storage medium, having stored thereon a computer program which, when being executed by a processor, performs the steps of the presentation method of title content according to any one of claims 1 to 6.
CN202010027409.8A 2020-01-10 2020-01-10 Method and device for displaying title content, electronic equipment and storage medium Pending CN111259276A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010027409.8A CN111259276A (en) 2020-01-10 2020-01-10 Method and device for displaying title content, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010027409.8A CN111259276A (en) 2020-01-10 2020-01-10 Method and device for displaying title content, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN111259276A true CN111259276A (en) 2020-06-09

Family

ID=70948701

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010027409.8A Pending CN111259276A (en) 2020-01-10 2020-01-10 Method and device for displaying title content, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN111259276A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112905673A (en) * 2021-02-09 2021-06-04 长沙冉星信息科技有限公司 Method for intelligently presenting questionnaire report data on screen

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101707748A (en) * 2009-11-24 2010-05-12 中兴通讯股份有限公司 Picture adapting method and server
KR20130136090A (en) * 2012-06-04 2013-12-12 최영진 Apparatus for mending using picture of customer/agent project in e-commerce and method for the same and system for the same
CN105450837A (en) * 2014-08-29 2016-03-30 阿里巴巴集团控股有限公司 Method and apparatus for displaying CDN image adaptively on terminal device
CN107610677A (en) * 2017-10-16 2018-01-19 上海斐讯数据通信技术有限公司 A kind of method and system that dimension of picture is designed according to display terminal

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101707748A (en) * 2009-11-24 2010-05-12 中兴通讯股份有限公司 Picture adapting method and server
KR20130136090A (en) * 2012-06-04 2013-12-12 최영진 Apparatus for mending using picture of customer/agent project in e-commerce and method for the same and system for the same
CN105450837A (en) * 2014-08-29 2016-03-30 阿里巴巴集团控股有限公司 Method and apparatus for displaying CDN image adaptively on terminal device
CN107610677A (en) * 2017-10-16 2018-01-19 上海斐讯数据通信技术有限公司 A kind of method and system that dimension of picture is designed according to display terminal

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112905673A (en) * 2021-02-09 2021-06-04 长沙冉星信息科技有限公司 Method for intelligently presenting questionnaire report data on screen
CN112905673B (en) * 2021-02-09 2022-08-09 长沙冉星信息科技有限公司 Method for intelligently presenting questionnaire report data on screen

Similar Documents

Publication Publication Date Title
CN109801347B (en) Method, device, equipment and medium for generating editable image template
CN110458918B (en) Method and device for outputting information
CN103678631A (en) Page rendering method and device
JP6140904B2 (en) Terminal marking method, terminal marking device, program, and recording medium
CN111400998A (en) Text display method and device, electronic equipment and readable storage medium
JP2015115065A (en) Obfuscating page-description language output to thwart conversion to editable format
KR20160113135A (en) Providing print view of document for editing in web-based application
CN111259276A (en) Method and device for displaying title content, electronic equipment and storage medium
CN107247785B (en) Static read-only map file generation method and device
CN113345048A (en) Geographic information image editing method and device and computer equipment
CN112581568A (en) Dynamic poster generation method, device, server and storage medium
US9965446B1 (en) Formatting a content item having a scalable object
CN111428452A (en) Comment data storage method and device
CN115904167A (en) Processing method and device of webpage icon, storage medium and electronic equipment
CN108510424B (en) Image processing method and device
CN111222065B (en) Information display method and device, electronic equipment and medium
CN115016754A (en) Method and device for synchronously displaying pages among devices, electronic device and medium
CN111914226A (en) Background picture generation method and device
CN112464618A (en) Method and device for paging document data, storage medium and electronic equipment
KR101279721B1 (en) Method and system for providing content in augmented reality
CN112613279A (en) File conversion method and device, computer device and readable storage medium
CN109710869B (en) Page display method and device of webpage content, server and storage medium
US9619915B2 (en) Method and apparatus for converting an animated sequence of images into a document page
CN112365402A (en) Intelligent volume assembling method and device, storage medium and electronic equipment
US20070103488A1 (en) Substituting pattern fills

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
RJ01 Rejection of invention patent application after publication

Application publication date: 20200609

RJ01 Rejection of invention patent application after publication