Chapter title style conversion method and device, electronic equipment and storage medium

文档序号:1253144 发布日期:2020-08-21 浏览:20次 中文

阅读说明:本技术 一种章节标题样式转换方法、装置、电子设备及存储介质 (Chapter title style conversion method and device, electronic equipment and storage medium ) 是由 叶师思 于 2019-02-14 设计创作,主要内容包括:本发明实施例提供了一种章节标题样式转换方法、装置、电子设备及存储介质。该方法包括:当检测到文档中新增一个段落时,调用章节标题特征库对段落进行特征匹配;其中,章节标题特征库中记录有:章节标题特征和章节标题特征对应的章节标题样式的映射关系;章节标题样式为文档编辑软件中预置的样式;当段落中存在与章节标题特征库中的章节标题特征匹配的内容时,利用所匹配的章节标题特征对应的章节标题样式对段落的章节标题样式进行转换,得到目标章节标题;调用多级列表功能,给目标章节标题生成章节编号。这样,可以在用户编辑文档的过程中,实时地对章节标题的样式进行转换,使得能够快速地转换得到规范的章节标题,提高了用户编辑文档的效率。(The embodiment of the invention provides a chapter title style conversion method and device, electronic equipment and a storage medium. The method comprises the following steps: when a new paragraph is detected in the document, calling a chapter and title feature library to perform feature matching on the paragraph; wherein, the chapter title feature library records: the mapping relation between the chapter title characteristics and the chapter title styles corresponding to the chapter title characteristics; the chapter title style is a style preset in the document editing software; when the content matched with the chapter title characteristics in the chapter title characteristic library exists in the paragraph, converting the chapter title styles of the paragraph by using the chapter title styles corresponding to the matched chapter title characteristics to obtain a target chapter title; and calling a multi-level list function to generate chapter numbers for the target chapter titles. Therefore, the style of the chapter titles can be converted in real time in the process of editing the document by the user, so that the standard chapter titles can be quickly converted, and the document editing efficiency of the user is improved.)

1. A chapter title style conversion method is applied to an electronic device and comprises the following steps:

when a new paragraph is detected in the document, calling a chapter and title feature library to perform feature matching on the paragraph; wherein, the chapter title feature library records: the mapping relation between the chapter title characteristics and the chapter title styles corresponding to the chapter title characteristics; the chapter title style is a style preset in document editing software;

when the paragraph has the content matched with the chapter title characteristics in the chapter title characteristic library, converting the chapter title style of the paragraph by using the chapter title style corresponding to the matched chapter title characteristics to obtain a target chapter title;

and calling a multi-level list function to generate chapter numbers for the target chapter titles.

2. The method of claim 1, further comprising, prior to the step of calling a chapter header feature library to feature match the paragraph:

downloading the chapter title feature library from a server when an open instruction for the document editing software is detected.

3. The method according to claim 1, wherein the step of calling the section title feature library to perform feature matching on the paragraph when detecting that a paragraph is newly added to the document comprises:

when the position of the cursor is the position of a paragraph of a preset type, detecting whether a line feed instruction is received;

when a line feed instruction is received, determining that a paragraph is newly added in the document;

and calling a chapter header feature library to perform feature matching on the newly added paragraphs.

4. The method according to claim 1, wherein when there is content in the paragraph that matches the chapter title feature in the chapter title feature library, the step of converting the chapter title style of the paragraph by using the chapter title style corresponding to the matched chapter title feature comprises:

when the paragraph has the content matched with the chapter and title characteristics in the chapter and title characteristic library, judging whether the chapter and title style of the paragraph is a preset style in the document editing software;

and when the chapter header style of the paragraph is not the preset style in the document editing software, converting the chapter header style of the paragraph by using the chapter header style corresponding to the matched chapter header characteristic.

5. The method of any of claims 1-4, further comprising, prior to the step of invoking a multilevel list function to generate a chapter number for the target chapter title,:

and when the target chapter number meeting a preset number rule exists in the target chapter title, deleting the target chapter number.

