WO2021169267A1 - Text processing method and apparatus, device, and computer-readable storage medium - Google Patents

Text processing method and apparatus, device, and computer-readable storage medium Download PDF

Info

Publication number
WO2021169267A1
WO2021169267A1 PCT/CN2020/117435 CN2020117435W WO2021169267A1 WO 2021169267 A1 WO2021169267 A1 WO 2021169267A1 CN 2020117435 W CN2020117435 W CN 2020117435W WO 2021169267 A1 WO2021169267 A1 WO 2021169267A1
Authority
WO
WIPO (PCT)
Prior art keywords
font
text
identifier
target
target text
Prior art date
Application number
PCT/CN2020/117435
Other languages
French (fr)
Chinese (zh)
Inventor
李清鹏
Original Assignee
平安科技(深圳)有限公司
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 平安科技(深圳)有限公司 filed Critical 平安科技(深圳)有限公司
Publication of WO2021169267A1 publication Critical patent/WO2021169267A1/en

Links

Classifications

    • 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
    • G06F40/109Font handling; Temporal or kinetic typography
    • 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

Landscapes

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

Abstract

A text processing method and apparatus, a device, and a computer-readable storage medium. The method comprises: receiving a text processing request sent by a terminal device, and acquiring a font file corresponding to a font identifier in the text processing request (S101); acquiring target text from the text processing request, and acquiring, from the font file, a font character set corresponding to the target text, wherein the target text is text awaiting a font update (S102); updating, according to the font character set, fonts of respective characters in the target text, and sending the updated target text to the terminal device (S103). The method effectively reduces the time consumed by a terminal device when loading font files, thus enabling a quick update of text fonts, and improving user experience.

Description

