CN115374320B - Text matching method and device, electronic equipment and computer medium - Google Patents

Text matching method and device, electronic equipment and computer medium Download PDF

Info

Publication number
CN115374320B
CN115374320B CN202211306532.9A CN202211306532A CN115374320B CN 115374320 B CN115374320 B CN 115374320B CN 202211306532 A CN202211306532 A CN 202211306532A CN 115374320 B CN115374320 B CN 115374320B
Authority
CN
China
Prior art keywords
text
character
sequence
target
alternative
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202211306532.9A
Other languages
Chinese (zh)
Other versions
CN115374320A (en
Inventor
王延刚
张勇祖
聂顺林
孙建祥
田文琳
祁向前
郭雅欣
孙军芳
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
State Grid Information and Telecommunication Co Ltd
Beijing Guodiantong Network Technology Co Ltd
State Grid Qinghai Electric Power Co Ltd
Original Assignee
State Grid Information and Telecommunication Co Ltd
Beijing Guodiantong Network Technology Co Ltd
State Grid Qinghai Electric Power 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 State Grid Information and Telecommunication Co Ltd, Beijing Guodiantong Network Technology Co Ltd, State Grid Qinghai Electric Power Co Ltd filed Critical State Grid Information and Telecommunication Co Ltd
Priority to CN202211306532.9A priority Critical patent/CN115374320B/en
Publication of CN115374320A publication Critical patent/CN115374320A/en
Application granted granted Critical
Publication of CN115374320B publication Critical patent/CN115374320B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/903Querying
    • G06F16/90335Query processing
    • G06F16/90344Query processing by using string matching techniques
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/10Text processing
    • G06F40/194Calculation of difference between files
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/20Natural language analysis
    • G06F40/205Parsing

Abstract

The embodiment of the disclosure discloses a text matching method, a text matching device, electronic equipment and a computer medium. One embodiment of the method comprises: selecting an alternative text character number character sequence from all text character number characters included in the target text; in response to determining that there is no alternative text number character in the sequence of alternative text number characters that is the same as the text number character included in the text number character string, and in response to determining that the target text number character is the same as the first text number character included in the text number character string, selecting a number of text number characters from the text number characters included in the target text; in response to determining that the first text character sequence is the same as the text character string, determining a text field corresponding to the first text character sequence as a target text field. The implementation mode shortens the text query time and improves the text query speed.

Description

Text matching method and device, electronic equipment and computer medium
Technical Field
The embodiment of the disclosure relates to the technical field of computers, in particular to a text matching method, a text matching device, electronic equipment and a computer medium.
Background
Audit personnel in the audit trade can browse law and regulation text when qualitatively regarding the audit problem, and along with the brisk development of the audit trade, audit project and audit personnel all increase gradually, lead to the audit personnel to correspond the file that needs to be handled more and more, need consume a large amount of time energy when the audit personnel browses. At present, the legal and legal text is inquired in a general way as follows: and (4) searching in various legal and legal regulation texts by auditors.
However, the following technical problems generally exist in the above manner:
firstly, manual query is long in time consumption and slow in query speed;
secondly, the query is manually performed, so that query errors are easy to occur, the query needs to be performed repeatedly, and the query time is wasted.
The above information disclosed in this background section is only for enhancement of understanding of the background of the inventive concept and, therefore, it may contain information that does not form the prior art that is already known to a person of ordinary skill in the art in this country.
Disclosure of Invention
This summary is provided to introduce a selection of concepts in a simplified form that are further described below in the detailed description. This summary is not intended to identify key features or essential features of the claimed subject matter, nor is it intended to be used to limit the scope of the claimed subject matter.
Some embodiments of the present disclosure propose text matching methods, apparatuses, electronic devices, computer readable media to solve one or more of the technical problems mentioned in the background section above.
In a first aspect, some embodiments of the present disclosure provide a text matching method, including: in response to receiving a text query request, analyzing a text number character string and a text identifier carried in the text query request; selecting a text corresponding to the text identifier from a text library as a target text, wherein each text number character included in the target text has an arrangement sequence; determining the number of characters of the text number characters included in the text number character string; based on the target text, executing the following text matching steps: sequentially selecting the text character number characters with the number of the characters from all the text character number characters included in the target text as an alternative text character number character sequence; determining whether alternative text character number characters identical to the text character number characters included in the text character number character string exist in the alternative text character number character sequence; in response to determining that there is no alternative text character in the alternative text character sequence that is the same as the text character included in the text character string, determining whether a target text character in the target text is the same as a first text character included in the text character string, where the target text character is: the first text character after the last alternative text character in the alternative text character sequence is sequenced in the target text; in response to determining that the target text character is the same as the first text character included in the text character string, sequentially selecting the text character sequences with the number of characters from the text character sequences included in the target text by using the target text character as a starting text character; determining whether the first text character sequence is the same as the text character string; and in response to determining that the first text character sequence is the same as the text character string, determining a text field corresponding to the first text character sequence as a target text field.
In a second aspect, some embodiments of the present disclosure provide a text matching apparatus, including: the analysis unit is configured to respond to a received text query request and analyze a text number character string and a text identifier carried in the text query request; the selection unit is configured to select a text corresponding to the text identifier from a text library as a target text, wherein each text character included in the target text has an arrangement sequence; a first determination unit configured to determine the number of characters of text character numbers included in the text character string; a matching unit configured to perform the following text matching steps based on the target text: sequentially selecting the text number characters with the number of the characters from all the text number characters included in the target text as an alternative text number character sequence; determining whether alternative text character numbers which are the same as the text character numbers included in the text character number string exist in the alternative text character number sequence; in response to determining that there is no alternative text number character in the alternative text number character sequence that is the same as the text number character included in the text number character string, determining whether a target text number character in the target text is the same as a first text number character included in the text number character string, wherein the target text number character is: the first text character after the last candidate text character in the candidate text character sequence is sequenced in the target text; in response to determining that the target text character is the same as the first text character included in the text character string, sequentially selecting the text character sequences with the number of characters from the text character sequences included in the target text by using the target text character as a starting text character; determining whether the first text character sequence is the same as the text character string; a second determining unit configured to determine a text field corresponding to the first text character sequence as a target text field in response to determining that the first text character sequence is the same as the text character string.
In a third aspect, some embodiments of the present disclosure provide an electronic device, comprising: one or more processors; a storage device, on which one or more programs are stored, which when executed by one or more processors cause the one or more processors to implement the method described in any implementation of the first aspect.
In a fourth aspect, some embodiments of the disclosure provide a computer readable medium on which a computer program is stored, wherein the program when executed by a processor implements the method described in any implementation of the first aspect.
The above embodiments of the present disclosure have the following beneficial effects: by the text matching method of some embodiments of the disclosure, the time for text query is shortened, and the speed of text query is increased. Specifically, the reason for the slow query speed is: the manual query is long in time consumption and slow in query speed. Based on this, the text matching method according to some embodiments of the present disclosure first analyzes a text number character string and a text identifier carried in a text query request in response to receiving the text query request. Therefore, data support is provided for searching text content corresponding to the text character string. And secondly, selecting a text corresponding to the text identifier from a text library as a target text. Wherein, each text character included in the target text has an arrangement sequence. Therefore, the text corresponding to the text identification can be selected, and the text content corresponding to the text number character string can be conveniently inquired. Then, the number of characters of the text character string is determined. Then, based on the target text, the following text matching steps are performed: firstly, the text character number characters with the number of the characters are selected from all the text character number characters included in the target text in sequence to be used as an alternative text character number sequence. Therefore, data support can be provided for comparing text character strings. Then, whether the alternative text character number character sequence has the same alternative text character number character as the text character number character included in the text character number character string is determined. Thus, it can be determined whether the selected candidate text character sequence is the same as the text character string. Then, in response to determining that there is no alternative text character in the alternative text character sequence that is the same as the text character included in the text character string, determining whether the target text character in the target text is the same as the first text character included in the text character string. Thus, when it is determined that there is no candidate text character number character in the candidate text character sequence that is identical to the text character number character included in the text character string, the character can be skipped directly and matching can be performed subsequently. And then, in response to determining that the target text number character is the same as the first text number character included in the text number character string, selecting the text number characters with the number of characters from all the text number characters included in the target text as a first text number character sequence by using the target text number character as an initial text number character. Therefore, when the target text character is determined to be the same as the first text character included in the text character string, the corresponding first text character sequence can be selected for matching with the text character string. Then, whether the first text character sequence is the same as the text character string is determined. And finally, in response to the fact that the first text character sequence is the same as the text character string, determining a text field corresponding to the first text character sequence as a target text field. Therefore, the matching query of the text field corresponding to the text character string is completed. Therefore, the time of text query is shortened, and the speed of text query is improved.
Drawings
The above and other features, advantages, and aspects of embodiments of the present disclosure will become more apparent by referring to the following detailed description when taken in conjunction with the accompanying drawings. Throughout the drawings, the same or similar reference numbers refer to the same or similar elements. It should be understood that the drawings are schematic and that elements and elements are not necessarily drawn to scale.
FIG. 1 is a flow diagram of some embodiments of a text matching method according to the present disclosure;
FIG. 2 is a schematic block diagram of some embodiments of a text matching apparatus according to the present disclosure;
FIG. 3 is a schematic block diagram of an electronic device suitable for use in implementing some embodiments of the present disclosure.
Detailed Description
Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While certain embodiments of the present disclosure are shown in the drawings, it is to be understood that the disclosure may be embodied in various forms and should not be construed as limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete. It should be understood that the drawings and the embodiments of the disclosure are for illustration purposes only and are not intended to limit the scope of the disclosure.
It should be noted that, for convenience of description, only the portions related to the related invention are shown in the drawings. The embodiments and features of the embodiments in the present disclosure may be combined with each other without conflict.
It should be noted that the terms "first", "second", and the like in the present disclosure are only used for distinguishing different devices, modules or units, and are not used for limiting the order or interdependence of the functions performed by the devices, modules or units.
It is noted that references to "a", "an", and "the" modifications in this disclosure are intended to be illustrative rather than limiting, and that those skilled in the art will recognize that "one or more" may be used unless the context clearly dictates otherwise.
The names of messages or information exchanged between devices in the embodiments of the present disclosure are for illustrative purposes only, and are not intended to limit the scope of the messages or information.
The present disclosure will be described in detail below with reference to the accompanying drawings in conjunction with embodiments.
Fig. 1 is a flow diagram of some embodiments of a text matching method according to the present disclosure. A flow 100 of some embodiments of a text matching method according to the present disclosure is shown. The text matching method comprises the following steps:
step 101, in response to receiving a text query request, parsing a text number character string and a text identifier carried in the text query request.
In some embodiments, an executing entity (e.g., a server) of the text matching method may parse the text number character string and the text identifier carried in the text query request in response to receiving the text query request. Here, the text query request may be a request for querying the target text content. Here, the target text content may be content described in a certain legal and regulatory text. For example, the target text content may be the 10 th legal plaintext in XX legal texts. Here, the text number string may refer to a file number string to represent the legal plaintext of the second paragraph in the legal text. The text identification may uniquely represent the text.
And 102, selecting a text corresponding to the text identifier from a text library as a target text.
In some embodiments, the execution subject may select a text corresponding to the text identifier from a text library as the target text. Wherein, each text character included in the target text has an arrangement sequence. Here, the text library may mean that various legal and legal texts are stored. In practice, the execution subject may select a text pointed to by the text identifier from a text library as a target text.
And 103, determining the number of the characters of the text character number included in the text character string.
In some embodiments, the execution body may determine the number of each text character included in the text character string as the number of characters.
Step 104, based on the target text, executing the following text matching steps:
step 1041, selecting the text number characters with the number of the characters from the text number characters included in the target text in sequence as a candidate text number character sequence.
In some embodiments, the execution subject may sequentially select the number of text character numbers as the candidate text character sequence from the text character numbers included in the target text.
Step 1042, determining whether there is an alternative text character number character in the alternative text character number sequence that is the same as the text character number character included in the text character number string.
In some embodiments, the execution body may determine whether there is an alternative text character number identical to the text character number included in the text character string in the alternative text character sequence.
Optionally, before step 1042, the text matching step further includes:
firstly, determining whether the character sequence of the alternative text character number is the same as the character string of the text character number.
In practice, the first step described above may comprise the following sub-steps:
a first sub-step, for each alternative text character in the alternative text character sequence, executing the following processing steps:
1. and selecting the text character number with the same corresponding serial number as the serial number corresponding to the alternative text character number from the text character number character string as a second text character number.
2. And in response to determining that the alternative text character is the same as the second text character, adding the second text character to the initial text character queue to generate a text character queue. Wherein, the initial text number character queue is initially empty.
3. It is determined whether the target text literal character sequence is empty. And the target text character sequence is the alternative text character sequence without the alternative text character.
A second substep, responsive to determining that the target text font character sequence is empty, determining whether the number of text font characters included in the text font character sequence is the same as the number of characters.
And a third substep of determining that the alternative text character sequence is the same as the text character string in response to determining that the number of text character numbers included in the text character sequence is the same as the number of characters.
Optionally, in response to determining that the target text character sequence is not empty, the target text character sequence is used as an alternative text character sequence, and the processing step is executed again.
And secondly, in response to the fact that the character sequence of the alternative text character number is the same as the character string of the text character number, determining a text field corresponding to the character sequence of the alternative text character number in the target text as a target text field.
Step 1043, in response to determining that there is no alternative text number character in the alternative text number character sequence that is the same as the text number character included in the text number character string, determining whether the target text number character in the target text is the same as the first text number character included in the text number character string.
In some embodiments, the executing body may determine whether a target text character in the target text is the same as a first text character included in the text character string in response to determining that there is no alternative text character in the sequence of alternative text character strings that is the same as the text character included in the text character string. Wherein, the characters of the target text number are: the first text character after the last alternative text character in the alternative text character sequence is ordered in the target text.
Step 1044, in response to determining that the target text number character is the same as the first text number character included in the text number character string, selecting the text number characters with the number of characters from the text number characters included in the target text as a first text number character sequence in sequence by using the target text number character as an initial text number character.
In some embodiments, the executing body may, in response to determining that the target text character is the same as a first text character included in the text character string, sequentially select, from among text characters included in the target text, the text character sequence of the number of characters using the target text character as a starting text character. That is, the first text character in the first text character sequence is the target text character.
Step 1045, determining whether the first text number character sequence is the same as the text number character string.
In some embodiments, the execution body may determine whether the first text character sequence is the same as the text character string. That is, the execution body may determine whether each first text character included in the first text character sequence is identical to each text character included in the text character string.
Optionally, the text matching step further includes:
the method comprises the steps of firstly, in response to the fact that the candidate text character number which is the same as the text character number included in the text character string exists in the candidate text character sequence, determining a first candidate text character number which is the same as the text character number included in the text character string in the candidate text character sequence as a first candidate text character number.
And secondly, determining whether the first candidate text character is the same as the first text character in the text character string.
And thirdly, in response to the fact that the first candidate text number character is the same as the first text number character in the text number character string, the first candidate text number character is used as a starting character, and text number characters with the number of characters are sequentially selected from all text number characters included in the target text to serve as a first candidate text number character sequence. Here, the first candidate character in the first candidate character sequence is the first candidate text character.
And fourthly, determining whether the first alternative character number sequence is the same as the text character number string.
And fifthly, in response to the fact that the first candidate character sequence is the same as the text character string, determining a text field corresponding to the first candidate character sequence in the target text as a target text field.
Optionally, the text matching step further includes:
in the first step, in response to determining that the target text number character is different from the first text number character included in the text number character string, selecting a text number character satisfying a target condition from the text number characters included in the target text as the first target text number character. Wherein the target conditions are: the first text character in each text character included in the target text is the same as the first text character included in the text character string.
And secondly, selecting the text character number characters with the number of the characters from all the text character number characters included in the target text as a second alternative text character number sequence by taking the first target text character number as an initial character. Here, a first second candidate text character in the second candidate text character sequence is the first target text character.
And thirdly, determining whether the second alternative text character sequence is the same as the text character string.
And fourthly, in response to the fact that the second candidate text character sequence is the same as the text character string, determining a text field corresponding to the second candidate text character sequence in the target text as a target text field.
The related content in the first step to the fourth step is taken as an invention point of the disclosure, so that the technical problem mentioned in the background art, namely, manual query is solved, query errors are easy to occur, query needs to be repeatedly performed, and query time is wasted. ". The factors that waste query time are often as follows: the manual query is easy to cause query errors, and query needs to be repeated, so that query time is wasted. If the above factors are solved, the effect of reducing the waste of the query time can be achieved. To achieve this, first, in response to determining that the target text character is not the same as the first text character included in the text character string, a text character satisfying a target condition is selected from the text characters included in the target text as the first target text character. Wherein the target conditions are: the first text character in each text character included in the target text is the same as the first text character included in the text character string. In this way, the first text character of the text number characters included in the target text, which is the same as the first text character included in the text number character string, can be selected as the initial character, and the text number characters which are the same as the text number character string can be selected. And then, with the first target text character as a starting character, sequentially selecting the text character with the number of characters from all the text character included in the target text as a second candidate text character sequence. Therefore, the text matching can be carried out under the condition that the first second candidate text character in the second candidate text character sequence is the same as the first text character included in the text character string. Then, it is determined whether the second candidate text character sequence is the same as the text character string. And finally, in response to the fact that the second alternative text character sequence is the same as the text character string, determining a text field corresponding to the second alternative text character sequence in the target text as a target text field. Therefore, under the condition that the first second candidate text character in the second candidate text character sequence is the same as the first text character included in the text character string, text matching is carried out, and the text matching time can be greatly shortened. Thus, the waste of query time is reduced.
And 105, in response to determining that the first text character sequence is the same as the text character string, determining a text field corresponding to the first text character sequence as a target text field.
In some embodiments, the execution body may determine, in response to determining that the first text character sequence is the same as the text character string, a text field corresponding to the first text character sequence as a target text field.
Optionally, the target text field is sent to a display terminal corresponding to the text query request for display.
In some embodiments, the execution main body may send the target text field to a display terminal corresponding to the text query request for display. Here, the display terminal corresponding to the text query request may refer to a display terminal communicatively connected to a user terminal that transmits the text query request.
The above embodiments of the present disclosure have the following beneficial effects: by the text matching method of some embodiments of the present disclosure, the time for text query is shortened, and the speed of text query is increased. Specifically, the reason for the slow query speed is: the manual query is long in time consumption and slow in query speed. Based on this, the text matching method according to some embodiments of the present disclosure first analyzes a text number character string and a text identifier carried in a text query request in response to receiving the text query request. Therefore, data support is provided for searching text content corresponding to the text character string. And secondly, selecting a text corresponding to the text identifier from a text library as a target text. Wherein, each text character included in the target text has an arrangement sequence. Therefore, the text corresponding to the text identification can be selected, and the text content corresponding to the text number character string can be conveniently inquired. Then, the number of characters of the text character string is determined. Then, based on the target text, the following text matching steps are performed: firstly, the text character number characters with the number of the characters are selected from all the text character number characters included in the target text in sequence to be used as a candidate text character number sequence. Therefore, data support can be provided for comparing text character strings. Then, whether the alternative text character number character sequence has the same alternative text character number character as the text character number character included in the text character number character string is determined. Thus, it can be determined whether the selected candidate text character sequence is the same as the text character string. Then, in response to determining that there is no alternative text character in the alternative text character sequence that is the same as the text character included in the text character string, determining whether the target text character in the target text is the same as the first text character included in the text character string. Therefore, when the candidate text character sequence is determined not to have the same candidate text character number as the text character number included in the text character string, the characters can be directly skipped and then matched. And then, in response to determining that the target text number character is the same as the first text number character included in the text number character string, selecting the text number characters with the number of characters from all the text number characters included in the target text as a first text number character sequence by using the target text number character as an initial text number character. Therefore, when the target text number character is determined to be the same as the first text number character included in the text number character string, the corresponding first text number character sequence can be selected for matching with the text number character string. Then, whether the first text character sequence is the same as the text character string is determined. And finally, in response to the fact that the first text character sequence is the same as the text character string, determining a text field corresponding to the first text character sequence as a target text field. Therefore, the matching query of the text field corresponding to the text character string is completed. Therefore, the time of text query is shortened, and the speed of text query is increased.
With further reference to fig. 2, as an implementation of the methods illustrated in the above figures, the present disclosure provides some embodiments of a text matching apparatus, which correspond to those method embodiments illustrated in fig. 1, and which may be applied in various electronic devices in particular.
As shown in fig. 2, the text matching apparatus 200 of some embodiments includes: parsing unit 201, selecting unit 202, first determining unit 203, matching unit 204 and second determining unit 205. The parsing unit 201 is configured to parse a text number character string and a text identifier carried in a text query request in response to receiving the text query request; a selecting unit 202, configured to select a text corresponding to the text identifier from a text library as a target text, where each text number character included in the target text has an arrangement order; a first determining unit 203 configured to determine the number of characters of text character numbers included in the text character string; a matching unit 204 configured to perform the following text matching steps based on the target text: sequentially selecting the text number characters with the number of the characters from all the text number characters included in the target text as an alternative text number character sequence; determining whether alternative text character numbers which are the same as the text character numbers included in the text character number string exist in the alternative text character number sequence; in response to determining that there is no alternative text number character in the alternative text number character sequence that is the same as the text number character included in the text number character string, determining whether a target text number character in the target text is the same as a first text number character included in the text number character string, wherein the target text number character is: the first text character after the last candidate text character in the candidate text character sequence is sequenced in the target text; in response to determining that the target text number character is the same as a first text number character included in the text number character string, sequentially selecting the text number characters with the number of characters from the text number characters included in the target text as a first text number character sequence by using the target text number character as a starting text number character; determining whether the first text character sequence is the same as the text character string; a second determining unit 205, configured to determine, in response to determining that the first text character sequence is the same as the text character string, a text field corresponding to the first text character sequence as a target text field.
It will be appreciated that the units described in the apparatus 200 correspond to the various steps in the method described with reference to figure 1. Thus, the operations, features and advantages described above for the method are also applicable to the apparatus 200 and the units included therein, and are not described herein again.
Referring now to fig. 3, a block diagram of an electronic device (e.g., server) 300 suitable for use in implementing some embodiments of the present disclosure is shown. The electronic device in some embodiments of the present disclosure may include, but is not limited to, mobile terminals such as mobile phones, notebook computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), in-vehicle terminals (e.g., in-vehicle navigation terminals), and the like, and fixed terminals such as digital TVs, desktop computers, and the like. The electronic device shown in fig. 3 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present disclosure.
As shown in fig. 3, electronic device 300 may include a processing device (e.g., central processing unit, graphics processor, etc.) 301 that may perform various appropriate actions and processes in accordance with a program stored in a Read Only Memory (ROM) 302 or a program loaded from a storage device 308 into a Random Access Memory (RAM) 303. In the RAM303, various programs and data necessary for the operation of the electronic apparatus 300 are also stored. The processing device 301, the ROM302, and the RAM303 are connected to each other via a bus 304. An input/output (I/O) interface 305 is also connected to bus 304.
Generally, the following devices may be connected to the I/O interface 305: input devices 306 including, for example, a touch screen, touch pad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, etc.; an output device 307 including, for example, a Liquid Crystal Display (LCD), a speaker, a vibrator, and the like; storage devices 308 including, for example, magnetic tape, hard disk, etc.; and a communication device 309. The communication means 309 may allow the electronic device 300 to communicate with other devices, wireless or wired, to exchange data. While fig. 3 illustrates an electronic device 300 having various means, it is to be understood that not all illustrated means are required to be implemented or provided. More or fewer devices may alternatively be implemented or provided. Each block shown in fig. 3 may represent one device or may represent multiple devices, as desired.
In particular, according to some embodiments of the present disclosure, the processes described above with reference to the flow diagrams may be implemented as computer software programs. For example, some embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method illustrated in the flow chart. In some such embodiments, the computer program may be downloaded and installed from a network through the communication device 309, or installed from the storage device 308, or installed from the ROM 302. The computer program, when executed by the processing apparatus 301, performs the above-described functions defined in the methods of some embodiments of the present disclosure.
It should be noted that the computer readable medium described in some embodiments of the present disclosure may be a computer readable signal medium or a computer readable storage medium or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In some embodiments of the disclosure, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In some embodiments of the present disclosure, however, a computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: electrical wires, optical cables, RF (radio frequency), etc., or any suitable combination of the foregoing.
In some embodiments, the clients, servers may communicate using any currently known or future developed network Protocol, such as HTTP (HyperText Transfer Protocol), and may interconnect with any form or medium of digital data communication (e.g., a communications network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), the Internet (e.g., the Internet), and peer-to-peer networks (e.g., ad hoc peer-to-peer networks), as well as any currently known or future developed network.
The computer readable medium may be embodied in the electronic device; or may be separate and not incorporated into the electronic device. The computer readable medium carries one or more programs which, when executed by the electronic device, cause the electronic device to: in response to receiving a text query request, analyzing a text number character string and a text identifier carried in the text query request; selecting a text corresponding to the text identifier from a text library as a target text, wherein each text number character included in the target text has an arrangement sequence; determining the number of characters of the text number characters included in the text number character string; based on the target text, executing the following text matching steps: sequentially selecting the text number characters with the number of the characters from all the text number characters included in the target text as an alternative text number character sequence; determining whether alternative text character number characters identical to the text character number characters included in the text character number character string exist in the alternative text character number character sequence; in response to determining that there is no alternative text number character in the alternative text number character sequence that is the same as the text number character included in the text number character string, determining whether a target text number character in the target text is the same as a first text number character included in the text number character string, wherein the target text number character is: the first text character after the last candidate text character in the candidate text character sequence is sequenced in the target text; in response to determining that the target text character is the same as the first text character included in the text character string, sequentially selecting the text character sequences with the number of characters from the text character sequences included in the target text by using the target text character as a starting text character; determining whether the first text character sequence is the same as the text character string; and in response to determining that the first text character sequence is the same as the text character string, determining a text field corresponding to the first text character sequence as a target text field.
Computer program code for carrying out operations for embodiments of the present disclosure may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, smalltalk, C + +, and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider).
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems that perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units described in some embodiments of the present disclosure may be implemented by software or hardware. The described units may also be provided in a processor, and may be described as: a processor includes a parsing unit, a selection unit, a first determination unit, a matching unit, and a second determination unit. The names of the units do not form a limitation on the units themselves in some cases, for example, the parsing unit may also be described as a "unit that parses a text number character string and a text identifier carried in a text query request in response to receiving the text query request".
The functions described herein above may be performed, at least in part, by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field Programmable Gate Arrays (FPGAs), application Specific Integrated Circuits (ASICs), application Specific Standard Products (ASSPs), systems on a chip (SOCs), complex Programmable Logic Devices (CPLDs), and the like.
The foregoing description is only exemplary of the preferred embodiments of the disclosure and is illustrative of the principles of the technology employed. It will be appreciated by those skilled in the art that the scope of the invention in the embodiments of the present disclosure is not limited to the specific combination of the above-mentioned features, but also encompasses other embodiments in which any combination of the above-mentioned features or their equivalents is made without departing from the inventive concept as defined above. For example, the above features and (but not limited to) technical features with similar functions disclosed in the embodiments of the present disclosure are mutually replaced to form the technical solution.

