CN112395829A - Method and device for adding Chinese numbers to document and electronic equipment - Google Patents

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

Info

Publication number
CN112395829A
CN112395829A CN201910706436.5A CN201910706436A CN112395829A CN 112395829 A CN112395829 A CN 112395829A CN 201910706436 A CN201910706436 A CN 201910706436A CN 112395829 A CN112395829 A CN 112395829A
Authority
CN
China
Prior art keywords
chinese
target
level
determining
template
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.)
Granted
Application number
CN201910706436.5A
Other languages
Chinese (zh)
Other versions
CN112395829B (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

Images

Abstract

The embodiment of the invention provides a method and a device for adding Chinese numbers to a document and electronic equipment, wherein the method comprises the following steps: 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; determining a first target number type corresponding to the first target form according to a corresponding relation between a preset form and the number type; determining a 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 Chinese number templates stored in a preset number 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 a cursor in the document. By applying the embodiment of the invention, proper Chinese numbers can be added to the document.

Description

Method and device for adding Chinese numbers to document and electronic equipment
Technical Field
The invention relates to the technical field of electronic document processing, in particular to a method and a device for adding Chinese numbers to a document and electronic equipment.
Background
In daily work, study, and life, users often need to perform document editing through document editing software in electronic devices. When a user is writing a document that is well-defined at some level, such as a paper, it is often necessary to add multiple levels of numbering to the document.
At present, when a user adds a multi-level number to a document, an 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 the instruction for adding the number, it is determined whether the currently input character includes the number, and if so, the number corresponding to the last input number in the included numbers is selected from a default set of number templates and added to the document.
Because the electronic equipment cannot judge whether the characters containing Chinese are numbers and a default set of numbering templates is designed according to the habit of Western numbering and is not in line with the habit of Chinese numbering, when a user needs to add Chinese numbers to a document, the numbers added to the document by the electronic equipment are probably not suitable, and obviously bring inconvenience when the user writes the document.
Disclosure of Invention
The embodiment of the invention aims to provide a method, a device and electronic equipment for adding Chinese numbers to a document, 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, where the method includes:
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;
determining a first target number type corresponding to the first target form according to a corresponding relation between a preset form and the number type;
determining a 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 Chinese number templates stored in a preset number 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 a cursor in the document.
Optionally, the first target number type is an add lower number type;
the step of 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 includes:
and determining a lower-level Chinese number of which the corresponding level is the next level of the reference Chinese number from the target Chinese number template, and taking the first Chinese number in the lower-level Chinese number as a first target Chinese number corresponding to the number input operation.
Optionally, the first target number type is a number type with the same level added;
the step of 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 includes:
determining the same-level Chinese number with the corresponding level same as the level of the reference Chinese number from the target Chinese number template;
and determining the Chinese number corresponding to the reference Chinese number from the Chinese numbers of the same level as the 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 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;
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 type of the second target number, wherein the current Chinese number is the Chinese number closest to the position of a cursor in a 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.
Optionally, the second target number type is an added upper-level number type;
the step of 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 includes:
judging whether the style of the current Chinese number is the same as the style of the first-level number in the target Chinese number template or not;
if the Chinese numbers are different, determining the corresponding level from the target Chinese number template as the upper-level Chinese number of the previous level of the current Chinese number;
and determining the Chinese number matched with the Chinese number in the upper level of the current Chinese number from the upper Chinese numbers as a second target Chinese number corresponding to the number input operation.
Optionally, the chinese numbering template stored in the numbering template database includes a plurality of levels of numbers, and at least a first level of numbers in 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, where the apparatus includes:
the reference number determining module is used for determining a Chinese number included by 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 a preset form and the number type;
a target template determining module, configured to determine, from the chinese numbering templates stored in the preset numbering template database, a target chinese numbering template in which a style of the first-level chinese numbering is the same as a style of the reference chinese numbering;
a first number determining module, configured to determine, according to the reference chinese number and the first target number type, a first target chinese number corresponding to the number input operation from the target chinese number template;
and the first number adding module is used for adding the first target Chinese number to the position of a cursor in a document.
Optionally, the first target number type is an add lower number type;
the first number determination module includes:
and the target lower-level number determining submodule is used for determining a lower-level Chinese number of which the corresponding level is the next level of the reference Chinese number from the target Chinese number template, and taking the first Chinese number in the lower-level Chinese numbers as a first target Chinese number corresponding to the number input operation.
Optionally, the first target number type is a number type with the same level added;
the first number determination module includes:
a same-level number determining submodule for determining a same-level Chinese number having a level identical to that of the reference Chinese number from the target Chinese number template;
and the target sibling number determining submodule is used for determining the Chinese number corresponding to the reference Chinese number from the sibling Chinese numbers as the first target Chinese number corresponding to the number input operation.
Optionally, 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 a cursor in a document;
a second number determining module, configured to determine, according to the 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, where the current chinese number is a chinese number closest to a position of a cursor in a document when capturing a number input operation conforming to a second target form;
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 added upper-level number type;
the second number determination module includes:
a judging submodule for judging whether the style of the current Chinese number is the same as the style of the first-level number in the target Chinese number template;
a superior number determining sub-module for determining a superior Chinese number of which a corresponding level is a superior 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 serial number determining submodule is used for determining a Chinese serial number matched with the Chinese serial number in the upper level of the current Chinese serial number from the upper-level Chinese serial numbers as a second target Chinese serial number corresponding to the serial number input operation.
Optionally, the chinese numbering template stored in the numbering template database includes a plurality of levels of numbers, and at least a first level of numbers in 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 and the communication interface complete communication between the memory and the processor through the communication bus;
a memory for storing a computer program;
and the processor is used for realizing any one of the above method steps for adding the Chinese number 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, in which a computer program is stored, and the computer program, when executed by a processor, implements any of the above method steps for adding a chinese number to a document.
In the solution provided by the embodiment of the present invention, the electronic device may determine the chinese number included in the number input operation as the reference chinese number when capturing the number input operation conforming to the first target form, then, according to the corresponding relation between the preset form and the number type, determining a first target number type corresponding to the first target form, and then from the Chinese number template stored in the preset number template database, determining a target Chinese number template in which the pattern of the first level Chinese numbers is the same as the pattern of the reference Chinese numbers, and 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, so that the first target Chinese number can be added to the position of a cursor in a document. Therefore, the electronic equipment can add proper Chinese numbers to the document according to the characters input by the user, so that convenience is provided for the user to write the document. Of course, not all of the advantages described above need to be achieved at the same time in the practice of any one product or method of the invention.
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 method for adding Chinese numbers to a document according to an embodiment of the present invention;
FIG. 2 is a flow chart of a manner of adding numbers to a document based on the embodiment shown in FIG. 1;
FIG. 3 is a flowchart of a manner of adding an upper level number to a document based on the embodiment shown in FIG. 2;
FIG. 4 is a schematic structural diagram of an apparatus for adding Chinese numbers to a document 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 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 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 a Chinese number to the document.
First, a method for adding a chinese number to a document according to an embodiment of the present invention will be described.
The method for adding the Chinese numbers to the document provided by the embodiment of the invention can be applied to any electronic equipment which needs to add the Chinese numbers to the document, for example, a computer, a mobile phone, a processor and the like, and is not particularly limited herein. For convenience of description, the electronic device is hereinafter referred to simply.
As shown in fig. 1, a method for adding chinese numbers 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 corresponding relation between a preset form and the number type;
s103, determining a 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 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 a cursor in the document.
It can be seen that, in the solution provided by the embodiment of the present invention, when capturing the number input operation conforming to the first target form, the electronic device can determine the chinese number included in the number input operation as the reference chinese number, then, according to the corresponding relation between the preset form and the number type, determining a first target number type corresponding to the first target form, and then from the Chinese number template stored in the preset number template database, determining a target Chinese number template in which the pattern of the first level Chinese numbers is the same as the pattern of the reference Chinese numbers, and 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, so that the first target Chinese number can be added to the position of a cursor in a document. Therefore, the electronic equipment can add proper Chinese numbers to the document according to the characters input by the user, so that convenience is provided for the user to write the document.
To facilitate understanding of the schemes provided by the embodiments of the present invention, the numbering levels in the schemes provided by the embodiments of the present invention are first described. The number levels mentioned in the text can comprise lower levels, the same level and upper levels, and the number levels are divided according to Chinese language habits, wherein the lower level number is the number of the next level of the current number; the same-level serial numbers are the serial numbers of the same level of the current serial numbers; the upper-level serial number is the serial number of the previous level of the current serial number. For example, for the number "(one)", the lower-level number thereof may be "1", the same-level number thereof may be "(two)", and the upper-level number thereof may be "one".
In order to facilitate a user to add numbers in a document, the electronic equipment can preset the input operation forms corresponding to the number types, so that when the user needs to add Chinese numbers in the document, the electronic equipment can send out the number input operations in various forms, and the electronic equipment can capture the number input operations sent out by the user.
The preset input operation form corresponding to each number type may be "chinese number + space + text content + carriage return", "chinese number + pause number + text content + carriage return", or the like. In order to determine the Chinese number that the user wants to add, the input operation form preset for each number type may include a Chinese number, which is the Chinese number that the user wants to add.
After the electronic equipment captures the number input operation sent by the user, whether the number input operation accords with the first target form or not can be determined, if the number input operation accords with the first target form, the number input operation is indicated to be added into the document by the user, then the electronic equipment can determine the Chinese number included by the number input operation, and the Chinese number is used as a reference Chinese number.
After obtaining the reference chinese number, since the different types of number input operations 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 equipment can preset the corresponding relation between the form and the number type, and when the number input operation conforming to the first target form is captured, the number type corresponding to the form of the number input operation can be determined according to the corresponding relation.
For example, the correspondence between the preset form and the number type may be as shown in the following table:
serial number Form(s) of Number type
1 Chinese number + space + text content + carriage return + Tab Adding lower numbering types
2 Chinese number + space + text content + carriage return Adding same-level number types
3 Chinese number + space + text content + carriage return Adding upper level numbering types
Then, as can be seen from the above table, when the captured number input operation is in the form of "chinese number + space + text content + carriage return", the electronic device may determine that the corresponding number type is the type with the same number added thereto.
Since the user often adds the chinese number from the first level number when adding the chinese number in the document, the reference chinese number is generally the first level number in the document. Therefore, in the above-described step S103, the electronic apparatus can determine a target chinese number template in which the style of the chinese number of the first level is the same as the style of the reference chinese number from among the chinese number templates stored in the preset number template database.
The style is information in a syntax format capable of representing a Chinese number. For example, the styles of the chinese numbers "chapter i", "chapter ii", and "chapter iii" are: chapter x, x is a lower case 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 Second grade Third level of classification Fourth grade Fifth level
B1 A, 1 st 1、 (1) 1)
B2 Chapter I First section First class A, 1、
B3 The first part A, First section First class hour (A)
Then, as can be seen from the above table, when the reference chinese number is the "first part," the electronic device can determine that the target chinese number template is the chinese number template B3 in the above table.
Each chinese number template stored in the number template database may include a plurality of levels of chinese numbers. Therefore, after determining the target Chinese number template, in order to determine a proper Chinese number from the plurality of Chinese numbers, the electronic device can perform the step S104, i.e., 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 number template a1 determined by the electronic device is shown in the following table:
chinese numbering template name First level Second grade Third level of classification Fourth grade Fifth level
A1 The first part Chapter I First section First class hour (A)
As can be seen from the above table, when the reference chinese number is "first part" 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, that is, the second-level chinese number "first chapter" as the first target chinese number from the target chinese number template a 1.
Since the user usually stays the cursor at the position where the user wants to input information when editing the document, the electronic device can execute the step S105 after determining the first target chinese number, i.e. adding the first target chinese number to the position of the cursor in the document.
As an implementation manner provided by the embodiment of the present invention, the first target number type may be an add lower number type.
The electronic device may determine the first target number type as the added lower number type according to the preset correspondence between the number type and the number type, because the number input operation captured by the electronic device at each time may have different forms, and the first target number type determined by the electronic device according to the preset correspondence between the form and the number type.
In 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-level Chinese number of which the corresponding level is the next level of the reference Chinese number from the target Chinese number template, and taking the first Chinese number in the lower-level Chinese number as a first target Chinese number corresponding to the number input operation.
The Chinese number 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:
Figure BDA0002152268140000101
the first target number type determined by the electronic equipment is an adding 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 equipment can determine the Chinese number of the next level of the reference Chinese number from the target Chinese number template.
For example, the style of the reference chinese number Z1 is the same as the style of the chinese number of the first level in the target chinese number template a2, and then, the reference chinese number Z1 is also the chinese number of the first level in the target chinese number template a 2. Thus, the electronic apparatus can determine the second level chinese numbers "first section", "second section", "third section", etc. in the target chinese number template a2 as the subordinate chinese numbers.
Since the electronic device captures the number input operation conforming to the first target form, the document does not have the next-level Chinese number of the reference Chinese number, and at this time, the user needs to add the next-level Chinese number of the reference Chinese number from the first Chinese number in the next-level Chinese number. Therefore, the electronic equipment 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 electronic equipment determines the target chinese number template to be the chinese number template a2, the electronic equipment can determine the first chinese number "first section" in the lower chinese numbers to be the first target chinese number when the lower chinese number is the second level chinese number in the target chinese number template a 2.
As can be seen, in this embodiment, the electronic device may determine, from the target chinese number template, a lower chinese number whose corresponding level is a level next to the reference chinese number, and use a first chinese number in the lower chinese number as a first target chinese number corresponding to the number input operation. Therefore, when the first target number type is the type of adding the lower-level number, the electronic equipment can add the Chinese number at the next level of the reference Chinese number in the document to meet the requirement of a user.
As an implementation manner provided by the embodiment of the present invention, the first target number type may be a type of adding a same-level number.
The electronic device may determine the first target number type as the same-level added number type by determining the first target number type according to the preset correspondence between the number type and the number type, because the number input operation captured by the electronic device each time may have different forms, and in one case, the number input operation form corresponds to the form corresponding to the same-level added number type.
In 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 corresponding level same as the level of the reference Chinese number from the target Chinese number template; and determining the Chinese number corresponding to the reference Chinese number from the Chinese numbers of the same level as the first target Chinese number corresponding to the number input operation.
The Chinese number 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:
Figure BDA0002152268140000111
Figure BDA0002152268140000121
the first target number type determined by the electronic equipment is the type of adding the same level number, which indicates that the user needs to add the Chinese number of the same level as the reference Chinese number in the document. Therefore, the electronic equipment can determine the Chinese number of the same level as that of the reference Chinese number from the target Chinese number template.
For example, the style of the reference chinese number Z2 is the same as the style of the chinese number of the first level in the target chinese number template A3, and then, the reference chinese number Z2 is also the chinese number of the first level in the target chinese number template A3. Thus, the electronic device can determine the first level Chinese numbers "first class", "second class", "third class", etc. in the target Chinese number template A3 as the same level Chinese numbers.
When the electronic equipment 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 wants to add the same-level Chinese number of the reference Chinese number, the user needs to add the Chinese number corresponding to the reference Chinese number in the same-level Chinese number. Therefore, the electronic equipment can determine the Chinese number corresponding to the reference Chinese number from the Chinese numbers in the same level as the first target Chinese number corresponding to the number input operation.
For example, the target chinese number template determined by the electronic device is the above-mentioned chinese number template A3, when 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 the chinese number corresponding to "second lesson" in the first level chinese numbers is "third lesson", and then "third lesson" is the first target chinese number.
As can be seen, in this embodiment, the electronic device may determine the chinese number of the same level corresponding to the level that is the same as the level of the reference chinese number from the target chinese number template, and then determine the chinese number corresponding to the reference chinese number from the chinese number of the same level as the first target chinese number corresponding to the number input operation. Therefore, when the first target number type is the type of adding the same-level number, the electronic equipment can add the Chinese number of the same level of the reference Chinese number in the document to meet the requirement of a user.
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 the first target Chinese number is added, the user may need to continue adding the number, so that the user can continue to send the number input operation, the electronic equipment can capture the number input operation which is continuously sent by the user, and then whether the number input operation conforms to the second target form or not can be determined, and if so, the user wants to continue adding the number in the document.
Since the different forms of number input operations correspond to different number types, in order to determine the number type corresponding to the number input operation conforming to the second target form, the electronic device may determine the second target number type corresponding to the second target form according to a preset correspondence between the form and the number type.
The electronic device may preset a correspondence between the form and the number type, and when a number input operation conforming to the second target form is captured, the number type corresponding to the form of the number input operation may be determined according to the correspondence.
For example, the correspondence between the preset form and the number type may be as shown in the following table:
serial number Form(s) of Number type
1 Return + Tab Adding lower numbering types
2 Carriage return Adding same-level number types
3 Return plus go-back Adding upper level numbering types
Then, as can be seen from the above table, when the captured number input operation is in the form of "enter + Tab", the electronic device may determine that the corresponding number type is the add lower level 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;
and the current Chinese number is the 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.
When the electronic equipment captures a number input operation conforming to a second target form, a plurality of Chinese numbers may be added to the document, wherein the Chinese number closest to the position of the cursor in the document at the time of the number input operation is captured, that is, the current Chinese number is the Chinese number most recently input by the user, and the next number that the user wants to input is associated with the Chinese number most recently input, so that after the second target number type is determined, the electronic equipment can determine 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.
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, which will not be described herein again.
S203, adding the second target Chinese number to the position of the cursor in the document.
When the user edits the document, the user usually holds the cursor at the position where the user wants to input information, so after determining the second target Chinese number, the electronic device can add the second target Chinese number to the document 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, then determine, according to the 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 continue to 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 also continue to add the third target Chinese number, the fourth target Chinese number and the like until the document is completely written, wherein the specific adding mode is the same as that of the second target Chinese number, and 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.
Because the form of the number input operation captured by the electronic device each time may be different, the second target number type determined by the electronic device through the preset corresponding relationship between the form and the number type may also be of multiple types, and in one case, the form of the number input operation conforms to the form corresponding to the added upper-level number type, so that the first target number type determined by the electronic device may be the added upper-level number type.
For this case, as shown in fig. 3, 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:
s301, judging whether the style of the current Chinese number is the same as the style of the first-level number in the target Chinese number template, and if so, not executing number adding operation; if not, go to 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, or the like 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 exist in the previous-level Chinese number, and therefore the electronic equipment can determine whether the style of the current Chinese number is the same as the style of the first-level number in the target Chinese number template to determine whether to perform a number addition operation.
If the current Chinese number is the first-level number in the target Chinese number template, the target Chinese number template does not have the Chinese number of the previous level of the current Chinese number, and the number input operation in accordance with the second target form input by the user is likely to be a wrong operation, so that the electronic equipment does not execute the number adding operation.
If they are not the same, it means that the current Chinese number is not the first-level number in the target Chinese number template, then the target Chinese number template has the Chinese number of the previous level of the current Chinese number, and the electronic device can execute step S302.
S302, determining the corresponding level from the target Chinese number template as the upper Chinese number of the previous level of the current Chinese number;
the second target number type determined by the electronic equipment is an added upper-level number type, which indicates that the user needs to add a Chinese number of an 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 previous 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 can 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 Chinese number in the previous level of the current Chinese number from the Chinese numbers in the previous level as a second target Chinese number corresponding to the number input operation.
When the Chinese number of the previous level of the current Chinese number is added to the document, because if the Chinese number of the previous level of the current Chinese number already exists in the document, the number needs to be continuously added on the basis of the Chinese number of the previous level of the current Chinese number already existing in the document, the electronic equipment can determine the Chinese number matched with the Chinese number of the previous level of the current Chinese number from the Chinese numbers of the previous level, and uses the Chinese number as the second target Chinese number corresponding to the number input operation. For example, if the Chinese number at the level above the current Chinese number already existing in the document is "second section", the second target Chinese number required by the user is "third section".
For example, assume that the electronic device determines the target chinese numbering template a4 as shown in the following table:
Figure BDA0002152268140000161
then, if the previous level chinese number of the current chinese number already existing in the document is "the first class hour", the electronic device may determine that the previous level chinese number is the third level chinese number in the target chinese number template a4, and may further determine that the chinese number matched with the "first class hour" in the third level chinese number is "the second class hour", and the "second class hour" is the second target chinese number.
It can be seen that, in this embodiment, the electronic device may determine whether the style of the current chinese number is the same as the style of the first-level number in the target chinese number template, and if not, may determine the upper-level chinese number of which the corresponding level is the previous level of the current chinese number from the target chinese number template, and then determine the chinese number matched with the previous-level chinese number of the current chinese number from the upper-level 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 superior number, the electronic equipment can add the Chinese number of the superior level of the current Chinese number in the document, and 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 a next-level chinese number of the current chinese number to the document, and the electronic device can determine a next-level chinese number corresponding to the next level of the current chinese number from the target chinese number template, and then use a first chinese number of the next-level chinese numbers as a 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 lower level chinese number of the next level, which is the reference 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, reference may be made to the description of determining the first target chinese number, which is not described herein again.
In another embodiment, the second target number type may be an add same level number type. In this case, the user needs to add the same level chinese number as the current chinese number to the document, and the electronic device may determine the same level chinese number corresponding to the level same 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 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 corresponding chinese number of the same level as the level of the reference chinese number from the target chinese number template, determining the chinese number corresponding to the reference chinese number from the chinese number of the same level, and using the determined chinese number as the first target chinese number corresponding to the number input operation, reference may be made to the description of the portion determining the first target chinese number, and details thereof are not repeated here.
As an implementation manner provided by the embodiment of the present invention, the chinese number template stored in the number 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 writes a document with a distinct hierarchy such as a paper, the user may need to add multiple levels of Chinese numbers to the document. In order for the electronic device to determine a suitable target number template from the Chinese number templates stored in the number template database when a user needs to add multiple levels of Chinese numbers to a document, the Chinese number templates may be multiple, and each Chinese number template may include multiple levels of numbers, at least a first level of which is a Chinese number, so that the user can add Chinese numbers to the document conveniently.
In one embodiment, the number of the chinese numbering templates may be 33, and each chinese numbering template may include numbers from the first level to the ninth level, which may be specifically shown in the following table:
Figure BDA0002152268140000171
Figure BDA0002152268140000181
Figure BDA0002152268140000191
as can be seen, in this embodiment, the chinese number template stored in the number template database includes a plurality of levels of numbers, and at least a first level of the plurality of levels of numbers is a chinese number. In this way, the target chinese template determined by the electronic device from the numbering template database may have a number including chinese characters, and may add multiple levels of numbers to the document to meet the user's needs.
Corresponding to the method for adding the Chinese numbers to the document, the embodiment of the invention also provides a device for adding the Chinese numbers to the document. The following describes a device for adding a Chinese number to a document according to an embodiment of the present invention.
As shown in fig. 4, an apparatus for adding chinese numbers to a document, the apparatus comprising:
a reference number determination module 401, configured to determine, when a number input operation conforming to a first target form is captured, a chinese number included in the number input operation as a reference chinese number;
a first type determining module 402, configured to determine, according to a correspondence between a preset form and a number type, a first target number type corresponding to the first target form;
a target template determining module 403, configured to determine, from the chinese numbering templates stored in the preset numbering template database, a target chinese numbering template in which a style of the first-level chinese numbering is the same as a style of the reference chinese numbering;
a first number determining module 404, configured to determine, according to the reference chinese number and the first target number type, a first target chinese number corresponding to the number input operation from the target chinese number template;
a first number adding module 405, configured to add the first target chinese number to a position of a cursor in a document.
It can be seen that, in the solution provided by the embodiment of the present invention, when capturing the number input operation conforming to the first target form, the electronic device can determine the chinese number included in the number input operation as the reference chinese number, then, according to the corresponding relation between the preset form and the number type, determining a first target number type corresponding to the first target form, and then from the Chinese number template stored in the preset number template database, determining a target Chinese number template in which the pattern of the first level Chinese numbers is the same as the pattern of the reference Chinese numbers, and 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, so that the first target Chinese number can be added to the position of a cursor in a document. Therefore, the electronic equipment can add proper Chinese numbers to the document according to the characters input by the user, so that convenience is provided 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 determination sub-module (not shown in fig. 4) configured to determine, from the target chinese number template, a lower-level chinese number whose corresponding level is a next level of the reference chinese number, and to use 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 a type with numbers of the same level added;
the first number determining module 404 may include:
a sibling number determining sub-module (not shown in fig. 4) for determining from the target chinese number template a sibling chinese number having a corresponding level identical to that of the reference chinese number;
and a target sibling number determining submodule (not shown in fig. 4) for determining a chinese number corresponding to the reference chinese number from the sibling 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 apparatus for adding a chinese number to a document may further include:
a second type determining module (not shown in fig. 4) configured to, after the first target chinese number is added to the position of the cursor in the document, determine, when a number input operation conforming to a second target form is captured, 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 the current chinese number and the second target number type;
and the current Chinese number is the 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 a second number adding module (not shown in fig. 4) for adding the second target chinese number to the position of the cursor in the document.
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 determination module (not shown in fig. 4) may include:
a judging sub-module (not shown in fig. 4) for judging whether the style of the current chinese number is the same as the style of the first-level number in the target chinese number template;
a superior number determination sub-module (not shown in fig. 4) for determining, from the target chinese number template, a superior chinese number of a level that corresponds to a level that is superior 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 determination sub-module (not shown in fig. 4) for determining a chinese number matching the upper level chinese number of the current chinese number from among 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 number template stored in the number template database includes a plurality of levels of numbers, and at least a first level number of the plurality of levels of numbers is a chinese number.
An embodiment of the present invention further provides an electronic device, as shown in fig. 5, which includes a processor 501, a communication interface 502, a memory 503 and a communication bus 504, where the processor 501, the communication interface 502 and the memory 503 complete mutual communication through the communication bus 504,
a memory 503 for storing a computer program;
the processor 501 is configured to implement the following steps when executing the program stored in the memory 503:
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;
determining a first target number type corresponding to the first target form according to a corresponding relation between a preset form and the number type;
determining a 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 Chinese number templates stored in a preset number 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 a cursor in the document.
It can be seen that, in the solution provided by the embodiment of the present invention, when capturing the number input operation conforming to the first target form, the electronic device can determine the chinese number included in the number input operation as the reference chinese number, then, according to the corresponding relation between the preset form and the number type, determining a first target number type corresponding to the first target form, and then from the Chinese number template stored in the preset number template database, determining a target Chinese number template in which the pattern of the first level Chinese numbers is the same as the pattern of the reference Chinese numbers, and 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, so that the first target Chinese number can be added to the position of a cursor in a document. Therefore, the electronic equipment can add proper Chinese numbers to the document according to the characters input by the user, so that convenience is provided for the user to write the document.
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 also Digital Signal Processors (DSPs), Application Specific Integrated Circuits (ASICs), Field Programmable Gate Arrays (FPGAs) or other Programmable logic devices, discrete Gate or transistor logic devices, discrete hardware components.
The first target number type may be an added 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-level Chinese number of which the corresponding level is the next level of the reference Chinese number from the target Chinese number template, and taking the first Chinese number in the lower-level Chinese number as a first target Chinese number corresponding to the number input operation.
The first target number type may be a type of adding a same-level number;
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 corresponding level same as the level of the reference Chinese number from the target Chinese number template;
and determining the Chinese number corresponding to the reference Chinese number from the Chinese numbers of the same level as the 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 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;
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;
and the current Chinese number is the 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 adding the second target Chinese number to the position of the cursor in the document.
The second target number type may be an added upper 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 style of the current Chinese number is the same as the style of the first-level number in the target Chinese number template or not;
if the Chinese numbers are different, determining the corresponding level from the target Chinese number template as the upper-level Chinese number of the previous level of the current Chinese number;
and determining the Chinese number matched with the Chinese number in the upper level of the current Chinese number from the upper Chinese numbers as a second target Chinese number corresponding to the number input operation.
The Chinese number template stored in the number template database comprises a plurality of levels of numbers, and at least the number of the first level in the plurality of levels of numbers is a Chinese number.
In yet another embodiment provided by the present invention, there is also provided a computer-readable storage medium having a computer program stored therein, the computer program, when executed by a processor, implementing the steps of:
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;
determining a first target number type corresponding to the first target form according to a corresponding relation between a preset form and the number type;
determining a 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 Chinese number templates stored in a preset number 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 a 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, when a number input operation conforming to a first target form is captured, a chinese number included in the number input operation is determined as a reference chinese number, then a first target number type corresponding to the first target form is determined according to a preset correspondence between the form and the number type, a target chinese number template in which a style of a first-level chinese number 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 then 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, the first target chinese number may be added to the document at the location of the cursor. Therefore, the electronic equipment can add proper Chinese numbers to the document according to the characters input by the user, so that convenience is provided for the user to write the document.
The first target number type may be an added 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-level Chinese number of which the corresponding level is the next level of the reference Chinese number from the target Chinese number template, and taking the first Chinese number in the lower-level Chinese number as a first target Chinese number corresponding to the number input operation.
The first target number type may be a type of adding a same-level number;
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 corresponding level same as the level of the reference Chinese number from the target Chinese number template;
and determining the Chinese number corresponding to the reference Chinese number from the Chinese numbers of the same level as the 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 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;
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;
and the current Chinese number is the 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 adding the second target Chinese number to the position of the cursor in the document.
The second target number type may be an added upper 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 style of the current Chinese number is the same as the style of the first-level number in the target Chinese number template or not;
if the Chinese numbers are different, determining the corresponding level from the target Chinese number template as the upper-level Chinese number of the previous level of the current Chinese number;
and determining the Chinese number matched with the Chinese number in the upper level of the current Chinese number from the upper Chinese numbers as a second target Chinese number corresponding to the number input operation.
The Chinese number template stored in the number template database comprises a plurality of levels of numbers, and at least the number of the first level in the plurality of levels of numbers is a Chinese number.
It should be noted that, for the above-mentioned apparatus, electronic device and computer-readable storage medium embodiments, since they are basically similar to the method embodiments, the description is relatively simple, and for the relevant points, reference may be made to the partial description of the method embodiments.
It is further 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.
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.

