CN106708852A - Client long text display method and apparatus - Google Patents

Client long text display method and apparatus Download PDF

Info

Publication number
CN106708852A
CN106708852A CN201510778535.6A CN201510778535A CN106708852A CN 106708852 A CN106708852 A CN 106708852A CN 201510778535 A CN201510778535 A CN 201510778535A CN 106708852 A CN106708852 A CN 106708852A
Authority
CN
China
Prior art keywords
displaying
template
long text
attribute information
target
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
CN201510778535.6A
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.)
Alibaba Group Holding Ltd
Original Assignee
Alibaba Group Holding 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 Alibaba Group Holding Ltd filed Critical Alibaba Group Holding Ltd
Priority to CN201510778535.6A priority Critical patent/CN106708852A/en
Publication of CN106708852A publication Critical patent/CN106708852A/en
Pending legal-status Critical Current

Links

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
    • G06F16/9577Optimising the visualization of content, e.g. distillation of HTML documents
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/30Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
    • G06F16/34Browsing; Visualisation therefor

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Transfer Between Computers (AREA)
  • User Interface Of Digital Computer (AREA)

Abstract

The invention provides a client long text display method and apparatus. The method comprises the steps of obtaining a display template and attribute information of a target long text after a display instruction is received; adding the attribute information of the target long text to the display template; and rendering the display template according to the attribute information. According to the method and the apparatus, the long text is displayed by adding and rendering the display template, and relatively few memory resources are consumed, so that the long text containing multiple target resources such as pictures, texts, hyperlinks, forms and the like can be displayed efficiently and rationally.

Description