文本处理方法、装置、设备及计算机可读存储介质Text processing method, device, equipment and computer readable storage medium
本申请要求于2020年2月27日提交中国专利局、申请号为202010125207.7,发明名称为“文本处理方法、装置、设备及计算机可读存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims the priority of a Chinese patent application filed with the Chinese Patent Office on February 27, 2020, the application number is 202010125207.7, and the invention title is "text processing methods, devices, equipment, and computer-readable storage media", all of which are approved The reference is incorporated in this application.
技术领域Technical field
本申请涉及数据处理的技术领域,尤其涉及一种文本处理方法、装置、设备及计算机可读存储介质。This application relates to the technical field of data processing, and in particular to a text processing method, device, device, and computer-readable storage medium.
背景技术Background technique
随着终端设备的用户对页面显示的个性化需求不断增加,用于显示文字的字体种类也随之不断增多。由于业务原因,终端设备需要对显示页面中的一段文本用不同种类的字体进行展示,但关于如何快速处理字体的显示更新,一直令开发人员和业务人员频频感到头疼。As users of terminal devices continuously increase their personalized requirements for page display, the types of fonts used to display texts also continue to increase. Due to business reasons, the terminal device needs to display a section of text in the display page with different types of fonts, but how to quickly handle the display update of the font has always been a headache for developers and business personnel.
发明人意识到,在传统方法中,安装在终端设备中的系统软件所携带的字体的种类不多,当用户想用其他种类的字体显示文本时,需要重新加载字体文件。在终端设备所处网络环境较差的情况下,由于需要加载的字体文件数据量较大,加载字体文件的时间往往较长,无法基于字体文件快速的更新文本的字体,用户体验不好。The inventor realizes that in the traditional method, there are not many types of fonts carried by the system software installed in the terminal device. When the user wants to display text with other types of fonts, the font file needs to be reloaded. In the case of a poor network environment where the terminal device is located, due to the large amount of font file data that needs to be loaded, the time for loading the font file is often longer, and the font of the text cannot be quickly updated based on the font file, and the user experience is not good.
因此,如何快速的更新文本的字体是目前亟待解决的问题。Therefore, how to quickly update the font of the text is a problem that needs to be solved urgently.
技术问题technical problem
本申请的主要目的在于提供一种文本处理方法、装置、设备及计算机可读存储介质,旨在快速的更新文本的字体。The main purpose of this application is to provide a text processing method, device, equipment, and computer-readable storage medium, aiming to quickly update the font of the text.
技术解决方案Technical solutions
第一方面,本申请提供一种文本处理方法,所述文本处理方法包括以下步骤:接收终端设备发送的文本处理请求,并获取所述文本处理请求中的字体标识符对应的字体文件;从所述文本处理请求中获取目标文本,并从所述字体文件中获取所述目标文本对应的字体文字集,其中,所述目标文本为待更新字体的文本;根据所述字体文字集,更新所述目标文本中的每个文字的字体,并将更新后的目标文本发送至所述终端设备。In a first aspect, the present application provides a text processing method, which includes the following steps: receiving a text processing request sent by a terminal device, and obtaining a font file corresponding to a font identifier in the text processing request; The target text is obtained from the text processing request, and the font character set corresponding to the target text is obtained from the font file, wherein the target text is the text of the font to be updated; and the font character set is updated according to the font character set. The font of each character in the target text, and send the updated target text to the terminal device.
第二方面,本申请还提供一种文本处理装置,所述文本处理装置包括:接收模块,用于接收终端设备发送的文本处理请求;获取模块,用于获取所述文本处理请求中的字体标识符对应的字体文件;所述获取模块,还用于从所述文本处理请求中获取目标文本,并从所述字体文件中获取所述目标文本对应的字体文字集,其中,所述目标文本为待更新字体的文本;字体更新模块,用于根据所述字体文字集,更新所述目标文本中的每个文字的字体;发送模块,用于将更新后的目标文本发送至所述终端设备。In a second aspect, the present application also provides a text processing device, the text processing device includes: a receiving module for receiving a text processing request sent by a terminal device; an acquiring module for acquiring a font identifier in the text processing request Font file corresponding to the character; the obtaining module is also used to obtain the target text from the text processing request, and obtain the font character set corresponding to the target text from the font file, wherein the target text is The text of the font to be updated; the font update module is used to update the font of each text in the target text according to the font character set; the sending module is used to send the updated target text to the terminal device.
第三方面,本申请还提供一种计算机设备,所述计算机设备包括处理器、存储器、以及存储在所述存储器上并可被所述处理器执行的计算机程序,其中所述计算机程序被所述处理器执行时,实现以下步骤:接收终端设备发送的文本处理请求,并获取所述文本处理请求中的字体标识符对应的字体文件;从所述文本处理请求中获取目标文本,并从所述字体文件中获取所述目标文本对应的字体文字集,其中,所述目标文本为待更新字体的文本;根据所述字体文字集,更新所述目标文本中的每个文字的字体,并将更新后的目标文本发送至所述终端设备。In a third aspect, the present application also provides a computer device that includes a processor, a memory, and a computer program stored on the memory and executable by the processor, wherein the computer program is When the processor executes, it implements the following steps: receiving a text processing request sent by a terminal device, and obtaining a font file corresponding to the font identifier in the text processing request; obtaining the target text from the text processing request, and obtaining the target text from the text processing request. Obtain the font character set corresponding to the target text from the font file, where the target text is the text of the font to be updated; according to the font character set, the font of each character in the target text is updated, and the The latter target text is sent to the terminal device.
第四方面,本申请还提供一种计算机可读存储介质,所述计算机可读存储介质上存储有计算机程序,其中所述计算机程序被处理器执行时,实现以下步骤:接收终端设备发送的文本处理请求,并获取所述文本处理请求中的字体标识符对应的字体文件;从所述文本处理请求中获取目标文本,并从所述字体文件中获取所述目标文本对应的字体文字集,其中,所述目标文本为待更新字体的文本;根据所述字体文字集,更新所述目标文本中的每个文字的字体,并将更新后的目标文本发送至所述终端设备。In a fourth aspect, this application also provides a computer-readable storage medium on which a computer program is stored, and when the computer program is executed by a processor, the following steps are implemented: receiving a text sent by a terminal device Process the request, and obtain the font file corresponding to the font identifier in the text processing request; obtain the target text from the text processing request, and obtain the font character set corresponding to the target text from the font file, wherein The target text is the text of the font to be updated; according to the font character set, the font of each character in the target text is updated, and the updated target text is sent to the terminal device.
有益效果Beneficial effect
本申请不需要向终端设备发送数据量较大的字体文件,节省了网络带宽,有效降低了终端设备加载字体文件的耗时,能够快速的更新文本中的文字的字体,极大地提高了用户体验。This application does not need to send font files with a large amount of data to the terminal device, which saves network bandwidth, effectively reduces the time consumption of the terminal device to load font files, can quickly update the font of the text in the text, and greatly improves the user experience .
附图说明Description of the drawings
图1为本申请实施例提供的一种文本处理方法的流程示意图。FIG. 1 is a schematic flowchart of a text processing method provided by an embodiment of this application.
图2为实施本实施例提供的文本处理方法的一场景示意图。FIG. 2 is a schematic diagram of a scene in which the text processing method provided by this embodiment is implemented.
图3为本申请实施例提供的另一种文本处理方法的流程示意图。FIG. 3 is a schematic flowchart of another text processing method provided by an embodiment of the application.
图4为图3中的文本处理方法的子步骤流程示意图。FIG. 4 is a schematic flowchart of sub-steps of the text processing method in FIG. 3.
图5为本申请实施例提供的一种文本处理装置的示意性框图。FIG. 5 is a schematic block diagram of a text processing apparatus provided by an embodiment of the application.
图6为本申请实施例提供的另一种文本处理装置的示意性框图。FIG. 6 is a schematic block diagram of another text processing apparatus provided by an embodiment of the application.
图7为本申请一实施例涉及的计算机设备的结构示意框图。FIG. 7 is a schematic block diagram of the structure of a computer device related to an embodiment of the application.
本申请目的的实现、功能特点及优点将结合实施例,参照附图做进一步说明。The realization, functional characteristics, and advantages of the purpose of this application will be further described in conjunction with the embodiments and with reference to the accompanying drawings.
本发明的实施方式Embodiments of the present invention
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。The technical solutions in the embodiments of the present application will be described clearly and completely in conjunction with the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, rather than all of them. Based on the embodiments in this application, all other embodiments obtained by those of ordinary skill in the art without creative work shall fall within the protection scope of this application.
附图中所示的流程图仅是示例说明,不是必须包括所有的内容和操作/步骤,也不是必须按所描述的顺序执行。例如,有的操作/步骤还可以分解、组合或部分合并,因此实际执行的顺序有可能根据实际情况改变。另外,虽然在装置示意图中进行了功能模块的划分,但是在某些情况下,可以以不同于装置示意图中的模块划分。The flowchart shown in the drawings is only an example, and does not necessarily include all contents and operations/steps, nor does it have to be executed in the described order. For example, some operations/steps can also be decomposed, combined or partially combined, so the actual execution order may be changed according to actual conditions. In addition, although functional modules are divided in the schematic diagram of the device, in some cases, they may be divided into different modules from the schematic diagram of the device.
本申请实施例提供一种文本处理方法、装置、计算机设备及计算机可读存储介质。其中,该文本处理方法可应用于服务器。The embodiments of the present application provide a text processing method, device, computer equipment, and computer-readable storage medium. Among them, the text processing method can be applied to the server.
本申请的技术方案可应用于人工智能、区块链和/或大数据技术领域,涉及的数据如文本等可存储于数据库中,或者可以存储于区块链中。例如,该文本处理方法应用于服务器,该服务器可以为区块链中的节点。The technical solution of the present application can be applied to the fields of artificial intelligence, blockchain and/or big data technology, and the data involved, such as text, can be stored in a database, or can be stored in a blockchain. For example, the text processing method is applied to a server, and the server may be a node in a blockchain.
下面结合附图,对本申请的一些实施方式作详细说明。在不冲突的情况下,下述的实施例及实施例中的特征可以相互组合。Hereinafter, some embodiments of the present application will be described in detail with reference to the accompanying drawings. In the case of no conflict, the following embodiments and features in the embodiments can be combined with each other.
请参照图1,图1为本申请的实施例提供的一种文本处理方法的流程示意图。Please refer to FIG. 1. FIG. 1 is a schematic flowchart of a text processing method provided by an embodiment of the application.
如图1所示,该文本处理方法包括步骤S101至步骤S103。As shown in Fig. 1, the text processing method includes steps S101 to S103.
步骤S101、接收终端设备发送的文本处理请求,并获取所述文本处理请求中的字体标识符对应的字体文件。Step S101: Receive a text processing request sent by a terminal device, and obtain a font file corresponding to the font identifier in the text processing request.
用户出于不同的目的,做出想要变更终端设备上显示文本的字体的决定时,可以通过终端设备,向服务器发出文本处理请求,由服务器基于文本处理请求更新文本的字体。When the user decides to change the font of the text displayed on the terminal device for different purposes, he can send a text processing request to the server through the terminal device, and the server updates the font of the text based on the text processing request.
其中,文本处理请求的触发方式具体为:终端设备显示字体选择页面、弹窗或菜单栏,其中,字体选择页面、弹窗或菜单栏中显示有多个字体对应的名称、例如显示有“宋体”、“楷体”等;获取用户基于字体选择页面、弹窗或菜单栏选择的字体对应的字体标识符,并生成携带有该字体标识符的文本处理请求,且将该文本处理请求发送至服务器。此外,在终端设备将文本处理请求发送至服务器的过程中,服务器实时或每隔预设时间段接收该终端设备发送的文本处理请求。需要说明的是,上述预设时间可基于实际情况进行设置,本申请对此不作具体限定。Among them, the triggering method of the text processing request is specifically: the terminal device displays the font selection page, pop-up window or menu bar. Among them, the font selection page, pop-up window or menu bar displays the names corresponding to multiple fonts, for example, "Song Ti" is displayed. "," Kaiti", etc.; obtain the font identifier corresponding to the font selected by the user based on the font selection page, pop-up window or menu bar, and generate a text processing request carrying the font identifier, and send the text processing request to the server . In addition, in the process of the terminal device sending the text processing request to the server, the server receives the text processing request sent by the terminal device in real time or every preset time period. It should be noted that the aforementioned preset time can be set based on actual conditions, which is not specifically limited in this application.
在一实施例中,终端设备设置有用于触发文本处理请求的控件,当检测用户对该控件的触控操作时,终端设备从本地的字体标识符集合中选择任意一个字体标识符,并生成携带有该字体标识符的文本处理请求,且将该文本处理请求发送至服务器。或者,也可以直接生成未携带有字体标识符的文本处理请求,而后续由服务器随机的选择字体标识符。本申请对此不作限定。In one embodiment, the terminal device is provided with a control for triggering a text processing request. When detecting a user's touch operation on the control, the terminal device selects any font identifier from the set of local font identifiers, and generates a portable There is a text processing request with the font identifier, and the text processing request is sent to the server. Alternatively, it is also possible to directly generate a text processing request that does not carry the font identifier, and then the server randomly selects the font identifier. This application does not limit this.
服务器在收到文本处理请求后,可以获取到与文本处理请求中的字体标识符对应的字体文件,其中,该字体文件为包含某一类型字体文字的文件,例如黑体字体文件为包含黑体文字的文件。需要说明的是,服务器中存储有不同类型字体对应的字体文件,该字体文件包括中文字体和外文字体,本申请对此不作具体限定。After the server receives the text processing request, it can obtain the font file corresponding to the font identifier in the text processing request, where the font file is a file containing a certain type of font text, for example, a bold font file is a font file containing bold text document. It should be noted that font files corresponding to different types of fonts are stored in the server, and the font files include Chinese fonts and foreign fonts, which are not specifically limited in this application.
在一实施例中,字体文件的获取方式具体为:当接收到终端设备发送的文本处理请求时,确定该文本处理请求中是否存在字体标识符;若该文本处理请求中存在字体标识符,则获取该字体标识符对应的字体文件。其中,字体标识符用于标识字体文件,不同的字体文件的字体标识符不同,经过服务器的判断,若文本处理请求中存在字体标识符,服务器能够快速的找到与字体标识符对应的字体文件,有效的提高字体文件的获取速度。In one embodiment, the method for obtaining the font file is specifically: when a text processing request sent by the terminal device is received, determining whether there is a font identifier in the text processing request; if there is a font identifier in the text processing request, then Obtain the font file corresponding to the font identifier. Among them, the font identifier is used to identify the font file. Different font files have different font identifiers. After the server judges, if there is a font identifier in the text processing request, the server can quickly find the font file corresponding to the font identifier. Effectively improve the speed of obtaining font files.
进一步地,获取字体标识符对应的字体文件具体方式为:确定该字体标识符对应的字体文件是否已加载至内存,如果该字体标识符对应的字体文件已加载至内存,则服务器从内存中获取文本处理请求中的字体标识符对应的字体文件。由于字体标识符对应的字体文件已加载至内存,可以快速的从内存中获取字体标识符对应的字体文件,进一步地提高字体文件的获取速度。Further, the specific method for obtaining the font file corresponding to the font identifier is: determining whether the font file corresponding to the font identifier has been loaded into the memory, and if the font file corresponding to the font identifier has been loaded into the memory, the server obtains it from the memory The font file corresponding to the font identifier in the text processing request. Since the font file corresponding to the font identifier has been loaded into the memory, the font file corresponding to the font identifier can be quickly obtained from the memory, which further improves the acquisition speed of the font file.
步骤S102、从所述文本处理请求中获取目标文本,并从所述字体文件中获取所述目标文本对应的字体文字集,其中,所述目标文本为待更新字体的文本。Step S102: Obtain target text from the text processing request, and obtain a font character set corresponding to the target text from the font file, wherein the target text is the text of the font to be updated.
服务器基于文本处理请求获取到对应的字体文件后,根据文本处理请求中携带的目标文本,能够确定与该目标文本对应的字体文字集。其中,该目标文本为待更新字体的文本,由多个独立的文字组合而成,该字体文字集包括目标文本中每个文字对应的字体文字。After the server obtains the corresponding font file based on the text processing request, it can determine the font character set corresponding to the target text according to the target text carried in the text processing request. Wherein, the target text is the text of the font to be updated, which is composed of multiple independent characters, and the font character set includes the font characters corresponding to each character in the target text.
示例性的,用户在终端设备上发送一个“宋体”的“花落知多少”的文本处理请求,该文本处理请求携带的目标文本为“花落知多少”,服务器获取到对应的宋体字体文件,并通过该目标文本确定与对应的从宋体字体文件中获取到字体文字集,该字体文字集为[花,落,知,多,少]。Exemplarily, the user sends a text processing request of "How much is known about Hualuo" in "Song Ti" on the terminal device, and the target text carried in the text processing request is "Knowing how much Hualuo", and the server obtains the corresponding Song Ti font file , And use the target text to determine and correspondingly obtain the font character set from the Song Ti font file. The font character set is [flower, fall, knowledge, more, less].
在一实施例中,从字体文件中获取目标文本对应的字体文字集的获取方式具体为:将目标文本拆分为单个文字,得到目标文本的文字集;从字体文件中获取文字集中的每个文字各自对应的字体文字;将文字集中的每个文字各自对应的字体文字作为目标文本对应的字体文字集。In one embodiment, the method of obtaining the font character set corresponding to the target text from the font file is specifically: splitting the target text into individual characters to obtain the character set of the target text; obtaining each character set in the character set from the font file. The font text corresponding to each text; the font text corresponding to each text in the text set is taken as the font text set corresponding to the target text.
例如,目标文本为楷体的“你好,我好,大家好”,拆分之后的单个文字为“你”、“好”“我”、“好”、“大”、“家”和“好”,则目标文本的文字集为[你,好,我,好,大,家,好],且字体为楷体。若字体标识符对应的字体文件为宋体对应的字体文件,则需从宋体对应的字体文件中获取宋体文字的“你”、“好”“我”、“好”、“大”、“家”和“好”,从而得到目标文本对应的字体文字集[你,好,我,好,大,家,好],且字体为宋体。For example, the target text is in italics "Hello, my hello, everyone", and the single text after splitting is "you", "good", "I", "good", "big", "home" and "good" ", the text set of the target text is [you, good, me, good, big, home, good], and the font is italics. If the font file corresponding to the font identifier is the font file corresponding to Times New Roman, you need to obtain the "you", "good" "I", "good", "big", "home" of Times New Roman text from the font file corresponding to Times New Roman. And "good" to get the font set corresponding to the target text [you, good, me, good, big, home, good], and the font is Times New Roman.
在一实施例中,将目标文本拆分为单个文字,得到目标文本的候选文字集;对候选文字集中的重复文字进行处理,得到目标文本的文字集,其中,文字集中的文字不重复。删减掉文字集中的重复文字,精简了字体文字集的容量,可以进一步加快文本的上传速度和字体的更新速度。In one embodiment, the target text is split into single characters to obtain a candidate character set of the target text; the repeated characters in the candidate character set are processed to obtain the character set of the target text, wherein the characters in the character set are not repeated. The repeated text in the text set is deleted, and the capacity of the font text set is streamlined, which can further accelerate the upload speed of the text and the update speed of the font.
例如,目标文本为楷体的“你好,我好,大家好”,拆分之后的单个文字为“你”、“好”“我”、“好”、“大”、“家”和“好”,则文字集为[你,好,我,好,大,家,好],且字体为楷体,经过去重处理之后的目标文本的文字集为[你,好,我,大,家],若获取的字体文件为宋体对应的字体文件,则从宋体对应的字体文件中获取对应的宋体文字[你,好,我,大,家],从而得到宋体对应的字体文字集[你,好,我,大,家],且字体为宋体。For example, the target text is in italics "Hello, my hello, everyone", and the single text after splitting is "you", "good", "I", "good", "big", "home" and "good" ", the text set is [you, good, me, good, big, home, good], and the font is italics, the text set of the target text after deduplication is [you, good, me, big, home] If the obtained font file is a font file corresponding to Song Ti, then the corresponding Song Ti text [你,好,我,大,家] is obtained from the font file corresponding to Song Ti, so as to obtain the font set corresponding to Song Ti [你,好, I, Da, Home], and the font is Times New Roman.
步骤S103、根据所述字体文字集,更新所述目标文本中的每个文字的字体,并将更新后的目标文本发送至所述终端设备。Step S103: According to the font character set, update the font of each character in the target text, and send the updated target text to the terminal device.
从字体文件中获取到字体文字集之后,服务器基于该字体文字集更新目标文本中的每个文字的字体,并将更新后的目标文本发送至终端设备,以供终端设备对更新后的目标文本进行显示。例如,终端设备发送的目标文本为楷体的“你好,我好,大家好”,服务器生成的字体文字集为包括宋体文字“你”、“我”、“好”、“大”和“家”的集合,将楷体的“你好,我好,大家好”更新为宋体的“你好,我好,大家好”,并将更新后的宋体的“你好,我好,大家好”发送至终端设备,以供终端设备进行显示。After obtaining the font character set from the font file, the server updates the font of each character in the target text based on the font character set, and sends the updated target text to the terminal device for the terminal device to compare the updated target text To display. For example, the target text sent by the terminal device is "Hello, my hello, everyone" in italics, and the font text set generated by the server includes the Song font "you", "me", "good", "big" and "home". "", update the "Hello, my hello, everyone" in italics to "Hello, my hello, everyone" in Times New Roman, and send the updated "Hello, my hello, everyone" in Times New Roman. To the terminal device for display by the terminal device.
请参照图2,图2为实施本实施例提供的文本处理方法的一场景示意图。Please refer to FIG. 2, which is a schematic diagram of a scene in which the text processing method provided by this embodiment is implemented.
如图2所示,用户在终端设备上向服务器发送文本处理请求,请求更新字体,服务器基于该文本处理请求,获取对应的字体文件,并基于该字体文件,确定目标文本对应的字体文字集,并将该字体文字集返回发送至终端设备,由终端设备基于字体文字集进行字体更新,并显示更新后的目标文本。As shown in Figure 2, the user sends a text processing request to the server on the terminal device to request to update the font. Based on the text processing request, the server obtains the corresponding font file, and based on the font file, determines the font character set corresponding to the target text. The font character set is sent back to the terminal device, and the terminal device updates the font based on the font character set, and displays the updated target text.
上述实施例提供的文本处理方法,在终端设备需要更新文本的字体时,将文本和字体标识符上传至服务器,由服务器获取字体标识符对应的字体文件,并从字体文件中获取文本对应的字体文字集,并根据该字体文字集,更新文本中的每个文字的字体,且将更新后的文本发送至终端设备,整个过程不需要向终端设备发送数据量较大的字体文件,节省了网络带宽,有效降低了终端设备加载字体文件的耗时,能够快速的更新文本中的文字的字体,极大地节省了网络带宽。In the text processing method provided by the foregoing embodiment, when the terminal device needs to update the font of the text, the text and the font identifier are uploaded to the server, and the server obtains the font file corresponding to the font identifier, and obtains the font corresponding to the text from the font file. Character set, and according to the font character set, update the font of each character in the text, and send the updated text to the terminal device. The whole process does not need to send a font file with a large amount of data to the terminal device, saving the network Bandwidth effectively reduces the time it takes for the terminal device to load font files, can quickly update the font of the text in the text, and greatly saves network bandwidth.
请参照图3,图3为本申请实施例提供的另一种文本处理方法的流程示意图。Please refer to FIG. 3, which is a schematic flowchart of another text processing method provided by an embodiment of the application.
如图3所示,该文本处理方法包括步骤S201至S205。As shown in FIG. 3, the text processing method includes steps S201 to S205.
步骤S201、接收终端设备发送的文本处理请求,并确定所述文本处理请求中是否携带有字体标识符。Step S201: Receive a text processing request sent by a terminal device, and determine whether the text processing request carries a font identifier.
当服务器接收到终端设备发送的文本处理请求时,对该文本处理请求进行分析,以确定该文本处理请求中是否携带有字体标识符,如果该文本处理请求中携带字体标识符,则可以直接获取该字体标识符对应的字体文件,如果该文本处理请求中不携带字体标识符,则需要先确定字体标识符,再获取确定的字体标识符对应的字体文件,其中,字体标识符用于标识字体文件,不同的字体文件的字体标识符不同。When the server receives a text processing request sent by a terminal device, it analyzes the text processing request to determine whether the text processing request carries a font identifier. If the text processing request carries a font identifier, it can be directly obtained The font file corresponding to the font identifier, if the text processing request does not carry the font identifier, you need to determine the font identifier first, and then obtain the font file corresponding to the determined font identifier, where the font identifier is used to identify the font File, different font files have different font identifiers.
步骤S202、若所述文本处理请求中未携带有字体标识符,则从所述文本处理请求中获取用户标识符,并获取所述用户标识符对应的字体标识符集。Step S202: If the text processing request does not carry a font identifier, obtain a user identifier from the text processing request, and obtain a font identifier set corresponding to the user identifier.
其中,在该文本处理请求中携带字体标识符的情况下,服务器通过该字体标识符获取到字体文件后,还获取用户标识符,并将获取到的字体文件的字体标识符写入该用户标识符对应的字体标识符集,以更新字体标识符集。Wherein, in the case that the text processing request carries the font identifier, after the server obtains the font file through the font identifier, it also obtains the user identifier, and writes the font identifier of the obtained font file into the user identifier. The font identifier set corresponding to the symbol is used to update the font identifier set.
如果文本处理请求中不携带字体标识符,则服务器获取文本处理请求中携带的用户标识符,通过该用户标识符,可以获取与该用户标识符对应的字体标识符集,其中,该用户标识符用于唯一标识用户,字体标识符集包括至少一个字体标识符。If the text processing request does not carry the font identifier, the server obtains the user identifier carried in the text processing request. Through the user identifier, the font identifier set corresponding to the user identifier can be obtained, where the user identifier Used to uniquely identify the user, the font identifier set includes at least one font identifier.
步骤S203、根据所述字体标识符集中每个字体标识符的属性信息,从所述字体标识符集中选择一个字体标识符作为目标字体标识符,并获取所述目标字体标识符对应的字体文件。Step S203: According to the attribute information of each font identifier in the font identifier set, select a font identifier from the font identifier set as the target font identifier, and obtain the font file corresponding to the target font identifier.
在获取字体标识符集之后,服务器可以获取该字体标识符集中每个字体标识符的属性信息,并基于每个字体标识符的属性信息,从该字体标识符集中选择一个字体标识符作为目标字体标识符,且获取该目标字体标识符对应的字体文件,其中,该属性信息包括字体标识符的优先级标签和/或字体标识符对应的字体文件的历史加载次数,需要说明的是,不同的优先级标签表示不同的优先级,优先级越高,则表示字体标识符对应的字体文件的使用次数越多,优先级越低,则表示字体标识符对应的字体文件的使用次数越少,历史加载次数为字体标识符对应的字体文件已被加载的次数。需要说明的是,服务器也可以从字体标识符集中选择任意一个字体标识符作为目标字体标识符。After obtaining the font identifier set, the server may obtain the attribute information of each font identifier in the font identifier set, and based on the attribute information of each font identifier, select a font identifier from the font identifier set as the target font Identifier, and obtain the font file corresponding to the target font identifier, where the attribute information includes the priority tag of the font identifier and/or the historical loading times of the font file corresponding to the font identifier. It should be noted that different Priority tags indicate different priorities. The higher the priority, the more the font file corresponding to the font identifier has been used. The lower the priority, the less the font file corresponding to the font identifier has been used. The number of loading times is the number of times the font file corresponding to the font identifier has been loaded. It should be noted that the server may also select any font identifier from the font identifier set as the target font identifier.
在一实施例中,如图4所示,步骤S203包括子步骤S2031至步骤S2032。In an embodiment, as shown in FIG. 4, step S203 includes sub-steps S2031 to S2032.
步骤S2031、根据所述字体标识符集中每个字体标识符的属性信息,确定每个所述字体标识符各自对应的优先级。Step S2031: Determine the respective priority of each font identifier according to the attribute information of each font identifier in the font identifier set.
具体地,判断每个字体标识符的属性信息中是否存在优先级标签,若每个字体标识符的属性信息中存在优先级标签,则根据每个字体标识符的优先级标签可以确定每个字体标识符各自对应的优先级。其中,优先级越高,则表示字体标识符对应的字体文件的使用次数越多,优先级越低,则表示字体标识符对应的字体文件的使用次数越少,用户偏好请求加载优先级越高的字体标识符对应的字体文件。Specifically, it is determined whether there is a priority label in the attribute information of each font identifier. If there is a priority label in the attribute information of each font identifier, each font can be determined according to the priority label of each font identifier. The priority of each identifier. Among them, the higher the priority, the more times the font file corresponding to the font identifier is used, and the lower the priority, the lower the use times of the font file corresponding to the font identifier, and the higher the user preference request loading priority. The font file corresponding to the font identifier.
进一步地,如果属性信息中不存在优先级标签,则服务器从每个字体标识符的属性信息中获取每个字体标识符各自对应的历史加载次数,并根据每个字体标识符各自对应的历史加载次数,确定每个字体标识符各自对应的优先级。需要说明的是,历史加载次数越多,则优先级越高,历史加载次数越少,则优先级越低。Further, if there is no priority tag in the attribute information, the server obtains the historical loading times corresponding to each font identifier from the attribute information of each font identifier, and according to the historical loading times corresponding to each font identifier. The number of times to determine the respective priority of each font identifier. It should be noted that the more historical loading times, the higher the priority, and the fewer historical loading times, the lower the priority.
其中,优先级的确定方式具体为:按照每个字体标识符各自对应的历史加载次数的大小顺序,对字体标识符集中每个字体标识符进行排序,并获取每个字体标识符的排序编号,且将每个字体标识符的排序编号作为每个字体标识符的优先级。需要说明的是,历史加载次数越大,则排序编号越小,优先级越高,历史加载次数越小,则排序编号越大,优先级越低。Among them, the method of determining the priority is specifically: sorting each font identifier in the font identifier set according to the size order of the historical loading times corresponding to each font identifier, and obtaining the sorting number of each font identifier, And use the sort number of each font identifier as the priority of each font identifier. It should be noted that the greater the number of historical loadings, the smaller the sorting number, the higher the priority, and the smaller the historical loading times, the larger the sorting number and the lower the priority.
在一实施例中,若服务器判断每个字体标识符的属性信息中不存在优先级标签,也不存在历史加载次数,则服务器通过随机选择的方式选择一个字体标识符作为目标字体标识符,保证在任何情况下都能够选择一字体标识符作为目标字体标识符。In one embodiment, if the server determines that there is no priority tag in the attribute information of each font identifier, and no historical loading times, the server selects a font identifier as the target font identifier by random selection to ensure In any case, a font identifier can be selected as the target font identifier.
步骤S2032、从所述字体标识符集中选择所述优先级最高的字体标识符作为目标字体标识符。Step S2032. Select the font identifier with the highest priority from the font identifier set as the target font identifier.
在确定每个字体标识符各自对应的优先级之后,根据每个字体标识符各自对应的优先级,确定目标字体标识符,即从字体标识符集中选择优先级最高的字体标识符作为目标字体标识符,或者获取优先级大于或等于预设优先级的字体标识符作为候选字体标识符,并选择任意一个候选字体标识符作为目标字体标识符。After determining the respective priority of each font identifier, determine the target font identifier according to the respective priority of each font identifier, that is, select the font identifier with the highest priority from the font identifier set as the target font identifier Or obtain a font identifier with a priority greater than or equal to a preset priority as the candidate font identifier, and select any candidate font identifier as the target font identifier.
步骤S204、从所述文本处理请求中获取目标文本,并从所述字体文件中获取所述目标文本对应的字体文字集,其中,所述目标文本为待更新字体的文本。Step S204: Obtain the target text from the text processing request, and obtain the font character set corresponding to the target text from the font file, wherein the target text is the text of the font to be updated.
服务器基于文本处理请求获取到对应的字体文件后,根据文本处理请求中携带的目标文本,能够确定与该目标文本对应的字体文字集。其中,该目标文本为待更新字体的文本,由多个独立的文字组合而成,该字体文字集包括目标文本中每个文字对应的字体文字。After the server obtains the corresponding font file based on the text processing request, it can determine the font character set corresponding to the target text according to the target text carried in the text processing request. Wherein, the target text is the text of the font to be updated, which is composed of multiple independent characters, and the font character set includes the font characters corresponding to each character in the target text.
步骤S205、根据所述字体文字集,更新所述目标文本中的每个文字的字体,并将更新后的目标文本发送至所述终端设备。Step S205: According to the font character set, update the font of each character in the target text, and send the updated target text to the terminal device.
从字体文件中获取到字体文字集之后,服务器基于该字体文字集更新所述目标文本中的每个文字的字体,并将更新后的目标文本发送至所述终端设备,以供终端设备对更新后的目标文本进行显示。例如,终端设备发送的目标文本为楷体的“你好,我好,大家好”,服务器生成的字体文字集为包括宋体文字“你”、“我”、“好”、“大”和“家”的集合,将楷体的“你好,我好,大家好”更新为宋体的“你好,我好,大家好”,并将更新后的宋体的“你好,我好,大家好”发送至终端设备,以供终端设备进行显示。After obtaining the font character set from the font file, the server updates the font of each character in the target text based on the font character set, and sends the updated target text to the terminal device for the terminal device to update After the target text is displayed. For example, the target text sent by the terminal device is "Hello, my hello, everyone" in italics, and the font text set generated by the server includes the Song font "you", "me", "good", "big" and "home". "", update the "Hello, my hello, everyone" in italics to "Hello, my hello, everyone" in Times New Roman, and send the updated "Hello, my hello, everyone" in Times New Roman. To the terminal device for display by the terminal device.
目标文本中的每个文字的字体更新方式具体为:从字体文字集中获取目标文本中的每个文字各自对应的字体文字;将目标文本中的每个文字替换为每个文字各自对应的字体文字,以更新所述目标文本中的每个文字的字体。通过对目标文本中的每个文字的字体进行更新,便于终端设备对更新后的目标文本进行显示。The font update method of each text in the target text is specifically as follows: obtain the font text corresponding to each text in the target text from the font text set; replace each text in the target text with the font text corresponding to each text To update the font of each text in the target text. By updating the font of each text in the target text, it is convenient for the terminal device to display the updated target text.
上述实施例提供的文本处理方法,在服务器不能通过文本处理请求中的字体标识符获取字体文件时,可以根据所述文本处理请求中携带的用户标识符,获取与用户标识符对应的字体标识符集,以及根据所述字体标识符集中每个字体标识符的属性信息,选择一个字体标识符作为目标字体标识符,确保用户请求更新字体时能够准确且快速,提高用户体验。In the text processing method provided by the foregoing embodiment, when the server cannot obtain the font file through the font identifier in the text processing request, it can obtain the font identifier corresponding to the user identifier according to the user identifier carried in the text processing request. According to the attribute information of each font identifier in the font identifier set, a font identifier is selected as the target font identifier to ensure that the user requests to update the font accurately and quickly, and improve user experience.
请参照图5,图5为本申请实施例提供的一种文本处理装置的示意性框图。Please refer to FIG. 5. FIG. 5 is a schematic block diagram of a text processing apparatus according to an embodiment of the application.
如图5所示,该文本处理装置300,包括:接收模块301、获取模块302、字体更新模块303和发送模块304。As shown in FIG. 5, the text processing device 300 includes: a receiving module 301, an acquiring module 302, a font updating module 303, and a sending module 304.
接收模块301,用于接收终端设备发送的文本处理请求。The receiving module 301 is used to receive a text processing request sent by a terminal device.
获取模块302,用于获取所述文本处理请求中的字体标识符对应的字体文件。The obtaining module 302 is configured to obtain the font file corresponding to the font identifier in the text processing request.
所述获取模块302,还用于从所述文本处理请求中获取目标文本,并从所述字体文件中获取所述目标文本对应的字体文字集,其中,所述目标文本为待更新字体的文本。The obtaining module 302 is further configured to obtain the target text from the text processing request, and obtain the font character set corresponding to the target text from the font file, wherein the target text is the text of the font to be updated .
字体更新模块303,用于根据所述字体文字集,更新所述目标文本中的每个文字的字体。The font update module 303 is configured to update the font of each character in the target text according to the font character set.
发送模块304,用于将更新后的目标文本发送至所述终端设备。The sending module 304 is configured to send the updated target text to the terminal device.
在一实施例中,所述获取模块302,还用于:从内存中获取所述文本处理请求中的字体标识符对应的字体文件。In an embodiment, the obtaining module 302 is further configured to obtain the font file corresponding to the font identifier in the text processing request from the memory.
在一实施例中,所述获取模块302,还用于:将所述目标文本拆分为单个文字,得到所述目标文本的文字集;从所述字体文件中获取所述文字集中的每个文字各自对应的字体文字;将所述文字集中的每个文字各自对应的字体文字作为所述目标文本对应的字体文字集。In one embodiment, the obtaining module 302 is further configured to: split the target text into individual characters to obtain a character set of the target text; and obtain each character set in the character set from the font file. The font text corresponding to each text; the font text corresponding to each text in the text set is used as the font text set corresponding to the target text.
在一实施例中,所述获取模块302,还用于:将所述目标文本拆分为单个文字,得到所述目标文本的候选文字集;对所述候选文字集中的重复文字进行处理,得到所述目标文本的文字集,其中,所述文字集中的文字不重复。In one embodiment, the acquisition module 302 is further configured to: split the target text into individual words to obtain a candidate character set of the target text; and process the repeated characters in the candidate character set to obtain The character set of the target text, wherein the characters in the character set are not repeated.
请参照图6,图6为本申请实施例提供的一种文本处理装置的示意性框图。Please refer to FIG. 6, which is a schematic block diagram of a text processing apparatus according to an embodiment of the application.
如图6所示,该文本处理装置400,包括:确定模块401、第一获取模块402、第二获取模块403、第三获取模块404、字体更新模块405和发送模块406。As shown in FIG. 6, the text processing apparatus 400 includes: a determining module 401, a first acquiring module 402, a second acquiring module 403, a third acquiring module 404, a font updating module 405, and a sending module 406.
确定模块401,用于接收终端设备发送的文本处理请求,并确定所述文本处理请求中是否携带有字体标识符。The determining module 401 is configured to receive a text processing request sent by a terminal device, and determine whether the text processing request carries a font identifier.
第一获取模块402,用于若所述文本处理请求中未携带有字体标识符,则从所述文本处理请求中获取用户标识符,并获取所述用户标识符对应的字体标识符集。The first obtaining module 402 is configured to obtain a user identifier from the text processing request if the text processing request does not carry a font identifier, and obtain a font identifier set corresponding to the user identifier.
第二获取模块403,用于根据所述字体标识符集中每个字体标识符的属性信息,从所述字体标识符集中选择一个字体标识符作为目标字体标识符,并获取所述目标字体标识符对应的字体文件。The second acquiring module 403 is configured to select a font identifier from the font identifier set as a target font identifier according to the attribute information of each font identifier in the font identifier set, and acquire the target font identifier The corresponding font file.
第三获取模块404,用于从所述文本处理请求中获取目标文本,并从所述字体文件中获取所述目标文本对应的字体文字集,其中,所述目标文本为待更新字体的文本。The third obtaining module 404 is configured to obtain the target text from the text processing request, and obtain the font character set corresponding to the target text from the font file, wherein the target text is the text of the font to be updated.
字体更新模块405,用于根据所述字体文字集,更新所述目标文本中的每个文字的字体。The font update module 405 is configured to update the font of each character in the target text according to the font character set.
发送模块406,用于将更新后的目标文本发送至所述终端设备。The sending module 406 is configured to send the updated target text to the terminal device.
在一实施例中,如图6所示,所述第三获取模块404包括:优先级确定子模块4041,用于根据所述字体标识符集中每个字体标识符的属性信息,确定每个所述字体标识符各自对应的优先级。In one embodiment, as shown in FIG. 6, the third acquiring module 404 includes: a priority determining sub-module 4041, configured to determine each font identifier according to the attribute information of each font identifier in the font identifier set. The priority corresponding to each of the font identifiers.
标识符确定子模块4042,用于从所述字体标识符集中选择所述优先级最高的字体标识符作为目标字体标识符。The identifier determination sub-module 4042 is configured to select the font identifier with the highest priority from the font identifier set as the target font identifier.
在一实施例中,所述字体更新模块405,还用于:从所述字体文字集中获取所述目标文本中的每个文字各自对应的字体文字;将所述目标文本中的每个文字替换为每个文字各自对应的所述字体文字,以更新所述目标文本中的每个文字的字体。In one embodiment, the font update module 405 is further configured to: obtain the font text corresponding to each text in the target text from the font text collection; replace each text in the target text The font text corresponding to each text is used to update the font of each text in the target text.
需要说明的是,所属领域的技术人员可以清楚地了解到,为了描述的方便和简洁,上述描述的装置和各模块及单元的具体工作过程,可以参考前述文本处理方法实施例中的对应过程,在此不再赘述。It should be noted that those skilled in the art can clearly understand that, for the convenience and conciseness of description, the specific working process of the device and each module and unit described above can refer to the corresponding process in the foregoing text processing method embodiment. I won't repeat them here.
上述实施例提供的装置可以实现为一种计算机程序的形式,该计算机程序可以在如图7所示的计算机设备上运行。The apparatus provided in the foregoing embodiment may be implemented in the form of a computer program, and the computer program may run on the computer device as shown in FIG. 7.
本申请实施例还提供了一种计算机设备,该计算机设备可包括处理器和存储器。其中,存储器可以存储有可被所述处理器执行的计算机程序,该计算机程序被所述处理器执行时,可实现上述文本处理方法中的部分或全部步骤。例如,该计算机程序被所述处理器执行时,可实现以下步骤:接收终端设备发送的文本处理请求,并获取所述文本处理请求中的字体标识符对应的字体文件;从所述文本处理请求中获取目标文本,并从所述字体文件中获取所述目标文本对应的字体文字集,其中,所述目标文本为待更新字体的文本;根据所述字体文字集,更新所述目标文本中的每个文字的字体,并将更新后的目标文本发送至所述终端设备。可选的,该计算机程序被所述处理器执行时,还可实现上述实施例中方法的其他步骤,这里不再赘述。进一步可选的,该计算机设备还可包括网络接口。The embodiment of the present application also provides a computer device, which may include a processor and a memory. Wherein, the memory may store a computer program that can be executed by the processor, and when the computer program is executed by the processor, some or all of the steps in the text processing method described above can be implemented. For example, when the computer program is executed by the processor, the following steps can be implemented: receiving a text processing request sent by a terminal device, and obtaining a font file corresponding to the font identifier in the text processing request; The target text is obtained from the font file, and the font character set corresponding to the target text is obtained from the font file, wherein the target text is the text of the font to be updated; according to the font character set, the font in the target text is updated The font of each text, and the updated target text is sent to the terminal device. Optionally, when the computer program is executed by the processor, other steps of the method in the foregoing embodiment may also be implemented, which will not be repeated here. Further optionally, the computer device may also include a network interface.
例如,请参阅图7,图7为本申请实施例提供的一种计算机设备的结构示意性框图。该计算机设备可以为服务器。For example, please refer to FIG. 7, which is a schematic block diagram of the structure of a computer device according to an embodiment of the application. The computer device may be a server.
如图7所示,该计算机设备包括通过系统总线连接的处理器、存储器和网络接口,其中,存储器可以包括非易失性存储介质和内存储器。As shown in FIG. 7, the computer device includes a processor, a memory, and a network interface connected through a system bus, where the memory may include a non-volatile storage medium and an internal memory.
非易失性存储介质可存储操作系统和计算机程序。该计算机程序包括程序指令,该程序指令被执行时,可使得处理器执行任意一种文本处理方法。The non-volatile storage medium can store an operating system and a computer program. The computer program includes program instructions, and when the program instructions are executed, the processor can execute any text processing method.
处理器用于提供计算和控制能力,支撑整个计算机设备的运行。The processor is used to provide computing and control capabilities and support the operation of the entire computer equipment.
内存储器为非易失性存储介质中的计算机程序的运行提供环境,该计算机程序被处理器执行时,可使得处理器执行任意一种文本处理方法。The internal memory provides an environment for the operation of the computer program in the non-volatile storage medium. When the computer program is executed by the processor, the processor can execute any text processing method.
该网络接口用于进行网络通信,如发送分配的任务等。本领域技术人员可以理解,图7中示出的结构,仅仅是与本申请方案相关的部分结构的框图,并不构成对本申请方案所应用于其上的计算机设备的限定,具体的计算机设备可以包括比图中所示更多或更少的部件,或者组合某些部件,或者具有不同的部件布置。The network interface is used for network communication, such as sending assigned tasks. Those skilled in the art can understand that the structure shown in FIG. 7 is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may Including more or fewer parts than shown in the figure, or combining some parts, or having a different arrangement of parts.
应当理解的是,处理器可以是中央处理单元 (Central Processing Unit,CPU),该处理器还可以是其他通用处理器、数字信号处理器 (Digital Signal Processor,DSP)、专用集成电路 (Application Specific Integrated Circuit,ASIC)、现场可编程门阵列 (Field-Programmable Gate Array,FPGA) 或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件等。其中,通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等。It should be understood that the processor may be a central processing unit (Central Processing Unit, CPU), and the processor may also be other general-purpose processors, digital signal processors (Digital Signal Processors, DSPs), and application specific integrated circuits (Application Specific Integrated Circuits). Specific Integrated Circuit (ASIC), Field-Programmable Gate Array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, etc. Among them, the general-purpose processor may be a microprocessor or the processor may also be any conventional processor.
在一个实施例中,所述处理器用于运行存储在存储器中的计算机程序,以实现如下步骤:接收终端设备发送的文本处理请求,并获取所述文本处理请求中的字体标识符对应的字体文件;从所述文本处理请求中获取目标文本,并从所述字体文件中获取所述目标文本对应的字体文字集,其中,所述目标文本为待更新字体的文本;根据所述字体文字集,更新所述目标文本中的每个文字的字体,并将更新后的目标文本发送至所述终端设备。In one embodiment, the processor is configured to run a computer program stored in the memory to implement the following steps: receiving a text processing request sent by a terminal device, and obtaining a font file corresponding to the font identifier in the text processing request Obtain the target text from the text processing request, and obtain the font character set corresponding to the target text from the font file, wherein the target text is the text of the font to be updated; according to the font character set, The font of each character in the target text is updated, and the updated target text is sent to the terminal device.
在一个实施例中,所述处理器在实现所述获取所述文本处理请求中的字体标识符对应的字体文件之前,还用于实现:确定所述文本处理请求中是否携带有字体标识符;若所述文本处理请求中未携带有字体标识符,则从所述文本处理请求中获取用户标识符,并获取所述用户标识符对应的字体标识符集;根据所述字体标识符集中每个字体标识符的属性信息,从所述字体标识符集中选择一个字体标识符作为目标字体标识符,并获取所述目标字体标识符对应的字体文件。In an embodiment, before the processor implements the acquisition of the font file corresponding to the font identifier in the text processing request, the processor is further configured to implement: determining whether the text processing request carries a font identifier; If the text processing request does not carry the font identifier, the user identifier is obtained from the text processing request, and the font identifier set corresponding to the user identifier is obtained; according to each font identifier set For the attribute information of the font identifier, a font identifier is selected from the font identifier set as the target font identifier, and the font file corresponding to the target font identifier is obtained.
在一个实施例中,所述处理器在实现所述获取所述根据所述字体标识符集中每个字体标识符的属性信息,从所述字体标识符集中选择一个字体标识符作为目标字体标识符时,用于实现:根据所述字体标识符集中每个字体标识符的属性信息,确定每个所述字体标识符各自对应的优先级;从所述字体标识符集中选择所述优先级最高的字体标识符作为目标字体标识符。In one embodiment, the processor selects a font identifier from the font identifier set as the target font identifier after implementing the acquiring the attribute information of each font identifier in the font identifier set. When, it is used to implement: determine the respective priority of each font identifier according to the attribute information of each font identifier in the font identifier set; select the highest priority from the font identifier set The font identifier serves as the target font identifier.
在一个实施例中,所述处理器在实现所述获取所述文本处理请求中的字体标识符对应的字体文件时,用于实现:从内存中获取所述文本处理请求中的字体标识符对应的字体文件。In one embodiment, when the processor implements the obtaining of the font file corresponding to the font identifier in the text processing request, it is configured to: obtain from the memory the corresponding font identifier in the text processing request. Font file.
在一个实施例中,所述处理器在实现所述从所述字体文件中获取所述目标文本对应的字体文字集,用于实现:将所述目标文本拆分为单个文字,得到所述目标文本的文字集;从所述字体文件中获取所述文字集中的每个文字各自对应的字体文字;将所述文字集中的每个文字各自对应的字体文字作为所述目标文本对应的字体文字集。In one embodiment, the processor obtains the font character set corresponding to the target text from the font file to achieve: split the target text into single characters to obtain the target A character set of the text; obtain the font character corresponding to each character in the character set from the font file; use the font character corresponding to each character in the character set as the font character set corresponding to the target text .
在一个实施例中,所述处理器在实现所述将所述目标文本拆分为单个文字,得到所述目标文本的文字集,用于实现:将所述目标文本拆分为单个文字,得到所述目标文本的候选文字集;对所述候选文字集中的重复文字进行处理,得到所述目标文本的文字集,其中,所述文字集中的文字不重复。In one embodiment, the processor implements the splitting of the target text into single characters to obtain a character set of the target text, which is used to realize: split the target text into single characters to obtain The candidate character set of the target text; the repeated characters in the candidate character set are processed to obtain the character set of the target text, wherein the characters in the character set are not repeated.
在一个实施例中,所述处理器在实现所述根据所述字体文字集,更新所述目标文本中的每个文字的字体时,用于实现:从所述字体文字集中获取所述目标文本中的每个文字各自对应的字体文字;将所述目标文本中的每个文字替换为每个文字各自对应的所述字体文字,以更新所述目标文本中的每个文字的字体。In one embodiment, when the processor implements the updating of the font of each character in the target text according to the font character set, the processor is configured to: obtain the target text from the font character set Each text in the corresponding font text; replace each text in the target text with the font text corresponding to each text, so as to update the font of each text in the target text.
需要说明的是,所属领域的技术人员可以清楚地了解到,为了描述的方便和简洁,上述描述计算机设备的具体工作过程,可以参考前述文本处理方法实施例中的对应过程,在此不再赘述。It should be noted that those skilled in the art can clearly understand that for the convenience and brevity of the description, the specific working process of the computer device described above can refer to the corresponding process in the foregoing text processing method embodiment, which will not be repeated here. .
本申请实施例还提供一种计算机可读存储介质,所述计算机可读存储介质上存储有计算机程序,其中所述计算机程序被处理器执行时,可实现上述文本处理方法中的部分或全部步骤。可选的,所述计算机程序中包括程序指令,所述程序指令被执行时所实现的方法可参照本申请文本处理方法的各个实施例。例如,所述计算机程序(或程序指令)被处理器执行时,可实现以下步骤:接收终端设备发送的文本处理请求,并获取所述文本处理请求中的字体标识符对应的字体文件;从所述文本处理请求中获取目标文本,并从所述字体文件中获取所述目标文本对应的字体文字集,其中,所述目标文本为待更新字体的文本;根据所述字体文字集,更新所述目标文本中的每个文字的字体,并将更新后的目标文本发送至所述终端设备。可选的,该计算机程序被处理器执行时,还可实现上述实施例中方法的其他步骤,这里不再赘述。The embodiments of the present application also provide a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, some or all of the steps in the above text processing method can be implemented. . Optionally, the computer program includes program instructions, and the method implemented when the program instructions are executed can refer to each embodiment of the text processing method of the present application. For example, when the computer program (or program instruction) is executed by the processor, the following steps can be implemented: receiving a text processing request sent by a terminal device, and obtaining a font file corresponding to the font identifier in the text processing request; The target text is obtained from the text processing request, and the font character set corresponding to the target text is obtained from the font file, wherein the target text is the text of the font to be updated; and the font character set is updated according to the font character set. The font of each character in the target text, and send the updated target text to the terminal device. Optionally, when the computer program is executed by the processor, other steps of the method in the foregoing embodiment may also be implemented, which will not be repeated here.
可选的,本申请涉及的介质如计算机可读存储介质可以是非易失性的,也可以是易失性的。Optionally, the medium involved in this application, such as a computer-readable storage medium, may be non-volatile or volatile.
其中,所述计算机可读存储介质可以是前述实施例所述的计算机设备的内部存储单元,例如所述计算机设备的硬盘或内存。所述计算机可读存储介质也可以是所述计算机设备的外部存储设备,例如所述计算机设备上配备的插接式硬盘,智能存储卡(Smart Media Card,SMC),安全数字(Secure Digital,SD)卡,闪存卡(Flash Card)等。The computer-readable storage medium may be the internal storage unit of the computer device described in the foregoing embodiment, for example, the hard disk or memory of the computer device. The computer-readable storage medium may also be an external storage device of the computer device, such as a plug-in hard disk, a smart memory card (Smart Media Card, SMC), and a secure digital (Secure Digital, SD) equipped on the computer device. ) Card, Flash Card, etc.
应当理解,在此本申请说明书中所使用的术语仅仅是出于描述特定实施例的目的而并不意在限制本申请。如在本申请说明书和所附权利要求书中所使用的那样,除非上下文清楚地指明其它情况,否则单数形式的“一”、“一个”及“该”意在包括复数形式。It should be understood that the terms used in the specification of this application are only for the purpose of describing specific embodiments and are not intended to limit the application. As used in the specification of this application and the appended claims, unless the context clearly indicates other circumstances, the singular forms "a", "an" and "the" are intended to include plural forms.
还应当理解,在本申请说明书和所附权利要求书中使用的术语“和/ 或”是指相关联列出的项中的一个或多个的任何组合以及所有可能组合,并且包括这些组合。需要说明的是,在本文中,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者系统不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者系统所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括该要素的过程、方法、物品或者系统中还存在另外的相同要素。It should also be understood that the term "and/or" used in the specification of this application and the appended claims refers to any combination of one or more of the associated listed items and all possible combinations, and includes these combinations. It should be noted that in this article, the terms "include", "include" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or system including a series of elements not only includes those elements, It also includes other elements that are not explicitly listed, or elements inherent to the process, method, article, or system. If there are no more restrictions, the element defined by the sentence "including a..." does not exclude the existence of other identical elements in the process, method, article, or system that includes the element.
上述本申请实施例序号仅仅为了描述,不代表实施例的优劣。以上所述,仅为本申请的具体实施方式,但本申请的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本申请揭露的技术范围内,可轻易想到各种等效的修改或替换,这些修改或替换都应涵盖在本申请的保护范围之内。因此,本申请的保护范围应以权利要求的保护范围为准。The serial numbers of the foregoing embodiments of the present application are for description only, and do not represent the superiority or inferiority of the embodiments. The above are only specific implementations of this application, but the protection scope of this application is not limited to this. Anyone familiar with the technical field can easily think of various equivalents within the technical scope disclosed in this application. Modifications or replacements, these modifications or replacements shall be covered within the protection scope of this application. Therefore, the protection scope of this application shall be subject to the protection scope of the claims.

