Character string-based data searching method and device, equipment and storage medium

By converting strings into decimal numbers and matching them, the problem of high search complexity in the database is solved, and the efficiency of data search is improved.

CN119293296APending Publication Date: 2025-01-10CHINA PING AN PROPERTY INSURANCE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411261871.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-09
Publication Date
2025-01-10

AI Technical Summary

Technical Problem

The data search method in the existing database searches all characters one by one, resulting in a complex search and matching process, which reduces the efficiency of business personnel.

Method used

By converting the string input by the user into a decimal number and matching the content to be found based on the preset main string, the search processing of the number layer is realized, reducing the search complexity.

Benefits of technology

It improves the efficiency of data search, simplifies the matching process, and improves the search speed.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119293296A_ABST
    Figure CN119293296A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of data query and financial science and technology, and particularly discloses a character string-based data search method and device, computer equipment and a storage medium. The method comprises the following steps: when to-be-searched content input by a user is received, acquiring a character string corresponding to the to-be-searched content, and performing decimal conversion on the character string corresponding to the to-be-searched content to obtain a to-be-searched number; based on a preset main character string and a character string corresponding to the to-be-searched content, obtaining an initial to-be-matched number; and based on the to-be-searched number and the initial to-be-matched number, obtaining a search result corresponding to the to-be-searched content. When the to-be-searched content is received, the to-be-searched number corresponding to the to-be-searched content is obtained, and the to-be-searched content is searched based on the to-be-searched number and the initial to-be-matched number, so that the matching processing of searching in a number layer is realized, the complexity of searching and matching is reduced, and the data searching efficiency is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of data query and financial technology, and in particular to a string-based data search method, device, computer equipment and storage medium. Background Art

[0002] With the rapid development of mobile computer technology, enterprises store insurance, finance and other business-related information in databases, which greatly facilitates the organization, classification and storage of information. However, with the increase in business volume, the content of information stored in the database has gradually increased. The existing matching search method obtains the search results by searching all characters one by one. The search and matching process is complicated, which reduces the efficiency of business personnel in searching for information. Therefore, how to reduce the complexity of searching and improve the efficiency of information searching has become an urgent problem to be solved. Summary of the invention

[0003] The present application provides a string-based data search method, apparatus, computer equipment and storage medium to reduce the complexity of the search and thereby improve the efficiency of data search.

[0004] In a first aspect, the present application provides a method for searching for data based on a character string, the method comprising:

[0005] When receiving the content to be searched input by the user, obtaining the character string corresponding to the content to be searched, and performing decimal conversion on the character string corresponding to the content to be searched to obtain the number to be searched;

[0006] Based on a preset main character string and a character string corresponding to the content to be searched, an initial number to be matched is obtained;

[0007] Based on the number to be searched and the initial number to be matched, a search result corresponding to the content to be searched is obtained.

[0008] In a second aspect, the present application further provides a data search device based on a string, the device comprising:

[0009] A module for obtaining a number to be found, used to obtain a character string corresponding to the content to be found when receiving the content to be found input by the user, and perform a decimal conversion on the character string corresponding to the content to be found to obtain the number to be found;

[0010] A module for obtaining numbers to be matched, used to obtain initial numbers to be matched based on a preset main character string and a character string corresponding to the content to be searched;

[0011] The search result obtaining module is used to obtain the search result corresponding to the content to be searched based on the number to be searched and the initial number to be matched.

[0012] In a third aspect, the present application also provides a computer device, comprising a memory and a processor; the memory is used to store a computer program; the processor is used to execute the computer program and implement the string-based data search method as described above when executing the computer program.

[0013] In a fourth aspect, the present application further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the processor implements the string-based data search method as described above.

