A method and system for converting and querying structured data and unstructured data

By unstructured transformation of structured data and creating indexes, the problem of inefficiency in traditional database query is solved, and the effect of efficient query of structured data is achieved.

CN115712710BActive Publication Date: 2025-07-11PANSOFT
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211454619.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-11-21
Publication Date
2025-07-11
Estimated Expiration
2042-11-21

AI Technical Summary

Technical Problem

In the context of big data, the query method of traditional relational databases is inefficient, making it difficult to efficiently and quickly query data that meets any combination conditions from massive structured data.

Method used

By obtaining structured business data, unstructured conversion and creating indexes, and data retrieval is performed in combination with query condition information to achieve the acquisition of structured result data.

Benefits of technology

The conversion efficiency between structured data and unstructured data is improved, and the efficiency of querying structured data is greatly improved, achieving efficient query.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115712710B_ABST
    Figure CN115712710B_ABST
Patent Text Reader

Abstract

The present invention provides a method and system for converting and querying structured data and unstructured data. By analyzing the data structure and storage rules of structured business data, conversion rules corresponding to unstructured data are obtained. Through the conversion rules, the conversion efficiency between structured data and unstructured data is improved. In addition, the present invention first retrieves unstructured data through a query condition and converts the unstructured data into corresponding structured data as a query result, greatly improving the efficiency of querying structured data and achieving the purpose of efficiently querying structured data.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of data query and conversion, and more specifically, to a method and system for converting and querying structured data and unstructured data. Background Art

[0002] With the development of enterprises, the amount of data in various business systems within an enterprise is increasing, and various query scenarios are becoming more and more complex. The inefficient query method using traditional relational databases can no longer meet the current query tasks under the premise of big data. When querying a large amount of data, the system load is getting higher and higher, the types of structured data used in each business scenario are increasing, and the user's requirements for system performance are also getting higher and higher.

[0003] Therefore, how to efficiently and quickly query data that meets arbitrary combination conditions from a large amount of structured data is an urgent problem to be solved at present. Summary of the Invention

[0004] In order to solve at least one of the above technical problems, the present invention proposes a conversion query of structured data and unstructured data.

[0005] The first aspect of the present invention provides a method for converting and querying structured data and unstructured data, including:

[0006] Obtaining structured business data through a business system, and obtaining corresponding data storage rules according to the business data;

[0007] According to the data storage rules, performing unstructured conversion on the structured business data, and obtaining a structure conversion rule and unstructured business data;

[0008] Performing semantic word segmentation and creating an index on the unstructured business data, and saving the index to obtain a query index table;

[0009] Obtaining query condition information, and performing data retrieval according to the query condition information to obtain structured result data.

[0010] In this solution, the step of obtaining structured business data through a business system and obtaining corresponding data storage rules according to the business data is specifically:

[0011] Obtaining user data, product data, and behavior data from a database through a business system;

[0012] Performing data structuring conversion on the user data, product data, and behavior data to obtain structured business data;

[0013] Performing data structure and data relationship analysis on the structured business data to obtain corresponding data storage rules.

[0014] In this solution, according to the data storage rule, the structured business data is converted into unstructured data, and the structure conversion rule and the unstructured business data are obtained. Specifically:

[0015] Perform feature analysis on the structured business data to obtain structure data feature information;

[0016] Obtain unstructured data feature information, compare and analyze the structure data feature information and the unstructured data feature information to obtain the structure conversion rule;

[0017] Convert the structured business data into unstructured business data according to the structure conversion rule.

[0018] In this solution, the conversion of the structured business data into unstructured data according to the data storage rule, and obtaining the structure conversion rule and the unstructured business data further includes:

[0019] Obtain unstructured business data;

[0020] Classify the data types of the unstructured business data to obtain unstructured user data, product data, and behavior data;

[0021] Conduct structure feature analysis and structure conversion on the unstructured user data, product data, and behavior data respectively to obtain the corresponding user data conversion rule, product data conversion rule, and behavior data conversion rule;

[0022] Merge and organize the user data conversion rule, product data conversion rule, and behavior data conversion rule to obtain the unstructured conversion rule.

[0023] In this solution, the semantic word segmentation and index creation of the unstructured data, and saving the index to obtain the query index table are specifically as follows:

[0024] Obtain the historical query data records in the structured business data;

[0025] Conduct statistical analysis based on the historical query data records to obtain the data frequency sorting query table;

[0026] Perform semantic word segmentation and index creation on the unstructured data to obtain the initial index table;

[0027] Classify the initial index table according to the initial index table combined with the data frequency sorting query table to obtain the key index table and the ordinary index table;

[0028] Merge the key index table and the ordinary index table to obtain the query index table.

[0029] In this solution, the obtaining of query condition information and the retrieval of data according to the query condition information to obtain structured result data are specifically as follows:

[0030] Analyze the characteristics of the query data according to the query condition information to obtain query data characteristic information;

[0031] Perform index analysis according to the query data characteristic information to obtain index classification information;

[0032] Perform index query from the query index table according to the index classification information to obtain a result index value.

[0033] In this solution, the obtaining of query condition information and the retrieval of data according to the query condition information to obtain structured result data are specifically as follows:

[0034] Obtain data from the unstructured data according to the result index value to obtain unstructured result data;

[0035] Obtain the corresponding unstructured conversion rule, and according to the unstructured conversion rule, convert the unstructured result data into structured result data, and use the structured result data as the final query result data.

[0036] The second aspect of the present invention also provides a conversion query system for structured data and unstructured data, which includes: a memory and a processor. The memory includes a conversion query method program for structured data and unstructured data. When the conversion query method program for structured data and unstructured data is executed by the processor, the following steps are implemented:

[0037] Obtain structured business data through the business system, and obtain the corresponding data storage rule according to the business data;

[0038] According to the data storage rule, perform unstructured conversion on the structured business data, and obtain a structure conversion rule and unstructured business data;

[0039] Perform semantic word segmentation and create an index on the unstructured business data, and save the index to obtain a query index table;

[0040] Obtain query condition information, and retrieve data according to the query condition information to obtain structured result data.

[0041] In this solution, the obtaining of structured business data through the business system and the obtaining of the corresponding data storage rule according to the business data are specifically as follows:

[0042] Obtain user data, product data, and behavior data from the database through the business system;

[0043] Perform data structuring conversion on the user data, product data, and behavior data to obtain structured business data;

[0044] Perform data structure and data relationship analysis on the structured business data to obtain corresponding data storage rules.

[0045] In this solution, the semantic word segmentation and creation of an index for the unstructured data, and saving the index to obtain a query index table are specifically as follows:

[0046] Obtain the historical query data records in the structured business data;

[0047] Perform statistical analysis based on the historical query data records to obtain a data frequency sorting query table;

[0048] Perform semantic word segmentation and create an index for the unstructured data to obtain an initial index table;

[0049] Based on the initial index table and in combination with the data frequency sorting query table, perform index classification on the initial index table to obtain a key index table and a general index table;

[0050] Merge the key index table and the general index table to obtain a query index table.

[0051] The present invention provides a method and system for converting and querying structured data and unstructured data. By performing data structure analysis and storage rule analysis on the structured business data, conversion rules corresponding to the unstructured data are obtained. Through the conversion rules, the conversion efficiency between structured data and unstructured data is improved. In addition, the present invention first retrieves the unstructured data through a query condition and converts the unstructured data into corresponding structured data as the query result, greatly improving the efficiency of querying structured data and achieving the purpose of efficiently querying structured data. BRIEF DESCRIPTION OF THE DRAWINGS

[0052] Figure 1 Shows a flowchart of a method for converting and querying structured data and unstructured data according to the present invention;

[0053] Figure 2 Shows a flowchart of obtaining data storage rules according to the present invention;

[0054] Figure 3 Shows a flowchart of obtaining unstructured business data according to the present invention;