Claims (7)

1. A text matching method, comprising:
in response to receiving a text query request, analyzing a text number character string and a text identification carried in the text query request;
selecting a text corresponding to the text identifier from a text library as a target text, wherein each text number character included in the target text has an arrangement sequence;
determining the number of characters of the text number characters included in the text number character string;
based on the target text, executing the following text matching steps:
sequentially selecting the text character number characters with the number of the characters from all text character number characters included in the target text as an alternative text character number sequence;
determining whether alternative text character numbers which are the same as the text character numbers included in the text character number string exist in the alternative text character number sequence;
in response to determining that there is no alternative text number character in the alternative text number character sequence that is the same as the text number character included in the text number character string, determining whether a target text number character in the target text is the same as a first text number character included in the text number character string, wherein the target text number character is: the first text character after the last alternative text character in the alternative text character sequence is sequenced in the target text;
in response to determining that the target text number character is the same as a first text number character included in the text number character string, sequentially selecting the text number characters with the number of characters from all the text number characters included in the target text as a first text number character sequence by taking the target text number character as an initial text number character;
determining whether the first sequence of text literal characters is the same as the text literal string;
in response to determining that the first text literal character sequence is the same as the text literal string, determining a text field corresponding to the first text literal character sequence as a target text field.
2. The method of claim 1, wherein prior to said determining whether an alternative text character is present in the sequence of alternative text character symbols that is the same as the text character comprised by the text character string, the text matching step further comprises:
determining whether the alternative text character sequence and the text character string are the same;
and in response to determining that the alternative text character number character sequence is the same as the text character number character string, determining a text field in the target text corresponding to the alternative text character number character sequence as a target text field.
3. The method of claim 1, wherein the text matching step further comprises:
in response to determining that an alternative text number character which is the same as the text number character included in the text number character string exists in the alternative text number character sequence, determining a first alternative text number character which is the same as the text number character included in the text number character string in the alternative text number character sequence as the first alternative text number character;
determining whether the first alternative text character number is the same as a first text character number in the text character string;
in response to determining that the first candidate text number character is the same as the first text number character in the text number character string, sequentially selecting text number characters with the number of characters from all text number characters included in the target text as a first candidate text number character sequence by taking the first candidate text number character as a starting character;
determining whether the first alternative character number character sequence is the same as the text character number character string;
and in response to determining that the first alternative character number character sequence is the same as the text character number character string, determining a text field in the target text corresponding to the first alternative character number character sequence as a target text field.
4. The method of claim 1, wherein the method further comprises:
and sending the target text field to a display terminal corresponding to the text query request for display.
5. A text matching apparatus comprising:
the analysis unit is configured to respond to a received text query request and analyze a text number character string and a text identifier carried in the text query request;
the selection unit is configured to select a text corresponding to the text identifier from a text library as a target text, wherein each text character included in the target text has an arrangement sequence;
a first determination unit configured to determine a number of characters of text character numbers included in the text character string;
a matching unit configured to perform the following text matching steps based on the target text: sequentially selecting the text character number characters with the number of characters from all text character number characters included in the target text as an alternative text character number character sequence; determining whether alternative text character numbers which are the same as the text character numbers included in the text character number string exist in the alternative text character number sequence; in response to determining that there is no alternative text number character in the alternative text number character sequence that is the same as the text number character included in the text number character string, determining whether a target text number character in the target text is the same as a first text number character included in the text number character string, wherein the target text number character is: the first text character after the last alternative text character in the alternative text character sequence is sequenced in the target text; in response to the fact that the target text character is the same as the first text character included in the text character string, sequentially selecting the text character sequences with the number of characters from all the text character sequences included in the target text by taking the target text character as a starting text character; determining whether the first text character sequence and the text character string are the same;
a second determining unit configured to determine a text field corresponding to the first text character sequence as a target text field in response to determining that the first text character sequence is the same as the text character string.
6. An electronic device, comprising:
one or more processors;
a storage device having one or more programs stored thereon;
when executed by the one or more processors, cause the one or more processors to implement the method of any one of claims 1-4.
7. A computer-readable medium, on which a computer program is stored which, when being executed by a processor, carries out the method according to any one of claims 1-4.
CN202211306532.9A 2022-10-25 2022-10-25 Text matching method and device, electronic equipment and computer medium Active CN115374320B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211306532.9A CN115374320B (en) 2022-10-25 2022-10-25 Text matching method and device, electronic equipment and computer medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211306532.9A CN115374320B (en) 2022-10-25 2022-10-25 Text matching method and device, electronic equipment and computer medium

