Name matching method and device, electronic equipment and storage medium
By performing word segmentation and standard word matching on the object names entered by the user, the problem of inaccurate search results caused by inaccurate names is solved, and higher matching precision and search result accuracy are achieved.
Patent Information
- Application Number
- CN202510776532.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-11
- Publication Date
- 2025-09-19
AI Technical Summary
In the prior art, the accuracy of object search results is low due to inaccurate object names input by users.
By performing word segmentation on the object name input by the user, a word segmentation subset that matches the preset standard word segmentation set is screened out, and a word filtering operation is performed based on the standard words to match the standard object name of the target object.
Improved the matching accuracy of object names and ensured the accuracy of object search results.
Smart Images

Figure CN120670631A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a name matching method, device, electronic device, and storage medium. Background Art
[0002] In order to obtain relevant information or services of a target object (eg, an institution such as a bank), a user usually searches for the target object according to the object name of the target object, and then determines the target object from multiple search results.
[0003] At present, although many object search methods (such as fuzzy search or name similarity matching) are provided to realize object search, the object name entered by the user is not the exact name of the target object. For example, the object name entered by the user may contain typos or abbreviations, resulting in low accuracy of the object search results.
[0004] In view of this, how to improve the matching accuracy of object names and thus improve the accuracy of object search results is a problem that urgently needs results. Summary of the Invention
[0005] The embodiments of the present application provide a name matching method, apparatus, electronic device, and storage medium for improving the matching accuracy of object names, thereby improving the accuracy of object search results.
[0006] In a first aspect, an embodiment of the present application provides a name matching method, the method comprising:
[0007] In response to an object search request for a target object from a target user, obtaining a first object name input by the target user from the object search request;
[0008] Performing word segmentation processing on the first object name to obtain a first word segmentation set, and screening out a standard word segmentation subset that matches the first word segmentation set from a preset standard word segmentation set;
[0009] Based on each standard word included in the standard word segmentation subset, a word filtering operation is performed on multiple first words included in the first word segmentation set to obtain a second word segmentation set;
[0010] Based on at least one standard word included in the second word segmentation set, a standard object name corresponding to the target object is matched from a plurality of standard object names corresponding to the standard word segmentation set.
[0011] In an optional implementation, before responding to the target user's object search request for the target object, the method further includes:
[0012] Perform word segmentation on multiple standard object names to obtain multiple standard words;
[0013] Based on at least one standard object name to which the multiple standard words respectively belong, standard word subsets corresponding to the multiple standard words are constructed.
[0014] In an optional implementation, based on at least one standard object name to which the multiple standard words belong, standard word subsets corresponding to the multiple standard words are constructed, including:
[0015] Determining the frequency of each of the plurality of standard words in the names of the plurality of standard objects, and selecting at least one standard word having a frequency less than or equal to a set frequency threshold from the plurality of standard words;
[0016] Based on the at least one standard object name to which the at least one standard word belongs, a standard word subset corresponding to the at least one standard word is constructed.
[0017] In an optional implementation, a standard segmentation subset matching the first segmentation set is selected from a preset standard segmentation set, including:
[0018] Performing word matching on the standard words corresponding to each standard word subset included in the standard word segmentation set and the plurality of first words included in the first word segmentation set to obtain a word matching result;
[0019] When the word matching result indicates that the standard word identical to the first word is successfully matched, the standard word subset corresponding to the standard word is used as the standard word subset that matches the first word set.
[0020] In an optional implementation, based on at least one standard word included in the second word segmentation set, matching the standard object name corresponding to the target object from multiple standard object names corresponding to the standard word segmentation set includes:
[0021] Filtering at least one standard object name containing at least one standard word from a plurality of standard object names;
[0022] Based on the name similarity between the at least one standard object name and the first object name, a standard object name corresponding to the target object is determined.
[0023] In an optional implementation, determining a standard object name corresponding to the target object based on a name similarity between at least one standard object name and the first object name includes:
[0024] Performing string feature extraction on the at least one standard object name and the first object name to obtain a first feature vector corresponding to the at least one standard object name and a second feature vector corresponding to the first object name;
[0025] obtaining at least one name similarity based on a vector similarity between each of the at least one first feature vector and the second feature vector;
[0026] The standard object name corresponding to the highest name similarity among the at least one name similarity is used as the standard object name corresponding to the target object.
[0027] In an optional implementation, obtaining at least one name similarity based on the vector similarity between at least one first feature vector and the second feature vector includes:
[0028] Cosine similarity is calculated for the at least one first feature vector and the second semantic feature respectively to obtain at least one vector similarity, and the at least one vector similarity is used as the at least one name similarity.
[0029] In a second aspect, an embodiment of the present application further provides a name matching device, the device comprising:
[0030] an acquisition module, configured to respond to an object search request of a target user for a target object and acquire a first object name input by the target user from the object search request;
[0031] A screening module is configured to perform word segmentation processing on the first object name to obtain a first word segmentation set, and to screen a standard word segmentation subset that matches the first word segmentation set from a preset standard word segmentation set;
[0032] a processing module configured to perform a word filtering operation on the plurality of first words included in the first word segmentation set based on each standard word included in the standard word segmentation subset to obtain a second word segmentation set;
[0033] The matching module is configured to match a standard object name corresponding to a target object from a plurality of standard object names corresponding to the standard word segmentation set based on at least one standard word included in the second word segmentation set.
[0034] In an optional implementation, before responding to the target user's object search request for the target object, the screening module is further configured to:
[0035] Perform word segmentation on multiple standard object names to obtain multiple standard words;
[0036] Based on at least one standard object name to which the multiple standard words respectively belong, standard word subsets corresponding to the multiple standard words are constructed.
[0037] In an optional implementation, when constructing standard word subsets corresponding to the plurality of standard words based on at least one standard object name to which the plurality of standard words belong, the screening module is specifically configured to:
[0038] Determining the frequency of each of the plurality of standard words in the names of the plurality of standard objects, and selecting at least one standard word having a frequency less than or equal to a set frequency threshold from the plurality of standard words;
[0039] Based on the at least one standard object name to which the at least one standard word belongs, a standard word subset corresponding to the at least one standard word is constructed.
[0040] In an optional implementation, when filtering out a standard segmentation subset that matches the first segmentation set from a preset standard segmentation set, the screening module is specifically configured to:
[0041] Performing word matching on the standard words corresponding to each standard word subset included in the standard word segmentation set and the plurality of first words included in the first word segmentation set to obtain a word matching result;
[0042] When the word matching result indicates that the standard word identical to the first word is successfully matched, the standard word subset corresponding to the standard word is used as the standard word subset that matches the first word set.
[0043] In an optional implementation, when matching the standard object name corresponding to the target object from multiple standard object names corresponding to the standard word segmentation set based on at least one standard word included in the second word segmentation set, the matching module is specifically configured to:
[0044] Filtering at least one standard object name containing at least one standard word from a plurality of standard object names;
[0045] Based on the name similarity between the at least one standard object name and the first object name, a standard object name corresponding to the target object is determined.
[0046] In an optional implementation, when determining the standard object name corresponding to the target object based on the name similarity between at least one standard object name and the first object name, the matching module is specifically configured to:
[0047] Performing string feature extraction on the at least one standard object name and the first object name to obtain a first feature vector corresponding to the at least one standard object name and a second feature vector corresponding to the first object name;
[0048] obtaining at least one name similarity based on a vector similarity between each of the at least one first feature vector and the second feature vector;
[0049] The standard object name corresponding to the highest name similarity among the at least one name similarity is used as the standard object name corresponding to the target object.
[0050] In an optional implementation, when obtaining at least one name similarity based on the vector similarity between at least one first feature vector and the second feature vector, the matching module is specifically configured to:
[0051] Cosine similarity is calculated for the at least one first feature vector and the second semantic feature respectively to obtain at least one vector similarity, and the at least one vector similarity is used as the at least one name similarity.
[0052] In a third aspect, an embodiment of the present application further provides an electronic device, including:
[0053] processor; and
[0054] Memory for storing programs,
[0055] The program includes instructions, which, when executed by a processor, cause the processor to execute the name matching method as described in the first aspect.
[0056] In a fourth aspect, an embodiment of the present application further provides a non-transitory computer-readable storage medium storing computer instructions, wherein the computer instructions are used to enable a computer to execute the name matching method as described in the first aspect.
[0057] In a fifth aspect, the present application provides a computer program product, which, when called by a computer, enables the computer to execute the name matching method steps as described in the first aspect.
[0058] The beneficial effects of this application are as follows:
[0059] In the name matching method provided in the embodiment of the present application, after obtaining the first object name input by the target user from the object search request for the target object, the first object name can be segmented to obtain a first segmentation set; then, after filtering out a standard segmentation subset that matches the first segmentation set from the preset standard segmentation set, the multiple first words included in the first segmentation set can be filtered out based on the various standard words included in the standard segmentation subset, thereby obtaining a second segmentation set that only includes standard words; finally, the standard object name corresponding to the target object can be matched from the multiple standard object names corresponding to the standard segmentation set based on at least one standard word included in the second segmentation set. In this way, the current problem of inaccurate object search results caused by the first object name input by the target user not being the accurate name of the target object is improved, that is, the matching accuracy of the object name is improved, thereby ensuring the accuracy of the object search results.
[0060] In addition, other features and advantages of the present application will be described in the following description, and in part will become apparent from the description, or may be understood by practicing the present application. The objectives and other advantages of the present application can be realized and obtained through the structures particularly pointed out in the written description, claims, and drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0061] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for describing the embodiments. Obviously, the drawings described here are used to provide a further understanding of the present application, constitute a part of the present application, and do not constitute an improper limitation of the present application. In the drawings:
[0062] Figure 1 A schematic diagram of an optional system architecture applicable to the embodiments of the present application;
[0063] Figure 2 A schematic diagram of an implementation flow of a name matching method provided in an embodiment of the present application;
[0064] Figure 3 A schematic diagram of a specific scenario for constructing a standard word segmentation subset provided in an embodiment of the present application;
[0065] Figure 4 A schematic diagram of a scenario for screening a standard word segmentation subset corresponding to a target object provided in an embodiment of the present application;
[0066] Figure 5 A schematic diagram of the structure of a name matching device provided in an embodiment of the present application;
[0067] Figure 6 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0068] The following describes embodiments of the present application in more detail with reference to the accompanying drawings. Although certain embodiments of the present application are shown in the accompanying drawings, it should be understood that the present application can be implemented in various forms and should not be construed as limited to the embodiments described herein. Instead, these embodiments are provided to provide a more thorough and complete understanding of the present application. It should be understood that the drawings and embodiments of the present application are for illustrative purposes only and are not intended to limit the scope of protection of the present application.
[0069] It should be understood that the various steps described in the method embodiments of the present application can be performed in different orders and / or in parallel. In addition, the method embodiments may include additional steps and / or omit the steps shown. The scope of the present application is not limited in this respect.
[0070] The term "including" and its variations used in this document are open inclusions, that is, "including but not limited to". The term "based on" means "based at least in part on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one other embodiment"; the term "some embodiments" means "at least some embodiments". The relevant definitions of other terms will be given in the description below. It should be noted that the concepts of "first", "second", etc. mentioned in this application are only used to distinguish different devices, modules or units, and are not used to limit the order or interdependence of the functions performed by these devices, modules or units.
[0071] It should be noted that the modifications of "one" and "multiple" mentioned in this application are illustrative rather than restrictive. Those skilled in the art should understand that unless otherwise clearly indicated in the context, they should be understood as "one or more".
[0072] The names of the messages or information exchanged between multiple devices in the embodiments of the present application are only used for illustrative purposes and are not used to limit the scope of these messages or information.
[0073] First, the following briefly introduces the design concept of the embodiment of the present application:
[0074] In order to obtain relevant information or services of a target object (eg, an institution such as a bank), a user usually searches for the target object according to the object name of the target object, and then determines the target object from multiple search results.
[0075] At present, although many object search methods (such as fuzzy search or name similarity matching) are provided to realize object search, the object name entered by the user is not the exact name of the target object. For example, the object name entered by the user may contain typos or abbreviations, resulting in low accuracy of the object search results.
[0076] For example, the branch name entered by the user may be non-standard, for example, there may be a typo in the branch name entered by the user, in which case the keyword fuzzy search will not find any branch.
[0077] In view of this, in order to solve or improve the above-mentioned problems, improve the matching accuracy of object names, and thus improve the accuracy of object search results. The embodiment of the present application proposes a name matching method, which may specifically include: in response to an object search request for a target object by a target user, obtaining a first object name input by the target user from the object search request; then, performing word segmentation processing on the first object name to obtain a first word segmentation set, and filtering out a standard word segmentation subset that matches the first word segmentation set from a preset standard word segmentation set; further, based on each standard word included in the standard word segmentation subset, performing a word filtering operation on multiple first words included in the first word segmentation set to obtain a second word segmentation set; finally, based on at least one standard word included in the second word segmentation set, matching the standard object name corresponding to the target object from multiple standard object names corresponding to the standard word segmentation set.
[0078] In particular, the preferred embodiments of the present application are described below in conjunction with the drawings in the specification. It should be understood that the preferred embodiments described herein are only used to illustrate and explain the present application and are not used to limit the present application. In addition, the embodiments of the present application and the features in the embodiments may be combined with each other if there is no conflict.
[0079] See Figure 1 As shown, it is a schematic diagram of a system architecture applicable to an embodiment of the present application, and the system architecture may include: a terminal device (101a, 101b) and a server 102. The terminal device (101a, 101b) and the server 102 can exchange information through a communication network, wherein the communication mode adopted by the communication network may include: a wireless communication mode and a wired communication mode. Exemplarily, the terminal device (101a, 101b) can access the network through cellular mobile communication technology and communicate with the server 102. The cellular mobile communication technology, for example, includes the fifth generation mobile communication (5th generation mobile networks, 5G) technology or the next generation mobile communication technology. Optionally, the terminal device (101a, 101b) can access the network through a short-range wireless communication mode and communicate with the server 102. The short-range wireless communication mode, for example, includes wireless fidelity (Wi-Fi) technology.
[0080] The embodiment of the present application does not impose any restrictions on the number of communication devices involved in the above system architecture. For example, the above system architecture may include more terminal devices, or fewer terminal devices, or other network devices. Figure 1 As shown, only the terminal devices (101a, 101b) and the server 102 are described as examples, and the above-mentioned communication devices and their respective functions are briefly introduced below.
[0081] The terminal device (101a, 101b) is a device that can provide voice and / or data connectivity to users, and can be a device that supports wired and / or wireless connection.
[0082] Exemplarily, the terminal devices (101a, 101b) may include, but are not limited to: mobile phones, tablet computers, laptop computers, PDAs, mobile internet devices (MIDs), wearable devices, virtual reality (VR) devices, augmented reality (AR) devices, wireless terminal devices in industrial control, wireless terminal devices in unmanned driving, wireless terminal devices in smart grids, wireless terminal devices in transportation safety, wireless terminal devices in smart cities, or wireless terminal devices in smart homes, etc.
[0083] In addition, the terminal device (101a, 101b) may be installed with a relevant client, which may be software, such as an application (APP), a browser, a short video software, etc., or a web page, a mini-program, etc. It should be noted that the terminal device (101a, 101b) in the embodiment of the present application may enable the above-mentioned client related to name matching to send an object search request of the target user for the target object to the server 102, so as to subsequently perform method steps such as name matching for the first object name included in the aforementioned object search request.
[0084] Server 102 can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers. It can also be a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery networks (CDNs), and big data and artificial intelligence platforms.
[0085] It is worth mentioning that in an embodiment of the present application, the server 102 can be used to respond to an object search request for a target object by a target user, obtain a first object name input by the target user from the object search request; perform word segmentation processing on the first object name to obtain a first word segmentation set, and filter out a standard word segmentation subset that matches the first word segmentation set from a preset standard word segmentation set; based on the various standard words included in the standard word segmentation subset, perform a word filtering operation on the multiple first words included in the first word segmentation set to obtain a second word segmentation set; based on at least one standard word included in the second word segmentation set, match the standard object name corresponding to the target object from the multiple standard object names corresponding to the standard word segmentation set.
[0086] The following describes the name matching method provided by the exemplary embodiment of the present application in combination with the above-mentioned system architecture and with reference to the accompanying drawings. It should be noted that the above-mentioned system architecture is only shown to facilitate understanding of the spirit and principles of the present application, and the implementation of the present application is not limited in this respect.
[0087] See Figure 2 As shown, it is a schematic diagram of the implementation process of a name matching method provided in an embodiment of the present application. The execution subject takes the server as an example. The specific implementation process of the method is as follows:
[0088] S201: In response to an object search request for a target object from a target user, obtain a first object name input by the target user from the object search request.
[0089] For example, when executing step S201, the target user may send an object search request for the target object to the server via a terminal device, and then obtain the first object name input by the target user from the object search request. The target object may include, but is not limited to, institutions such as banks, branches, sub-branches, and subsidiaries. Therefore, the first object name may include, but is not limited to, the name of a bank, branch, sub-branches, and subsidiaries, etc., and this embodiment of the present application is not limited thereto.
[0090] S202: Perform word segmentation processing on the first object name to obtain a first word segmentation set, and filter out a standard word segmentation subset that matches the first word segmentation set from a preset standard word segmentation set.
[0091] Taking the aforementioned first object name of "Bank A, City A, Branch 1" as an example, the server can obtain a first segmentation set corresponding to Bank A, City A, Branch 1 by performing segmentation processing on the first object. The first segmentation set includes the five words "Bank A," "a," "city," "first," and "branch." The aforementioned preset standard segmentation set can also be referred to as a standard vocabulary dictionary, and of course, it can have other names, which are not limited in this embodiment of the application.
[0092] To ensure that after the server performs word segmentation processing on the first object name and obtains the first word segmentation set, it can quickly and accurately match one or more corresponding standard words, thereby achieving precise matching of the object name, the server can pre-build a standard word segmentation set including standard word segmentation subsets corresponding to multiple standard words.
[0093] In an optional implementation, before executing step S201, the server may perform word segmentation processing on multiple standard object names to obtain multiple standard words, and thereby construct standard word segmentation subsets corresponding to the multiple standard words based on at least one standard object name to which the aforementioned multiple standard words are respectively located.
[0094] Take the above-mentioned multiple standard object names including: X Country A Bank a Branch, B Bank Co., Ltd. ax Road Branch, X Country C Bank a City Fifth Branch as an example. The server can obtain the standard words corresponding to X Country A Bank a Branch, i.e. X Country-A Bank-a-Branch, the standard words corresponding to B Bank Co., Ltd. ax Road Branch, i.e. B Bank-Co., Ltd.-ax Road-Branch, and the standard words corresponding to X Country C Bank a City Fifth Branch, i.e. X Country-C Bank-a-City-Fifth-Branch, by performing word segmentation on the above-mentioned three standard object names. Figure 3 The aforementioned 11 standard words shown in FIG respectively correspond to the standard word subsets. Figure 3 As shown in the figure, the standard object names for Country X include: Bank A, Branch A, Country X and Bank C, City A, Fifth Branch, Country X. Therefore, the standard word subset corresponding to Country X includes all the standard words in the aforementioned two standard object names. That is, the standard word subset corresponding to Country X includes the eight standard words: Country X, Bank A, a, Branch, Bank C, City, Fifth, and Branch.
[0095] Similarly, the standard word segmentation subset corresponding to Bank A includes 4 standard words, namely: Country X, Bank A, a, and branch. The standard word segmentation subset corresponding to a includes 11 standard words, namely: Country X, Bank A, a, branch, Bank B, Joint-stock Company Limited, Road X, sub-branch, Bank C, city, and fifth. The standard word segmentation subset corresponding to branch includes 4 standard words, namely: Country X, Bank A, a, and branch. The standard word segmentation subset corresponding to Bank B includes 5 standard words, namely: Bank B, Joint-stock Company Limited, a, Road X, and sub-branch. The standard word segmentation subset corresponding to Joint-stock Company Limited includes 5 standard words, namely: Bank B, Joint-stock Company Limited, a, Road X, and sub-branch. The standard word segmentation subset corresponding to Road X includes 5 standard words, namely: Bank B, Joint-stock Company Limited, a, Road X, and sub-branch. The standard word segmentation subset corresponding to Fifth includes 6 standard words, namely: Country X, Bank C, a, city, Fifth, and sub-branch. The standard word segmentation subset for "branch" includes nine standard words: Bank B, Co., Ltd., a, Road X, Branch, Country X, Bank C, City, and Fifth. The standard word segmentation subset for Bank C includes six standard words: Country X, Bank C, a, City, Fifth, and Branch. The standard word segmentation subset for "city" includes six standard words: Country X, Bank C, a, City, Fifth, and Branch.
[0096] It should be noted that the standard object name can be determined based on the unique identifier of the object, and this embodiment of the application does not specifically limit this. Taking the target object as a branch as an example, the branch name (i.e., the object name) can be determined based on the branch's corresponding interbank number. Among them, the interbank number is a unique identification mark of a regional bank and can be used for cross-regional payment and settlement services. It can usually be composed of a 3-digit bank code + a 4-digit city code + a 4-digit bank number + a 1-digit check code.
[0097] In order to reduce the time required to construct a standard word segmentation subset or a standard word segmentation set, when creating the standard word segmentation subsets corresponding to the above-mentioned multiple standard words, the server can combine the word frequencies of the above-mentioned multiple standard words in the above-mentioned multiple standard object names to reduce the number of standard word segmentation subsets created.
[0098] In an optional implementation, when creating a standard word segmentation subset, the server can respectively determine the word frequency of the above-mentioned multiple standard words in the above-mentioned multiple standard object names, and filter out at least one standard word whose word frequency is less than or equal to the set word frequency threshold from the above-mentioned multiple standard words, thereby constructing a standard word segmentation subset corresponding to the above-mentioned at least one standard word based on the at least one standard object name in which the above-mentioned at least one standard word is respectively located.
[0099] Let's take the example of Bank A Branch A in Country X, Bank B Co., Ltd. Branch Ax Road, and Bank C City Fifth Branch in Country X. Since the four standard terms "country X," "a," "branch," and "city" have high word frequencies, when creating standard word subsets for the 11 standard terms included in the three standard object names, the server can avoid creating standard word subsets corresponding to "country X," "a," "branch," and "city," thereby reducing the time required to create standard word sets corresponding to these three standard object names.
[0100] It should be understood that the above-mentioned method of creating a standard word segmentation set not only saves the time required for creating the standard word segmentation set, but also reduces the storage space occupied by the standard word segmentation set. Optionally, if the server has created standard word segmentation subsets for all standard words, then the server can delete the standard word segmentation subsets corresponding to at least one standard word with a word frequency less than or equal to a set word frequency threshold from the standard word segmentation set based on the word frequency of the standard words.
[0101] In an optional implementation, when executing step S202, after obtaining the word segmentation processing result (i.e., the first word segmentation set) corresponding to the first object name, the server can perform word matching on the standard words corresponding to each standard word segmentation subset included in the preset standard word segmentation set and the multiple first words included in the first word segmentation set to obtain a word matching result, so that when the word matching result indicates a successful match to the same standard word as the first word, the standard word segmentation subset corresponding to the standard word is used as the standard word segmentation subset that matches the first word segmentation set. In this way, by obtaining a standard word segmentation subset that matches the first word segmentation set of the first object name input by the target user, it can be ensured that the accurate object name of the target object can be determined based on one or more standard words included in the standard word segmentation subset, thereby improving the accuracy of the object name match.
[0102] The first object name is C Bank a Fifth Branch, and the preset standard segmentation set includes: Figure 3 Take the 11 standard segmentation subsets shown as an example. After the server obtains the first segmentation subset corresponding to the first object name (i.e., C Bank-a-Fifth-Branch), it can perform word matching based on the standard words corresponding to the 11 standard segmentation subsets (i.e., X Country, A Bank, a, Branch, B Bank, Co., Ltd., x Road, Branch, C Bank, City, and Fifth) and the four first words included in the first segmentation set (i.e., C Bank, a, Fifth, and Branch). When the word matching result indicates that a standard word identical to the first word is successfully matched, the standard segmentation subset corresponding to the standard word is used as the standard segmentation subset that matches the first segmentation set. Figure 4 As shown, the standard segmentation subset corresponding to Bank C is used as the standard segmentation subset that matches the first segmentation set. That is, the standard segmentation subset that matches the first segmentation set includes: Country X, Bank C, a, City, and the Fifth and Branch.
[0103] It should be understood that if there are multiple standard words in the first word included in the first word segmentation set, the standard word segmentation subset corresponding to the first matched standard word can be used as the standard word segmentation subset matching the first word segmentation set.
[0104] S203: Based on each standard word included in the standard word segmentation subset, a word filtering operation is performed on the multiple first words included in the first word segmentation set to obtain a second word segmentation set.
[0105] Thus, the server can filter out the first words included in the first word segmentation set using the standard words included in the standard word segmentation subset to obtain a second word segmentation set consisting only of the standard words. This avoids the problem of inaccurate name matching caused by errors, abbreviations, or missing words in the first object name input by the target.
[0106] S204: Based on at least one standard word included in the second word segmentation set, match a standard object name corresponding to the target object from a plurality of standard object names corresponding to the standard word segmentation set.
[0107] Based on the above method, after obtaining the second word segmentation set, the server can filter out a standard object name containing at least one standard word included in the second word segmentation set from multiple standard object names, and then use the standard object name as the first standard object name of the target object. Figure 4 For example, the standard object name corresponding to the first object name (ie, the fifth branch of Bank C, City A, Country X) may be the fifth branch of Bank C, City A, Country X.
[0108] If the server matches multiple standard object names containing at least one standard word included in the second word segmentation set from the multiple standard object names corresponding to the above-mentioned preset standard word segmentation set, then in an optional implementation method, when executing step S204, after the server filters out at least one standard object name containing at least one standard word included in the second word segmentation set from the multiple standard object names, it can determine the standard object name corresponding to the target object based on the name similarity between each of the at least one standard object names and the first object name.
[0109] Taking the example of selecting three standard object names containing at least one standard word included in the second word segmentation set from a plurality of standard object names, the name similarities between the three standard object names and the first object name are shown in Table 1.
[0110] Table 1 Example of name similarity between standard object names and first object names
[0111] Standard object name Tar.Ob.Name.1 Tar.Ob.Name.2 Tar.Ob.Name.3 Name similarity 88.7% 72.5% 95.6%
[0112] Based on the name similarity between the three standard object names recorded in Table 1 above and the first object name, after obtaining the name similarity between the three standard object names and the first object name, the server can use the standard object name with the highest name similarity among the three standard object names as the standard object name of the target object, that is, use the standard object name Tar.Ob.Name.3 as the standard object name of the target object.
[0113] In an optional implementation, when executing step S204, the server may perform string feature extraction on the at least one standard object name and the first object name to obtain a first feature vector corresponding to the at least one standard object name and a second feature vector corresponding to the first object name; then, based on the vector similarity between the at least one first feature vector and the second feature vector, obtain at least one name similarity; finally, use the standard object name corresponding to the highest name similarity among the at least one name similarity as the standard object name corresponding to the target object.
[0114] There are multiple ways to calculate the above-mentioned vector similarity, which is not specifically limited in the embodiments of this application. As an optional implementation method, the server can perform cosine similarity calculation on the at least one first feature vector and the second semantic feature respectively to obtain at least one vector similarity, and use the at least one vector similarity as at least one name similarity.
[0115] Based on the name matching method recorded in the above steps S201 to S204, by establishing a standard word segmentation set, it is possible to accommodate the presence of typos or abbreviations in the target user's input, and by obtaining a corresponding standard word segmentation subset through fuzzy matching of standard words, the speed of matching object names (such as branch names) is improved. In addition, by comparing name similarity (such as cosine similarity), the standard object name with the highest name similarity is returned, thereby improving the accuracy of object name matching. Simple keyword fuzzy matching is not compatible with typos, and most search results cannot determine the specific branch. Simple similarity matching is inefficient (such as when there are hundreds of thousands of branches) and the search result accuracy is not high, especially when multiple names have the same similarity, the wrong standard object name is always returned. By establishing a standard word segmentation set, the advantages of keyword matching and similarity matching are combined, and the efficiency and accuracy of the final name matching result are greatly improved.
[0116] In summary, in the name matching method provided in the embodiment of the present application, after obtaining the first object name input by the target user from the object search request for the target object, the first object name can be segmented to obtain a first segmentation set; then, after filtering out a standard segmentation subset that matches the first segmentation set from the preset standard segmentation set, the multiple first words included in the first segmentation set can be filtered out based on the various standard words included in the standard segmentation subset, thereby obtaining a second segmentation set that only includes standard words; finally, the standard object name corresponding to the target object can be matched from the multiple standard object names corresponding to the standard segmentation set based on at least one standard word included in the second segmentation set. In this way, the current problem of inaccurate object search results caused by the first object name input by the target user not being the accurate name of the target object is improved, that is, the matching accuracy of the object name is improved, thereby ensuring the accuracy of the object search results.
[0117] Furthermore, based on the same technical concept, the embodiment of the present application provides a name matching device, which is used to implement the above method flow of the embodiment of the present application. Figure 5 As shown, the name matching device 500 may include: an acquisition module 501, a screening module 502, a processing module 503 and a matching module 504, wherein:
[0118] An acquisition module 501 is configured to respond to an object search request for a target object from a target user and acquire a first object name input by the target user from the object search request;
[0119] A screening module 502 is configured to perform word segmentation processing on the first object name to obtain a first word segmentation set, and to screen a standard word segmentation subset that matches the first word segmentation set from a preset standard word segmentation set;
[0120] A processing module 503 is configured to perform a word filtering operation on the first words included in the first word segmentation set based on each standard word included in the standard word segmentation subset to obtain a second word segmentation set;
[0121] The matching module 504 is configured to match a standard object name corresponding to a target object from a plurality of standard object names corresponding to the standard word segmentation set based on at least one standard word included in the second word segmentation set.
[0122] In an optional implementation, before responding to the target user's object search request for the target object, the screening module 502 is further configured to:
[0123] Perform word segmentation on multiple standard object names to obtain multiple standard words;
[0124] Based on at least one standard object name to which the multiple standard words respectively belong, standard word subsets corresponding to the multiple standard words are constructed.
[0125] In an optional implementation, when constructing standard word subsets corresponding to the plurality of standard words based on at least one standard object name to which the plurality of standard words belong, the screening module 502 is specifically configured to:
[0126] Determining the frequency of each of the plurality of standard words in the names of the plurality of standard objects, and selecting at least one standard word having a frequency less than or equal to a set frequency threshold from the plurality of standard words;
[0127] Based on the at least one standard object name to which the at least one standard word belongs, a standard word subset corresponding to the at least one standard word is constructed.
[0128] In an optional implementation, when filtering out a standard segmentation subset matching the first segmentation set from the preset standard segmentation set, the filtering module 502 is specifically configured to:
[0129] Performing word matching on the standard words corresponding to each standard word subset included in the standard word segmentation set and the plurality of first words included in the first word segmentation set to obtain a word matching result;
[0130] When the word matching result indicates that the standard word identical to the first word is successfully matched, the standard word subset corresponding to the standard word is used as the standard word subset that matches the first word set.
[0131] In an optional implementation, when matching the standard object name corresponding to the target object from multiple standard object names corresponding to the standard word segmentation set based on at least one standard word included in the second word segmentation set, the matching module 504 is specifically configured to:
[0132] Filtering at least one standard object name containing at least one standard word from a plurality of standard object names;
[0133] Based on the name similarity between the at least one standard object name and the first object name, a standard object name corresponding to the target object is determined.
[0134] In an optional implementation, when determining the standard object name corresponding to the target object based on the name similarity between at least one standard object name and the first object name, the matching module 504 is specifically configured to:
[0135] Performing string feature extraction on the at least one standard object name and the first object name to obtain a first feature vector corresponding to the at least one standard object name and a second feature vector corresponding to the first object name;
[0136] obtaining at least one name similarity based on a vector similarity between each of the at least one first feature vector and the second feature vector;
[0137] The standard object name corresponding to the highest name similarity among the at least one name similarity is used as the standard object name corresponding to the target object.
[0138] In an optional implementation, when obtaining at least one name similarity based on the vector similarity between at least one first feature vector and the second feature vector, the matching module 504 is specifically configured to:
[0139] Cosine similarity is calculated for the at least one first feature vector and the second semantic feature respectively to obtain at least one vector similarity, and the at least one vector similarity is used as the at least one name similarity.
[0140] Based on the description of the above method embodiment and apparatus embodiment, the exemplary embodiments of the present invention further provide an electronic device, comprising: at least one processor; and a memory communicatively connected to the at least one processor. The memory stores a computer program executable by the at least one processor, and when executed by the at least one processor, the computer program causes the electronic device to perform a method according to an embodiment of the present invention.
[0141] An embodiment of the present application further provides a non-transitory computer-readable storage medium storing a computer program, wherein the computer program, when executed by a processor of a computer, is used to cause the computer to execute a method according to an embodiment of the present application.
[0142] An embodiment of the present application further provides a computer program product, including a computer program, wherein the computer program, when executed by a processor of a computer, is used to cause the computer to perform a method according to an embodiment of the present application.
[0143] See Figure 6 As shown, the structural block diagram of the electronic device 600 that can be used as the server or client of the present application will now be described, which is an example of a hardware device that can be applied to various aspects of the present application. The electronic device is intended to represent various forms of digital electronic computer equipment, such as laptop computers, desktop computers, workbenches, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present application described and / or required herein.
[0144] like Figure 6As shown, the electronic device 600 includes a computing unit 601, which can perform various appropriate actions and processes according to a computer program stored in a read-only memory (ROM) 602 or a computer program loaded from a storage unit 608 into a random access memory (RAM) 603. Various programs and data required for the operation of the device 600 can also be stored in the RAM 603. The computing unit 601, the ROM 602, and the RAM 603 are connected to each other via a bus 604. An input / output (I / O) interface 605 is also connected to the bus 604.
[0145] Multiple components within electronic device 600 are connected to I / O interface 605, including an input unit 606, an output unit 607, a storage unit 608, and a communication unit 609. Input unit 606 can be any type of device capable of inputting information into electronic device 600. Input unit 606 can receive input numeric or character information and generate key input signals related to user settings and / or function control of the electronic device. Output unit 607 can be any type of device capable of presenting information and may include, but is not limited to, a display, a speaker, a video / audio output terminal, a vibrator, and / or a printer. Storage unit 608 may include, but is not limited to, a magnetic disk or an optical disk. Communication unit 609 allows electronic device 600 to exchange information / data with other devices via computer networks such as the Internet and / or various telecommunication networks and may include, but is not limited to, a modem, a network card, an infrared communication device, a wireless communication transceiver, and / or a chipset, such as a Bluetooth device, a WiFi device, a Worldwide Interoperability for Microwave Access (WiMax) device, a cellular communication device, and / or the like.
[0146] The computing unit 601 can be various general-purpose and / or specialized processing components with processing and computing capabilities. Some examples of the computing unit 601 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various artificial intelligence (AI) computing chips, various computing units that run machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The computing unit 601 performs the various methods and processes described above. For example, in some embodiments, the above-described name matching method can be implemented as a computer software program that is tangibly contained in a machine-readable medium, such as the storage unit 608. In some embodiments, part or all of the computer program can be loaded and / or installed on the electronic device 600 via the ROM 602 and / or the communication unit 609. In some embodiments, the computing unit 601 can be configured to perform the above-described name matching method by any other appropriate means (e.g., by means of firmware).
[0147] The program code for implementing the methods of the present application can be written in any combination of one or more programming languages. Such program code can be provided to a processor or controller of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that when the program code is executed by the processor or controller, the functions / operations specified in the flow charts and / or block diagrams are implemented. The program code can be executed entirely on the machine, partially on the machine, as a stand-alone software package, partially on the machine and partially on a remote machine, or entirely on a remote machine or server.
[0148] In the context of the present application, a machine-readable medium can be a tangible medium that can contain or store a program for use by an instruction execution system, device or equipment or used in combination with an instruction execution system, device or equipment. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared or semiconductor system, device or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium can include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a RAM, a ROM, an erasable programmable read-only memory (EPROM) or a flash memory, an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0149] As used herein, the terms "machine-readable medium" and "computer-readable medium" refer to any computer program product, apparatus, and / or device (e.g., a magnetic disk, an optical disk, a memory, a programmable logic device (PLD)) for providing machine instructions and / or data to a programmable processor, including machine-readable media that receives machine instructions as a machine-readable signal. The term "machine-readable signal" refers to any signal for providing machine instructions and / or data to a programmable processor.
[0150] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device (e.g., a cathode ray tube (CRT) or a liquid crystal display (LCD) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the computer. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).
[0151] The systems and techniques described herein can be implemented in a computing system that includes back-end components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes front-end components (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such back-end components, middleware components, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network (LAN), a wide area network (WAN), and the Internet.
[0152] Computer systems may include clients and servers. A client and server are generally remote from each other and typically interact through a communication network. The client and server relationship arises through computer programs running on the respective computers and having a client-server relationship to each other.
[0153] Furthermore, it should be understood that what is disclosed above is merely a preferred embodiment of the present application and certainly cannot be used to limit the scope of rights of the present invention. Therefore, equivalent changes made according to the claims of the present invention are still within the scope covered by the present application.
Claims
1. A name matching method, characterized in that: include: In response to an object search request for a target object from a target user, obtaining a first object name input by the target user from the object search request; Performing word segmentation processing on the first object name to obtain a first word segmentation set, and screening out a standard word segmentation subset that matches the first word segmentation set from a preset standard word segmentation set; Based on each standard word included in the standard word segmentation subset, performing a word filtering operation on multiple first words included in the first word segmentation set to obtain a second word segmentation set; Based on at least one standard word included in the second word segmentation set, a standard object name corresponding to the target object is matched from a plurality of standard object names corresponding to the standard word segmentation set.
2. The method according to claim 1, wherein Before responding to the target user's object search request for the target object, the method further includes: Performing word segmentation processing on the multiple standard object names to obtain multiple standard words; Based on at least one standard object name to which the plurality of standard words are respectively located, standard word segmentation subsets corresponding to the plurality of standard words are constructed.
3. The method according to claim 2, wherein The step of constructing standard word subsets corresponding to the plurality of standard words based on the at least one standard object name to which the plurality of standard words respectively belong includes: respectively determining the word frequencies of the plurality of standard words in the plurality of standard object names, and selecting at least one standard word having a word frequency less than or equal to a set word frequency threshold from the plurality of standard words; Based on the at least one standard object name to which the at least one standard word belongs, a standard word subset corresponding to the at least one standard word is constructed.
4. The method according to any one of claims 1 to 3, wherein The step of selecting a standard segmentation subset matching the first segmentation set from a preset standard segmentation set includes: Performing word matching on the standard words corresponding to each standard word subset included in the standard word segmentation set and the plurality of first words included in the first word segmentation set to obtain a word matching result; When the word matching result indicates that the standard word identical to the first word is successfully matched, the standard word subset corresponding to the standard word is used as the standard word subset that matches the first word set.
5. The method according to any one of claims 1 to 3, wherein The matching of the standard object name corresponding to the target object from a plurality of standard object names corresponding to the standard word segmentation set based on the at least one standard word included in the second word segmentation set includes: Filtering at least one standard object name containing the at least one standard word from the plurality of standard object names; Based on the name similarity between each of the at least one standard object name and the first object name, a standard object name corresponding to the target object is determined.
6. The method according to claim 5, wherein The determining, based on the name similarity between each of the at least one standard object name and the first object name, the standard object name corresponding to the target object includes: Performing string feature extraction on the at least one standard object name and the first object name to obtain a first feature vector corresponding to the at least one standard object name and a second feature vector corresponding to the first object name; obtaining at least one name similarity based on a vector similarity between each of the at least one first feature vector and the second feature vector; The standard object name corresponding to the highest name similarity among the at least one name similarity is used as the standard object name corresponding to the target object.
7. The method according to claim 6, wherein The obtaining of at least one name similarity based on the vector similarity between each of the at least one first feature vector and the second feature vector includes: Cosine similarity calculation is performed on the at least one first feature vector and the second semantic feature respectively to obtain at least one vector similarity, and the at least one vector similarity is used as the at least one name similarity.
8. A name matching device, characterized in that: include: an acquisition module, configured to respond to an object search request of a target user for a target object and acquire a first object name input by the target user from the object search request; a screening module, configured to perform word segmentation processing on the first object name to obtain a first word segmentation set, and screen out a standard word segmentation subset that matches the first word segmentation set from a preset standard word segmentation set; a processing module configured to perform a word filtering operation on the plurality of first words included in the first word segmentation set based on each standard word included in the standard word segmentation subset to obtain a second word segmentation set; The matching module is configured to match the standard object name corresponding to the target object from a plurality of standard object names corresponding to the standard word segmentation set based on at least one standard word included in the second word segmentation set.
9. An electronic device comprising: processor; as well as Memory for storing programs, The program includes instructions, which, when executed by the processor, cause the processor to perform the method according to any one of claims 1 to 7.
10. A non-transitory computer-readable storage medium storing computer instructions, wherein: The computer instructions are used to cause the computer to execute the method according to any one of claims 1 to 7.