[0014] The present application discloses a data search method, device, computer equipment and storage medium based on a string. When receiving the content to be searched input by the user, the string corresponding to the content to be searched is obtained, and the string corresponding to the content to be searched is converted into decimal to obtain the number to be searched; based on the preset main string and the string corresponding to the content to be searched, the initial number to be matched is obtained; based on the number to be searched and the initial number to be matched, the search result corresponding to the content to be searched is obtained. When receiving the content to be searched, the present application obtains the number to be searched corresponding to the content to be searched, searches the content to be searched based on the number to be searched and the initial number to be matched, realizes the matching processing of searching at the digital layer, reduces the complexity of searching and matching, and improves the efficiency of data search. BRIEF DESCRIPTION OF THE DRAWINGS

[0015] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0016] Figure 1 is a schematic flow chart of a first embodiment of a string-based data search method provided by an embodiment of the present application;

[0017] Figure 2 is a schematic diagram of updating the numbers to be matched provided by an embodiment of the present application;

[0018] Figure 3 It is a schematic diagram of comparing and matching the numbers to be found and the numbers to be matched provided by the embodiment of the present application;

[0019] Figure 4 is a schematic flow chart of a second embodiment of a string-based data search method provided in an embodiment of the present application;

[0020] Figure 5A schematic block diagram of a string-based data search device provided in an embodiment of the present application;

[0021] Figure 6 A schematic block diagram of the structure of a computer device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0022] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0023] The flowcharts shown in the accompanying drawings are only examples and do not necessarily include all the contents and operations / steps, nor must they be executed in the order described. For example, some operations / steps may also be decomposed, combined or partially merged, so the actual execution order may change according to actual conditions.

[0024] It should be understood that the terms used in this application specification are only for the purpose of describing specific embodiments and are not intended to limit the application. As used in this application specification and the appended claims, unless the context clearly indicates otherwise, the singular forms "a", "an" and "the" are intended to include plural forms.

[0025] It should be further understood that the term “and / or” used in the specification and appended claims refers to any combination and all possible combinations of one or more of the associated listed items, and includes these combinations.

[0026] The embodiments of the present application provide a method, device, computer equipment and storage medium for searching data based on character strings. The method for searching data based on character strings can be applied to a server. When receiving the content to be searched, the number to be searched corresponding to the content to be searched is obtained, and the content to be searched is searched based on the number to be searched and the initial number to be matched, thereby realizing the matching processing of searching at the digital layer, reducing the complexity of searching and matching, and improving the efficiency of data searching. The server can be an independent server or a server cluster.

[0027] In conjunction with the accompanying drawings, some embodiments of the present application are described in detail below. In the absence of conflict, the following embodiments and features in the embodiments can be combined with each other.

[0028] See also Figure 1 , Figure 1The present invention is a schematic flow chart of a string-based data search method provided by an embodiment of the present invention. The string-based data search method can be applied to a server, and is used to obtain a to-be-searched number corresponding to the to-be-searched content when receiving the to-be-searched content, and search for the to-be-searched content based on the to-be-searched number and the initial to-be-matched number, thereby realizing the matching processing of the search at the digital layer, reducing the complexity of the search and matching, and improving the efficiency of data search.

[0029] like Figure 1 As shown, the string-based data search method specifically includes steps S101 to S103.

[0030] S101, when receiving the content to be searched input by the user, obtaining a character string corresponding to the content to be searched, and performing a decimal conversion on the character string corresponding to the content to be searched to obtain a number to be searched;

[0031] In one embodiment, the search content input by the user may be in the form of text, voice, etc. When the user inputs the search content in the form of text, the character string corresponding to the text content is directly obtained; when the user inputs the search content in the form of voice, the voice is first converted into text, and then the character string corresponding to the text is obtained.

[0032] In one embodiment, the obtained string is converted into a decimal digital form. Specifically, each character in the string is converted into its corresponding decimal value, and the obtained decimal values ​​are concatenated according to the position of each character to obtain the number to be searched.

[0033] For example, assuming that the character string obtained by the content to be searched is AEEF, each character in AEEF is converted into a decimal value and concatenated to obtain the number 10697071 to be searched.