Claims (14)

1. A method for adding Chinese numbers to a document, the method comprising:
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;
determining a first target number type corresponding to the first target form according to a corresponding relation between a preset form and the number type;
determining a 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 Chinese number templates stored in a preset number 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 a cursor in the document.
2. The method of claim 1, wherein the first target number type is an add lower number type;
the step of 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 includes:
and determining a lower-level Chinese number of which the corresponding level is the next level of the reference Chinese number from the target Chinese number template, and taking the first Chinese number in the lower-level Chinese number as a first target Chinese number corresponding to the number input operation.
3. The method as claimed in claim 1, wherein the first target number type is an add sibling number type;
the step of 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 includes:
determining the same-level Chinese number with the corresponding level same as the level of the reference Chinese number from the target Chinese number template;
and determining the Chinese number corresponding to the reference Chinese number from the Chinese numbers of the same level as the first target Chinese number corresponding to the number input operation.
4. The method of claim 1, wherein after the step of adding the first target chinese number to a document at a position of a cursor, the method further comprises:
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;
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 type of the second target number, wherein the current Chinese number is the Chinese number closest to the position of a cursor in a 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.
5. The method of claim 4, wherein the second target number type is an add-above number type;
the step of 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 includes:
judging whether the style of the current Chinese number is the same as the style of the first-level number in the target Chinese number template or not;
if the Chinese numbers are different, determining the corresponding level from the target Chinese number template as the upper-level Chinese number of the previous level of the current Chinese number;
and determining the Chinese number matched with the Chinese number in the upper level of the current Chinese number from the upper Chinese numbers as a second target Chinese number corresponding to the number input operation.
6. The method according to any one of claims 1 to 5, wherein the Chinese numbering template stored in the numbering template database comprises a plurality of levels of numbering, and wherein at least a first level of numbering of the plurality of levels is a Chinese numbering.
7. An apparatus for adding chinese numbers to a document, the apparatus comprising:
the reference number determining module is used for determining a Chinese number included by 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 a preset form and the number type;
a target template determining module, configured to determine, from the chinese numbering templates stored in the preset numbering template database, a target chinese numbering template in which a style of the first-level chinese numbering is the same as a style of the reference chinese numbering;
a first number determining module, configured to determine, according to the reference chinese number and the first target number type, a first target chinese number corresponding to the number input operation from the target chinese number template;
and the first number adding module is used for adding the first target Chinese number to the position of a cursor in a document.
8. The apparatus of claim 7, wherein the first target number type is an add lower number type;
the first number determination module includes:
and the target lower-level number determining submodule is used for determining a lower-level Chinese number of which the corresponding level is the next level of the reference Chinese number from the target Chinese number template, and taking the first Chinese number in the lower-level Chinese numbers as a first target Chinese number corresponding to the number input operation.
9. The apparatus as claimed in claim 7, wherein the first target number type is an additive sibling number type;
the first number determination module includes:
a same-level number determining submodule for determining a same-level Chinese number having a level identical to that of the reference Chinese number from the target Chinese number template;
and the target sibling number determining submodule is used for determining the Chinese number corresponding to the reference Chinese number from the sibling Chinese numbers as the first target Chinese number corresponding to the number input operation.
10. The apparatus of claim 7, further comprising:
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 a cursor in a document;
a second number determining module, configured to determine, according to the 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, where the current chinese number is a chinese number closest to a position of a cursor in a document when capturing a number input operation conforming to a second target form;
and the second number adding module is used for adding the second target Chinese number to the position of the cursor in the document.
11. The apparatus of claim 10, wherein the second target number type is an add-above number type;
the second number determination module includes:
a judging submodule for judging whether the style of the current Chinese number is the same as the style of the first-level number in the target Chinese number template;
a superior number determining sub-module for determining a superior Chinese number of which a corresponding level is a superior 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 serial number determining submodule is used for determining a Chinese serial number matched with the Chinese serial number in the upper level of the current Chinese serial number from the upper-level Chinese serial numbers as a second target Chinese serial number corresponding to the serial number input operation.
12. The apparatus according to any one of claims 7 to 11, wherein the chinese numbering template stored in the numbering template database comprises a plurality of levels of numbers, and wherein at least a first level of numbers in the plurality of levels is a chinese number.
13. 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 of claims 1-6 when executing a program stored in the memory.
14. A computer-readable storage medium, characterized in that a computer program is stored in the computer-readable storage medium, which computer program, when being executed by a processor, carries out the method steps of any one of claims 1 to 6.
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 true CN112395829A (en) 2021-02-23
CN112395829B 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 (5)

