CN109657209A - Replacement method, device, equipment and the computer storage medium of content of text - Google Patents

Replacement method, device, equipment and the computer storage medium of content of text Download PDF

Info

Publication number
CN109657209A
CN109657209A CN201811212381.4A CN201811212381A CN109657209A CN 109657209 A CN109657209 A CN 109657209A CN 201811212381 A CN201811212381 A CN 201811212381A CN 109657209 A CN109657209 A CN 109657209A
Authority
CN
China
Prior art keywords
replacement
text
read
content
target character
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
CN201811212381.4A
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.)
OneConnect Smart Technology Co Ltd
Original Assignee
OneConnect Smart Technology 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 OneConnect Smart Technology Co Ltd filed Critical OneConnect Smart Technology Co Ltd
Priority to CN201811212381.4A priority Critical patent/CN109657209A/en
Publication of CN109657209A publication Critical patent/CN109657209A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/10Text processing
    • G06F40/166Editing, e.g. inserting or deleting
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/10Text processing
    • G06F40/12Use of codes for handling textual entities
    • G06F40/151Transformation

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Health & Medical Sciences (AREA)
  • Artificial Intelligence (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • Computational Linguistics (AREA)
  • General Health & Medical Sciences (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention discloses a kind of replacement methods of content of text, it include: to read to repeated text and the target character in repeated text, the each replacement prestored is read according to preset order, when reading the replacement every time, it is described to the target character in repeated text using the replacement replacement of reading, to generate target text, when there is the replacement not being read, described the step of reading each replacement prestored according to preset order is executed.The invention also discloses a kind of alternative of content of text, the replacement equipment of content of text and computer storage mediums.The present invention, to the target character in repeated text, is carried out circulation replacement to target character with the replacement prestored and generates multiple target texts comprising duplicate contents, the mode for providing a kind of efficiently and accurately carries out the quick replacement of content of text by identification.

Description

Replacement method, device, equipment and the computer storage medium of content of text
Technical field
The present invention relates to field of computer technology more particularly to a kind of replacement method of content of text, content of text to replace Changing device, the replacement equipment of content of text and computer storage medium.
Background technique
In project development or business procession, it is often necessary to generate in batches some codes comprising duplicate contents or Text file.In these codes or text file, the content of the variation except duplicate contents usually has certain variation rule Rule derives from same group of data file, such as the content of variation is progressive whole number, such as the content of variation is the surname of client Name and identification card number etc..If generating the code or text file comprising duplicate contents by the content of manual modification variation, Efficiency is very low and easy error.
Above content is only used to facilitate the understanding of the technical scheme, and is not represented and is recognized that above content is existing skill Art.
Summary of the invention
The main purpose of the present invention is to provide a kind of replacement methods of content of text, the alternative of content of text, text The replacement equipment and computer storage medium of this content, it is intended to which solution is generated by the content that manual modification changes comprising repeating The technical issues of code or text file of content, efficiency is very low and easy error.
To achieve the above object, the present invention provides a kind of replacement method of content of text, the replacement side of the content of text Method includes the following steps:
It reads to repeated text and the target character in repeated text;
The each replacement prestored is read according to preset order;
It is described to the target word in repeated text using the replacement replacement of reading when reading the replacement every time Symbol, to generate target text;
When there is the replacement not being read, the step that each replacement prestored is read according to preset order is executed Suddenly.
Preferably, described the step of reading each replacement prestored according to preset order, includes:
Obtain the number of the target character;
The replacement prestored is read according to the number;
It is described described to the target character in repeated text using the replacement read replacement, to generate the step of target text Suddenly include:
Each target character is successively replaced using the replacement of reading, to generate target text.
Preferably, the content of text replacement method further include:
The number of the number of the replacement prestored described in acquisition and the replacement read;
It is replaced according to what the calculating of the number of the number of the replacement prestored and the replacement read was not read Change the number of item;
If the number of the replacement not being read is greater than or equal to the number of the target character, execute it is described according to Preset order reads the step of each replacement prestored.
Preferably, whether the number for judging the replacement not being read is greater than or equal to the number of the target data The step of after further include:
If the number of the replacement not being read is less than the number of the target character, the target character is determined The difference of the number of number and the replacement not being read;
The information comprising the difference is generated and shows, so that user increases replacement according to the information.
Preferably, described read includes: to the step of repeated text and target character in repeated text
From the location information to obtain the target character in the corresponding configuration file of repeated text;
According to the positional information from described to be successively read the target character in repeated text.
Preferably, described when reading the replacement every time, it is described wait repeat text using the replacement replacement of reading Target character in this, to generate target text the step of include:
It is described when the target character in repeated text being replaced using the replacement read, according to preset text formatting The text formatting of the replacement is set.
Preferably, described described when the target character in repeated text using the replacement read replacement, according to described Preset text formatting is arranged the step of text formatting of the replacement and includes:
When described when repeated text type is html file, the generation of the corresponding class of the preset text formatting is created Code, and by the code insertion of the class to described in repeated text;
The code of the class is quoted in creation, and the code of the reference class is believed according to the position of the target character Breath is inserted into described in repeated text.
In addition, to achieve the above object, the present invention also provides the alternative of the content of text, which includes:
Read module, for reading to repeated text and the target character in repeated text;
The read module is also used to read each replacement prestored according to preset order;
Replacement module, it is described to repeated text using the replacement replacement of reading when reading the replacement every time In target character, to generate target text;
The read module is also used to when there is the replacement not being read, is executed described pre- according to preset order reading The step of each replacement deposited.
In addition, to achieve the above object, the present invention also provides the replacement equipment of the content of text, which includes: to deposit Reservoir, processor and the replacement processing journey for being stored in the content of text that can be run on the memory and on the processor Sequence, the replacement processing routine of the content of text realize the replacement side of content of text as described above when being executed by the processor The step of method.
In addition, to achieve the above object, the present invention also proposes a kind of computer storage medium, which is characterized in that the meter The replacement processing routine of content of text is stored on calculation machine storage medium, the replacement processing routine of the content of text is by processor The step of replacement method of content of text as described above is realized when execution.
A kind of replacement method of content of text, the alternative of content of text, content of text of proposition of the embodiment of the present invention Replacement equipment and computer storage medium, read to repeated text and the target character in repeated text, according to Preset order reads each replacement prestored, when reading the replacement every time, replaces institute using the replacement of reading State to the target character in repeated text, to generate target text, when there is the replacement not being read, execute it is described according to Preset order reads the step of each replacement prestored.The present invention is by identifying to the target character in repeated text, with pre- The replacement deposited carries out circulation replacement to target character and generates multiple target texts comprising duplicate contents, provides a kind of high Imitate the quick replacement that accurate mode carries out content of text.
Detailed description of the invention
Fig. 1 is the apparatus structure schematic diagram for the hardware running environment that the embodiment of the present invention is related to;
Fig. 2 is the flow diagram of the replacement method first embodiment of content of text of the present invention;
Fig. 3 is the flow diagram of the replacement method second embodiment of content of text of the present invention;
Fig. 4 is the functional block diagram of one embodiment of alternative of content of text of the present invention.
The embodiments will be further described with reference to the accompanying drawings for the realization, the function and the advantages of the object of the present invention.
Specific embodiment
It should be appreciated that the specific embodiments described herein are merely illustrative of the present invention, it is not intended to limit the present invention.
As shown in Figure 1, Fig. 1 is the terminal structure schematic diagram for the hardware running environment that the embodiment of the present invention is related to.
As shown in Figure 1, the server that Fig. 1 is the hardware running environment that the embodiment of the present invention is related to (is called at event Manage equipment, wherein event handling equipment can be to be made of individual event processing apparatus, is also possible to by other devices and thing Part processing unit combines to be formed) structural schematic diagram.
Server of the embodiment of the present invention refers to a management resource and provides the computer of service for user, is generally divided into file Server, database server and apps server.The computer or computer system for running the above software are also referred to as Server.For common PC (personal computer) personal computer, server is in stability, safety, property Energy etc. requires higher;As shown in Figure 1, the server may include: processor 1001, such as central processing unit (Central Processing Unit, CPU), network interface 1004, user interface 1003, memory 1005, communication bus 1002, hardware such as chipset, disk system, network etc..Wherein, communication bus 1002 is for realizing the connection between these components Communication.User interface 1003 may include display screen (Display), input unit such as keyboard (Keyboard), optional user Interface 1003 can also include standard wireline interface and wireless interface.Network interface 1004 optionally may include having for standard Line interface, wireless interface (such as Wireless Fidelity WIreless-FIdelity, WIFI interface).Memory 1005 can be high speed with Machine accesses memory (random access memory, RAM), is also possible to stable memory (non-volatile ), such as magnetic disk storage memory.Memory 1005 optionally can also be the storage dress independently of aforementioned processor 1001 It sets.
Optionally, server can also include camera, RF (Radio Frequency, radio frequency) circuit, sensor, sound Frequency circuit, WiFi module;Input unit, than display screen, touch screen;Network interface can be blue in blanking wireless interface in addition to WiFi Tooth, probe, 3G/4G/5G (digital representation of front be cellular mobile communication networks algebra.Which exactly indicate to be generation Network.English alphabet G indicates generation) internet base station equipment etc..It will be understood by those skilled in the art that showing in Fig. 1 Server architecture out does not constitute the restriction to server, may include than illustrating more or fewer components, or combination Certain components or different component layouts.
As shown in Figure 1, the computer software product, which is stored in a storage medium, (storage medium: is called computer storage Medium, computer media, readable medium, readable storage medium storing program for executing, computer readable storage medium are directly medium etc., such as RAM, magnetic disk, CD) in, including some instructions are used so that a terminal device (can be mobile phone, computer, server, sky Adjust device or the network equipment etc.) method described in each embodiment of the present invention is executed, as a kind of depositing for computer storage medium It may include operating system, network communication module, Subscriber Interface Module SIM and computer program in reservoir 1005.
In server shown in Fig. 1, network interface 1004 be mainly used for connect background data base, with background data base into Row data communication;User interface 1003 is mainly used for connection client, and (client, is called user terminal or terminal, and the present invention is implemented Example terminal can be also possible to mobile terminal, details are not described herein with fixed terminal), data communication is carried out with client;And it handles Device 1001 can be used for calling the computer program stored in memory 1005, and execute the thing that following embodiment of the present invention provides Step in part processing method.
Referring to Fig. 2, first embodiment of the invention provides a kind of replacement method of content of text, which comprises
Step S10 is read to repeated text and the target character in repeated text.
It is text file type to repeated text, text file refers to the file stored in a manner of ASCII character, English, number The storage of the characters such as word is ASCII character, and Chinese character storage is internal code.In addition to storage file significant character information in text file (including that can use the information such as carriage return, the line feed of ASCII character character representation) outside, cannot store other any information.
Refer to character to be replaced to the target character in repeated text, in the present embodiment, a variety of methods is provided and are obtained Location information to the target character in repeated text.
In the first method, character to be replaced is indicated to accord in repeated text with replacement.To repeated text When in original file content not comprising replacement symbol, replacement symbol can be inserted into original file content according to the demand used.For And distinguished to the content of text character in repeated text, it is regular by spcial character to the replacement symbol in repeated text It is composed, such as " #DDDD# ".The replacement symbol that diversified forms can be set first selectes one of replacement symbol, for weight It is inserted into multiple text before selected replacement symbol, treats repeated text and carry out full-text search.When not searched in repeated text When being accorded with to selected replacement, then it is assumed that can wait for being inserted into selected replacement symbol in repeated text at this;If to repeated text In when searching selected replacement symbol, replacement replacement symbol re-starts full-text search, until obtaining one not to repeated text In search replacement symbol until.
When containing replacement symbol in repeated text, replacement symbol is begun looking for from the initial character to repeated text, when looking into When finding replacement symbol, replacement symbol is recorded to the position in repeated text, is stopped when the end mark of repeated text when identifying Only search.Specifically, the character string dimension for creating regular length in memory, every time by regular length to repeated text Character string is read in character string dimension, then using the character in character string dimension as main string, replaces the character string conduct of symbol Pattern string carries out string matching, if successful match returns to its array index, if matching is unsuccessful, continues to repeated text The middle character for reading regular length continues to carry out string matching to character string dimension, replace until finding into character string dimension It changes symbol or reads to duplicate file end mark.
Due to being the character string for reading regular length to repeated text every time, opened in the character string of the regular length Head or ending are possible to partial replacement symbol occur, for example complete replacement symbol is " #DDDD# ", in the character string of the regular length Start or end be possible to occur that " #DD " or " DDD# ".In order not to omit these partial replacement symbols that may be present It searchs and locates, when reading the character string of regular length from when repeated text every time, by the regular length of last time reading Last several characters of character string and this regular length character string read are spliced, and spliced character string storage is arrived Matching treatment is carried out in character string, wherein the number value of last several character strings of reading is that the length value of replacement symbol subtracts one.
When the original contents to repeated text are relatively more, and the efficiency of insertion replacement symbol is lower, another kind side can be used Method, the rule with script according to replacement calculate the location information to target character in repeated text, calculated position are believed Breath is saved in be to illustrate to repeated text file with text file derived from database in the corresponding configuration file of repeated text It is illustrated.Such as having client's policy information tables of data in database, the field of tables of data includes customer name, identity card Number, information, part of identification card number such as cell-phone number and declaration form interest rate need corresponding change declaration form interest rate, corresponding replacement symbol Position is actually the position where the declaration form interest rate field of the data record where this part identity card number.It obtains to be changed The detailed process of location information where declaration form interest rate field are as follows: by client's policy information tables of data with text text from database The export of part format;The position for determining the corresponding identification card number of declaration form interest rate to be modified, according to identification card number field and declaration form interest rate Separator between the sequence and field value of field determines the position of declaration form interest rate to be modified, to obtain corresponding target character Position;The location information of the target character of acquisition is written in the corresponding configuration file of client's policy information tables of data, as Configuration file to duplicate file.It is reading when repeated text, while reading corresponding configuration file, according to from configuration file The middle location information for obtaining target character is determined to the target character in repeated text.
Step S20 reads each replacement prestored according to preset order.
Step S30, it is described in repeated text using the replacement replacement of reading when reading the replacement every time Target character, to generate target text.
Replacement refers to the data content for replacing target character, preparatory according to preset order when replacement has multiple It is stored in the queue or array of memory, when reading sequential reads out replacement according to the sequence of storage from queue or array.
When replacing target character with replacement, according to different replacement demands, multiple replacements can be read every time, with replacing It changes a pair of of the target character of item one to be replaced, a replacement can also be read every time, with a replacement to multiple target words Symbol is replaced.
When reading multiple replacements every time, the replacement of acquisition required for the number by obtaining target character determines every time The number of item;After having read the replacement prestored according to number, each target is successively replaced using the replacement of reading one by one Character generates the target text comprising replacement.
When reading a replacement every time, the target character that will acquire all replaces with the same replacement, and generation includes The target text of replacement.It should be noted that the pre-generated and storage of item can be replaced using a variety of methods.
A kind of method is to provide software interactive interface, and user can edit input replacement on software interactive interface and replace Item is simultaneously saved;Another method is the text file for allowing user to import comprising replacement;Preset rules can also be provided Options for user is selected to automatically generate replacement, such as when user chooses preset rules for " integer that range is 1 to 100 " When, 1 to 100 integer can be automatically generated as replacement.
Step S40 is executed when there is the replacement not being read and described read prestore each according to preset order and replace The step of changing.
It is constantly replaced by being then based on portion to repeated text, includes duplicate contents, different replacements to generate More parts of target texts, when alternative is that replacement replaces the target character in target text one by one, the replacement that prestores Number is greater than the number to the target character in repeated text.More precisely, the number of the replacement prestored should be to weight The integral multiple of the number of target character in multiple text.The number of replacement is less than to weight when therefore, in order to avoid replacing The exception of the number of target character in multiple text can carry out the number for the replacement not being read before replacement abnormal It checks, i.e., when there is the replacement not being read, judges whether the number for the replacement not being read is greater than or equal to target The number of character executes if the number for the replacement not being read is greater than or equal to the number of target character according to preset order The step of reading each replacement prestored.Wherein it is possible to pass through the number for obtaining the replacement prestored and the replacement read Number, the replacement that the number of the replacement read is not read is subtracted from the number of the replacement prestored Number, if the number of unread replacement, which is greater than zero, can judge that there are unread replacements.It should be noted that by In being to read multiple replacements according to the number of target character every time, so passing through the constantly cumulative replacement read every time The number of the available current replacement read of number.
If the number for the replacement not being read is less than the number of target character, determines the number of target character and do not read The difference of the number of the replacement taken generates and shows the information comprising difference, so that user increases replacement according to information.
It further, can be preparatory in order to realize that the different content of text to repeated text of multiple contents repeat in batches It is associated each to repeated text with the corresponding replacement that prestores, and whether checks each number for prestoring replacement in advance For the associated integral multiple to the number of target character in repeated text, it if it is can star multiple texts to repeated text The batch of this content repeats.
In the present embodiment, by identification to the target character in repeated text, with the replacement that prestores to target character It carries out circulation replacement and generates multiple target texts comprising duplicate contents, the mode for providing a kind of efficiently and accurately carries out text The quick replacement of content.
Further, referring to Fig. 3, second embodiment of the invention provides a kind of replacement of content of text based on first embodiment Method, the present embodiment include: in step S30
Step S50, it is described when the target character in repeated text being replaced using the replacement read, according to preset The text formatting of the replacement is arranged in text formatting.
It carries out protrusion in order to can according to need replacement in replaced target text and shows, in replacing with reading Item replacement is changed when the target character in repeated text, allows to be arranged according to preset text formatting the text formatting of replacement, Wherein, the settable format of replacement includes increasing single quotation marks, increasing double quotation marks, switch to capitalization etc..
It is html file according to text formatting to be placed is obtained in order when repeated text type is html file In content of text be arranged text formatting, wherein text formatting to be placed includes: the font type and text of textcolor, text This font size.In particular, it is desirable to be the content of text setting in html file by way of being inserted into CSS style code Text formatting.The mode that CSS style code is inserted into html file has intraconnected, embedded and three kinds of external-type, wherein interior Connection formula directly writes on CSS style code in html file in the content of existing label, and embedded is the head in html file Definition CSS style in the region of portion, that is, head label administration, and by different types of selector by the CSS style application of definition In the content of label into html file, external-type is that html document itself does not contain CSS style, but dynamic quotes outside CSS document definition document.
In embedded, by being that CSS style is arranged in class selector on the head HTML, it will need to apply in html document The label substance of the CSS style of the class selector of definition is marked with span label, and class selection is specified in span label The CSS style of device may be implemented to share to one group of CSS style into one group of HTML element for possessing identical class name.
Due to accord with the text formatting of the data item of position, i.e., text to be placed according to the multiple replacements of order setting insertion The data item of format is the independent HTML element positioned at different location in html file, so in the present embodiment, use is embedding Enter the setting that the text formatting to the data item of insertion is realized in such a way that CSS style is arranged in class selector in formula, i.e., The code of the corresponding class of text formatting to be placed is created, and by the code insertion of the class in repeated text, creation is drawn It is inserted into according to replacement symbol location information in repeated text with the code of class, and by the code of referenced classes.
Such as if desired set red for the font color of replacement, it can be first in the head of html file, that is, head mark Sign to define in the region of administration and be named as the class selector of ziti with style tag definition one, wherein class selector with {color:red;It is code content to indicate that it is red can to set font color to for it.If the replacement then in html file accords with For " #dddd ", the position by searching replacement symbol acquisition replacement symbol in html file is that the 125th character of html file is opened Begin, then by the code insertion of the reference class selector ziti comprising span label, class keyword and replacement symbol to the of HTML The position of 125 characters, specific code are as follows:<span class="ziti">#dddd</span>.Replacement is finally executed again The operation of replacement replacement symbol.
In the present embodiment, by using the replacement replacement root when target character in repeated text read The text formatting of the replacement is set according to preset text formatting, and meeting makes replacement can in replaced target text To carry out the setting demand of protrusion display as needed.
Referring to Fig. 4, the present invention also provides a kind of alternative of content of text, the alternative of text content includes:
Read module 10, for reading to repeated text and the target character in repeated text;
The read module 10 is also used to read each replacement prestored according to preset order;
Replacement module 20, it is described wait repeat text using the replacement replacement of reading when reading the replacement every time Target character in this, to generate target text;
The read module 10 is also used to when there is the replacement not being read, and execution is described to read according to preset order The step of each replacement prestored.
Optionally, the read module 10 includes:
Acquiring unit, for obtaining the number of the target character;
Reading unit, for reading the replacement prestored according to the number;
The replacement module 20 is also used to successively replace each target character using the replacement read, with life At target text.
Optionally, the alternative of the content of text further include:
Module is obtained, for obtaining the number of the replacement prestored and the number of the replacement read;
The number of computing module, the number of the replacement for prestoring according to and the replacement read calculates The number for the replacement not being read;
Judgment module, for judging whether the number of the replacement not being read is greater than or equal to the target character Number;
If the number that the read module is also used to the replacement not being read is greater than or equal to the target character Number, execute described the step of reading each replacement prestored according to preset order.
Optionally, the judgment module includes:
Difference computational unit, if being less than the number of the target character for the number of the replacement not being read, Determine the difference of the number of the target character and the number of the replacement not being read;
Information generating unit, for generating and showing the information comprising the difference, so that user increases according to the information Add replacement.
Optionally, the read module 10 includes:
Acquiring unit, for believing from the position to obtain the target character in the corresponding configuration file of repeated text Breath;
Reading unit, for according to the positional information from described to be successively read the target character in repeated text.
Optionally, the replacement module 20 includes:
Text formatting setting unit, for described to the target character in repeated text using the replacement replacement read When, the text formatting of the replacement is set according to preset text formatting.
Optionally, the text formatting setting unit is also used to when described when repeated text type is html file, wound Build the code of the corresponding class of the preset text formatting, and by the code insertion of the class to described in repeated text, wound The code for quoting the class is built, and the code of the reference class is inserted into institute according to the location information of the target character It states in repeated text.
The present invention also provides a kind of replacement equipment of content of text, the replacement equipment of text content includes: memory, place Reason device, camera and the replacement processing journey for being stored in the content of text that can be run on the memory and on the processor Sequence realizes the replacement side of the content of text content when replacement processing routine of the content of text is executed by the processor The step of method.
In addition, the embodiment of the present invention also proposes a kind of computer storage medium, it is stored in the computer storage medium The replacement processing routine of content of text realizes the text when replacement processing routine of the content of text is executed by processor The step of replacement method of content.
It should be noted that, in this document, the terms "include", "comprise" or its any other variant are intended to non-row His property includes, so that the process, method, article or the system that include a series of elements not only include those elements, and And further include other elements that are not explicitly listed, or further include for this process, method, article or system institute it is intrinsic Element.In the absence of more restrictions, the element limited by sentence "including a ...", it is not excluded that including being somebody's turn to do There is also other identical elements in the process, method of element, article or system.
The serial number of the above embodiments of the invention is only for description, does not represent the advantages or disadvantages of the embodiments.
Through the above description of the embodiments, those skilled in the art can be understood that above-described embodiment side Method can be realized by means of software and necessary general hardware platform, naturally it is also possible to by hardware, but in many cases The former is more preferably embodiment.Based on this understanding, technical solution of the present invention substantially in other words does the prior art The part contributed out can be embodied in the form of software products, which is stored in one as described above In storage medium (such as ROM/RAM, magnetic disk, CD), including some instructions are used so that terminal device (it can be mobile phone, Computer, server, air conditioner or network equipment etc.) execute method described in each embodiment of the present invention.
The above is only a preferred embodiment of the present invention, is not intended to limit the scope of the invention, all to utilize this hair Equivalent structure or equivalent flow shift made by bright specification and accompanying drawing content is applied directly or indirectly in other relevant skills Art field, is included within the scope of the present invention.

Claims (10)

1. a kind of replacement method of content of text, which is characterized in that the replacement method of the content of text includes:
It reads to repeated text and the target character in repeated text;
The each replacement prestored is read according to preset order;
It is described to the target character in repeated text using the replacement replacement of reading when reading the replacement every time, To generate target text;
When there is the replacement not being read, described the step of reading each replacement prestored according to preset order is executed.
2. the replacement method of content of text as described in claim 1, which is characterized in that described to be prestored according to preset order reading Each replacement the step of include:
Obtain the number of the target character;
The replacement prestored is read according to the number;
It is described described to the target character in repeated text using the replacement read replacement, packet the step of to generate target text It includes:
Each target character is successively replaced using the replacement of reading, to generate target text.
3. the replacement method of content of text as claimed in claim 2, which is characterized in that the replacement method of the content of text is also Include:
The number of the number of the replacement prestored described in acquisition and the replacement read;
The replacement not being read is calculated according to the number of the number of the replacement prestored and the replacement read Number;
Whether the number of the judgement replacement not being read is greater than or equal to the number of the target character;
If the number of the replacement not being read is greater than or equal to the number of the target character, execute described according to default The step of sequentially reading each replacement prestored.
4. the replacement method of content of text as claimed in claim 3, which is characterized in that the replacement for judging not to be read Number the step of whether being greater than or equal to the number of the target data after further include:
If the number of the replacement not being read is less than the number of the target character, the number of the target character is determined With the difference of the number of the replacement not being read;
The information comprising the difference is generated and shows, so that user increases replacement according to the information.
5. the replacement method of content of text as described in claim 1, which is characterized in that the reading is to repeated text and institute It states and includes: to the step of target character in repeated text
From the location information to obtain the target character in the corresponding configuration file of repeated text;
According to the positional information from described to be successively read the target character in repeated text.
6. the replacement method of content of text as described in claim 1, which is characterized in that described to read the replacement every time Xiang Shi, described to the target character in repeated text using the replacement replacement of reading, to generate target text the step of includes:
It is described when the target character in repeated text being replaced using the replacement read, it is arranged according to preset text formatting The text formatting of the replacement.
7. the replacement method of content of text as claimed in claim 6, which is characterized in that described to be replaced using the replacement read Described in changing when the target character in repeated text, the text formatting of the replacement is set according to the preset text formatting The step of include:
When described when repeated text type is html file, the code of the corresponding class of the preset text formatting is created, and By the code insertion of the class to described in repeated text;
The code of the class is quoted in creation, and the code of the reference class is inserted according to the location information of the target character Enter to described in repeated text.
8. a kind of alternative of content of text, which is characterized in that the alternative of the content of text includes:
Read module, for reading to repeated text and the target character in repeated text;
The read module is also used to read each replacement prestored according to preset order;
Replacement module, it is described in repeated text using the replacement replacement of reading when reading the replacement every time Target character, to generate target text;
The read module is also used to when there is the replacement not being read, is prestored described in execution according to preset order reading The step of each replacement.
9. a kind of replacement equipment of content of text, which is characterized in that the replacement equipment of the content of text includes: memory, place Reason device, camera and the replacement processing journey for being stored in the content of text that can be run on the memory and on the processor Sequence is realized as described in any one of claims 1 to 7 when the replacement processing routine of the content of text is executed by the processor Content of text replacement method the step of.
10. a kind of computer storage medium, which is characterized in that be stored with the replacement of content of text in the computer storage medium Processing routine is realized when the replacement processing routine of the content of text is executed by processor such as any one of claims 1 to 7 institute The step of replacement method for the content of text stated.
CN201811212381.4A 2018-10-16 2018-10-16 Replacement method, device, equipment and the computer storage medium of content of text Pending CN109657209A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811212381.4A CN109657209A (en) 2018-10-16 2018-10-16 Replacement method, device, equipment and the computer storage medium of content of text

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811212381.4A CN109657209A (en) 2018-10-16 2018-10-16 Replacement method, device, equipment and the computer storage medium of content of text

Publications (1)

Publication Number Publication Date
CN109657209A true CN109657209A (en) 2019-04-19

Family

ID=66110712

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811212381.4A Pending CN109657209A (en) 2018-10-16 2018-10-16 Replacement method, device, equipment and the computer storage medium of content of text

Country Status (1)

Country Link
CN (1) CN109657209A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110837727A (en) * 2019-10-23 2020-02-25 深圳价值在线信息科技股份有限公司 Document template generation method and device, terminal equipment and medium
CN112347142A (en) * 2020-11-17 2021-02-09 上海幻电信息科技有限公司 Data processing method and device

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101276272A (en) * 2007-03-28 2008-10-01 凌阳科技股份有限公司 System and method for supporting multi-language user interface
US20090315744A1 (en) * 2008-06-18 2009-12-24 Microsoft Corporation Dynamic character encoding
CN102270194A (en) * 2010-12-31 2011-12-07 北京谊安医疗系统股份有限公司 Character processing method and device
CN107103007A (en) * 2016-02-23 2017-08-29 阿里巴巴集团控股有限公司 A kind of SQL code conversion method and device
CN107203514A (en) * 2017-07-18 2017-09-26 湖南光海教育科技有限公司 Intelligent tutoring exercise generation method, device and computer-readable recording medium

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101276272A (en) * 2007-03-28 2008-10-01 凌阳科技股份有限公司 System and method for supporting multi-language user interface
US20090315744A1 (en) * 2008-06-18 2009-12-24 Microsoft Corporation Dynamic character encoding
CN102270194A (en) * 2010-12-31 2011-12-07 北京谊安医疗系统股份有限公司 Character processing method and device
CN107103007A (en) * 2016-02-23 2017-08-29 阿里巴巴集团控股有限公司 A kind of SQL code conversion method and device
CN107203514A (en) * 2017-07-18 2017-09-26 湖南光海教育科技有限公司 Intelligent tutoring exercise generation method, device and computer-readable recording medium

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
史国友, 范中洲, 贾润东: "基于字符串解析的智能查询方法及其应用", 大连海事大学学报, no. 01, 15 March 2005 (2005-03-15) *
施士杨: "网络信息系统数据库访问修改程序设计", 贵州工业大学学报, no. 06, 25 December 1995 (1995-12-25) *

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110837727A (en) * 2019-10-23 2020-02-25 深圳价值在线信息科技股份有限公司 Document template generation method and device, terminal equipment and medium
CN110837727B (en) * 2019-10-23 2023-12-01 深圳价值在线信息科技股份有限公司 Document template generation method, device, terminal equipment and medium
CN112347142A (en) * 2020-11-17 2021-02-09 上海幻电信息科技有限公司 Data processing method and device
CN112347142B (en) * 2020-11-17 2024-03-01 上海幻电信息科技有限公司 Data processing method and device

Similar Documents

Publication Publication Date Title
US20020129059A1 (en) XML auto map generator
CN109933752A (en) A kind of method and apparatus exporting electronic document
CN109978629B (en) Advertisement putting method and device, electronic equipment and storage medium
CN106815364A (en) Content delivery method and device
CN110222330B (en) Semantic recognition method and device, storage medium and computer equipment
CN105094775B (en) Webpage generation method and device
CN105607880A (en) Printing method and device for examined and approved documents
CN108197686A (en) Item barcode analytic method, device and computer readable storage medium
CN106919711A (en) The method and apparatus of the markup information based on artificial intelligence
CN109684326A (en) Tables of data creation method, device, equipment and computer readable storage medium
CN113220563B (en) Test case generation method, system, storage medium and computer equipment
CN109101309A (en) For updating user interface method and device
CN117473941B (en) Drawing processing method and device, electronic equipment and storage medium
CN109657209A (en) Replacement method, device, equipment and the computer storage medium of content of text
CN108959475A (en) A kind of webpage setting method and device
CN114416056A (en) Page generation method, system, computer equipment and readable storage medium
CN109241075A (en) Processing method, equipment and the computer readable storage medium of index basic data
CN108170785A (en) Bootstrap technique, device and the computer readable storage medium of terminal searching operation
CN109634610B (en) Interface marking data generation method and device
CN110443633A (en) Matching process, device, computer equipment and the storage medium of excited data
CN109582401A (en) Promote Picture Generation Method, device, storage medium and computer equipment
CN109740074B (en) Method, device and equipment for processing parameter configuration information
CN108170683B (en) Method and apparatus for obtaining information
CN110147381A (en) Information processing method, system and recording medium
CN100512277C (en) Method and apparatus for providing content to media devices

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