[0055] Figure 4 Shows a block diagram of a system for converting and querying structured data and unstructured data according to the present invention. DETAILED DESCRIPTION OF THE INVENTION

[0056] To more clearly understand the above objects, features, and advantages of the present invention, the present invention will be further described in detail below in conjunction with the accompanying drawings and specific embodiments. It should be noted that, without conflict, the embodiments of the present application and the features in the embodiments can be combined with each other.

[0057] In the following description, many specific details are set forth in order to fully understand the present invention. However, the present invention can also be implemented in other ways different from those described herein. Therefore, the protection scope of the present invention is not limited by the specific embodiments disclosed below.

[0058] Figure 1 The flowchart of a method for converting and querying structured data and unstructured data according to the present invention is shown.

[0059] As Figure 1 shown, the first aspect of the present invention provides a method for converting and querying structured data and unstructured data, including:

[0060] S102, obtaining structured service data through a service system, and obtaining corresponding data storage rules according to the service data;

[0061] S104, performing unstructured conversion on the structured service data according to the data storage rules, and obtaining a structure conversion rule and unstructured service data;

[0062] S106, performing semantic word segmentation and creating an index on the unstructured service data, and saving the index to obtain a query index table;

[0063] S108, obtaining query condition information, and performing data retrieval according to the query condition information to obtain structured result data.

[0064] It should be noted that the service system generally includes multiple enterprise service systems, and the structured service data includes user data, product data, and behavior data, and the behavior data includes user behavior data and product behavior data.

[0065] Among them, the structured service data is specifically a kind of data with fixed components, the data has the characteristics of high organization and neat format, and can be logically expressed and implemented by a two-dimensional table structure. The unstructured service data is specifically data with irregular or incomplete data structures, without a predefined data model, and is not convenient to be represented by a database two-dimensional logical table.

[0066] Figure 2 The flowchart of obtaining data storage rules according to the present invention is shown.

[0067] According to an embodiment of the present invention, obtaining structured service data through a service system and obtaining corresponding data storage rules according to the service data are specifically as follows:

[0068] S202, obtain user data, product data, and behavior data from the database through the service system;

[0069] S204, perform data structuring conversion on the user data, product data, and behavior data to obtain structured service data;

[0070] S206, perform data structure and data relationship analysis on the structured service data to obtain corresponding data storage rules.

[0071] It should be noted that in the data structuring conversion of the user data, product data, and behavior data, specifically, the user data, product data, and behavior data are unified in structure and standardized, and the unified structure standard is determined by the types of service data. In the process of obtaining user data, product data, and behavior data from the database through the service system, the user data, product data, and behavior data are all initial data and do not have the characteristics of structured data.

[0072] Figure 3 The flowchart of obtaining unstructured service data according to the present invention is shown.

[0073] According to an embodiment of the present invention, according to the data storage rules, performing unstructured conversion on the structured service data and obtaining a structure conversion rule and unstructured service data are specifically as follows:

[0074] S302, perform feature analysis on the structured service data to obtain structure data feature information;

[0075] S304, obtain unstructured data feature information, and perform comparative analysis on the structure data feature information and the unstructured data feature information to obtain a structure conversion rule;

[0076] S306, perform unstructured conversion on the structured service data according to the structure conversion rule to obtain unstructured service data.

[0077] It should be noted that in the process of obtaining unstructured data feature information, performing comparative analysis on the structure data feature information and the unstructured data feature information, and obtaining a structure conversion rule, specific structure conversion rules can be obtained through comparative analysis of data features. The structure conversion rule is a rule for converting structured service data into unstructured data, and the rule is a one-way conversion rule. By obtaining and storing the conversion rule, the present invention greatly improves the conversion efficiency of structured data and unstructured data.

[0078] According to an embodiment of the present invention, based on the data storage rule, performing unstructured conversion on structured service data and obtaining a structure conversion rule and unstructured service data further includes:

[0079] Obtaining unstructured service data;

