CN117473981A - Statement analysis method, device, equipment and computer readable storage medium - Google Patents

Statement analysis method, device, equipment and computer readable storage medium Download PDF

Info

Publication number
CN117473981A
CN117473981A CN202311778085.1A CN202311778085A CN117473981A CN 117473981 A CN117473981 A CN 117473981A CN 202311778085 A CN202311778085 A CN 202311778085A CN 117473981 A CN117473981 A CN 117473981A
Authority
CN
China
Prior art keywords
analysis
statement
sentence
natural
data
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202311778085.1A
Other languages
Chinese (zh)
Inventor
范青
张路
杨小亮
魏煜宸
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Mingyuan Yunke E Commerce Co ltd
Original Assignee
Shenzhen Mingyuan Yunke E Commerce Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Mingyuan Yunke E Commerce Co ltd filed Critical Shenzhen Mingyuan Yunke E Commerce Co ltd
Priority to CN202311778085.1A priority Critical patent/CN117473981A/en
Publication of CN117473981A publication Critical patent/CN117473981A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/20Natural language analysis
    • G06F40/205Parsing
    • G06F40/211Syntactic parsing, e.g. based on context-free grammar [CFG] or unification grammars
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/20Natural language analysis
    • G06F40/279Recognition of textual entities
    • G06F40/284Lexical analysis, e.g. tokenisation or collocates
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/20Natural language analysis
    • G06F40/279Recognition of textual entities
    • G06F40/289Phrasal analysis, e.g. finite state techniques or chunking
    • G06F40/295Named entity recognition
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/30Semantic analysis
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/40Processing or translation of natural language

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Health & Medical Sciences (AREA)
  • Artificial Intelligence (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • Computational Linguistics (AREA)
  • General Health & Medical Sciences (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Machine Translation (AREA)

Abstract

The invention discloses a statement analysis method, a statement analysis device, statement analysis equipment and a computer readable storage medium, and belongs to the technical field of computers. According to the invention, semantic analysis is carried out on the natural analysis statement to determine the statement key index; converting the statement key index into statement standard index under different analysis dimensions; according to the statement standard index, the natural analysis statement is analyzed to obtain a statement analysis result, and the technical problem that the statement analysis effect is poor when the corresponding analysis is carried out according to the natural statement input by a user in the conventional statement analysis method is solved.

Description

Statement analysis method, device, equipment and computer readable storage medium
Technical Field
The present invention relates to the field of computer technologies, and in particular, to a statement analysis method, a statement analysis device, an electronic device, and a computer readable storage medium.
Background
Along with the development of the big data age, the data information volume is also increased at a high speed along with the time, corresponding business reports are generally required to be manufactured according to various business data, and in the manufacturing process of the business reports, the reports may be continuously added to adjust the data analysis results.
At present, when data is analyzed according to an input sentence of a user, the data is generally selected and processed manually through a professional technical term to generate an analysis result, a producer needs to have profound programming skills, data visualization experience and data expertise, and when the user adjusts the data analysis result in real time according to data display requirements, a great deal of manpower and financial resources are required to be expended to select and count the data so as to correspondingly adjust the data analysis result, so that a longer period is generally consumed to manufacture a data report, and a situation that the data analysis result deviates from target analysis content input by the user easily occurs, so that the technical problems of low data analysis efficiency, low visualization efficiency and low analysis precision are caused, and the current analysis effect of data analysis according to the input sentence of the user is poor.
The foregoing is provided merely for the purpose of facilitating understanding of the technical solutions of the present invention and is not intended to represent an admission that the foregoing is prior art.
Disclosure of Invention
The invention mainly aims to provide a statement analysis method, a statement analysis device, electronic equipment and a computer readable storage medium, and aims to solve the technical problem that in the current statement analysis process, the statement analysis effect is poor.
In order to achieve the above object, the present application provides a sentence analysis method, including:
semantic analysis is carried out on the natural analysis sentences to determine sentence key indexes;
converting the statement key index into statement standard index under different analysis dimensions;
and analyzing the natural analysis statement according to the statement standard index to obtain a statement analysis result.
Optionally, the step of determining the sentence key index by performing semantic analysis on the natural analysis sentence includes:
splitting the natural analysis statement to generate at least one sub-statement;
extracting key prompt words from each sub-sentence;
and carrying out semantic analysis on each sub-sentence, and assembling the key prompt words into the sentence key indexes.
Optionally, the step of extracting the key prompt words in each sub-sentence includes:
generating a prompt sentence of each sub sentence in a preset hyponym model;
the prompt sentences are subjected to priority ordering according to preset indexes;
and extracting the key prompt words from the prompt sentences in the first priority.
Optionally, the step of converting the sentence key indicator into a sentence standard indicator in a different analysis dimension includes:
Determining a corresponding multidimensional data model according to the statement key index;
and converting the statement key indexes into statement standard indexes under different analysis dimensions according to the multidimensional data model.
Optionally, the step of analyzing the natural analysis sentence according to the sentence standard index to obtain a sentence analysis result includes:
extracting data to be analyzed corresponding to the natural analysis statement from a preset database according to the statement standard index;
acquiring a preset ordering rule and screening conditions in the natural analysis statement;
and analyzing the data to be analyzed according to the ordering rules and the screening conditions to generate statement analysis results.
Optionally, after the step of analyzing the natural analysis sentence according to the sentence standard index to obtain a sentence analysis result, the sentence analysis method further includes:
acquiring a language type corresponding to the natural analysis statement;
and carrying out language conversion on the data to be analyzed according to a preset language translation model to obtain a sentence analysis result under the language type.
Optionally, after the step of analyzing the natural analysis sentence according to the sentence standard index to obtain a sentence analysis result, the sentence analysis method further includes:
Analyzing the statement key index and the statement standard index together to obtain a presentation rule;
according to the display rule, converting the statement analysis result into a corresponding data analysis report;
and displaying the data analysis report.
In order to achieve the above object, the present application further provides a sentence analysis device including:
the determining module is used for determining statement key indexes by carrying out semantic analysis on the natural analysis statement;
the conversion module is used for converting the statement key indexes into statement standard indexes under different analysis dimensions;
and the analysis module is used for analyzing the natural analysis statement according to the statement standard index to obtain a statement analysis result.
Optionally, the determining module is further configured to:
splitting the natural analysis statement to generate at least one sub-statement;
extracting key prompt words from each sub-sentence;
and carrying out semantic analysis on each sub-sentence, and assembling the key prompt words into the sentence key indexes.
Optionally, the sentence analysis device further includes:
generating a prompt sentence of each sub sentence in a preset hyponym model;
The prompt sentences are subjected to priority ordering according to preset indexes;
and extracting the key prompt words from the prompt sentences in the first priority.
Optionally, the conversion module is further configured to:
determining a corresponding multidimensional data model according to the statement key index;
and converting the statement key indexes into statement standard indexes under different analysis dimensions according to the multidimensional data model.
Optionally, the analysis module is further configured to:
extracting data to be analyzed corresponding to the natural analysis statement from a preset database according to the statement standard index;
acquiring a preset ordering rule and screening conditions in the natural analysis statement;
and analyzing the data to be analyzed according to the ordering rules and the screening conditions to generate statement analysis results.
Optionally, the sentence analysis device further includes:
acquiring a language type corresponding to the natural analysis statement;
and carrying out language conversion on the data to be analyzed according to a preset language translation model to obtain a sentence analysis result under the language type.
Optionally, the sentence analysis device further includes:
analyzing the statement key index and the statement standard index together to obtain a presentation rule;
According to the display rule, converting the statement analysis result into a corresponding data analysis report;
and displaying the data analysis report.
The application also provides an electronic device comprising: the sentence analysis system comprises a memory, a processor and a sentence analysis program stored on the memory and capable of running on the processor, wherein the sentence analysis program is configured to realize the steps of the sentence analysis method.
The present application also provides a computer-readable storage medium having stored thereon a program that implements a sentence analysis method, the program being executed by a processor to implement the steps of sentence analysis as described above.
The present application also provides a computer program product comprising a computer program which, when executed by a processor, implements the steps of the statement analysis method as described above.
According to the method, semantic analysis is carried out on the natural analysis statement, the statement key index is determined, the statement key index is converted into statement standard indexes under different analysis dimensions, the natural analysis statement is analyzed according to the statement standard index, a statement analysis result is obtained, the analysis requirement in the natural language is extracted through a semantic recognition method, namely the statement key index is determined, the statement standard indexes under different dimensions are generated according to the statement key index, so that the corresponding statement analysis result in the natural analysis statement is obtained, therefore, the natural language input by a user can be directly analyzed, the data content related in the natural language is determined, the current analysis requirement of the user is met, the technical problems of low analysis result and low analysis efficiency caused by low accuracy of the conventional statement analysis result are overcome, and the current statement analysis effect is improved.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the application and together with the description, serve to explain the principles of the application.
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings that are required to be used in the description of the embodiments or the prior art will be briefly described below, and it will be obvious to those skilled in the art that other drawings can be obtained from these drawings without inventive effort.
FIG. 1 is a schematic flow chart of a sentence analysis method according to an embodiment of the present application;
FIG. 2 is an analysis timing chart of a data analysis result generated according to a natural analysis sentence according to a sentence analysis method in an embodiment of the present application;
FIG. 3 is a schematic flow chart of a second sentence analysis method according to the embodiment of the present application;
FIG. 4 is a schematic diagram of the results of the two-sentence analysis method according to the embodiment of the present application for key indicators of different sentences;
fig. 5 is a schematic block diagram of a three-sentence analysis device according to an embodiment of the present application;
fig. 6 is a schematic device structure diagram of a hardware operating environment related to a statement analysis method in the fourth embodiment of the present application.
The achievement of the objects, functional features and advantages of the present invention will be further described with reference to the accompanying drawings, in conjunction with the embodiments.
Detailed Description
It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the scope of the invention.
Example 1
Referring to fig. 1, the sentence analysis method according to the first embodiment includes:
step S10, semantic analysis is carried out on the natural analysis sentences to determine sentence key indexes;
step S20, converting the statement key indexes into statement standard indexes under different analysis dimensions;
and step S30, analyzing the natural analysis statement according to the statement standard index to obtain a statement analysis result.
In this embodiment, it should be noted that, the natural analysis statement is used to represent a natural language input by a user and related to analysis of data, the natural language may be specifically a text language or voice information, the statement key index is used to represent structural index information related to data in the natural analysis statement, and may specifically include index, dimension, time interval, granularity, screening condition, and ordering rule information in the natural analysis statement, the statement standard index is a query language used in a relational database, and is used to extract corresponding data content in the database, the analysis dimension is used to represent an index focused by the user in the natural analysis statement, data granularity or time interval information, and the like, which can help to generate analysis results in different dimensions, and because the statement key index may represent information content to be analyzed in multiple dimensions, the statement standard index correspondingly generated is also in different analysis dimensions.
Additionally, it should be noted that, semantic analysis is used to help computer understand and analyze human language, which not only performs lexical analysis and syntactic analysis on natural language, but also involves meaning contained in words, phrases, sentences, paragraphs, and the meaning of sentences is recognized to represent the specific content related to natural language.
In one possible implementation, the statement standard index may be specifically SQL (Structured Query Language ), which has multiple functions such as data manipulation and data definition, and by converting a natural language problem in the database field into a structured query language that can be executed in a relational database, all databases are queried by the structured query language to determine the data to be analyzed.
As an example, steps S10 to S30 include: the method comprises the steps of carrying out semantic analysis on an input natural analysis sentence, determining sentence key indexes in the natural analysis sentence, and converting all sentence key indexes into corresponding sentence standard indexes according to the corresponding relation between the sentence key indexes and sentence standard indexes, wherein the sentence standard indexes comprise standard indexes in dimensions such as time, space and the like, and then analyzing the natural analysis sentence by the sentence standard indexes to obtain a sentence analysis result corresponding to the natural analysis sentence.
According to the method, semantic analysis is carried out on the natural analysis statement, statement key indexes are determined, the statement key indexes are converted into statement standard indexes under different analysis dimensions, the natural analysis statement is analyzed according to the statement standard indexes, statement analysis results are obtained, and data analysis indexes under different dimensions are determined by identifying and extracting analysis requirements in natural language, so that corresponding statement analysis results in the natural analysis statement are obtained, different data analysis requirements of a user are met, the technical problems that the accuracy of the data analysis results according to the natural statement input by the user is low and the data analysis efficiency is low are solved, and therefore the current analysis effect of data analysis according to the natural analysis statement is improved.
The step of determining the statement key index by carrying out semantic analysis on the natural analysis statement comprises the following steps:
step A10, splitting the natural analysis statement to generate at least one sub-statement;
step A20, extracting key prompt words from each sub-sentence;
and step A30, assembling the key prompt words into the statement key indexes by carrying out semantic analysis on each sub statement.
In this embodiment, it should be noted that, the sub-sentences are used to represent the specific analysis data content and analysis direction focused by the user in the natural analysis sentence, and because the natural analysis sentence may involve multiple sentence analysis requirements of the user, the natural analysis sentence needs to be identified and split, and the splitting process may involve steps of word segmentation, part-of-speech labeling, named entity identification, and the like, so as to identify key elements (such as indexes, dimensions, and the like) in the sentence, thereby forming multiple sub-sentences, where the contents related to each sub-sentence are different, and specifically, may be indexes, dimensions, time intervals, granularity, screening conditions, ordering rules, and the like.
In addition, it should be noted that, the keyword hint is used to represent the content to be analyzed or the analysis word related to the content to be analyzed in the sub-sentence, and meanwhile, the keyword hint may also be a synonym similar to or similar to the content to be analyzed in the sub-sentence, and the keyword hint is extracted and assembled to generate the sentence keyword index related to various information dimensions and related to the analysis target.
For example, in one possible implementation manner, splitting a natural analysis statement may be performed through NLP (Natural Language Processing ) technology, assuming that a problem input by a natural analysis statement, i.e., a user, is "showing data of a new visitor for this year", the NLP technology may split the input problem into a plurality of sub-problems, for example, index content related to "visiting new visitor" is "visiting number" or "coming electricity amount", and "this year" is index information such as time interval or granularity, and through steps of word segmentation, part of speech labeling, named entity recognition, and the like, key elements such as indexes and dimensions in the statement are determined.
As an example, steps a10 to a30 include: the method comprises the steps of identifying and splitting a natural analysis sentence through a word segmentation method or a part-of-speech tagging method, splitting the natural analysis sentence into a plurality of sub-sentences, carrying out semantic analysis on the sub-sentences, determining content similar to the meaning of each key prompt word, and then assembling the key prompt words to form sentence key indexes, namely, understanding the sub-sentences and converting the sub-sentences into sentence key indexes, so that the sentence analysis requirements of users are more carefully and comprehensively understood through splitting the natural analysis sentence, and the data can be accurately queried and analyzed later.
The step of extracting the key prompt words from each sub-sentence comprises the following steps:
step B10, generating prompt sentences of all the sub sentences in a preset hyponym model;
step B20, sorting the prompt sentences according to the priority of preset indexes;
and step B30, extracting the key prompt words from the prompt sentences in the first priority.
In this embodiment, it should be noted that, a preset hyponym model is used to determine the analysis content expressed by the sub-sentences and return related prompt words, the prompt sentences may specifically represent sentences or words with meaning similar to that of the sub-sentences, the preset indexes are used to represent selection methods in the multiple prompt sentences, specifically, the similarity between the prompt sentences and the sub-sentences may be compared, and the key prompt words may be extracted from the prompt sentences with first priority according to the order of the similarity from large to small, where the first priority represents the prompt sentences with similarity arranged in the first position, so as to determine the index content focused by the user in the sub-sentences and the related content of the index, specifically, the analysis index information may represent what dimensions the user needs to view data, what time interval is wanted to view, how the granularity of the data (such as daily data, month data, etc.), and whether the natural analysis sentences input by the user contain specific filtering conditions and ordering rules.
For example, in one possible implementation, the preset hyponym model identifies the sub-sentences to return related prompt sentences, and further determines the user requirements in the sub-sentences according to the prompt sentences through semantic analysis, pattern recognition and other technologies, so as to infer the content of indexes, dimensions, time intervals, granularity, screening conditions, ordering rules and the like of interest of the user, for example, when the sub-sentences are sales data, two indexes of sales and sales are usually involved, and when the sub-sentences are related to the time intervals, index information such as year-quarter-month-day is possibly involved.
As an example, steps B10 to B30 include: the sub-sentences are split and extracted, the prompt sentences in the sub-sentences are determined in a preset hyponym model, and the prompt sentences are prioritized according to the similarity degree with the sub-sentences, so that the index information focused by the user is clear, the key prompt words are determined in the prompt sentences with the similarity degree at the first position, the requirements of the user can be better understood, and the requirements of the user are converted into specific parameters in the follow-up query sentences.
The step of converting the statement key index into the statement standard index under different analysis dimensions comprises the following steps:
Step C10, determining a corresponding multidimensional data model according to the statement key indexes;
and step C20, converting the statement key indexes into statement standard indexes under different analysis dimensions according to the multidimensional data model.
In this embodiment, it should be noted that a multidimensional data model (Cube) is also called a data Cube, and is a data analysis tool based on the multidimensional data Cube, which stores cross combinations of various dimensions and metrics, and can conveniently perform multidimensional data analysis by dividing and aggregating data according to different dimensions, and each sub-sentence can be assembled into a sentence key index according to dimension information, where the sentence key index represents data expressed in a structured manner, and specifically, a general data exchange format, namely JSON (JavaScript Object Notation, JS object profile), including various rule information in a natural analysis sentence.
Additionally, it should be noted that, when generating the sentence standard indicator, the corresponding multidimensional data model may be determined through the information such as the data type or the relationship contained in the sentence key indicator, so that the sentence key indicator is quickly converted into the corresponding sentence standard indicator according to the multidimensional data model.
In a possible real-time manner, the statement key index is a formatted JSON object, the statement standard index is an SQL query language, the semantic analysis is performed on each sub-statement, the analyzed result is assembled into a JSON object according to the design of the data structure and the serialization of the data, and in the JSON object, the information such as index, dimension, time interval, granularity, screening condition and sequencing rule may be included, and the step of converting the statement key index into the statement standard index through the multidimensional data model includes: a database middleware or a mapping tool (such as a multidimensional data model) is used for converting the JSON object into an SQL query statement, specifically, the multidimensional data model can be used for converting the structured JSON object into the SQL query statement, and a corresponding SQL language is generated according to information in the JSON object, the structural relation of a database table, the storage position of each data in a data table and the like.
As an example, steps C10 to C20 include: and determining a corresponding multidimensional data model according to the types of the sentence key indexes, and then matching the sentence key indexes with the multidimensional data model to generate sentence standard indexes.
For example, in order to facilitate understanding of the technical concept or technical principle of the present application, please refer to fig. 2, fig. 2 provides an analysis timing chart for generating a data analysis result according to a natural analysis statement, specifically, a natural analysis statement is a message sent by a user, in the process of generating the data analysis result according to the user sending message, a user, a client, a DataGpt (Data Generative Pre-trained Transformer, a data generation pre-training transformer), a DataGpt-lc (DataGpt-langchain), a db (database ), a cube, a large language model and other modules need to be firstly obtained, the client requests an analysis chart interface to the DataGpt according to the sending message, then requests the DataGpt-lc interface, wherein the lc represents a frame model for connecting languages with data, the DataGpt-request-lc interface is used for obtaining a preset number of indexes and dimension information according to the sending message, namely, a top N (front N) and dimension information are needed to be split, then the DataGpt-dimension information is needed to be sent to a plurality of the DataGpt-dimension table, a plurality of the time-dimension information is further processed by a plurality of the analysis factors, and a plurality of the time-dimension information are sequentially needed to be saved, if a plurality of the data-dimension values are needed to be sequentially divided, and the time-size-limited, and the time-size-limited time-size-limited time-scale is sequentially needed to be sequentially saved, and the time-size-limited to be a time-limited to be a window is then filtered, and a size-limited by the window is sequentially needed, and assembling the cube query, the dimension-removed statistical query and the time dimension information by the DataGpt-lc to return to the DataGpt, so that the DataGpt calls a cube interface, acquires corresponding SQL by the query, queries in the db database by the SQL to acquire a query result, constructs field information in the query result by using indexes and dimension information, generates a time field header, constructs result data according to the query result, and returns the result to the client to generate chart data for display to a user.
Example two
In another embodiment of the present application, the same or similar content as the first embodiment may be referred to the description above, and will not be repeated. On this basis, referring to fig. 3, the step of analyzing the natural analysis sentence according to the sentence standard index to obtain a sentence analysis result includes:
step D10, extracting data to be analyzed corresponding to the natural analysis statement from a preset database according to the statement standard index;
step D20, acquiring a preset ordering rule and screening conditions in the natural analysis statement;
and D30, analyzing the data to be analyzed according to the ordering rules and the screening conditions to generate statement analysis results.
In this embodiment, it should be noted that, the statement standard index represents a query language executable by the database, and the steps of connecting, executing query, obtaining a result and the like may be performed through the database, where corresponding data content is extracted from the database, that is, data to be analyzed is determined, where the data to be analyzed represents data content corresponding to a natural analysis statement and is to be used for data analysis, a statement analysis result is generated, the ordering rule represents a sequence rule when the data is output, and the filtering condition represents data content to be output.
In one possible implementation manner, the statement standard index is an SQL language, when the natural analysis statement is analyzed by the statement standard index, the database can be queried through the SQL language to obtain a data query result, the data query result is used as data to be analyzed, operations such as data screening, data grouping and data aggregation are performed, the operations such as cleaning, conversion and aggregation are performed on the data through a structured data framework of the multidimensional data model, customization is performed according to the requirements of users, and the obtained data to be analyzed is converted into data analysis results required by the users.
As an example, steps D10 to D30 include: and directly requesting corresponding data to be analyzed from a preset database by using the statement standard index, and analyzing the data to be analyzed according to the data sorting rule and the data screening condition contained in the natural analysis statement.
After the step of analyzing the natural analysis sentence according to the sentence standard index to obtain the sentence analysis result, the sentence analysis method further includes:
step E10, obtaining the language type corresponding to the natural analysis statement;
and E20, carrying out language conversion on the data to be analyzed according to a preset language translation model to obtain a sentence analysis result under the language type.
In this embodiment, it should be noted that, the language translation model represents a preset translation model for converting the language into another language, the language type is used for representing the language of the natural analysis sentence, the target language result represents the generated sentence analysis result after translation, the input natural analysis sentence may be from various different languages, and the various language languages need to be identified and corresponding analysis results are generated, including but not limited to english, chinese, spanish, french, german, japanese, etc.
As an example, steps E10 to E20 include: the language type of the natural analysis sentence is acquired, so that a corresponding language translation model is determined, and the sentence analysis result is converted into a target language result consistent with the natural analysis sentence according to the language translation model, so that the recognition of various language languages can be supported, and better user experience is provided.
After the step of analyzing the natural analysis sentence according to the sentence standard index to obtain the sentence analysis result, the sentence analysis method further includes:
step F10, analyzing the statement key indexes and the statement standard indexes together to obtain display rules;
Step F20, converting the statement analysis result into a corresponding data analysis report according to the display rule;
and F30, displaying the data analysis report.
In this embodiment, it should be noted that, the display rule is used to indicate how to display the analyzed data and the field information in the statement key index, and the data analysis report is used to indicate a report containing the data chart and the data analysis content, specifically, the data may be displayed in the form of a chart or a table and generated to include the corresponding field title analysis result, and display information such as the chart parameter, the configuration color, the shape, the position, etc. is determined, so that the analysis information is visualized to generate the corresponding data report.
In one possible implementation manner, after the data processing, a corresponding visual chart is generated according to the requirement of the user, the data display suggestion can comprise various visual chart types, such as a bar chart, a line chart, a pie chart, a scatter chart and the like, so as to meet different requirements of the user, and meanwhile, the visual chart can be dynamically updated and responded according to the voice input and the natural language text of the user and displayed on the interface of the user.
In addition, it should be noted that after the data to be analyzed is analyzed, a data interpretation report can be generated according to the statement key index and the target analysis data, wherein the data descriptive statistics, trend analysis, comparison analysis, industry data comparison and the like can be specifically included, the overall condition and the characteristic of the data are given, the abnormal value and the abnormal trend in the data are found, and the marking and the prompting are carried out.
As an example, in one possible implementation manner, when the problem is "the trend of the number of customers of a certain enterprise in the current year of the year" input by the user, the output visual data analysis chart may specifically include four modules of trend analysis, node analysis, standard industry analysis and mean analysis, where the trend analysis indicates the trend of the number of customers of the enterprise in the current year and the overall trend of the industry, and the trend change situation is compared and analyzed, the node analysis indicates the position with larger change in the trend chart, and specifically may be obtained by comparing the slope of the linear fit after normalizing the data of the node analysis with the set threshold value, and the standard industry analysis indicates the ranking result of the number of customers of the enterprise in the whole industry, the current city group and the current type of enterprise, and gives the mean analysis chart of the number of customers of the enterprise in the current year.
As an example, steps F10 to F30 include: analyzing the statement key indexes and the statement standard indexes to obtain presentation rules of statement analysis results, converting the statement analysis results into data analysis reports required by users according to the presentation rules, and presenting the data analysis reports to the users.
For example, in order to help understand the technical concept or technical principle of the present application, please refer to fig. 4, fig. 4 provides a schematic result diagram for different sentence key indexes, wherein an index name represents a sentence key index involved in a natural analysis sentence input by a user, an answer response rate may specifically represent an output condition of a corresponding data analysis result when the index is input, that is, an average recognition rate and an average time for the index represent an average recognition success rate of the index names and a time required for successful recognition respectively, specifically, according to the result diagram, it is known that answer response rates corresponding to different index names are different, when a user input problem is related to a complex number of calls, the corresponding recognition success rate is the highest, and when the input index name is the number of incoming calls, the number of new calls and other users, the answer response rate is the same. In addition, when 1000 indexes are input, the average recognition rate of each index reaches 91.79%, and the recognition success rate is high.
According to the embodiment, the obtained data to be analyzed is analyzed, the data to be analyzed is converted into target analysis data, and the data analysis report is generated according to the natural analysis statement input by the user to be displayed to the user, so that the questioning and analysis of the data content required by the user are realized, the complexity of manual cross-database and cross-form analysis is reduced, the data processing capacity of a multidimensional data model is combined, the data can be processed and analyzed more efficiently, and more accurate and real-time data display is provided.
Example III
An embodiment of the present invention further provides a sentence analysis device, referring to fig. 5, where the sentence analysis device includes:
a determining module 101, configured to determine a statement key index by performing semantic analysis on a natural analysis statement;
the conversion module 102 is configured to convert the sentence key indicator into a sentence standard indicator under different analysis dimensions;
and the analysis module 103 is used for analyzing the natural analysis sentence according to the sentence standard index to obtain a sentence analysis result.
Optionally, the determining module 101 is further configured to:
splitting the natural analysis statement to generate at least one sub-statement;
Extracting key prompt words from each sub-sentence;
and carrying out semantic analysis on each sub-sentence, and assembling the key prompt words into the sentence key indexes.
Optionally, the sentence analysis device further includes:
generating a prompt sentence of each sub sentence in a preset hyponym model;
the prompt sentences are subjected to priority ordering according to preset indexes;
and extracting the key prompt words from the prompt sentences in the first priority.
Optionally, the conversion module 102 is further configured to:
determining a corresponding multidimensional data model according to the statement key index;
and converting the statement key indexes into statement standard indexes under different analysis dimensions according to the multidimensional data model.
Optionally, the analysis module 103 is further configured to:
extracting data to be analyzed corresponding to the natural analysis statement from a preset database according to the statement standard index;
acquiring a preset ordering rule and screening conditions in the natural analysis statement;
and analyzing the data to be analyzed according to the ordering rules and the screening conditions to generate statement analysis results.
Optionally, the sentence analysis device further includes:
Acquiring a language type corresponding to the natural analysis statement;
and carrying out language conversion on the data to be analyzed according to a preset language translation model to obtain a sentence analysis result under the language type.
Optionally, the sentence analysis device further includes:
analyzing the statement key index and the statement standard index together to obtain a presentation rule;
according to the display rule, converting the statement analysis result into a corresponding data analysis report;
and displaying the data analysis report.
The sentence analysis device provided by the invention can solve the technical problem of poor sentence analysis effect in the current sentence analysis process by adopting the sentence analysis method in the first embodiment or the second embodiment. Compared with the prior art, the sentence analysis device provided by the embodiment of the present invention has the same beneficial effects as the sentence analysis method provided by the above embodiment, and other technical features in the sentence analysis device are the same as the features disclosed in the method of the previous embodiment, which are not described in detail herein.
Example IV
The embodiment of the invention provides electronic equipment, which comprises: at least one processor; and a memory communicatively coupled to the at least one processor; the memory stores instructions executable 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 statement analysis method in the first embodiment.
Referring now to fig. 6, a schematic diagram of an electronic device suitable for use in implementing embodiments of the present disclosure is shown. The electronic devices in embodiments of the present disclosure may include, but are not limited to, mobile terminals such as mobile phones, notebook computers, digital broadcast receivers, PDAs (Personal Digital Assistant: personal digital assistants), PADs (Portable Application Description: tablet computers), PMPs (Portable Media Player: portable multimedia players), vehicle terminals (e.g., car navigation terminals), and the like, as well as stationary terminals such as digital TVs, desktop computers, and the like. The electronic device shown in fig. 6 is merely an example and should not be construed to limit the functionality and scope of use of the disclosed embodiments.
As shown in fig. 6, the electronic apparatus may include a processing device 1001 (e.g., a central processing unit, a graphics processor, etc.) that may perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM) 1002 or a program loaded from a storage device 1003 into a random access Memory (RAM: random Access Memory) 1004. In the RAM1004, various programs and data required for the operation of the electronic device are also stored. The processing device 1001, the ROM1002, and the RAM1004 are connected to each other by a bus 1005. An input/output (I/O) interface 1006 is also connected to the bus. In general, the following systems may be connected to the I/O interface 1006: input devices 1007 including, for example, a touch screen, touchpad, keyboard, mouse, image sensor, microphone, accelerometer, gyroscope, and the like; an output device 1008 including, for example, a liquid crystal display (LCD: liquid Crystal Display), a speaker, a vibrator, and the like; storage device 1003 including, for example, a magnetic tape, a hard disk, and the like; and communication means 1009. The communication means 1009 may allow the electronic device to communicate with other devices wirelessly or by wire to exchange data. While electronic devices having various systems are shown in the figures, it should be understood that not all of the illustrated systems are required to be implemented or provided. More or fewer systems may alternatively be implemented or provided.
In particular, according to embodiments of the present disclosure, the processes described above with reference to flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method shown in the flowcharts. In such an embodiment, the computer program may be downloaded and installed from a network through a communication device, or installed from the storage device 1003, or installed from the ROM 1002. The above-described functions defined in the method of the embodiment of the present disclosure are performed when the computer program is executed by the processing device 1001.
The electronic equipment provided by the invention can solve the technical problem of poor sentence analysis effect in the current sentence analysis process by adopting the sentence analysis method in the embodiment. Compared with the prior art, the beneficial effects of the electronic device provided by the embodiment of the invention are the same as those of the statement analysis method provided by the embodiment, and other technical features of the electronic device are the same as those disclosed by the method of the previous embodiment, and are not repeated herein.
It should be understood that portions of the present disclosure may be implemented in hardware, software, firmware, or a combination thereof. In the description of the above embodiments, particular features, structures, materials, or characteristics may be combined in any suitable manner in any one or more embodiments or examples.
The foregoing is merely illustrative of the present invention, and the present invention is not limited thereto, and any person skilled in the art will readily recognize that variations or substitutions are within the scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.
Example five
An embodiment of the present invention provides a computer-readable storage medium having computer-readable program instructions stored thereon for performing the sentence analysis method in the first embodiment.
The computer readable storage medium according to the embodiments of the present invention may be, for example, a usb disk, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, or device, or a combination of any of the foregoing. More specific examples of the computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, 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 disc Read-Only Memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In this embodiment, a computer-readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, or device. Program code embodied on a computer readable storage medium may be transmitted using any appropriate medium, including but not limited to: wire, fiber optic cable, RF (Radio Frequency), and the like, or any suitable combination of the foregoing.
The above-described computer-readable storage medium may be contained in an electronic device; or may exist alone without being assembled into an electronic device.
The computer-readable storage medium carries one or more programs that, when executed by an electronic device, cause the electronic device to: semantic analysis is carried out on the natural analysis sentences to determine sentence key indexes; converting the statement key index into statement standard index under different analysis dimensions; and analyzing the natural analysis statement according to the statement standard index to obtain a statement analysis result.
Computer program code for carrying out operations of the present disclosure may be written in one or more programming languages, including an object oriented programming language such as Java, smalltalk, C ++ and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any kind of network, including a local area network (LAN: local Area Network) or a wide area network (WAN: wide Area Network), or may be connected to an external computer (for example, through the Internet using an Internet service provider).
The flowcharts and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present invention. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The modules described in the embodiments of the present disclosure may be implemented in software or hardware. Wherein the name of the module does not constitute a limitation of the unit itself in some cases.
The readable storage medium provided by the invention is a computer readable storage medium, and the computer readable storage medium stores computer readable program instructions for executing the sentence analysis method, so that the technical problem of poor sentence analysis effect in the current sentence analysis process can be solved. Compared with the prior art, the beneficial effects of the computer readable storage medium provided by the embodiment of the present invention are the same as those of the sentence analysis method provided by the first embodiment or the second embodiment, and are not described herein.
Example six
The embodiment of the invention also provides a computer program product, which comprises a computer program, wherein the computer program realizes the steps of the statement analysis method when being executed by a processor.
The computer program product provided by the application can solve the technical problem of poor statement analysis effect in the current statement analysis process. Compared with the prior art, the beneficial effects of the computer program product provided by the embodiment of the present invention are the same as those of the sentence analysis method provided by the first embodiment or the second embodiment, and are not described in detail herein.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or system that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or system. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or system that comprises the element.
The foregoing embodiment numbers of the present invention are merely for the purpose of description, and do not represent the advantages or disadvantages of the embodiments.
From the above description of embodiments, it will be clear to a person skilled in the art that the above embodiment method may be implemented by means of software plus a necessary general hardware platform, but may of course also be implemented by means of hardware, but in many cases the former is a preferred embodiment. Based on this understanding, the technical solution of the present invention may be embodied essentially or in a part contributing to the prior art in the form of a software product stored in a storage medium (e.g. ROM/RAM, magnetic disk, optical disk) as described above, comprising instructions for causing a terminal device (which may be a mobile phone, a computer, a server, or a network device, etc.) to perform the method according to the embodiments of the present invention.
The foregoing description is only of the preferred embodiments of the present invention, and is not intended to limit the scope of the invention, but rather is intended to cover any equivalents of the structures or equivalent processes disclosed herein or in the alternative, which may be employed directly or indirectly in other related arts.

Claims (10)

1. A sentence analysis method, characterized in that the sentence analysis method comprises:
semantic analysis is carried out on the natural analysis sentences to determine sentence key indexes;
converting the statement key index into statement standard index under different analysis dimensions;
and analyzing the natural analysis statement according to the statement standard index to obtain a statement analysis result.
2. The sentence analysis method according to claim 1, wherein the step of determining sentence key indicators by performing semantic analysis on a natural analysis sentence includes:
splitting the natural analysis statement to generate at least one sub-statement;
extracting key prompt words from each sub-sentence;
and carrying out semantic analysis on each sub-sentence, and assembling the key prompt words into the sentence key indexes.
3. The sentence analysis method according to claim 2, wherein the step of extracting the key hint words in each of the sub sentences includes:
generating a prompt sentence of each sub sentence in a preset hyponym model;
the prompt sentences are subjected to priority ordering according to preset indexes;
and extracting the key prompt words from the prompt sentences in the first priority.
4. The sentence analysis method according to claim 1, wherein the step of converting the sentence key index into a sentence standard index in a different analysis dimension includes:
determining a corresponding multidimensional data model according to the statement key index;
and converting the statement key indexes into statement standard indexes under different analysis dimensions according to the multidimensional data model.
5. The sentence analysis method according to claim 1, wherein the step of analyzing the natural analysis sentence according to the sentence standard index to obtain a sentence analysis result includes:
extracting data to be analyzed corresponding to the natural analysis statement from a preset database according to the statement standard index;
acquiring a preset ordering rule and screening conditions in the natural analysis statement;
and analyzing the data to be analyzed according to the ordering rules and the screening conditions to generate statement analysis results.
6. The sentence analysis method according to claim 5, wherein after the step of analyzing the natural analysis sentence according to the sentence standard index to obtain a sentence analysis result, the sentence analysis method further comprises:
Acquiring a language type corresponding to the natural analysis statement;
and carrying out language conversion on the data to be analyzed according to a preset language translation model to obtain a sentence analysis result under the language type.
7. The sentence analysis method according to claim 6, wherein after the step of analyzing the natural analysis sentence according to the sentence standard index to obtain a sentence analysis result, the sentence analysis method further comprises:
analyzing the statement key index and the statement standard index together to obtain a presentation rule;
according to the display rule, converting the statement analysis result into a corresponding data analysis report;
and displaying the data analysis report.
8. A sentence analysis device, characterized in that the sentence analysis device comprises:
the determining module is used for determining statement key indexes by carrying out semantic analysis on the natural analysis statement;
the conversion module is used for converting the statement key indexes into statement standard indexes under different analysis dimensions;
and the analysis module is used for analyzing the natural analysis statement according to the statement standard index to obtain a statement analysis result.
9. An electronic device, the electronic device comprising: a memory, a processor and a statement analysis program stored on the memory and executable on the processor, the statement analysis program being configured to implement the steps of the statement analysis method of any one of claims 1 to 7.
10. A computer-readable storage medium, wherein a sentence analysis program is stored on the computer-readable storage medium, which when executed by a processor, implements the steps of the sentence analysis method according to any one of claims 1 to 7.
CN202311778085.1A 2023-12-22 2023-12-22 Statement analysis method, device, equipment and computer readable storage medium Pending CN117473981A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311778085.1A CN117473981A (en) 2023-12-22 2023-12-22 Statement analysis method, device, equipment and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311778085.1A CN117473981A (en) 2023-12-22 2023-12-22 Statement analysis method, device, equipment and computer readable storage medium

Publications (1)

Publication Number Publication Date
CN117473981A true CN117473981A (en) 2024-01-30

Family

ID=89633242

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311778085.1A Pending CN117473981A (en) 2023-12-22 2023-12-22 Statement analysis method, device, equipment and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN117473981A (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060161559A1 (en) * 2005-01-18 2006-07-20 Ibm Corporation Methods and systems for analyzing XML documents
CN105740333A (en) * 2016-01-23 2016-07-06 北京掌阔移动传媒科技有限公司 Visual advertisement management platform, and implementation method thereof
CN114742032A (en) * 2022-04-24 2022-07-12 广州亚信技术有限公司 Interactive data analysis method, apparatus, device, medium, and program product

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060161559A1 (en) * 2005-01-18 2006-07-20 Ibm Corporation Methods and systems for analyzing XML documents
CN105740333A (en) * 2016-01-23 2016-07-06 北京掌阔移动传媒科技有限公司 Visual advertisement management platform, and implementation method thereof
CN114742032A (en) * 2022-04-24 2022-07-12 广州亚信技术有限公司 Interactive data analysis method, apparatus, device, medium, and program product

Similar Documents

Publication Publication Date Title
CN106874467B (en) Method and apparatus for providing search results
US20150278253A1 (en) Images for a question answering system
US11188819B2 (en) Entity model establishment
CN111930792B (en) Labeling method and device for data resources, storage medium and electronic equipment
CN109508441B (en) Method and device for realizing data statistical analysis through natural language and electronic equipment
EP3961426A2 (en) Method and apparatus for recommending document, electronic device and medium
US20220391426A1 (en) Multi-system-based intelligent question answering method and apparatus, and device
US20200218746A1 (en) Method and apparatus for presenting information
CN116501960B (en) Content retrieval method, device, equipment and medium
US20240143684A1 (en) Information presentation method and apparatus, and device and medium
US20180329877A1 (en) Multilingual content management
US20210357440A1 (en) Context-based Recommendation System for Feature Search
US20190197043A1 (en) System and method for analysis and represenation of data
JP2004021445A (en) Text data analysis system, text data analysis method and computer program
CN116821103B (en) Data processing method, device, equipment and computer readable storage medium
Xiao et al. To move or not to move: An entropy-based approach to the informativeness of research article abstracts across disciplines
US11775144B2 (en) Place-based semantic similarity platform
CN111931034A (en) Data searching method, device, equipment and storage medium
CN111460119A (en) Intelligent question and answer method and system for economic knowledge and intelligent equipment
CN114880498B (en) Event information display method and device, equipment and medium
CN114492310B (en) Text labeling method, text labeling device, electronic equipment and storage medium
Zhang et al. Automatic coding mechanisms for open-ended questions in journalism surveys: An application guide
CN117473981A (en) Statement analysis method, device, equipment and computer readable storage medium
CN116127066A (en) Text clustering method, text clustering device, electronic equipment and storage medium
Sanchez Time Series for Data Scientists: Data Management, Description, Modeling and Forecasting

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination