A method, apparatus, device, and storage medium for identifying financial entities.
By combining a standard name matcher, an alias matcher, and a fault-tolerant matcher, the financial entity identification method solves the problems of insufficient fault tolerance and ambiguity resolution in existing technologies, achieving higher identification accuracy and fault tolerance.
Patent Information
- Application Number
- CN202611253028.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-18
- Publication Date
- 2026-11-10
AI Technical Summary
Existing financial entity identification technologies are inadequate in terms of fault tolerance and ambiguity resolution, resulting in low hit rates and low accuracy in identifying financial entities, especially when faced with spelling errors and typos.
By employing a combination of standard name matcher, alias matcher, and fault-tolerant matcher, the system generates multiple hit sets by performing name matching and fault-tolerant matching on financial input text. Combined with financial recognition scenario identifiers, it performs entity recognition, thereby improving recognition accuracy.
It enables real-time financial entity recognition in financial scenarios, improves fault tolerance accuracy and cross-scenario disambiguation, and enhances the accuracy of financial entity recognition.
Smart Images

Figure CN123070105A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of financial technology, and in particular to a method, apparatus, device, and storage medium for identifying financial entities. Background Technology
[0002] In scenarios such as robo-advisory in finance, information tagging, and public opinion analysis, it is necessary to identify financial entities such as stocks, sectors, indices, and ETFs (Exchange Traded Funds) from text. Existing financial entity identification technologies mainly fall into two categories: the first is based on precise multi-pattern matching, which uses known entity names as keywords to construct a matcher and performs precise substring matching in the text; the second is based on an alias dictionary, which, in addition to the aforementioned precise matching, maintains an alias dictionary and a third-party name dictionary to expand the matching key space.
[0003] Existing financial entity identification technologies have shortcomings in terms of fault tolerance and ambiguity resolution. For example, the input text to be identified may contain spelling errors and typos, which can lead to a low hit rate. The identified entities may also contain ambiguities such as overlap, inclusion, and synonyms, resulting in low accuracy in identifying financial entities. Summary of the Invention
[0004] This invention provides a method, apparatus, device, and storage medium for identifying financial entities, in order to improve the accuracy of financial entity identification in financial scenarios.
[0005] According to one aspect of the present invention, a method for identifying a financial entity is provided, the method comprising: In response to a financial entity identification request, the request is parsed to obtain financial input text, financial identification scenario identifier, and fault-tolerant matching identifier. The pre-generated standard name matcher and alias matcher are invoked to perform name matching on the financial input text, generating a first hit set; If the first hit set is an empty set, and fault-tolerant matching is triggered according to the fault-tolerant matching identifier, then the financial input text is subjected to fault-tolerant matching based on the pre-generated fault-tolerant matcher to generate a second hit set. The target hit set is determined based on the first hit set and the second hit set; Based on the financial identification scenario identifier, financial entity identification is performed on the target hit set to generate target financial entity identification results; The identification result of the target financial entity is fed back to the requesting party that initiated the financial entity identification request.
[0006] According to another aspect of the present invention, a financial entity identification device is provided, the device comprising: The request parsing module is used to respond to the financial entity identification request, parse the financial entity identification request, and obtain the financial input text, financial identification scenario identifier and fault-tolerant matching identifier; The naming matching module is used to call the pre-generated standard name matcher and alias matcher to perform name matching on the financial input text and generate a first hit set. The fault-tolerant matching module is used to perform fault-tolerant matching on the financial input text based on a pre-generated fault-tolerant matcher if the first hit set is an empty set and fault-tolerant matching is triggered according to the fault-tolerant matching identifier, thereby generating a second hit set. The target set generation module is used to determine the target hit set based on the first hit set and the second hit set; The entity recognition module is used to identify financial entities in the target hit set based on the financial recognition scenario identifier, and generate target financial entity recognition results. The identification result feedback module is used to feed back the identification result of the target financial entity to the requesting party that initiated the identification request of the financial entity.
[0007] According to another aspect of the present invention, an electronic device is provided, the electronic device comprising: At least one processor; and A memory communicatively connected to the at least one processor; wherein, The memory stores a computer program that can be executed by the at least one processor, which enables the at least one processor to perform the financial entity identification method according to any embodiment of the present invention.
[0008] According to another aspect of the present invention, a computer-readable storage medium is provided, the computer-readable storage medium storing computer instructions for causing a processor to execute and implement the financial entity identification method according to any embodiment of the present invention.
[0009] The technical solution of this invention parses the financial entity identification request to obtain the financial input text, the financial identification scenario identifier, and the fault-tolerant matching identifier. It then calls a pre-generated standard name matcher and alias matcher to perform name matching on the financial input text, generating a first hit set. If the first hit set is empty, and fault-tolerant matching is triggered based on the fault-tolerant matching identifier, then fault-tolerant matching is performed on the financial input text based on the pre-generated fault-tolerant matcher, generating a second hit set. A target hit set is determined based on the first and second hit sets. Based on the financial identification scenario identifier, financial entity identification is performed on the target hit set, generating the target financial entity identification result. This technical solution achieves real-time identification of financial entities in financial scenarios. By matching the financial input text using multiple types of matchers, it improves the fault-tolerant hit accuracy. The introduction of financial identification scenarios enables cross-scenario disambiguation, further enhancing the accuracy of financial entity identification in financial scenarios.
[0010] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of the present invention, nor is it intended to limit the scope of the invention. Other features of the invention will become readily apparent from the following description. Attached Figure Description
[0011] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0012] Figure 1 A flowchart illustrating a financial entity identification method provided in an embodiment of the present invention; Figure 2 A flowchart illustrating a financial entity identification method provided in an embodiment of the present invention; Figure 3 This is a schematic diagram of the structure of a financial entity identification device provided in an embodiment of the present invention; Figure 4 This is a schematic diagram of the structure of an electronic device that implements the financial entity identification method of this invention. Detailed Implementation
[0013] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.
[0014] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of the invention described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0015] Example 1 Figure 1 This is a flowchart of a financial entity identification method provided in Embodiment 1 of the present invention. This embodiment is applicable to the accurate identification of financial entities in financial scenarios. The method can be executed by a financial entity identification device, which can be implemented in hardware and / or software and can be configured in an electronic device. Figure 1 As shown, the method includes: S110. In response to the financial entity identification request, the request is parsed to obtain the financial input text, the financial identification scenario identifier, and the fault-tolerant matching identifier.
[0016] S120. Call the pre-generated standard name matcher and alias matcher to perform name matching on the financial input text and generate the first hit set.
[0017] S130. If the first hit set is an empty set, and the fault-tolerant matching is triggered according to the fault-tolerant matching identifier, then the financial input text is subjected to fault-tolerant matching based on the pre-generated fault-tolerant matcher to generate the second hit set.
[0018] S140. Determine the target hit set based on the first hit set and the second hit set.
[0019] S150. Based on the financial identification scene identifier, perform financial entity identification on the target hit set and generate target financial entity identification results.
[0020] S160. Feed back the target financial entity identification result to the requesting caller that initiated the financial entity identification request.
[0021] It should be noted that three types of matchers are required in the real-time financial entity identification phase: standard name matcher, alias matcher, and fault-tolerant matcher. Therefore, these three types of matchers need to be constructed before performing real-time financial entity identification.
[0022] In an optional embodiment, before parsing the financial entity identification request in response to the financial entity identification request to obtain the financial input text, financial identification scenario identifier, and fault-tolerant matching identifier, a standard name matcher, an alias matcher, and a fault-tolerant matcher are constructed. The specific execution process is as follows: Step a1: Call the financial standard entity source to obtain the standard financial entity set; the standard financial entity set includes several standard financial entities; the standard financial entity contains initial entity attribute information such as entity identifier, entity code and entity standard name.
[0023] The financial standard entity source can be a remote standard entity source, specifically a service interface for a remote market data target list. A set of standard financial entities can be retrieved by sending a request to this service interface. The set of standard financial entities includes several standard financial entities, containing entity identifiers, entity codes, and entity standard names.
[0024] An entity identifier can be written as "market", specifically a financial market identifier, such as SH (Shanghai Stock Exchange), SZ (Shenzhen Stock Exchange), HK (Hong Kong Stock Exchange), US (US Stock Exchange), etc.; an entity code can be written as "symbol", specifically a security code; an entity standard name can be written as "standard_name", that is, the entity's own standard name, such as "sector" or "index".
[0025] Optionally, if a call to the standard financial entity set fails during the process of retrieving the standard financial entity set from the standard financial source, the system can automatically degrade to reading from the cached source. Degradation trigger conditions may include: network connection timeout, abnormal request status code, returned data failing to parse into a structured format, or the total number of returned entities being 0 or lower than the historical baseline. The cached source can be Redis, and can be a data source that stores the standard financial entity set as a key-value pair in serialized byte stream format.
[0026] For each standard financial entity in the set of standard financial entities, its initial entity information can be a triple of [entity identifier (market), entity code (symbol), entity standard name (standard_name)].
[0027] Step a2: Based on the entity identifier, obtain the entity alias, the first letter of the entity's pinyin, and the entity's third-party name corresponding to each standard financial entity.
[0028] Specifically, based on the entity identifier, the entity alias, the initials of the entity's pinyin, and the entity's third-party name can be retrieved from a structured relational database. The relational database stores tables for aliases, initials of pinyin, and third-party names, categorized by entity identifier.
[0029] The alias table contains fields such as (symbol, alias_name), storing common abbreviations and market nicknames for entities. "alias_name" represents the alias, and "symbol" represents the entity identifier. The pinyin initial letter table contains fields such as (symbol, initial_str), storing the initial letter string of the entity's standard pinyin name. "initial_str" represents the initial letter of the pinyin. The third-party name table contains fields such as (symbol, third_name), storing alternative names for third-party consulting platforms and market data software. For example, the third-party names for "CATL" could be "Ningshidai," "Ningde," and "Ningwang," etc.; "third_name" represents the third-party name.
[0030] For example, by traversing the alias table, the initial letter of the pinyin, and the third-party name table in the relational database based on the entity identifier, the entity alias, the initial letter of the pinyin, and the third-party name corresponding to each standard financial entity can be obtained.
[0031] Step a3: Using the entity alias, the first letter of the entity's pinyin, and the entity's third-party name corresponding to the standard financial entity, update the entity attribute information of the corresponding standard financial entity to obtain the target entity attribute information of the standard financial entity.
[0032] Specifically, for each standard financial entity, its corresponding entity identifier, entity code, standard entity name, entity alias, initials of the entity's pinyin, and third-party entity name can be used as target entity attribute information. The target entity attribute information for a standard financial entity can be denoted as {entity identifier (market), entity code (symbol), standard entity name (standard_name), alias (alias), initials of the entity's pinyin (initial_str), third-party entity name (third_name)}. Furthermore, (market, symbol) can be used as a combined unique key to associate the entity alias, initials of the entity's pinyin, and third-party entity name with the corresponding standard financial entity.
[0033] Optionally, to avoid redundancy in the generation of standard financial entities, deduplication can be performed on standard financial entities. When multiple records exist for the same (market, symbol), entries with non-empty entity aliases can be retained first; if all records contain entity aliases, entries with complete standard name fields and more comprehensive attributes can be retained. At the same time, invalid entities and test target entities in the preset blacklist are deleted.
[0034] Step a41: For any standard financial entity, generate the first matching key of the standard financial entity based on the entity standard name, entity code and entity identifier in the entity attribute information of the standard financial entity, and construct a standard name matcher based on the first matching key of each standard financial entity; the tag type of each first matching key in the standard name matcher is standard type.
[0035] For each standard financial entity, a first matching key is generated and inserted into the matcher to obtain a multi-pattern standard name matcher containing mutually independent matching keys.
[0036] Specifically, for any standard financial entity, its entity identifier and entity code are combined to obtain a composite key, such as "HK700". Equivalent keys are obtained by adding zeros to the entity code; for example, entity code "700" is equivalent to both "0700" and "00700", thus requiring at least one equivalent key. The entity standard name, entity code, the composite key of entity code and entity identifier, and the equivalent key are all used as the first matching key for that standard financial entity. A first matching key is generated for each standard financial entity and inserted into the matcher to obtain the standard name matcher. All first matching keys in the standard name matcher correspond to a standard type tag, which can be denoted as "standard".
[0037] Step a42: For any standard financial entity, generate a second matching key for the standard financial entity based on the entity alias and entity third-party name in the entity attribute information of the standard financial entity, and construct an alias matcher based on the second matching key of each standard financial entity; the tag type of each second matching key in the alias matcher is the alias type.
[0038] A second matching key is generated for each standard financial entity and inserted into the matcher to obtain a multi-pattern alias matcher containing mutually independent matching keys.
[0039] Specifically, for any standard financial entity, its corresponding entity aliases and third-party entity names are de-tagged with variants. For example, for names with suffixes such as "delisting" or "exit," variant keys with the suffix removed are generated. All entity aliases and third-party entity names of the standard financial entity, as well as the variant keys with the suffix removed, are used as the second matching keys for the standard financial entity. Second matching keys are generated for each standard financial entity and inserted into the matcher to obtain the alias matcher. The tag type corresponding to all second matching keys in the alias matcher is the alias type, which can be denoted as "alias".
[0040] Step a43: For any standard financial entity, generate a third matching key for the standard financial entity based on the entity standard name, the first letter of the entity's pinyin, and the entity code in the entity attribute information of the standard financial entity, and construct a fault-tolerant matcher based on the third matching key of each standard financial entity; the tag type of each third matching key in the fault-tolerant matcher is the fault-tolerant type.
[0041] The third matching key can include three types of keys: the first letter of the pinyin, the character insertion key, and the full pinyin syllable key. The triggering conditions for the three types of keys are different. When the triggering conditions of the corresponding key are met, the corresponding key is generated; when the triggering conditions of the corresponding key are not met, the corresponding key is not generated.
[0042] In an optional embodiment, for any standard financial entity, a third matching key is generated based on the entity's standard name, the first letter of its pinyin, and its code from its entity attribute information, including: For any standard financial entity, if the entity's standard name determines that the initial letter of the pinyin key trigger condition is met, then based on the initial letter of the entity's pinyin, all initial letter combinations are enumerated and Cartesian products are performed to generate the initial letter key of the pinyin for the standard financial entity; based on the entity code of the standard financial entity, a character insertion key for the standard financial entity is generated; if the entity's standard name determines that the full syllable key trigger condition is met, then based on the entity's standard name, all pinyin pronunciations are enumerated and Cartesian products are performed to generate the full syllable key of the standard financial entity; and a third matching key, including the initial letter key, character insertion key, and full syllable key, is generated for the standard financial entity.
[0043] For the pinyin initial key, its trigger condition may be that the number of Chinese characters contained in the standard entity name is not less than a preset Chinese character count threshold, such as 3. For example, if the number of Chinese characters contained in the standard entity name of a standard financial entity is not less than 3, the pinyin initial letter trigger condition is satisfied; if the number of Chinese characters contained in the standard entity name of a standard financial entity is less than 3, the pinyin initial letter trigger condition is not satisfied. When the pinyin initial letter trigger condition is not satisfied, the pinyin initial key of the standard financial entity may not be generated. If the pinyin initial letter trigger condition is satisfied, the pinyin initial letter of each Chinese character in the standard entity name is extracted and converted into an uppercase format. Polyphonic characters among the extracted pinyin initial letters are enumerated, all letter combinations are enumerated and a Cartesian product is performed, and an independent key is generated for each combination as the pinyin initial key. For example, the standard entity name is "Changjiang Dianli", where "Chang" is a polyphonic character with pronunciations "chang" and "zhang", so the obtained initial letter combinations include "CJDL" and "ZJDL".
[0044] For the character insertion key, the length n of the string s corresponding to the entity code of the standard financial entity is determined. For the i-th position (0≤i≤n) of the string of the entity code, the character insertion key is generated as: s[0:i]+s[i]+s[i:n], that is, a character identical to the original character is inserted at the i-th position, so as to tolerate the input error that the user types one more repeated character. For example, the entity code "0700" can generate the character insertion keys "07700" and "07000".
[0045] For the full pinyin syllable key, its corresponding trigger condition may be that the standard entity name contains Chinese characters. If the standard entity name contains Chinese characters, the full pinyin syllable key trigger condition is satisfied; if the standard entity name does not contain Chinese characters, the full pinyin syllable key trigger condition is not satisfied. When the full pinyin syllable key trigger condition is not satisfied, the full pinyin syllable key of the standard financial entity may not be generated; if the full pinyin syllable key trigger condition is satisfied, for each Chinese character in the standard entity name, all its pinyin pronunciations are enumerated, and a Cartesian product is performed on the pronunciations of all Chinese characters to obtain all pronunciation combinations; the pinyin of Chinese characters in each combination is separated by a space. Optionally, a space may also be added at the start and end of the string respectively to form the final full pinyin syllable key. If there is a polyphonic character, a corresponding number of full pinyin syllable keys are generated. For example, for "Changjiang Dianli", the corresponding pronunciation combinations include "chang jiang dian li" and "zhang jiang dian li".
[0046] Generate a third matching key for each standard financial entity, including the initial letter of the pinyin, the character insertion key, and the full pinyin syllable key. For each standard financial entity, generate three types of error-tolerant keys: the initial letter of the pinyin, the character insertion key, and the full pinyin polyphonic character key. The combined generation of these three types of error-tolerant keys allows the same entity to be matched by various user input errors, broadening the error tolerance range and further improving the error tolerance rate. Construct an error-tolerant matcher based on the third matching keys of each standard financial entity. The tag type corresponding to all third matching keys in the error-tolerant matcher is the error tolerance type, which can be denoted as "correct".
[0047] The three types of matchers mentioned above—standard name matcher, alias matcher, and fault-tolerant matcher—can employ Aho-Corasick automata. Alternatively, any multi-pattern matching data structure can be used, such as prefix trees, double-array Trie, and regular automata. This embodiment does not impose any restrictions on this.
[0048] The three types of matchers mentioned above are instantiated to obtain the instantiated standard name matcher Ms, alias matcher Ma, and fault-tolerant matcher Mc, which are stored in memory for loading during subsequent calls.
[0049] During the real-time request phase of financial entity identification, requests initiated by external callers can be acquired in real time. Upon receiving a request, it is parsed to obtain the financial input text, the financial identification scenario identifier, and the fault-tolerance matching identifier. The financial input text can be the text to be identified as the financial entity. The financial identification scenario identifier represents different identification scenarios; for example, a "0" identifier indicates a stock analysis scenario, while a "1" identifier indicates a consultation scenario. The fault-tolerance matching identifier indicates whether fault-tolerance matching is enabled. If the identifier is "correct=True", fault-tolerance matching is triggered; if it is "correct=False", fault-tolerance matching is not triggered.
[0050] Optionally, to further eliminate the interference of format differences in financial input text on subsequent matching, and to avoid abnormal recognition of English abbreviations, the financial input text can be preprocessed. Specifically, all English letters in the financial input text are converted to uppercase to match the case of the matching key in the subsequent matcher. Each character in the financial input text is iterated, and if the Unicode encoding of the character is within the full-width range, it is converted to the corresponding half-width character. Independently appearing Roman numerals are unified to Unicode Roman characters to avoid incorrect conversion of letters in English abbreviations; specifically, a positive expression negative assertion matching can be used to perform the replacement only when neither the left nor right side of the Roman numeral is an English letter or number.
[0051] The pre-generated standard name matcher and alias matcher are invoked to perform name matching on the preprocessed financial input text, generating a first hit set. In an optional embodiment, invoking the pre-generated standard name matcher and alias matcher to perform name matching on the financial input text and generate a first hit set includes: invoking the pre-generated standard name matcher to perform standard name matching on the financial input text to obtain a standard name hit text set; and invoking the pre-generated alias matcher to perform alias matching on the financial input text to obtain an alias hit text set; and generating the first hit set based on the standard name hit set and the alias hit text set.
[0052] The standard name matcher is invoked to perform multi-pattern matching on the financial input text based on its first matching key, resulting in a set of standard name hit texts. The hit format for each hit tuple in the standard name hit text set can be (entity, start, end, match_type). Here, "entity" represents the matched entity standard name; "start" represents the index of the first character in the financial input text where the matched character is located; "end" represents the index of the next character in the financial input text where the matched character is located; and "match_type" represents the tag type of the matching key, where match_type ∈ {standard (standard type), alias (alias type), correct (correct type)}.
[0053] This is described with a specific scenario case. Assume the processed financial input text T_norm is "宁德时代和300750哪个适合加仓". Index the financial input text T_norm character by character starting from 0, then the subscript index corresponding to "宁" is "0", and by analogy, the subscript index corresponding to the last character "仓" is "16". The standard name matcher is called to perform matching based on the first matching key, and the first matching key includes "宁德时代", "300750" and "SZ300750", so two hits can be obtained. The first matching key "宁德时代" matches and hits "宁德时代", and the first matching key "300750" also matches and hits "宁德时代". Wherein, "宁德时代" corresponds to T_norm[0:4), and "300750" corresponds to T_norm[5:11). The match_type corresponding to both is "standard". Therefore, the hit tuples corresponding to "宁德时代" are (entity="宁德时代", start=0, end=4, match_type="standard") and (entity="宁德时代", start=5, end=11, match_type="standard"). The corresponding standard name hit text set H1 is {(entity="宁德时代", start=0, end=4, match_type="standard"), (entity="宁德时代", start=5, end=11, match_type="standard")}.
[0054] The alias matcher is called to perform multi-pattern matching on the financial input text based on its own second matching key, so as to obtain an alias hit text set. The hit format of each hit tuple in the alias hit text set is also (entity, start, end, match_type).
[0055] Continuing with the above scenario case, the second matching key of the alias matcher includes "宁德", which hits "宁德" in the financial input text T_Norm, corresponding to T_Norm[0:2). The standard financial entity hit by the second matching key "宁德" is "宁德时代", so the corresponding hit tuple is (entity="宁德时代", start=0, end=2, match_type="alias"). The alias hit text set H2 is {(entity="宁德时代", start=0, end=2, match_type="alias")}.
[0056] Merging the standard name hit set H1 and the alias hit set H2 yields the first hit set H = H1∪H2. Continuing the previous example, the first hit set is {entity="CATL", start=0, end=4, match_type="standard"), entity="CATL", start=5, end=11, match_type="standard"), (entity="CATL", start=0, end=2, match_type="alias")}.
[0057] If the first hit set is empty, and fault-tolerant matching is triggered based on the fault-tolerant matching flag (correct=True), then the financial input text is subjected to fault-tolerant matching based on the pre-generated fault-tolerant matcher to generate a second hit set. In an optional embodiment, if the first hit set is empty, and fault-tolerant matching is not triggered based on the fault-tolerant matching flag (correct=False), then the target financial entity identification result is determined to be an empty set; if the first hit set is not empty, then the first hit set is determined as the target hit set.
[0058] Furthermore, if the first hit set is empty and fault-tolerant matching is triggered based on the fault-tolerant matching identifier, in an optional embodiment, fault-tolerant matching is performed on the financial input text based on a pre-generated fault-tolerant matcher to generate a second hit set, including: Step b1: Determine the text length corresponding to the financial input text.
[0059] The text length n = len(T_norm).
[0060] Step b21: If the text length is not greater than the preset text length threshold, then the financial input text is processed by the pre-configured short text processing mode to generate a first set of pinyin sequences; the first set of pinyin sequences contains at least one pinyin sequence.
[0061] The text length threshold can be preset by relevant technical personnel according to actual needs; let's assume the text length threshold is denoted as L0. The goal of the short text processing mode is to ensure the coverage rate of polyphonic characters.
[0062] Specifically, if the text length n≤L0, each character in the financial input text is traversed, all Pinyin pronunciations are enumerated for Chinese characters, and non-Chinese characters such as numbers and letters are retained as original characters, so as to form a pronunciation list at each character position. A Cartesian product is performed on the pronunciation lists of all positions to obtain all Pinyin combinations; in each Pinyin combination, a space is used for separation between the character Pinyin and the original character, and a space is added at each of the start and end positions to form a Pinyin sequence string, finally obtaining a first Pinyin sequence set containing at least one Pinyin sequence.
[0063] In a specific case scenario, taking the financial input text "Ningde Times how is it" as an example, the Chinese character "宁" with the subscript "0" is a polyphonic character, and the pronunciation list thereof is [ning1, ning2]. The Chinese character "德" with the subscript "1" is a polyphonic character, and the pronunciation list thereof is [de, dei, di]. The characters corresponding to the remaining subscripts are all single-pronunciation characters. At least one Pinyin sequence can be generated based on the above Cartesian product combination generation manner, and one example of the Pinyin sequence is "ning de shi dai zen me yang". Therefore, the first Pinyin sequence set Pyset1 is {"ning de shi dai zen me yang", ... other Pinyin sequences}.
[0064] Step b22: If the text length is greater than a preset text length threshold, a pre-configured long text processing mode is adopted to perform text character Pinyin processing on the financial input text, so as to generate a second Pinyin sequence set; the second Pinyin sequence set has and only has one Pinyin sequence.
[0065] The goal of the long text processing mode is to avoid combinatorial explosion and ensure real-time performance. Specifically, if the text length n>L0, each character in the financial input text is traversed, only the most commonly used pronunciation is taken for each Chinese character, and non-Chinese characters are retained as original characters; all Pinyin and original characters are connected with spaces, and spaces are added at the start and end positions to generate a unique Pinyin sequence string, so as to obtain the second Pinyin sequence set which has and only has one Pinyin sequence. Exemplarily, continuing the above example, the second Pinyin sequence set Pyset2 is {"ning de shi dai zen me yang"}.
[0066] The above switching between polyphonic character Cartesian product expansion and single-Pinyin separated sequence based on the text length threshold not only covers polyphonic character fault tolerance for short texts, but also avoids combinatorial explosion for long texts, ensuring real-time performance.
[0067] Step b3: A fault-tolerant matcher is invoked to perform fault-tolerant matching on the financial input text to generate an original text domain hit set, and the fault-tolerant matcher is invoked to perform fault-tolerant matching on the first Pinyin sequence set or the second Pinyin sequence set to generate a Pinyin domain hit set.
[0068] Specifically, the fault-tolerant matcher is invoked to perform fault-tolerant matching on the financial input text based on the third matching key, specifically screening character repetitions and Chinese character typos in the financial input text based on the pinyin initial key, character insertion key and full pinyin syllable key. Continuing with the financial input text "Ningde Times how is it" in the previous example, the screened original text domain hit set is an empty set. The fault-tolerant matcher is invoked to perform fault-tolerant matching on the first pinyin sequence set or the second pinyin sequence set to generate a pinyin domain hit set. Screening is performed in the same manner. For example, if the first pinyin sequence set or the second pinyin sequence set is "ning de shidai zen me yang", the entity "Ningde Times" is hit based on the full pinyin syllable key "ning de shi dai" built in the fault-tolerant matcher, the corresponding start position is marked as 0, and the end position is marked as 16, then the generated pinyin domain hit set is {(entity="Ningde Times", start=0, end=16, match_type="correct")}. Here, since it is a fault-tolerant matcher, the tag type corresponding to the third matching key of the fault-tolerant matcher is the "correct (fault-tolerant)" type.
[0069] Step b4: Generate a second hit set according to the original text domain hit set and the pinyin domain hit set.
[0070] The hit tuples in the original text domain hit set and the pinyin domain hit set are merged to obtain the second hit set.
[0071] Optionally, to avoid losing the original text positioning due to pinyin fault-tolerant hits, the pinyin domain hit position can be accurately inversely calculated as the original text domain character interval by counting separators. The financial input text is recorded as original text characters, the first pinyin sequence and the second pinyin sequence are recorded as pinyin sequences, each original text character in the pinyin sequence corresponds to a pinyin segment, and the pinyin segments are separated by 1 space; the k-th space corresponds to the right boundary of the k-th character in the original text, and the position in the original text can be mapped by counting the number of spaces.
[0072] Perform separate calculation on each hit tuple in the pinyin field hit set, obtain the hit start offset py_start, intercept the pinyin string prefix py_str[0:py_start], count the number of spaces therein, and record it as cnt_start, which is the original text start index start; obtain the hit end offset py_end, intercept the pinyin string prefix py_str[0:py_end], count the number of spaces therein, and record it as cnt_end, where the original text end index end = cnt_end. Perform boundary check, that is, ensure 0 ≤ start < end ≤ len(T_norm), so as to filter out abnormal hits. Convert the pinyin field hits into original text field hit tuples (entity, start, end, type="correct"). Merge the original text field hits and the converted pinyin field hits to obtain a second hit set H2.
[0073] In the above process of reverse calculating the position from the pinyin field to the original text field, the hit position in the pinyin field is accurately reverse calculated into the character interval in the original text field by counting separators, which avoids the loss of original text positioning due to pinyin fault-tolerant hits.
[0074] If the first hit set is an empty set, and it is determined that fault-tolerant matching is triggered according to the fault-tolerant matching identifier, merge the first hit set and the second hit set to obtain a target hit set; if the first hit set is a non-empty set, determine the first hit set as the target hit set.
[0075] Perform financial entity recognition on the target hit set based on the financial recognition scene identifier to generate a target financial entity recognition result. The financial recognition scene identifier can be used to represent different recognition scenarios. For example, when the financial recognition scene identifier is "0", it indicates a stock diagnosis scenario, and when the financial recognition scene identifier is "1", it indicates a consultation scenario.
[0076] In an optional embodiment, performing financial entity recognition on the target hit set based on the financial recognition scene identifier to generate a target financial entity recognition result includes: Step c1: Perform deduplication processing on the entity elements in the target hit set to obtain a deduplicated entity set.
[0077] Construct a dictionary with (market, symbol) as the key, and iterate through all hit tuples in the target hit set: If the key does not exist, write it directly to the termination point; if the key already exists and the tag type of an existing hit tuple entry is "standard", retain the existing hit tuple entry and skip the current hit; if the key already exists and the tag type of both existing and current hit tuple entries is not "standard", retain the higher-priority hit tuple entry. If the key already exists and the tag types of both existing and current hit tuple entries are not "standard", then the tag type priority "alias" is greater than "correct", retain the higher-priority hit tuple entry, and obtain the deduplicated entity set.
[0078] Step c2: Determine the entity recognition mode based on the financial recognition scenario identifier.
[0079] Specifically, if the financial identification scenario identifier is "0", then the entity identification mode is the stock diagnosis scenario mode, which requires strict disambiguation and is suitable for user questions; when the financial identification scenario identifier is "1", then the entity identification mode is the consultation scenario mode, which requires relaxed disambiguation and is suitable for long text tags.
[0080] Step c3: Based on the entity recognition pattern, perform financial entity recognition on the deduplicated entity set to generate the target financial entity recognition result.
[0081] Specifically, if the entity recognition mode is a stock diagnosis scenario, then for hits in the deduplicated entity set where the start and end points of the hit tuples are exactly the same, only tuple entries with the tag type "standard" are retained. All hit tuples are sorted in descending order of length, and for each long hit, all short hits completely contained within it are removed. The remaining hit tuples are then sorted in descending order of length and ascending order of start point. The initial result list is empty; if the current hit does not overlap with any hit tuple entry in the list, it is added; if they overlap, they are skipped. When lengths are the same, hits with a start point further to the left are retained first, thus obtaining the target financial entity recognition result. In a specific scenario embodiment, if the deduplicated entity set... In this case, the interval eA is [8, 12), and the interval eB is [12, 18). The endpoint of eA is 12, and the starting point of eB is 12. Since they have no inclusion relationship, all of them are retained. During the overlap judgment process, if the two intervals are connected end to end, there is no overlap, and there is no need to remove the shorter interval.
[0082] If the entity recognition mode is the information scene mode, only inclusion relationship disambiguation is performed, sorting by length in descending order, and removing short hits that are completely contained by a longer interval; all overlapping hits without inclusion relationships are retained to ensure the recall rate of information entities. For example, if e1 is contained by e2, then e1 is deleted; if e3 is contained by e4, then e3 is deleted. Overlapping interval filtering is not performed, and all remaining intervals are retained. If intervals overlap but do not contain each other, all intervals are retained without overlap removal to ensure full information recall. It can be understood that the characteristic of the information scene mode is that it only deletes short entity fragments that are completely contained within each other; as long as complete containment is not satisfied, even if intervals overlap, all are output, thus adapting to the multi-entity annotation requirements of information tags.
[0083] The aforementioned technical solutions are adapted to both strict stock diagnosis scenarios and relaxed information scenarios, reducing ambiguity and false disambiguation. The target financial entity identification result is fed back to the requesting party that initiated the financial entity identification request.
[0084] To prevent data pollution, hot updates can be performed on various matchers, with timed hot updates featuring guardrails. The guardrail threshold N0 can be set to 1000. In an optional embodiment, a timed trigger can be implemented, i.e., a background thread starts the update process at a preset time each day, such as 01:30 AM. The generation processes for the standard name matcher, alias matcher, and fault-tolerant matcher are re-executed to generate a new unified entity set E' and new matcher instances, denoted as Ms', Ma', and Mc', respectively. The size of the new entity set is calculated. ,like If the data source is found to be abnormal, such as returning an empty value or losing data, the update will be abandoned and an alarm will be triggered, while the original matcher will be retained.
[0085] If the verification passes If the global service variable references to the matcher are assigned to the new instance in one go, this is an atomic pointer assignment. New requests directly use the new matcher, while requests in transit continue to use the old instance. The old instance is recycled after the request is processed, achieving zero service interruption. When updating the cache, a distributed lock is first acquired. The process that acquires the lock executes the write and sets an expiration time, such as 3600 seconds. If the lock is not acquired, the process skips the write, avoiding concurrent write conflicts between multiple replicas. When a cache read misses, a back-to-origin request is triggered and the cache is asynchronously filled, outputting the updated in-memory matcher instance. During this process, the service remains uninterrupted.
[0086] The technical solution of this invention parses the financial entity identification request to obtain the financial input text, the financial identification scenario identifier, and the fault-tolerant matching identifier. It then calls a pre-generated standard name matcher and alias matcher to perform name matching on the financial input text, generating a first hit set. If the first hit set is empty, and fault-tolerant matching is triggered based on the fault-tolerant matching identifier, then fault-tolerant matching is performed on the financial input text based on the pre-generated fault-tolerant matcher, generating a second hit set. A target hit set is determined based on the first and second hit sets. Based on the financial identification scenario identifier, financial entity identification is performed on the target hit set, generating the target financial entity identification result. This technical solution achieves real-time identification of financial entities in financial scenarios. By matching the financial input text using multiple types of matchers, it improves the fault-tolerant hit accuracy. The introduction of financial identification scenarios enables cross-scenario disambiguation, further enhancing the accuracy of financial entity identification in financial scenarios.
[0087] Figure 2 This is a schematic diagram of the process structure of a financial entity identification method provided in an embodiment of the present invention. Based on the above embodiments, this embodiment provides a preferred example.
[0088] like Figure 2 As shown, the method includes the following steps: S1. Call the service interface of the remote market data list to obtain the standard financial entity set.
[0089] The standard financial entity set includes several standard financial entities; each standard financial entity contains initial entity attribute information including entity identifier "market", entity code "symbol", and entity standard name "standard_name".
[0090] S2. Based on the entity identifier, obtain the entity alias, the first letter of the entity's pinyin, and the entity's third-party name corresponding to each standard financial entity.
[0091] S3. Using the entity alias, the first letter of the entity's pinyin, and the entity's third-party name corresponding to the standard financial entity, update the entity attribute information of the corresponding standard financial entity to obtain the target entity attribute information of the standard financial entity.
[0092] S4A. For any standard financial entity, generate the first matching key for that standard financial entity based on the entity standard name, entity code, and entity identifier in the entity attribute information of that standard financial entity, and construct a standard name matcher based on the first matching key of each standard financial entity.
[0093] In the standard name matcher, the tag type of each first matching key is a standard type.
[0094] S4B. For any standard financial entity, generate a second matching key for the standard financial entity based on the entity alias and entity third-party name in the entity attribute information of the standard financial entity, and construct an alias matcher based on the second matching key of each standard financial entity.
[0095] In the alias matcher, the tag type of each second matching key is the alias type.
[0096] S4C: For any standard financial entity, generate a third matching key for that standard financial entity based on the entity standard name, the first letter of the entity's pinyin, and the entity code in the entity attribute information, and construct a fault-tolerant matcher based on the third matching key of each standard financial entity.
[0097] In the fault-tolerant matcher, the tag type of each third matching key is the fault-tolerant type.
[0098] Specifically, for any standard financial entity, if the entity's standard name determines that the initial letter of the pinyin key trigger condition is met, then based on the initial letter of the entity's pinyin, all initial letter combinations are enumerated and Cartesian products are performed to generate the initial letter key of the pinyin for the standard financial entity; based on the entity code of the standard financial entity, a character insertion key for the standard financial entity is generated; if the entity's standard name determines that the full pinyin syllable key trigger condition is met, then based on the entity's standard name, all pinyin pronunciations are enumerated and Cartesian products are performed to generate the full pinyin syllable key for the standard financial entity; and a third matching key corresponding to the standard financial entity, including the initial letter key of the pinyin, the character insertion key, and the full pinyin syllable key, is generated.
[0099] S5. In response to the financial entity identification request, the request is parsed to obtain the financial input text, the financial identification scenario identifier, and the fault-tolerant matching identifier.
[0100] S6A: Call the standard name matcher to perform standard name matching on the financial input text to obtain the set of standard name matching texts.
[0101] S6B: Call the alias matcher to perform alias matching on the financial input text and obtain the set of alias-matched texts.
[0102] S7. Generate a first hit set that includes the standard name hit set and the alias hit text set.
[0103] S8. Determine if the first hit set is empty; if yes, execute S9; if no, execute S10.
[0104] S9. Determine whether the fault tolerance matching flag is enabled. If yes, execute S11-S15; otherwise, execute S16.
[0105] S10. Determine the first hit set as the target hit set.
[0106] S11. Determine the text length corresponding to the financial input text.
[0107] S12A. If the text length is not greater than the text length threshold L0, then the pre-configured short text processing mode is used to process the financial input text using pinyin, generating the first pinyin sequence set.
[0108] The first set of pinyin sequences contains at least one pinyin sequence.
[0109] S12B. If the text length is greater than the preset text length threshold, the pre-configured long text processing mode is used to process the financial input text using pinyin, generating a second pinyin sequence set.
[0110] Among them, the second set of pinyin sequences contains one and only one pinyin sequence.
[0111] S13A: Call the fault-tolerant matcher to perform fault-tolerant matching on the financial input text and generate the original text domain hit set.
[0112] S13B: Call the fault-tolerant matcher to perform fault-tolerant matching on the first set of pinyin sequences or the second set of pinyin sequences, and generate a pinyin domain hit set.
[0113] S14. Generate a second hit set based on the original text domain hit set and the pinyin domain hit set.
[0114] S15. Generate a target hit set that includes the first hit set and the second hit set.
[0115] S16. The target financial entity identification result is determined to be an empty set.
[0116] S17. Perform deduplication on the entity elements in the target hit set to obtain a deduplicated entity set.
[0117] S18. Determine the entity recognition mode based on the financial identification scenario identifier; the entity recognition mode includes the stock diagnosis scenario mode and the information scenario mode.
[0118] S19. Based on the corresponding entity recognition pattern, perform financial entity recognition on the deduplicated entity set and generate the target financial entity recognition result.
[0119] S20. Feed back the target financial entity identification result to the requesting party that initiated the financial entity identification request.
[0120] In the above technical solution, the construction phase obtains a unified entity set from data source fusion, and constructs three parallel matchers: a standard name matcher, an alias matcher, and a fault-tolerant matcher. Among them, the fault-tolerant matcher pre-generates three types of fault-tolerant keys for each entity: the initial letter key of the pinyin, the character insertion key, and the full pinyin polyphonic character key. In the online recognition phase, the input text is first normalized by context constraints, and then standard name matching and alias matching are performed sequentially. Fault-tolerant matching is triggered only when neither of the first two matches is found and fault tolerance is enabled. Fault-tolerant matching adaptively selects the pinyin expansion method according to the text length to control the combination explosion, and after the pinyin field is matched, the original text position is calculated by counting the delimiters. Finally, deduplication and disambiguation are performed in dual mode to output the results.
[0121] A hot update phase can be added later, where the three-level matcher is rebuilt at a preset time, and the matcher instance currently providing services in memory is replaced only when the number of new entities meets the guardrail threshold, so as to complete the update without interrupting online identification.
[0122] Figure 3 This is a schematic diagram of a financial entity identification device provided in an embodiment of the present invention. The financial entity identification device provided in this embodiment of the present invention is applicable to situations requiring accurate identification of financial entities in financial scenarios. This financial entity identification device can be implemented in hardware and / or software, such as… Figure 3 As shown, the device includes: a request parsing module 301, a naming matching module 302, a fault-tolerant matching module 303, a target set generation module 304, an entity recognition module 305, and a recognition result feedback module 306. Among them, The request parsing module 301 is used to respond to the financial entity identification request, parse the financial entity identification request, and obtain the financial input text, the financial identification scenario identifier, and the fault-tolerant matching identifier. The naming matching module 302 is used to call the pre-generated standard name matcher and alias matcher to perform name matching on the financial input text and generate a first hit set. The fault-tolerant matching module 303 is used to perform fault-tolerant matching on the financial input text based on the pre-generated fault-tolerant matcher if the first hit set is an empty set and fault-tolerant matching is triggered according to the fault-tolerant matching identifier, thereby generating a second hit set. The target set generation module 304 is used to determine the target hit set based on the first hit set and the second hit set; Entity recognition module 305 is used to perform financial entity recognition on the target hit set based on the financial recognition scenario identifier, and generate target financial entity recognition results; The identification result feedback module 306 is used to feed back the identification result of the target financial entity to the requesting caller that initiated the identification request of the financial entity.
[0123] The technical solution of this invention parses the financial entity identification request to obtain the financial input text, the financial identification scenario identifier, and the fault-tolerant matching identifier. It then calls a pre-generated standard name matcher and alias matcher to perform name matching on the financial input text, generating a first hit set. If the first hit set is empty, and fault-tolerant matching is triggered based on the fault-tolerant matching identifier, then fault-tolerant matching is performed on the financial input text based on the pre-generated fault-tolerant matcher, generating a second hit set. A target hit set is determined based on the first and second hit sets. Based on the financial identification scenario identifier, financial entity identification is performed on the target hit set, generating the target financial entity identification result. This technical solution achieves real-time identification of financial entities in financial scenarios. By matching the financial input text using multiple types of matchers, it improves the fault-tolerant hit accuracy. The introduction of financial identification scenarios enables cross-scenario disambiguation, further enhancing the accuracy of financial entity identification in financial scenarios.
[0124] Optionally, the device further includes: The entity set acquisition module is used to retrieve a standard financial entity set by calling the financial standard entity source before responding to the financial entity identification request, parsing the financial entity identification request, and obtaining the financial input text, financial identification scenario identifier, and fault-tolerant matching identifier; the standard financial entity set includes several standard financial entities; the standard financial entity contains initial entity attribute information including entity identifier, entity code, and entity standard name; The entity information acquisition module is used to acquire, based on the entity identifier, the entity alias, the first letter of the entity's pinyin, and the entity third-party name corresponding to each of the standard financial entities. The entity information update module is used to update the entity attribute information of the corresponding standard financial entity by using the entity alias, the first letter of the entity's pinyin, and the entity's third-party name, so as to obtain the target entity attribute information of the standard financial entity. The standard name matcher construction module is used to generate a first matching key for any standard financial entity based on the entity standard name, entity code, and entity identifier in the entity attribute information of the standard financial entity, and to construct a standard name matcher based on the first matching key of each standard financial entity; the tag type of each first matching key in the standard name matcher is a standard type. The alias matcher construction module is used to generate a second matching key for any standard financial entity based on the entity alias and entity third-party name in the entity attribute information of the standard financial entity, and to construct an alias matcher based on the second matching key of each standard financial entity; the tag type of each second matching key in the alias matcher is an alias type; The fault-tolerant matcher construction module is used to generate a third matching key for any standard financial entity based on the entity standard name, the first letter of the entity's pinyin, and the entity code in the entity attribute information of the standard financial entity, and to construct a fault-tolerant matcher based on the third matching key of each standard financial entity; the tag type of each third matching key in the fault-tolerant matcher is a fault-tolerant type.
[0125] Optional, fault-tolerant matcher building blocks, specifically used for: For any standard financial entity, if the standard name of the entity determines that the trigger condition of the first letter of the pinyin is met, then based on the first letter of the entity's pinyin, all combinations of first letters are enumerated and Cartesian products are performed to generate the first letter of the pinyin of the standard financial entity. Generate the character insertion key for the standard financial entity based on its entity code; If the trigger condition for the full syllable key is determined based on the entity standard name of the standard financial entity, then all the pinyin pronunciations are enumerated and Cartesian products are performed based on the entity standard name of the standard financial entity to generate the full syllable key of the standard financial entity. The third matching key corresponding to the standard financial entity includes the first letter of the pinyin, the character insertion key, and the full pinyin syllable key.
[0126] Optional, the naming matching module 302 is specifically used for: The pre-generated standard name matcher is invoked to perform standard name matching on the financial input text, resulting in a set of standard name-matched texts; and, The pre-generated alias matcher is invoked to perform alias matching on the financial input text, resulting in a set of alias-matched texts. A first hit set is generated based on the standard name hit set and the alias hit text set.
[0127] Optional, fault-tolerant matching module 303, specifically used for: Determine the text length corresponding to the financial input text; If the text length is not greater than a preset text length threshold, then the financial input text is processed by text character pinyin using a pre-configured short text processing mode to generate a first pinyin sequence set; the first pinyin sequence set contains at least one pinyin sequence. If the text length is greater than a preset text length threshold, the financial input text is processed using a pre-configured long text processing mode to generate a second set of pinyin sequences; the second set of pinyin sequences contains one and only one pinyin sequence. The fault-tolerant matcher is invoked to perform fault-tolerant matching on the financial input text to generate the original text domain hit set, and the fault-tolerant matcher is invoked to perform fault-tolerant matching on the first pinyin sequence set or the second pinyin sequence set to generate the pinyin domain hit set. A second hit set is generated based on the original text domain hit set and the pinyin domain hit set.
[0128] Optionally, the device further includes: The first matching judgment module is used to determine that the target financial entity identification result is an empty set after the first hit set is generated by calling the pre-generated standard name matcher and alias matcher to perform name matching on the financial input text and generating the first hit set, and the first hit set is an empty set, and the fault-tolerant matching is determined not to trigger fault-tolerant matching according to the fault-tolerant matching identifier. The second matching judgment module is used to determine the first hit set as the target hit set if the first hit set is a non-empty set.
[0129] Optional, entity recognition module 305, specifically used for: The entity elements in the target hit set are deduplicated to obtain a deduplicated entity set. Based on the aforementioned financial identification scenario identifier, determine the entity identification mode; Based on the entity recognition pattern, financial entity recognition is performed on the deduplicated entity set to generate target financial entity recognition results.
[0130] The financial entity identification device provided in this embodiment of the invention can execute the financial entity identification method provided in any embodiment of the invention, and has the corresponding functional modules and beneficial effects of the method.
[0131] Figure 4 A schematic diagram of an electronic device 40 that can be used to implement embodiments of the present invention is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, 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 processors, cellular phones, smartphones, wearable devices (e.g., helmets, glasses, watches, etc.), and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the invention described and / or claimed herein.
[0132] like Figure 4 As shown, the electronic device 40 includes at least one processor 41 and a memory, such as a read-only memory (ROM) 42 or a random access memory (RAM) 43, communicatively connected to the at least one processor 41. The memory stores computer programs executable by the at least one processor. The processor 41 can perform various appropriate actions and processes based on the computer program stored in the ROM 42 or loaded from storage unit 48 into the RAM 43. The RAM 43 may also store various programs and data required for the operation of the electronic device 40. The processor 41, ROM 42, and RAM 43 are interconnected via a bus 44. An input / output (I / O) interface 45 is also connected to the bus 44.
[0133] Multiple components in electronic device 40 are connected to I / O interface 45, including: input unit 46, such as keyboard, mouse, etc.; output unit 47, such as various types of monitors, speakers, etc.; storage unit 48, such as disk, optical disk, etc.; and communication unit 49, such as network card, modem, wireless transceiver, etc. Communication unit 49 allows electronic device 40 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.
[0134] Processor 41 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of processor 41 include, but are not limited to, central processing unit (CPU), graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, digital signal processors (DSPs), and any suitable processor, controller, microcontroller, etc. Processor 41 performs the various methods and processes described above, such as financial entity identification methods.
[0135] In some embodiments, the financial entity identification method may be implemented as a computer program tangibly contained in a computer-readable storage medium, such as storage unit 48. In some embodiments, part or all of the computer program may be loaded and / or installed on electronic device 40 via ROM 42 and / or communication unit 49. When the computer program is loaded into RAM 43 and executed by processor 41, one or more steps of the financial entity identification method described above may be performed. Alternatively, in other embodiments, processor 41 may be configured to perform the financial entity identification method by any other suitable means (e.g., by means of firmware).
[0136] Various embodiments of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), systems-on-a-chip (SoCs), payload-programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting data and instructions to the storage system, the at least one input device, and the at least one output device.
[0137] Computer programs used to implement the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, such that when executed by the processor, the computer programs cause the functions / operations specified in the flowcharts and / or block diagrams to be performed. The computer programs may be executed entirely on a machine, partially on a machine, or as a standalone software package, partially on a machine and partially on a remote machine, or entirely on a remote machine or server.
[0138] In the context of this invention, a computer-readable storage medium can be a tangible medium that may contain or store a computer program for use by or in conjunction with an instruction execution system, apparatus, or device. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination thereof. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof.
[0139] To provide interaction with a user, the systems and techniques described herein can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the electronic device. Other types of devices can also be used to provide interaction with the user; for example, 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 sound input, voice input, or tactile input).
[0140] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as data servers), or middleware components (e.g., application servers), or frontend components (e.g., user computers with graphical user interfaces or web browsers through which users can interact with implementations of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., communication networks). Examples of communication networks include local area networks (LANs), wide area networks (WANs), blockchain networks, and the Internet.
[0141] A computing system can include clients and servers. Clients and servers are generally located far apart and typically interact through communication networks. The client-server relationship is created by computer programs running on the respective computers and having a client-server relationship with each other. The server can be a cloud server, also known as a cloud computing server or cloud host, which is a hosting product within the cloud computing service system to address the shortcomings of traditional physical hosts and VPS services, such as high management difficulty and weak business scalability.
[0142] It should be understood that the various forms of processes shown above can be used, with steps reordered, added, or deleted. For example, the steps described in this invention can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution of this invention can be achieved, and this is not limited herein.
[0143] The specific embodiments described above do not constitute a limitation on the scope of protection of this invention. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this invention should be included within the scope of protection of this invention.
Claims
1. A method for identifying financial entities, characterized in that, include: In response to a financial entity identification request, the request is parsed to obtain financial input text, financial identification scenario identifier, and fault-tolerant matching identifier. The pre-generated standard name matcher and alias matcher are invoked to perform name matching on the financial input text, generating a first hit set; If the first hit set is an empty set, and fault-tolerant matching is triggered according to the fault-tolerant matching identifier, then the financial input text is subjected to fault-tolerant matching based on the pre-generated fault-tolerant matcher to generate a second hit set. The target hit set is determined based on the first hit set and the second hit set; Based on the financial identification scenario identifier, financial entity identification is performed on the target hit set to generate target financial entity identification results; The identification result of the target financial entity is fed back to the requesting party that initiated the financial entity identification request.
2. The method according to claim 1, characterized in that, Before responding to the financial entity identification request and parsing the request to obtain the financial input text, the financial identification scenario identifier, and the fault-tolerant matching identifier, the method further includes: The system retrieves a set of standard financial entities from a source of standard financial entities; the set of standard financial entities includes several standard financial entities; each standard financial entity contains initial entity attribute information, including entity identifier, entity code, and entity standard name. Based on the entity identifier, obtain the entity alias, the first letter of the entity's pinyin, and the entity third-party name corresponding to each of the standard financial entities; By using the entity alias, the first letter of the entity's pinyin, and the entity's third-party name corresponding to the standard financial entity, the entity attribute information of the corresponding standard financial entity is updated to obtain the target entity attribute information of the standard financial entity. For any standard financial entity, a first matching key for that standard financial entity is generated based on the entity standard name, entity code, and entity identifier in the entity attribute information of that standard financial entity, and a standard name matcher is constructed based on the first matching key of each standard financial entity; the tag type of each first matching key in the standard name matcher is a standard type. For any standard financial entity, a second matching key is generated based on the entity alias and entity third-party name in the entity attribute information of the standard financial entity, and an alias matcher is constructed based on the second matching key of each standard financial entity; the tag type of each second matching key in the alias matcher is an alias type; For any standard financial entity, a third matching key is generated based on the entity standard name, the first letter of the entity's pinyin, and the entity code in the entity attribute information of the standard financial entity, and a fault-tolerant matcher is constructed based on the third matching key of each standard financial entity; the tag type of each third matching key in the fault-tolerant matcher is a fault-tolerant type.
3. The method according to claim 2, characterized in that, For any standard financial entity, the third matching key for that standard financial entity is generated based on its standard name, the first letter of its pinyin, and its code from its entity attribute information. This includes: For any standard financial entity, if the standard name of the entity determines that the trigger condition of the first letter of the pinyin is met, then based on the first letter of the entity's pinyin, all combinations of first letters are enumerated and Cartesian products are performed to generate the first letter of the pinyin of the standard financial entity. Generate the character insertion key for the standard financial entity based on its entity code; If the trigger condition for the full syllable key is determined based on the entity standard name of the standard financial entity, then all the pinyin pronunciations are enumerated and Cartesian products are performed based on the entity standard name of the standard financial entity to generate the full syllable key of the standard financial entity. The third matching key corresponding to the standard financial entity includes the first letter of the pinyin, the character insertion key, and the full pinyin syllable key.
4. The method according to claim 1, characterized in that, The step of calling a pre-generated standard name matcher and alias matcher to perform name matching on the financial input text and generate a first hit set includes: The pre-generated standard name matcher is invoked to perform standard name matching on the financial input text, resulting in a set of standard name-matched texts; and, The pre-generated alias matcher is invoked to perform alias matching on the financial input text, resulting in a set of alias-matched texts. A first hit set is generated based on the standard name hit set and the alias hit text set.
5. The method according to claim 1, characterized in that, The process of performing fault-tolerant matching on the financial input text based on a pre-generated fault-tolerant matcher to generate a second hit set includes: Determine the text length corresponding to the financial input text; If the text length is not greater than a preset text length threshold, then the financial input text is processed by text character pinyin using a pre-configured short text processing mode to generate a first pinyin sequence set; the first pinyin sequence set contains at least one pinyin sequence. If the text length is greater than a preset text length threshold, the financial input text is processed using a pre-configured long text processing mode to generate a second set of pinyin sequences; the second set of pinyin sequences contains one and only one pinyin sequence. The fault-tolerant matcher is invoked to perform fault-tolerant matching on the financial input text to generate the original text domain hit set, and the fault-tolerant matcher is invoked to perform fault-tolerant matching on the first pinyin sequence set or the second pinyin sequence set to generate the pinyin domain hit set. A second hit set is generated based on the original text domain hit set and the pinyin domain hit set.
6. The method according to claim 1, characterized in that, After invoking the pre-generated standard name matcher and alias matcher to perform name matching on the financial input text and generate a first hit set, the method further includes: If the first hit set is an empty set, and it is determined that fault-tolerant matching is not triggered according to the fault-tolerant matching identifier, then the target financial entity identification result is determined to be an empty set. If the first hit set is a non-empty set, then the first hit set is determined as the target hit set.
7. The method according to claim 1, characterized in that, The step of identifying financial entities in the target hit set based on the financial identification scenario identifier and generating target financial entity identification results includes: The entity elements in the target hit set are deduplicated to obtain a deduplicated entity set. Based on the aforementioned financial identification scenario identifier, determine the entity identification mode; Based on the entity recognition pattern, financial entity recognition is performed on the deduplicated entity set to generate target financial entity recognition results.
8. A financial entity identification device, characterized in that, include: The request parsing module is used to respond to the financial entity identification request, parse the financial entity identification request, and obtain the financial input text, financial identification scenario identifier and fault-tolerant matching identifier; The naming matching module is used to call the pre-generated standard name matcher and alias matcher to perform name matching on the financial input text and generate a first hit set. The fault-tolerant matching module is used to perform fault-tolerant matching on the financial input text based on a pre-generated fault-tolerant matcher if the first hit set is an empty set and fault-tolerant matching is triggered according to the fault-tolerant matching identifier, thereby generating a second hit set. The target set generation module is used to determine the target hit set based on the first hit set and the second hit set; The entity recognition module is used to identify financial entities in the target hit set based on the financial recognition scenario identifier, and generate target financial entity recognition results. The identification result feedback module is used to feed back the identification result of the target financial entity to the requesting party that initiated the identification request of the financial entity.
9. An electronic device, characterized in that, The electronic device includes: At least one processor; and A memory communicatively connected to the at least one processor; wherein, The memory stores a computer program that can be executed by the at least one processor, the computer program being executed by the at least one processor to enable the at least one processor to perform the financial entity identification method according to any one of claims 1-7.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions that cause a processor to execute the financial entity identification method according to any one of claims 1-7.