[0080] Performing data type division on the unstructured service data to obtain unstructured user data, product data, and behavior data;

[0081] Performing structure feature analysis and structure conversion on the unstructured user data, product data, and behavior data respectively to obtain corresponding user data conversion rules, product data conversion rules, and behavior data conversion rules;

[0082] Performing information merging and sorting on the user data conversion rules, product data conversion rules, and behavior data conversion rules to obtain an unstructured conversion rule.

[0083] It should be noted that the unstructured conversion rule is a rule for converting unstructured service data into structured data, and the rule is a one-way conversion rule.

[0084] According to an embodiment of the present invention, performing semantic word segmentation and creating an index on the unstructured data and saving the index to obtain a query index table specifically includes:

[0085] Obtaining historical query data records in the structured service data;

[0086] Performing statistical analysis based on the historical query data records to obtain a data frequency sorting query table;

[0087] Performing semantic word segmentation and creating an index on the unstructured data to obtain an initial index table;

[0088] Based on the initial index table and in combination with the data frequency sorting query table, performing index classification on the initial index table to obtain a key index table and a general index table;

[0089] Merging the key index table and the general index table to obtain a query index table.

[0090] It should be noted that for high-frequency data, querying through the key index in the query index table can further improve the index retrieval efficiency.

[0091] According to an embodiment of the present invention, obtaining query condition information and performing data retrieval based on the query condition information to obtain structured result data specifically includes:

[0092] Performing query data feature analysis based on the query condition information to obtain query data feature information;

[0093] Perform index analysis based on the query data feature information to obtain index classification information;

[0094] Perform index query from the query index table according to the index classification information to obtain the result index value.

[0095] It should be noted that the index classification information includes the index proportion information and index position information belonging to the key index and the ordinary index. The result index value includes multiple index values that meet the query conditions.

[0096] According to the embodiment of the present invention, the obtaining of the query condition information and the data retrieval according to the query condition information to obtain the structured result data are specifically as follows:

[0097] Perform data acquisition from the unstructured data according to the result index value to obtain the unstructured result data;

[0098] Obtain the corresponding unstructured conversion rule, and according to the unstructured conversion rule, convert the unstructured result data into structured result data, and use the structured result data as the final query result data. It should be noted that in the performing of data acquisition from the unstructured data according to the result index value to obtain the unstructured result data, the unstructured result data is specifically the unstructured query result data, and in the using of the structured result data as the final query result data, generally according to the query requirement, it is judged whether it is necessary to convert the unstructured result data into structured result data.

[0099] According to the embodiment of the present invention, the performing of feature analysis on the structured business data to obtain the structural data feature information further includes:

[0100] Perform data type division on the structured business data to obtain user data and product data of the structured type;

[0101] Perform statistical analysis of the behavior data on the user data and product data of the structured type to obtain data behavior characteristics;

[0102] Obtain the corresponding data format and data standard according to the user data and product data of the structured type;

[0103] Perform overall data feature analysis according to the data format, data standard and data behavior characteristics to obtain the structural data feature information.

[0104] It should be noted that the data behavior characteristics include quantity trend characteristics, data size range characteristics, etc. in the user data and product data.

[0105] According to the embodiment of the present invention, it further includes:

[0106] Count the amount of structured business data to obtain the size of the structured data volume;

[0107] Obtain the average data retrieval time according to the size of the structured data volume and the query index table;

[0108] Perform data retrieval through the query condition information and count the retrieval time therein to obtain the actual retrieval time;

[0109] Count the amount of unstructured business data to obtain the size of the unstructured data volume;

[0110] Conduct data conversion complexity analysis according to the structure conversion rule and the unstructured conversion rule to obtain the structure data conversion efficiency;

[0111] Conduct conversion time statistical analysis according to the size of the structured data volume, the size of the unstructured data volume, and the structure data conversion efficiency to obtain the average structure data conversion time;

[0112] According to the unstructured conversion rule, convert the unstructured result data into structured result data and conduct time statistics to obtain the actual conversion time;