6. A chapter title style conversion device is applied to an electronic device, and comprises the following components:

the matching module is used for calling the chapter and title feature library to perform feature matching on a paragraph when a new paragraph is detected in the document; wherein, the chapter title feature library records: the mapping relation between the chapter title characteristics and the chapter title styles corresponding to the chapter title characteristics; the chapter title style is a style preset in document editing software;

the conversion module is used for converting the chapter title styles of the paragraphs by using the chapter title styles corresponding to the matched chapter title characteristics to obtain target chapter titles when the contents matched with the chapter title characteristics in the chapter title characteristic library exist in the paragraphs;

and the generation module is used for calling a multi-level list function and generating chapter numbers for the target chapter titles.

7. The apparatus of claim 6, further comprising:

and the downloading module is used for downloading the chapter and title feature library from a server when an opening instruction for the document editing software is detected before calling the chapter and title feature library to perform feature matching on the paragraph.

8. The apparatus of claim 6, wherein the matching module comprises:

the detection unit is used for detecting whether a line feed instruction is received or not when the position of the cursor is the position of a paragraph of a preset type;

the determining unit is used for determining that a paragraph is newly added in the document when a line feed instruction is received;

and the matching unit is used for calling the chapter title feature library to perform feature matching on the newly added paragraphs.

9. The apparatus of claim 6, wherein the conversion module comprises:

a judging unit, configured to judge whether a chapter title style of the paragraph is a preset style in the document editing software when there is content in the paragraph that matches the chapter title features in the chapter title feature library;

and the conversion unit is used for converting the chapter header style of the paragraph by using the chapter header style corresponding to the matched chapter header characteristic when the chapter header style of the paragraph is not the preset style in the document editing software.

10. The apparatus according to any one of claims 6-9, further comprising:

and the deleting module is used for deleting the target chapter number when the target chapter number meeting a preset number rule exists in the target chapter title before the target chapter title is generated with the chapter number.

11. An electronic device is characterized by comprising a processor, a communication interface, a memory and a communication bus, wherein the processor and the communication interface are used for realizing mutual communication by the memory through the communication bus;

a memory for storing a computer program;

a processor for implementing the method steps of any one of claims 1 to 5 when executing a program stored in the memory.

12. A readable storage medium, characterized in that the readable storage medium is a readable storage medium in an electronic device, in which a computer program is stored, which computer program, when being executed by a processor of the electronic device, realizes the method steps of any one of claims 1-5.

Technical Field

The present invention relates to the field of document processing technologies, and in particular, to a method and an apparatus for converting chapter title styles, an electronic device, and a storage medium.

Background

At present, users often input chapter titles of styles such as "first chapter, word processing summary", "second chapter, document edition", and "third chapter, document layout" into a document. However, the document editing software cannot automatically generate a document directory from these chapter titles, that is, the chapter titles are irregular chapter titles.

The document editing software can automatically code the number of the second chapter after the user inputs the chapter title of the first chapter and presses the enter key, so that the user can mistakenly assume that the chapter title made by the user is the standard chapter title without learning the making method of the standard chapter title. This results in a large amount of time for the user to subsequently change the style of the chapter title one by one to adjust the chapter title to a canonical chapter title that can generate a document catalog.

Disclosure of Invention

Embodiments of the present invention provide a method and an apparatus for converting chapter titles and styles, an electronic device, and a storage medium, so as to quickly convert the styles of chapter titles, thereby improving efficiency of a user in editing a document. The specific technical scheme is as follows:

in a first aspect, an embodiment of the present invention provides a chapter title style conversion method, which is applied to an electronic device, and the method may include:

when a new paragraph is detected in the document, calling a chapter and title feature library to perform feature matching on the paragraph; wherein, the chapter title feature library records: the mapping relation between the chapter title characteristics and the chapter title styles corresponding to the chapter title characteristics; the chapter title style is a style preset in the document editing software;