[0034] Furthermore, when receiving the content to be searched input by the user, obtaining the character string corresponding to the content to be searched includes: performing semantic analysis on the content to be searched to obtain a search keyword; based on a preset code, processing the search keyword to obtain the character string corresponding to the search keyword as the character string corresponding to the content to be searched.

[0035] In one embodiment, the search content input by the user is analyzed and the text input by the user is segmented into individual words or phrases. For example, if the user inputs "search for the insurance period of agricultural insurance policyholder Zhang San", the corresponding segmented words "search" and "agricultural insurance policyholder", "Zhang San", and "insurance period" are obtained.

[0036] In one embodiment, the obtained analysis is subjected to keyword recognition. Specifically, each word is tagged with a part of speech to identify the grammatical role of each word in the sentence. For example, "search" may be a verb, and "agricultural insurance policyholder", "Zhang San" and "insurance period" may be nouns. Named entities such as names of people, places, and organizations can also be identified. "Zhang San" is a name entity.

[0037] In one embodiment, the sentence structure is analyzed to determine the dependency relationship between words, such as subject-predicate-object structure, etc. The key information in the user input is identified, that is, the search keyword. "Zhang San" and "insurance period" are search keywords.

[0038] In one embodiment, the preset code refers to a preset rule or algorithm for converting the search keyword after semantic analysis into a character string form to obtain a character string corresponding to the content to be searched, which accurately reflects the content that the user wants to search.

[0039] S102, obtaining an initial number to be matched based on a preset main character string and a character string corresponding to the content to be searched;

[0040] Furthermore, the method of obtaining an initial number to be matched based on a preset main string and a string corresponding to the content to be searched includes: obtaining the length of the string corresponding to the content to be searched; based on the length of the string, intercepting a string to be matched with the same length in the main string; and performing a decimal conversion on the string to be matched to obtain the initial number to be matched.

[0041] In one embodiment, the length of the string corresponding to the content to be searched is obtained, and a string to be matched with the same length is intercepted from the main string. Specifically, starting from the first character of the main string, a string with the same length as the string to be searched is intercepted as the string to be matched. Exemplarily, assuming that the string to be searched is AEEF and the main string is ACDDFACEFTAEEFC, the length of the string to be searched is 4, and the string to be matched obtained by intercepting from the main string is ACCD.

[0042] In one embodiment, the obtained character string to be matched is converted into decimal to obtain the decimal value corresponding to each character, and the decimal values ​​are concatenated according to the character positions to obtain the number to be matched. For example, the number to be matched corresponding to ACCD is 97676868.

[0043] Furthermore, before obtaining the initial number to be matched based on the preset main character string and the character string corresponding to the content to be searched, the method also includes: obtaining a preset database; performing keyword extraction on various types of information in the database to obtain keyword groups corresponding to various types of information; based on the keyword groups, generating character strings corresponding to various types of information, and obtaining the main character string based on the character strings corresponding to various types of information.

[0044] In one embodiment, a preset database is obtained. Specifically, the predefined database can be retrieved from a storage device, a database, or a network service. The database can be structured (such as a database table) or unstructured (such as a text file collection).

[0045] In one embodiment, keywords are extracted from various types of data in the database. Specifically, for structured data, keywords can come directly from the attributes or fields of the data. For unstructured text, it may be a group of keywords extracted from the text. For unstructured text data, natural language processing technology can be used to perform text analysis, including word segmentation, part-of-speech tagging, named entity recognition, etc., by analyzing the content of each document, extracting the most important words or phrases as keywords.

[0046] In one embodiment, the keyword group of each document is converted into a character string, and the character strings corresponding to all the documents are combined into a main character string.

[0047] S103: Based on the number to be searched and the initial number to be matched, obtain a search result corresponding to the content to be searched.