[0113] If the actual conversion time is greater than the average structure data conversion time and the actual retrieval time is greater than the average retrieval time, then list the index value corresponding to the structured result data as the key index and store it in the query index table.

[0114] It should be noted that during the index retrieval and the conversion process of structured data and unstructured data, due to the fact that some special data often has a too long query time, the present invention compares and analyzes the retrieval time and the data conversion time, and lists the index value corresponding to the data with a too long query time as the key index and stores it in the query index table to improve the overall efficiency of subsequent data query and improve the stability of the query operation.

[0115] Figure 4 The block diagram of a conversion query system for structured data and unstructured data according to the present invention is shown.

[0116] The second aspect of the present invention also provides a conversion query system 4 for structured data and unstructured data. The system includes: a memory 41 and a processor 42. The memory includes a conversion query method program for structured data and unstructured data. When the conversion query method program for structured data and unstructured data is executed by the processor, the following steps are implemented:

[0117] Obtain structured business data through the business system and obtain the corresponding data storage rule according to the business data;

[0118] According to the data storage rules, convert the structured business data into unstructured data, and obtain the structure conversion rules and unstructured business data;

[0119] Perform semantic word segmentation and create an index for the unstructured business data, and save the index to obtain a query index table;

[0120] Obtain the query condition information, and retrieve data according to the query condition information to obtain structured result data.

[0121] It should be noted that the business system generally includes multiple enterprise business systems, and the structured business data includes user data, product data, and behavior data, and the behavior data includes user behavior data and product behavior data.

[0122] Among them, the structured business data is specifically a kind of data with fixed components, which has the characteristics of high organization and neat format, and can be logically expressed and implemented by a two-dimensional table structure. The unstructured business data is specifically data with irregular or incomplete data structures, without a predefined data model, and is not convenient to be represented by a database two-dimensional logical table.

[0123] According to an embodiment of the present invention, obtaining structured business data through the business system and obtaining corresponding data storage rules according to the business data are specifically as follows:

[0124] Obtain user data, product data, and behavior data from the database through the business system;

[0125] Perform data structure conversion on the user data, product data, and behavior data to obtain structured business data;

[0126] Analyze the data structure and data relationship of the structured business data to obtain corresponding data storage rules.

[0127] It should be noted that in the process of performing data structure conversion on the user data, product data, and behavior data, specifically, the user data, product data, and behavior data are unified in structure and standardized, and the unified structure standard is determined by the type of business data. Among the user data, product data, and behavior data obtained from the database through the business system, the user data, product data, and behavior data are all initial data and do not have the characteristics of structured data.

[0128] According to an embodiment of the present invention, converting the structured business data into unstructured data according to the data storage rules and obtaining the structure conversion rules and unstructured business data are specifically as follows:

[0129] Perform feature analysis on the structured business data to obtain structure data feature information;

[0130] Obtain unstructured data feature information, compare and analyze the structured data feature information with the unstructured data feature information to obtain a structure conversion rule;

[0131] Perform unstructured conversion on the structured service data according to the structure conversion rule to obtain unstructured service data.

[0132] It should be noted that in the process of obtaining unstructured data feature information, comparing and analyzing the structured data feature information with the unstructured data feature information to obtain a structure conversion rule, specific structure conversion rules can be obtained through the comparison and analysis of data features. The structure conversion rule is a rule for converting structured service data into unstructured data, and the rule is a one-way conversion rule. By obtaining and storing the conversion rule, the conversion efficiency between structured data and unstructured data is greatly improved in the present invention.

[0133] According to an embodiment of the present invention, the method of performing unstructured conversion on the structured service data according to the data storage rule, and obtaining the structure conversion rule and the unstructured service data further includes:

[0134] Obtain unstructured service data;

[0135] Perform data type division on the unstructured service data to obtain unstructured user data, product data, and behavior data;

[0136] Perform structure feature analysis and structure conversion on the unstructured user data, product data, and behavior data respectively to obtain corresponding user data conversion rules, product data conversion rules, and behavior data conversion rules;