when the content matched with the chapter title characteristics in the chapter title characteristic library exists in the paragraph, converting the chapter title styles of the paragraph by using the chapter title styles corresponding to the matched chapter title characteristics to obtain a target chapter title;

and calling a multi-level list function to generate chapter numbers for the target chapter titles.

Optionally, before the step of calling the section title feature library to perform feature matching on the paragraph, the method may further include:

when an open instruction for the document editing software is detected, a chapter title feature library is downloaded from the server.

Optionally, when a paragraph is detected to be newly added to the document, the step of calling the section title feature library to perform feature matching on the paragraph may include:

when the position of the cursor is the position of a paragraph of a preset type, detecting whether a line feed instruction is received;

when a line feed instruction is received, determining that a paragraph is newly added in the document;

and calling a chapter header feature library to perform feature matching on the newly added paragraphs.

Optionally, when there is content in the paragraph that matches the chapter title feature in the chapter title feature library, the step of converting the chapter title style of the paragraph by using the chapter title style corresponding to the matched chapter title feature may include:

when the content matched with the chapter and title characteristics in the chapter and title characteristic library exists in the paragraph, judging whether the chapter and title style of the paragraph is a preset style in the document editing software;

and when the chapter title style of the paragraph is not the preset style in the document editing software, converting the chapter title style of the paragraph by using the chapter title style corresponding to the matched chapter title characteristic.

Optionally, before the step of calling the multi-level list function and generating the chapter number for the target chapter title, the method may further include:

and when the target chapter number meeting the preset numbering rule exists in the target chapter title, deleting the target chapter number.

In a second aspect, an embodiment of the present invention further provides a chapter title style conversion apparatus, which is applied to an electronic device, and the apparatus may include:

the matching module is used for calling the chapter and title feature library to perform feature matching on the paragraphs when a new paragraph is detected in the document; wherein, the chapter title feature library records: the mapping relation between the chapter title characteristics and the chapter title styles corresponding to the chapter title characteristics; the chapter title style is a style preset in the document editing software;

the conversion module is used for converting the chapter title styles of the paragraphs by using the chapter title styles corresponding to the matched chapter title characteristics to obtain target chapter titles when the contents matched with the chapter title characteristics in the chapter title characteristic library exist in the paragraphs;

and the generation module is used for calling a multi-level list function and generating chapter numbers for the target chapter titles.

Optionally, in an embodiment of the present invention, the apparatus may further include:

and the downloading module is used for downloading the chapter and title feature library from the server when an opening instruction for the document editing software is detected before calling the chapter and title feature library to perform feature matching on the paragraphs.

Optionally, in an embodiment of the present invention, the matching module may include:

the detection unit is used for detecting whether a line feed instruction is received or not when the position of the cursor is the position of a paragraph of a preset type;

the determining unit is used for determining that a paragraph is newly added in the document when the line feed instruction is received;

and the matching unit is used for calling the chapter title feature library to perform feature matching on the newly added paragraphs.

Optionally, in an embodiment of the present invention, the conversion module may include:

the judging unit is used for judging whether the chapter title style of the paragraph is a preset style in the document editing software or not when the content matched with the chapter title characteristics in the chapter title characteristic library exists in the paragraph;

and the conversion unit is used for converting the chapter title styles of the paragraphs by using the chapter title styles corresponding to the matched chapter title characteristics when the chapter title styles of the paragraphs are not preset styles in the document editing software.

Optionally, in an embodiment of the present invention, the apparatus may further include:

and the deleting module is used for deleting the target chapter number when the target chapter number meeting the preset number rule exists in the target chapter title before the generation of the chapter number for the target chapter title.

In a third aspect, an embodiment of the present invention further provides an electronic device, including a processor, a communication interface, a memory, and a communication bus, where the processor, the communication interface, and the memory complete mutual communication through the communication bus;

a memory for storing a computer program;

and the processor is used for realizing the method steps of the chapter header style conversion method when the program stored in the memory is executed.