* 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
US20140173422A1 (en) * 2012-12-14 2014-06-19 Athenahealth, Inc. Document template auto discovery
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

Patent Citations (5)

* 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
US20140173422A1 (en) * 2012-12-14 2014-06-19 Athenahealth, Inc. Document template auto discovery
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中为章节标题添加自动编号", 电子与电脑, no. 11, 8 November 2003 (2003-11-08) *
李艳芳;文海英;: "Word样式的应用和管理研究", 湖南科技学院学报, no. 05, 1 May 2018 (2018-05-01) *

Also Published As

Publication number Publication date
CN112395829B (en) 2024-03-19

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
CN111444750B (en) PDF document identification method and device and electronic equipment
JP2019520625A (en) Human computer interaction method and device thereof
CN105302786A (en) Editing method and device for data
CN112651217B (en) Paper document processing method, paper document processing device, electronic equipment and storage medium
CN106970758B (en) Electronic document operation processing method and device and electronic equipment
CN110543450A (en) Electronic document generation method and device, computer equipment and storage medium
CN111243593A (en) Speech recognition error correction method, mobile terminal and computer-readable storage medium
CN112329409B (en) Cell color conversion method and device and electronic equipment
CN112528703B (en) Method and device for identifying table structure and electronic equipment
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
CN112000257A (en) Method and device for exporting key contents of document
CN111563364B (en) Chapter title style conversion method and device, electronic equipment and storage medium
CN106293368B (en) Data processing method and electronic equipment
CN112329407A (en) Method and device for adding data in table and electronic equipment
CN111832270A (en) Method and device for displaying row number and column label of table and electronic equipment
CN112417834A (en) Document processing method and device and electronic equipment
CN111666733B (en) Method and device for processing cells in document
CN112329398A (en) Document management method and device and electronic equipment
CN111832262B (en) Document processing method and device, electronic equipment and storage medium
CN109902277B (en) Document editing method and device, electronic equipment and readable storage medium
CN112784542B (en) Document editing method and device
CN111199144B (en) Document content altering 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