[0048] In one embodiment, the digit to be found is compared with the initial digit to be matched to see if they are the same. If they are the same, the content corresponding to the initial digit to be matched is used as the search result. Specifically, the value of the digit to be found is compared with the value of the initial digit to be matched. If the digit to be found is the same as the initial digit to be matched, the content corresponding to the initial digit to be matched is output as the search result. If the digit to be found is not the same as the initial digit to be matched, the initial digit to be matched is updated until the latest digit to be matched is the same as the digit to be found, and the content corresponding to the latest digit to be matched is obtained as the search result and displayed to the user.

[0049] The above-mentioned embodiment provides a data search method, device, computer equipment and storage medium based on a string. When receiving the content to be searched input by the user, the string corresponding to the content to be searched is obtained, and the string corresponding to the content to be searched is converted into decimal to obtain the number to be searched; based on the preset main string and the string corresponding to the content to be searched, the initial number to be matched is obtained; based on the number to be searched and the initial number to be matched, the search result corresponding to the content to be searched is obtained. When receiving the content to be searched, the present application obtains the number to be searched corresponding to the content to be searched, searches the content to be searched based on the number to be searched and the initial number to be matched, realizes the matching processing of searching at the digital layer, reduces the complexity of searching and matching, and improves the efficiency of data search.

[0050] See also Figure 2 , Figure 2 The present invention provides a schematic flow chart of a data search method based on a string provided by an embodiment of the present invention. The data search method based on a string can be applied to a server, and is used to search and match by gradually updating and comparing the numbers to be searched and the numbers to be matched, thereby realizing the matching process of searching at the digital layer, reducing the complexity of searching and matching, and improving the efficiency of data search.

[0051] like Figure 2 As shown, the string-based data search method specifically includes steps S201 to S202.

[0052] S201, comparing the number to be found with the initial number to be matched;

[0053] S202: When the number to be searched is the same as the initial number to be matched, the content corresponding to the initial number to be matched is used as the search result.

[0054] In one embodiment, the number to be found is compared with the initial number to be matched to see if they are the same. If they are the same, the content corresponding to the initial number to be matched is used as the search result. Specifically, the value of the number to be found and the value of the initial number to be matched are compared. If the number to be found is the same as the initial number to be matched, the content corresponding to the initial number to be matched is output as the search result.

[0055] Furthermore, after comparing the number to be searched with the initial number to be matched, it also includes: when the number to be searched is not the same as the initial number to be matched, based on a preset update rule and the main string, the initial number to be matched is updated to obtain the latest number to be matched, until the main string is completely traversed or the number to be searched is the same as the latest number to be matched, then the updating is stopped to obtain the comparison result between the number to be searched and the latest number to be matched; when the number to be searched is the same as the new number to be matched, the content corresponding to the latest number to be matched is obtained as the search result.

[0056] In one embodiment, when the number to be searched is different from the initial number to be matched, the initial number to be matched is updated according to a preset update rule until the latest number to be matched is the same as the number to be searched, and the content corresponding to the latest number to be matched is obtained as the search result.

[0057] In one embodiment, the update rule is used to update the to-be-matched number in each iteration, specifically including removing a character from the to-be-matched string and adding a new character.

[0058] In one embodiment, the main string is traversed, and when the number to be found is different from the initial number to be matched, the initial number to be matched is updated according to the update rule, and the latest number to be matched is obtained and compared with the number to be found. If they are not equal, the number to be matched is continuously updated according to the preset update rule, and is compared with the number to be found again after each update.

[0059] In one embodiment, when the stop condition is met, the system obtains the comparison result of the number to be found and the latest number to be matched. If the comparison result is that the number to be found is the same as the latest number to be matched, the system obtains the content corresponding to the latest number to be matched as the search result.

[0060] The stopping condition may be that the main string has been completely traversed, or the number to be found is the same as the latest number to be matched.

[0061] For example, Figure 3 As shown, the number to be searched is 10697071, and the initial number to be matched is 97676868. By comparison, the initial number to be matched is different from the number to be searched, so the initial number to be matched is updated. Based on the right-in-left-out update rule, the main string is traversed until the latest number to be matched is the same as the number to be searched. The traversal is stopped and the content corresponding to the latest number to be matched is used as the search result.

