CN117369920A - Text display method, device, computer equipment and storage medium - Google Patents

Text display method, device, computer equipment and storage medium Download PDF

Info

Publication number
CN117369920A
CN117369920A CN202311234649.5A CN202311234649A CN117369920A CN 117369920 A CN117369920 A CN 117369920A CN 202311234649 A CN202311234649 A CN 202311234649A CN 117369920 A CN117369920 A CN 117369920A
Authority
CN
China
Prior art keywords
text
initial
format conversion
target
conversion function
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
CN202311234649.5A
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.)
Bank of China Ltd
Original Assignee
Bank of China 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 Bank of China Ltd filed Critical Bank of China Ltd
Priority to CN202311234649.5A priority Critical patent/CN117369920A/en
Publication of CN117369920A publication Critical patent/CN117369920A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/451Execution arrangements for user interfaces
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/10Text processing
    • G06F40/103Formatting, i.e. changing of presentation of documents
    • 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
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Health & Medical Sciences (AREA)
  • Artificial Intelligence (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • Computational Linguistics (AREA)
  • General Health & Medical Sciences (AREA)
  • Human Computer Interaction (AREA)
  • User Interface Of Digital Computer (AREA)

Abstract

The present application relates to a text presentation method, apparatus, computer device, storage medium and computer program product. The method is applied to a resource interaction application program, a text format conversion function is configured in an operating system to which the resource interaction application program belongs, and the method comprises the following steps: acquiring an initial text, wherein the initial text comprises a text to be displayed and a target format label; determining a target text format conversion function matched with the target format label based on a preset association relation between the format label and the text format conversion function; and calling the target text format conversion function by taking the text to be displayed as an input parameter of the target text format conversion function to obtain a target text, and displaying the target text on a display interface. By adopting the method, the text processing efficiency and operability can be improved.

Description

Text display method, device, computer equipment and storage medium
Technical Field
The present application relates to the field of data processing technology, and in particular, to a text display method, apparatus, computer device, storage medium, and computer program product.
Background
In some resource interaction scenarios, in response to a need to improve the convenience and operability of resource interactions, resource interaction mechanisms may develop resource interaction applications through which users may interact with resources. In order to present a better display effect and improve the experience of a user, texts with formats such as different fonts, different word sizes and the like, namely rich texts, are often required to be displayed on an application program display page.
Typically, the formats of the presentation text may be set separately by setting options through functions carried by the terminal system. However, since the function setting of the terminal system is relatively fixed, the development process is complex, the flow is complicated, the efficiency is low, and the implementation difficulty is high.
Disclosure of Invention
In view of the foregoing, it is desirable to provide a text presentation method, apparatus, computer device, computer readable storage medium, and computer program product that improve text processing efficiency and operability.
In a first aspect, the present application provides a text display method, where the method is applied to a resource interaction application, and a text format conversion function is configured in an operating system to which the resource interaction application belongs, and the method includes:
acquiring an initial text, wherein the initial text comprises a text to be displayed and a target format label;
determining a target text format conversion function matched with the target format label based on a preset association relation between the format label and the text format conversion function;
and calling the target text format conversion function by taking the text to be displayed as an input parameter of the target text format conversion function to obtain a target text, and displaying the target text on a display interface.
In one embodiment, the determining manner of the preset association relationship between the format label and the text format conversion function includes:
acquiring a plurality of text format conversion functions configured by the operating system;
determining a text format type corresponding to the format label to be matched;
determining a text format conversion function matched with the text format type from the plurality of text format conversion functions as a text format conversion function to be matched;
and establishing an association relation between the format label to be matched and the text format conversion function to be matched.
In one embodiment, before the initial text is obtained, the method further includes:
acquiring an original text, wherein the original text comprises a text dividing character string;
dividing the original text based on the text dividing character strings to obtain multiple groups of initial texts, wherein each group of initial texts comprises a text to be displayed and a corresponding format label.
In one embodiment, after the obtaining multiple sets of initial texts, the method further includes:
determining the target sequence relation of the multiple groups of initial texts according to the connection sequence relation of the texts in the original texts;
and sequencing the multiple groups of initial texts according to the target sequence relation to obtain an initial text set.
In one embodiment, the acquiring the initial text includes:
and sequentially acquiring initial texts from the initial text set.
In one embodiment, the acquiring the initial text includes:
determining initial text matching a text presentation operation in response to the text presentation operation;
and acquiring the initial text.
In a second aspect, the present application further provides a text display device, where the device is applied to a resource interaction application, and a text format conversion function is configured in an operating system to which the resource interaction application belongs, and the device includes:
the acquisition module is used for acquiring an initial text, wherein the initial text comprises a text to be displayed and a target format label;
the determining module is used for determining a target text format conversion function matched with the target format label based on a preset association relation between the format label and the text format conversion function;
and the display module is used for calling the target text format conversion function by taking the text to be displayed as the input parameter of the target text format conversion function to obtain a target text, and displaying the target text on a display interface.
In one embodiment, the determining module for determining a preset association relationship between a format label and the text format conversion function includes:
the first acquisition submodule is used for acquiring a plurality of text format conversion functions configured by the operating system;
the first determining submodule is used for determining the text format type corresponding to the format label to be matched;
the second determining submodule is used for determining a text format conversion function matched with the text format type from the plurality of text format conversion functions as a text format conversion function to be matched;
the establishing module is used for establishing the association relation between the format label to be matched and the text format conversion function to be matched.
In one embodiment, before the acquiring module, the method further includes:
the second acquisition sub-module is used for acquiring an original text, wherein the original text comprises a text division character string;
the dividing module is used for dividing the original text based on the text dividing character strings to obtain a plurality of groups of initial texts, wherein each group of initial texts comprises a text to be displayed and a corresponding format label.
In one embodiment, after the dividing module, the method further includes:
a third determining sub-module, configured to determine a target sequence relationship of the plurality of groups of initial texts according to a connection sequence relationship of texts in the original texts;
and the ordering module is used for ordering the plurality of groups of initial texts according to the target sequence relation to obtain an initial text set.
In one embodiment, the acquiring module includes:
and the third acquisition sub-module is used for sequentially acquiring the initial texts from the initial text set.
In one embodiment, the acquiring module includes:
a fourth determination sub-module for determining, in response to a text presentation operation, an initial text that matches the text presentation operation;
and the fourth acquisition sub-module is used for acquiring the initial text.
In a third aspect, embodiments of the present disclosure also provide a computer device. The computer device comprises a memory storing a computer program and a processor implementing the steps of the method of any of the embodiments of the present disclosure when the computer program is executed.
In a fourth aspect, embodiments of the present disclosure also provide a computer-readable storage medium. The computer readable storage medium has stored thereon a computer program which, when executed by a processor, implements the steps of the method of any of the embodiments of the present disclosure.
In a fifth aspect, embodiments of the present disclosure also provide a computer program product. The computer program product comprises a computer program which, when executed by a processor, implements the steps of the method according to any of the embodiments of the present disclosure.
The text display method, the device, the computer equipment, the storage medium and the computer program product are applied to the resource interaction application program, a text format conversion function is configured in an operating system to which the resource interaction application program belongs, when the text display is carried out, an initial text is obtained, the initial text comprises a text to be displayed and a target format label, according to the association relationship between the format label and the text format conversion function, a target text format conversion function matched with the target format label in the initial text can be determined, the text to be displayed is used as an input parameter, the target text format conversion function is called, the target text is output through the target text format conversion function, and the target text is displayed on a real interface, so that automatic conversion and display of the text with a format are realized; in the embodiment, according to the association relationship between the format label and the text format conversion function, the automatic calling of the text format conversion function can be realized, the format conversion and the output of the text are carried out, a developer does not need to edit and set manually according to the text format conversion function, the operation flow is simplified, the efficiency of text conversion display is improved, and the effect of text display is ensured; and the text format is set by setting the format label in the initial text, so that the operability is strong, the implementation difficulty is low, the experience of a user is improved, and the method is suitable for more application scenes.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the related art, the drawings that are required to be used in the embodiments or the related technical descriptions will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and other drawings may be obtained according to the drawings without inventive effort for a person having ordinary skill in the art.
FIG. 1 is a flow diagram of a text presentation method in one embodiment;
FIG. 2 is a flowchart illustrating a method for determining a preset association between a format label and the text format conversion function according to an embodiment;
FIG. 3 is a flow diagram of a text presentation method in one embodiment;
FIG. 4 is a flow diagram of a text presentation method in one embodiment;
FIG. 5 is a flow diagram of a text presentation method in one embodiment;
FIG. 6 is a block diagram of a text display device in one embodiment;
fig. 7 is an internal structural diagram of a computer device in one embodiment.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application will be further described in detail with reference to the accompanying drawings and examples. It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the present application.
In an exemplary embodiment, as shown in fig. 1, there is provided a text presentation method, which is applied to a resource interaction application program, where a text format conversion function is configured in an operating system to which the resource interaction application program belongs, and the method includes:
step S110, an initial text is obtained, wherein the initial text comprises a text to be displayed and a target format label;
the text display method provided by the embodiment is applied to the resource interaction application program, and a user can conduct resource interaction through the resource interaction application program, wherein in the use process of the resource interaction application program, the display interface can display texts in different formats. In general, a user uses a resource interaction application through a terminal, and different types of terminals may correspond to different operating systems, so that the operating systems to which the resource interaction application on the different types of terminals belong may be different. In this embodiment, a text format conversion function is configured in the operating system, and the text format conversion function can be used to perform format conversion on text, output text after format conversion, and the roles of different text format conversion functions are different, so that text with different formats can be output.
In the embodiment of the disclosure, an initial text is obtained, the initial text comprises a text to be displayed and a target format label, the text to be displayed is a plain text without a format, and the target format label corresponds to the text to be displayed. In an example, the format label may be established according to different text formats in the actual application scene, where the different format labels correspond to different text formats, and the format of the format label may be set according to the actual application scene, for example, the format label may be determined by special characters and a combination of the special characters; the format tag can also be determined by html string. The text to be displayed can correspond to one or more types of target format labels. The text format may include, but is not limited to, font name, font size, font color, etc., and may be specifically obtained according to the actual application scene setting.
Step S120, determining a target text format conversion function matched with the target format label based on a preset association relation between the format label and the text format conversion function;
in the embodiment of the disclosure, based on a preset association relationship between a format tag and a text format conversion function, determining the target text format conversion function matched with the target format tag, wherein the preset association relationship between the format tag and the text format conversion function can be obtained by setting in advance according to the text format corresponding to the text format conversion function and the text format corresponding to the format tag. In one example, the preset association between the format label and the text format conversion function may be established by means of a mapping table. In one example, the preset association relationship between the format label and the text format conversion function can be adjusted and modified according to the actual application scene so as to adapt to the format conversion requirements in different scenes.
And step S130, calling the target text format conversion function by taking the text to be displayed as an input parameter of the target text format conversion function to obtain a target text, and displaying the target text on a display interface.
In the embodiment of the disclosure, a text to be displayed is used as an input parameter of a target text format conversion function, the target text format conversion function is called, and the target text is obtained by processing and calculating the target text format conversion function and then outputting the target text, wherein the target text is the text to be displayed with a format. In one example, the target text format conversion function may be multiple, and the corresponding target text is text to be presented in multiple formats. In this embodiment, after the target text is obtained, the target text is displayed on a display interface, where the display interface may be an interface matched with the text to be displayed in the resource interaction application program. In one example, the initial text may be obtained by a text generator and a corresponding text format conversion function may be invoked for format conversion to obtain the target text.
The embodiment of the disclosure is applied to a resource interaction application program, a text format conversion function is configured in an operating system to which the resource interaction application program belongs, an initial text is acquired when the text is displayed, the initial text comprises a text to be displayed and a target format label, the target text format conversion function matched with the target format label in the initial text can be determined according to the association relationship between the format label and the text format conversion function, the text to be displayed is used as an input parameter, the target text format conversion function is called, the target text is output through the target text format conversion function, and the target text is displayed on a real interface, so that automatic conversion and display of the text with the format are realized; in the embodiment, according to the association relationship between the format label and the text format conversion function, the automatic calling of the text format conversion function can be realized, the format conversion and the output of the text are carried out, a developer does not need to edit and set manually according to the text format conversion function, the operation flow is simplified, the efficiency of text conversion display is improved, and the effect of text display is ensured; and the text format is set by setting the format label in the initial text, so that the operability is strong, the implementation difficulty is low, the experience of a user is improved, and the method is suitable for more application scenes.
In one embodiment, as shown in fig. 2, the determining manner of the preset association relationship between the format label and the text format conversion function includes:
step S210, a plurality of text format conversion functions configured by the operating system are obtained;
step S220, determining the text format type corresponding to the format label to be matched;
step S230, determining a text format conversion function matched with the text format type from the plurality of text format conversion functions as a text format conversion function to be matched;
step S240, establishing an association relationship between the format label to be matched and the text format conversion function to be matched.
In the embodiment of the disclosure, when determining the preset association relationship between the format label and the text format conversion function, a plurality of text format conversion functions configured by an operating system are acquired, and different operating systems may correspond to different types of text format conversion functions. Different text format conversion functions function differently and can be used to convert text to text of a different format. And determining the text format types corresponding to the format labels to be matched, wherein the format labels can be obtained by uniformly sorting and classifying the text formats required in the actual application scene, and different format labels correspond to different text format types. And determining a text format conversion function matched with the text format type from a plurality of text format conversion functions as a text format conversion function to be matched, wherein the text format conversion function to be matched can perform format conversion on the text, and converting the text into the text of the text format type. Establishing an association relationship between the to-be-matched format tag and the to-be-matched text format conversion function, wherein the association relationship between the tag and the function can be stored in a preset database to realize the storage of the association relationship; the mapping table may be used to store the association between the format labels and the text format functions.
According to the embodiment of the disclosure, the association relationship between the format label and the text format conversion function is established according to the text format type corresponding to the text format conversion function and the format label, so that the establishment of the mapping relationship between the function and the label is realized, and the corresponding text format conversion function can be called according to the format label in the text processing and displaying process without editing and setting the complicated text format conversion function, thereby simplifying the processing flow, improving the operability of the text format conversion, reducing the operation difficulty and being suitable for more application scenes.
In one embodiment, as shown in fig. 3, before the initial text is obtained, the method further includes:
step S102, an original text is obtained, wherein the original text comprises text division character strings;
step S104, dividing the original text based on the text dividing character strings to obtain a plurality of groups of initial texts, wherein each group of initial texts comprises a text to be displayed and a corresponding format label.
In the embodiment of the disclosure, the initial text may be divided based on the original text. Specifically, an original text is obtained, the original text comprises text dividing character strings, the original text is divided based on the text dividing character strings, a plurality of groups of initial texts are obtained, and each group of initial texts comprises a text to be displayed and a corresponding format label. In one example, the text-dividing string may be determined in advance according to an actual application scenario, for example, the text-dividing string may include, but is not limited to, a line-feed character, a segmentation character, a clause character, and the like. In one example, the original text may include a text to be displayed, a format tag, and a text dividing string, and the original text obtained by dividing the original text includes the text to be displayed and the format tag, where the text to be displayed and the format tag in the original text of each group are matched. In one example, a reader device may be added to the operating system and a resource interaction application may be introduced such that the resource interaction application may call the reader device, and when performing the text presentation process, the original text may be divided by the reader device to determine a plurality of original texts. In another example, the original text includes a format string, and the format label is determined according to the format string, where the format string in the original text may be parsed by a reader device to obtain the format label in the original text.
According to the embodiment of the disclosure, the obtained initial text is obtained after the original text is divided, the original text is divided into a plurality of groups of initial texts through text division character strings in the original text, the division grouping of the texts is realized, the processing efficiency of the original text is improved, the accuracy of the obtained initial texts is ensured, the method is suitable for more application scenes, the division grouping of the texts is realized based on the character strings, the processing of format conversion of the follow-up text is facilitated, the workload of data processing is reduced, the efficiency of text processing and displaying is improved, and the experience of a user is improved.
In one embodiment, as shown in fig. 4, after the obtaining multiple sets of initial texts, the method further includes:
step S106, determining the target sequence relation of the plurality of groups of initial texts according to the connection sequence relation of the texts in the original texts;
and S108, sorting the multiple groups of initial texts according to the target sequence relation to obtain an initial text set.
In the embodiment of the disclosure, after a plurality of groups of initial texts are obtained, determining a target sequence relation of the plurality of groups of initial texts according to a connection sequence relation of texts in the initial texts, and sequencing the plurality of groups of initial texts according to the target sequence relation to obtain an initial text set. The texts to be displayed in the original text can be arranged according to the display sequence, and the target sequence relation of the original text is correspondingly determined according to the connection sequence relation of the texts in the original text, wherein the target sequence relation is identical to the sequence of the texts in the connection sequence relation of the texts in the original text. The order of the groups of initial texts with the order in the initial text set is the same as the connection order of the texts in the initial texts.
According to the method and the device for processing the initial texts, the multiple groups of initial texts are ordered according to the connection sequence relation of the texts in the initial texts, so that an initial text set with the sequence relation is obtained, accuracy and efficiency in the subsequent processing of the initial texts can be guaranteed, the data processing workload is reduced, the problem of text errors after conversion caused by disordered text sequences is avoided, the text display effect is guaranteed, and the experience of a user is improved.
In one embodiment, the obtaining the initial text includes:
and sequentially acquiring initial texts from the initial text set.
In the embodiment of the disclosure, after an initial text set with a sequential relationship is obtained, when the initial text is obtained, the initial text is sequentially obtained from the initial text set, wherein one or more groups of initial texts can be obtained each time, and the initial text can be obtained specifically according to actual application scene settings.
According to the embodiment of the disclosure, in the process of acquiring the initial text, the initial text is sequentially acquired from the initial text set, and the subsequent format conversion processing is performed, so that the efficiency of text processing format conversion is further improved, the accuracy of the text displayed later is ensured, the experience of a user is improved, and the method and the device are suitable for more application scenes.
In one embodiment, as shown in fig. 5, the acquiring the initial text includes:
step S111, responding to a text display operation, and determining an initial text matched with the text display operation;
step S112, acquiring the initial text.
In the disclosed embodiments, the obtaining of the initial text action is performed as a text-based presentation operation. Specifically, in response to a text presentation operation, determining an initial text matched with the text presentation operation, and acquiring the initial text. The text display operation can be an operation when a user uses the resource interaction application program, and the text display operation can be sent out through a display interface. Different text presentation operations correspond to different display interfaces, different functions, and thus different text presentation operations may correspond to different initial text.
According to the method and the device for displaying the text, the initial text matched with the text display operation is determined according to the text display operation, the initial text is obtained, the corresponding initial text is obtained according to the operation of a user on a resource interaction application program, and is displayed after being processed, the accuracy and the instantaneity of the obtained initial text are guaranteed, the corresponding text can be conveniently and accurately displayed in time according to the user requirement, the efficiency and the accuracy of text processing are guaranteed, the experience of the user is improved, and the method and the device are suitable for more application scenes.
In one embodiment, the setting of the format tag can be realized through an html character string, specifically, an html traversing tool can traverse the html character string, split the html character string according to the tag, generate a structure body (initial text) from a plain text (text to be displayed) and an html tag (format tag) thereof, and sequentially hold all the structure bodies into an array (initial text set); the label mapping tool is used for presetting the corresponding relation between the html label and the text format conversion function in the operating system; the text generator is used for taking out the structural bodies in the html traversing tool array one by one in the running process of the application program, searching a text format conversion function corresponding to the label in the structural body according to the label mapping tool, and calling the system function to render the plain text in the structural body into the target text with the format. According to the embodiment, the text format is not required to be set through the function in the operating system, the conversion and the display of the text format are realized through mapping the tag into the function, the development process is simplified, the code is easy to read, the maintainability is higher, the text display effect and performance are improved, and the experience of a user is improved.
It should be understood that, although the steps in the flowcharts related to the embodiments described above are sequentially shown as indicated by arrows, these steps are not necessarily sequentially performed in the order indicated by the arrows. The steps are not strictly limited to the order of execution unless explicitly recited herein, and the steps may be executed in other orders. Moreover, at least some of the steps in the flowcharts described in the above embodiments may include a plurality of steps or a plurality of stages, which are not necessarily performed at the same time, but may be performed at different times, and the order of the steps or stages is not necessarily performed sequentially, but may be performed alternately or alternately with at least some of the other steps or stages.
Based on the same inventive concept, the embodiment of the application also provides a text display device for realizing the above related text display method. The implementation of the solution provided by the device is similar to the implementation described in the above method, so the specific limitation of one or more embodiments of the text display device provided below may be referred to the limitation of the text display method hereinabove, and will not be repeated here.
In an exemplary embodiment, as shown in fig. 6, there is provided a text presentation device 600, which is applied to a resource interaction application program, where a text format conversion function is configured in an operating system to which the resource interaction application program belongs, and the device includes:
an obtaining module 610, configured to obtain an initial text, where the initial text includes a text to be displayed and a target format tag;
a determining module 620, configured to determine a target text format conversion function that matches the target format label based on a preset association relationship between the format label and the text format conversion function;
and the display module 630 is configured to call the target text format conversion function with the text to be displayed as an input parameter of the target text format conversion function, obtain a target text, and display the target text on a display interface.
In one embodiment, the determining module for determining a preset association relationship between a format label and the text format conversion function includes:
the first acquisition submodule is used for acquiring a plurality of text format conversion functions configured by the operating system;
the first determining submodule is used for determining the text format type corresponding to the format label to be matched;
the second determining submodule is used for determining a text format conversion function matched with the text format type from the plurality of text format conversion functions as a text format conversion function to be matched;
the establishing module is used for establishing the association relation between the format label to be matched and the text format conversion function to be matched.
In one embodiment, before the acquiring module, the method further includes:
the second acquisition sub-module is used for acquiring an original text, wherein the original text comprises a text division character string;
the dividing module is used for dividing the original text based on the text dividing character strings to obtain a plurality of groups of initial texts, wherein each group of initial texts comprises a text to be displayed and a corresponding format label.
In one embodiment, after the dividing module, the method further includes:
a third determining sub-module, configured to determine a target sequence relationship of the plurality of groups of initial texts according to a connection sequence relationship of texts in the original texts;
and the ordering module is used for ordering the plurality of groups of initial texts according to the target sequence relation to obtain an initial text set.
In one embodiment, the acquisition module includes:
and the third acquisition sub-module is used for sequentially acquiring the initial texts from the initial text set.
In one embodiment, the acquisition module includes:
a fourth determination sub-module for determining, in response to a text presentation operation, an initial text that matches the text presentation operation;
and the fourth acquisition sub-module is used for acquiring the initial text.
The various modules in the text display device described above may be implemented in whole or in part by software, hardware, and combinations thereof. The above modules may be embedded in hardware or may be independent of a processor in the computer device, or may be stored in software in a memory in the computer device, so that the processor may call and execute operations corresponding to the above modules.
In one exemplary embodiment, a computer device is provided, which may be a server, the internal structure of which may be as shown in fig. 7. The computer device includes a processor, a memory, an Input/Output interface (I/O) and a communication interface. The processor, the memory and the input/output interface are connected through a system bus, and the communication interface is connected to the system bus through the input/output interface. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, computer programs, and a database. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage media. The database of the computer device is used for storing data involved in the method described in this embodiment, such as the initial text. The input/output interface of the computer device is used to exchange information between the processor and the external device. The communication interface of the computer device is used for communicating with an external terminal through a network connection. The computer program is executed by a processor to implement a text presentation method.
It will be appreciated by those skilled in the art that the structure shown in fig. 7 is merely a block diagram of some of the structures associated with the present application and is not limiting of the computer device to which the present application may be applied, and that a particular computer device may include more or fewer components than shown, or may combine certain components, or have a different arrangement of components.
In an embodiment, there is also provided a computer device comprising a memory and a processor, the memory having stored therein a computer program, the processor implementing the steps of the method embodiments described above when the computer program is executed.
In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored which, when executed by a processor, carries out the steps of the method embodiments described above.
In an embodiment, a computer program product is provided, comprising a computer program which, when executed by a processor, implements the steps of the method embodiments described above.
It should be noted that, the user information (including, but not limited to, user equipment information, user personal information, etc.) and the data (including, but not limited to, data for analysis, stored data, presented data, etc.) referred to in the present application are information and data authorized by the user or sufficiently authorized by each party, and the collection, use, and processing of the related data are required to meet the related regulations.
Those skilled in the art will appreciate that implementing all or part of the above described methods may be accomplished by way of a computer program stored on a non-transitory computer readable storage medium, which when executed, may comprise the steps of the embodiments of the methods described above. Any reference to memory, database, or other medium used in the various embodiments provided herein may include at least one of non-volatile and volatile memory. The nonvolatile Memory may include Read-Only Memory (ROM), magnetic tape, floppy disk, flash Memory, optical Memory, high density embedded nonvolatile Memory, resistive random access Memory (ReRAM), magnetic random access Memory (Magnetoresistive Random Access Memory, MRAM), ferroelectric Memory (Ferroelectric Random Access Memory, FRAM), phase change Memory (Phase Change Memory, PCM), graphene Memory, and the like. Volatile memory can include random access memory (Random Access Memory, RAM) or external cache memory, and the like. By way of illustration, and not limitation, RAM can be in the form of a variety of forms, such as static random access memory (Static Random Access Memory, SRAM) or dynamic random access memory (Dynamic Random Access Memory, DRAM), and the like. The databases referred to in the various embodiments provided herein may include at least one of relational databases and non-relational databases. The non-relational database may include, but is not limited to, a blockchain-based distributed database, and the like. The processors referred to in the embodiments provided herein may be general purpose processors, central processing units, graphics processors, digital signal processors, programmable logic units, quantum computing-based data processing logic units, etc., without being limited thereto.
The technical features of the above embodiments may be arbitrarily combined, and all possible combinations of the technical features in the above embodiments are not described for brevity of description, however, as long as there is no contradiction between the combinations of the technical features, they should be considered as the scope of the description.
The above examples only represent a few embodiments of the present application, which are described in more detail and are not to be construed as limiting the scope of the present application. It should be noted that it would be apparent to those skilled in the art that various modifications and improvements could be made without departing from the spirit of the present application, which would be within the scope of the present application. Accordingly, the scope of protection of the present application shall be subject to the appended claims.

Claims (10)

1. A text presentation method, wherein the method is applied to a resource interaction application program, and a text format conversion function is configured in an operating system to which the resource interaction application program belongs, the method comprising:
acquiring an initial text, wherein the initial text comprises a text to be displayed and a target format label;
determining a target text format conversion function matched with the target format label based on a preset association relation between the format label and the text format conversion function;
and calling the target text format conversion function by taking the text to be displayed as an input parameter of the target text format conversion function to obtain a target text, and displaying the target text on a display interface.
2. The method according to claim 1, wherein the determining a preset association between a format label and the text format conversion function comprises:
acquiring a plurality of text format conversion functions configured by the operating system;
determining a text format type corresponding to the format label to be matched;
determining a text format conversion function matched with the text format type from the plurality of text format conversion functions as a text format conversion function to be matched;
and establishing an association relation between the format label to be matched and the text format conversion function to be matched.
3. The method of claim 1, further comprising, prior to said obtaining the initial text:
acquiring an original text, wherein the original text comprises a text dividing character string;
dividing the original text based on the text dividing character strings to obtain multiple groups of initial texts, wherein each group of initial texts comprises a text to be displayed and a corresponding format label.
4. The method of claim 3, further comprising, after said obtaining a plurality of sets of initial text:
determining the target sequence relation of the multiple groups of initial texts according to the connection sequence relation of the texts in the original texts;
and sequencing the multiple groups of initial texts according to the target sequence relation to obtain an initial text set.
5. The method of claim 4, wherein the obtaining the initial text comprises:
and sequentially acquiring initial texts from the initial text set.
6. The method of claim 1, wherein the obtaining the initial text comprises:
determining initial text matching a text presentation operation in response to the text presentation operation;
and acquiring the initial text.
7. A text presentation device, the device being applied to a resource interaction application, the resource interaction application having a text format conversion function configured in an operating system to which the resource interaction application belongs, the device comprising:
the acquisition module is used for acquiring an initial text, wherein the initial text comprises a text to be displayed and a target format label;
the determining module is used for determining a target text format conversion function matched with the target format label based on a preset association relation between the format label and the text format conversion function;
and the display module is used for calling the target text format conversion function by taking the text to be displayed as the input parameter of the target text format conversion function to obtain a target text, and displaying the target text on a display interface.
8. A computer device comprising a memory and a processor, the memory storing a computer program, characterized in that the processor implements the steps of the method of any of claims 1 to 6 when the computer program is executed.
9. A computer readable storage medium, on which a computer program is stored, characterized in that the computer program, when being executed by a processor, implements the steps of the method of any of claims 1 to 6.
10. A computer program product comprising a computer program, characterized in that the computer program, when being executed by a processor, implements the steps of the method of any of claims 1 to 6.
CN202311234649.5A 2023-09-22 2023-09-22 Text display method, device, computer equipment and storage medium Pending CN117369920A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311234649.5A CN117369920A (en) 2023-09-22 2023-09-22 Text display method, device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311234649.5A CN117369920A (en) 2023-09-22 2023-09-22 Text display method, device, computer equipment and storage medium

Publications (1)

Publication Number Publication Date
CN117369920A true CN117369920A (en) 2024-01-09

Family

ID=89395447

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311234649.5A Pending CN117369920A (en) 2023-09-22 2023-09-22 Text display method, device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN117369920A (en)

Similar Documents

Publication Publication Date Title
CN113312344B (en) Data serialization and deserialization method, device, system, medium and product
CN112052157B (en) Method, device and system for constructing test message
CN116861107A (en) Business content display method, device, equipment, medium and product
CN116738954A (en) Report export method, report template configuration device and computer equipment
CN117369920A (en) Text display method, device, computer equipment and storage medium
CN116303657A (en) Group image generation method, group image generation device, computer device, and storage medium
CN112612427B (en) Vehicle stop data processing method and device, storage medium and terminal
CN111079399B (en) Image-text data processing method, image-text data processing device, computer equipment and storage medium
CN109358919A (en) Dynamic Configuration, device, computer equipment and the storage medium of Universal page
CN110851446B (en) Data table generation method and device, computer equipment and storage medium
US20220138398A1 (en) Style transfer
CN115687704A (en) Information display method and device, electronic equipment and computer readable storage medium
CN111723316B (en) Character string rendering method and device, terminal equipment and computer storage medium
CN117130606A (en) Front-end page configuration method, front-end page configuration device, computer equipment and storage medium
CN117453211A (en) Page generation method, page generation device, computer device, storage medium and program product
CN117130704A (en) Page generation method, page generation device, computer equipment and storage medium
CN117057340A (en) Report analysis method, report analysis device, computer equipment and storage medium
CN117349131A (en) System error information display method and device and computer equipment
CN116881290A (en) Data processing method, apparatus, device, storage medium, and program product
CN117194036A (en) Contract information processing method and device and computer equipment
CN116795713A (en) Interface testing method, device, equipment and readable storage medium
CN117610815A (en) Resource quota data processing method, device, computer equipment and storage medium
CN117950778A (en) System interaction method, device, computer equipment and storage medium
CN116450669A (en) Data query method, device, computer equipment and storage medium
CN117390461A (en) Data processing method, apparatus, device, medium, and program product

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