Claims (20)

  1. 一种文本处理方法,其中,包括:A text processing method, which includes:
    接收终端设备发送的文本处理请求,并获取所述文本处理请求中的字体标识符对应的字体文件;Receiving a text processing request sent by a terminal device, and obtaining a font file corresponding to the font identifier in the text processing request;
    从所述文本处理请求中获取目标文本,并从所述字体文件中获取所述目标文本对应的字体文字集,其中,所述目标文本为待更新字体的文本;Obtaining target text from the text processing request, and obtaining a font character set corresponding to the target text from the font file, wherein the target text is the text of the font to be updated;
    根据所述字体文字集,更新所述目标文本中的每个文字的字体,并将更新后的目标文本发送至所述终端设备。According to the font character set, the font of each character in the target text is updated, and the updated target text is sent to the terminal device.
  2. 根据权利要求1所述的文本处理方法,其中,所述获取所述文本处理请求中的字体标识符对应的字体文件之前,还包括:The text processing method according to claim 1, wherein before said obtaining the font file corresponding to the font identifier in the text processing request, the method further comprises:
    确定所述文本处理请求中是否携带有字体标识符;Determine whether the text processing request carries a font identifier;
    若所述文本处理请求中未携带有字体标识符,则从所述文本处理请求中获取用户标识符,并获取所述用户标识符对应的字体标识符集;If the text processing request does not carry a font identifier, obtaining a user identifier from the text processing request, and obtaining a font identifier set corresponding to the user identifier;
    根据所述字体标识符集中每个字体标识符的属性信息,从所述字体标识符集中选择一个字体标识符作为目标字体标识符,并获取所述目标字体标识符对应的字体文件。According to the attribute information of each font identifier in the font identifier set, a font identifier is selected from the font identifier set as the target font identifier, and the font file corresponding to the target font identifier is obtained.
  3. 根据权利要求2所述的文本处理方法,其中,所述根据所述字体标识符集中每个字体标识符的属性信息,从所述字体标识符集中选择一个字体标识符作为目标字体标识符,包括:The text processing method according to claim 2, wherein the selecting a font identifier from the font identifier set as the target font identifier according to the attribute information of each font identifier in the font identifier set includes :
    根据所述字体标识符集中每个字体标识符的属性信息,确定每个所述字体标识符各自对应的优先级;Determine the respective priority of each font identifier according to the attribute information of each font identifier in the font identifier set;
    从所述字体标识符集中选择所述优先级最高的字体标识符作为目标字体标识符。The font identifier with the highest priority is selected from the font identifier set as the target font identifier.
  4. 根据权利要求1所述的文本处理方法,其中,所述获取所述文本处理请求中的字体标识符对应的字体文件,包括:The text processing method according to claim 1, wherein said obtaining the font file corresponding to the font identifier in the text processing request comprises:
    从内存中获取所述文本处理请求中的字体标识符对应的字体文件。The font file corresponding to the font identifier in the text processing request is obtained from the memory.
  5. 根据权利要求1至4中任一项所述的文本处理方法,其中,所述从所述字体文件中获取所述目标文本对应的字体文字集,包括:4. The text processing method according to any one of claims 1 to 4, wherein said obtaining a font character set corresponding to said target text from said font file comprises:
    将所述目标文本拆分为单个文字,得到所述目标文本的文字集;Split the target text into single words to obtain a character set of the target text;
    从所述字体文件中获取所述文字集中的每个文字各自对应的字体文字;Obtaining the font text corresponding to each text in the text set from the font file;
    将所述文字集中的每个文字各自对应的字体文字作为所述目标文本对应的字体文字集。The font character corresponding to each character in the character set is used as the font character set corresponding to the target text.
  6. 根据权利要求5所述的文本处理方法,其中,所述将所述目标文本拆分为单个文字,得到所述目标文本的文字集,包括:5. The text processing method according to claim 5, wherein said splitting said target text into single words to obtain a character set of said target text comprises:
    将所述目标文本拆分为单个文字,得到所述目标文本的候选文字集;Split the target text into single words to obtain a candidate word set of the target text;
    对所述候选文字集中的重复文字进行处理,得到所述目标文本的文字集,其中,所述文字集中的文字不重复。The repeated characters in the candidate character set are processed to obtain the character set of the target text, wherein the characters in the character set are not repeated.
  7. 根据权利要求1至4中任一项所述的文本处理方法,其中,所述根据所述字体文字集,更新所述目标文本中的每个文字的字体,包括:The text processing method according to any one of claims 1 to 4, wherein said updating the font of each character in said target text according to said font character set comprises:
    从所述字体文字集中获取所述目标文本中的每个文字各自对应的字体文字;Obtaining the font text corresponding to each text in the target text from the font text collection;
    将所述目标文本中的每个文字替换为每个文字各自对应的所述字体文字,以更新所述目标文本中的每个文字的字体。Replace each word in the target text with the font word corresponding to each word, so as to update the font of each word in the target text.
  8. 一种文本处理装置,其中,所述文本处理装置包括:A text processing device, wherein the text processing device includes:
    接收模块,用于接收终端设备发送的文本处理请求;The receiving module is used to receive the text processing request sent by the terminal device;
    获取模块,用于获取所述文本处理请求中的字体标识符对应的字体文件;An obtaining module, configured to obtain a font file corresponding to the font identifier in the text processing request;
    所述获取模块,还用于从所述文本处理请求中获取目标文本,并从所述字体文件中获取所述目标文本对应的字体文字集,其中,所述目标文本为待更新字体的文本;The obtaining module is further configured to obtain target text from the text processing request, and obtain a font character set corresponding to the target text from the font file, wherein the target text is the text of the font to be updated;
    字体更新模块,用于根据所述字体文字集,更新所述目标文本中的每个文字的字体;A font update module, configured to update the font of each character in the target text according to the font character set;
    发送模块,用于将更新后的目标文本发送至所述终端设备。The sending module is used to send the updated target text to the terminal device.
  9. 一种计算机设备,其中,所述计算机设备包括处理器、存储器、以及存储在所述存储器上并可被所述处理器执行的计算机程序,其中所述计算机程序被所述处理器执行时,实现以下步骤:A computer device, wherein the computer device includes a processor, a memory, and a computer program stored on the memory and executable by the processor, and when the computer program is executed by the processor, the The following steps:
    接收终端设备发送的文本处理请求,并获取所述文本处理请求中的字体标识符对应的字体文件;Receiving a text processing request sent by a terminal device, and obtaining a font file corresponding to the font identifier in the text processing request;
    从所述文本处理请求中获取目标文本,并从所述字体文件中获取所述目标文本对应的字体文字集,其中,所述目标文本为待更新字体的文本;Obtaining target text from the text processing request, and obtaining a font character set corresponding to the target text from the font file, wherein the target text is the text of the font to be updated;
    根据所述字体文字集,更新所述目标文本中的每个文字的字体,并将更新后的目标文本发送至所述终端设备。According to the font character set, the font of each character in the target text is updated, and the updated target text is sent to the terminal device.
  10. 根据权利要求9所述的计算机设备,其中,所述获取所述文本处理请求中的字体标识符对应的字体文件之前,所述计算机程序还被所述处理器执行以实现:9. The computer device according to claim 9, wherein before said obtaining the font file corresponding to the font identifier in the text processing request, the computer program is further executed by the processor to realize:
    确定所述文本处理请求中是否携带有字体标识符;Determine whether the text processing request carries a font identifier;
    若所述文本处理请求中未携带有字体标识符,则从所述文本处理请求中获取用户标识符,并获取所述用户标识符对应的字体标识符集;If the text processing request does not carry a font identifier, obtaining a user identifier from the text processing request, and obtaining a font identifier set corresponding to the user identifier;
    根据所述字体标识符集中每个字体标识符的属性信息,从所述字体标识符集中选择一个字体标识符作为目标字体标识符,并获取所述目标字体标识符对应的字体文件。According to the attribute information of each font identifier in the font identifier set, a font identifier is selected from the font identifier set as the target font identifier, and the font file corresponding to the target font identifier is obtained.
  11. 根据权利要求9所述的计算机设备,其中,所述获取所述文本处理请求中的字体标识符对应的字体文件时,具体实现:9. The computer device according to claim 9, wherein said obtaining the font file corresponding to the font identifier in the text processing request specifically implements:
    从内存中获取所述文本处理请求中的字体标识符对应的字体文件。The font file corresponding to the font identifier in the text processing request is obtained from the memory.
  12. 根据权利要求9至11中任一项所述的计算机设备,其中,所述从所述字体文件中获取所述目标文本对应的字体文字集时,具体实现:The computer device according to any one of claims 9 to 11, wherein, when the font character set corresponding to the target text is obtained from the font file, the specific implementation is as follows:
    将所述目标文本拆分为单个文字,得到所述目标文本的文字集;Split the target text into single words to obtain a character set of the target text;
    从所述字体文件中获取所述文字集中的每个文字各自对应的字体文字;Obtaining the font text corresponding to each text in the text set from the font file;
    将所述文字集中的每个文字各自对应的字体文字作为所述目标文本对应的字体文字集。The font character corresponding to each character in the character set is used as the font character set corresponding to the target text.
  13. 根据权利要求12所述的计算机设备,其中,所述将所述目标文本拆分为单个文字,得到所述目标文本的文字集时,具体实现:The computer device according to claim 12, wherein, when the target text is split into single characters to obtain the character set of the target text, the specific realization is implemented:
    将所述目标文本拆分为单个文字,得到所述目标文本的候选文字集;Split the target text into single words to obtain a candidate word set of the target text;
    对所述候选文字集中的重复文字进行处理,得到所述目标文本的文字集,其中,所述文字集中的文字不重复。The repeated characters in the candidate character set are processed to obtain the character set of the target text, wherein the characters in the character set are not repeated.
  14. 根据权利要求9至11中任一项所述的计算机设备,其中,所述根据所述字体文字集,更新所述目标文本中的每个文字的字体时,具体实现:11. The computer device according to any one of claims 9 to 11, wherein when the font of each character in the target text is updated according to the font character set, the specific implementation is implemented:
    从所述字体文字集中获取所述目标文本中的每个文字各自对应的字体文字;Obtaining the font text corresponding to each text in the target text from the font text collection;
    将所述目标文本中的每个文字替换为每个文字各自对应的所述字体文字,以更新所述目标文本中的每个文字的字体。Replace each word in the target text with the font word corresponding to each word, so as to update the font of each word in the target text.
  15. 一种计算机可读存储介质,其中,所述计算机可读存储介质上存储有计算机程序,其中所述计算机程序被处理器执行时,实现以下步骤:A computer-readable storage medium, wherein a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the following steps are implemented:
    接收终端设备发送的文本处理请求,并获取所述文本处理请求中的字体标识符对应的字体文件;Receiving a text processing request sent by a terminal device, and obtaining a font file corresponding to the font identifier in the text processing request;
    从所述文本处理请求中获取目标文本,并从所述字体文件中获取所述目标文本对应的字体文字集,其中,所述目标文本为待更新字体的文本;Obtaining target text from the text processing request, and obtaining a font character set corresponding to the target text from the font file, wherein the target text is the text of the font to be updated;
    根据所述字体文字集,更新所述目标文本中的每个文字的字体,并将更新后的目标文本发送至所述终端设备。According to the font character set, the font of each character in the target text is updated, and the updated target text is sent to the terminal device.
  16. 根据权利要求15所述的计算机可读存储介质,其中,所述获取所述文本处理请求中的字体标识符对应的字体文件之前,所述计算机程序还被所述处理器执行以实现:15. The computer-readable storage medium according to claim 15, wherein, before the obtaining the font file corresponding to the font identifier in the text processing request, the computer program is further executed by the processor to realize:
    确定所述文本处理请求中是否携带有字体标识符;Determine whether the text processing request carries a font identifier;
    若所述文本处理请求中未携带有字体标识符,则从所述文本处理请求中获取用户标识符,并获取所述用户标识符对应的字体标识符集;If the text processing request does not carry a font identifier, obtaining a user identifier from the text processing request, and obtaining a font identifier set corresponding to the user identifier;
    根据所述字体标识符集中每个字体标识符的属性信息,从所述字体标识符集中选择一个字体标识符作为目标字体标识符,并获取所述目标字体标识符对应的字体文件。According to the attribute information of each font identifier in the font identifier set, a font identifier is selected from the font identifier set as the target font identifier, and the font file corresponding to the target font identifier is obtained.
  17. 根据权利要求15所述的计算机可读存储介质,其中,所述获取所述文本处理请求中的字体标识符对应的字体文件时,具体实现:15. The computer-readable storage medium according to claim 15, wherein said obtaining the font file corresponding to the font identifier in the text processing request specifically implements:
    从内存中获取所述文本处理请求中的字体标识符对应的字体文件。The font file corresponding to the font identifier in the text processing request is obtained from the memory.
  18. 根据权利要求15至17中任一项所述的计算机可读存储介质,其中,所述从所述字体文件中获取所述目标文本对应的字体文字集时,具体实现:The computer-readable storage medium according to any one of claims 15 to 17, wherein, when the font character set corresponding to the target text is obtained from the font file, the specific implementation is as follows:
    将所述目标文本拆分为单个文字,得到所述目标文本的文字集;Split the target text into single words to obtain a character set of the target text;
    从所述字体文件中获取所述文字集中的每个文字各自对应的字体文字;Obtaining the font text corresponding to each text in the text set from the font file;
    将所述文字集中的每个文字各自对应的字体文字作为所述目标文本对应的字体文字集。The font character corresponding to each character in the character set is used as the font character set corresponding to the target text.
  19. 根据权利要求15所述的计算机可读存储介质,其中,所述将所述目标文本拆分为单个文字,得到所述目标文本的文字集时,具体实现:15. The computer-readable storage medium according to claim 15, wherein when the target text is split into single characters to obtain a character set of the target text, the specific implementation is as follows:
    将所述目标文本拆分为单个文字,得到所述目标文本的候选文字集;Split the target text into single words to obtain a candidate word set of the target text;
    对所述候选文字集中的重复文字进行处理,得到所述目标文本的文字集,其中,所述文字集中的文字不重复。The repeated characters in the candidate character set are processed to obtain the character set of the target text, wherein the characters in the character set are not repeated.
  20. 根据权利要求15至17中任一项所述的计算机可读存储介质,其中,所述根据所述字体文字集,更新所述目标文本中的每个文字的字体时,具体实现:The computer-readable storage medium according to any one of claims 15 to 17, wherein when the font of each character in the target text is updated according to the font character set, the specific implementation is achieved:
    从所述字体文字集中获取所述目标文本中的每个文字各自对应的字体文字;Obtaining the font text corresponding to each text in the target text from the font text collection;
    将所述目标文本中的每个文字替换为每个文字各自对应的所述字体文字,以更新所述目标文本中的每个文字的字体。Replace each word in the target text with the font word corresponding to each word, so as to update the font of each word in the target text.