In a fourth aspect, an embodiment of the present invention further provides a readable storage medium, where a computer program is stored in the readable storage medium, and the computer program, when executed by a processor of an electronic device, implements the method steps of any one of the chapter header style conversion methods described above.

In a fifth aspect, an embodiment of the present invention further provides a computer program product, which when run on an electronic device, causes the electronic device to perform: method steps of any of the above chapter header style conversion methods.

In the embodiment of the invention, when the electronic device detects that a paragraph is newly added in a document, the electronic device can call a chapter and title feature library to perform feature matching on the paragraph. Wherein, the chapter title feature library records: and mapping relation between the chapter title characteristics and the chapter title styles corresponding to the chapter title characteristics, wherein the chapter title styles are preset styles in the document editing software. When the content matched with the chapter title features in the chapter title feature library exists in the paragraph, the electronic device may convert the chapter title style of the paragraph by using the chapter title style corresponding to the matched chapter title features, so as to obtain the target chapter title. The electronic device can then invoke a multi-level listing function to generate a chapter number for the target chapter title. Therefore, the style of the chapter titles can be converted in real time in the process of editing the document by the user, so that the standard chapter titles can be quickly converted, and the document editing efficiency of the user is improved.

Drawings

In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.

Fig. 1 is a flowchart of a chapter title style conversion method according to an embodiment of the present invention;

fig. 2 is a schematic structural diagram of a chapter title style conversion apparatus according to an embodiment of the present invention;

fig. 3 is a schematic structural diagram of an electronic device according to an embodiment of the present invention.

Detailed Description

The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.

In order to solve the problems in the prior art, embodiments of the present invention provide a chapter title style conversion method, an apparatus, an electronic device, and a readable storage medium.

The following first describes a chapter title style conversion method provided by an embodiment of the present invention.

The chapter title style conversion method provided by the embodiment of the invention is applied to electronic equipment, and the electronic equipment can be provided with document editing software, so that a user can edit a document through the document editing software. The electronic devices in the embodiments of the present invention include, but are not limited to, computers and smart phones.

Referring to fig. 1, the chapter title style conversion method provided by the embodiment of the present invention may include the following steps:

s101: when a new paragraph is detected in the document, calling a chapter and title feature library to perform feature matching on the paragraph; wherein, the chapter title feature library records: the mapping relation between the chapter title characteristics and the chapter title styles corresponding to the chapter title characteristics; the chapter title style is a style preset in the document editing software;

the chapter title feature library may be a feature library stored in the document editing software in advance. Of course, the feature library may be downloaded from the server by the electronic device when the user opens the document editing software, that is, when the electronic device detects an open instruction for the document editing software. This is all reasonable.

For example, the server may learn the section title features corresponding to the student graduation papers and the section title styles corresponding to the section title features according to a machine learning algorithm and a large number of student graduation paper samples. The section title feature corresponding to the company document and the section title style corresponding to the section title feature may also be learned according to a machine learning algorithm and a large number of company document samples, which is not limited to this.

The chapter heading features may include: format features and/or character features, although not limited thereto. For example, one chapter title feature that may be learned may be: the format is "blue font" and includes characters "chapter i,", and the chapter title style corresponding to the chapter title feature is "title 1". Wherein denotes a wildcard character.

After learning the chapter title features and the chapter title styles corresponding to the chapter title features, the server may establish a chapter title feature library in which mapping relationships between the chapter title features and the chapter title styles are stored. And, after receiving the download instruction sent by the electronic device, the server may send the chapter title feature library to the electronic device.

Wherein, the title style of the chapter is a preset style in the document editing software. It is understood that the chapter titles, which are the titles of the preset styles in the document editing software, are canonical chapter titles and can be used to automatically generate the document catalog.

In addition, it can be understood that, when the electronic device detects that a new paragraph is added to the document, in order to avoid a situation that a large amount of time is required to change the chapter title style subsequently due to the fact that the added paragraph is an irregular chapter title, the electronic device may call the chapter title feature library to perform feature matching on the newly added paragraph, so as to detect whether the paragraph has features in the chapter title feature library. If yes, step S102 is triggered. If not, it indicates that the paragraph is not a chapter title, and step S102 need not be triggered.

