CN112395829B - Method and device for adding Chinese numbers to documents and electronic equipment - Google Patents

Method and device for adding Chinese numbers to documents and electronic equipment Download PDF

Info

Publication number
CN112395829B
CN112395829B CN201910706436.5A CN201910706436A CN112395829B CN 112395829 B CN112395829 B CN 112395829B CN 201910706436 A CN201910706436 A CN 201910706436A CN 112395829 B CN112395829 B CN 112395829B
Authority
CN
China
Prior art keywords
chinese
target
level
type
determining
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201910706436.5A
Other languages
Chinese (zh)
Other versions
CN112395829A (en
Inventor
蒙燕玲
辛洋
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Kingsoft Office Software Inc
Zhuhai Kingsoft Office Software Co Ltd
Original Assignee
Beijing Kingsoft Office Software Inc
Zhuhai Kingsoft Office Software Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Kingsoft Office Software Inc, Zhuhai Kingsoft Office Software Co Ltd filed Critical Beijing Kingsoft Office Software Inc
Priority to CN201910706436.5A priority Critical patent/CN112395829B/en
Publication of CN112395829A publication Critical patent/CN112395829A/en
Application granted granted Critical
Publication of CN112395829B publication Critical patent/CN112395829B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Document Processing Apparatus (AREA)

Abstract

The embodiment of the invention provides a method and a device for adding Chinese numbers to documents and electronic equipment, wherein the method comprises the following steps: when capturing a number input operation conforming to a first target form, determining a Chinese number included in the number input operation as a reference Chinese number; determining a first target number type corresponding to the first target form according to a preset corresponding relation between the form and the number type; determining a target Chinese numbering template in which the style of the Chinese numbering of the first level is the same as that of the reference Chinese numbering from Chinese numbering templates stored in a preset numbering template database; determining a first target Chinese number corresponding to the number input operation from the target Chinese number template according to the reference Chinese number and the first target number type; and adding the first target Chinese number to the position of the cursor in the document. By applying the embodiment of the invention, the document can be added with the proper Chinese number.

Description

Method and device for adding Chinese numbers to documents and electronic equipment
Technical Field
The present invention relates to the field of electronic document processing technologies, and in particular, to a method and an apparatus for adding a chinese number to a document, and an electronic device.
Background
In daily work, learning and life, users often need to make document editing by document editing software in an electronic device. When a user is writing a document with a few well-defined layers, such as a paper, it is often necessary to add multiple levels of numbering to the document.
Currently, when a user adds a multi-level number to a document, the electronic device can add a number to the document through an automatic numbering function according to characters input by the user. Specifically, when the electronic device obtains an instruction for adding a number, it will determine whether the currently input character includes a number, if so, a number corresponding to the last input number in the included numbers is selected from a default set of number templates, and is added to the document.
Because the electronic equipment cannot judge whether the characters containing Chinese are numbered or not, and a default set of numbering templates are designed according to the habit of western language numbering and do not accord with the habit of Chinese numbering, when a user needs to add Chinese numbering to a document, the added number of the electronic equipment in the document is likely to be unsuitable, and inconvenience is obviously brought to the user when the user composes the document.
Disclosure of Invention
The embodiment of the invention aims to provide a method and a device for adding Chinese numbers to a document and electronic equipment so as to add proper Chinese numbers to the document. The specific technical scheme is as follows:
in a first aspect, an embodiment of the present invention provides a method for adding a chinese number to a document, the method including:
when capturing a number input operation conforming to a first target form, determining a Chinese number included in the number input operation as a reference Chinese number;
determining a first target number type corresponding to the first target form according to a preset corresponding relation between the form and the number type;
determining a target Chinese numbering template in which the style of the Chinese numbering of the first level is the same as that of the reference Chinese numbering from Chinese numbering templates stored in a preset numbering template database;
determining a first target Chinese number corresponding to the number input operation from the target Chinese number template according to the reference Chinese number and the first target number type;
and adding the first target Chinese number to the position of the cursor in the document.
Optionally, the first target number type is an add subordinate number type;
The step of determining the first target Chinese number corresponding to the number input operation from the target Chinese number template according to the reference Chinese number and the first target number type includes:
and determining a lower Chinese number which corresponds to the level which is the next level of the reference Chinese number from the target Chinese number template, and taking the first Chinese number in the lower Chinese number as the first target Chinese number corresponding to the number input operation.
Optionally, the first target number type is an added peer number type;
the step of determining the first target Chinese number corresponding to the number input operation from the target Chinese number template according to the reference Chinese number and the first target number type includes:
determining the same-level Chinese number with the same level as the standard Chinese number from the target Chinese number template;
and determining a Chinese number corresponding to the reference Chinese number from the same-level Chinese numbers, and taking the Chinese number as a first target Chinese number corresponding to the number input operation.
Optionally, after the step of adding the first target chinese number to the position of the cursor in the document, the method further includes:
When capturing a number input operation conforming to a second target form, determining a second target number type corresponding to the second target form according to the corresponding relation between the form and the number type;
determining a second target Chinese number corresponding to the number input operation from the target Chinese number template according to the current Chinese number and the second target number type, wherein the current Chinese number is a Chinese number closest to the position of the cursor in the document when the number input operation conforming to a second target form is captured;
and adding the second target Chinese number to the position of the cursor in the document.
Optionally, the second target number type is an add upper level number type;
the step of determining the second target Chinese number corresponding to the number input operation from the target Chinese number template according to the current Chinese number and the second target number type comprises the following steps:
judging whether the current Chinese number pattern is the same as the first-level number pattern in the target Chinese number template;
if the current Chinese number is different, determining that the corresponding level is the upper Chinese number of the previous level of the current Chinese number from the target Chinese number template;
And determining a Chinese number matched with the Chinese number at the upper level of the current Chinese number from the upper-level Chinese numbers, and taking the Chinese number as a second target Chinese number corresponding to the number input operation.
Optionally, the chinese numbering templates stored in the numbering template database include a plurality of levels of numbers, and at least a first level of the plurality of levels of numbers is a chinese number.
In a second aspect, an embodiment of the present invention provides an apparatus for adding a chinese number to a document, the apparatus including:
the reference number determining module is used for determining a Chinese number included in the number input operation as a reference Chinese number when the number input operation conforming to the first target form is captured;
the first type determining module is used for determining a first target number type corresponding to the first target form according to the corresponding relation between the preset form and the number type;
the target template determining module is used for determining a target Chinese number template with the same pattern of the Chinese number of the first level as that of the standard Chinese number from Chinese number templates stored in a preset number template database;
The first number determining module is used for determining a first target Chinese number corresponding to the number input operation from the target Chinese number template according to the reference Chinese number and the first target number type;
and the first number adding module is used for adding the first target Chinese number to the position of the cursor in the document.
Optionally, the first target number type is an add subordinate number type;
the first number determining module includes:
and the target lower-level number determining sub-module is used for determining the lower-level Chinese number which corresponds to the level next to the standard Chinese number from the target Chinese number template, and taking the first Chinese number in the lower-level Chinese number as the first target Chinese number corresponding to the number input operation.
Optionally, the first target number type is an added peer number type;
the first number determining module includes:
the same-level number determining sub-module is used for determining the same-level Chinese number with the same level as the standard Chinese number from the target Chinese number template;
and the target peer number determining sub-module is used for determining a Chinese number corresponding to the reference Chinese number from the peer Chinese numbers and is used as a first target Chinese number corresponding to the number input operation.
Optionally, the apparatus further includes:
the second type determining module is used for determining a second target number type corresponding to a second target form according to the corresponding relation between the form and the number type when capturing the number input operation conforming to the second target form after the first target Chinese number is added to the position of the cursor in the document;
the second number determining module is used for determining a second target Chinese number corresponding to the number input operation from the target Chinese number template according to the current Chinese number and the second target number type, wherein the current Chinese number is a Chinese number closest to the position of the cursor in the document when the number input operation conforming to the second target form is captured;
and the second number adding module is used for adding the second target Chinese number to the position of the cursor in the document.
Optionally, the second target number type is an add upper level number type;
the second number determining module includes:
the judging submodule is used for judging whether the current Chinese number pattern is the same as the first-level number pattern in the target Chinese number template;
The upper-level number determining sub-module is used for determining that the corresponding level is the upper-level Chinese number of the previous level of the current Chinese number from the target Chinese number template if the pattern of the current Chinese number is different from the pattern of the first-level number in the target Chinese number template;
and the target upper-level number determining sub-module is used for determining a Chinese number matched with the upper-level Chinese number of the current Chinese number from the upper-level Chinese numbers, and taking the Chinese number as a second target Chinese number corresponding to the number input operation.
Optionally, the chinese numbering templates stored in the numbering template database include a plurality of levels of numbers, and at least a first level of the plurality of levels of numbers is a chinese number.
In a third aspect, an embodiment of the present invention 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 communication with each other through the communication bus;
a memory for storing a computer program;
and the processor is used for realizing any of the method steps for adding Chinese numbers to the document when executing the program stored in the memory.
In a fourth aspect, an embodiment of the present invention provides a computer readable storage medium, where a computer program is stored, where the computer program when executed by a processor implements any of the above-mentioned method steps for adding a chinese number to a document.
In the scheme provided by the embodiment of the invention, when the number input operation conforming to the first target form is captured, the electronic equipment can determine the Chinese number included in the number input operation as the reference Chinese number, then determine the first target number type corresponding to the first target form according to the corresponding relation between the preset form and the number type, then determine the target Chinese number template in which the style of the first-level Chinese number is the same as the style of the reference Chinese number from the Chinese number templates stored in the preset number template database, and further determine the first target Chinese number corresponding to the number input operation from the target Chinese number template according to the reference Chinese number and the first target number type, so that the first target Chinese number can be added at the position of the cursor in the document. Thus, the electronic equipment can add proper Chinese numbers to the document according to the characters input by the user, thereby providing convenience for the user to write the document. Of course, it is not necessary for any one product or method of practicing the invention to achieve all of the advantages set forth above at the same time.
Drawings
In order to more clearly illustrate the embodiments of the invention or the technical solutions in the prior art, the drawings that are required in the embodiments or the description of the prior art will be briefly described, it being obvious that the drawings in the following description are only some embodiments of the invention, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a flow chart of a method for adding Chinese numbers to documents according to an embodiment of the present invention;
FIG. 2 is a flow chart of a manner in which numbers are added to documents based on the embodiment shown in FIG. 1;
FIG. 3 is a flow chart of a manner in which superior numbers are added to documents based on the embodiment shown in FIG. 2;
FIG. 4 is a schematic diagram of a device for adding Chinese numbers to documents according to an embodiment of the present invention;
fig. 5 is a schematic structural diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
The following description of the embodiments of the present invention will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present invention, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
In order to facilitate a user to write a document and add a proper Chinese number to the document, the embodiment of the invention provides a method, a device, electronic equipment and a computer readable storage medium for adding the Chinese number to the document.
The method for adding Chinese numbers to the document provided by the embodiment of the invention is first described below.
The method for adding the Chinese number to the document provided by the embodiment of the invention can be applied to any electronic equipment needing to add the Chinese number to the document, for example, computers, mobile phones, processors and the like, and is not particularly limited. For convenience of description, the following is abbreviated as electronic equipment.
As shown in fig. 1, a method for adding a chinese number to a document, the method comprising:
s101, when a number input operation conforming to a first target form is captured, determining a Chinese number included in the number input operation as a reference Chinese number;
s102, determining a first target number type corresponding to the first target form according to a preset corresponding relation between the form and the number type;
s103, determining a target Chinese number template with the same pattern of the first-level Chinese number as that of the reference Chinese number from Chinese number templates stored in a preset number template database;
S104, determining a first target Chinese number corresponding to the number input operation from the target Chinese number template according to the reference Chinese number and the first target number type;
s105, adding the first target Chinese number to the position of the cursor in the document.
It can be seen that, in the scheme provided by the embodiment of the present invention, when capturing a number input operation conforming to a first target form, an electronic device may determine a chinese number included in the number input operation as a reference chinese number, then determine, according to a preset correspondence between a form and a number type, the first target number type corresponding to the first target form, and then determine, from chinese number templates stored in a preset number template database, a target chinese number template in which a style of the chinese number of the first level is the same as a style of the reference chinese number, and further determine, according to the reference chinese number and the first target number type, the first target chinese number corresponding to the number input operation from the target chinese number template, so that the first target chinese number may be added to a position of a cursor in a document. Thus, the electronic equipment can add proper Chinese numbers to the document according to the characters input by the user, thereby providing convenience for the user to write the document.
In order to facilitate understanding of the schemes provided by the embodiments of the present invention, first, the number levels in the schemes provided by the embodiments of the present invention are described. The number level can comprise a lower level, a same level and an upper level, wherein the number level is divided according to Chinese language habits, and the lower level number is the number of the next level of the current number; the same-level number is the number of the same level as the current number; the upper level number is the number of the level above the current number. For example, for the number "(a)", its lower-level number may be "1", its peer number may be "(b)", and its upper-level number may be "a".
In order to facilitate the user to add numbers in the document, the electronic device can preset the form of the input operation corresponding to each number type, so that when the user needs to add Chinese numbers in the document, the electronic device can send out various forms of number input operation, and the electronic device can capture the number input operation sent by the user.
The input operation modes corresponding to the preset number types can be "Chinese number+space+text content+carriage return", "Chinese number+pause number+text content+carriage return", and the like. In order to conveniently determine the Chinese number which the user wants to add, the input operation form corresponding to each number type can be preset to include the Chinese number, and the Chinese number is the Chinese number which the user wants to add.
After capturing the number input operation sent by the user, the electronic device can determine whether the number input operation accords with the first target form, if so, the electronic device can determine the Chinese number included in the number input operation and take the Chinese number as a reference Chinese number.
After the reference chinese number is obtained, since the number input operations in different forms correspond to different number types, in order to determine the number type corresponding to the number input operation conforming to the first target form, the electronic device may execute the step S102, that is, determine the first target number type corresponding to the first target form according to the preset correspondence between the form and the number type.
The electronic device may preset a correspondence between a form and a number type, and when capturing a number input operation conforming to a first target form, determine the number type corresponding to the form of the number input operation according to the correspondence.
For example, the correspondence between the preset form and the number type may be as follows:
sequence number Form of the invention Numbering type
1 Chinese number + space + text content + carriage return + Tab Adding a subordinate number type
2 Chinese number + space + text content + carriage return Adding a peer number type
3 Chinese number + space + text content + carriage return Adding a higher-level number type
Then, according to the above table, when the captured number input operation is in the form of "chinese number+space+text content+enter", the electronic device may determine that the corresponding number type is the added peer number type.
Since the user often adds a chinese number to the document starting from the first-level number, the reference chinese number is typically the first-level number in the document. Therefore, in the above step S103, the electronic device may determine a target chinese-numbering template in which the style of the chinese number of the first level is identical to the style of the reference chinese number from chinese-numbering templates stored in a preset numbering template database.
Wherein, the style is information in grammar form capable of representing Chinese number. For example, the patterns of the chinese numbers "first chapter", "second chapter", and "third chapter" are: "chapter x", x is a lowercase Chinese number.
For example, the Chinese numbering templates stored in the numbering template database may be as shown in the following table:
Chinese numbering template name First level of Second level Third grade Fourth level Fifth level
B1 1. 1 st 1、 (1) 1)
B2 Chapter 1 Section 1 First class 1. 1、
B3 First part 1. Section 1 First time of class (one)
Then, according to the above table, when the reference chinese number is "the first part", the electronic device can determine the target chinese number template as the chinese number template B3 in the above table.
Each chinese numbering template stored in the numbering template database may comprise a plurality of levels of chinese numbering. Therefore, after determining the target chinese number template, in order to determine an appropriate chinese number from the plurality of chinese numbers, the electronic device may execute step S104 described above, that is, determine the first target chinese number corresponding to the number input operation from the target chinese number template according to the reference chinese number and the first target number type.
For example, the target chinese numbering template A1 determined by the electronic device is shown in the following table:
chinese numbering template name First level of Second level Third grade Fourth level Fifth level
A1 First part Chapter 1 Section 1 First time of class (one)
According to the above table, when the reference chinese number is "first portion" and the first target number type is the added lower number type, the electronic device can determine the next level number of the reference chinese number from the target chinese number template A1, that is, the second level chinese number "first chapter" is the first target chinese number.
When editing a document, the user typically holds the cursor at the position where the user wants to input information, so after determining the first target chinese number, the electronic device may execute step S105, i.e., add the first target chinese number to the document at the position where the cursor is located.
As an implementation manner provided by the embodiment of the present invention, the first target number type may be an add lower number type.
Because the forms of the number input operations captured by the electronic device each time may be different, the first target number type determined by the electronic device through the corresponding relation between the preset form and the number type may also have multiple types, in one case, the form of the number input operation accords with the form corresponding to the added lower-level number type, and then the electronic device may determine that the first target number type is the added lower-level number type.
For this case, the step of determining the first target chinese number corresponding to the number input operation from the target chinese number template according to the reference chinese number and the first target number type may include:
and determining a lower Chinese number which corresponds to the level which is the next level of the reference Chinese number from the target Chinese number template, and taking the first Chinese number in the lower Chinese number as the first target Chinese number corresponding to the number input operation.
Wherein, the Chinese numbers of each level in the target Chinese number template may include a plurality of Chinese numbers of the same level. For example, the target chinese numbering template A2 may be as shown in the following table:
the first target number type determined by the electronic device is an added lower-level number type, which indicates that a user needs to add a Chinese number of a next level of the reference Chinese number in the document. Therefore, the electronic device can determine the next Chinese number with the level being the next level of the reference Chinese number from the target Chinese number template.
For example, the pattern of the reference chinese number Z1 is the same as the pattern of the first-level chinese number in the target chinese number template A2, and then the reference chinese number Z1 is the first-level chinese number in the target chinese number template A2. Thus, the electronic device can determine the second-level Chinese number "first section", "second section", "third section", etc. in the target Chinese number template A2 as the lower-level Chinese number.
When the electronic device captures the number input operation conforming to the first target form, the next-stage Chinese number of the reference Chinese number does not exist in the document, and the user needs to add the next-stage Chinese number of the reference Chinese number at the moment, so that the user needs to start adding from the first Chinese number in the next-stage Chinese number. Therefore, the electronic device can use the first Chinese number in the lower Chinese numbers as the first target Chinese number corresponding to the number input operation.
For example, if the target chinese number template determined by the electronic device is the chinese number template A2, when the lower-level chinese number is the second-level chinese number in the target chinese number template A2, the electronic device may determine the first chinese number "first section" in the lower-level chinese number as the first target chinese number.
It can be seen that, in this embodiment, the electronic device may determine, from the target chinese number template, a lower chinese number corresponding to a level next to the reference chinese number, and use a first chinese number in the lower chinese number as the first target chinese number corresponding to the number input operation. Thus, when the first target number type is the type of adding the lower-level number, the electronic equipment can add the Chinese number of the next level of the standard Chinese number in the document, thereby meeting the requirements of users.
As an implementation manner provided by the embodiment of the present invention, the first target number type may be an added peer number type.
Because the forms of the number input operations captured by the electronic device each time may be different, the first target number type determined by the electronic device through the corresponding relation between the preset form and the number type may also have multiple types, in one case, the form of the number input operation accords with the form corresponding to the added peer number type, and then the electronic device may determine that the first target number type is the added peer number type.
For this case, the step of determining the first target chinese number corresponding to the number input operation from the target chinese number template according to the reference chinese number and the first target number type may include:
determining the same-level Chinese number with the same level as the standard Chinese number from the target Chinese number template; and determining a Chinese number corresponding to the reference Chinese number from the same-level Chinese numbers, and taking the Chinese number as a first target Chinese number corresponding to the number input operation.
Wherein, the Chinese numbers of each level in the target Chinese number template may include a plurality of Chinese numbers of the same level. For example, the target chinese numbering template A3 may be as shown in the following table:
the first target number type determined by the electronic equipment is an added peer number type, which indicates that a user needs to add Chinese numbers with the same level as the reference Chinese number in the document. Therefore, the electronic device can determine the same-level Chinese number with the same level as the standard Chinese number from the target Chinese number template.
For example, the pattern of the reference chinese number Z2 is the same as the pattern of the first-level chinese number in the target chinese number template A3, and then the reference chinese number Z2 is the first-level chinese number in the target chinese number template A3. Thus, the electronic device can determine the first-level Chinese number "first lesson", "second lesson", "third lesson", etc. in the target Chinese number template A3 as the same-level Chinese number.
When the electronic device captures the number input operation conforming to the first target form, the same-level Chinese number of the reference Chinese number does not exist in the document, and at the moment, the user needs to add the same-level Chinese number of the reference Chinese number, and the user needs to start to add the Chinese number corresponding to the reference Chinese number in the same-level Chinese number. Therefore, the electronic device can determine the Chinese number corresponding to the reference Chinese number from the same-level Chinese numbers as the first target Chinese number corresponding to the number input operation.
For example, when the target chinese number template determined by the electronic device is the chinese number template A3, and the reference chinese number is "second lesson", the electronic device may determine that the same-level chinese number is the first-level chinese number of the target chinese number template A3, and then may determine that, in the first-level chinese number, the chinese number corresponding to "second lesson" is "third lesson", and then "third lesson" is the first target chinese number.
It can be seen that, in this embodiment, the electronic device may determine, from the target chinese number template, a co-level chinese number corresponding to the same level as the level of the reference chinese number, and then determine, from the co-level chinese numbers, a chinese number corresponding to the reference chinese number, as the first target chinese number corresponding to the number input operation. Thus, when the first target number type is the type of adding the same level number, the electronic equipment can add the Chinese number with the same level as the standard Chinese number in the document, thereby meeting the requirement of users.
As an implementation manner provided by the embodiment of the present invention, after the step of adding the first target chinese number to the position of the cursor in the document, as shown in fig. 2, the method may further include:
s201, when a number input operation conforming to a second target form is captured, determining a second target number type corresponding to the second target form according to the corresponding relation between the form and the number type;
after adding the first target Chinese number, the user may need to continue to add the number, so that the number input operation can be continuously sent out, the electronic device can capture the number input operation continuously sent out by the user, then determine whether the number input operation accords with the second target form, and if so, indicate that the user wants to continue to add the number in the document.
Because the number input operations in different forms correspond to different number types, in order to determine the number type corresponding to the number input operation in accordance with the second target form, the electronic device may determine the second target number type corresponding to the second target form according to the preset correspondence between the form and the number type.
The electronic device may preset a correspondence between a form and a number type, and when capturing a number input operation conforming to the second target form, determine the number type corresponding to the form of the number input operation according to the correspondence.
For example, the correspondence between the preset form and the number type may be as follows:
sequence number Form of the invention Numbering type
1 Carriage return + Tab Adding a subordinate number type
2 Carriage return Adding a peer number type
3 Carriage return + carriage return Adding a higher-level number type
Then, according to the above table, when the captured number input operation is in the form of "carriage return+tab", the electronic device can determine that the corresponding number type is the added lower number type.
S202, determining a second target Chinese number corresponding to the number input operation from the target Chinese number template according to the current Chinese number and the second target number type;
the current Chinese number is the nearest Chinese number to the position of the cursor in the document when the number input operation conforming to the second target form is captured.
When the electronic device captures the number input operation conforming to the second target form, a plurality of Chinese numbers may be added in the document, wherein the Chinese number closest to the position of the cursor in the document when the number input operation is captured, that is, the current Chinese number, is the Chinese number input recently by the user, and the next number which the user wants to input is associated with the Chinese number input recently, so after determining the second target number type, the electronic device can determine the second target Chinese number corresponding to the number input operation from the target Chinese number template according to the current Chinese number and the second target number type.
Since the specific manner of determining the second target chinese number corresponding to the number input operation from the target chinese number template according to the current chinese number and the second target number type is the same as the specific manner of determining the first target chinese number corresponding to the number input operation from the target chinese number template according to the reference chinese number and the first target number type, reference may be made to the description of determining the first target chinese number portion, and thus will not be repeated herein.
S203, adding the second target Chinese number to the position of the cursor in the document.
When editing a document, the user typically holds the cursor at the position where the user wants to input information, so that after determining the second target chinese number, the electronic device can add the second target chinese number to the document at the position where the cursor is located.
It can be seen that, in this embodiment, when capturing a number input operation conforming to a second target form, the electronic device may determine, according to a correspondence between the form and the number type, a second target number type corresponding to the second target form, and then determine, according to a current chinese number and the second target number type, a second target chinese number corresponding to the number input operation from the target chinese number template, and further add the second target chinese number to a position of a cursor in a document. Therefore, the electronic equipment can continuously add the second target Chinese number in the document after adding the first target Chinese number in the document according to the number input operation of the user, and can continuously add the third target Chinese number, the fourth target Chinese number and the like until the document writing is completed, and the specific adding mode is the same as the adding mode of the second target Chinese number, so that the document writing efficiency can be improved.
As an implementation manner provided by the embodiment of the present invention, the second target number type may be an add upper level number type.
Since the forms of the number input operations captured by the electronic device each time may be different, the second target number type determined by the electronic device through the corresponding relation between the preset form and the number type may also have multiple types, in one case, the form of the number input operation accords with the form corresponding to the added upper-level number type, and then the first target number type that the electronic device may determine is the added upper-level number type.
For this case, as shown in fig. 3, the step of determining, from the target chinese number template, the second target chinese number corresponding to the number input operation according to the current chinese number and the second target number type may include:
s301, judging whether the current Chinese number pattern is the same as the first-level number pattern in the target Chinese number template, and if so, not executing number adding operation; if not, executing step S302;
the current chinese number is a chinese number of a certain level in the target chinese number template, for example, the current chinese number may be a first level chinese number, a second level chinese number, etc. in the target chinese number template. If the current Chinese number is the first-level Chinese number in the target Chinese number, the current Chinese number does not have the previous-level Chinese number, so the electronic device can determine whether the current Chinese number is the same as the first-level Chinese number in the target Chinese number template to determine whether to execute the number adding operation.
If the current Chinese number is the number of the first level in the target Chinese number template, the previous Chinese number of the current Chinese number does not exist in the target Chinese number template, and the number input operation conforming to the second target form input by the user is likely to be misoperation, so that the electronic equipment can not execute the number adding operation.
If the current Chinese number is not the first level number in the target Chinese number template, the electronic device may execute step S302 if the current Chinese number is not the first level number in the target Chinese number template.
S302, determining the corresponding level as the upper Chinese number of the level above the current Chinese number from the target Chinese number template;
the second target number type determined by the electronic device is an add upper level number type, which indicates that the user needs to add the Chinese number of the upper level of the current Chinese number in the document. Therefore, the electronic device can determine the upper Chinese number with the corresponding level being the upper level of the current Chinese number from the target Chinese number template.
For example, if the current chinese number is the third-level chinese number in the corresponding target chinese number template, the electronic device may determine that the second-level chinese number in the target chinese number template is the upper-level chinese number.
S303, determining a Chinese number matched with the previous Chinese number of the current Chinese number from the previous Chinese numbers as a second target Chinese number corresponding to the number input operation.
When adding the previous-level Chinese number of the current Chinese number in the document, if the previous-level Chinese number of the current Chinese number exists in the document, the electronic equipment can determine the Chinese number matched with the previous-level Chinese number of the current Chinese number from the previous-level Chinese numbers and take the Chinese number as the second target Chinese number corresponding to the number input operation because the number needs to be continuously added on the basis of the previous-level Chinese number of the current Chinese number existing in the document. For example, if the previous level of the current chinese number already present in the document is "second section", then the second target chinese number desired by the user is "third section".
For example, assume that the electronic device determines a target chinese numbering template A4 as shown in the following table:
if the previous-level Chinese number of the current Chinese number existing in the document is the first class, the electronic device can determine that the previous-level Chinese number is the third-level Chinese number in the target Chinese number template A4, and then determine that the Chinese number matched with the first class is the second class in the third-level Chinese number, and the second class is the second target Chinese number.
It can be seen that, in this embodiment, the electronic device may determine whether the current chinese number is the same as the first-level chinese number in the target chinese number template, and if not, determine, from the target chinese number template, a higher-level chinese number corresponding to the level that is a higher level than the current chinese number, and then determine, from the higher-level chinese numbers, a chinese number that matches the higher-level chinese number of the current chinese number as the second target chinese number corresponding to the number input operation. Therefore, when the second target number type is the type of adding the upper-level number, the electronic equipment can add the Chinese number of the upper level of the current Chinese number in the document, so that the user requirement is met.
In one embodiment, the second target number type may be an add lower number type. In this case, the user needs to add the next-level chinese number of the current chinese number to the document, and then the electronic device may determine, from the target chinese number template, the next-level chinese number of which the corresponding level is the next level of the current chinese number, and then use the first chinese number in the next-level chinese number as the second target chinese number corresponding to the number input operation.
Since the specific manner of the above embodiment is the same as the specific manner of determining the next-level lower-level chinese number whose level corresponds to the reference chinese number from the target chinese number template, and using the first chinese number in the lower-level chinese number as the first target chinese number corresponding to the number input operation, the description of the portion for determining the first target chinese number may be referred to, and will not be repeated herein.
In another embodiment, the second target number type may be an add peer number type. In this case, the user needs to add the same-level chinese number of the current chinese number to the document, and then the electronic device may determine the same-level chinese number of the same level as the level of the current chinese number from the target chinese number template, and then determine the chinese number corresponding to the current chinese number from the same-level chinese numbers as the second target chinese number corresponding to the number input operation.
Since the specific manner of the above embodiment is the same as that of the above-mentioned peer chinese number, which is determined from the target chinese number template and has the same level as that of the reference chinese number, the chinese number corresponding to the reference chinese number is determined from the peer chinese numbers, and the specific manner of the first target chinese number corresponding to the number input operation is the same, and the description of the above-mentioned portion for determining the first target chinese number will not be repeated here.
As an implementation manner provided by the embodiment of the present invention, the chinese numbering template stored in the numbering template database may include a plurality of levels of numbers, and at least a first level of the plurality of levels of numbers may be a chinese number.
When a user composes a document with a clear hierarchy such as a paper, it may be necessary to add a plurality of levels of chinese numbers to the document. In order to determine a proper target numbering template from the Chinese numbering templates stored in the numbering template database when a user needs to add a plurality of levels of Chinese numbering to a document, the Chinese numbering templates can be a plurality of, and each Chinese numbering template can comprise a plurality of levels of numbering, and at least the first level of the plurality of levels of numbering is a Chinese numbering, so that the user can conveniently add the Chinese numbering to the document.
In one embodiment, the number of chinese number templates may be 33, and each chinese number template may include numbers of the first level to the ninth level, which may be specifically shown in the following table:
/>
/>
it can be seen that, in this embodiment, the chinese numbering templates stored in the numbering template database include a plurality of levels of numbers, and at least the first level of the plurality of levels of numbers is a chinese number. Thus, the target Chinese template determined by the electronic equipment from the numbering template database can be provided with the numbers comprising Chinese characters, and a plurality of levels of numbers can be added to the document so as to meet the requirements of users.
Corresponding to the method for adding Chinese numbers to the documents, the embodiment of the invention also provides a device for adding Chinese numbers to the documents. The device for adding Chinese numbers to the documents provided by the embodiment of the invention is described below.
As shown in fig. 4, an apparatus for adding chinese numbers to documents, the apparatus comprising:
a reference number determining module 401, configured to determine, when capturing a number input operation conforming to a first target form, a chinese number included in the number input operation as a reference chinese number;
A first type determining module 402, configured to determine a first target number type corresponding to the first target form according to a preset correspondence between a form and a number type;
a target template determining module 403, configured to determine, from chinese numbering templates stored in a preset numbering template database, a target chinese numbering template in which a style of a chinese numbering at a first level is the same as a style of the reference chinese numbering;
a first number determining module 404, configured to determine, from the target chinese number template, a first target chinese number corresponding to the number input operation according to the reference chinese number and the first target number type;
and the first number adding module 405 is configured to add the first target chinese number to the position of the cursor in the document.
It can be seen that, in the scheme provided by the embodiment of the present invention, when capturing a number input operation conforming to a first target form, an electronic device may determine a chinese number included in the number input operation as a reference chinese number, then determine, according to a preset correspondence between a form and a number type, the first target number type corresponding to the first target form, and then determine, from chinese number templates stored in a preset number template database, a target chinese number template in which a style of the chinese number of the first level is the same as a style of the reference chinese number, and further determine, according to the reference chinese number and the first target number type, the first target chinese number corresponding to the number input operation from the target chinese number template, so that the first target chinese number may be added to a position of a cursor in a document. Thus, the electronic equipment can add proper Chinese numbers to the document according to the characters input by the user, thereby providing convenience for the user to write the document.
As an implementation manner of the embodiment of the present invention, the first target number type is an add lower number type;
the first number determining module 404 may include:
a target lower-level number determining sub-module (not shown in fig. 4) for determining a lower-level chinese number of which the corresponding level is a next level to the reference chinese number from the target chinese number template, and taking a first chinese number in the lower-level chinese number as a first target chinese number corresponding to the number input operation.
As an implementation manner of the embodiment of the present invention, the first target number type is an added peer number type;
the first number determining module 404 may include:
a peer number determination sub-module (not shown in fig. 4) for determining a peer chinese number corresponding to the same level as the reference chinese number from the target chinese number template;
a target peer number determination sub-module (not shown in fig. 4) for determining a chinese number corresponding to the reference chinese number from the peer chinese numbers as a first target chinese number corresponding to the number input operation.
As an implementation manner of the embodiment of the present invention, the above device for adding Chinese numbers to documents may further include:
A second type determining module (not shown in fig. 4) configured to determine, when a number input operation conforming to a second target form is captured after the first target chinese number is added to the position of the cursor in the document, a second target number type corresponding to the second target form according to a correspondence between the form and the number type;
a second number determining module (not shown in fig. 4) configured to determine a second target chinese number corresponding to the number input operation from the target chinese number template according to a current chinese number and the second target number type;
the current Chinese number is the nearest Chinese number to the position of the cursor in the document when the number input operation conforming to the second target form is captured.
A second number adding module (not shown in fig. 4) for adding the second target chinese number to the document at the position of the cursor.
As an implementation manner of the embodiment of the present invention, the second target number type is an add-upper-level number type;
the second number determining module (not shown in fig. 4) may include:
a judging sub-module (not shown in fig. 4) for judging whether the current chinese number pattern is the same as the first-level number pattern in the target chinese number template;
A superior number determining sub-module (not shown in fig. 4) for determining, from the target chinese number template, a superior chinese number having a level corresponding to a level previous to the current chinese number if the pattern of the current chinese number is different from the pattern of the first level number in the target chinese number template;
a target upper-level number determining sub-module (not shown in fig. 4) for determining a chinese number matching the upper-level chinese number of the current chinese number from the upper-level chinese numbers as a second target chinese number corresponding to the number input operation.
As an implementation manner of the embodiment of the present invention, the chinese numbering templates stored in the numbering template database include a plurality of levels of numbers, and at least a first level of the plurality of levels of numbers is a chinese number.
The embodiment of the invention also provides an electronic device, as shown in fig. 5, which comprises a processor 501, a communication interface 502, a memory 503 and a communication bus 504, wherein the processor 501, the communication interface 502 and the memory 503 complete communication with each other through the communication bus 504,
a memory 503 for storing a computer program;
The processor 501 is configured to execute the program stored in the memory 503, and implement the following steps:
when capturing a number input operation conforming to a first target form, determining a Chinese number included in the number input operation as a reference Chinese number;
determining a first target number type corresponding to the first target form according to a preset corresponding relation between the form and the number type;
determining a target Chinese numbering template in which the style of the Chinese numbering of the first level is the same as that of the reference Chinese numbering from Chinese numbering templates stored in a preset numbering template database;
determining a first target Chinese number corresponding to the number input operation from the target Chinese number template according to the reference Chinese number and the first target number type;
and adding the first target Chinese number to the position of the cursor in the document.
It can be seen that, in the scheme provided by the embodiment of the present invention, when capturing a number input operation conforming to a first target form, an electronic device may determine a chinese number included in the number input operation as a reference chinese number, then determine, according to a preset correspondence between a form and a number type, the first target number type corresponding to the first target form, and then determine, from chinese number templates stored in a preset number template database, a target chinese number template in which a style of the chinese number of the first level is the same as a style of the reference chinese number, and further determine, according to the reference chinese number and the first target number type, the first target chinese number corresponding to the number input operation from the target chinese number template, so that the first target chinese number may be added to a position of a cursor in a document. Thus, the electronic equipment can add proper Chinese numbers to the document according to the characters input by the user, thereby providing convenience for the user to write the document.
The communication bus mentioned above for the electronic devices may be a peripheral component interconnect standard (Peripheral Component Interconnect, PCI) bus or an extended industry standard architecture (Extended Industry Standard Architecture, EISA) bus, etc. The communication bus may be classified as an address bus, a data bus, a control bus, or the like. For ease of illustration, the figures are shown with only one bold line, but not with only one bus or one type of bus.
The communication interface is used for communication between the electronic device and other devices.
The Memory may include random access Memory (Random Access Memory, RAM) or may include 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 aforementioned processor.
The processor may be a general-purpose processor, including a central processing unit (Central Processing Unit, CPU), a network processor (Network Processor, NP), etc.; but also digital signal processors (Digital Signal Processing, DSP), application specific integrated circuits (Application Specific Integrated Circuit, ASIC), field programmable gate arrays (Field-Programmable Gate Array, FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.
Wherein, the first target number type may be an add lower number type;
the step of determining the first target chinese number corresponding to the number input operation from the target chinese number template according to the reference chinese number and the first target number type may include:
and determining a lower Chinese number which corresponds to the level which is the next level of the reference Chinese number from the target Chinese number template, and taking the first Chinese number in the lower Chinese number as the first target Chinese number corresponding to the number input operation.
The first target number type may be an added peer number type;
the step of determining the first target chinese number corresponding to the number input operation from the target chinese number template according to the reference chinese number and the first target number type may include:
determining the same-level Chinese number with the same level as the standard Chinese number from the target Chinese number template;
and determining a Chinese number corresponding to the reference Chinese number from the same-level Chinese numbers, and taking the Chinese number as a first target Chinese number corresponding to the number input operation.
After the step of adding the first target chinese number to the position of the cursor in the document, the method may further include:
when capturing a number input operation conforming to a second target form, determining a second target number type corresponding to the second target form according to the corresponding relation between the form and the number type;
determining a second target Chinese number corresponding to the number input operation from the target Chinese number template according to the current Chinese number and the second target number type;
the current Chinese number is the nearest Chinese number to the position of the cursor in the document when the number input operation conforming to the second target form is captured.
And adding the second target Chinese number to the position of the cursor in the document.
The second target number type may be an add upper level number type;
the step of determining the second target chinese number corresponding to the number input operation from the target chinese number template according to the current chinese number and the second target number type may include:
judging whether the current Chinese number pattern is the same as the first-level number pattern in the target Chinese number template;
If the current Chinese number is different, determining that the corresponding level is the upper Chinese number of the previous level of the current Chinese number from the target Chinese number template;
and determining a Chinese number matched with the Chinese number at the upper level of the current Chinese number from the upper-level Chinese numbers, and taking the Chinese number as a second target Chinese number corresponding to the number input operation.
The Chinese numbering templates stored in the numbering template database comprise a plurality of levels of numbers, and at least the first level of the numbers in the plurality of levels is a Chinese number.
In yet another embodiment of the present invention, there is also provided a computer-readable storage medium having stored therein a computer program which, when executed by a processor, performs the steps of:
when capturing a number input operation conforming to a first target form, determining a Chinese number included in the number input operation as a reference Chinese number;
determining a first target number type corresponding to the first target form according to a preset corresponding relation between the form and the number type;
determining a target Chinese numbering template in which the style of the Chinese numbering of the first level is the same as that of the reference Chinese numbering from Chinese numbering templates stored in a preset numbering template database;
Determining a first target Chinese number corresponding to the number input operation from the target Chinese number template according to the reference Chinese number and the first target number type;
and adding the first target Chinese number to the position of the cursor in the document.
It can be seen that, in the solution provided in the embodiment of the present invention, when a computer program stored in a computer readable storage medium is executed by a processor, a chinese number included in a number input operation conforming to a first target form may be determined as a reference chinese number when the number input operation is captured, then a first target number type corresponding to the first target form is determined according to a correspondence between a preset form and a number type, then a target chinese number template in which a style of a chinese number of a first level is the same as a style of the reference chinese number is determined from chinese number templates stored in a preset number template database, and further, a first target chinese number corresponding to the number input operation is determined from the target chinese number template according to the reference chinese number and the first target number type, so that the first target chinese number may be added to a position where a cursor is located in a document. Thus, the electronic equipment can add proper Chinese numbers to the document according to the characters input by the user, thereby providing convenience for the user to write the document.
Wherein, the first target number type may be an add lower number type;
the step of determining the first target chinese number corresponding to the number input operation from the target chinese number template according to the reference chinese number and the first target number type may include:
and determining a lower Chinese number which corresponds to the level which is the next level of the reference Chinese number from the target Chinese number template, and taking the first Chinese number in the lower Chinese number as the first target Chinese number corresponding to the number input operation.
The first target number type may be an added peer number type;
the step of determining the first target chinese number corresponding to the number input operation from the target chinese number template according to the reference chinese number and the first target number type may include:
determining the same-level Chinese number with the same level as the standard Chinese number from the target Chinese number template;
and determining a Chinese number corresponding to the reference Chinese number from the same-level Chinese numbers, and taking the Chinese number as a first target Chinese number corresponding to the number input operation.
After the step of adding the first target chinese number to the position of the cursor in the document, the method may further include:
when capturing a number input operation conforming to a second target form, determining a second target number type corresponding to the second target form according to the corresponding relation between the form and the number type;
determining a second target Chinese number corresponding to the number input operation from the target Chinese number template according to the current Chinese number and the second target number type;
the current Chinese number is the nearest Chinese number to the position of the cursor in the document when the number input operation conforming to the second target form is captured.
And adding the second target Chinese number to the position of the cursor in the document.
The second target number type may be an add upper level number type;
the step of determining the second target chinese number corresponding to the number input operation from the target chinese number template according to the current chinese number and the second target number type may include:
judging whether the current Chinese number pattern is the same as the first-level number pattern in the target Chinese number template;
If the current Chinese number is different, determining that the corresponding level is the upper Chinese number of the previous level of the current Chinese number from the target Chinese number template;
and determining a Chinese number matched with the Chinese number at the upper level of the current Chinese number from the upper-level Chinese numbers, and taking the Chinese number as a second target Chinese number corresponding to the number input operation.
The Chinese numbering templates stored in the numbering template database comprise a plurality of levels of numbers, and at least the first level of the numbers in the plurality of levels is a Chinese number.
It should be noted that, with respect to the apparatus, electronic device, and computer-readable storage medium embodiments described above, since they are substantially similar to the method embodiments, the description is relatively simple, and reference should be made to the description of the method embodiments for relevant points.
It is further noted that relational terms such as first and second, and the like are 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. Moreover, 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 one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
In this specification, each embodiment is described in a related manner, and identical and similar parts of each embodiment are all referred to each other, and each embodiment mainly describes differences from other embodiments.
The foregoing description is only of the preferred embodiments of the present invention and is not intended to limit the scope of the present invention. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention are included in the protection scope of the present invention.

Claims (10)

1. A method of adding chinese numbers to documents, the method comprising:
when capturing a number input operation conforming to a first target form, determining a Chinese number included in the number input operation as a reference Chinese number;
determining a first target number type corresponding to the first target form according to a preset corresponding relation between the form and the number type; wherein the first object number type includes at least one of: adding a higher-level number type, adding a same-level number type and adding a lower-level number type;
determining a target Chinese numbering template in which the style of the Chinese numbering of the first level is the same as that of the reference Chinese numbering from Chinese numbering templates stored in a preset numbering template database; the Chinese numbering templates stored in the numbering template database comprise a plurality of levels of numbers, and at least the first level of the numbers in the levels is a Chinese number;
Determining a first target Chinese number corresponding to the number input operation from the target Chinese number template according to the reference Chinese number and the first target number type;
adding the first target Chinese number to the position of a cursor in the document;
after the step of adding the first target chinese number to the document at the location of the cursor, the method further comprises:
when capturing a number input operation conforming to a second target form, determining a second target number type corresponding to the second target form according to the corresponding relation between the form and the number type; the second object number type includes at least one of: adding a higher-level number type, adding a same-level number type and adding a lower-level number type;
determining a second target Chinese number corresponding to the number input operation from the target Chinese number template according to the current Chinese number and the second target number type, wherein the current Chinese number is a Chinese number closest to the position of the cursor in the document when the number input operation conforming to a second target form is captured;
and adding the second target Chinese number to the position of the cursor in the document.
2. The method of claim 1, wherein the first target number type is an add subordinate number type;
the step of determining the first target Chinese number corresponding to the number input operation from the target Chinese number template according to the reference Chinese number and the first target number type includes:
and determining a lower Chinese number which corresponds to the level which is the next level of the reference Chinese number from the target Chinese number template, and taking the first Chinese number in the lower Chinese number as the first target Chinese number corresponding to the number input operation.
3. A method as recited in claim 1, wherein the first target number type is an add peer number type;
the step of determining the first target Chinese number corresponding to the number input operation from the target Chinese number template according to the reference Chinese number and the first target number type includes:
determining the same-level Chinese number with the same level as the standard Chinese number from the target Chinese number template;
and determining a Chinese number corresponding to the reference Chinese number from the same-level Chinese numbers, and taking the Chinese number as a first target Chinese number corresponding to the number input operation.
4. The method of claim 1, wherein the second target number type is an add-on upper level number type;
the step of determining the second target Chinese number corresponding to the number input operation from the target Chinese number template according to the current Chinese number and the second target number type comprises the following steps:
judging whether the current Chinese number pattern is the same as the first-level number pattern in the target Chinese number template;
if the current Chinese number is different, determining that the corresponding level is the upper Chinese number of the previous level of the current Chinese number from the target Chinese number template;
and determining a Chinese number matched with the Chinese number at the upper level of the current Chinese number from the upper-level Chinese numbers, and taking the Chinese number as a second target Chinese number corresponding to the number input operation.
5. An apparatus for adding chinese numbers to documents, the apparatus comprising:
the reference number determining module is used for determining a Chinese number included in the number input operation as a reference Chinese number when the number input operation conforming to the first target form is captured;
the first type determining module is used for determining a first target number type corresponding to the first target form according to the corresponding relation between the preset form and the number type; wherein the first object number type includes at least one of: adding a higher-level number type, adding a same-level number type and adding a lower-level number type;
The target template determining module is used for determining a target Chinese number template with the same pattern of the Chinese number of the first level as that of the standard Chinese number from Chinese number templates stored in a preset number template database; the Chinese numbering templates stored in the numbering template database comprise a plurality of levels of numbers, and at least the first level of the numbers in the levels is a Chinese number;
the first number determining module is used for determining a first target Chinese number corresponding to the number input operation from the target Chinese number template according to the reference Chinese number and the first target number type;
the first number adding module is used for adding the first target Chinese number to the position of the cursor in the document;
the apparatus further comprises:
the second type determining module is used for determining a second target number type corresponding to a second target form according to the corresponding relation between the form and the number type when capturing the number input operation conforming to the second target form after the first target Chinese number is added to the position of the cursor in the document; the second object number type includes at least one of: adding a higher-level number type, adding a same-level number type and adding a lower-level number type;
The second number determining module is used for determining a second target Chinese number corresponding to the number input operation from the target Chinese number template according to the current Chinese number and the second target number type, wherein the current Chinese number is a Chinese number closest to the position of the cursor in the document when the number input operation conforming to the second target form is captured;
and the second number adding module is used for adding the second target Chinese number to the position of the cursor in the document.
6. The apparatus of claim 5, wherein the first target number type is an add subordinate number type;
the first number determining module includes:
and the target lower-level number determining sub-module is used for determining the lower-level Chinese number which corresponds to the level next to the standard Chinese number from the target Chinese number template, and taking the first Chinese number in the lower-level Chinese number as the first target Chinese number corresponding to the number input operation.
7. An apparatus as recited in claim 5, wherein the first target number type is an add peer number type;
the first number determining module includes:
The same-level number determining sub-module is used for determining the same-level Chinese number with the same level as the standard Chinese number from the target Chinese number template;
and the target peer number determining sub-module is used for determining a Chinese number corresponding to the reference Chinese number from the peer Chinese numbers and is used as a first target Chinese number corresponding to the number input operation.
8. The apparatus of claim 5, wherein the second target number type is an add-on upper level number type;
the second number determining module includes:
the judging submodule is used for judging whether the current Chinese number pattern is the same as the first-level number pattern in the target Chinese number template;
the upper-level number determining sub-module is used for determining that the corresponding level is the upper-level Chinese number of the previous level of the current Chinese number from the target Chinese number template if the pattern of the current Chinese number is different from the pattern of the first-level number in the target Chinese number template;
and the target upper-level number determining sub-module is used for determining a Chinese number matched with the upper-level Chinese number of the current Chinese number from the upper-level Chinese numbers, and taking the Chinese number as a second target Chinese number corresponding to the number input operation.
9. The electronic equipment is characterized by comprising a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory are communicated with each other through the communication bus;
a memory for storing a computer program;
a processor for carrying out the method steps of any one of claims 1-4 when executing a program stored on a memory.
10. A computer-readable storage medium, characterized in that the computer-readable storage medium has stored therein a computer program which, when executed by a processor, implements the method steps of any of claims 1-4.
CN201910706436.5A 2019-08-01 2019-08-01 Method and device for adding Chinese numbers to documents and electronic equipment Active CN112395829B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910706436.5A CN112395829B (en) 2019-08-01 2019-08-01 Method and device for adding Chinese numbers to documents and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910706436.5A CN112395829B (en) 2019-08-01 2019-08-01 Method and device for adding Chinese numbers to documents and electronic equipment

Publications (2)

Publication Number Publication Date
CN112395829A CN112395829A (en) 2021-02-23
CN112395829B true CN112395829B (en) 2024-03-19

Family

ID=74601572

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910706436.5A Active CN112395829B (en) 2019-08-01 2019-08-01 Method and device for adding Chinese numbers to documents and electronic equipment

Country Status (1)

Country Link
CN (1) CN112395829B (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH05135038A (en) * 1991-11-12 1993-06-01 Canon Inc Method and device for processing document
CN104636384A (en) * 2013-11-13 2015-05-20 腾讯科技(深圳)有限公司 Document processing method and device
CN105824786A (en) * 2015-01-05 2016-08-03 珠海金山办公软件有限公司 Electronic document generating method and device
CN105868173A (en) * 2016-03-24 2016-08-17 西安电子科技大学 Content control based academic dissertation template design method

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9372916B2 (en) * 2012-12-14 2016-06-21 Athenahealth, Inc. Document template auto discovery

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH05135038A (en) * 1991-11-12 1993-06-01 Canon Inc Method and device for processing document
CN104636384A (en) * 2013-11-13 2015-05-20 腾讯科技(深圳)有限公司 Document processing method and device
CN105824786A (en) * 2015-01-05 2016-08-03 珠海金山办公软件有限公司 Electronic document generating method and device
CN105868173A (en) * 2016-03-24 2016-08-17 西安电子科技大学 Content control based academic dissertation template design method

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
Word样式的应用和管理研究;李艳芳;文海英;;湖南科技学院学报;20180501(第05期) *
在Word中为章节标题添加自动编号;张捍旭;电子与电脑;20031108(第11期) *

Also Published As

Publication number Publication date
CN112395829A (en) 2021-02-23

Similar Documents

Publication Publication Date Title
CN109144392B (en) Method and device for processing gesture conflict and electronic equipment
CN111414727B (en) Editing method and device for PDF document header footer and electronic equipment
CN108255976B (en) Data sorting method and device, storage medium and electronic equipment
CN108153454B (en) Multi-touch switching method and device, storage medium and terminal equipment
CN112651217B (en) Paper document processing method, paper document processing device, electronic equipment and storage medium
CN112395829B (en) Method and device for adding Chinese numbers to documents and electronic equipment
US10254959B2 (en) Method of inputting a character into a text string using a sliding touch gesture, and electronic device therefor
CN112329409B (en) Cell color conversion method and device and electronic equipment
CN110633457A (en) Content replacement method and device, electronic equipment and readable storage medium
CN110852045A (en) Method and device for deleting document content, electronic equipment and storage medium
CN110728113A (en) Information screening method and device of electronic forms and terminal equipment
CN111563364B (en) Chapter title style conversion method and device, electronic equipment and storage medium
CN110659526B (en) Document processing method and device and electronic equipment
CN111832262B (en) Document processing method and device, electronic equipment and storage medium
CN112861470B (en) Setting method, device, equipment and storage medium for document title format
CN111832270A (en) Method and device for displaying row number and column label of table and electronic equipment
KR20200070506A (en) Method for describing a patent specification
CN111666733B (en) Method and device for processing cells in document
CN112949266B (en) Electronic form processing method, electronic form processing device, electronic equipment and storage medium
CN111199144B (en) Document content altering method and device, electronic equipment and readable storage medium
CN112784542B (en) Document editing method and device
CN112417834A (en) Document processing method and device and electronic equipment
CN111124491B (en) Batch processing method, device, equipment and storage medium
CN115858457A (en) File conversion method and device and electronic equipment
CN109902277B (en) Document editing method and device, electronic equipment and readable storage medium

Legal Events

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