PCT/CN2020/117435 2020-02-27 2020-09-24 Text processing method and apparatus, device, and computer-readable storage medium WO2021169267A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202010125207.7A CN111507063A (en) 2020-02-27 2020-02-27 Text processing method, device and equipment and computer readable storage medium
CN202010125207.7 2020-02-27

Publications (1)

Publication Number Publication Date
WO2021169267A1 true WO2021169267A1 (en) 2021-09-02

Family

ID=71874039

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/117435 WO2021169267A1 (en) 2020-02-27 2020-09-24 Text processing method and apparatus, device, and computer-readable storage medium

Country Status (2)

Country Link
CN (1) CN111507063A (en)
WO (1) WO2021169267A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20210089707A1 (en) * 2019-09-23 2021-03-25 Snap Inc. Personalized fonts

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111507063A (en) * 2020-02-27 2020-08-07 平安科技(深圳)有限公司 Text processing method, device and equipment and computer readable storage medium
CN113743051A (en) * 2021-08-10 2021-12-03 广州坚和网络科技有限公司 Font setting method, user terminal, server and system

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101196917A (en) * 2007-12-27 2008-06-11 腾讯科技(深圳)有限公司 Implementing method and apparatus for sharing letter form
CN103425631A (en) * 2013-07-19 2013-12-04 百度在线网络技术(北京)有限公司 Method and device for acquiring font files of target characters in document files
US20160092411A1 (en) * 2014-09-25 2016-03-31 Monotype Imaging Inc. Selectable Styles for Text Messaging System Font Service Providers
CN107153551A (en) * 2017-05-24 2017-09-12 努比亚技术有限公司 A kind of font switching method, mobile terminal and computer-readable recording medium
CN110209315A (en) * 2019-06-11 2019-09-06 北京字节跳动网络技术有限公司 The display methods of character, device, electronic equipment and storage medium in user interface
CN111507063A (en) * 2020-02-27 2020-08-07 平安科技(深圳)有限公司 Text processing method, device and equipment and computer readable storage medium

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101196917A (en) * 2007-12-27 2008-06-11 腾讯科技(深圳)有限公司 Implementing method and apparatus for sharing letter form
CN103425631A (en) * 2013-07-19 2013-12-04 百度在线网络技术(北京)有限公司 Method and device for acquiring font files of target characters in document files
US20160092411A1 (en) * 2014-09-25 2016-03-31 Monotype Imaging Inc. Selectable Styles for Text Messaging System Font Service Providers
CN107153551A (en) * 2017-05-24 2017-09-12 努比亚技术有限公司 A kind of font switching method, mobile terminal and computer-readable recording medium
CN110209315A (en) * 2019-06-11 2019-09-06 北京字节跳动网络技术有限公司 The display methods of character, device, electronic equipment and storage medium in user interface
CN111507063A (en) * 2020-02-27 2020-08-07 平安科技(深圳)有限公司 Text processing method, device and equipment and computer readable storage medium

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20210089707A1 (en) * 2019-09-23 2021-03-25 Snap Inc. Personalized fonts
US11520970B2 (en) * 2019-09-23 2022-12-06 Snap Inc. Personalized fonts
US11922111B2 (en) 2019-09-23 2024-03-05 Snap Inc. Personalized fonts