The electronic device may determine whether a paragraph is newly added to the document by: the electronic equipment monitors whether a user inputs content into the document through the keyboard, and if so, the position of the cursor can be continuously judged whether to be located at the position of the paragraph of the preset type. When the position of the cursor is located at the position of the paragraph of the preset type, the electronic device may detect whether a line feed instruction (e.g., an enter instruction) is received. When a line feed instruction is received, it may be determined that a paragraph is newly added to the document. The paragraph of the preset type refers to a paragraph with a preset class name, such as a conventional text paragraph.

S102: when the content matched with the chapter title characteristics in the chapter title characteristic library exists in the paragraph, converting the chapter title styles of the paragraph by using the chapter title styles corresponding to the matched chapter title characteristics to obtain a target chapter title;

it is to be understood that when there is content in the paragraph that matches the chapter title feature in the chapter title feature library, the electronic device may further determine whether the chapter title style of the paragraph is a preset style in the document editing software. When the chapter title style of the paragraph is not the preset style in the document editing software, the chapter title at the moment is indicated to be an irregular chapter title, and the chapter title style of the paragraph can be converted by using the chapter title style corresponding to the matched chapter title characteristic at the moment.

When the chapter header style of the paragraph is a preset style in the document editing software, it indicates that the chapter header at this time is a canonical chapter header, and the execution may be abandoned: and converting the chapter title styles of the paragraphs by using the chapter title styles corresponding to the matched chapter title characteristics.

S103: and calling a multi-level list function to generate chapter numbers for the target chapter titles.

After obtaining the target chapter title in the document, the electronic device may detect whether a target chapter number meeting a preset number rule exists in the target chapter title. Wherein, the preset numbering rule may include: the number manually entered by the user. Such as the first chapter of user input, etc. When there is a target chapter number that satisfies the preset numbering rule, the electronic device may delete the target chapter number in the target chapter title. And numbering the target chapter titles after the target chapter numbers are deleted. Further, the document catalog may be generated using the chapter titles of the specification. Therefore, the style of the chapter titles can be converted in real time in the process of editing the document by the user, so that the standard chapter titles can be quickly converted, and the document editing efficiency of the user is improved.

For example, when the user manually enters "chapter x, XXX" and presses back the vehicle, the electronic device may detect that there is content in the paragraph that matches the chapter title features in the chapter title feature library. Wherein, the title content is input by the XXX user. The electronic device may then automatically apply a one-level title style (i.e., "title 1" style) to the paragraph, may delete the chapter title number "chapter i" manually entered by the user, and may also invoke the multi-level listing function to generate the chapter number for the title content "XXX".

In the embodiment of the invention, when the electronic device detects that a paragraph is newly added in a document, the electronic device can call a chapter and title feature library to perform feature matching on the paragraph. Wherein, the chapter title feature library records: and mapping relation between the chapter title characteristics and the chapter title styles corresponding to the chapter title characteristics, wherein the chapter title styles are preset styles in the document editing software. When the content matched with the chapter title features in the chapter title feature library exists in the paragraph, the electronic device may convert the chapter title style of the paragraph by using the chapter title style corresponding to the matched chapter title features, so as to obtain the target chapter title. The electronic device can then invoke a multi-level listing function to generate a chapter number for the target chapter title. Therefore, the style of the chapter titles can be converted in real time in the process of editing the document by the user, so that the standard chapter titles can be quickly converted, and the document editing efficiency of the user is improved.

In summary, the chapter header style conversion scheme provided by the embodiment of the invention can convert the style of the chapter header in real time in the process of editing the document by the user, so that the standard chapter header can be quickly converted, and the document editing efficiency of the user is improved.

Corresponding to the above method embodiment, an embodiment of the present invention further provides a chapter title style conversion apparatus, applied to an electronic device, and referring to fig. 2, the apparatus may include:

the matching module 201 is configured to, when a new paragraph is detected in the document, invoke a chapter header feature library to perform feature matching on the paragraph; wherein, the chapter title feature library records: the mapping relation between the chapter title characteristics and the chapter title styles corresponding to the chapter title characteristics; the chapter title style is a style preset in the document editing software;

the conversion module 202 is configured to, when there is content in the paragraph that matches the chapter title features in the chapter title feature library, convert the chapter title style of the paragraph by using the chapter title style corresponding to the matched chapter title features to obtain a target chapter title;

the generating module 203 is used for calling a multi-level list function and generating chapter numbers for the target chapter titles.

By applying the device provided by the embodiment of the invention, when the electronic equipment detects that a paragraph is newly added in the document, the electronic equipment can call the chapter and title feature library to perform feature matching on the paragraph. Wherein, the chapter title feature library records: and mapping relation between the chapter title characteristics and the chapter title styles corresponding to the chapter title characteristics, wherein the chapter title styles are preset styles in the document editing software. When the content matched with the chapter title features in the chapter title feature library exists in the paragraph, the electronic device may convert the chapter title style of the paragraph by using the chapter title style corresponding to the matched chapter title features, so as to obtain the target chapter title. The electronic device can then invoke a multi-level listing function to generate a chapter number for the target chapter title. Therefore, the style of the chapter titles can be converted in real time in the process of editing the document by the user, so that the standard chapter titles can be quickly converted, and the document editing efficiency of the user is improved.

Optionally, in an embodiment of the present invention, the apparatus may further include:

and the downloading module is used for downloading the chapter and title feature library from the server when an opening instruction for the document editing software is detected before calling the chapter and title feature library to perform feature matching on the paragraphs.

Optionally, in an embodiment of the present invention, the matching module 201 may include:

the detection unit is used for detecting whether a line feed instruction is received or not when the position of the cursor is the position of a paragraph of a preset type;

the determining unit is used for determining that a paragraph is newly added in the document when the line feed instruction is received;

and the matching unit is used for calling the chapter title feature library to perform feature matching on the newly added paragraphs.

Optionally, in an embodiment of the present invention, the conversion module 202 may include:

the judging unit is used for judging whether the chapter title style of the paragraph is a preset style in the document editing software or not when the content matched with the chapter title characteristics in the chapter title characteristic library exists in the paragraph;

and the conversion unit is used for converting the chapter title styles of the paragraphs by using the chapter title styles corresponding to the matched chapter title characteristics when the chapter title styles of the paragraphs are not preset styles in the document editing software.

Optionally, in an embodiment of the present invention, the apparatus may further include:

and the deleting module is used for deleting the target chapter number when the target chapter number meeting the preset number rule exists in the target chapter title before the generation of the chapter number for the target chapter title.

Corresponding to the above method embodiment, an embodiment of the present invention further provides an electronic device, referring to fig. 3, the electronic device includes a processor 301, a communication interface 302, a memory 303, and a communication bus 304, where the processor 301, the communication interface 302, and the memory 303 complete communication with each other through the communication bus 304;

a memory 303 for storing a computer program;

the processor 301 is configured to implement the method steps provided in any one of the above embodiments of the chapter header style conversion method when executing the program stored in the memory.

In the embodiment of the invention, when the electronic device detects that a paragraph is newly added in a document, the electronic device can call a chapter and title feature library to perform feature matching on the paragraph. Wherein, the chapter title feature library records: and mapping relation between the chapter title characteristics and the chapter title styles corresponding to the chapter title characteristics, wherein the chapter title styles are preset styles in the document editing software. When the content matched with the chapter title features in the chapter title feature library exists in the paragraph, the electronic device may convert the chapter title style of the paragraph by using the chapter title style corresponding to the matched chapter title features, so as to obtain the target chapter title. The electronic device can then invoke a multi-level listing function to generate a chapter number for the target chapter title. Therefore, the style of the chapter titles can be converted in real time in the process of editing the document by the user, so that the standard chapter titles can be quickly converted, and the document editing efficiency of the user is improved.

