CN112183021A - Digital generation method and device - Google Patents

Digital generation method and device Download PDF

Info

Publication number
CN112183021A
CN112183021A CN201910600905.5A CN201910600905A CN112183021A CN 112183021 A CN112183021 A CN 112183021A CN 201910600905 A CN201910600905 A CN 201910600905A CN 112183021 A CN112183021 A CN 112183021A
Authority
CN
China
Prior art keywords
style
text
document
name
custom
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201910600905.5A
Other languages
Chinese (zh)
Inventor
陈志宝
吴增谂
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
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 CN201910600905.5A priority Critical patent/CN112183021A/en
Publication of CN112183021A publication Critical patent/CN112183021A/en
Pending legal-status Critical Current

Links

Images

Abstract

The embodiment of the invention provides a digital generation method and a digital generation device, wherein the method comprises the following steps: acquiring a first number input in a document, wherein the first number is a number of a first number type; creating a custom style with a style name of a first style name, setting a style of a first number as the first style, wherein the first style name comprises: a first character representing a custom style and a number of the first style; generating domain information containing the first pattern name and second characters, and inserting a domain attribute text taking the value as the domain information into the document, wherein the second characters are characters representing a second numerical type; and generating the numbers of the second number type in the document according to the domain attribute text. When the scheme provided by the embodiment of the invention is applied to generating numbers, the risk that the expressed meanings of two types of numbers are different when the numbers are input can be effectively reduced.

Description