[0062] Further, the updating of the initial number to be matched based on the preset update rule and the main character string to obtain the latest number to be matched includes: determining the characters to be removed and the characters to be moved in of the character string corresponding to the initial number to be matched in the main character string based on the update rule; obtaining the numbers corresponding to the characters to be removed, the number of digits corresponding to the characters to be removed, and the numbers corresponding to the characters to be moved in; updating the initial number to be matched based on the preset right shift formula, the numbers corresponding to the characters to be removed, the number of digits corresponding to the characters to be removed, and the numbers corresponding to the characters to be moved in to obtain the latest number to be matched; wherein the right shift formula is

[0063] L = (Xa) × 10 b +c

[0064] Among them, L represents the latest number to be matched, X represents the initial number to be matched, a represents the number corresponding to the character to be removed, b represents the number of digits corresponding to the character to be removed, and c represents the number corresponding to the character to be moved in.

[0065] In one embodiment, according to the update rule, the characters to be removed (characters to be removed) and the characters to be moved into (characters to be moved into) of the character string corresponding to the initial to-be-matched number are determined in the main character string.

[0066] In one embodiment, the number corresponding to the character to be removed and the number of digits of the number are obtained, and the number corresponding to the character to be shifted in is also obtained.

[0067] In one embodiment, according to a preset right shift formula, the initial number to be matched is updated using the number corresponding to the character to be removed, its digit number, and the number corresponding to the character to be shifted in, to obtain the latest number to be matched.

[0068] For example, Figure 4As shown, the initial number to be matched corresponding to the initial string to be matched ACDDF is 97676868, which is different from the number to be searched 67676870. Then the initial number to be matched is updated according to the update rule. Specifically, the initial number to be matched is moved one position to the right. The number corresponding to the string to be searched is 97676868. It is shifted one position to the right. The right shift formula is: "(initial number to be matched-number corresponding to the character to be removed)*10^number of digits corresponding to the character to be removed+number of digits corresponding to the character to be moved in". Among them, the initial number to be matched: 97676868, the number corresponding to the character to be removed: 97000000, the number of digits corresponding to the character to be removed: 2 (the character to be removed is A, the corresponding number is 97, which is a two-digit number, so it is 2), the number corresponding to the character to be moved in: 70, then the latest number to be matched is (97676868-97000000)*102+70=67686870.

[0069] In the above embodiment, the initial number to be matched and the number to be searched are compared to see if they are the same. If they are the same, the content corresponding to the initial number to be matched is obtained as the search result. If they are not the same, the initial number to be matched is updated to obtain the latest number to be matched. By gradually updating and comparing the number to be searched and the number to be matched to perform search and matching, the matching process of searching at the digital layer is realized, the complexity of searching and matching is reduced, and the efficiency of data search is improved.

[0070] See also Figure 5 , Figure 5 The embodiment of the present application provides a schematic block diagram of a data search device based on a string, and the data search device based on a string is used to execute the aforementioned data search method based on a string. The data search device based on a string can be configured on a server.

[0071] like Figure 5 As shown, the string-based data search device 300 comprises:

[0072] The module 301 for obtaining the number to be found is used to obtain the character string corresponding to the content to be found when receiving the content to be found input by the user, and perform decimal conversion on the character string corresponding to the content to be found to obtain the number to be found;

[0073] A to-be-matched number acquisition module 302 is used to acquire an initial to-be-matched number based on a preset main character string and a character string corresponding to the to-be-searched content;

[0074] The search result obtaining module 303 is used to obtain the search result corresponding to the content to be searched based on the number to be searched and the initial number to be matched.

[0075] Furthermore, the module 301 for obtaining the number to be searched includes:

[0076] A search keyword obtaining unit, used for performing semantic analysis on the content to be searched to obtain a search keyword;

[0077] The character string obtaining unit is used to process the search keyword based on a preset code to obtain a character string corresponding to the search keyword as the character string corresponding to the content to be searched.