Corresponding to the above method embodiment, an embodiment of the present invention further provides a readable storage medium, where a computer program is stored in the readable storage medium, and the computer program, when executed by a processor of an electronic device, implements the method steps provided in any of the above chapter title style conversion method embodiments.

After the computer program stored in the readable storage medium provided by the embodiment of the present invention is executed by the processor of the electronic device, when the electronic device detects that a paragraph is newly added to a document, the electronic device may call the chapter and title feature library to perform feature matching on the paragraph. Wherein, the chapter title feature library records: and mapping relation between the chapter title characteristics and the chapter title styles corresponding to the chapter title characteristics, wherein the chapter title styles are preset styles in the document editing software. When the content matched with the chapter title features in the chapter title feature library exists in the paragraph, the electronic device may convert the chapter title style of the paragraph by using the chapter title style corresponding to the matched chapter title features, so as to obtain the target chapter title. The electronic device can then invoke a multi-level listing function to generate a chapter number for the target chapter title. Therefore, the style of the chapter titles can be converted in real time in the process of editing the document by the user, so that the standard chapter titles can be quickly converted, and the document editing efficiency of the user is improved.

Corresponding to the above method embodiments, the present invention further provides a computer program product containing instructions, which when run on an electronic device, causes the electronic device to perform the method steps of any one of the chapter, title, style conversion method embodiments in the above embodiments.

After the computer program provided by the embodiment of the invention is executed by the processor of the electronic device, when the electronic device detects that a paragraph is newly added in a document, the electronic device can call the chapter and title feature library to perform feature matching on the paragraph. Wherein, the chapter title feature library records: and mapping relation between the chapter title characteristics and the chapter title styles corresponding to the chapter title characteristics, wherein the chapter title styles are preset styles in the document editing software. When the content matched with the chapter title features in the chapter title feature library exists in the paragraph, the electronic device may convert the chapter title style of the paragraph by using the chapter title style corresponding to the matched chapter title features, so as to obtain the target chapter title. The electronic device can then invoke a multi-level listing function to generate a chapter number for the target chapter title. Therefore, the style of the chapter titles can be converted in real time in the process of editing the document by the user, so that the standard chapter titles can be quickly converted, and the document editing efficiency of the user is improved.

The communication bus mentioned in the electronic device may be a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. The communication bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one thick line is shown, but this does not mean that there is only one bus or one type of bus.

The communication interface is used for communication between the electronic equipment and other equipment.

The Memory may include a Random Access Memory (RAM) or a Non-Volatile Memory (NVM), such as at least one disk Memory. Optionally, the memory may also be at least one memory device located remotely from the processor.

The Processor may be a general-purpose Processor, including a Central Processing Unit (CPU), a Network Processor (NP), and the like; but may also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic device, discrete hardware component.

In the above embodiments, the implementation may be wholly or partially realized by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When loaded and executed on a computer, cause the processes or functions described in accordance with the embodiments of the invention to occur, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a network of computers, or other programmable device. The computer instructions may be stored in a computer readable storage medium or transmitted from one computer readable storage medium to another, for example, from one website site, computer, server, or data center to another website site, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, Digital Subscriber Line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device, such as a server, a data center, etc., that incorporates one or more of the available media. The usable medium may be a magnetic medium (e.g., floppy Disk, hard Disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., Solid State Disk (SSD)), among others.

It is noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.

All the embodiments in the present specification are described in a related manner, and the same and similar parts among the embodiments may be referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, as for the apparatus, the electronic device and the readable storage medium embodiments, since they are substantially similar to the method embodiments, the description is relatively simple, and in relation to the description, reference may be made to some parts of the description of the method embodiments.

The above description is only for the preferred embodiment of the present invention, and is not intended to limit the scope of the present invention. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention shall fall within the protection scope of the present invention.

12页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:试验标准工单修改信息处理方法、装置和计算机设备

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!