Digital generation method and device
Technical Field
The present invention relates to the field of document processing technologies, and in particular, to a method and an apparatus for generating a number.
Background
In the process of inputting characters in an electronic document, two types of numbers need to be input in some scenes, but the meanings of the two types of numbers are the same. For example, in an accounting billing scenario, a number "100" of the arabic numeral type and a number "one hundred" of the capitalized chinese type need to be entered in an electronic document.
In the prior art, a user is generally required to input digits of Arabic numeral type in a document and then input capitalized Chinese type digits with the same meanings behind the input digits.
However, if the user changes the digits of the Arabic numeral type, the capitalized Chinese type digits also need to be changed accordingly in order to keep the meanings of the two types of numerical expressions the same. Since the two types of digits are independent of each other, the user is also required to re-enter the capitalized Chinese type of digits after the user changes the Arabic digit type of digits.
Although the content expressed by the two types of numbers can be kept consistent by applying the above method, there may be a case that the user forgets to modify one type of numbers after modifying the other type of numbers, or erroneously modifies the other type of numbers. Thus, using the above approach to enter numbers, there is a risk that the meanings expressed by the two types of numbers will not be the same.
Disclosure of Invention
The embodiment of the invention aims to provide a number generation method and a number generation device so as to reduce the risk that the meanings expressed by two types of numbers are different when the numbers are input. The specific technical scheme is as follows:
in a first aspect, an embodiment of the present invention provides a method for generating a number, where the method includes:
acquiring a first number input in a document, wherein the first number is a number of a first number type;
creating a custom style with a style name of a first style name, setting the style of the first number as the first style, wherein the style represents a property set of text, and the first style name comprises: a first character representing a custom style and a number of the first style;
generating domain information containing the first pattern name and second characters, and inserting a domain attribute text taking the value as the domain information into the document, wherein the second characters are characters representing a second numerical type;
and generating the numbers of the second number type in the document according to the domain attribute text.
In an embodiment of the present invention, the acquiring the first number entered in the document includes:
determining a text content control inserted at a focal position in a document;
determining a number contained in the textual content of the textual content control as a first number.
In an embodiment of the present invention, the creating a custom style with a style name of a first style name includes, as the first style:
obtaining the maximum number of the created self-defined styles in the document;
calculating the number of a first style to be created according to the maximum number;
generating a style name containing the first character and the calculated number as a first style name;
and creating a custom style as a first style by using the first style name as a style name.
In an embodiment of the present invention, the inserting a domain attribute text whose value is the domain information into the document includes:
obtaining prompt text, wherein the prompt text is used for prompting the numbers of the second number type;
inserting the prompt text after the position of the first number in the document;
and inserting the domain attribute text after the position of the prompt text in the document.
In a second aspect, an embodiment of the present invention provides a digital generation apparatus, where the apparatus includes:
the system comprises a first number acquisition module, a second number acquisition module and a third number acquisition module, wherein the first number acquisition module is used for acquiring a first number which is input in a document, and the first number is a number of a first number type;
the style setting module is used for creating a custom style with a style name of a first style name, setting the style of the first number as the first style, wherein the style represents an attribute set of a text, and the first style name comprises: a first character representing a custom style and a number of the first style;
a domain information generating module, configured to generate domain information including the first pattern name and a second character, and insert a domain attribute text whose value is the domain information into the document, where the second character is a character representing a second numeric type;
and the number generation module is used for generating the numbers of the second number type in the document according to the domain attribute text.
In an embodiment of the present invention, the first digital obtaining module is specifically configured to:
determining a text content control inserted at a focal position in a document;
determining a number contained in the textual content of the textual content control as a first number.
In an embodiment of the present invention, the style setting module is specifically configured to:
obtaining the maximum number of the created self-defined styles in the document;
calculating the number of a first style to be created according to the maximum number;
generating a style name containing the first character and the calculated number as a first style name;
and creating a custom style as a first style by using the first style name as a style name.
In an embodiment of the present invention, the domain information generating module is specifically configured to:
obtaining prompt text, wherein the prompt text is used for prompting the numbers of the second number type;
inserting the prompt text after the position of the first number in the document;
and inserting the domain attribute text after the position of the prompt text in the document.
In a third aspect, an embodiment of the present invention provides a terminal 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;
a processor configured to implement the method steps of the first aspect when executing the program stored in the memory.
In a fourth aspect, 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 the method steps described in the first aspect.
As can be seen from the above, when generating a number by applying the scheme provided in the embodiment of the present invention, first, a number of a first number type that has been input in a document is obtained, then, a custom style with a style name as a first style name is created as the first style, the style of the first number is set as the first style, then, domain information including the first style name and a second character is generated, a domain attribute text whose value is the domain information is inserted into the document, and finally, a number of a second number type is generated in the document according to the domain attribute text.
As can be seen from the above, since the field attribute text can generate another text expressing the same meaning from one text, when the field information includes the style name of the style of the first numeral and the character representing the second numeral type, if the value of the field attribute text is set to the field information, the second numeral of the second numeral type expressing the same meaning as the first numeral can be generated from the field attribute text. Thus, when the field attribute text is inserted in the document into which the first number has been input, a second number having the same meaning as that expressed by the first number can be generated; and after the first number is modified, a second number having the same meaning as the first number after the modification can be regenerated. Therefore, the user is not required to manually input or modify the second number, and compared with the prior art, the risk that the meanings of the two types of numbers are different when the numbers are input can be effectively reduced.
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 schematic flow chart of a digital generation method according to an embodiment of the present invention;
FIG. 2 is a diagram of an interface for setting custom style properties according to an embodiment of the present invention;
FIG. 3 is a schematic diagram of a method for creating a style interface according to an embodiment of the present invention;
fig. 4 is a schematic structural diagram of a digital generation apparatus according to an embodiment of the present invention;
fig. 5 is a schematic structural diagram of a terminal 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.
The following first explains an execution subject of an embodiment of the present invention.
The execution subject of the embodiment of the present invention may be a terminal device, for example, the terminal device may be: cell-phone, panel computer, desktop computer, notebook computer etc.. The execution subject of the embodiment of the present invention may also be a document editing client running in the terminal device, for example, the document editing client may be: word, Excel, WPS, and the like.
The following description will be made by taking the execution subject of the embodiment of the present invention as the above-described terminal device as an example.
Referring to fig. 1, fig. 1 is a schematic flow chart of a digital generation method provided in an embodiment of the present invention, where the method includes:
s101: the first number entered in the document is obtained.
The first number is a number of a first number type. The number type may be understood as a number type expressed using different languages, for example: there may be chinese upper case digit types, english digit types, arabic digit types, roman digit types, and so on.
Specifically, the first number input in the document may be a number directly input in the document by the user.
In addition, when the first number is input into the document, a text content control can be inserted into the cursor position of the document, and then the input number is input into the document as the text content of the text content control.
Specifically, the text content control may include two types of controls, namely a format text control and a general text control. The following describes how to insert a text content control in a document, taking the example of inserting a format text control at a cursor position of the document.
In the first mode, after determining the cursor position of the document, the terminal device directly triggers an insertion instruction for inserting the format text control, and inserts the format text control at the cursor position of the document.
In the second mode, a user clicks a menu item of a text content control, and the terminal equipment can acquire an alternative of the text content control; if the user clicks the alternative item 'format text control' in the alternative items, the terminal equipment generates an insertion instruction for inserting the format text control, and after the position of a cursor in the document is determined, the format text control is inserted at the position of the cursor of the document in response to the insertion instruction.
After a format text control is inserted into a cursor position of a document, text content needs to be set for the format text control.
Specifically, the text content may be set for the format text control in the following manner.
In the first mode, a user can click a menu item of 'input number', the terminal equipment displays a number input window, and after the user inputs numbers in the window, the terminal equipment can acquire the numbers input in the window by the user, set the acquired numbers as values of the attribute of the text content control, and further finish setting the text content of the format text control.
In the second mode, the user can also directly input numbers in the text content of the text content control, so that the terminal equipment can directly set the numbers input by the user as the text content of the text content control, and further the setting of the text content of the format text control is completed.
In this way, the first number of the first type may be displayed as the text content of the text content control, and since the appearance of the text content control is conspicuous, the user who can display the number based on the text content control may intuitively know the number in the document.
On the basis of the above description, in one embodiment of the present invention, the first number that has been input in the document can be obtained through the following steps a1 and B1.
Step A1: a text content control inserted at a focal location in the document is determined.
The position of the focus in the document may be a position where the cursor is located in the document, and in this case, the terminal device may determine the text content control inserted at the position where the cursor is located in the document.
Step B1: a number contained in the textual content of the textual content control is determined to be a first number.
After the text content control is determined, the attribute of the text content in the attribute of the text content control can be inquired, the value of the attribute of the text content is obtained, and the number contained in the value is used as the first number.
S102: and creating a custom style with a style name of a first style name, and setting the style of the first number as the first style.
The above-mentioned styles may be understood as a set of attributes of text. For example: text attributes may be text color, text size, text font, text spacing, etc., assuming that text attributes of a text include: sons, 14 lbs, black, fixed line spacing of 22 lbs, then "sons, 14 lbs, black, fixed line spacing of 22 lbs" is the style of the text.
The first formula name includes: a first character representing the custom style and a number of the first style. In addition, the first style name may further include a predetermined connection character.
Specifically, the first character may be a chinese character, an english character, or a special character. The number may be an arabic numeral indicating an order in which the first style is created in the custom styles contained in the document. The above connection character may be a character of "&" or the like.
For example, the first character may be a "style", and the number of the first style is: 3, the first style name may be "style 3".
In addition, the first character may be "x", and the number of the first pattern may be: 3, the connection character can be: and, the first style name may be "x & 3".
In one embodiment of the present invention, a custom style with a style name of a first style name is created, and the first style can be realized through the following steps a2, B2, C2 and D2.
Step A2: the maximum number of custom styles in the document that have been created is obtained.
After the terminal device opens the document, all text styles of the current document can be traversed, whether the style names of the text styles contain the first characters or not is judged, and therefore the created custom styles in the document can be obtained. The name of the custom style comprises the number of the custom style, so that the number of each created custom style can be determined according to the name of the created custom style, and the maximum number of the created custom style in the document can be obtained from the determined number.
After the terminal device opens the document, the user may define a new custom style in the document, in this case, when the terminal device creates each custom style, the current maximum number may be increased by a preset step length as a number of the custom style to be created, and the number of the custom style to be created is used as a new maximum number. The maximum number can be conveniently obtained in the data generating process, and can be recorded in a global variable setting mode.
For example, after the terminal device opens the document, the maximum number of the created custom styles is determined to be: 10, assuming that the preset step length is as follows: 1, when a first custom style is created after a document is opened, the maximum number is: 10, the number of the first custom style is: 10+1 is 11, so the current maximum number is 11. The second custom style created is with the maximum number: 11, the second custom style has a number of 11+ 1-12, so that the current maximum number is 12.
Step B2: and calculating the number of the first style to be created according to the maximum number.
Assuming that the maximum number is n, the number of the first style to be created may be n + 1.
Step C2: a style name including the first character and the calculated number is generated as a first style name.
After the first character and the calculated number are obtained, the first pattern name may be generated in a certain format. The format may specify the first character, the position of the calculated number in the first pattern name, the connection character used, etc.
For example, the format of the first style name may be "x & (n + 1)", where x denotes a first character, n +1 denotes a calculated number, & is a connection character for connecting contents before and after it. If the first character is "style", the calculated number is 3, and the first style name is "number & 3".
Step D2: and creating the custom style as the first style by using the first style name as the style name.
After determining the style name of the first style name as the custom style, there are several ways to create the custom style:
for example, after acquiring a first number input in a document, a terminal device may directly trigger an instruction for creating a custom style, and display an interface for setting a custom style attribute, as shown in fig. 2, fig. 2 is a schematic diagram of an interface for setting a custom style attribute according to an embodiment of the present invention, where fig. 2 includes a style attribute, a style format, and other setting items, a user may set a style name, a style type, and the like in an "attribute" part, and may set a text size, a text color, a text interval, and the like in a "format" part. This may create a custom style with a style name of the first style name.
Alternatively, the user may click on a "new style" menu item, as shown in fig. 3, fig. 3 is a schematic diagram of a style creation interface according to an embodiment of the present invention, and a first icon of three parallel rectangular icons at the lower left corner in fig. 3 is a menu item of a "new style". The terminal equipment generates an instruction for creating the custom style and displays an interface for setting the attribute of the custom style, so that the custom style with the style name of the first style name can be created.
In this way, the maximum number of the created style is obtained according to the style of the first character included in the created style name in the document, and the number of the style to be created can be calculated, so that the style name of the style to be created is unique in the document, and the situation that the style names of the styles are repeated is avoided.
After creating a custom style with a style name of a first style name, as the first style, setting the style of the first number as the first style, that is, the custom style, may have a variety of ways: for example: the terminal device may directly trigger the instruction for setting the style of the first number as the custom style after acquiring the created custom style, and set the style of the first number as the custom style; the terminal device may set the style of the first digit to the first style in response to a setting instruction for setting the style of the first digit to the custom style by the user.
S103: and generating domain information containing the first pattern name and the second character, and inserting a domain attribute text taking the value as the domain information into the document.
The second character is a predetermined character, and if the second numeric type is an upper case Chinese numeric type, the second character may be CHINESENUM 2.
When the domain information is generated according to the first style name and the second character, the first style name and the second character can be directly connected in a character form to generate the domain information, and the second style name and the second character can be connected through a preset connecting character to generate the domain information according to a preset format. For example, the above-mentioned concatenated characters may be \ or the like. In addition, the connection character and the predetermined format may be determined according to a format requirement of the domain attribute text on the value of the domain attribute text.
The above-mentioned domain attribute text may instruct the terminal device to generate another text expressing the same meaning from the one text. If the field information includes a style name of a style of a first numeral and characters representing a second numeral type, the field attribute text includes a style name of a style of a first numeral and characters representing a second numeral type. For example: the field attribute text may be "style 1\ china enum 2".
In one embodiment of the present invention, after domain information including a first style name and a second character is generated, inserting a domain attribute text that takes a value as the domain information into a document may be implemented by the following steps a3, B3, and C3.
Step A3: and obtaining prompt text.
The prompt text is used for prompting that the position of the text is the number of the second number type. For example, if the second numeric type is capitalized Chinese, the prompt text may be "capitalized Chinese: ".
There are various ways to obtain the prompt text, for example: the prompt text can be generated in advance by the terminal equipment; the prompt text input by the user can be obtained by the terminal equipment.
Step B3: and inserting a prompt text after the position of the first number in the document.
After the terminal device obtains the prompt text, the terminal device may determine the position of the first number in the document, and trigger an instruction for inserting the prompt text, so that the prompt text may be inserted after the position of the first number in the document.
Step C3: and inserting the domain attribute text after prompting the position of the text in the document.
After the prompt text is inserted after the position of the first number in the document, the terminal equipment can determine the position of the prompt text in the document, trigger an instruction for inserting the domain attribute text, and insert the domain attribute text after the position of the prompt text; or after the user clicks the menu item of the 'domain', the terminal equipment generates an instruction for inserting the domain attribute text, and inserts the domain attribute text after the position of the prompt text is located.
Therefore, according to the position of the prompt text, the position of the second number in the document can be determined more intuitively by the user.
S104: from the domain attribute text, a number of a second number type is generated in the document.
The text can instruct the terminal device to generate another text with the same expression meaning according to the text due to the domain attribute. When the field information contains a style name of a style of a first numeral and a character representing a second numeral type, then a numeral of the second numeral type having the same meaning as the first numeral expression may be generated from the first numeral according to the field attribute text.
After a number of a second number type is generated in a document, if a user modifies a first number, the number of the second number type which has the same meaning as that of the modified first number expression needs to be regenerated after the first number is modified. In this case, after acquiring the modified first number, the terminal device may trigger an instruction for updating the domain attribute text, and update the domain attribute text in the document; or after the user clicks the menu item of 'update domain', the terminal equipment generates an instruction of updating the domain attribute text, and updates the domain attribute text in the document. Then, based on the updated domain attribute text, a second number of a second number type may be regenerated in the document that has the same meaning as the modified first number expression.
As can be seen from the above, since the field attribute text can generate another text expressing the same meaning from one text, when the field information includes the style name of the style of the first numeral and the character representing the second numeral type, if the value of the field attribute text is set to the field information, the second numeral of the second numeral type expressing the same meaning as the first numeral can be generated from the field attribute text. Thus, when the field attribute text is inserted in the document into which the first number has been input, a second number having the same meaning as that expressed by the first number can be generated; and after the first number is modified, a second number having the same meaning as the first number after the modification can be regenerated. Therefore, the user is not required to manually input or modify the second number, and compared with the prior art, the risk that the meanings of the two types of numbers are different when the numbers are input can be effectively reduced.
Referring to fig. 4, fig. 4 is a schematic structural diagram of a digital generation apparatus according to an embodiment of the present invention, where the apparatus includes:
the first number acquiring module 401 is configured to acquire a first number that has been input in a document, where the first number is a number of a first number type.
A style setting module 402, configured to create a custom style with a style name of a first style name, as the first style, and set a style of a first number as the first style, where the style represents a set of attributes of a text, and the first style name includes: a first character representing the custom style and a number of the first style.
A domain information generating module 403, configured to generate domain information that includes a first style name and a second character, and insert a domain attribute text that takes on the value of the domain information into the document, where the second character is a character that represents a second numeric style.
A number generation module 404 for generating numbers of the second number type in the document based on the domain attribute text.
As can be seen from the above, since the field attribute text can generate another text expressing the same meaning from one text, when the field information includes the style name of the style of the first numeral and the character representing the second numeral type, if the value of the field attribute text is set to the field information, the second numeral of the second numeral type expressing the same meaning as the first numeral can be generated from the field attribute text. Thus, when the field attribute text is inserted in the document into which the first number has been input, a second number having the same meaning as that expressed by the first number can be generated; and after the first number is modified, a second number having the same meaning as the first number after the modification can be regenerated. Therefore, the user is not required to manually input or modify the second number, and compared with the prior art, the risk that the meanings of the two types of numbers are different when the numbers are input can be effectively reduced.
In an embodiment of the present invention, the first digital acquiring module 401 is specifically configured to:
determining a text content control inserted at a focal position in a document; a number contained in the textual content of the textual content control is determined to be a first number.
In this way, the number contained in the text content of the text content control is determined as the first number, so that the user can intuitively determine the position of the first number in the document according to the appearance of the text content control.
In an embodiment of the present invention, the style setting module 402 is specifically configured to:
obtaining the maximum number of created self-defined styles in the document; calculating the number of a first style to be created according to the maximum number; generating a style name containing the first character and the calculated number as a first style name; and creating the custom style as the first style by using the first style name as the style name.
As can be seen from the above, by applying the embodiment, the maximum number of the created style is obtained according to the style in which the created style name in the document includes the first character, and the number of the style to be created can be calculated, so that the style name of the style to be created is unique in the document, and the situation that the style names of the styles are repeated is avoided.
In an embodiment of the present invention, the domain information generating module 403 is specifically configured to:
obtaining prompt text, wherein the prompt text is used for prompting the numbers of the second number type; inserting a prompt text after the position of the first number in the document; and inserting the domain attribute text after prompting the position of the text in the document.
As can be seen from the above, the position of the prompt text provided by the present embodiment enables the user to more intuitively determine the position of the second number in the document.
Fig. 5 is a schematic structural diagram of a terminal device according to an embodiment of the present invention, and 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 execute the steps of the digital generation method provided by the foregoing method embodiments when executing the program stored in the memory 503.
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.
In a further embodiment provided by the present invention, a computer-readable storage medium is further provided, in which a computer program is stored, and the computer program is executed by a processor to perform the digital generation method steps provided by the foregoing method embodiments.
In a further embodiment provided by the present invention, there is also provided a computer program product containing instructions which, when run on a computer, cause the computer to perform the digital generation method steps provided by the aforementioned method embodiments.
As can be seen from the above, when the terminal device provided in the above embodiments is used to generate numbers and execute the computer program stored in the machine-readable storage medium to generate numbers, the domain information includes the style name of the first style and the second character, where the first style is the style of the first number and the second character is the character of the second number type, so that the domain information can form the association relationship between the first number and the number of the second number type. In this way, when a domain attribute text that takes the value of domain information is inserted in a document into which a first number has been input, a second number that has the same meaning as that expressed by the first number can be generated. After the first number is modified, a second number having the same meaning as the modified first number may also be generated. Compared with the prior art, the method effectively reduces the risk that the meanings of the two types of numbers are different when the numbers are input.
In the above embodiments, the implementation may be wholly or partially realized by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. The procedures or functions according to the embodiments of the invention are brought about in whole or in part when the computer program instructions are loaded and executed on a computer. The computer may be a general purpose computer, a special purpose computer, a network of computers, or other programmable device. The computer instructions may be stored in a computer readable storage medium or transmitted from one computer readable storage medium to another, for example, the computer instructions may be transmitted from one website, computer, server, or data center to another website, computer, server, or data center by wire (e.g., coaxial cable, fiber optic, Digital Subscriber Line (DSL)) or wirelessly (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device, such as a server, a data center, etc., that incorporates one or more of the available media. The usable medium may be a magnetic medium (e.g., floppy Disk, hard Disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., Solid State Disk (SSD)), among others.
It is noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
All the embodiments in the present specification are described in a related manner, and the same and similar parts among the embodiments may be referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, as for the apparatus, the terminal device and the computer readable medium, since they are substantially similar to the method embodiments, the description is relatively simple, and the relevant points can be referred to the partial description of the method embodiments.
The above description is only for the preferred embodiment of the present invention, and is not intended to limit the scope of the present invention. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention shall fall within the protection scope of the present invention.

Claims (10)

1. A method of digital generation, the method comprising:
acquiring a first number input in a document, wherein the first number is a number of a first number type;
creating a custom style with a style name of a first style name, setting the style of the first number as the first style, wherein the style represents a property set of text, and the first style name comprises: a first character representing a custom style and a number of the first style;
generating domain information containing the first pattern name and second characters, and inserting a domain attribute text taking the value as the domain information into the document, wherein the second characters are characters representing a second numerical type;
and generating the numbers of the second number type in the document according to the domain attribute text.
2. The method of claim 1, wherein obtaining the first number entered in the document comprises:
determining a text content control inserted at a focal position in a document;
determining a number contained in the textual content of the textual content control as a first number.
3. The method according to claim 1, wherein the creating a custom style with a style name of a first style name comprises as the first style:
obtaining the maximum number of the created self-defined styles in the document;
calculating the number of a first style to be created according to the maximum number;
generating a style name containing the first character and the calculated number as a first style name;
and creating a custom style as a first style by using the first style name as a style name.
4. The method of claim 1, wherein the inserting of the domain attribute text that takes the value of the domain information into the document comprises:
obtaining prompt text, wherein the prompt text is used for prompting the numbers of the second number type;
inserting the prompt text after the position of the first number in the document;
and inserting the domain attribute text after the position of the prompt text in the document.
5. An apparatus for generating a number, the apparatus comprising:
the system comprises a first number acquisition module, a second number acquisition module and a third number acquisition module, wherein the first number acquisition module is used for acquiring a first number which is input in a document, and the first number is a number of a first number type;
the style setting module is used for creating a custom style with a style name of a first style name, setting the style of the first number as the first style, wherein the style represents an attribute set of a text, and the first style name comprises: a first character representing a custom style and a number of the first style;
a domain information generating module, configured to generate domain information including the first pattern name and a second character, and insert a domain attribute text whose value is the domain information into the document, where the second character is a character representing a second numeric type;
and the number generation module is used for generating the numbers of the second number type in the document according to the domain attribute text.
6. The apparatus of claim 5, wherein the first digital acquisition module is specifically configured to:
determining a text content control inserted at a focal position in a document;
determining a number contained in the textual content of the textual content control as a first number.
7. The apparatus according to claim 5, wherein the style setting module is specifically configured to:
obtaining the maximum number of the created self-defined styles in the document;
calculating the number of a first style to be created according to the maximum number;
generating a style name containing the first character and the calculated number as a first style name;
and creating a custom style as a first style by using the first style name as a style name.
8. The apparatus of claim 5, wherein the domain information generating module is specifically configured to:
obtaining prompt text, wherein the prompt text is used for prompting the numbers of the second number type;
inserting the prompt text after the position of the first number in the document;
and inserting the domain attribute text after the position of the prompt text in the document.
9. The terminal equipment 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 the communication between the processor and 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 to 4 when executing a program stored in the memory.
10. 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 4.
CN201910600905.5A 2019-07-04 2019-07-04 Digital generation method and device Pending CN112183021A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910600905.5A CN112183021A (en) 2019-07-04 2019-07-04 Digital generation method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910600905.5A CN112183021A (en) 2019-07-04 2019-07-04 Digital generation method and device

Publications (1)

Publication Number Publication Date
CN112183021A true CN112183021A (en) 2021-01-05

Family

ID=73915452

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910600905.5A Pending CN112183021A (en) 2019-07-04 2019-07-04 Digital generation method and device

Country Status (1)

Country Link
CN (1) CN112183021A (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110072272A1 (en) * 2009-09-23 2011-03-24 International Business Machines Corporation Large-scale document authentication and identification system
CN103718189A (en) * 2011-06-15 2014-04-09 惠普发展公司,有限责任合伙企业 Security image printing
CN104346322A (en) * 2013-08-08 2015-02-11 北大方正集团有限公司 Document format processing device and document format processing method
CN109558599A (en) * 2018-11-07 2019-04-02 北京搜狗科技发展有限公司 A kind of conversion method, device and electronic equipment

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110072272A1 (en) * 2009-09-23 2011-03-24 International Business Machines Corporation Large-scale document authentication and identification system
CN103718189A (en) * 2011-06-15 2014-04-09 惠普发展公司,有限责任合伙企业 Security image printing
CN104346322A (en) * 2013-08-08 2015-02-11 北大方正集团有限公司 Document format processing device and document format processing method
CN109558599A (en) * 2018-11-07 2019-04-02 北京搜狗科技发展有限公司 A kind of conversion method, device and electronic equipment

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
宫云战 等: "计算机引论", 国防科技大学出版社, pages: 187 - 191 *

Similar Documents

Publication Publication Date Title
KR101312867B1 (en) Markup based extensibility for user interfaces
JP4242848B2 (en) Method and apparatus for visually conspicuous numerical data contained in electronic document
WO2009156438A1 (en) Method and system for entering an expression
CN110221899B (en) User interface adjusting method, device and system
CN113741898B (en) Form generation method, device and equipment
CN111666740A (en) Flow chart generation method and device, computer equipment and storage medium
CN114036443A (en) Page generation method and device
CN110764680B (en) Method and device for generating simulated keyboard, electronic equipment and computer readable medium
CN111367518A (en) Page layout method and device, computing equipment and computer storage medium
CN116304442A (en) Page code generation method and device, electronic equipment and storage medium
US10437464B2 (en) Content filtering system for touchscreen devices
CN112183021A (en) Digital generation method and device
CN112052647A (en) Document editing method and device, electronic equipment and readable storage medium
CN116301785A (en) Method and device for realizing custom text editor component
CN116028062A (en) Target code generation method, NPU instruction display method and device
CN110968311A (en) Front-end page construction method and device and electronic equipment
CN111596828B (en) cookie synchronization method, device and computer readable storage medium
CN114253536A (en) Calling method of interface design component, terminal device and readable storage medium
CN114237560A (en) Data storage method, storage device, electronic equipment and storage medium
CN110780970A (en) Data screening method, device, equipment and computer readable storage medium
CN113535162A (en) Front-end interface configuration method, display method and device
CN113076165A (en) Page checking method and device
CN112784542B (en) Document editing method and device
CN110688108A (en) Model generation method and device and storage medium
CN110837371A (en) Document designer, document designing method and document input system

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