Information processing method and device, electronic equipment and storage medium
By converting natural language into standard program statements and executing them in the target database, the problem of high time, high cost and inflexibility in data analysis and processing in the prior art is solved, and efficient and flexible data processing and rapid iteration capabilities are achieved.
Patent Information
- Application Number
- CN202311518995.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-11-15
- Publication Date
- 2025-03-14
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The prior art is time-consuming, costly and inflexible in the data analysis and processing process, and the program code written cannot be iterated quickly to meet the changing needs of the business.
By converting the natural language input by the user into input text, performing type analysis, determining the type of task to be processed, and using the language processing model for semantic analysis, generating standard program statements, and executing them against the target database to realize data query and processing.
It realizes the efficiency and flexibility of data processing, reduces costs, avoids the time-consuming need for professional data analysts to write program code one by one, and can quickly iterate to meet business needs.
Smart Images

Figure CN119621975A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of data processing, and in particular to an information processing method, device, electronic device and storage medium. Background Art
[0002] With the upgrading of industry digitalization, traditional manufacturing needs to digitize various tasks to achieve intelligent and visual management of data in each link of the task. At present, business intelligence (BI) technology is often used for data analysis and management, specifically using modern data warehouse technology, online analysis and processing technology, data mining and data presentation technology to analyze data to realize commercial value.
[0003] However, this approach requires professional data analysts to build data warehouses and develop and write various program codes for different data processing requirements, different types of data, and different business scenarios. This is time-consuming, costly, and inflexible, and the written program codes cannot be quickly iterated to meet the ever-changing needs of the business. Summary of the invention
[0004] The present disclosure provides an information processing method, device, electronic device and storage medium to overcome the problems of high time consumption, high cost and inflexibility in the data analysis and processing process.
[0005] According to a first aspect of an embodiment of the present disclosure, there is provided an information processing method, including:
[0006] In an industrial manufacturing scenario, if a natural language input by a user is detected, the natural language is converted into input text;
[0007] Performing type analysis on the input text to determine the type of the task to be processed pointed to by the natural language;
[0008] In a case where the type of the task to be processed is a target type, using a language processing model to perform semantic analysis on the input text to obtain a first analysis result, and generating a standard program statement based on the first analysis result;
[0009] The standard program statement is executed on a target database corresponding to the target type to obtain an execution result.
[0010] In some embodiments, performing type analysis on the input text to determine the type of the task to be processed pointed to by the natural language includes:
[0011] Performing vector conversion on the input text to obtain a text vector of the input text;
[0012] Calculating the similarity between the text vector of the input text and each standard text vector in a preset corpus;
[0013] Determine a target standard text vector corresponding to which the similarity is greater than a preset similarity threshold;
[0014] The type of the task to be processed pointed to by the natural language is determined based on the target standard text vector.
[0015] In some embodiments, the using a language processing model to perform semantic analysis on the input text to obtain a first analysis result includes:
[0016] In the case where the type of the task to be processed is the target type, switching the language processing model to a target processing mode based on the target type; wherein the language processing model corresponds to a plurality of processing modes, and each of the processing modes corresponds to a different type of task to be processed;
[0017] The language processing model performs semantic analysis on the input text in the target processing mode to obtain the first analysis result.
[0018] In some embodiments, generating a standard program statement based on the first analysis result includes:
[0019] In the case where it is determined based on the first analysis result that the task to be processed is a data query task, generating a standard program statement including a first query instruction;
[0020] The step of executing the standard program statement on the target database corresponding to the task to be processed to obtain the execution result includes:
[0021] The first query data obtained by querying the target database based on the first query instruction is determined as the execution result.
[0022] In some embodiments, generating a standard program statement based on the first analysis result includes:
[0023] In the case where it is determined based on the first analysis result that the task to be processed is a data processing task, generating the standard program statement including a second query instruction and a data processing instruction;
[0024] The step of executing the standard program statement on the target database corresponding to the task to be processed to obtain the execution result includes:
[0025] Obtaining second query data from the target database based on the second query instruction;
[0026] The functional component indicated by the data processing instruction is called to process the second query data to obtain the execution result.
[0027] In some embodiments, the information processing method further includes:
[0028] Monitor the job tasks of the target type executed by the job scheduling platform in real time, and obtain the executable files corresponding to the job tasks;
[0029] Parsing the executable file to obtain the job data and the job processing logic between the job data;
[0030] The target database is established based on the job processing logic and the job data.
[0031] In some embodiments, the establishing the target database based on the job computing logic and the job data includes:
[0032] Based on the job calculation logic, determining the blood relationship between the job data;
[0033] Based on a preset data classification rule, the operation data is labeled to obtain a type label of the operation data;
[0034] The operation data with the blood relationship are stored in the same data table, and the operation data in the same data table are classified and stored according to the type label to complete the establishment of the target database.
[0035] In some embodiments, the information processing method further includes:
[0036] The execution result is converted into reply content by using the language processing model, and the reply content is output.
[0037] In some embodiments, the information processing method further includes:
[0038] In a case where the type of the task to be processed is a non-target type, switching the language processing model to a non-target processing mode based on the non-target type;
[0039] The language processing model performs semantic analysis on the input text in the non-target processing mode to obtain a second analysis result, and outputs reply content based on the second analysis result.
[0040] In some embodiments, the information processing method further includes:
[0041] Based on the operation data in the target database and the standard text in the preset corpus, generating a training input text corresponding to the operation data;
[0042] Converting the training input text into a standard data language to obtain a training output text;
[0043] The language processing model is trained using the training input text and the training output text.
[0044] In some embodiments, the information processing method further includes:
[0045] Obtaining feedback content for the reply content;
[0046] The model parameters of the language processing model are updated based on the input text, the reply content and the feedback content.
[0047] According to a second aspect of an embodiment of the present disclosure, there is provided an information processing device, including:
[0048] A conversion module, configured to, in an industrial manufacturing scenario, convert the natural language input by a user into input text if the natural language is detected;
[0049] An analysis module configured to perform type analysis on the input text to determine the type of the task to be processed pointed to by the natural language;
[0050] A first processing module is configured to, when the type of the task to be processed is a target type, perform semantic analysis on the input text using a language processing model to obtain a first analysis result, and generate a standard program statement based on the first analysis result;
[0051] The second processing module is configured to execute the standard program statement on a target database corresponding to the target type to obtain an execution result.
[0052] In some embodiments, the analysis module is further configured to:
[0053] Performing vector conversion on the input text to obtain a text vector of the input text;
[0054] Calculating the similarity between the text vector of the input text and each standard text vector in a preset corpus;
[0055] Determine a target standard text vector corresponding to which the similarity is greater than a preset similarity threshold;
[0056] The type of the task to be processed pointed to by the natural language is determined based on the target standard text vector.
[0057] In some embodiments, the first processing module is further configured to:
[0058] In the case where the type of the task to be processed is the target type, switching the language processing model to a target processing mode based on the target type; wherein the language processing model corresponds to a plurality of processing modes, and each of the processing modes corresponds to a different type of task to be processed;
[0059] The language processing model performs semantic analysis on the input text in the target processing mode to obtain the first analysis result.
[0060] In some embodiments, the first processing module is further configured to:
[0061] In the case where it is determined based on the first analysis result that the task to be processed is a data query task, generating a standard program statement including a first query instruction;
[0062] The second processing module is further configured as:
[0063] The first query data obtained by querying the target database based on the first query instruction is determined as the execution result.
[0064] In some embodiments, the first processing module is further configured to:
[0065] In the case where it is determined based on the first analysis result that the task to be processed is a data processing task, generating the standard program statement including a second query instruction and a data processing instruction;
[0066] The second processing module is further configured as:
[0067] Obtaining second query data from the target database based on the second query instruction;
[0068] The functional component indicated by the data processing instruction is called to process the second query data to obtain the execution result.
[0069] In some embodiments, the first processing module is further configured to:
[0070] Monitor the job tasks of the target type executed by the job scheduling platform in real time, and obtain the executable files corresponding to the job tasks;
[0071] Parsing the executable file to obtain the job data and the job processing logic between the job data;
[0072] The target database is established based on the job processing logic and the job data.
[0073] In some embodiments, the first processing module is further configured to:
[0074] Based on the job calculation logic, determining the blood relationship between the job data;
[0075] Based on a preset data classification rule, the operation data is labeled to obtain a type label of the operation data;
[0076] The operation data with the blood relationship are stored in the same data table, and the operation data in the same data table are classified and stored according to the type label to complete the establishment of the target database.
[0077] In some embodiments, the second processing module is further configured to:
[0078] The execution result is converted into reply content by using the language processing model, and the reply content is output.
[0079] In some embodiments, the first processing module is further configured to:
[0080] In a case where the type of the task to be processed is a non-target type, switching the language processing model to a non-target processing mode based on the non-target type;
[0081] The language processing model performs semantic analysis on the input text in the non-target processing mode to obtain a second analysis result, and outputs reply content based on the second analysis result.
[0082] In some embodiments, the first processing module is further configured to:
[0083] Based on the operation data in the target database and the standard text in the preset corpus, generating a training input text corresponding to the operation data;
[0084] Converting the training input text into a standard data language to obtain a training output text;
[0085] The language processing model is trained using the training input text and the training output text.
[0086] In some embodiments, the second processing module is further configured to:
[0087] Obtaining feedback content for the reply content;
[0088] The model parameters of the language processing model are updated based on the input text, the reply content and the feedback content.
[0089] According to a third aspect of an embodiment of the present disclosure, there is provided an electronic device, including:
[0090] processor;
[0091] a memory configured to store processor-executable instructions;
[0092] Wherein, the processor is configured to execute the information processing method described in the first aspect above when calling the executable instructions in the memory.
[0093] According to a fourth aspect of an embodiment of the present disclosure, a non-temporary computer-readable storage medium is provided. When instructions in the storage medium are executed by a processor of an electronic device, the electronic device can execute the information processing method described in the first aspect above.
[0094] The technical solution provided by the embodiments of the present disclosure may have the following beneficial effects:
[0095] The information processing method disclosed in the present invention converts the natural language input by the user into an input text, performs type analysis on the input text, determines the type of the task to be processed pointed to by the input natural language, and when the type of the task to be processed is a target type, uses a language processing model to perform semantic analysis on the input text to obtain a first analysis result, and at the same time, the language processing model generates a standard program statement based on the first analysis result, executes the standard program statement for the target database corresponding to the target type, and obtains an execution result. The present invention determines the type of the task to be processed pointed to by the natural language through type analysis, so that the subsequent language processing model uses different methods to process different types of tasks to be processed, so that the language processing model can adapt to various tasks in industrial manufacturing scenarios. For the task to be processed of the target type, the language processing model can directly generate the corresponding standard program statement and execute it to the target database, that is, the language processing model can directly receive user requirements and perform data query, analysis, processing and other tasks based on user requirements, with high processing efficiency and accuracy, and can realize rapid access and rapid iteration of data, reduce costs, and avoid the need for professional data analysts to write program codes one by one for each requirement to process, resulting in high time consumption, high cost and inflexibility.
[0096] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0097] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the present disclosure.
[0098] Figure 1 is a flowchart of an information processing method according to an exemplary embodiment Figure 1 .
[0099] Figure 2is a flowchart of an information processing method according to an exemplary embodiment Figure 2 .
[0100] Figure 3 The figure is a schematic diagram of a data dictionary of a target database according to an exemplary embodiment.
[0101] Figure 4 It is a schematic diagram of a management architecture of a target database according to an exemplary embodiment.
[0102] Figure 5 It is a schematic diagram of the architecture among a language processing model, functional components and a target database in an information processing method according to an exemplary embodiment.
[0103] Figure 6 It is a schematic diagram of the structure of an information processing device according to an exemplary embodiment.
[0104] Figure 7 The diagram is a schematic structural diagram of an electronic device according to an exemplary embodiment. DETAILED DESCRIPTION
[0105] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present disclosure. Instead, they are merely examples of devices and methods consistent with some aspects of the present disclosure as detailed in the appended claims.
[0106] In the specification, unless otherwise clearly stated, the terms "first" and "second" are used only to describe and distinguish constituent elements, and should not be understood as indicating an order. Unless otherwise clearly stated, the terms "connected", "fixed", etc. should be understood as having a broad meaning, including but not limited to directly, indirectly, detachably "connected", "fixed", etc.
[0107] Figure 1 The following is a flow chart of an information processing method according to an exemplary embodiment. Figure 1 ,like Figure 1 As shown, the method mainly includes the following steps:
[0108] In step 101, in an industrial manufacturing scenario, if natural language input by a user is detected, the natural language is converted into input text.
[0109] In this embodiment, the input natural language may be input in the form of text, voice, etc., or in the form of an image, video, etc. containing the natural language. When the natural language is input in the form of voice, the voice may be converted into input text. When the natural language is input in the form of an image or video, the text in the image or the sound or subtitle in the video may be extracted and converted into input text. Of course, the natural language may also be input in a combination of multiple forms such as text, voice, image, video, etc.
[0110] In step 102, the input text is subjected to type analysis to determine the type of the task to be processed pointed to by the natural language.
[0111] In this embodiment, each input natural language represents one or more pending tasks, and each pending task belongs to a different task type. For example, in the field of industrial manufacturing, the task types of pending tasks can be divided into target type and non-target type. The pending tasks of the target type can be: querying the yield rate of product A manufactured in the last month, querying the manufacturing parameters involved in the last production link of product B, and counting the shipment volume of products A, B, and C in the last month, etc., that is, the pending tasks of the target type are tasks related to the data involved in the factory production process.
[0112] Non-target tasks to be processed may include: querying today's weather conditions, querying the profile of the company with the most advanced technology in the field of industrial manufacturing, converting data tables A, B, and C into line graphs, etc. In other words, non-target tasks to be processed are tasks that are unrelated to the data involved in the factory's production and manufacturing process.
[0113] Of course, the division of task types exemplified above is only one embodiment of the present disclosure, and other division criteria may be determined based on factors such as the granularity of the processed information, data type, data volume, frequency of use, etc. For example, the target type of pending tasks may be further divided into product type pending tasks (tasks related to product data) and personnel type pending tasks (tasks related to the factory's personnel data).
[0114] In step 103, when the type of the task to be processed is the target type, a language processing model is used to perform semantic analysis on the input text to obtain a first analysis result, and a standard program statement is generated based on the first analysis result.
[0115] In step 104, the standard program statement is executed for the target database corresponding to the target type to obtain an execution result.
[0116] In this embodiment, the target type of to-be-processed task refers to a task involving processing data in a target database, and the target database is a private database in the field of industrial manufacturing that is kept confidential and not open to the outside world, and the data stored in it is private data. For example, when the information processing method is applied to manufacturing plant A, the target database is a private database of plant A that stores the internal manufacturing data of plant A.
[0117] That is, the target type of pending tasks is a task involving private data in the field of industrial manufacturing, and the target database corresponding to the target type is a database of private data in the field of industrial manufacturing. Correspondingly, the non-target type of pending tasks is a task that does not involve private data in the field of industrial manufacturing.
[0118] Then, when it is determined that the task type of the task to be processed is the target type, the language processing model is used to perform semantic analysis on the input text to obtain a first analysis result representing the true content and true intention of the natural language. Among them, semantic analysis can include: segmenting each word in the text, determining the relationship between each word, determining the part of speech of each word, determining the sentiment of the entire text, and other analysis contents. In the process of semantic analysis, the analysis can be carried out with the help of an open source corpus and a data dictionary of the target database to improve the efficiency of semantic analysis. It is understandable that users may use the internal language or internal terms of manufacturing enterprises, factories, industrial organizations, etc. in the process of inputting natural language. Then, through the data dictionary of the target database (a private database belonging to the manufacturing industry, factory, industrial organization, etc.), the language processing model can fully understand the user's true intention and obtain a more accurate first analysis result.
[0119] Based on the first analysis result, a standard program statement that can be executed on the target database is generated to obtain the execution result of the task to be processed. The programming language type of the standard program statement is a programming language type that the target database can support and accept. For example, when the target database is a SQL Servers database, the standard program statement generated by the language processing model can be SQL language (Structured Query Language); when the target database is an Oracle database, the standard program statement generated by the language processing model can be PL / SQL language (Procedure Language / Structured Query Language), Python language, C language, etc.
[0120] That is to say, the present disclosure can convert natural language into standard program statements, and complete the pending tasks pointed to by the natural language by executing the standard program statements. For users, there is no need to write program code or call database execution, and they can get the results by directly inputting the natural language corresponding to the pending tasks, which improves the efficiency of data management, analysis, and processing, reduces manpower and computing costs, and is more intelligent and efficient.
[0121] For example, the input natural language is "What is the daily quantity of product A produced in the past five days?", and the converted input text is "What is the daily quantity of product A produced from October 1, 2023 to October 5, 2023?", and the input text is type analyzed to determine that the type of the task to be processed pointed to by the natural language is the target type, and then the language processing model is used to perform semantic analysis on the input text to obtain a first analysis result, and based on the first analysis result, a standard program statement corresponding to the task to be processed (i.e., what is the daily quantity of product A produced from October 1, 2023 to October 5, 2023?) is generated, and the standard program statement is executed in the target database to obtain an execution result (i.e., on October 1, the number of product A generated is 100; on October 2, the number of product A generated is 0; on October 3, the number of product A generated is 200; on October 4, the number of product A generated is 98; on October 5, the number of product A generated is 90).
[0122] Of course, after obtaining the execution result, the language processing model can convert the execution result into a reply content and output it to the user for display. The reply content can be in the form of any one or more combinations of text, voice, chart, etc.
[0123] It should be noted that the process of converting natural language into input text, performing type analysis on the input text, etc. can be implemented using a language processing model, or other models or other methods, and the present disclosure does not limit this.
[0124] In addition, the language processing model can be any one or more combinations of convolutional neural networks, recurrent neural networks, long short-term memory networks, support vector machines, extreme learning machines, etc.
[0125] In some embodiments, Figure 2 As shown, step 102 includes:
[0126] In step 1021, the input text is vectorized to obtain a text vector of the input text;
[0127] In step 1022, the similarity between the text vector of the input text and each standard text vector in the preset corpus is calculated;
[0128] In step 1023, a target standard text vector corresponding to a similarity greater than a preset similarity threshold is determined;
[0129] In step 1024 , the type of the task to be processed pointed to by the natural language is determined based on the target standard text vector.
[0130] In this embodiment, since the natural language input by the user is generally more colloquial and diverse, and the meaning and content of natural language expressed in different ways are actually essentially the same, it is possible to determine whether the natural language expressed in different ways has the same content and the same meaning through vector similarity, thereby improving the accuracy of information processing and user experience, so that users do not need to input natural language according to a fixed expression.
[0131] For example: "What is the product yield rate in the past 5 days?", "What is the product qualification rate in the past 5 days?", "What is the product yield rate for 5 days from October 1st to today?" Although these input texts have different natural languages, the meaning and content they actually express are the same.
[0132] Specifically, vector conversion is to represent text information into a vector that can express the semantics of the text, and to use a numerical vector to represent the semantics of the text. The vector conversion method can be the One Hot Model, Bag of Words Model, TF-IDF, N-Gram, Word2vec, Doc2vec and other methods.
[0133] When calculating the similarity between the text vector of the input text and each standard text vector in the preset expectation library, the similarity between the text vector of the input text and the standard text vector can be measured by calculating the cosine similarity of the two vectors, the edit distance of the two vectors, the Euclidean distance of the two vectors, and other methods. The preset corpus is a corpus pre-established by combining open source data, target database, data dictionary of the target database, and other data. The standard text vector in the corpus is the vector corresponding to the standard text, and the standard text is the text corresponding to the most frequently used, most concise, and most accurate expression by users. The data dictionary of the target database is in the form of Figure 3 shown.
[0134] Based on the similarity, the target standard text vector corresponding to the input text can be determined, and the type of the task to be processed can be determined by performing type analysis on the target standard text vector. When performing type analysis, only the keyword vector in the target standard text vector can be determined and analyzed, and the type of the task to be processed can be determined based on the task type to which the keyword vector belongs.
[0135] For example, if the keywords of the input texts "How is the weather today", "What is the weather trend in the past 5 days", and "How is the weather in the next week" are all "weather", then the keyword vector based on the keyword "weather" can determine that the task to be processed is a non-target type task. For another example, if the keywords of the input texts "What is the yield rate of product A", "What is the yield rate of product B", and "What is the yield rate trend of product C in the past month" are all "yield rate", then the keyword vector based on the keyword "yield rate" can determine that the task to be processed is a target type task.
[0136] In some embodiments, in step 103, a language processing model is used to perform semantic analysis on the input text, and obtaining a first analysis result includes: when the type of the task to be processed is a target type, the language processing model is switched to a target processing mode based on the target type; wherein the language processing model corresponds to multiple processing modes, and each processing mode corresponds to a different type of task to be processed; the language processing model performs semantic analysis on the input text in the target processing mode to obtain a first analysis result.
[0137] In this embodiment, the processing mode of the language processing model may include a target processing mode and a non-target processing mode. Based on the type of task to be processed pointed to by the input natural language, the processing mode of the language processing model can be switched to a corresponding mode. Under different processing modes, the semantic analysis method of the language processing model is different. It is understandable that for professional problems and professional languages in the field of industrial manufacturing, conventional semantic analysis methods are difficult to accurately understand their meaning, but conventional semantic analysis methods are sufficient for the analysis of daily problems and daily language.
[0138] For example, for the two output texts "Which pop songs are more cheerful" and "What is the SNR of product A", the first input text needs to analyze the sentiment of the text when performing semantic analysis, while the second input text does not need to analyze the sentiment of the text. In addition, the semantic analysis method corresponding to the first input text may find it difficult to understand the meaning of "SNR", while the semantic analysis method corresponding to the second input text can easily understand "SNR" as "signal-to-noise ratio".
[0139] In some embodiments, in step 103, generating a standard program statement based on the first analysis result includes: generating a standard program statement including a first query instruction when the task to be processed is determined to be a data query task based on the first analysis result. In step 104, executing the standard program statement for a target database corresponding to the task to be processed to obtain an execution result includes: determining the first query data obtained from the target database based on the first query instruction as the execution result.
[0140] In this embodiment, the target type of pending tasks can also be divided into data query tasks and data processing tasks. The data query task only needs to obtain the specified data from the target database and output it. The data processing task needs to obtain the specified data from the target database, process the data, and then output the processing result. Therefore, when it is determined that the type of the pending task is the target type and it is a data query task, a standard program statement containing a first query instruction is generated, and the execution result is obtained by querying from the target database based on the first query instruction. Of course, after obtaining the execution result, the language processing model can convert the execution result into a reply content and output it to the user for display. The reply content can be in the form of a combination of any one or more methods such as text, voice, and charts.
[0141] In some embodiments, in step 103, generating a standard program statement based on the first analysis result includes: generating a standard program statement including a second query instruction and a data processing instruction when the task to be processed is determined to be a data processing task based on the first analysis result. In step 104, executing the standard program statement for the target database corresponding to the task to be processed to obtain an execution result includes: obtaining second query data from the target database based on the second query instruction; and calling the functional component indicated by the data processing instruction to process the second query data to obtain an execution result.
[0142] In this embodiment, when it is determined that the type of the task to be processed is the target type and is a data processing task, a standard program statement including a second query instruction and a data processing instruction is generated, data is queried from the target database based on the first query instruction, and the corresponding functional component is called based on the data processing instruction to process the data to obtain an execution result. Among them, the functional component is a pre-set component that can perform various data processing functions in advance, such as: a line chart component (which can process data into a line chart form) and a yield component (which can calculate the yield of data according to a preset yield calculation rule).
[0143] Of course, after obtaining the execution result, the language processing model can convert the execution result into a reply content and output it to the user for display. The reply content can be in the form of any one or more combinations of text, voice, chart, etc.
[0144] In addition, the processed data obtained by calling the functional component to process the query data can be stored in the target database, so that the next time the same or similar tasks to be processed can be directly queried and outputted without repeated calculation.
[0145] Based on the above embodiments, the present disclosure can convert natural language into standard program statements when the task to be processed pointed to by the natural language is of a target type, and call the target database and / or functional components based on the standard program statements to perform data query and / or data processing, so that users can complete any data task through natural language.
[0146] In some embodiments, the information processing method also includes: real-time monitoring of job tasks of the target type executed by the job scheduling platform, and obtaining executable files corresponding to the job tasks; parsing the executable files to obtain job data and job processing logic between the job data; and establishing a target database based on the job processing logic and the job data.
[0147] In this embodiment, before the language processing model processes the input text, a target database needs to be established in advance. Since the execution of various industrial tasks (job tasks) in the field of industrial manufacturing requires the job scheduling platform to manage, allocate, and execute, the executable files (such as script files) processed by the job scheduling platform can be obtained in real time. Parse the executable file to obtain the job data and the job processing logic between the job data. The job data may include original data, intermediate data generated during the job process, result data obtained after the job is completed, and the like. The job data can be in the form of a data table, a data field, a data model, and the like. The job processing logic includes: adding, deleting, modifying, checking, and the like.
[0148] In some embodiments, a target database is established based on job calculation logic and job data, including: determining the blood relationship between job data based on the job calculation logic; labeling the job data based on preset data classification rules to obtain type labels for the job data; storing job data with blood relationships in the same data table, and classifying and storing the job data in the same data table according to type labels to complete the establishment of the target database.
[0149] In this embodiment, data lineage refers to the natural link between data during the entire life cycle of data, from generation, processing, processing, integration, circulation to final extinction. Therefore, the lineage relationship between job data can be determined based on the job calculation logic. Based on the lineage relationship and type label between job data, the job data can be stored by lineage and type. Figure 4 As shown, a management architecture diagram of a target database is shown in an exemplary embodiment.
[0150] The job data in the same data table can be understood as data corresponding to the same job task. Different job tasks also have certain associations, so different data tables are not completely independent, but are related to each other. That is, according to the association between job tasks, the data tables corresponding to each job task can be associated and stored. The target database established in this way can greatly improve the efficiency of data query and data processing.
[0151] In some embodiments, the information processing method also includes: when the type of task to be processed is a non-target type, switching the language processing model to a non-target processing mode based on the non-target type; the language processing model performs semantic analysis on the input text in the non-target processing mode to obtain a second analysis result, and outputs reply content based on the second analysis result.
[0152] In this embodiment, non-target type pending tasks refer to tasks that do not involve processing data in the target database (private database). That is, for non-target type pending tasks, the language processing model can directly perform semantic analysis and output reply content, or use an open source database to perform semantic analysis and output reply content.
[0153] In some embodiments, the information processing method further includes: generating training input text corresponding to the job data based on the job data in the target database and the standard text in the preset corpus; converting the training input text into the standard data language to obtain training output text; and training the language processing model using the training input text and the training output text.
[0154] In this embodiment, when training the language processing model in the target processing mode, the operation data and the standard text can be combined to generate the training input text corresponding to the operation data, and the training input text can be converted into the standard program language to obtain the training output text, and the language processing model is trained based on the training input text and the training output text. The training method can be trained by using the commonly used gradient descent method.
[0155] It should be noted that the language processing model in the non-target processing mode can directly adopt the commonly used large language model (LLM). On this basis, the present disclosure only needs to train the large language model so that it has the processing capability in the target processing mode.
[0156] In some embodiments, the information processing method further includes: obtaining feedback content for the reply content; and updating model parameters of the language processing model based on the input text, the reply content and the feedback content.
[0157] In this embodiment, for the trained language processing model, while continuously processing the tasks to be processed, feedback content on the reply content can be obtained in real time or periodically to update the model parameters of the language processing model, so that the language processing model is more intelligent for each user.
[0158] Figure 5 It is an architectural diagram of the language processing model, functional components and target database in an information processing method according to an exemplary embodiment, wherein the functional component set includes multiple functional components, and each functional component is used to process the data with related functions, such as yield calculation processing, CT indicator calculation processing, and UPH indicator calculation processing.
[0159] Figure 6 is an information processing device according to an exemplary embodiment, such as Figure 6 As shown, the information processing device includes:
[0160] The conversion module 601 is configured to convert the natural language input by the user into input text if the natural language input by the user is detected in the industrial manufacturing scenario;
[0161] An analysis module 602 is configured to perform type analysis on the input text to determine the type of the task to be processed pointed to by the natural language;
[0162] The first processing module 603 is configured to, when the type of the task to be processed is a target type, perform semantic analysis on the input text using a language processing model to obtain a first analysis result, and generate a standard program statement based on the first analysis result;
[0163] The second processing module 604 is configured to execute the standard program statement on the target database corresponding to the target type to obtain an execution result.
[0164] In some embodiments, the analysis module 602 is further configured to:
[0165] Performing vector conversion on the input text to obtain a text vector of the input text;
[0166] Calculating the similarity between the text vector of the input text and each standard text vector in a preset corpus;
[0167] Determine a target standard text vector corresponding to which the similarity is greater than a preset similarity threshold;
[0168] The type of the task to be processed pointed to by the natural language is determined based on the target standard text vector.
[0169] In some embodiments, the first processing module 603 is further configured to:
[0170] In the case where the type of the task to be processed is the target type, switching the language processing model to a target processing mode based on the target type; wherein the language processing model corresponds to a plurality of processing modes, and each of the processing modes corresponds to a different type of task to be processed;
[0171] The language processing model performs semantic analysis on the input text in the target processing mode to obtain the first analysis result.
[0172] In some embodiments, the first processing module 603 is further configured to:
[0173] In the case where it is determined based on the first analysis result that the task to be processed is a data query task, generating a standard program statement including a first query instruction;
[0174] The second processing module 604 is further configured to:
[0175] The first query data obtained by querying the target database based on the first query instruction is determined as the execution result.
[0176] In some embodiments, the first processing module 603 is further configured to:
[0177] In the case where it is determined based on the first analysis result that the task to be processed is a data processing task, generating the standard program statement including a second query instruction and a data processing instruction;
[0178] The second processing module 604 is further configured to:
[0179] Obtaining second query data from the target database based on the second query instruction;
[0180] The functional component indicated by the data processing instruction is called to process the second query data to obtain the execution result.
[0181] In some embodiments, the first processing module 603 is further configured to:
[0182] Monitor the job tasks of the target type executed by the job scheduling platform in real time, and obtain the executable files corresponding to the job tasks;
[0183] Parsing the executable file to obtain the job data and the job processing logic between the job data;
[0184] The target database is established based on the job processing logic and the job data.
[0185] In some embodiments, the first processing module 603 is further configured to:
[0186] Based on the job calculation logic, determining the blood relationship between the job data;
[0187] Based on a preset data classification rule, the operation data is labeled to obtain a type label of the operation data;
[0188] The operation data with the blood relationship are stored in the same data table, and the operation data in the same data table are classified and stored according to the type label to complete the establishment of the target database.
[0189] In some embodiments, the second processing module 604 is further configured to:
[0190] The execution result is converted into reply content by using the language processing model, and the reply content is output.
[0191] In some embodiments, the first processing module 603 is further configured to:
[0192] In a case where the type of the task to be processed is a non-target type, switching the language processing model to a non-target processing mode based on the non-target type;
[0193] The language processing model performs semantic analysis on the input text in the non-target processing mode to obtain a second analysis result, and outputs reply content based on the second analysis result.
[0194] In some embodiments, the first processing module 603 is further configured to:
[0195] Based on the operation data in the target database and the standard text in the preset corpus, generating a training input text corresponding to the operation data;
[0196] Converting the training input text into a standard data language to obtain a training output text;
[0197] The language processing model is trained using the training input text and the training output text.
[0198] In some embodiments, the second processing module 604 is further configured to:
[0199] Obtaining feedback content for the reply content;
[0200] The model parameters of the language processing model are updated based on the input text, the reply content and the feedback content.
[0201] like Figure 7As shown, the embodiment of the present disclosure further provides an electronic device 700, including:
[0202] Memory 704 for storing processor executable instructions;
[0203] A processor 720 connected to the memory 704;
[0204] Among them, the processor 720 is configured to execute the information processing method provided by any of the aforementioned technical solutions.
[0205] A block diagram of an electronic device 700 is shown according to an exemplary embodiment. For example, the electronic device 700 may be a smart phone, a tablet computer, a notebook computer, a portable learning machine, and the like.
[0206] refer to Figure 7 , the electronic device 700 may include one or more of the following components: a processing component 702 , a memory 704 , a power component 706 , a multimedia component 708 , an audio component 710 , an input / output (I / O) interface 712 , a sensor component 714 , and a communication component 718 .
[0207] The processing component 702 generally controls the overall operation of the electronic device 700, such as operations associated with display, phone calls, data communications, camera operations, and recording operations. The processing component 702 may include one or more processors 720 to execute instructions to complete all or part of the steps of the above-mentioned method. In addition, the processing component 702 may include one or more modules to facilitate the interaction between the processing component 702 and other components. For example, the processing component 702 may include a multimedia module to facilitate the interaction between the multimedia component 708 and the processing component 702.
[0208] The memory 704 is configured to store various types of data to support operations on the electronic device 700. Examples of such data include instructions for any application or method operating on the electronic device 700, contact data, phone book data, messages, pictures, videos, etc. The memory 704 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk.
[0209] The power supply component 706 provides power to the various components of the electronic device 700. The power supply component 706 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power to the electronic device 700.
[0210] The multimedia component 708 includes a screen that provides an output interface between the electronic device 700 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundaries of the touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 708 includes a front camera and / or a rear camera. When the electronic device 700 is in an operating mode, such as a shooting mode or a video mode, the front camera and / or the rear camera may receive external multimedia data. Each front camera and rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.
[0211] The audio component 710 is configured to output and / or input audio signals. For example, the audio component 710 includes a microphone (MIC), and when the electronic device 700 is in an operating mode, such as a call mode, a recording mode, and a voice recognition mode, the microphone is configured to receive an external audio signal. The received audio signal can be further stored in the memory 704 or sent via the communication component 718. In some embodiments, the audio component 710 also includes a speaker for outputting audio signals.
[0212] I / O interface 712 provides an interface between processing component 702 and peripheral interface modules, such as keyboards, click wheels, buttons, etc. These buttons may include but are not limited to: a home button, a volume button, a start button, and a lock button.
[0213] The sensor assembly 714 includes one or more sensors for providing various aspects of status assessment for the electronic device 700. For example, the sensor assembly 714 can detect the open / closed state of the electronic device 800, the relative positioning of components, such as the display and keypad of the electronic device 700, and the sensor assembly 714 can also detect the position change of the electronic device 700 or a component of the electronic device 700, the presence or absence of user contact with the electronic device 700, the orientation or acceleration / deceleration of the electronic device 700, and the temperature change of the electronic device 700. The sensor assembly 714 may include a proximity sensor configured to detect the presence of nearby objects without any physical contact. The sensor assembly 714 may also include an optical sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 714 may also include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
[0214] The communication component 718 is configured to facilitate wired or wireless communication between the electronic device 700 and other devices. The electronic device 700 can access a wireless network based on a communication standard, such as WiFi, 2G or 3G, or a combination thereof. In an exemplary embodiment, the communication component 718 receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 718 also includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology and other technologies.
[0215] In an exemplary embodiment, the electronic device 700 may be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components to perform the above methods.
[0216] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory 704 including instructions, and the instructions can be executed by a processor 720 of an electronic device 700 to perform the above method. For example, the non-transitory computer-readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc.
[0217] An embodiment of the present application provides a non-temporary computer-readable storage medium. When the instructions in the storage medium are executed by a processor of a computer, the computer can execute the information processing method described in one or more of the aforementioned technical solutions.
[0218] Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the specification and practicing the invention disclosed herein. The present disclosure is intended to cover any variations, uses or adaptations of the present disclosure that follow the general principles of the present disclosure and include common knowledge or customary techniques in the art that are not disclosed in the present disclosure. The description and examples are to be considered exemplary only, and the true scope and spirit of the present disclosure are indicated by the following claims.
[0219] It should be understood that the present disclosure is not limited to the exact structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.
Claims
1. An information processing method, characterized in that: include: In an industrial manufacturing scenario, if a natural language input by a user is detected, the natural language is converted into input text; Performing type analysis on the input text to determine the type of the task to be processed pointed to by the natural language; In a case where the type of the task to be processed is a target type, using a language processing model to perform semantic analysis on the input text to obtain a first analysis result, and generating a standard program statement based on the first analysis result; The standard program statement is executed on a target database corresponding to the target type to obtain an execution result.
2. The information processing method according to claim 1, characterized in that: The performing type analysis on the input text to determine the type of the task to be processed pointed to by the natural language includes: Performing vector conversion on the input text to obtain a text vector of the input text; Calculating the similarity between the text vector of the input text and each standard text vector in a preset corpus; Determine a target standard text vector corresponding to which the similarity is greater than a preset similarity threshold; The type of the task to be processed pointed to by the natural language is determined based on the target standard text vector.
3. The information processing method according to claim 1, characterized in that: The using the language processing model to perform semantic analysis on the input text to obtain a first analysis result includes: In the case where the type of the task to be processed is the target type, switching the language processing model to a target processing mode based on the target type; wherein the language processing model corresponds to a plurality of processing modes, and each of the processing modes corresponds to a different type of task to be processed; The language processing model performs semantic analysis on the input text in the target processing mode to obtain the first analysis result.
4. The information processing method according to any one of claims 1 to 3, characterized in that: The generating a standard program statement based on the first analysis result includes: In the case where it is determined based on the first analysis result that the task to be processed is a data query task, generating a standard program statement including a first query instruction; The step of executing the standard program statement on the target database corresponding to the task to be processed to obtain the execution result includes: The first query data obtained by querying the target database based on the first query instruction is determined as the execution result.
5. The information processing method according to any one of claims 1 to 3, characterized in that: The generating a standard program statement based on the first analysis result includes: In the case where it is determined based on the first analysis result that the task to be processed is a data processing task, generating the standard program statement including a second query instruction and a data processing instruction; The step of executing the standard program statement on the target database corresponding to the task to be processed to obtain the execution result includes: Obtaining second query data from the target database based on the second query instruction; The functional component indicated by the data processing instruction is called to process the second query data to obtain the execution result.
6. The information processing method according to claim 1, characterized in that: The method further comprises: Monitor the job tasks of the target type executed by the job scheduling platform in real time, and obtain the executable files corresponding to the job tasks; Parsing the executable file to obtain the job data and the job processing logic between the job data; The target database is established based on the job processing logic and the job data.
7. The information processing method according to claim 6, characterized in that: The establishing of the target database based on the job calculation logic and the job data includes: Based on the job calculation logic, determining the blood relationship between the job data; Based on a preset data classification rule, the operation data is labeled to obtain a type label of the operation data; The operation data with the blood relationship are stored in the same data table, and the operation data in the same data table are classified and stored according to the type label to complete the establishment of the target database.
8. The information processing method according to claim 1, characterized in that: The method further comprises: Converting the execution result into reply content by using the language processing model, and outputting the reply content; And / or, the method further comprises: In the case where the type of the task to be processed is a non-target type, switching the language processing model to a non-target processing mode based on the non-target type; the language processing model performs semantic analysis on the input text in the non-target processing mode to obtain a second analysis result, and outputs a reply content based on the second analysis result; And / or, the method further comprises: Based on the operation data in the target database and the standard text in the preset corpus, generating a training input text corresponding to the operation data; Converting the training input text into a standard data language to obtain a training output text; The language processing model is trained using the training input text and the training output text.
9. The information processing method according to claim 8, characterized in that: The method further comprises: Obtaining feedback content for the reply content; The model parameters of the language processing model are updated based on the input text, the reply content and the feedback content.
10. An information processing device, characterized in that: include: A conversion module, configured to, in an industrial manufacturing scenario, convert the natural language into input text if natural language input by a user is detected; An analysis module configured to perform type analysis on the input text to determine the type of the task to be processed pointed to by the natural language; A first processing module is configured to, when the type of the task to be processed is a target type, perform semantic analysis on the input text using a language processing model to obtain a first analysis result, and generate a standard program statement based on the first analysis result; The second processing module is configured to execute the standard program statement on a target database corresponding to the target type to obtain an execution result.
11. An electronic device, characterized in that: include: processor; a memory configured to store processor-executable instructions; The processor is configured to execute the information processing method according to any one of claims 1 to 9 when calling the executable instructions in the memory.
12. A non-transitory computer-readable storage medium, when instructions in the storage medium are executed by a processor of an electronic device, the electronic device is enabled to execute the information processing method according to any one of claims 1 to 9.
Citation Information
Patent Citations
Self-service query statistics analysis method based on natural language processing
CN107818148A
Information processing method and device, electronic equipment and storage medium
CN113535931A
Data query method and device, equipment and storage medium
CN114756655A
Data analysis method and device for knowledge graph, equipment and storage medium
CN116578722A
Device, method, and program for enhancing output content through iterative generation
US20210174801A1