Also Published As

Publication number Publication date
CN111507063A (en) 2020-08-07

Similar Documents

Publication Publication Date Title
WO2021169267A1 (en) Text processing method and apparatus, device, and computer-readable storage medium
EP3244312B1 (en) A personal digital assistant
US7933960B2 (en) System and method for solving ambiguous meanings of unknown words used in instant messaging
US11272017B2 (en) Application notifications manifest
US20150032829A1 (en) Identifying relevant content in email
US10270728B1 (en) Managing notifications across services
US20160342449A1 (en) Data exchange across multiple computing devices through a proactive intelligent clipboard
CN112866111A (en) Flow table management method and device
CN111104479A (en) Data labeling method and device
WO2021051624A1 (en) Data acquisition method and apparatus, and electronic device and storage medium
CN113238843A (en) Task execution method, device, equipment and storage medium
CN113890712A (en) Data transmission method and device, electronic equipment and readable storage medium
CN109753424B (en) AB test method and device
WO2022105478A1 (en) Method and apparatus for previewing excel file online, and electronic device, and storage medium
CN108111598B (en) Cloud disk data issuing method and device and storage medium
CN108985805B (en) Method and device for selectively executing push task
US20070283271A1 (en) System and Method for Providing Indicators of Component Interaction Capability Across Navigation Elements
US10320727B1 (en) Managing document feedback on a sharing service using a messaging client
WO2020024824A1 (en) Method and device for determining user status identifier
CN105279140B (en) Text display method, server, terminal and system
US10616317B2 (en) Method and system for affinity load balancing
CN115543317A (en) Front-end page development method and device
CN114285906A (en) Message processing method and device, electronic equipment and storage medium
CN112528184A (en) Sending method and device of rich text mail, computer equipment and storage medium
WO2016107119A1 (en) Method and device for realizing unstructured supplementary service data menu

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 20920965

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 20920965

Country of ref document: EP

Kind code of ref document: A1