[0137] Merge and organize the user data conversion rules, product data conversion rules, and behavior data conversion rules to obtain an unstructured conversion rule.

[0138] It should be noted that the unstructured conversion rule is a rule for converting unstructured service data into structured data, and the rule is a one-way conversion rule.

[0139] According to an embodiment of the present invention, the method of performing semantic word segmentation and creating an index on the unstructured data, and saving the index to obtain a query index table specifically includes:

[0140] Obtain the historical query data records in the structured service data;

[0141] Perform statistical analysis according to the historical query data records to obtain a data frequency sorting query table;

[0142] Perform semantic word segmentation and create an index on the unstructured data to obtain an initial index table;

[0143] Based on the initial index table and combined with the data frequency sorting query table, the initial index table is classified by index to obtain a key index table and a general index table;

[0144] The key index table and the general index table are merged to obtain a query index table.

[0145] It should be noted that for high-frequency data, querying through the key index in the query index table can further improve the index retrieval efficiency.

[0146] According to an embodiment of the present invention, the obtaining of the query condition information and the data retrieval according to the query condition information to obtain structured result data are specifically as follows:

[0147] Analyze the query data characteristics according to the query condition information to obtain query data characteristic information;

[0148] Perform index analysis according to the query data characteristic information to obtain index classification information;

[0149] Perform index query from the query index table according to the index classification information to obtain a result index value.

[0150] It should be noted that the index classification information includes index proportion information and index position information belonging to key indexes and general indexes. The result index value includes multiple index values that meet the query conditions.

[0151] According to an embodiment of the present invention, the obtaining of the query condition information and the data retrieval according to the query condition information to obtain structured result data are specifically as follows:

[0152] Obtain data from the unstructured data according to the result index value to obtain unstructured result data;

[0153] Obtain the corresponding unstructured conversion rule, and according to the unstructured conversion rule, convert the unstructured result data into structured result data, and use the structured result data as the final query result data.

[0154] It should be noted that in the obtaining of the unstructured result data by obtaining data from the unstructured data according to the result index value, the unstructured result data is specifically unstructured query result data, and in the using the structured result data as the final query result data, generally, according to the query requirements, it is judged whether it is necessary to convert the unstructured result data into structured result data.

[0155] According to an embodiment of the present invention, the performing of feature analysis on the structured service data to obtain structured data feature information further includes:

[0156] Classify the structured business data by data type to obtain user data and product data of structured types;

[0157] Perform statistical analysis of behavioral data on the user data and product data of the structured types to obtain data behavioral characteristics;

[0158] Obtain corresponding data formats and data standards based on the user data and product data of the structured types;

[0159] Perform overall data characteristic analysis based on the data formats, data standards, and data behavioral characteristics to obtain structured data characteristic information.

[0160] It should be noted that the data behavioral characteristics include quantity trend characteristics, data size range characteristics, etc. in user data and product data.

[0161] According to an embodiment of the present invention, it further includes:

[0162] Count the data volume of the structured business data to obtain the size of the structured data volume;

[0163] Obtain the average data retrieval time based on the size of the structured data volume and the query index table;

[0164] Perform data retrieval through query condition information and count the retrieval time therein to obtain the actual retrieval time;

[0165] Count the data volume of the unstructured business data to obtain the size of the unstructured data volume;

[0166] Perform data conversion complexity analysis according to the structure conversion rule and the unstructured conversion rule to obtain the structured data conversion efficiency;

[0167] Perform statistical analysis of the conversion time based on the size of the structured data volume, the size of the unstructured data volume, and the structured data conversion efficiency to obtain the average structured data conversion time;

[0168] According to the unstructured conversion rule, convert the unstructured result data into structured result data and perform time statistics to obtain the actual conversion time;

[0169] If the actual conversion time is greater than the average structured data conversion time and the actual retrieval time is greater than the average retrieval time, then list the index value corresponding to the structured result data as a key index and store it in the query index table.