The methods of exhibiting and device of client long text
Technical field
The application is related to field of computer technology, more particularly to a kind of methods of exhibiting of client long text and Device.
Background technology
In information class client software, often to show many information texts, these information texts are not only Content is more long, and be usually directed to picture and text mixing, form displaying, keyword is highlighted, be hyperlinked to other The demands such as the page.Therefore, how efficiently, reasonably to show that this class text has turned into urgently to be resolved hurrily at present Problem.
The content of the invention
In view of this, the application provides a kind of methods of exhibiting and device of client long text.
Specifically, the application is achieved by the following technical solution:
A kind of methods of exhibiting of client long text, methods described includes:
After displaying instruction is received, the attribute information of displaying template and target long text is obtained;
The attribute information of the target long text is added in the displaying template;
The displaying template is rendered according to the attribute information.
Optionally, one or more dummy node is included in the displaying template;
The attribute information by the target long text is added in the displaying template, including:
The preset characters in correspondence dummy node are replaced with the attribute information of the target long text.
Optionally, methods described also includes:
The displaying template is downloaded from template server;
The displaying template is stored in locally;
It is described to obtain displaying template after displaying instruction is received, including:
After the displaying instruction is received, the local displaying template for preserving is obtained.
Optionally, methods described includes:
The related displaying file of the displaying template, the displaying file bag are downloaded from the destination server Include JS files and CSS files;
The displaying file is stored in locally;
It is described that the displaying template is rendered according to the attribute information, including:
The displaying template is rendered according to the attribute information and the related displaying file of the displaying template.
Optionally, one or more target resource is included in the target long text.
The attribute information of the target long text includes:The type of the target resource, URL.
A kind of exhibiting device of client long text, described device includes:
Acquiring unit, after displaying instruction is received, obtains the attribute letter of displaying template and target long text Breath;
Adding device, the attribute information of the target long text is added in the displaying template;
Rendering unit, the displaying template is rendered according to the attribute information.
Optionally, one or more dummy node is included in the displaying template;
The adding device, specifically with the attribute information replacement correspondence dummy node of the target long text Preset characters.
Optionally, described device also includes:
Download unit, the displaying template is downloaded from template server;
Storage unit, the displaying template is stored in locally;
The acquiring unit, specifically after the displaying instruction is received, obtains the local exhibition for preserving Show template.
Optionally, the download unit, further downloads the displaying template phase from the destination server The displaying file of pass, the displaying file includes JS files and CSS files;
, further be stored in the displaying file locally by the storage unit;
The rendering unit, with specific reference to the related displaying text of the attribute information and the displaying template Part renders the displaying template.
Optionally, one or more target resource is included in the target long text.
The attribute information of the target long text includes:The type of the target resource, URL.
By above description as can be seen that the application carries out long text with rendering by the addition to showing template Displaying, the consumption to memory source is less, such that it is able to efficiently, reasonably displaying include picture, text The long text of the plurality of target resource such as word, hyperlink, form.
Brief description of the drawings
Fig. 1 is a kind of stream of the methods of exhibiting of the client long text shown in the exemplary embodiment of the application one Journey schematic diagram.
Fig. 2 is the methods of exhibiting of another client long text shown in the exemplary embodiment of the application one Schematic flow sheet.
Fig. 3 is a kind of exhibiting device for client long text shown in the exemplary embodiment of the application one A structural representation.
Fig. 4 is a kind of knot of the exhibiting device of the client long text shown in the exemplary embodiment of the application one Structure schematic diagram.
Specific embodiment
Here exemplary embodiment will be illustrated in detail, its example is illustrated in the accompanying drawings.Following When description is related to accompanying drawing, unless otherwise indicated, the same numbers in different accompanying drawings represent same or analogous Key element.Implementation method described in following exemplary embodiment does not represent the institute consistent with the application There is implementation method.Conversely, they are only with described in detail in such as appended claims, the application The example of the consistent apparatus and method of a little aspects.
It is the purpose only merely for description specific embodiment in term used in this application, and is not intended to be limiting The application." one kind ", " institute of the singulative used in the application and appended claims State " and " being somebody's turn to do " be also intended to include most forms, unless context clearly shows that other implications.Should also Work as understanding, term "and/or" used herein refers to and associated lists item comprising one or more Purpose any or all may combine.
It will be appreciated that though may describe various using term first, second, third, etc. in the application Information, but these information should not necessarily be limited by these terms.These terms only be used for by same type of information that This is distinguished.For example, in the case where the application scope is not departed from, the first information can also be referred to as Two information, similarly, the second information can also be referred to as the first information.Depending on linguistic context, as in this institute Use word " if " can be construed to " and ... when " or " when ... when " or " response In it is determined that ".
The application provides a kind of exhibition scheme of client long text, by addition and wash with watercolours to showing template Dye, thus efficiently, reasonably show long text.
Fig. 1 is refer to, Fig. 1 is a kind of client long text shown in the exemplary embodiment of the application one The schematic flow sheet of methods of exhibiting, the methods of exhibiting of the client long text may comprise steps of:
Step 101, after displaying instruction is received, obtains the attribute letter of displaying template and target long text Breath.
In the present embodiment, client software receive user for target long text input displaying refer to After order, the target long text can be obtained from service server from the local displaying template for obtaining and preserving Attribute information.
Wherein, can be various types of including picture, word, hyperlink, form etc. in the target long text The target resource of type, the attribute information of the target long text can include each in the target long text The sub- attribute information of target resource, the sub- attribute information of the target resource can include:Target resource Type, URL (Uniform Resource Locator, URL) etc..
Step 102, the attribute information of the target long text is added in the displaying template.
In the present embodiment, one or more dummy node, the pseudo- section are included in the displaying template Point is the node for filling target resource, and default character is configured with the dummy node.
In this step, the default of correspondence dummy node can be replaced with the attribute information of the target long text Character, specifically, can replace right with the sub- attribute information of each target resource in the target long text Answer the preset characters in dummy node.
Step 103, the displaying template is rendered according to the attribute information.
By above description as can be seen that the application carries out long text with rendering by the addition to showing template Displaying, the consumption to memory source is less, such that it is able to efficiently, reasonably displaying include picture, text The long text of the plurality of target resource such as word, hyperlink, form.
Fig. 2 is the methods of exhibiting of another client long text shown in the exemplary embodiment of the application one Schematic flow sheet.
Fig. 2 is refer to, the methods of exhibiting of the client long text may comprise steps of:
Step 201, the displaying file of displaying template and its correlation is downloaded from template server.
In the present embodiment, developer can pre-set displaying template for showing long text and The related displaying file of the displaying template.Wherein, the displaying template can be html templates.It is described Displaying file can include JS (javascript) file, CSS (Cascading Style Sheets, stacking CSS) file required in addition to target long text when the displaying template is rendered such as file.
In the present embodiment, one or more dummy node can be included in the displaying template, it is described Dummy node is the node for filling target resource in target long text, is configured with default in the dummy node Character.As an example it is assumed that including two dummy nodes in the displaying template, a dummy node is Word dummy node for filling word, another dummy node is the picture dummy node for filling picture, Can be then configured with the word dummy node in default first character, and the picture dummy node can be with It is configured with default second character different from first character.
In the present embodiment, developer can preserve the displaying file of the displaying template and its correlation In template server, client can download displaying template and its correlation from the template server Displaying file.
Step 202, the displaying file of the displaying template and its correlation is stored in locally.
Based on abovementioned steps 201, client is downloading the displaying text of the displaying template and its correlation After part, the displaying file of the displaying template and its correlation can be stored in locally, such as:Protect In the presence of in local nonvolatile memory.
Optionally, in one example, client can be when showing that template has renewal, again from template It is original in the local displaying for preserving to replace that server downloads the displaying file of the displaying template and its correlation The displaying file of template and its correlation.
Step 203, after displaying instruction is received, from the local displaying template for obtaining and preserving, from Service server obtains the attribute information of target long text.
In the present embodiment, client receive user for target long text input displaying instruct it Afterwards, can be from the local displaying template for obtaining and preserving, certainly, if locally not yet preserving the exhibition Show template, client can also show template and be stored in local, this Shen from template server acquisition is described Please this is not particularly limited.When there is multiple displaying templates, it is long that client can obtain the target The corresponding displaying template of text,
In the present embodiment, the client server that can also obtain employment obtains the attribute letter of the target long text Breath.Wherein, the target long text can include one or more target resource, the target resource Can be picture, word, hyperlink, form etc..The attribute information of the target long text can be institute The attribute information of each target resource of target long text is stated, in this application, for ease of distinguishing, by mesh The attribute information for marking resource is referred to as sub- attribute information, i.e., the attribute information of described target long text is generally included There is one or more sub- attribute information.Wherein, the sub- attribute information can include:Target resource Type, URL etc..
Step 204, correspondence puppet is saved in replacing the displaying template with the attribute information of the target long text Preset characters in point.
Based on abovementioned steps 203, after the attribute information for getting the target long text, institute can be used State the preset characters during the sub- attribute information in information replaces correspondence dummy node.Still included with showing template There are two dummy nodes, dummy node is the word dummy node for filling word, another dummy node is For being described as a example by the picture dummy node for filling picture, it is assumed that the attribute information of the target long text In include two sub- attribute informations, one be word sub- attribute information, another is the son category of picture Property information, then in this step, with first in the sub- attribute information Alternate text dummy node of the word Character, the second character in picture dummy node is replaced with the sub- attribute information of the picture.
Step 205, the displaying template is rendered according to the attribute information and the displaying file.
Based on abovementioned steps 204, the displaying is finished being replaced with the attribute information of the target long text After preset characters in template in correspondence dummy node, the displaying template is rendered, such as:According to described The URL of target resource obtains target resource in target long text, obtains the local displaying template for preserving Related displaying file, then target resource and the displaying are literary according to the displaying template assembly Part, to show the target long text.
By above description as can be seen that the application carries out long text with rendering by the addition to showing template Displaying, the consumption to memory source is less, such that it is able to efficiently, reasonably displaying include picture, text The long text of the plurality of target resource such as word, hyperlink, form.Meanwhile, the application is in displaying target long article This when, can also be by showing the displaying file for showing that template is related, such as:JS files, realize Target long text and the coordination and interaction of client local function, lift the experience of user.
Embodiment with the methods of exhibiting of foregoing client long text is corresponding, present invention also provides client Hold the embodiment of the exhibiting device of long text.
The embodiment of the exhibiting device of the application client long text can be applied in terminal.Device is implemented Example can be realized by software, it is also possible to be realized by way of hardware or software and hardware combining.With software As a example by realization, used as the device on a logical meaning, being will be non-easy by the processor of terminal where it Corresponding computer program instructions run what is formed in reading internal memory in the property lost memory.From hardware view For, as shown in figure 3, a kind of hardware of the exhibiting device place terminal for the application client long text Structure chart, except the processor shown in Fig. 3, internal memory, network interface and nonvolatile memory it Outward, the terminal in embodiment where device can also include other generally according to the actual functional capability of the terminal Hardware, repeats no more to this.
Fig. 4 is a kind of knot of the exhibiting device of the client long text shown in the exemplary embodiment of the application one Structure schematic diagram.
Fig. 4 is refer to, the exhibiting device 300 of the client long text can include:Acquiring unit 301, Adding device 302, rendering unit 303, download unit 304 and storage unit 305.
Wherein, the acquiring unit 301, after displaying instruction is received, obtains displaying template and target The attribute information of long text;
The adding device 302, the displaying template is added to by the attribute information of the target long text In;
The rendering unit 303, the displaying template is rendered according to the attribute information.
Optionally, one or more dummy node is included in the displaying template;
The adding device 302, specifically replaces correspondence dummy node with the attribute information of the target long text In preset characters.
The download unit 304, the displaying template is downloaded from template server;
The storage unit 305, the displaying template is stored in locally;
The acquiring unit 301, specifically after the displaying instruction is received, obtains the local institute for preserving State displaying template.
Optionally, the download unit 304, further downloads the displaying mould from the destination server The related displaying file of plate, the displaying file includes JS files and CSS files;
, further be stored in the displaying file locally by the storage unit 305;
The rendering unit 303, with specific reference to the attribute information and the related exhibition of the displaying template Show that file renders the displaying template.
Optionally, one or more target resource is included in the target long text.
The attribute information of the target long text includes:The type of the target resource, URL.
The function of unit and the implementation process of effect specifically refer to correspondence in the above method in said apparatus The implementation process of step, will not be repeated here.
For device embodiment, because it corresponds essentially to embodiment of the method, so related part ginseng See the part explanation of embodiment of the method.Device embodiment described above be only it is schematical, It is wherein described as separating component illustrate unit can be or may not be it is physically separate, make For the part that unit shows can be or may not be physical location, you can with positioned at a place, Or can also be distributed on multiple NEs.Can select according to the actual needs part therein or Person whole modules realize the purpose of application scheme.Those of ordinary skill in the art are not paying creativeness In the case of work, you can to understand and implement.
The preferred embodiment of the application is the foregoing is only, is not used to limit the application, it is all at this Within the spirit and principle of application, any modification, equivalent substitution and improvements done etc. should be included in Within the scope of the application protection.

Claims (10)

1. a kind of methods of exhibiting of client long text, it is characterised in that methods described includes:
After displaying instruction is received, the attribute information of displaying template and target long text is obtained;
The attribute information of the target long text is added in the displaying template;
The displaying template is rendered according to the attribute information.
2. method according to claim 1, it is characterised in that
One or more dummy node is included in the displaying template;
The attribute information by the target long text is added in the displaying template, including:
The preset characters in correspondence dummy node are replaced with the attribute information of the target long text.
3. method according to claim 1, it is characterised in that methods described also includes:
The displaying template is downloaded from template server;
The displaying template is stored in locally;
It is described to obtain displaying template after displaying instruction is received, including:
After the displaying instruction is received, the local displaying template for preserving is obtained.
4. method according to claim 3, it is characterised in that methods described includes:
The related displaying file of the displaying template, the displaying file bag are downloaded from the destination server Include JS files and CSS files;
The displaying file is stored in locally;
It is described that the displaying template is rendered according to the attribute information, including:
The displaying template is rendered according to the attribute information and the related displaying file of the displaying template.
5. method according to claim 1, it is characterised in that
One or more target resource is included in the target long text.
The attribute information of the target long text includes:The type of the target resource, URL.
6. a kind of exhibiting device of client long text, it is characterised in that described device includes:
Acquiring unit, after displaying instruction is received, obtains the attribute letter of displaying template and target long text Breath;
Adding device, the attribute information of the target long text is added in the displaying template;
Rendering unit, the displaying template is rendered according to the attribute information.
7. device according to claim 6, it is characterised in that
One or more dummy node is included in the displaying template;
The adding device, specifically with the attribute information replacement correspondence dummy node of the target long text Preset characters.
8. device according to claim 6, it is characterised in that described device also includes:
Download unit, the displaying template is downloaded from template server;
Storage unit, the displaying template is stored in locally;
The acquiring unit, specifically after the displaying instruction is received, obtains the local exhibition for preserving Show template.
9. device according to claim 8, it is characterised in that
The download unit, further downloads the related displaying of the displaying template from the destination server File, the displaying file includes JS files and CSS files;
, further be stored in the displaying file locally by the storage unit;
The rendering unit, with specific reference to the related displaying text of the attribute information and the displaying template Part renders the displaying template.
10. device according to claim 6, it is characterised in that
One or more target resource is included in the target long text.
The attribute information of the target long text includes:The type of the target resource, URL.
CN201510778535.6A 2015-11-13 2015-11-13 Client long text display method and apparatus Pending CN106708852A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510778535.6A CN106708852A (en) 2015-11-13 2015-11-13 Client long text display method and apparatus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510778535.6A CN106708852A (en) 2015-11-13 2015-11-13 Client long text display method and apparatus