[0078] Furthermore, the search result obtaining module 303 includes:

[0079] A number comparison unit, used for comparing the number to be found with the initial number to be matched;

[0080] The result obtaining unit is used to use the content corresponding to the initial number to be matched as the search result when the number to be found is the same as the initial number to be matched.

[0081] Furthermore, the search result obtaining module 303 further includes:

[0082] A comparison result obtaining unit, used for, when the to-be-searched number is different from the initial to-be-matched number, updating the initial to-be-matched number based on a preset update rule and the main string, obtaining the latest to-be-matched number, stopping the updating when all the main string is traversed or the to-be-searched number is the same as the latest to-be-matched number, and obtaining the comparison result between the to-be-searched number and the latest to-be-matched number;

[0083] A search result obtaining unit is used to obtain the content corresponding to the latest number to be matched as the search result when the number to be found is the same as the new number to be matched.

[0084] Furthermore, the comparison result obtaining unit includes:

[0085] A character determination subunit, configured to determine, based on the update rule, characters to be removed and characters to be moved into of the character string corresponding to the initial number to be matched in the main character string;

[0086] A number acquisition subunit, used to acquire the number corresponding to the character to be removed, the number of digits corresponding to the character to be removed, and the number corresponding to the character to be moved in;

[0087] A number obtaining subunit, used for updating the initial number to be matched based on a preset right shift formula, the number corresponding to the character to be removed, the number of digits corresponding to the character to be removed, and the number corresponding to the character to be moved in, to obtain the latest number to be matched;

[0088] Among them, the right shift formula is

[0089] L = (Xa) × 10 b +c

[0090] Among them, L represents the latest number to be matched, X represents the initial number to be matched, a represents the number corresponding to the character to be removed, b represents the number of digits corresponding to the character to be removed, and c represents the number corresponding to the character to be moved in.

[0091] Furthermore, the string-based data search device 300 further includes a main string acquisition module, and the main string acquisition module includes:

[0092] A database acquisition unit, used to acquire a preset database;

[0093] A keyword group obtaining unit is used to extract keywords from various types of data in the database to obtain keyword groups corresponding to various types of data;

[0094] The main character string obtaining unit is used to generate character strings corresponding to various types of materials based on the keyword group, and obtain the main character string based on the character strings corresponding to the various types of materials.

[0095] It should be noted that those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working process of the above-described device and each module can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here.

[0096] The above-mentioned device can be implemented in the form of a computer program. Figure 6 Runs on the computer device shown.

[0097] See also Figure 6 , Figure 6 1 is a schematic block diagram of a computer device provided in an embodiment of the present application. The computer device may be a server.

[0098] See also Figure 6 The computer device includes a processor, a memory and a network interface connected through a system bus, wherein the memory may include a non-volatile storage medium and an internal memory.

[0099] The non-volatile storage medium can store an operating system and a computer program. The computer program includes program instructions, and when the program instructions are executed, the processor can execute any string-based data search method.

[0100] The processor is used to provide computing and control capabilities and support the operation of the entire computer equipment.

[0101] The internal memory provides an environment for the operation of the computer program in the non-volatile storage medium. When the computer program is executed by the processor, the processor can execute any string-based data search method.

[0102] The network interface is used for network communication, such as sending assigned tasks, etc. Those skilled in the art will understand that Figure 6 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0103] It should be understood that the processor may be a central processing unit (CPU), and the processor 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. Among them, the general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.

[0104] In one embodiment, the processor is used to run a computer program stored in the memory to implement the following steps:

[0105] When receiving the content to be searched input by the user, obtaining the character string corresponding to the content to be searched, and performing decimal conversion on the character string corresponding to the content to be searched to obtain the number to be searched;

[0106] Based on a preset main character string and a character string corresponding to the content to be searched, an initial number to be matched is obtained;

[0107] Based on the number to be searched and the initial number to be matched, a search result corresponding to the content to be searched is obtained.