[0170] It should be noted that during the process of index retrieval and the conversion between structured data and unstructured data, due to the fact that the query time for some special data is often too long, the present invention compares and analyzes the retrieval time and data conversion time, and stores the index values corresponding to the data with too long query time as key indexes in the query index table, so as to improve the overall efficiency of subsequent data queries and enhance the stability of query operations.

[0171] The present invention provides a method and system for converting and querying structured data and unstructured data. By analyzing the data structure and storage rules of structured business data, the conversion rules corresponding to unstructured data are obtained. Through the conversion rules, the conversion efficiency between structured data and unstructured data is improved. In addition, the present invention first retrieves unstructured data through query conditions and converts the unstructured data into corresponding structured data as the query result, greatly improving the efficiency of querying structured data and achieving the purpose of efficiently querying structured data.

[0172] In several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. The device embodiments described above are merely illustrative. For example, the division of the units is only a logical function division, and there may be other division methods in actual implementation. For example, multiple units or components can be combined, or can be integrated into another system, or some features can be ignored, or not executed. In addition, the coupling, direct coupling, or communication connection between the various components shown or discussed can be through some interfaces, and the indirect coupling or communication connection of the devices or units can be electrical, mechanical, or other forms.

[0173] The units described above as separate components may or may not be physically separated, and the components shown as units may or may not be physical units; they can be located in one place or distributed to multiple network units; some or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0174] In addition, in each embodiment of the present invention, each functional unit can be all integrated in one processing unit, or each unit can be separately used as a unit, or two or more units can be integrated in one unit; the above integrated units can be implemented in the form of hardware, or in the form of hardware plus software functional units.

[0175] Those of ordinary skill in the art can understand that all or part of the steps of implementing the above method embodiments can be completed by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When the program is executed, it performs the steps including those of the above method embodiments; and the aforementioned storage medium includes: removable storage devices, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical discs and other various media that can store program codes.

[0176] Alternatively, if the above integrated units of the present invention are implemented in the form of software functional modules and sold or used as independent products, they can also be stored in a computer-readable storage medium. Based on such an understanding, the technical solution of the embodiments of the present invention essentially or the part that contributes to the prior art can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the methods described in the various embodiments of the present invention. And the aforementioned storage medium includes: removable storage devices, ROM, RAM, magnetic disks, or optical discs and other various media that can store program codes.

Claims

1. A method for converting and querying structured data and unstructured data, characterized in that Including: Obtain structured business data through the business system, and obtain the corresponding data storage rules according to the business data; According to the data storage rules, perform unstructured conversion on the structured business data, and obtain the structure conversion rules and unstructured business data; Perform semantic word segmentation and create indexes on the unstructured business data, and save the indexes to obtain a query index table; Obtain query condition information, and perform data retrieval according to the query condition information to obtain structured result data; Among them, the step of performing unstructured conversion on the structured business data according to the data storage rules and obtaining the structure conversion rules and unstructured business data is specifically: Perform feature analysis on the structured business data to obtain structure data feature information; Obtain unstructured data feature information, compare and analyze the structure data feature information and the unstructured data feature information to obtain structure conversion rules; Perform unstructured conversion on the structured business data according to the structure conversion rules to obtain unstructured business data.

2. The conversion and query method for structured data and unstructured data according to claim 1, characterized in that, The Obtain structured business data through the business system, and obtain the corresponding data storage rules according to the business data, specifically: Obtain user data, product data, and behavior data from the database through the business system; Perform data structuring conversion on the user data, product data, and behavior data to obtain structured business data; Perform data structure and data relationship analysis on the structured business data to obtain corresponding data storage rules.

