A method for fast matching of enterprise terminal device installment information based on multiple hash trees
By constructing a multi-level hash tree in Java memory, the problem of low efficiency in enterprise-side device installment query was solved, achieving efficient device information matching, reducing database pressure, and improving customer experience.
Patent Information
- Application Number
- CN202211144901.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-09-20
- Publication Date
- 2026-11-06
- Estimated Expiration
- 2042-09-20
AI Technical Summary
In existing technologies, the inefficiency of phased queries on enterprise-side devices leads to excessive pressure on the database, which may cause resource shortages, affect customer experience, and increase the difficulty of development and maintenance.
A multi-hash tree structure is adopted. Device information is loaded into Java memory when the system starts up. A multi-level hash tree is built by the first character and the length to achieve fast matching of device names and reduce the query pressure on the database.
It improved the efficiency of equipment phase query, reduced the database burden, lowered the risk of resource alarms, simplified the development and maintenance difficulty, and enhanced the customer experience.
Smart Images

Figure CN115599815B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of internet finance, and in particular to the field of matching and acquiring installment payment products for Yiqi Rong equipment. Background Technology
[0002] With the arrival of the 5G era and the rise of cloud services, the demand for lightweight assets among SMEs has created a vast space for equipment installment payment services for enterprises. To seize this key opportunity in the B2B market and align with the development trend of the telecommunications industry, China Telecom launched the YiQiRong equipment installment payment product. YiQiRong is a B2B financial product developed by China Telecom, combining its core cloud network services with its services to support the IT infrastructure development of SMEs and facilitate their financial transformation. However, as enterprise equipment information becomes increasingly abundant, searching by YiQiRong equipment name becomes increasingly slow. The existing system design involves querying a MySQL database using a fuzzy search based on the YiQiRong equipment name, then placing the results in the business layer for complex looping matching. This fuzzy database query not only increases database pressure and avoids indexing, but also risks database resource alerts due to resource constraints when dealing with large datasets. Furthermore, the complex logic in the business layer increases the difficulty of later development and maintenance. The low query efficiency of YiQiRong equipment installment payment also negatively impacts the customer experience. Summary of the Invention
[0003] The technical problem this invention aims to solve is to overcome the shortcomings of existing technologies and provide a method for fast matching of enterprise-side device installment information based on a multi-level hash tree. After the system initializes the bean upon startup, it reads data from the YiQiRong device information table. Only one database load is needed, loading the device number and name into Java memory. A multi-level hash tree combining the first character and length of the device name is constructed by parsing the first character and length. During the matching process, the first character, length, and device name are matched sequentially in a loop to finally complete the device name matching. This method solves the problem of querying database tables using fuzzy left-right mappings in MySQL databases. The business layer does not need to write complex code, reducing database pressure and avoiding database resource alerts due to resource constraints. It also reduces the difficulty of later development and maintenance, improving the query efficiency of YiQiRong device installment services and enhancing the customer experience.
[0004] This invention provides the following technical solution:
[0005] This invention provides a method for quickly matching installment information of enterprise-side devices based on a multi-hash tree, comprising the following:
[0006] 1) Data loading: The Java application implements the InitializingBean interface and reads the data from the Yiqirong device information table after the system starts and initializes the bean. It only needs to load the database once, loading the device number and device name into the Java memory. Then, it loops to extract the first character of the device name and checks whether the key of the first character exists in the hash tree. If it does not exist, the first character of the keyword is used as the key and put into the hash tree.
[0007] 2) Construct a multi-level hash tree to determine if the device name's length exists in the hash tree's buckets; the hash tree's buckets can be understood as hash buckets, and the corresponding data structure for a hash bucket is a Map. <Integer,Set <string>If the length of the device name does not exist in the hash tree's buckets, then the length of the target word device name is used as the key and placed into the hash tree's buckets; if it exists, the device name is set into a Set. <string>In the collection, a multi-level hash tree was ultimately constructed, combining the first character of the device name and its length.
[0008] 3) Matching the first character: During the search, the Java application receives a request with the device name, and then loops to extract the first character of the device name. First, it checks whether the key of the first character exists in the hash tree. If the key of the first character does not exist in the hash tree, it continues to match the next character.
[0009] 4) Matching length: If the first character exists in the hash tree, then check if the length of the device name exists in the hash tree. If it does not exist, the process ends.
[0010] 5) Match the device name, then determine whether the hash tree buckets contain the device name, and finally output the matched device name based on the matching result.
[0011] Compared with the prior art, the beneficial effects of the present invention are as follows:
[0012] 1) Resolved the issue of MySQL database tables being queried using a left-right fuzzy method;
[0013] 2) The business layer does not need to write complex code;
[0014] 3) Reduced the pressure on the database;
[0015] 4) Avoid database resource shortages that could trigger database resource alerts;
[0016] 5) Reduced the difficulty of later development and maintenance;
[0017] 6) The improved query efficiency of Yiqi Rong equipment installment has further enhanced the customer's user experience. Attached Figure Description
[0018] The accompanying drawings are provided to further illustrate the invention and form part of the specification. They are used in conjunction with embodiments of the invention to explain the invention and do not constitute a limitation thereof. In the drawings:
[0019] Figure 1 This is a structural diagram of the present invention;
[0020] Figure 2 This is a schematic diagram illustrating the construction of a multi-level hash tree according to the present invention;
[0021] Figure 3 This is a schematic diagram of the matching search in this invention. Detailed Implementation
[0022] The preferred embodiments of the present invention will be described below with reference to the accompanying drawings. It should be understood that the preferred embodiments described herein are for illustration and explanation only and are not intended to limit the present invention. All identical reference numerals in the drawings refer to the same components.
[0023] Example 1
[0024] like Figure 1-3 This invention provides a method for fast matching of installment information for enterprise-side devices based on a multi-hash tree, comprising the following:
[0025] 1) Data loading: The Java application implements the InitializingBean interface and reads the data from the Yiqirong device information table after the system starts and initializes the bean. It only needs to load the database once, loading the device number and device name into the Java memory. Then, it loops to extract the first character of the device name and checks whether the key of the first character exists in the hash tree. If it does not exist, the first character of the keyword is used as the key and put into the hash tree.
[0026] 2) Construct a multi-level hash tree to determine if the device name's length exists in the hash tree's buckets; the hash tree's buckets can be understood as hash buckets, and the corresponding data structure for a hash bucket is a Map. <Integer,Set <string>If the length of the device name does not exist in the hash tree's buckets, then the length of the target word device name is used as the key and placed into the hash tree's buckets; if it exists, the device name is set into a Set. <string>In the collection, a multi-level hash tree was ultimately constructed, combining the first character of the device name and its length.
[0027] 3) Matching the first character: During the search, the Java application receives a request with the device name, and then loops to extract the first character of the device name. First, it checks whether the key of the first character exists in the hash tree. If the key of the first character does not exist in the hash tree, it continues to match the next character.
[0028] 4) Matching length: If the first character exists in the hash tree, then check if the length of the device name exists in the hash tree. If it does not exist, the process ends.
[0029] 5) Match the device name, then determine whether the hash tree buckets contain the device name, and finally output the matched device name based on the matching result.
[0030] Finally, it should be noted that the above descriptions are merely preferred embodiments of the present invention and are not intended to limit the present invention. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art can still modify the technical solutions described in the foregoing embodiments or make equivalent substitutions for some of the technical features. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.< / string> < / string> < / string> < / string>
Claims
1. A method for fast matching of installment information for enterprise-side devices based on a multi-hash tree, characterized in that, Including the following: 1) Data loading: By implementing the InitializingBean interface, the Java application reads the data from the Yiqirong device information table after the system starts and initializes the bean. The database only needs to be loaded once, and the device number and device name are loaded into the Java memory. Then, the first character of the device name is extracted in a loop; it is checked whether the key of the first character exists in the hash tree. If it does not exist, the first character of the keyword is used as the key and put into the hash tree. 2) Construct a multi-level hash tree to determine if the device name's length exists in the hash tree's buckets; the hash tree's buckets can be understood as hash buckets, and the corresponding data structure for a hash bucket is a Map. <Integer,Set <string>If the length of the device name does not exist in the hash tree's buckets, then the length of the target word device name is used as the key and placed into the hash tree's buckets; if it exists, the device name is set into a Set. <string> In the collection, a multi-level hash tree was ultimately constructed, combining the first character of the device name and its length.< / string> < / string> 3) Matching the first character: During the search, the Java application receives a request with the device name, and then loops to extract the first character of the device name. First, it checks whether the key of the first character exists in the hash tree. If the key of the first character does not exist in the hash tree, it continues to match the next character. 4) Matching length: If the first character exists in the hash tree, then check if the length of the device name exists in the hash tree. If it does not exist, the process ends. 5) Match the device name, then determine whether the hash tree buckets contain the device name, and finally output the matched device name based on the matching result.
Citation Information
Patent Citations
Efficient and stable equipment information matching method based on AC algorithm
CN115017195A
Method and System for Longest Prefix Matching of Variable-Sized Hierarchial Names by Treelets
US20120290696A1