Publications (1)

Publication Number Publication Date
CN106708852A true CN106708852A (en) 2017-05-24

Family

ID=58931333

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510778535.6A Pending CN106708852A (en) 2015-11-13 2015-11-13 Client long text display method and apparatus

Country Status (1)

Country Link
CN (1) CN106708852A (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102467834A (en) * 2010-11-11 2012-05-23 英业达股份有限公司 Text learning system and method thereof
CN102789484A (en) * 2012-06-28 2012-11-21 奇智软件(北京)有限公司 Method and device for webpage information processing
CN104461484A (en) * 2013-09-16 2015-03-25 腾讯科技(深圳)有限公司 Front-end template implementation method and device
CN104572822A (en) * 2014-12-04 2015-04-29 百度在线网络技术(北京)有限公司 Method and device for displaying text
CN104603752A (en) * 2012-09-05 2015-05-06 微软公司 Sharing application code across platforms

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102467834A (en) * 2010-11-11 2012-05-23 英业达股份有限公司 Text learning system and method thereof
CN102789484A (en) * 2012-06-28 2012-11-21 奇智软件(北京)有限公司 Method and device for webpage information processing
CN104603752A (en) * 2012-09-05 2015-05-06 微软公司 Sharing application code across platforms
CN104461484A (en) * 2013-09-16 2015-03-25 腾讯科技(深圳)有限公司 Front-end template implementation method and device
CN104572822A (en) * 2014-12-04 2015-04-29 百度在线网络技术(北京)有限公司 Method and device for displaying text

Similar Documents

Publication Publication Date Title
US7730409B2 (en) Method and system for visualizing weblog social network communities
US10542123B2 (en) System and method for generating and monitoring feedback of a published webpage as implemented on a remote client
US9104775B2 (en) Method for presenting a web page
CN104360882B (en) Display methods and device are carried out to picture in webpage in a kind of browser
CN106484383A (en) page rendering method, device and equipment
US10182169B2 (en) Information processing apparatus, information processing method, and non-transitory recording medium
CN105094775B (en) Webpage generation method and device
CN112507273A (en) Webpage generating method and device and electronic equipment
CN114417226A (en) Page generation method, display method, device, electronic equipment and storage medium
CN109558123A (en) The method of webpage conversion electrons book, electronic equipment, storage medium
CN108134906A (en) Image processing method and its system
CN107147732A (en) Image processing method, device, client and service end
CN105373560A (en) On-line showing method of publication page
US11227305B2 (en) Graphical system for database marketing
CN107423051B (en) Data configuration method and device
CN100592300C (en) Data display method and device
CN107463573B (en) Content information providing method, device, browser, electronic device and server
CN106708852A (en) Client long text display method and apparatus
Radford Learning Web Development with Bootstrap and AngularJS
Dutson Responsive mobile design: Designing for every device
JP5695781B1 (en) Program, system, and method for introducing digital content
KR102213871B1 (en) System and method for advertisement delivery, and apparatus applied to the same
CN113805886A (en) Page creating method, device and system, computer device and storage medium
CN110795922B (en) Form information display method and device for PDF document and electronic equipment
CN106598933A (en) Method and device for proofreading typeset file based on web page

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20170524