3. A method for converting and querying structured data and unstructured data according to claim 1, characterized in that, The step of performing unstructured conversion on the structured business data according to the data storage rules and obtaining the structure conversion rules and unstructured business data further includes: Obtain unstructured business data; Perform data type classification on the unstructured business data to obtain unstructured user data, product data, and behavior data; Perform structure feature analysis and structure conversion on the unstructured user data, product data, and behavior data respectively to obtain corresponding user data conversion rules, product data conversion rules, and behavior data conversion rules; Merge and organize the user data conversion rules, product data conversion rules, and behavior data conversion rules to obtain unstructured conversion rules.

4. A method for converting and querying structured data and unstructured data according to claim 3, characterized in that The step of performing semantic word segmentation and creating indexes on the unstructured data and saving the indexes to obtain a query index table is specifically: Obtain historical query data records in the structured business data; Perform statistical analysis according to the historical query data records to obtain a data frequency sorting query table; Perform semantic word segmentation and create indexes on the unstructured data to obtain an initial index table; According to the initial index table and in combination with the data frequency sorting query table, perform index classification on the initial index table to obtain a key index table and a general index table; Merge the key index table and the general index table to obtain a query index table.

5. A method for converting and querying structured data and unstructured data according to claim 4, characterized in that, The step of obtaining query condition information and performing data retrieval according to the query condition information to obtain structured result data is specifically: Perform query data feature analysis according to the query condition information to obtain query data feature information; Perform index analysis according to the query data feature information to obtain index classification information; Perform index query from the query index table according to the index classification information to obtain a result index value.

6. The method for converting and querying structured data and unstructured data according to claim 5, wherein, The obtaining of query condition information and the data retrieval according to the query condition information to obtain structured result data are specifically as follows: Data is obtained from the unstructured data according to the result index value to obtain unstructured result data; The corresponding unstructured conversion rule is obtained, and according to the unstructured conversion rule, the unstructured result data is converted into structured result data, and the structured result data is used as the final query result data.

7. A conversion and query system for structured data and unstructured data, characterized in that, The system includes: a memory and a processor. The memory includes a program for the conversion query method of structured data and unstructured data. When the program for the conversion query method of structured data and unstructured data is executed by the processor, the following steps are implemented: Structured business data is obtained through the business system, and the corresponding data storage rule is obtained according to the business data; According to the data storage rule, the structured business data is subjected to unstructured conversion to obtain a structure conversion rule and unstructured business data; The unstructured business data is subjected to semantic word segmentation and indexing, and the index is saved to obtain a query index table; Query condition information is obtained, and data retrieval is performed according to the query condition information to obtain structured result data; Among them, the step of performing unstructured conversion on the structured business data according to the data storage rule to obtain a structure conversion rule and unstructured business data is specifically as follows: Feature analysis is performed on the structured business data to obtain structure data feature information; Unstructured data feature information is obtained, and the structure data feature information is compared and analyzed with the unstructured data feature information to obtain a structure conversion rule; According to the structure conversion rule, the structured business data is subjected to unstructured conversion to obtain unstructured business data.

8. A conversion and query system for structured data and unstructured data according to claim 7, characterized in that The step of obtaining structured business data through the business system and obtaining the corresponding data storage rule according to the business data is specifically as follows: User data, product data, and behavior data are obtained from the database through the business system; The user data, product data, and behavior data are subjected to data structuring conversion to obtain structured business data; Data structure and data relationship analysis are performed on the structured business data to obtain the corresponding data storage rule.

9. A conversion and query system for structured data and unstructured data according to claim 7, characterized in that, The step of performing semantic word segmentation and indexing on the unstructured data and saving the index to obtain a query index table is specifically as follows: Historical query data records in the structured business data are obtained; Statistical analysis is performed according to the historical query data records to obtain a data frequency sorting query table; Semantic word segmentation and indexing are performed on the unstructured data to obtain an initial index table; According to the initial index table and in combination with the data frequency sorting query table, index classification is performed on the initial index table to obtain a key index table and a general index table; The key index table and the general index table are merged to obtain a query index table.

Citation Information

Patent Citations

  • Solr-based unstructured file retrieval method and device, equipment and storage medium

    CN114036256A

  • Method and system for data conversion and data model optimization

    US20190050400A1