CN110110073B - Character display method and device - Google Patents

Character display method and device Download PDF

Info

Publication number
CN110110073B
CN110110073B CN201810076667.8A CN201810076667A CN110110073B CN 110110073 B CN110110073 B CN 110110073B CN 201810076667 A CN201810076667 A CN 201810076667A CN 110110073 B CN110110073 B CN 110110073B
Authority
CN
China
Prior art keywords
style
displayed
character
text
file
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201810076667.8A
Other languages
Chinese (zh)
Other versions
CN110110073A (en
Inventor
冀凤杰
何以然
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Gaode Yuntu Technology Co ltd
Original Assignee
Beijing Gaode Yuntu 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 Gaode Yuntu Technology Co ltd filed Critical Beijing Gaode Yuntu Technology Co ltd
Priority to CN201810076667.8A priority Critical patent/CN110110073B/en
Publication of CN110110073A publication Critical patent/CN110110073A/en
Application granted granted Critical
Publication of CN110110073B publication Critical patent/CN110110073B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • 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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/10Text processing
    • G06F40/12Use of codes for handling textual entities
    • G06F40/151Transformation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/10Text processing
    • G06F40/166Editing, e.g. inserting or deleting

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • Computational Linguistics (AREA)
  • General Health & Medical Sciences (AREA)
  • Health & Medical Sciences (AREA)
  • Artificial Intelligence (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Information Transfer Between Computers (AREA)
  • User Interface Of Digital Computer (AREA)

Abstract

The invention discloses a character display method and device. The main technical scheme of the invention is as follows: the front end acquires the character information to be displayed and the style file corresponding to the character information to be displayed, and transmits the character information to be displayed and the style file to the style engine; the style engine analyzes the character style in the style file into a client terminal character style, associates the character information to be displayed with the client terminal character style corresponding to the character information and transmits the associated character information to the client terminal; and the client converts the client character style associated with the character information to be displayed into a system character style, and calls an operating system of the terminal to display the corresponding character information to be displayed according to the system character style. The technical scheme of the invention is mainly used for character display in the application program.

Description

Character display method and device
Technical Field
The invention relates to the technical field of character display, in particular to a character display method and device.
Background
As shown in fig. 1, the text display of the application includes a requirement of displaying text in rows, a requirement of displaying text in an ellipsis added manner when the text cannot be displayed, and the like. In the prior art, word presentation is usually implemented by using JavaScript on a presentation layer which is easy for a user to perceive, and the inventor finds that this may cause a response speed of an application program to be reduced.
Disclosure of Invention
In view of the above problems, the present invention provides a method and an apparatus for displaying characters, and mainly aims to improve the response speed of an application program.
In order to achieve the purpose, the invention mainly provides the following technical scheme:
in one aspect, the present invention provides a text display method, specifically including:
the front end acquires the character information to be displayed and the style file corresponding to the character information to be displayed, and transmits the character information to be displayed and the style file to the style engine;
the style engine analyzes the character style in the style file into a client terminal character style, associates the character information to be displayed with the client terminal character style corresponding to the character information and transmits the associated character information to the client terminal;
and the client converts the client character style associated with the character information to be displayed into a system character style, and calls an operating system of the terminal to display the corresponding character information to be displayed according to the system character style.
In another aspect, the present invention provides a text display device, which specifically includes:
the front end is used for acquiring character information to be displayed and a style file corresponding to the character information to be displayed, and transmitting the character information to be displayed and the style file to a style engine;
the style engine is used for analyzing the character style in the style file into a client terminal character style, and transmitting the character information to be displayed to the client terminal after associating the character information with the client terminal character style corresponding to the character information;
and the client is used for converting the client character style associated with the character information to be displayed into a system character style and calling an operating system of the terminal to display the corresponding character information to be displayed according to the system character style.
In another aspect, the present invention provides a storage medium, where the storage medium includes a stored program, where the program controls, when running, a device on which the storage medium is located to execute the text display method according to the first aspect.
In another aspect, the present invention provides a processor, where the processor is configured to execute a program, where the program executes the text display method according to the first aspect.
By means of the technical scheme, when the character information is displayed by the application, the acquired character information to be displayed and the corresponding style file are sent to the style engine through the front end, the style file is analyzed by the style engine to obtain the client character style which can be identified by the client, the client character style is associated with the character information to be displayed and is sent to the client, finally, the client converts the client character style into the system character style used in the terminal operating system, and the character information to be displayed is displayed by calling the operating system. Compared with the prior art that the characters are displayed on the presentation layer, the invention introduces the style engine, realizes the operation of calling the operating system to execute the characters display operation by the client by analyzing the characters style in the style file and converting the characters style into the client character style which can be recognized by the client, and compared with the presentation layer which is easy to be perceived by the user, the style engine can not be directly perceived by the general user, and the part which can not be directly perceived by the user can be developed by adopting C/C + + language, the function developed by adopting C/C + + language has faster response speed than the function developed by adopting JavaScript, furthermore, by adopting the technical scheme provided by the invention, the operation executed by the application program mainly lies in the transfer of the character style, the method and the device do not need to perform specific display operation on the characters, so that the requirement on processing resources is greatly reduced, and the running speed of the application program is increased.
In addition, the client receives the client character style transmitted by the style engine through the client and converts the client character style into the system character style recognizable by the terminal operating system, and the client has the function of converting the character style displayed in the application program into the style recognized by the operating system, so that different development work does not need to be carried out aiming at different terminal operating systems by adopting the technical scheme provided by the invention, and the development and maintenance cost of the application program is reduced.
The foregoing description is only an overview of the technical solutions of the present invention, and the embodiments of the present invention are described below in order to make the technical means of the present invention more clearly understood and to make the above and other objects, features, and advantages of the present invention more clearly understandable.
Drawings
Various other advantages and benefits will become apparent to those of ordinary skill in the art upon reading the following detailed description of the preferred embodiments. The drawings are only for purposes of illustrating the preferred embodiments and are not to be construed as limiting the invention. Also, like reference numerals are used to refer to like parts throughout the drawings. In the drawings:
FIG. 1 illustrates an effect diagram of a text presentation in an existing application page;
FIG. 2 is a schematic diagram of an application;
fig. 3 is a flowchart illustrating a text display method according to an embodiment of the present invention;
FIG. 4 is a flow chart showing an interaction of another text presentation method according to an embodiment of the present invention;
fig. 5 is a block diagram illustrating a text display apparatus according to an embodiment of the present invention.
Detailed Description
Exemplary embodiments of the present invention will be described in more detail below with reference to the accompanying drawings. While exemplary embodiments of the invention are shown in the drawings, it should be understood that the invention can be embodied in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the invention to those skilled in the art.
The embodiment of the invention provides a character display method which is mainly applied to an intelligent terminal and used for quickly displaying character information in an application program (APP). The method is executed by the front end of the application program, the style engine and the client. The structure of a typical application program at present is mainly divided into three layers, which are respectively: a presentation layer, a business logic layer, and a database layer. As shown in fig. 2, the front end and the client end are generally located in the presentation layer of the application program, the front end includes front end design and development of the application program, the front end design can be generally understood as visual design of a page, and the front end development is realized by aiming at codes of the page; the client displays specific information and functions in the application to a user mainly by calling an operating system in the terminal; the style engine is generally set in a business logic layer of an application program, and in this embodiment, the style engine is mainly used for processing style files. The specific steps of this embodiment are shown in fig. 3, and include:
101. the method comprises the steps of obtaining character information to be displayed and a style file corresponding to the character information to be displayed, and transmitting the character information to be displayed and the style file to a style engine.
The step is executed by the front end, wherein the text information to be displayed comprises text content and related labels which need to be displayed in an interface of an application program in the embodiment of the invention, the style file at least records text styles, and the text styles can comprise: the font, the font size, the color, the space between the characters, the line space and the symbols for replacing the characters when the characters can not be completely displayed.
In practical applications, even the text in the same page may need a plurality of text styles. As shown in fig. 1, "why is the exhibition period of the art gallery in beijing city short? The style of "may be different from the style of" central art institute "or" UC headline ", for example," why is the exhibition period of the art gallery in beijing city short? The font color is black, and the font color of the UC head bar is light gray. Therefore, different text styles are preset for different text information, and the text styles are stored in the style file. Therefore, the front end acquires the text information to be displayed and simultaneously acquires the style file corresponding to the text information to be displayed. Generally, the text information to be displayed is generally determined by a page display requirement, that is, when an application program displays a page, the front end receives the text information to be displayed, which needs to be displayed in the page, and at the same time, the front end needs to acquire a style file corresponding to the text information to be displayed, and transmit the acquired data information to a style engine. In practical application, the text information to be displayed received by the front end may be returned by the server of the application program, or may be generated locally by the application program in the terminal device.
102. And analyzing the text style in the style file into a client text style, associating the text information to be displayed with the client text style corresponding to the text information to be displayed, and transmitting the associated text information to the client.
The step is executed by the style engine, and the character style in the style file acquired by the front end is converted into the client character style which can be identified by the client through the analysis of the style engine. When the technical scheme provided by the invention is adopted to develop the application program, the front end and the pattern engine need to agree on a protocol for transmitting the text information and the pattern file to be displayed so as to ensure that the front end can organize and transmit the text information and the pattern file to be displayed according to a mode known by the pattern engine, and the pattern engine can correctly analyze which text information is to be displayed and which text file is to be displayed after receiving data sent by the front end.
Then, the style engine needs to transmit data to the client, so a protocol for transmitting the text information to be displayed and the text style needs to be defined between the style engine and the client, the text style in the style file is converted into the text style of the client recognized by the client according to the protocol by the style engine, and meanwhile, the style engine needs to associate the text information to be displayed and the corresponding text style of the client, namely, the text style of the client is connected to the corresponding text information to be displayed.
103. And converting the client-side character style related to the character information to be displayed into a system character style, and calling an operating system of the terminal to display the corresponding character information to be displayed according to the system character style.
The method is executed by a client, and after receiving the text information to be displayed and the associated text style of the client, the client executes the following two steps:
first, a client side text style is converted into a system text style. The system character style refers to a character style used by an operating system installed in a terminal for installing the application program. For example, the current common operating systems of smart phones include an IOS system and an Android system, system text styles used by different operating systems are different, and in order to be compatible with various operating systems, the existing application programs need to develop application programs of different versions for different operating systems, but the client can convert the client text style into the system text style, that is, the client can convert the client text style into the system text style which can be recognized by the operating system based on the current operating system of the terminal. Therefore, the method provided by the invention does not need to develop application programs with different versions aiming at different operating systems.
And secondly, calling an operating system to display the characters. The calling of the operating system is realized by calling an API (Application Programming Interface) exposed by the operating system to the Application program. Because the character style corresponding to the character information to be displayed is converted into the system character style which can be identified by the operating system, the rendering operation of the character information to be displayed can be realized by using system resources by calling the operating system to expose the application program to the api interface related to character display, and the character information does not need to be processed by using the running resources of the application program.
It can be seen from the specific implementation manner in the foregoing embodiment that, in the text display method provided in the embodiment of the present invention, by adding a style engine to an application program, a text style in a style file acquired at a front end is converted into a client text style that can be recognized by a client, and the client converts the client text style into a system text style that can be recognized by a terminal operating system again, so that finally, an operating system displays text information to be displayed in an application according to the system text style. Therefore, compared with the existing processing mode of carrying out text display at the front end, the embodiment of the invention transfers the operation of text display to the client for execution from the front end through format conversion and transmission of text style data, and carries out display operations such as rendering and the like on text information to be displayed in a system text style by calling the terminal operating system, thereby avoiding the complex operation steps required to be executed for directly displaying the text at the front end, and further improving the execution and response speed of the application program. Meanwhile, when the embodiment of the invention is executed, because the display of the characters converts the character style into the system character style and then calls the operating system to perform the display operation, the embodiment does not need to perform different development work aiming at different terminal operating systems during the character display, thereby reducing the research and development and maintenance cost of the application program.
In order to further explain the text display method in detail, the embodiment of the present invention will be described with reference to fig. 4 for specific steps performed by the application program when displaying text in the interface. As shown in fig. 4, this embodiment will focus on the processing process of the front end 201, the style engine 202, and the client 203 for the text style and the data interaction process among the three when performing the text display operation:
firstly, in the running process of the application program, the front end 201 acquires the text information to be displayed, and meanwhile, acquires the style file corresponding to the text information to be displayed according to the type label in the text information to be displayed.
In the present invention, the type tag may include: title, text, etc. For characters, the association degree between the style of the characters and the type of the characters is higher, so that the character style obtained in the style file has an association relationship with the type label of the characters. Further, as shown in fig. 1, the text needs to be displayed together with the picture in some cases, and therefore, the style file provided by the present invention not only records the text style but also includes the picture style, so that in practical application, not only the type label of the text information to be displayed needs to be considered, but also the requirements of other elements to be displayed need to be comprehensively screened. For example, when displaying text and pictures simultaneously, the display requirements of the pictures need to be considered comprehensively.
Second, after the front end 201 completes the above processing of the text information to be displayed and the corresponding style file, the front end 201 will transmit the text information to be displayed and the corresponding style file to the style engine 202 for processing.
Specifically, the embodiment will be described with respect to the difference in the number of the text messages to be displayed, which can be divided into two cases of acquiring one text message to be displayed or acquiring two or more text messages to be displayed:
1. when a piece of text information to be displayed is acquired, the acquired style file is also generally one.
2. When two or more pieces of text information to be displayed are acquired, the front end generally acquires more than one style file.
No matter one piece of character information to be displayed or two or more pieces of character information to be displayed, the front end stores the character information to be displayed as a file and stores the style file as a file to be transmitted to the style engine. It should be noted that although the text information to be displayed and the style file are transmitted to the style engine through different files, the text information to be displayed and the style file still have a corresponding relationship, and the present invention does not limit the association manner of the corresponding relationship, for example, the text information to be displayed and the style file may be recorded in different files according to the same sequence, so that the corresponding relationship is formed between the text information to be displayed and the style file, or the corresponding relationship between the text information to be displayed and the style file may be determined by marking identifiers in the text information to be displayed and the style file, and the present invention does not limit any scope.
As described above, the front end transmits the text information to be displayed and the style file to the style engine through the two files, but the invention does not limit the transmission sequence of the two files. Of course, in other embodiments, the text information to be displayed and the style file may be sequentially sent in groups according to the corresponding relationship therebetween, without affecting the implementation of the present invention. The specific transmission mode can define a uniform transmission strategy according to actual needs, and the front end executes the transmission strategy according to the corresponding strategy.
Thirdly, the style engine 202 receives the text information to be displayed and the corresponding style file, analyzes the text style in the style file into the text style of the client by using a preset style packaging library, and associates the text information to be displayed and the text style of the client corresponding to the text information to be displayed.
The style engine 202 is configured to analyze a text style in the style file by using a preset style encapsulation library, where the style encapsulation library is preset in an application program and is mainly used to analyze specific style fields in the text style and values corresponding to the fields in the process of obtaining a text style of the client. For example, the style parameters of the text style, including the font size, color, and spacing, and the corresponding values of the parameters, can be determined through the analysis of the style packaging library. Meanwhile, after the corresponding character patterns are analyzed, the pattern parameters are converted into contents which can be identified by the client according to the preset corresponding relation, and therefore a new client character pattern is generated.
In addition, after the style engine 202 completes the conversion operation, the obtained text style of the client is associated with the text information to be displayed. The style engine has a corresponding relation with each other when receiving the text information to be displayed and the style file. Moreover, the client text style is generated based on the text style in the style file, so the style engine 202 may associate the obtained client text style with the text information to be displayed corresponding to the style file, where the association is to exist together with the text information to be displayed and the corresponding client text style.
Fourth, after completing the data conversion and data association operations, the style engine 202 stores the text information to be displayed and the client text style as one file and sends the file to the client 203, that is, two files are sent to the style engine by the front end, one file records the text information to be displayed, and one file records the style file, but the file sent to the client by the style engine records both the text information to be displayed and the client text style corresponding to the file. And for the condition of two or more pieces of character information to be displayed, storing each piece of character information to be displayed and the corresponding character style of the client as a file and then sending the file to the client. That is, the front end sends to the style engine two files, a file recorded with a plurality of pieces of text information to be displayed and a file recorded with a plurality of style files, the number of files sent to the client by the style engine is the same as the number of text information to be displayed, and each file is recorded with the text information to be displayed and the corresponding text style of the client.
Therefore, compared with the front end which transmits the text information to be displayed and the related data of the corresponding text style, the style engine adopts different transmission modes, the style engine separates the content in a file of the text information to be displayed and a file of a recording style file which are transmitted by the front end, and recombines each piece of text information to be displayed and the corresponding client text style into one file according to the incidence relation to transmit the file to the client.
Fifthly, the client 203 converts the client text style associated with the text information to be displayed into a system text style, and calls an operating system of the terminal to display the corresponding text information to be displayed according to the system text style. Since this step is the same as step 103 in the embodiment of fig. 3, it is performed by the client. Therefore, the content will not be specifically described here.
The above description is directed to the preferred embodiment of the present invention when the front end 201, the style engine 202, and the client 203 perform the text display operation, and the following description is given with reference to specific examples:
when a piece of text information and a style file are processed, the front end obtains { text }, { color: black, and linecold: 2}, and transmits the two files to a style engine; analyzing a style file by a style engine to obtain { xxxxxcolor: black, xxxxxxlineeclamp: 2}, namely a client text style which can be identified by a client, simultaneously storing { text } into a container, extracting the coordinates of the container, and transmitting the coordinates and the client text style to the client; finally, the client converts the client character style into {. x _ color {% black% # [,. x _ linechlamp: 2% # }, namely a system character style, and meanwhile, the terminal operating system is used for rendering and displaying the { character } in the container by calling the system API interface.
Correspondingly, when a plurality of pieces of character information and a plurality of style files are processed, taking two as examples, the front end acquires the character 1, the corresponding style files are color, black, lineplay, 2 and character 2, and the corresponding style files are color, blue and lineplay, 3; and the front end will send { word 1; text 2 and color black, linecold 2; two files, i.e. color, linecalamp, 3, are transmitted to the style engine; after the style engine is analyzed, the obtained container coordinates of { xxxxxcolor: black, xxxxxxlineeclamp: 2} and { character 1} and container coordinates of { xxxxxcolor: blue, xxxxxxlineeclamp: 3} and { character 2} are combined and transmitted to the client; finally, the client converts the text style of the client into a system text style which can be identified by the operating system, and calls the operating system to perform text display operation, wherein the operation at the moment is the same as the process of processing one text message, and is not repeated.
As can be seen from the implementation manner of the embodiment illustrated in fig. 4 and the preferred embodiment, the embodiment of the present invention emphasizes how the front end obtains the corresponding style file according to the text information to be displayed; the style engine is how to analyze the style file into the client terminal text style, and the front end and the style engine are different in transmitting the text information to be displayed and the corresponding related text style data. Through the description of the embodiment, the style file is processed by the style engine and the client side and finally converted into the system text style which can be identified by the operating system, and the client side calls the operating system to execute the display operation of the text information. The text information is displayed by calling the operating system, so that for the application program, a large amount of development work aiming at the text information display at the front end is saved, and when the text display is carried out, the front end does not need to carry out the display operation of a large amount of text information, the execution step of the front end is simplified, the front end can respond to the operation of a user more efficiently, and the running speed of the application program and the application experience of the user are improved.
Further, as an implementation of the method shown in fig. 3 and fig. 4, an embodiment of the present invention provides a text display device, where the text display device is applied to quickly display text information in an application program on an intelligent terminal. For convenience of reading, details in the foregoing method embodiments are not described in detail again in this apparatus embodiment, but it should be clear that the apparatus in this embodiment can correspondingly implement all the contents in the foregoing method embodiments. The structure of the device is specifically shown in fig. 5, and specifically comprises:
the front end 31 is configured to obtain text information to be displayed and a style file corresponding to the text information to be displayed, and transmit the text information to be displayed and the style file to the style engine 32.
In practical applications, the front end 31 specifically includes: an obtaining module 311 and a sending module 312, wherein the obtaining module 311 is specifically configured to obtain text information to be displayed and a style file corresponding to the text information to be displayed, and the sending module 312 is specifically configured to transmit the text information to be displayed and the style file to the style engine 32
And the style engine 32 is configured to analyze the text style in the style file into a client text style, associate the text information to be displayed with the client text style corresponding to the text information, and transmit the associated text information to the client 33.
In practical applications, the style engine 32 specifically includes: an analysis module 321 and a transmission module 322, where the analysis module 321 is configured to analyze the text style in the style file into a client text style, and the transmission module 322 is configured to associate the text information to be displayed with the client text style corresponding to the text information to be displayed and transmit the associated text information to the client 33.
The client 33 is configured to convert the client text style associated with the text information to be displayed into a system text style, and invoke the operating system of the terminal to display the corresponding text information to be displayed according to the system text style.
In practical applications, the client 33 specifically includes: the conversion module 331 and the calling module 332, wherein the conversion module 331 is configured to convert a client text style associated with text information to be displayed into a system text style, and the calling module 332 is configured to call an operating system of the terminal to display corresponding text information to be displayed according to the system text style.
Further, preferably, the process of acquiring the style file corresponding to the text information to be displayed by the acquiring module 311 specifically includes:
and acquiring a style file associated with the type label in the text information to be displayed from a pre-stored style file packet as a style file corresponding to the text information to be displayed.
Further, preferably, the process of analyzing the text style in the style file into the client text style by the analyzing module 321 specifically includes:
and analyzing the text styles in the style files into client text styles by using a preset style packaging library.
Further, preferably, the process of transmitting the text information to be displayed and the style file to the style engine by the sending module 312 specifically includes:
and storing the text information to be displayed into a file and storing the style file into a file, and respectively transmitting the file to the style engine.
Further, preferably, the process of transmitting the text information to be displayed and the text style of the client corresponding to the text information to be displayed to the client after the text information to be displayed is associated by the transmission module 322 specifically includes:
and storing the text information to be displayed and the corresponding text style of the client as a file and transmitting the file to the client.
To sum up, when rendering and displaying characters in an application program, the method and the device for displaying characters adopted in the embodiments of the present invention send acquired to-be-displayed character information and a style file corresponding to the acquired to-be-displayed character information to a style engine through a front end in the application, the style engine analyzes the style file to obtain a client character style that can be identified by a client, associates the client character style with the to-be-displayed character information, and sends the client character style to the client together, and finally, the client converts the client character style into a system character style used in a terminal operating system and displays the to-be-displayed character information by calling the operating system. Compared with the prior art that the characters are displayed on the presentation layer, the embodiment of the invention realizes that the client calls the operating system to execute the character display operation by introducing the style engine to analyze the character style in the style file and converting the character style into the client character style which can be recognized by the client, and compared with the presentation layer which is easy to be perceived by the user, the style engine can not be directly perceived by the general user, and the part which can not be directly perceived by the user can be developed by adopting C/C + + language, the function developed by adopting C/C + + language has faster response speed than the function developed by adopting JavaScript, furthermore, by adopting the technical scheme provided by the invention, the operation executed by the application program mainly lies in the transfer of the character style, the method and the device do not need to perform specific display operation on the characters, so that the requirement on processing resources is greatly reduced, and the running speed of the application program is increased.
In addition, by adopting the character display method and the character display device used by the embodiment of the invention, the running speed of the application program can be improved, the client terminal character style transmitted by the style engine is received by the client terminal and then converted into the system character style recognizable by the terminal operating system to display the characters, and the client terminal has the function of converting the character style displayed in the application program into the style recognized by the operating system, so that different development work for different terminal operating systems is not required by adopting the technical scheme provided by the invention, and the development and maintenance cost of the application program is reduced.
Further, an embodiment of the present invention further provides a storage medium, where the storage medium includes a stored program, where the program, when running, controls a device where the storage medium is located to execute the text display method provided by the present invention.
In addition, the embodiment of the invention also provides a processor, wherein the processor is used for running a program, and the character display method provided by the invention is executed when the program runs.
In the foregoing embodiments, the descriptions of the respective embodiments have respective emphasis, and for parts that are not described in detail in a certain embodiment, reference may be made to related descriptions of other embodiments.
It will be appreciated that the relevant features of the method and apparatus described above are referred to one another. In addition, "first", "second", and the like in the above embodiments are for distinguishing the embodiments, and do not represent merits of the embodiments.
It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described systems, apparatuses and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
The algorithms and displays presented herein are not inherently related to any particular computer, virtual machine, or other apparatus. Various general purpose systems may also be used with the teachings herein. The required structure for constructing such a system will be apparent from the description above. Moreover, the present invention is not directed to any particular programming language. It is appreciated that a variety of programming languages may be used to implement the teachings of the present invention as described herein, and any descriptions of specific languages are provided above to disclose the best mode of the invention.
In addition, the memory may include volatile memory in a computer readable medium, Random Access Memory (RAM) and/or nonvolatile memory such as Read Only Memory (ROM) or flash memory (flash RAM), and the memory includes at least one memory chip.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
In a typical configuration, a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include forms of volatile memory in a computer readable medium, Random Access Memory (RAM) and/or non-volatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM). The memory is an example of a computer-readable medium.
Computer-readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), Read Only Memory (ROM), Electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), Digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information that can be accessed by a computing device. As defined herein, a computer readable medium does not include a transitory computer readable medium such as a modulated data signal and a carrier wave.
It should also be noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in the process, method, article, or apparatus that comprises the element.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The above are merely examples of the present application and are not intended to limit the present application. Various modifications and changes may occur to those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the scope of the claims of the present application.

Claims (9)

1. A method for displaying characters is characterized by comprising the following steps:
the front end acquires the character information to be displayed and the style file corresponding to the character information to be displayed, and transmits the character information to be displayed and the style file to the style engine;
the style engine analyzes the character style in the style file into a client terminal character style, associates the character information to be displayed with the client terminal character style corresponding to the character information and transmits the associated character information to the client terminal;
the client converts the client character style related to the character information to be displayed into a system character style, and calls an operating system of the terminal to display the corresponding character information to be displayed according to the system character style, wherein the system character style refers to a character style used by the operating system carried by the terminal for installing the application program;
the step of transmitting the style file and the text information to be displayed to a style engine specifically comprises the following steps:
and storing the text information to be displayed into a file and storing the style file into a file, and respectively transmitting the file to the style engine.
2. The method according to claim 1, wherein the obtaining of the style file corresponding to the text information to be displayed specifically comprises:
and acquiring a style file associated with the type label in the text information to be displayed from a pre-stored style file packet as a style file corresponding to the text information to be displayed.
3. The method according to claim 1 or 2, wherein parsing the text styles in the style file into client text styles specifically comprises:
and analyzing the text styles in the style files into client text styles by using a preset style packaging library.
4. The method according to claim 1, wherein the transmitting the text information to be displayed to the client after being associated with the corresponding client text style specifically comprises:
and storing the text information to be displayed and the corresponding text style of the client as a file package and transmitting the file package to the client.
5. A text display apparatus, the apparatus comprising:
the front end is used for acquiring the character information to be displayed and the style file corresponding to the character information to be displayed, and transmitting the character information to be displayed and the style file to the style engine, and the front end specifically comprises the following steps: storing the text information to be displayed into a file and storing the style file into a file, and respectively transmitting the file to the style engine;
the style engine is used for analyzing the character style in the style file into a client terminal character style, and transmitting the character information to be displayed to the client terminal after associating the character information with the client terminal character style corresponding to the character information;
the client is used for converting the client character style related to the character information to be displayed into a system character style, and calling the operating system of the terminal to display the corresponding character information to be displayed according to the system character style, wherein the system character style refers to the character style used by the operating system carried by the terminal for installing the application program.
6. The apparatus according to claim 5, wherein the process of the front end obtaining the style file corresponding to the text information to be displayed specifically comprises:
and acquiring a style file associated with the type label in the text information to be displayed from a pre-stored style file packet as a style file corresponding to the text information to be displayed.
7. The apparatus according to claim 5 or 6, wherein the process of the style engine parsing the text styles in the style file into client text styles specifically comprises:
and analyzing the text styles in the style files into client text styles by using a preset style packaging library.
8. A storage medium, characterized in that the storage medium comprises a stored program, wherein the program controls a terminal where the storage medium is located to execute the text display method according to any one of claims 1-4 when running.
9. A processor, configured to run a program, wherein the program is configured to execute the text presentation method according to any one of claims 1 to 4 when the program is run.
CN201810076667.8A 2018-01-26 2018-01-26 Character display method and device Active CN110110073B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810076667.8A CN110110073B (en) 2018-01-26 2018-01-26 Character display method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810076667.8A CN110110073B (en) 2018-01-26 2018-01-26 Character display method and device

Publications (2)

Publication Number Publication Date
CN110110073A CN110110073A (en) 2019-08-09
CN110110073B true CN110110073B (en) 2021-07-23

Family

ID=67483138

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810076667.8A Active CN110110073B (en) 2018-01-26 2018-01-26 Character display method and device

Country Status (1)

Country Link
CN (1) CN110110073B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113176923A (en) * 2021-04-30 2021-07-27 北京白龙马云行科技有限公司 Application program running method, method and device for assisting application program running

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1920754A (en) * 2006-09-05 2007-02-28 北京搜狗科技发展有限公司 Method and system for inputting artistic character/image into application program
CN102646038A (en) * 2012-02-28 2012-08-22 广州市动景计算机科技有限公司 Control content display method, control content display device and mobile terminal
CN105912543A (en) * 2015-12-14 2016-08-31 乐视网信息技术(北京)股份有限公司 Device, system, and method for multi-terminal content publishing

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101287220B (en) * 2008-05-28 2012-07-04 中兴通讯股份有限公司 Subject management system and method for mobile terminal
CN101533348A (en) * 2009-04-23 2009-09-16 光庭导航数据(武汉)有限公司 Man-machine interactive platform
CN105354016A (en) * 2014-08-21 2016-02-24 西安慧泽知识产权运营管理有限公司 Application topic management system and method
CN105426204A (en) * 2015-11-05 2016-03-23 浪潮软件集团有限公司 Web high-speed loading rendering method based on domestic CPU, operating system and browser
US10212061B2 (en) * 2016-04-25 2019-02-19 Google Llc Dynamically rendering interaction statistics data for content elements of an information resource using visual styles
CN106776584A (en) * 2016-11-24 2017-05-31 网易(杭州)网络有限公司 Character displaying method, translation table generating method, document translation method and device

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1920754A (en) * 2006-09-05 2007-02-28 北京搜狗科技发展有限公司 Method and system for inputting artistic character/image into application program
CN102646038A (en) * 2012-02-28 2012-08-22 广州市动景计算机科技有限公司 Control content display method, control content display device and mobile terminal
CN105912543A (en) * 2015-12-14 2016-08-31 乐视网信息技术(北京)股份有限公司 Device, system, and method for multi-terminal content publishing

Also Published As

Publication number Publication date
CN110110073A (en) 2019-08-09

Similar Documents

Publication Publication Date Title
US11403364B2 (en) Method and terminal device for extracting web page content
CN106909361B (en) Web development method and device based on template engine
CN105354025A (en) Service model configuration system and method based on mobile application
CN108173747B (en) Information interaction method and device
CN113703785B (en) Component-based platform deployment method, device, equipment and storage medium
CN104820604A (en) Browser applied to POS terminal
CN104463296A (en) Two-dimension code structured information generation, obtaining and processing method and system
CN112347404A (en) SPA page rendering method, device and system and storage medium
CN110110073B (en) Character display method and device
CN110020343B (en) Method and device for determining webpage coding format
CN103473106A (en) Method and system for generating page
CN109558186B (en) Page display method and device
US10394755B2 (en) Information presentation method and apparatus
CN106648610B (en) Method and device for remotely calling and responding functional interface
CN115904167A (en) Processing method and device of webpage icon, storage medium and electronic equipment
CN110968810A (en) Webpage data processing method and device
CN113836169A (en) Clickhouse-based data processing method, device and medium
CN114138717A (en) Rich text information publishing method and related device
CN109600403B (en) Method and device for sending information
CN110956672A (en) Marketing strategy construction method and device
CN112579221A (en) Modal popup display method and device
CN110119356B (en) Program testing method and device
CN113553123B (en) Data processing method, device, electronic equipment and storage medium
CN115242764B (en) Multi-terminal communication method, system, equipment and storage medium for front end
CN110780920B (en) Data processing method, device, client and medium

Legal Events

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