Publications (2)

Publication Number Publication Date
CN115374320A CN115374320A (en) 2022-11-22
CN115374320B true CN115374320B (en) 2022-12-30

Family

ID=84073071

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211306532.9A Active CN115374320B (en) 2022-10-25 2022-10-25 Text matching method and device, electronic equipment and computer medium

Country Status (1)

Country Link
CN (1) CN115374320B (en)

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2015069393A (en) * 2013-09-27 2015-04-13 株式会社東芝 Document data comparison method, document data comparison apparatus, and document data comparison program
CN110018982A (en) * 2018-08-21 2019-07-16 深圳壹账通智能科技有限公司 Method, apparatus, equipment and the computer readable storage medium of locating file
CN113807056B (en) * 2021-09-23 2023-11-14 北京林业大学 Document name sequence error correction method, device and equipment
CN114168798A (en) * 2021-11-22 2022-03-11 中核核电运行管理有限公司 Text storage management and retrieval method and device

Also Published As

Publication number Publication date
CN115374320A (en) 2022-11-22

Similar Documents

Publication Publication Date Title
CN110516159B (en) Information recommendation method and device, electronic equipment and storage medium
CN110781373B (en) List updating method and device, readable medium and electronic equipment
CN115757400B (en) Data table processing method, device, electronic equipment and computer readable medium
CN111400625B (en) Page processing method and device, electronic equipment and computer readable storage medium
CN112684968A (en) Page display method and device, electronic equipment and computer readable medium
CN111857720B (en) User interface state information generation method and device, electronic equipment and medium
CN111597107B (en) Information output method and device and electronic equipment
US20230385080A1 (en) Method and apparatus for presenting information on lock screen interface, terminal, and storage medium
CN110852720A (en) Document processing method, device, equipment and storage medium
CN111756953A (en) Video processing method, device, equipment and computer readable medium
CN112084441A (en) Information retrieval method and device and electronic equipment
CN115374320B (en) Text matching method and device, electronic equipment and computer medium
CN113807056B (en) Document name sequence error correction method, device and equipment
CN111782895B (en) Retrieval processing method and device, readable medium and electronic equipment
CN113296771A (en) Page display method, device, equipment and computer readable medium
CN112905090A (en) Spreadsheet processing method, device, terminal and storage medium
CN115842819B (en) Automatic driving system test data downloading method, device and equipment
CN114040014B (en) Content pushing method, device, electronic equipment and computer readable storage medium
CN115994120B (en) Data file merging method, device, electronic equipment and computer readable medium
CN115826981A (en) Real-time operating system driver adaptation method and device, electronic equipment and readable medium
CN115687832A (en) Resource bit configuration information storage method and resource bit configuration system
CN111953741A (en) Information pushing method and device and electronic equipment
CN114925684A (en) Variable name generation method and device, electronic equipment and computer readable medium
CN113763188A (en) Information generation method and device, electronic equipment and computer readable medium
CN117880608A (en) Data processing method and device, readable medium and electronic equipment

Legal Events

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