Software system data query method and apparatus, and terminal device and readable storage medium
By generating similar fields in the software system that are similar in sound and shape to the search fields entered by the user for data query, the problem of query errors caused by user input errors is solved, and the data query efficiency and user experience are improved.
Patent Information
- Application Number
- PCT/CN2023/081539
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-02-23
- Filing Date
- 2023-03-15
- Publication Date
- 2024-08-29
AI Technical Summary
In existing software systems, query errors or failures occur due to user input errors during data query, which affects query efficiency.
A software system data query method is provided. By generating similar fields with similar sounds and shapes to the search fields input by the user, and querying the fields in the database, it can automatically generate possible fields that the user originally wanted to input, and then query again. The method includes obtaining the search fields input by the user. If no matching data is queried in the database, similar fields are generated and data is queried based on the similar fields. If matching data is queried, matching data of similar fields is output. If no matching data is queried, similar fields are generated. A prompt message indicating that there is no matching result is output.
It effectively reduces user operation costs, reduces query errors or failures, and improves data query efficiency. Users can query the corresponding content without repeated input.
Smart Images

Figure CN2023081539_29082024_PF_FP_ABST
Abstract
Description
Software system data query method and device, terminal equipment, and readable storage medium
[0001] This patent application claims priority to Chinese patent application No. CN 202310155812.2 filed on February 23, 2023. The disclosure of the prior application is incorporated herein by reference in its entirety. Technical Field
[0002] The present application belongs to the field of data processing technology, and more specifically, relates to a software system data query method and device, terminal equipment, and readable storage medium. Background Art
[0003] With technological advancements, the processing of various transactions is gradually moving towards electronic and intelligent processes. Consequently, various software systems have emerged, such as marriage registration systems and personnel management systems. These systems typically include data management functions, including but not limited to data storage, data querying, data updating, and data deletion.
[0004] When performing data query on a software system, users often make mistakes when entering query conditions, which leads to query errors or failures, thus affecting the efficiency of data query. Therefore, this application aims to provide a solution to solve the above problem. Technical issues
[0005] The purpose of this application is to provide a software system data query method and device, terminal equipment, and readable storage medium to solve the problem in the prior art that query efficiency is affected by user input errors. Technical Solutions
[0006] In a first aspect of the present application, a method for querying data in a software system is provided, the method comprising:
[0007] Get the search field entered by the user;
[0008] Performing data query in the database according to the search field;
[0009] If no matching data corresponding to the search field is found in the database, generating at least one similar field corresponding to the search field, and performing a data search in the database based on the at least one similar field;
[0010] The similar field of the search field refers to a field that is similar in sound and / or appearance to the search field.
[0011] In a possible implementation, the software system data query method further includes:
[0012] If matching data corresponding to the search field is found in the database, the matching data corresponding to the search field is output.
[0013] In a possible implementation, after performing a data query in the database according to the at least one similar field, the software system data query method further includes:
[0014] If matching data corresponding to the at least one similar field is found in the database, outputting the matching data corresponding to the at least one similar field;
[0015] If no matching data corresponding to the at least one similar field is found in the database, a prompt message indicating that there is no matching result is output.
[0016] In a possible implementation, generating at least one similar field corresponding to the search field includes:
[0017] If the search field contains only one field, the one field is determined as the target field; if the search field contains at least two fields, one or more fields are selected from the at least two fields according to the error probability corresponding to each field and determined as the target field;
[0018] Dividing the target field into at least one phrase, determining a first replacement phrase for each phrase based on the pronunciation of each phrase, and determining a second replacement phrase for each phrase based on the strokes of each phrase; permuting and combining the replacement phrases of each phrase to obtain a replacement field corresponding to the target field; wherein the replacement phrases of each phrase include the first replacement phrase of each phrase and / or the second replacement phrase of each phrase;
[0019] The target field in the search field is replaced with a replacement field corresponding to the target field to obtain at least one similar field corresponding to the search field.
[0020] In a possible implementation, determining a first replacement phrase for a phrase based on the pronunciation of the phrase includes:
[0021] Inputting the pronunciation of the phrase into a preset pinyin input method model to obtain a plurality of first candidate phrases corresponding to the pronunciation of the phrase;
[0022] The first N phrases other than the phrase in the plurality of first candidate phrases are determined as first replacement phrases for the phrase; wherein N is a preset value.
[0023] In a possible implementation, determining a second replacement phrase for a phrase based on the strokes of the phrase includes:
[0024] Inputting the strokes of the phrase into a preset Wubi input method model to obtain a plurality of second candidate phrases corresponding to the strokes of the phrase;
[0025] The first M phrases other than the phrase in the plurality of second candidate phrases are determined as second replacement phrases for the phrase; wherein M is a preset value.
[0026] In a possible implementation, determining a second replacement phrase for a phrase based on the strokes of the phrase includes:
[0027] Generating a target image corresponding to the phrase based on the strokes of the phrase; matching the target image in a preset phrase image database, and determining the phrase corresponding to the phrase image having a matching degree greater than a preset matching degree as a second replacement phrase for the phrase;
[0028] The matching degree refers to the matching degree between the phrase image in the phrase image database and the target image.
[0029] A second aspect of the present application provides a software system data query device, comprising:
[0030] Data acquisition module, used to obtain the search field input by the user;
[0031] A first search module, configured to perform data search in a database according to the search field;
[0032] a second search module, configured to generate at least one similar field corresponding to the search field when no matching data corresponding to the search field is found in the database, and perform data search in the database based on the at least one similar field;
[0033] The similar field of the search field refers to a field that is similar in sound and / or appearance to the search field.
[0034] In a third aspect of the present application, a terminal device is provided, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the above-mentioned software system data query method when executing the computer program.
[0035] In a fourth aspect of the present application, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the above-mentioned software system data query method are implemented. Beneficial effects
[0036] The software system data query method and device, terminal device, and readable storage medium provided by this application have the following beneficial effects:
[0037] Taking into account the possibility that users may make input errors when entering query conditions, this application will automatically generate similar fields to the search field when no matching data is found based on the search field. In other words, it will automatically generate the fields that the user may have originally intended to enter, and then perform another search based on the fields that the user may have originally intended to enter. By applying the data query solution provided by this application, even if the user makes an input error when entering the query conditions (generally the search field entered by the user), the software system can automatically generate the possible correct fields based on the incorrect search field entered by the user, and the corresponding content can be retrieved without the user having to re-enter the search conditions. Therefore, it can effectively reduce the user's operating costs, reduce the number of query errors or query failures, and improve data query efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0038] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following briefly introduces the drawings required for use in the embodiments or descriptions of the prior art. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.
[0039] FIG1 is a flow chart of a method for querying data in a software system according to an embodiment of the present application;
[0040] FIG2 is a structural block diagram of a software system data query device provided in one embodiment of the present application;
[0041] FIG3 is a schematic block diagram of a terminal device provided in one embodiment of the present application. Modes for Carrying Out the Invention
[0042] In the following description, specific details such as specific system structures and techniques are provided for purposes of illustration rather than limitation to facilitate a thorough understanding of the embodiments of the present application. However, it will be apparent to those skilled in the art that the present application may be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to avoid obscuring the description of the present application with unnecessary detail.
[0043] In order to make the objectives, technical solutions and advantages of this application clearer, the following will be described through specific implementation methods in conjunction with the accompanying drawings.
[0044] Please refer to Figure 1, which is a flow chart of a software system data query method provided in one embodiment of the present application. The method may include three steps S101 to S103, which are described in detail below.
[0045] S101: Obtain the search field input by the user.
[0046] In this step, the retrieval field is also the query condition entered by the user. When the user has a query need, the retrieval field can be entered on the query interface of the software system to query the corresponding data according to the retrieval field.
[0047] In this step, the retrieval field can contain one or more fields. For example, the retrieval field can only contain the name, or can contain the name and ID number, or can also contain the name, ID number, address, registration date, etc. This step does not make any restrictions on this.
[0048] S102: Query data in the database according to the retrieval field.
[0049] After obtaining the retrieval field entered by the user in step S101, data can be queried in the database of the software system based on this retrieval field in this step.
[0050] S103: If no matching data corresponding to the retrieval field is found in the database, generate at least one similar field corresponding to the retrieval field, and query data in the database according to the at least one similar field.
[0051] In this step, if the matching data corresponding to the retrieval field is found in the database, output the matching data corresponding to the retrieval field as the query result.
[0052] In this step, if no matching data corresponding to the retrieval field is found in the database, the situation of user input error can be considered, and the similar field corresponding to the retrieval field is automatically generated. The similar field of the retrieval field refers to the field that is phonetically similar and / or visually similar to the retrieval field. For example, if the retrieval field entered by the user contains the name, and the specific input is "Li Lei", then fields such as "Li Xue" and "Li Lei" can be used as the similar fields of this retrieval field. Among them, "Li Xue" is the field visually similar to "Li Lei", and "Li Lei" is the field phonetically and visually similar to "Li Lei".
[0053] In this step, if the search field contains at least two fields, then similar fields to the search field refer to fields that are similar in sound and / or appearance to any field (or any specified field) in the search field. For example, if the user enters a name and address in the search field, and specifically enters ["Li Lei", "Xueyuan Road No. xx"], then ["Li Xue", "Xueyuan Road No. xx"], ["Li Lei", "Xueyuan Road No. xx"], ["Li Lei", "Xueyuan Road No. xx"], and ["Li Lei", "Xueruan Road No. xx"] can all be considered similar fields to the search field. Among them, ["Li Xue", "Xueyuan Road No. xx"], ["Li Lei", "Xueyuan Road No. xx"] are similar in sound and / or appearance to the name field in the search field, and ["Li Lei", "Xueyuan Road No. xx"], ["Li Lei", "Xueruan Road No. xx"] are similar in sound and / or appearance to the address field in the search field.
[0054] In step S103, after performing data query in the database according to at least one similar field, the software system data query method may further include:
[0055] If matching data corresponding to at least one similar field is found in the database, the matching data corresponding to at least one similar field is output; if matching data corresponding to at least one similar field is not found in the database, a prompt message indicating that there is no matching result is output.
[0056] That is, if matching data is found in the database based on the similar fields, the matching data corresponding to each similar field is output as the query result. If no matching data is found based on the similar fields, a prompt message indicating no matching results is output as the final query result.
[0057] In step S102, before performing data query in the database according to the search field, the software system data query method may further include:
[0058] It is detected whether an extended query instruction input by the user is received. If the extended query instruction input by the user is received, at least one similar field corresponding to the search field is generated.
[0059] On this basis, when searching the database based on the search field, the database is also searched based on at least one similar field. In other words, if the user triggers an extended query instruction on the query interface, the query is then searched based on both the search field and the similar fields corresponding to the search field. This method can effectively improve query efficiency.
[0060] In one possible implementation, the software system data query method may further include:
[0061] The image data input by the user is obtained, a query is performed in the database based on the image data, and the data in the database that has the highest matching degree with the image data is output as the query result of the image data.
[0062] In this embodiment, when the data input by the user is an image, unlike the existing method of only outputting data with a matching degree reaching a preset threshold, this embodiment will output the data with the highest matching degree to eliminate the influence of the image's own noise as much as possible to obtain the query result.
[0063] In the above steps and possible implementations, considering that the user may make an input error when entering the query conditions, when no matching data can be retrieved based on the search field, the query method provided by this application can automatically generate a similar field to the search field, that is, automatically generate a field that the user may have originally wanted to enter, and then perform another query based on the field that the user may have originally wanted to enter. By applying the data query solution provided by this application, even if the user makes an input error when entering the query conditions (that is, the search field described above), the software system can automatically generate a possible correct field based on the incorrect search field entered by the user, and the corresponding content can be retrieved without the user having to re-enter the query. Therefore, it can effectively reduce the user's operating costs, reduce the number of query errors or query failures, and improve data query efficiency.
[0064] In one possible implementation, generating at least one similar field corresponding to the search field includes:
[0065] If the search field contains only one field, the field is determined as the target field. If the search field contains at least two fields, one or more fields are selected from the at least two fields according to the error probability corresponding to each field and determined as the target field.
[0066] Divide the target field into at least one phrase, determine a first replacement phrase for each phrase based on the pronunciation of each phrase, and determine a second replacement phrase for each phrase based on the strokes of each phrase. Permutate and combine the replacement phrases for each phrase to obtain a replacement field corresponding to the target field. The replacement phrases for each phrase include the first replacement phrase and / or the second replacement phrase for each phrase.
[0067] The target field in the search field is replaced with a replacement field corresponding to the target field, to obtain at least one similar field corresponding to the search field.
[0068] In this embodiment, a method for generating similar fields is provided. As mentioned earlier in this embodiment, the search field may contain one field or more than one field. When the search field contains a field, that field can be directly determined as the target field. The target field is essentially the source field referenced when generating similar fields.
[0069] In this embodiment, the probability of input errors in each field during a data query can be calculated in advance by the software system to obtain the error probability for each field. Based on this, if the search field contains at least two fields, the error probability of each field is obtained, and the field with the highest error probability is selected as the target field, or the field with an error probability greater than a preset probability is selected as the target field. This embodiment selectively selects each field in the search field as the target field, thereby avoiding the problem of reduced efficiency and accuracy of data queries caused by excessive query data volume.
[0070] In this embodiment, after determining the target field, the target field can be segmented to obtain at least one phrase. Based on this, replacement phrases are determined for each phrase, and the replacement phrases are permuted and combined to obtain a similar field corresponding to the target field. The first replacement phrase described in this embodiment is a phrase that is similar in pronunciation to the original phrase, and the second replacement phrase is a phrase that is similar in form to the original phrase.
[0071] The following example illustrates the permutation and combination process of the replacement phrases for each phrase in this embodiment. For example, the target field AB is divided into two phrases, A and B. The replacement phrases for phrase A are a1 and a2, and the replacement phrases for phrase B are b1 and b2. After permuting and combining a1, a2, b1, and b2, we obtain a1b1, a1b2, a2b1, and a2b2. All of these phrases, a1b1, a1b2, a2b1, and a2b2 can serve as replacement phrases for the target field AB.
[0072] Furthermore, an example will be given to illustrate how to obtain similar fields corresponding to the search field after determining the replacement field corresponding to the target field. For example, assume the search field contains two fields. Assume the search field is ["AB", "CD"], where the target field is AB, and the similar fields corresponding to the target field are a1b1, a1b2, a2b1, and a2b2. Then, the similar fields corresponding to the search field are ["a1b1", "CD"], ["a1b2", "CD"], ["a2b1", "CD"], and ["a2b2", "CD"]. It should be noted that both examples above only contain one target field. When there are K target fields (K is greater than 1), the step of "replacing the target field in the search field with the replacement field corresponding to the target field" is performed K times, and the resulting similar fields are used as the similar fields of the search field.
[0073] In a possible implementation, determining a first replacement phrase for a phrase based on the pronunciation of the phrase includes:
[0074] Inputting the pronunciation of the phrase into a preset pinyin input method model to obtain a plurality of first candidate phrases corresponding to the pronunciation of the phrase;
[0075] The first N phrases other than the phrase in the plurality of first candidate phrases are determined as first replacement phrases for the phrase; wherein N is a preset value.
[0076] In this embodiment, a method for determining the first replacement phrase is provided, that is, the existing pinyin input method model is used to implement this solution. Among them, the pinyin input method model can output multiple corresponding phrases according to the input pinyin. For example, after inputting "lilei", the pinyin input method model will output candidate phrases such as "Li Lei", "Li Lei", "Li Lei", and "Li Lei". This embodiment utilizes this function, that is, after inputting the pinyin of the phrase into the pinyin input method model, the pinyin input method model displays multiple candidate phrases, and then the first N phrases other than the original phrase can be determined as the first replacement phrases of the original phrase.
[0077] In a possible implementation, determining a second replacement phrase for a phrase based on the strokes of the phrase includes:
[0078] Inputting the strokes of the phrase into a preset Wubi input method model to obtain a plurality of second candidate phrases corresponding to the strokes of the phrase;
[0079] The first M phrases other than the phrase in the plurality of second candidate phrases are determined as second replacement phrases for the phrase; wherein M is a preset value.
[0080] In this embodiment, a method for determining a second replacement phrase is provided, which can be implemented using the existing Wubi input method model. The Wubi input method model can output multiple phrases corresponding to the input strokes. This embodiment utilizes this function, namely, determining the strokes of the original phrase and inputting the strokes of the original phrase into the Wubi input method model. The Wubi input method model can then display multiple candidate phrases, thereby determining the first M phrases other than the original phrase as the second replacement phrases for the original phrase.
[0081] In a possible implementation, determining a second replacement phrase for a phrase based on the strokes of the phrase includes:
[0082] A target image corresponding to the phrase is generated based on the strokes of the phrase. A match is performed in a preset phrase image database based on the target image, and a phrase corresponding to a phrase image having a matching degree greater than a preset matching degree is determined as a second replacement phrase for the phrase.
[0083] Among them, the matching degree refers to the matching degree between the phrase image in the phrase image database and the target image.
[0084] Considering that some phrases with similar shapes are not necessarily similar in strokes, such as the phrases "Li Lei" and "Li Xue". Therefore, this embodiment provides another solution for determining the second replacement phrase. The solution for the second replacement phrase provided in this embodiment can be used in combination with the solution for determining the second replacement phrase based on the Wubi input method model in the foregoing embodiment. The second replacement phrases determined by both methods can be used as the second replacement phrases of the original phrase.
[0085] In this embodiment, images of all phrases can be pre-generated, and a phrase image database can be constructed based on the images of all phrases. On this basis, matching can be performed in the preset phrase image database based on the target image, and all phrases corresponding to the phrase images with a matching degree greater than the preset matching degree can be determined as the second replacement phrases of the phrase.
[0086] Corresponding to the software system data query method described above, FIG. 2 is a structural block diagram of a software system data query device provided by the present application. For ease of description, only parts related to the present application are shown in the figure. Referring to FIG. 2, the software system data query device 20 includes: a data acquisition module 21, a first retrieval module 22, and a second retrieval module 23.
[0087] Among them, the data acquisition module 21 is used to acquire the retrieval field input by the user. <00,00182>
[0088] The first retrieval module 22 is used to query data in the database according to the retrieval field.
[0089] The second retrieval module 23 is used to generate at least one similar field corresponding to the retrieval field when no matching data corresponding to the retrieval field is found in the database, and query data in the database according to the at least one similar field.
[0090] The similar field of the retrieval field refers to a field that is phonetically similar and / or visually similar to the retrieval field. We
[0091] In a possible implementation manner, the first retrieval module 22 is further used for:
[0092] If matching data corresponding to the retrieval field is found in the database, the matching data corresponding to the retrieval field is output.
[0093] [[ID=~31]]In a possible implementation manner, after querying data in the database according to the at least one similar field, the second retrieval module 23 is further used for: [[ID=~33]]
[0094] If matching data corresponding to at least one similar field is found in the database, the matching data corresponding to at least one similar field is output;
[0095] If no matching data corresponding to at least one similar field is found in the database, a prompt message indicating that there is no matching result is output.
[0096] In a possible implementation, the second retrieval module 23 is specifically configured to:
[0097] If the search field contains only one field, the field is determined as the target field. If the search field contains at least two fields, one or more fields are selected from the at least two fields according to the error probability corresponding to each field and determined as the target field.
[0098] Divide the target field into at least one phrase, determine a first replacement phrase for each phrase based on the pronunciation of each phrase, and determine a second replacement phrase for each phrase based on the strokes of each phrase. Permutate and combine the replacement phrases for each phrase to obtain a replacement field corresponding to the target field. The replacement phrases for each phrase include the first replacement phrase and / or the second replacement phrase for each phrase.
[0099] The target field in the search field is replaced with a replacement field corresponding to the target field, to obtain at least one similar field corresponding to the search field.
[0100] In a possible implementation, the second retrieval module 23 is specifically configured to:
[0101] Inputting the pronunciation of the phrase into a preset pinyin input method model to obtain a plurality of first candidate phrases corresponding to the pronunciation of the phrase;
[0102] The first N phrases other than the phrase in the plurality of first candidate phrases are determined as first replacement phrases for the phrase, where N is a preset value.
[0103] In a possible implementation, the second retrieval module 23 is specifically configured to:
[0104] Inputting the strokes of the phrase into a preset Wubi input method model to obtain a plurality of second candidate phrases corresponding to the strokes of the phrase;
[0105] The first M phrases other than the phrase in the plurality of second candidate phrases are determined as second replacement phrases for the phrase, where M is a preset value.
[0106] In a possible implementation, the second retrieval module 23 is specifically configured to:
[0107] Generating a target image corresponding to the phrase based on the strokes of the phrase. Matching the target image against a preset phrase image database, and determining the phrase corresponding to the phrase image having a matching degree greater than a preset matching degree as a second replacement phrase for the phrase;
[0108] The matching degree refers to the matching degree between the phrase image in the phrase image database and the target image.
[0109] Refer to Figure 3, which is a schematic block diagram of a terminal device provided in this application. As shown in Figure 3, the terminal device 300 may include: one or more processors 301, one or more input devices 302, one or more output devices 303 and one or more memories 304. The above-mentioned processors 301, input devices 302, output devices 303 and memories 304 communicate with each other through a communication bus 305. The memory 304 is used to store computer programs, and the computer programs include program instructions. The processor 301 is used to execute the program instructions stored in the memory 304. Among them, the processor 301 is configured to be able to call the above-mentioned program instructions to execute the functions of each module / unit in the above-mentioned device implementation methods, such as the functions of modules 21 to 23 shown in Figure 2.
[0110] It should be understood that in the embodiments of the present application, the processor 301 may be a central processing unit (CPU), and may also be other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or any other conventional processor.
[0111] The input device 302 may include a touch panel, a fingerprint sensor (for collecting the user's fingerprint information and fingerprint direction information), a microphone, etc. The output device 303 may include a display (LCD, etc.), a speaker, etc.
[0112] The memory 304 may include a read-only memory and a random access memory, and provides instructions and data to the processor 301. A portion of the memory 304 may also include a non-volatile random access memory. For example, the memory 304 may also store device type information.
[0113] In a specific implementation, the processor 301, input device 302, and output device 303 described in the embodiments of this application can execute the technical solutions described in each embodiment of the software system data query method provided in this application, and can also execute the terminal device provided in this application, which will not be repeated here.
[0114] This application also provides a computer-readable storage medium storing a computer program. The computer program includes program instructions that, when executed by a processor, implement all or part of the processes described in the aforementioned method implementations. These processes can also be accomplished by controlling related hardware through the computer program. The computer program includes computer program code, which may be in source code form, object code form, an executable file, or some intermediate form. Computer-readable media may include any entity or device capable of carrying computer program code, recording media, USB flash drives, removable hard drives, magnetic disks, optical disks, computer memory, read-only memory (ROM), random access memory (RAM), electric carrier signals, telecommunications signals, and software distribution media. It should be noted that the content of computer-readable media may be expanded or reduced as appropriate based on the requirements of legislation and patent practice within a jurisdiction. For example, in some jurisdictions, legislation and patent practice do not require that computer-readable media include electric carrier signals and telecommunications signals.
[0115] The computer-readable storage medium can be the internal storage unit of the aforementioned terminal device, such as the terminal device's hard drive or memory. The computer-readable storage medium can also be an external storage device of the terminal device, such as a plug-in hard drive, a Smart Media Card (SMC), a Secure Digital (SD) card, a flash memory card, etc. Furthermore, the computer-readable storage medium can include both the internal storage unit of the terminal device and an external storage device. The computer-readable storage medium is used to store computer programs and other programs and data required by the terminal device. The computer-readable storage medium can also be used to temporarily store data that has been output or is about to be output.
[0116] Those skilled in the art will appreciate that the algorithms or steps disclosed in this application can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the various steps have been generally described above in terms of function. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0117] Those skilled in the art will clearly understand that, for the sake of convenience and brevity of description, the specific working process of the above-mentioned terminal device can refer to the corresponding process in the aforementioned method implementation, and will not be repeated here.
[0118] In the several embodiments provided in this application, it should be understood that the disclosed terminal devices and methods can be implemented in other ways. For example, the embodiments of the terminal devices described above are merely illustrative. For example, the division of units is merely a logical function division, and there may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces or units, or can be an electrical, mechanical or other form of connection.
[0119] Units described as separate components may or may not be physically separate. Components shown as units may or may not be physical units. That is, the above components may be located in one place or distributed across multiple network units. Some or all of these units may be selected based on actual needs to achieve the objectives of the solutions provided in the various embodiments of this application.
[0120] In addition, each functional unit in each embodiment of the present application may be integrated into a processing unit, each unit may exist physically separately, or two or more units may be integrated into a single unit. The above-mentioned integrated units may be implemented in the form of hardware or software functional units.
[0121] The above are only specific embodiments of the present application, but the scope of protection of the present application is not limited thereto. Any person skilled in the art can easily conceive of various equivalent modifications or substitutions within the technical scope disclosed in this application, and such modifications or substitutions should be included in the scope of protection of this application. Therefore, the scope of protection of this application should be based on the scope of protection of the claims.
Claims
1. A method for querying data in a software system, characterized in that: include: Get the search field entered by the user; Performing data query in the database according to the search field; If no matching data corresponding to the search field is found in the database, generating at least one similar field corresponding to the search field, and performing data search in the database according to the at least one similar field; The similar field of the search field refers to a field that is similar in sound and / or appearance to the search field.
2. The software system data query method according to claim 1, characterized in that: The software system data query method also includes: If matching data corresponding to the search field is found in the database, the matching data corresponding to the search field is output.
3. The software system data query method according to claim 1, characterized in that: After performing data query in the database according to the at least one similar field, the software system data query method further includes: If matching data corresponding to the at least one similar field is found in the database, outputting the matching data corresponding to the at least one similar field; If no matching data corresponding to the at least one similar field is found in the database, a prompt message indicating that there is no matching result is output.
4. The software system data query method according to claim 1, characterized in that: The generating at least one similar field corresponding to the search field comprises: If the search field contains only one field, the one field is determined as the target field; if the search field contains at least two fields, one or more fields are selected from the at least two fields according to the error probability corresponding to each field and determined as the target field; Divide the target field into at least one phrase, determine a first replacement phrase for each phrase according to the pronunciation of each phrase, and determine a second replacement phrase for each phrase according to the strokes of each phrase; arrange and combine the replacement phrases of each phrase to obtain a replacement field corresponding to the target field; wherein the replacement phrases of each phrase include a first replacement phrase for each phrase and / or a second replacement phrase for each phrase; The target field in the search field is replaced with a replacement field corresponding to the target field, so as to obtain at least one similar field corresponding to the search field.
5. The software system data query method according to claim 4, characterized in that: Determining a first replacement phrase for a phrase according to the pronunciation of the phrase includes: Inputting the pronunciation of the phrase into a preset pinyin input method model to obtain a plurality of first candidate phrases corresponding to the pronunciation of the phrase; The first N phrases other than the phrase in the plurality of first candidate phrases are determined as first replacement phrases for the phrase; wherein N is a preset value.
6. The software system data query method according to claim 4, characterized in that: Determining a second replacement phrase for a phrase according to the strokes of the phrase includes: Inputting the strokes of the phrase into a preset Wubi input method model to obtain a plurality of second candidate phrases corresponding to the strokes of the phrase; The first M phrases other than the phrase in the plurality of second candidate phrases are determined as second replacement phrases for the phrase; wherein M is a preset value.
7. The software system data query method according to claim 4, characterized in that: Determining a second replacement phrase for a phrase according to the strokes of the phrase includes: Generating a target image corresponding to the phrase based on the strokes of the phrase; matching the target image in a preset phrase image database, and determining the phrase corresponding to the phrase image having a matching degree greater than a preset matching degree as a second replacement phrase for the phrase; The matching degree refers to the matching degree between the phrase image in the phrase image database and the target image.
8. A software system data query device, characterized in that: include: A data acquisition module is used to obtain the search fields input by the user; A first search module, used to perform data search in a database according to the search field; A second search module, configured to generate at least one similar field corresponding to the search field when no matching data corresponding to the search field is found in the database, and perform data search in the database according to the at least one similar field; The similar field of the search field refers to a field that is similar in sound and / or appearance to the search field.
9. A terminal device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 7 are implemented.
10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.
Citation Information
Patent Citations
Chinese name fuzzy matching method, device and equipment and readable storage medium
CN110928915A
Data query method and device, computer equipment and storage medium
CN111367949A
Fuzzy search method based on sound and shape generalization
CN113486163A
Integrated phonetic matching methods and systems
US20120278315A1