[0108] In one embodiment, when the processor receives the content to be searched input by the user and obtains the character string corresponding to the content to be searched, it is configured to implement:

[0109] Performing semantic analysis on the content to be searched to obtain search keywords;

[0110] Based on the preset code, the search keyword is processed to obtain a character string corresponding to the search keyword as the character string corresponding to the content to be searched.

[0111] In one embodiment, when the processor obtains the search result corresponding to the content to be searched based on the number to be searched and the initial number to be matched, it is used to implement:

[0112] Compare the number to be found with the initial number to be matched;

[0113] When the number to be searched is the same as the initial number to be matched, the content corresponding to the initial number to be matched is used as the search result.

[0114] In one embodiment, after the processor compares the to-be-searched number with the initial to-be-matched number, the processor is further configured to:

[0115] When the number to be found is different from the initial number to be matched, the initial number to be matched is updated based on the preset update rule and the main string to obtain the latest number to be matched, and the updating is stopped until all the main strings are traversed or the number to be found is the same as the latest number to be matched, and the comparison result between the number to be found and the latest number to be matched is obtained;

[0116] When the number to be searched is the same as the new number to be matched, the content corresponding to the latest number to be matched is obtained as the search result.

[0117] In one embodiment, when the processor updates the initial to-be-matched numbers based on the preset update rule and the main string to obtain the latest to-be-matched numbers, it is used to implement:

[0118] Based on the update rule, determining in the main string the characters to be removed and the characters to be moved into of the character string corresponding to the initial number to be matched;

[0119] Obtain the number corresponding to the character to be removed, the number of digits corresponding to the character to be removed, and the number corresponding to the character to be moved in;

[0120] Based on a preset right shift formula, the number corresponding to the character to be removed, the number of digits corresponding to the character to be removed, and the number corresponding to the character to be moved in, the initial number to be matched is updated to obtain the latest number to be matched;

[0121] Among them, the right shift formula is

[0122] L = (Xa) × 10 b +c

[0123] Among them, L represents the latest number to be matched, X represents the initial number to be matched, a represents the number corresponding to the character to be removed, b represents the number of digits corresponding to the character to be removed, and c represents the number corresponding to the character to be moved in.

[0124] In one embodiment, before obtaining the initial number to be matched based on the preset main string and the string corresponding to the content to be searched, the processor is further used to implement:

[0125] Get the preset database;

[0126] Extract keywords from various types of information in the database to obtain keyword groups corresponding to various types of information;

[0127] Based on the keyword group, character strings corresponding to each type of data are generated, and based on the character strings corresponding to each type of data, the main character string is obtained.

[0128] In one embodiment, when the processor obtains the initial number to be matched based on the preset main string and the string corresponding to the content to be searched, it is used to implement:

[0129] Get the length of the string corresponding to the content to be searched;

[0130] Based on the length of the string, extract a string to be matched with the same length from the main string;

[0131] The character string to be matched is converted into decimal to obtain the initial number to be matched.

[0132] A computer-readable storage medium is also provided in an embodiment of the present application, wherein the computer-readable storage medium stores a computer program, wherein the computer program includes program instructions, and the processor executes the program instructions to implement any string-based data search method provided in the embodiment of the present application.

[0133] The computer-readable storage medium may be an internal storage unit of the computer device described in the foregoing embodiment, such as a hard disk or memory of the computer device. The computer-readable storage medium may also be an external storage device of the computer device, such as a plug-in hard disk, a smart memory card (Smart Medi a Card, SMC), a secure digital (Secure Digital, SD) card, a flash memory card (Flash Card), etc., equipped on the computer device.

[0134] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of various equivalent modifications or replacements within the technical scope disclosed in the present application, and these modifications or replacements should be included in the protection scope of the present application. Therefore, the protection scope of the present application shall be based on the protection scope of the claims.

Claims

