Data analysis method and device, equipment and storage medium
Through the target language model, the logistics query text is processed and substituted into the data model to run, the complex data analysis operation of traditional logistics business intelligence tools is solved, and an efficient and simplified data analysis process is achieved, which reduces the cost of system construction.
Patent Information
- Application Number
- CN202510073944.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-17
- Publication Date
- 2025-02-21
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Traditional logistics business intelligence tools are complex in data query and analysis operations, and it is difficult to efficiently integrate heterogeneous data sources, which limits user autonomy and response speed, and establishing and maintaining BI systems covering all aspects of logistics requires a lot of capital investment.
The logistics query text is searched vector, parsed, text rewriting, semantic correction and translation through the target linguistic model to obtain the rewritten logistics query text, and substituted it into the target data model to run it to obtain the data analysis results.
It realizes that user query text is processed through a large model and converted into a database language for data retrieval and analysis, simplifies data analysis operations, improves user autonomy and response speed, and reduces system construction and maintenance costs.
Smart Images

Figure CN119493852A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of data processing technology, and in particular to data analysis methods, devices, equipment and storage media. Background Art
[0002] When applying traditional business intelligence (BI) tools in logistics business systems, you may encounter the following defects: Logistics business involves data from multiple links, including warehousing, transportation, distribution, etc., and these data are often distributed in different systems. Traditional BI tools may find it difficult to efficiently integrate these heterogeneous data sources. Many decisions in logistics operations need to be adjusted quickly according to actual conditions. Traditional BI tools often require the support of the IT team to configure customized reports or dashboards, which limits the user's autonomy and response speed. Establishing and maintaining a comprehensive BI system that covers all aspects of logistics requires a large amount of capital investment, which may be a burden for small logistics companies.
[0003] Furthermore, in traditional business intelligence tools, data query and analysis often require a huge system, and a customized and integrated system for analysis. The operation of data analysis is not simple, and it is not possible to perform rapid analysis based on simple user needs.
[0004] The above contents are only used to assist in understanding the technical solution of the present application and do not constitute an admission that the above contents are prior art. Summary of the invention
[0005] The main purpose of this application is to provide a data analysis method, device, equipment and storage medium, aiming to solve the technical problems of complex operations of traditional logistics business intelligence tools for data query and analysis.
[0006] To achieve the above objectives, the present application proposes a data analysis method, which comprises: When receiving the logistics query text of the data analysis instruction, the target semantic big model is used to perform vector retrieval, semantic analysis, text rewriting, semantic correction and translation on the logistics query text to obtain a rewritten logistics query text; The rewritten logistics query text is substituted into the target data model for operation to obtain data analysis results. The target data model is constructed based on the business database obtained through data governance based on the target data source.
[0007] Optionally, the step of rewriting and translating the logistics query text by using the target semantic model to obtain the rewritten logistics query text includes: Perform vector search based on the logistics query text to obtain semantic search results; Semantically parsing and rewriting the semantic search results according to the target semantic model to obtain a database pseudo code; The database pseudocode is semantically modified and translated to obtain a rewritten logistics query text.
[0008] Optionally, the step of performing vector retrieval according to the logistics query text to obtain semantic retrieval results includes: Obtain dimension information and indicator information of the target data model; Performing pattern mapping on the logistics query text according to the dimension information and the indicator information to obtain a pattern mapping result; The vector database is searched according to the pattern mapping results to obtain semantic retrieval results.
[0009] Optionally, the step of performing pattern mapping on the logistics query text according to the dimension information and the indicator information to obtain a pattern mapping result includes: Segmenting the logistics query text to obtain split text; Performing nested mapping on the split text to obtain a text vector; Matching the text vector with the target data model by cosine similarity to obtain an optimal matching dimension and an optimal matching index; A pattern mapping result is obtained according to the optimal matching dimension and the optimal matching index.
[0010] Optionally, the step of semantically correcting and translating the database pseudocode to obtain a rewritten logistics query text includes: Performing semantic correction on the database pseudocode to obtain a corrected statement text; The modified sentence text is semantically translated to obtain a rewritten logistics query text.
[0011] Optionally, before the step of substituting the rewritten logistics query text into the target data model for operation to obtain a data analysis result, the target data model is constructed based on the target data source through data governance to obtain a business database, and further includes: Obtain a target data source, and perform dimension definition and indicator definition on the target data source; Function aggregation and assembly are performed according to the dimension definition and the indicator definition to obtain a target data model.
[0012] Optionally, after the step of performing function aggregation and assembly according to the dimension definition and the indicator definition to obtain the target data model, the step further includes: By evaluating the large model, the target data model is evaluated for capability, and the database language correctness result is obtained; The target data model is updated according to the database language correctness result.
[0013] In addition, to achieve the above purpose, the present application also proposes a data analysis device, which includes: A text processing module is used to perform vector retrieval, semantic analysis, text rewriting, semantic correction and translation on the logistics query text through the target semantic big model when receiving the logistics query text of the data analysis instruction, so as to obtain the rewritten logistics query text; The data analysis module is used to substitute the rewritten logistics query text into the target data model for operation to obtain data analysis results. The target data model is constructed based on the business database obtained through data governance based on the target data source.
[0014] In addition, to achieve the above-mentioned purpose, the present application also proposes a data analysis device, which includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, and the computer program is configured to implement the steps of the data analysis method described above.
[0015] In addition, to achieve the above-mentioned purpose, the present application also proposes a storage medium, which is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by a processor, the steps of the data analysis method described above are implemented.
[0016] In addition, to achieve the above-mentioned purpose, the present application also provides a computer program product, which includes a computer program, and when the computer program is executed by a processor, the steps of the data analysis method described above are implemented.
[0017] One or more technical solutions proposed in this application have at least the following technical effects: When receiving the logistics query text of the data analysis instruction, the target semantic big model is used to perform vector retrieval, semantic analysis, text rewriting, semantic correction and translation on the logistics query text to obtain the rewritten logistics query text; the rewritten logistics query text is substituted into the target data model for operation to obtain the data analysis result, and the target data model is constructed based on the business database obtained by the target data source through data governance. In this way, the text of the user query is processed by means of the big model, so as to be converted into the text of the database language and then perform data retrieval and analysis to obtain the result report or data, and the data report is generated by using the LLM big model. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0019] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0020] Figure 1 A schematic diagram of a process flow provided for the first embodiment of the data analysis method of this application; Figure 2 A schematic diagram of data analysis results provided in accordance with an embodiment of the data analysis method of the present application; Figure 3 A schematic diagram of a data model result provided in accordance with an embodiment of the data analysis method of the present application; Figure 4 A schematic diagram of a flow chart provided for the second embodiment of the data analysis method of this application; Figure 5 This is a schematic diagram of the module structure of the data analysis device according to an embodiment of the present application; Figure 6 Schematic diagram of the device structure of the hardware operating environment involved in the data analysis method in the embodiment of the present application.
[0021] The purpose, features and advantages of this application will be further described in conjunction with the embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION
[0022] It should be understood that the specific embodiments described herein are only used to explain the technical solutions of the present application and are not used to limit the present application.
[0023] In order to better understand the technical solution of the present application, a detailed description will be given below in conjunction with the accompanying drawings and specific implementation methods.
[0024] The main solution of the embodiment of the present application is: when a logistics query text of a data analysis instruction is received, vector retrieval, semantic analysis, text rewriting, semantic correction and translation are performed on the logistics query text through the target semantic big model to obtain a rewritten logistics query text; the rewritten logistics query text is substituted into the target data model for operation to obtain a data analysis result, and the target data model is constructed based on the business database obtained by data governance based on the target data source.
[0025] In this embodiment, for ease of description, the following description is made by taking the identification data analysis device as the execution subject.
[0026] When applying traditional business intelligence (BI) tools in logistics business systems due to existing technologies, the following defects may be encountered: Logistics business involves data from multiple links, including warehousing, transportation, distribution, etc., and these data are often distributed in different systems. Traditional BI tools may find it difficult to efficiently integrate these heterogeneous data sources. Many decisions in logistics operations need to be quickly adjusted according to actual conditions. Traditional BI tools often require the support of the IT team to customize reports or dashboard configurations, which limits the user's autonomy and response speed. Establishing and maintaining a BI system that comprehensively covers all aspects of logistics requires a large amount of capital investment, which may be a burden for small logistics companies. Furthermore, in traditional business intelligence tools, data query and analysis often require a huge system, and customized and integrated systems are required for analysis. The operation of data analysis is not simple, and it cannot be quickly analyzed based on the simple needs of users.
[0027] The present application provides a solution, which processes the text of user queries by means of a large model, thereby converting it into text in the database language and then performing data retrieval and analysis to obtain result reports or data, and generates data reports in one sentence by using the LLM large model.
[0028] It should be noted that the execution subject of this embodiment can be a computing service device with data processing, network communication and program running functions, such as a tablet computer, a personal computer, a mobile phone, etc., or an electronic device, a server, etc. that can realize the above functions. The following takes a data analysis device as an example to illustrate this embodiment and the following embodiments.
[0029] Based on this, the present application embodiment provides a data analysis method, referring to Figure 1 , Figure 1 This is a flow chart of the first embodiment of the data analysis method of the present application.
[0030] In this embodiment, the data analysis method includes steps S10 to S20: Step S10, when receiving the logistics query text of the data analysis instruction, performing vector retrieval, semantic analysis, text rewriting, semantic correction and translation on the logistics query text through the target semantic big model to obtain a rewritten logistics query text; It should be noted that the data analysis instruction is first received through a pre-set window. The data analysis instruction can be an instruction input by the user through a keyboard, voice or other means, and requires querying logistics-related data or performing data analysis. After receiving the data analysis instruction, the data analysis instruction is first converted into text and then processed through the target semantic model.
[0031] It should be understood that the target semantic big model is a pre-established big model, which includes Schema Mapper, Semantic Parser, Semantic Corrector and Semantic Translator, so as to process the logistics query text and convert it into SQL language, which can be directly run by the target data model, that is, the database language.
[0032] In the specific implementation, the steps of text processing are as follows: semantic mapping, through full-text search and vector search, extract the keywords, dimensions and indicators of the natural language input by the user. Semantic parsing, according to the dimensions and indicators of semantic mapping, rewrite the user's questions, rewrite and call LLM, and rewrite to match the dimensions and indicators as much as possible. The purpose is to allow the big model to better understand and output SQL containing modeling dimensions and indicators. Semantic correction, language correction has several steps, schema correction, time correction, syntax correction, the purpose is to correct the SQL according to the LLM parsed SQL to obtain more accurate SQL. Semantic translation, the SQL returned by semantic parsing is pseudo-SQL, the purpose is to consider security and prevent SQL injection. This link is to translate the pseudo-SQL into real executable SQL. Result output, use MarkDown and E-Chart to output the results.
[0033] Step S20, substitute the rewritten logistics query text into the target data model for operation to obtain data analysis results, and the target data model is constructed based on the business database obtained by data governance of the target data source.
[0034] In the specific implementation, executing SQL means rewriting the logistics query text and substituting it into the target data model to run and output the results. According to certain rules, the front end displays a table or a chart. The final effect is as follows: Figure 2 As shown, what is obtained is the data analysis result corresponding to the user's query text, which can be a chart or other types of analysis results.
[0035] In a feasible implementation, in order to accurately establish the target data model, before step S20, it also includes: obtaining the target data source, and performing dimension definition and indicator definition on the target data source; performing function aggregation and assembly according to the dimension definition and the indicator definition to obtain the target data model.
[0036] It should be noted that if Figure 3The following is a schematic diagram of the target data model structure. First, to perform data modeling, you need to define the data source, model according to the table structure of the data source, and define dimensions and metrics. Data sets and data models all belong to a subject domain. Data sets can be assembled from multiple models. Data models are assembled from metrics, dimensions, and labels, which are similar to the corresponding relationship in DB (database): Database (subject domain) - View (data set) - Table (data model) -> Column (metric / dimension / label).
[0037] It should be understood that the data model is a logical abstraction of the data in the database. It can directly refer to a physical table or be created by a piece of SQL logic. When we get a physical table or a piece of logical SQL, we can specify the header field as the primary key, dimension, measure, time date or common field. When the header fields are given these specific semantics, a data model is formed.
[0038] In the specific implementation, during the data source processing, firstly, wide table processing is performed to synchronize the business data to the big data warehouse and perform wide table processing to prepare for query. Then, the few-shot definition is performed: the example of defining the input and output of the large model is performed.
[0039] It should be noted that function aggregation and assembly refers to the use of multiple basic data aggregation to obtain target data, such as total amount = unit price * quantity + freight + other fees.
[0040] It should be understood that terminology must ultimately be defined in order to bind the fields of the data table to the dimensions and indicators of the natural language.
[0041] In a feasible implementation manner, in order to evaluate the initially established target data model, after the step of performing function aggregation and assembly according to the dimension definition and the indicator definition to obtain the target data model, it also includes: performing capability evaluation on the target data model by evaluating the large model to obtain a database language correctness result; and updating the target data model according to the database language correctness result.
[0042] In the specific implementation, the final result evaluation is carried out. The first dimension is LLM evaluation. LLM evaluation is actually the ability to use the big model AI. The main prompt is: let the big model's role: senior SQL expert, task: evaluate the correctness of the output SQL. The final database language correctness result can be used to correct and update the target data model.
[0043] It should be noted that it can also assist in manual evaluation, evaluate the model output results, enrich the knowledge base, and make the model more intelligent.
[0044] This embodiment provides a data analysis method. When receiving a logistics query text of a data analysis instruction, the logistics query text is subjected to vector retrieval, semantic analysis, text rewriting, semantic correction and translation through a target semantic big model to obtain a rewritten logistics query text; the rewritten logistics query text is substituted into a target data model for operation to obtain a data analysis result. The target data model is constructed based on a business database obtained through data governance of a target data source. In this way, the text of a user query is processed by means of a big model, thereby converting it into a text of a database language and then performing data retrieval and analysis to obtain a report or data of the result. The data report is generated in one sentence by using the LLM big model.
[0045] Based on the first embodiment of the present application, in the second embodiment of the present application, the same or similar contents as those in the above-mentioned embodiment 1 can be referred to the above introduction, and will not be repeated in the following. Figure 4 , step S10 includes steps S101 to S103: Step S101, performing vector search according to the logistics query text to obtain semantic search results; It should be noted that after obtaining the logistics query text, a vector search is performed, that is, a search is performed in a pre-set vector database, so that the logistics query text can be semantically defined.
[0046] In a feasible implementation, in order to perform semantic retrieval accurately, step S101 includes: obtaining dimension information and indicator information of the target data model; performing pattern mapping on the logistics query text according to the dimension information and the indicator information to obtain a pattern mapping result; searching the vector database according to the pattern mapping result to obtain a semantic retrieval result.
[0047] It should be understood that the dimensions and indicators pre-defined in the target data model are first obtained, and then the logistics query text is mapped to the dimensions and indicators of the target data model, so as to facilitate subsequent retrieval.
[0048] In the specific implementation, based on the data set above, hanlp is used for word segmentation, and the segmented field block (trem) is searched against the vector database to retrieve the semantic search results.
[0049] In a feasible implementation manner, in order to accurately obtain a pattern mapping result, the steps of performing pattern mapping on the logistics query text according to the dimension information and the index information to obtain the pattern mapping result include: performing word segmentation on the logistics query text to obtain split text; performing nested mapping on the split text to obtain a text vector; matching the text vector with the target data model by cosine similarity to obtain an optimal matching dimension and an optimal matching index; and obtaining a pattern mapping result according to the optimal matching dimension and the optimal matching index.
[0050] It should be noted that the mapper has embedding mapping, which maps the query text (logistics query text) and the modeled dimensions and indicators. The query text is segmented to obtain the split text, and the vector is embedded by the embedding model to obtain the text vector. The text vector and the vector library are matched by cosine similarity to find the optimal dimensions and indicators, and finally the pattern mapping result is obtained based on the optimal dimensions and indicators.
[0051] Step S102, semantically analyzing and rewriting the semantic search results according to the target semantic big model to obtain a database pseudo code; It should be noted that the semantic parser calls the LLM big model, which is the target semantic big model, to rewrite the query text according to the dimensions and indicators obtained by the mapper. The purpose of this is to make the query text entered by the user more compatible with the dimensions and indicators, and then use the rewritten rewrite text to call the LLM to generate SQL (pseudo code). For example: What is the recent order trend? The big model cannot understand the above input. What is the transaction amount? At this time, it is necessary to use the indicators and dimensions after the Mapper to input the big model for rewriting.
[0052] It should be understood that after semantic parsing and rewriting, the big model can infer and output pseudo SQL based on the above example and the rewritten question: SELECT DATE(data date) AS date, COUNT(DISTINCT order number) AS order quantity, SUM(order transaction amount) AS order transaction amount FROM Order data WHERE Data date >= '2024-09-18' AND data date <= '2024-10-17' GROUP BY DATE(data date) ORDER BY date Among them, pseudo SQL is used for security reasons to prevent SQL injection.
[0053] Step S103, semantically correcting and translating the database pseudocode to obtain a rewritten logistics query text.
[0054] It should be noted that after obtaining the pseudo-SQL code, the database pseudo-code needs to be further semantically corrected and translated, and finally the rewritten logistics query text of the real SQL code is obtained for subsequent data analysis.
[0055] In a feasible implementation, in order to accurately perform semantic correction and translation, step S103 includes: performing semantic correction on the database pseudocode to obtain a corrected statement text; performing semantic translation on the corrected statement text to obtain a rewritten logistics query text.
[0056] It should be understood that the Semantic Corrector: performs corrections based on the database pseudocode, checks the legitimacy of semantic query statements, corrects and optimizes illegal information, and obtains the corrected statement text. It mainly uses components such as SQL syntax check and time syntax check.
[0057] In the specific implementation, because the output SQL is still pseudo-SQL, the Semantic Translator is needed to translate it into executable SQL. The translation is performed according to the DB fields corresponding to the semantics previously modeled by the model to obtain the final SQL, which is to rewrite the logistics query text.
[0058] This embodiment performs vector retrieval based on the logistics query text to obtain semantic retrieval results; performs semantic analysis and rewrite of the semantic retrieval results based on the target semantic big model to obtain database pseudo code; performs semantic correction and translation of the database pseudo code to obtain rewritten logistics query text. In this way, the SQL language is obtained by semantic processing of natural language through the big model, which is convenient for system recognition and subsequent data analysis, and realizes data analysis based on natural language.
[0059] It should be noted that the above examples are only used to understand the present application and do not constitute a limitation on the data analysis method of the present application. More simple transformations based on this technical concept are all within the scope of protection of the present application.
[0060] This application also provides a data analysis device, please refer to Figure 5 , the data analysis device comprises: The text processing module 10 is used to perform vector retrieval, semantic analysis, text rewriting, semantic correction and translation on the logistics query text through the target semantic big model when receiving the logistics query text of the data analysis instruction, so as to obtain the rewritten logistics query text.
[0061] The data analysis module 20 is used to substitute the rewritten logistics query text into the target data model for operation to obtain data analysis results. The target data model is constructed based on the business database obtained through data governance of the target data source.
[0062] When receiving the logistics query text of the data analysis instruction, this embodiment performs vector retrieval, semantic analysis, text rewriting, semantic correction and translation on the logistics query text through the target semantic big model to obtain the rewritten logistics query text; the rewritten logistics query text is substituted into the target data model for operation to obtain the data analysis result, and the target data model is constructed based on the business database obtained by the target data source through data governance. In this way, the text of the user query is processed by means of the big model, so as to be converted into the text of the database language and then perform data retrieval and analysis to obtain the result report or data, and the data report is generated by using the LLM big model.
[0063] In one embodiment, the text processing module 10 is also used to perform vector retrieval based on the logistics query text to obtain semantic retrieval results; perform semantic analysis and rewrite the semantic retrieval results according to the target semantic big model to obtain database pseudocode; perform semantic correction and translation on the database pseudocode to obtain rewritten logistics query text.
[0064] In one embodiment, the text processing module 10 is also used to obtain dimension information and indicator information of the target data model; perform pattern mapping on the logistics query text according to the dimension information and the indicator information to obtain a pattern mapping result; and search the vector database according to the pattern mapping result to obtain a semantic retrieval result.
[0065] In one embodiment, the text processing module 10 is also used to segment the logistics query text to obtain split text; perform nested mapping on the split text to obtain a text vector; match the text vector with the target data model based on cosine similarity to obtain an optimal matching dimension and an optimal matching index; and obtain a pattern mapping result based on the optimal matching dimension and the optimal matching index.
[0066] In one embodiment, the text processing module 10 is further used to perform semantic correction on the database pseudocode to obtain a corrected statement text; and perform semantic translation on the corrected statement text to obtain a rewritten logistics query text.
[0067] In one embodiment, the data analysis module 20 is further used to obtain a target data source, and perform dimension definition and indicator definition on the target data source; perform function aggregation and assembly according to the dimension definition and the indicator definition to obtain a target data model.
[0068] In one embodiment, the data analysis module 20 is further used to evaluate the capability of the target data model by evaluating the large model to obtain a database language correctness result; and update the target data model according to the database language correctness result.
[0069] The data analysis device provided by the present application adopts the data analysis method in the above embodiment, which can solve the technical problem of the complexity of the operation of traditional logistics business intelligence tools for data query and analysis. Compared with the prior art, the beneficial effects of the data analysis device provided by the present application are the same as the beneficial effects of the data analysis method provided by the above embodiment, and the other technical features in the data analysis device are the same as the features disclosed in the above embodiment method, which will not be repeated here.
[0070] The present application provides a data analysis device, which includes: at least one processor; and a memory that is communicatively connected to the at least one processor; wherein the memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the data analysis method in the above-mentioned embodiment one.
[0071] Reference below Figure 6 , which shows a schematic diagram of the structure of a data analysis device suitable for implementing an embodiment of the present application. The data analysis device in the embodiment of the present application may include but is not limited to mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (Portable Application Descriptions), PMPs (Portable Media Players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Figure 6 The data analysis device shown is merely an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.
[0072] like Figure 6As shown, the data analysis device may include a processing device 1001 (e.g., a central processing unit, a graphics processor, etc.), which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM: Read Only Memory) 1002 or a program loaded from a storage device 1003 to a random access memory (RAM: Random Access Memory) 1004. In RAM1004, various programs and data required for the operation of the data analysis device are also stored. The processing device 1001, ROM1002, and RAM1004 are connected to each other through a bus 1005. An input / output (I / O) interface 1006 is also connected to the bus. Generally, the following systems can be connected to the I / O interface 1006: an input device 1007 including, for example, a touch screen, a touch pad, a keyboard, a mouse, an image sensor, a microphone, an accelerometer, a gyroscope, etc.; an output device 1008 including, for example, a liquid crystal display (LCD: Liquid Crystal Display), a speaker, a vibrator, etc.; a storage device 1003 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 1009. The communication device 1009 can allow the data analysis device to communicate with other devices wirelessly or by wire to exchange data. Although the data analysis device with various systems is shown in the figure, it should be understood that it is not required to implement or have all the systems shown. More or fewer systems can be implemented or have alternatively.
[0073] In particular, according to the embodiments disclosed in the present application, the process described above with reference to the flowchart can be implemented as a computer software program. For example, the embodiments disclosed in the present application include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication device, or installed from a storage device 1003, or installed from a ROM 1002. When the computer program is executed by the processing device 1001, the above-mentioned functions defined in the method of the embodiment disclosed in the present application are executed.
[0074] The data analysis device provided by the present application adopts the data analysis method in the above embodiment, which can solve the technical problem of the complexity of the operation of traditional logistics business intelligence tools for data query and analysis. Compared with the prior art, the beneficial effects of the data analysis device provided by the present application are the same as the beneficial effects of the data analysis method provided by the above embodiment, and the other technical features in the data analysis device are the same as the features disclosed in the method of the previous embodiment, which will not be repeated here.
[0075] It should be understood that the various parts disclosed in this application can be implemented by hardware, software, firmware or a combination thereof. In the description of the above embodiments, specific features, structures, materials or characteristics can be combined in any one or more embodiments or examples in a suitable manner.
[0076] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
[0077] The present application provides a computer-readable storage medium having computer-readable program instructions (ie, computer programs) stored thereon, wherein the computer-readable program instructions are used to execute the data analysis method in the above-mentioned embodiment.
[0078] The computer-readable storage medium provided in the present application may be, for example, a USB flash drive, but is not limited to electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, systems or devices, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM: Random Access Memory), a read-only memory (ROM: Read Only Memory), an erasable programmable read-only memory (EPROM: Erasable Programmable Read Only Memory or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM: CD-Read Only Memory), an optical storage device, a magnetic storage device, or any suitable combination of the above. In this embodiment, the computer-readable storage medium may be any tangible medium containing or storing a program, which may be used by or in combination with an instruction execution system, system or device. The program code contained on the computer-readable storage medium may be transmitted using any appropriate medium, including but not limited to: wires, optical cables, RF (Radio Frequency: Radio Frequency), etc., or any suitable combination of the above.
[0079] The computer-readable storage medium may be included in the data analysis device; or may exist independently without being assembled into the data analysis device.
[0080] The above-mentioned computer-readable storage medium carries one or more programs. When the above-mentioned one or more programs are executed by the data analysis device, the data analysis device: when receiving the logistics query text of the data analysis instruction, performs vector retrieval, semantic analysis, text rewriting, semantic correction and translation on the logistics query text through the target semantic big model to obtain the rewritten logistics query text; substitutes the rewritten logistics query text into the target data model for operation to obtain the data analysis result, and the target data model is constructed based on the business database obtained by data governance of the target data source.
[0081] Computer program code for performing the operations of the present application may be written in one or more programming languages or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, C++, and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0082] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present application. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0083] The modules involved in the embodiments described in this application may be implemented by software or hardware, wherein the name of the module does not constitute a limitation on the unit itself in some cases.
[0084] The readable storage medium provided in this application is a computer-readable storage medium, which stores computer-readable program instructions (i.e., computer programs) for executing the above-mentioned data analysis method, and can solve the technical problem of the complex operation of traditional logistics business intelligence tools for data query and analysis. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided in this application are the same as the beneficial effects of the data analysis method provided in the above-mentioned embodiment, and will not be repeated here.
[0085] The present application also provides a computer program product, including a computer program, which implements the steps of the above-mentioned data analysis method when executed by a processor.
[0086] The computer program product provided by this application can solve the technical problem of the complexity of the operation of traditional logistics business intelligence tools for data query and analysis. Compared with the prior art, the beneficial effects of the computer program product provided by this application are the same as the beneficial effects of the data analysis method provided by the above embodiment, which will not be repeated here.
[0087] The above descriptions are only some embodiments of the present application, and are not intended to limit the patent scope of the present application. All equivalent structural changes made using the contents of the present application specification and drawings under the technical concept of the present application, or direct / indirect applications in other related technical fields are included in the patent protection scope of the present application.
Claims
1. A data analysis method, characterized in that: The method includes: When receiving the logistics query text of the data analysis instruction, the target semantic big model is used to perform vector retrieval, semantic analysis, text rewriting, semantic correction and translation on the logistics query text to obtain a rewritten logistics query text; The rewritten logistics query text is substituted into the target data model for operation to obtain data analysis results. The target data model is constructed based on the business database obtained through data governance based on the target data source.
2. The method according to claim 1, characterized in that The step of rewriting and translating the logistics query text by using the target semantic model to obtain the rewritten logistics query text comprises: Perform vector search based on the logistics query text to obtain semantic search results; Semantically parsing and rewriting the semantic search results according to the target semantic model to obtain a database pseudo code; The database pseudocode is semantically modified and translated to obtain a rewritten logistics query text.
3. The method according to claim 2, characterized in that The step of performing vector retrieval according to the logistics query text to obtain semantic retrieval results comprises: Obtain dimension information and indicator information of the target data model; Performing pattern mapping on the logistics query text according to the dimension information and the indicator information to obtain a pattern mapping result; The vector database is searched according to the pattern mapping results to obtain semantic retrieval results.
4. The method according to claim 3, characterized in that The step of performing pattern mapping on the logistics query text according to the dimension information and the indicator information to obtain a pattern mapping result comprises: Segmenting the logistics query text to obtain split text; Performing nested mapping on the split text to obtain a text vector; Matching the text vector with the target data model by cosine similarity to obtain an optimal matching dimension and an optimal matching index; A pattern mapping result is obtained according to the optimal matching dimension and the optimal matching index.
5. The method according to claim 3, characterized in that The step of semantically correcting and translating the database pseudocode to obtain a rewritten logistics query text comprises: Performing semantic correction on the database pseudocode to obtain a corrected statement text; The modified sentence text is semantically translated to obtain a rewritten logistics query text.
6. The method according to any one of claims 1 to 5, characterized in that Before the step of substituting the rewritten logistics query text into the target data model for operation to obtain data analysis results, wherein the target data model is constructed based on the business database obtained through data governance of the target data source, the step further includes: Obtain a target data source, and perform dimension definition and indicator definition on the target data source; Function aggregation and assembly are performed according to the dimension definition and the indicator definition to obtain a target data model.
7. The method according to claim 6, characterized in that After the step of performing function aggregation and assembly according to the dimension definition and the indicator definition to obtain the target data model, the method further includes: By evaluating the large model, the target data model is evaluated for capability, and the database language correctness result is obtained; The target data model is updated according to the database language correctness result.
8. A data analysis device, characterized in that: The device comprises: A text processing module is used to perform vector retrieval, semantic analysis, text rewriting, semantic correction and translation on the logistics query text through the target semantic big model when receiving the logistics query text of the data analysis instruction, so as to obtain the rewritten logistics query text; The data analysis module is used to substitute the rewritten logistics query text into the target data model for operation to obtain data analysis results. The target data model is constructed based on the business database obtained through data governance based on the target data source.
9. A data analysis device, characterized in that: The device comprises: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program is configured to implement the steps of the data analysis method according to any one of claims 1 to 7.
10. A storage medium, characterized in that: The storage medium is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by a processor, the steps of the data analysis method according to any one of claims 1 to 7 are implemented.
Citation Information
Patent Citations
Information query method and model training method
CN119066211A
Logistics data visualization interaction method based on large model
CN119202124A
Cited By
Data processing method and system, storage medium and electronic equipment
CN120873021A