1. A data search method based on character strings, characterized in that: include: When receiving the content to be searched input by the user, obtaining the character string corresponding to the content to be searched, and performing decimal conversion on the character string corresponding to the content to be searched to obtain the number to be searched; Based on a preset main character string and a character string corresponding to the content to be searched, an initial number to be matched is obtained; Based on the number to be searched and the initial number to be matched, a search result corresponding to the content to be searched is obtained.

2. The string-based data search method according to claim 1, characterized in that: When receiving the content to be searched input by the user, obtaining a character string corresponding to the content to be searched includes: Performing semantic analysis on the content to be searched to obtain search keywords; Based on the preset code, the search keyword is processed to obtain a character string corresponding to the search keyword as the character string corresponding to the content to be searched.

3. The string-based data search method according to claim 1, characterized in that: The obtaining of a search result corresponding to the content to be searched based on the number to be searched and the initial number to be matched includes: Compare the number to be found with the initial number to be matched; When the number to be searched is the same as the initial number to be matched, the content corresponding to the initial number to be matched is used as the search result.

4. The string-based data search method according to claim 3, characterized in that: After comparing the number to be found with the initial number to be matched, the method further includes: When the number to be found is different from the initial number to be matched, the initial number to be matched is updated based on the preset update rule and the main string to obtain the latest number to be matched, and the updating is stopped until all the main strings are traversed or the number to be found is the same as the latest number to be matched, and the comparison result between the number to be found and the latest number to be matched is obtained; When the number to be searched is the same as the new number to be matched, the content corresponding to the latest number to be matched is obtained as the search result.

5. The string-based data search method according to claim 3, characterized in that: The updating of the initial to-be-matched numbers based on the preset update rule and the main character string to obtain the latest to-be-matched numbers includes: Based on the update rule, determining in the main string the characters to be removed and the characters to be moved into of the character string corresponding to the initial number to be matched; Obtain the number corresponding to the character to be removed, the number of digits corresponding to the character to be removed, and the number corresponding to the character to be moved in; Based on a preset right shift formula, the number corresponding to the character to be removed, the number of digits corresponding to the character to be removed, and the number corresponding to the character to be moved in, the initial number to be matched is updated to obtain the latest number to be matched; Among them, the right shift formula is L=(X-a)×10 b +c Among them, L represents the latest number to be matched, X represents the initial number to be matched, a represents the number corresponding to the character to be removed, b represents the number of digits corresponding to the character to be removed, and c represents the number corresponding to the character to be moved in.

6. The string-based data search method according to claim 1, characterized in that: Before obtaining the initial number to be matched based on the preset main character string and the character string corresponding to the content to be searched, the method further includes: Get the preset database; Extract keywords from various types of information in the database to obtain keyword groups corresponding to various types of information; Based on the keyword group, character strings corresponding to each type of data are generated, and based on the character strings corresponding to each type of data, the main character string is obtained.

7. The string-based data search method according to any one of claims 1 to 6, characterized in that: The step of obtaining an initial number to be matched based on a preset main character string and a character string corresponding to the content to be searched includes: Get the length of the string corresponding to the content to be searched; Based on the length of the string, extract a string to be matched with the same length from the main string; The character string to be matched is converted into decimal to obtain the initial number to be matched.

8. A data search device based on character strings, characterized in that: include: A module for obtaining a number to be found, used to obtain a character string corresponding to the content to be found when receiving the content to be found input by the user, and perform a decimal conversion on the character string corresponding to the content to be found to obtain the number to be found; A module for obtaining numbers to be matched, used to obtain initial numbers to be matched based on a preset main character string and a character string corresponding to the content to be searched; The search result obtaining module is used to obtain the search result corresponding to the content to be searched based on the number to be searched and the initial number to be matched.

9. A computer device, characterized in that: The computer device includes a memory and a processor; The memory is used to store computer programs; The processor is used to execute the computer program and implement the string-based data search method according to any one of claims 1 to 7 when executing the computer program.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the processor implements the string-based data search method according to any one of claims 1 to 7.