Method and device for automatically generating production report and electronic equipment
By constructing a sales profit characteristic matrix and using neural networks to generate sales profit reports, the problem of data inaccuracy and lag caused by manual recording and analysis is solved, the automatic generation of production reports is realized, and work efficiency and accuracy of enterprise management are improved.
Patent Information
- Application Number
- CN202410563966.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-08
- Publication Date
- 2024-08-23
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
In enterprises in the process industry, manual recording and analysis of production, energy consumption, and laboratory data results in cumbersome report design and data entry, leading to inaccurate data and lagging statistical analysis, which affects the timeliness and accuracy of enterprise production management.
By obtaining sales data, inventory data, production cost and output data, the neural network is used to construct a sales profit feature matrix, maximize class boundary expectations, generate sales profit reports, and realize the automated generation of production reports.
Standardize data collection and statistical analysis, improve work efficiency, strengthen enterprise production management, reduce the workload of manual report preparation, and improve data processing efficiency and decision-making accuracy.
Smart Images

Figure CN118536487A
Abstract
Description
Technical Field
[0001] The present application relates to the field of automation technology, and more specifically, to a method, device and electronic equipment for automatically generating production reports. Background Art
[0002] In the production process of process industry enterprises, there is a large amount of data related to production, energy consumption, testing, etc., which are manually recorded, analyzed and archived. The large-scale Excel report design, data entry, and statistical analysis have brought great inconvenience to the post personnel and enterprise managers in the production and management process of the enterprise. The preparation of various complex reports and the recording of large amounts of data have placed a heavy burden on the work of post personnel. At the same time, the inaccurate data records caused by human factors and the lag in statistical analysis results have made it impossible for management and technical personnel to achieve accurate and timely control of production. The automated design and implementation of production reports will help improve the work quality and work quality of post personnel, strengthen the management of enterprise production by enterprise managers, and further improve the level of enterprise informatization.
[0003] Therefore, a method, device and electronic device for automatically generating production reports are desired, which can standardize data collection and input standards, strengthen data statistical analysis, improve work efficiency and strengthen enterprise production management. Summary of the invention
[0004] In order to solve the above technical problems, this application is proposed. The embodiments of this application provide a method, device and electronic device for automatically generating production reports, which utilize sales data, inventory data, production cost and output data to automatically generate sales profit reports through a neural network, thereby realizing the automatic generation of production reports.
[0005] Accordingly, according to one aspect of the present application, a method for automatically generating a production report is provided, comprising: Obtain sales data, inventory data, production cost and output data; Extracting a sales information text comprehension feature matrix and a sales information association feature matrix from the sales data, the inventory data, the production cost and the output data; Constructing a sales profit feature matrix between the sales information text understanding feature matrix and the sales information association feature matrix, and performing class boundary expectation maximization on the sales profit feature matrix to obtain an optimized sales profit feature matrix; The optimized sales profit feature matrix is input into the generator neural network to obtain a sales profit report.
[0006] According to another aspect of the present application, there is provided a device for automatically generating a production report, comprising: Data acquisition module, used to obtain sales data, inventory data, production cost and output data; A feature extraction module, used for extracting a sales information text understanding feature matrix and a sales information association feature matrix from the sales data, the inventory data, the production cost and the output data; Constructing a fusion matrix module, used to construct a sales profit feature matrix between the sales information text understanding feature matrix and the sales information association feature matrix, and performing class boundary expectation maximization on the sales profit feature matrix to obtain an optimized sales profit feature matrix; The report generation module is used to input the optimized sales profit feature matrix into the generator neural network to obtain a sales profit report.
[0007] According to another aspect of the present application, an electronic device is provided, comprising: a processor; a memory, wherein computer program instructions are stored in the memory, and when the computer program instructions are executed by the processor, the processor executes the method for automatically generating production reports as described in any one of the above.
[0008] Compared with the prior art, the present application provides a method, device and electronic device for automatically generating production reports. By collecting sales data, inventory data, production costs and output data, the sales profit feature matrix is constructed using text understanding and associated feature matrices, and sales profit reports are generated through a generator neural network, thereby standardizing data collection, strengthening statistical analysis, improving work efficiency and strengthening enterprise production management. BRIEF DESCRIPTION OF THE DRAWINGS
[0009] By describing the embodiments of the present application in more detail in conjunction with the accompanying drawings, the above and other purposes, features and advantages of the present application will become more apparent. The accompanying drawings are used to provide a further understanding of the embodiments of the present application and constitute a part of the specification. Together with the embodiments of the present application, they are used to explain the present application and do not constitute a limitation of the present application. In the accompanying drawings, the same reference numerals generally represent the same components or steps.
[0010] Figure 1 The present invention is a flowchart of a method for automatically generating production reports according to an embodiment of the present application.
[0011] Figure 2 A flowchart of extracting a sales information text comprehension feature matrix and a sales information association feature matrix from the sales data, the inventory data, the production cost and the output data in the method for automatically generating a production report according to an embodiment of the present application.
[0012] Figure 3A flowchart of the method for automatically generating production reports according to an embodiment of the present application, in which the sales data, the inventory data, the production cost and the output data are respectively passed through a semantic encoder including an embedding layer to obtain a sales data feature vector, an inventory data feature vector, a production cost feature vector and an output data feature vector.
[0013] Figure 4 It is a block diagram of a device for automatically generating production reports according to an embodiment of the present application.
[0014] Figure 5 is a schematic diagram of an electronic device according to an embodiment of the present application. DETAILED DESCRIPTION
[0015] Various exemplary embodiments, features and aspects of the present application will be described in detail below with reference to the accompanying drawings. The same reference numerals in the accompanying drawings represent elements with the same or similar functions. Although various aspects of the embodiments are shown in the accompanying drawings, the drawings are not necessarily drawn to scale unless otherwise specified.
[0016] The word “exemplary” is used exclusively herein to mean “serving as an example, example, or illustration.” Any embodiment described herein as “exemplary” is not necessarily to be construed as preferred or advantageous over other embodiments.
[0017] In addition, in order to better illustrate the present application, numerous specific details are given in the following specific embodiments. It should be understood by those skilled in the art that the present application can also be implemented without certain specific details. In some examples, methods, means, components and circuits well known to those skilled in the art are not described in detail in order to highlight the subject matter of the present application.
[0018] In addition, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of the features. In the description of this application, the meaning of "plurality" is two or more, unless otherwise clearly and specifically defined.
[0019] Figure 1 The figure shows a flow chart of a method for automatically generating a production report according to an embodiment of the present application. Figure 1As shown, the method for automatically generating production reports according to the embodiment of the present application includes the steps of: S110, acquiring sales data, inventory data, production costs and output data; S120, extracting a sales information text understanding feature matrix and a sales information association feature matrix from the sales data, the inventory data, the production costs and the output data; S130, constructing a sales profit feature matrix between the sales information text understanding feature matrix and the sales information association feature matrix, and performing class boundary expectation maximization on the sales profit feature matrix to obtain an optimized sales profit feature matrix; S140, inputting the optimized sales profit feature matrix into a generator neural network to obtain a sales profit report.
[0020] In step S110 of the embodiment of the present application, sales data, inventory data, production cost and output data are obtained. It should be understood that in order to comprehensively analyze the business conditions and benefits of the enterprise, key information is obtained from different angles, including sales, inventory levels, production costs and output data, so as to make comprehensive business decisions and optimize management. The comprehensive analysis of these data can help enterprises better understand market demand, product sales, production efficiency and cost control, so as to formulate more effective business strategies and improve the competitiveness and profitability of enterprises. Specifically, through sales data analysis, enterprises can understand market demand trends, consumer preferences and competitor performance, which helps to adjust product strategies and market positioning to meet market demand. Through the analysis of sales data and inventory data, enterprises can evaluate the sales performance of different products, understand the best-selling and unsalable situations of products, and adjust product portfolios and inventory management strategies in a targeted manner. The analysis of production cost and output data can help enterprises evaluate production efficiency, find out bottlenecks and inefficient links in the production process, and then optimize production processes and improve production efficiency. The analysis of production cost data can help enterprises understand the proportion and changes of different cost items, help to formulate cost control strategies, reduce production costs and improve profitability. Comprehensive analysis of sales data, inventory data, production costs and output data can help companies fully understand their operating conditions, identify problems and advantages, and provide a basis for formulating more effective operating strategies.
[0021] In step S120 of the embodiment of the present application, a sales information text understanding feature matrix and a sales information association feature matrix are extracted from the sales data, the inventory data, the production cost and the output data. It should be understood that the text information extracted from the sales data can help enterprises understand customer needs, feedback and emotions, and the text information is converted into structured data through text mining technology to construct a text understanding feature matrix. Analyzing the emotional color in the sales information text, such as positive evaluation, negative evaluation or neutral evaluation, helps enterprises understand the popularity and customer satisfaction of the product. The key themes and topics in the sales information text can be identified through the topic modeling technology, helping enterprises grasp customer concerns and market hotspots. Relevant features such as sales, inventory turnover, cost share, output trend, etc. are extracted from sales data, inventory data, production cost and output data to construct a sales information association feature matrix. The association and regularity between different features can be found through association analysis technology, helping enterprises understand the relationship between sales data and other data, and discovering potential influencing factors and trends. Based on the sales information association feature matrix, a prediction model can be constructed to achieve sales forecasting and trend analysis, helping enterprises to formulate more effective sales strategies and plans.
[0022] Specifically, Figure 2 The diagram shows a flow chart of extracting a sales information text understanding feature matrix and a sales information association feature matrix from the sales data, the inventory data, the production cost and the output data in the production report automatic generation method according to an embodiment of the present application. Figure 2 As shown, in Figure 1 On the basis of the shown embodiment, the step S120 includes: S210, respectively passing the sales data, the inventory data, the production cost and the output data through a semantic encoder including an embedding layer to obtain a sales data feature vector, an inventory data feature vector, a production cost feature vector and an output data feature vector; S220, fusing the sales data feature vector, the inventory data feature vector, the production cost feature vector and the output data feature vector to obtain the sales information text understanding feature matrix; S230, passing the sales information text understanding feature matrix through convolution encoding to obtain the sales information association feature matrix.
[0023] Specifically, in a specific example of the present application, in step S210, the sales data, the inventory data, the production cost and the output data are respectively passed through a semantic encoder including an embedding layer to obtain a sales data feature vector, an inventory data feature vector, a production cost feature vector and an output data feature vector. It should be understood that the semantic encoder of the embedding layer can help map the original data to a lower dimensional feature space, thereby reducing the complexity of the data and extracting the most representative features. The semantic encoder can learn the implicit semantic information between the data, so as to better characterize the relationship between the data. This representation learning can improve the representation efficiency of the data and the generalization ability of the model. By converting different types of data into feature vectors, different features can be made comparable, making it easier to conduct comprehensive analysis and modeling. Fusion of feature vectors from different data sources can help reveal the inherent correlation between the data, and thus better understand the relationship between sales data, inventory data, production cost and output data. Using feature vectors to represent data can better adapt to machine learning models and improve the performance and prediction accuracy of the model. Therefore, by converting sales data, inventory data, production cost and output data into feature vectors, these data can be better used for analysis, modeling and decision-making, thereby achieving more accurate sales forecasts and business optimization.
[0024] Accordingly, Figure 3 The figure shows a flow chart of extracting multiple key frames from the monitoring video and obtaining multiple target object interest regions through target detection in the method for automatically generating production reports according to an embodiment of the present application. Figure 3 As shown, in Figure 2 Based on the shown embodiment, the step S210 includes: S2101, passing the sales data through the semantic encoder including the embedding layer to obtain the sales data feature vector; S2102, passing the inventory data through the semantic encoder including the embedding layer to obtain the inventory data feature vector; S2103, passing the production cost through the semantic encoder including the embedding layer to obtain the production cost feature vector; S2104, passing the output data through the semantic encoder including the embedding layer to obtain the output data feature vector.
[0025] Specifically, in step S2101, the sales data is passed through the semantic encoder including the embedding layer to obtain the sales data feature vector. It should be understood that the semantic encoder can help convert the sales data into a vector representation in the semantic space, so that the meaning of the sales data is clearer and more explainable. Through the embedding layer, the semantic encoder can learn the important features in the sales data and convert the original high-dimensional data into a low-dimensional feature vector with more representational capabilities. Converting sales data into feature vectors can effectively reduce the dimension of the data and simplify the complexity of data representation while retaining the key information of the data. Using feature vectors to represent sales data can improve the performance and generalization ability of the model, so that the model can better understand the sales data and make predictions or classifications. After converting the sales data into feature vectors, it is easier to visualize, cluster and analyze similarities of the data, helping users better understand the data.
[0026] Furthermore, the sales data is passed through the semantic encoder including the embedding layer to obtain the sales data feature vector, including: segmenting the sales data to obtain a word sequence; cleaning the word sequence to obtain a cleaned word sequence, wherein cleaning the word sequence includes at least one of the following operations: deleting repeated words, removing punctuation marks, and deleting special symbols; using the embedding layer of the semantic encoder to map each word in the cleaned word sequence into a word vector to obtain a word vector sequence; and using the Bert model of the semantic encoder to semantically encode the word vector sequence to generate the sales data feature vector.
[0027] Specifically, in step S2102, the inventory data is passed through the semantic encoder including the embedding layer to obtain the inventory data feature vector. It should be understood that the purpose of passing the inventory data through the semantic encoder including the embedding layer to obtain the inventory data feature vector is to convert the inventory data into a continuous, low-dimensional representation, so as to better perform data analysis, pattern recognition and prediction. By using a semantic encoder, the inventory data can be converted into a vector representation in a semantic space, which retains the semantic relationship between the data and helps to discover hidden patterns and associations between the data. Specifically, the inventory data is segmented and converted into a word sequence. The word sequence is cleaned to remove repeated words, punctuation marks and special symbols to reduce noise and improve data quality. The embedding layer of the semantic encoder is used to map the words in the cleaned word sequence into word vectors, and the text data is converted into a vector representation. A semantic encoder (such as a BERT model) is used to semantically encode the word vector sequence and convert it into a feature vector of the inventory data. The BERT model can capture the semantic relationship between words, thereby generating a richer and more accurate feature representation. By converting inventory data into feature vectors, we can achieve deeper analysis and utilization of inventory data, such as inventory forecasting, similar inventory search, inventory clustering, etc. This feature vector representation can improve the data representation ability and provide better input for subsequent data mining and machine learning tasks.
[0028] Specifically, in step S2103, the production cost is passed through the semantic encoder containing the embedding layer to obtain the production cost feature vector. It should be understood that the production cost data can be converted into a high-dimensional feature vector through the semantic encoder, so as to better represent the characteristics of the data. This helps the model to better understand the meaning and inherent structure of the production cost data. After the production cost data is converted into a feature vector, it can be more easily applied to various machine learning models, such as clustering, classification or regression models. This can improve the training efficiency and accuracy of the model. The feature vector is an abstract representation of the original data, usually with a lower dimension. This helps to reduce the complexity of the data, improve computational efficiency, and help discover potential patterns and associations in the data. Converting production cost data into a feature vector can help standardize the data, making it easier to compare and analyze. This helps to eliminate noise and unnecessary information in the data, so that the model can focus more on key features.
[0029] Specifically, in step S2104, the production data is passed through the semantic encoder including the embedding layer to obtain the production data feature vector. It should be understood that the purpose of passing the production data through the semantic encoder including the embedding layer to obtain the feature vector is to convert the production data into a more representative and comparable low-dimensional representation. Doing so helps to extract important features from the data and can reduce the dimension of the data, thereby simplifying the complexity of data processing and analysis. The generation of feature vectors can also help to better utilize the information of the production data in subsequent data analysis, model training or other tasks.
[0030] Accordingly, in a specific example of the present application, the step S220 is to fuse the sales data feature vector, the inventory data feature vector, the production cost feature vector and the output data feature vector to obtain the sales information text understanding feature matrix. It should be understood that fusing the feature vectors of different data sources together can integrate various information, making the final feature matrix more representative and comprehensive. This helps to better understand the sales situation and analyze sales data from multiple perspectives. Each data source contains different information and features, and fusing these feature vectors can enrich the feature matrix and provide more useful information to understand the complexity of the sales situation. By fusing information from different data sources, the model's understanding and prediction capabilities of the sales situation can be increased. The comprehensive features of the feature matrix can help improve the accuracy of sales forecasts. By fusing multiple feature vectors into a feature matrix, the dimensionality of the data can be reduced to a more manageable level, thereby simplifying the complexity of data processing and model training. Combining information from different data sources can help establish a more comprehensive sales data perspective and promote more in-depth analysis and decision making.
[0031] Specifically, the sales data feature vector, the inventory data feature vector, the production cost feature vector and the output data feature vector are fused to obtain the sales information text comprehension feature matrix, which is used to: arrange the sales data feature vector, the inventory data feature vector, the production cost feature vector and the output data feature vector in two dimensions to obtain the sales information text comprehension feature matrix.
[0032] Accordingly, in a specific example of the present application, in step S230, the sales information text understanding feature matrix is convolutionally encoded to obtain the sales information association feature matrix. It should be understood that the convolutional neural network (CNN) can effectively capture local features and structural information when processing text data. Through convolutional coding, important features in the sales information text can be extracted to help the system better understand the sales data. Sales information often contains rich associated information. Through convolutional coding, contextual information and relevance in the text can be captured, so as to better understand the hidden associations in the sales data. Convolutional coding can reduce the dimension and abstract the sales information text understanding feature matrix, convert complex sales information into more representative and advanced feature representations, and help improve the generalization ability and effect of the model. Through convolutional coding, the model can better identify patterns and rules in sales information, thereby improving the understanding and prediction of sales conditions. Therefore, converting the sales information text understanding feature matrix into a sales information association feature matrix through convolutional coding can improve the model's ability to process and analyze sales data, so as to better apply it to tasks such as sales forecasting and trend analysis.
[0033] Specifically, the sales information text understanding feature matrix is subjected to convolution encoding to obtain the sales information association feature matrix, including: passing the sales information text understanding feature matrix through a text convolutional neural network model as a feature extractor to obtain a sales information text understanding feature map; passing the sales information text understanding feature map through a first convolutional neural network model using a spatial attention mechanism to obtain a sales information association feature matrix.
[0034] Accordingly, the sales information text understanding feature matrix is passed through a text convolutional neural network model as a feature extractor to obtain a sales information text understanding feature map. It should be understood that the text convolutional neural network can effectively extract local features in the text when processing text data, and capture key information in the text through convolution operations and pooling operations, thereby generating a more representative feature representation. The text convolutional neural network model can learn the semantic and structural information in the text data, help understand the meaning and association in the sales information text, and better model and analyze the text. The feature map generated by the text convolutional neural network can visualize the feature representations of different levels in the text data, and help understand the abstract features learned by the model on the text data. The text convolutional neural network can convert text information into a more abstract feature representation, making the text data more suitable for subsequent classification, clustering or generation tasks. The text convolutional neural network performs well in tasks such as text classification and sentiment analysis. The model performance and generalization ability can be improved by using the text convolutional neural network to extract text features. Therefore, by using the text convolutional neural network model as a feature extractor, key features can be effectively extracted from the sales information text, which helps to understand the text content and generate representative feature maps, providing better support for subsequent sales information analysis and decision-making.
[0035] Accordingly, the sales information text understanding feature map is passed through the first convolutional neural network model using the spatial attention mechanism to obtain a sales information related feature matrix. It should be understood that the spatial attention mechanism can help the network better capture the correlation between features, thereby enhancing the representation ability of features. By introducing the attention mechanism, the network can learn which features are more important in different contexts, thereby better abstracting and representing the features of the sales information text. The attention mechanism can make the network pay more attention to the important parts in the process of feature extraction, thereby reducing the redundancy of information and improving the distinguishability and effectiveness of features. Through the spatial attention mechanism, the model can better understand the correlation between different parts in the sales information text, thereby improving the generalization ability of the model and making it perform better when processing new sales information. The sales information related feature matrix finally obtained will more accurately reflect the related features in the sales information text, which is helpful for subsequent sales information analysis and prediction tasks. Therefore, by processing the sales information text understanding feature map using the convolutional neural network model with the spatial attention mechanism, the representation ability and correlation of the features can be improved, thereby better understanding and utilizing the information in the sales information text.
[0036] Specifically, the sales information text understanding feature map is passed through the first convolutional neural network model using the spatial attention mechanism to obtain a sales information related feature matrix, including: convolution processing on the input data to generate a convolution feature map; pooling processing on the convolution feature map to generate a pooled feature map; nonlinear activation of the pooled feature map to generate an activation feature map; calculating the mean of each position of the activation feature map along the channel dimension to generate a spatial feature matrix; calculating the Softmax-like function value of each position in the spatial feature matrix to obtain a spatial score matrix; calculating the positional point multiplication of the spatial feature matrix and the spatial score map to obtain a feature matrix; wherein the feature matrix output by the last layer of the first convolutional neural network model is the sales information related feature matrix.
[0037] In step S130 of the embodiment of the present application, a sales profit feature matrix between the sales information text understanding feature matrix and the sales information association feature matrix is constructed, and the sales profit feature matrix is subjected to class boundary expectation maximization to obtain an optimized sales profit feature matrix. It should be understood that the sales information text may contain information about the sales quantity, and the sales information association feature may provide relevant sales conditions and trends, and these information combined can help calculate the sales profit. The sales information text may contain a description of the cost, and the sales information association feature may provide data related to the cost, and the gross profit or net profit of the sales can be calculated in combination with this information. The sales information text and the sales information association feature may contain information about the product price, and the sales profit rate or profit amount can be calculated in combination with this information. The sales information text and the sales information association feature may provide a description and analysis of the market environment, and these information can affect the situation of sales profit. Therefore, by constructing a sales profit feature matrix, various aspects of information in the sales data can be combined to provide a more comprehensive sales situation analysis and prediction for enterprise decision-making.
[0038] In particular, in the technical solution of the present application, it is considered to extract features from sales data, inventory data, production cost and output data, and arrange these feature vectors in two dimensions. There may be inherent correlations between different data sources, resulting in redundant information between feature vectors. The embedding layer is used to map data to a high-dimensional space to capture richer features. However, if the dimension of the embedding layer is set too high, unnecessary features may be introduced, resulting in redundancy. Convolutional neural networks (CNNs) are used to extract local features, but if the design of the convolution kernel is not fine enough, repeated features may be captured, resulting in redundancy in the feature map. The attention mechanism is designed to focus on important features, but if the attention is unevenly distributed, some features may be overemphasized while other equally important features are ignored, resulting in redundancy. As a result, the sales profit feature matrix has feature redundancy in the spatial dimension. The presence of redundant features may cause spatial nonlinear folding when the generator performs nonlinear transformations in the feature space. This means that originally linearly separable categories may need to be distinguished by more complex nonlinear transformations after feature extraction and fusion. That is, the sales profit feature matrix has feature redundancy in the spatial dimension, which causes the class boundary of the sales profit feature matrix to undergo abrupt spatial nonlinear folding, affecting the accuracy of its generation judgment. Based on this, in the technical solution of the present application, the class boundary expectation of the sales profit feature matrix is maximized.
[0039] Specifically, in one embodiment of the present application, a sales profit feature matrix is constructed between the sales information text understanding feature matrix and the sales information association feature matrix, and the sales profit feature matrix is subjected to class boundary expectation maximization to obtain an optimized sales profit feature matrix, including: fusing the sales information text understanding feature matrix and the sales information association feature matrix to obtain the sales profit feature matrix; and performing class boundary expectation maximization on the sales profit feature matrix to obtain the optimized sales profit feature matrix.
[0040] Correspondingly, in a specific example of the present application, the normalized sales profit feature matrix is subjected to class boundary expectation maximization to obtain an optimized sales profit feature matrix, including: calculating a natural exponential function value raised to the power of the eigenvalue of a predetermined position of the normalized sales profit feature matrix to obtain a first exponential function value; calculating the first exponential function value minus one and dividing it by the eigenvalue of the predetermined position of the normalized sales profit feature matrix to obtain a first quotient value, and taking the absolute value of the first quotient value to obtain a first absolute value; calculating a natural exponential function value raised to the power of the opposite number of the eigenvalue of the predetermined position of the normalized sales profit feature matrix to obtain a second exponential function value; calculating the eigenvalue of the predetermined position of the normalized sales profit feature matrix divided by the second exponential function value to obtain a second quotient value, and taking the absolute value of the second quotient value to obtain a second absolute value; calculating the sum of the first absolute value and the second absolute value, and calculating the logarithmic function value with base 2 for the sum, and then subtracting the two norms of the normalized sales profit feature matrix from the calculated logarithmic function value to obtain the eigenvalue of the predetermined position of the optimized sales profit feature matrix.
[0041] Further, the sales profit feature matrix is subjected to class boundary expectation maximization to obtain an optimized sales profit feature matrix, including: performing maximum value-based normalization processing on the sales profit feature matrix to obtain a normalized sales profit feature matrix; and performing class boundary expectation maximization on the normalized sales profit feature matrix according to the following formula, wherein the formula is:
[0042] in, represents the normalized sales profit feature matrix, Represents the normalized sales profit feature matrix The eigenvalues of the positions, represents the bi-norm of the normalized sales profit feature matrix, represents the logarithmic function value with base 2, Represents the optimized sales profit feature matrix The eigenvalue of the location.
[0043] In response to the above technical problems, the sales profit feature matrix is subjected to class boundary expectation maximization, which uses the sparsity principle to reconstruct the sales profit feature matrix and reduce the redundancy between features, thereby making the class boundaries clearer and more stable. Specifically, in the process of implementing class boundary expectation maximization, firstly, by analyzing the feature distribution of the sales profit feature matrix, those features that contribute less to the generation decision or are unstable are identified, and their weights are reduced or removed; then, a group sparsity regularization term is introduced to consider not only the sparsity of a single feature, but also the relationship and synergy between the feature groups in the sales profit feature matrix, so as to optimize the feature distribution structure of the entire sales profit feature matrix. In this way, the sales profit feature matrix converges to the decision domain under the class probability limitation based on the inductive constraint of the generation problem, thereby improving the certainty of the inductive result under the target problem.
[0044] In step S140 of the embodiment of the present application, the optimized sales profit feature matrix is input into the generator neural network to obtain a sales profit report. It should be understood that the purpose of inputting the sales profit feature matrix into the generator neural network is to generate a sales profit report using the learning ability and generation ability of the neural network. The generator neural network is usually used to generate new data samples, texts or images, etc., which meet the characteristics of the input data to some extent. Through the generator neural network, sales profit reports can be automatically generated, reducing the workload of manually compiling reports. Neural networks can learn and identify complex patterns and associations in data, thereby generating more accurate and logical reports. The generator neural network can process sales data more quickly, generate corresponding sales profit reports, and improve work efficiency. Neural networks can help discover potential relationships and patterns that may exist in sales data, thereby providing deeper insights for business decisions. In short, by inputting the sales profit feature matrix into the generator neural network, the automatic generation of sales profit reports can be achieved, data processing efficiency can be improved, and more valuable information can be provided for business decisions.
[0045] In summary, the automatic production report generation method, device and electronic device based on the embodiments of the present application collects sales data, inventory data, production cost and output data, uses text understanding and associated feature matrices to construct a sales profit feature matrix, and generates sales profit reports through a generator neural network, thereby standardizing data collection, strengthening statistical analysis, improving work efficiency, and strengthening enterprise production management.
[0046] Figure 4 Schematic diagram of a block diagram of a device for automatically generating production reports according to an embodiment of the present application. Figure 4As shown, according to the automatic production report generation device 100 of the embodiment of the present application, it includes: a data acquisition module 110, which is used to acquire sales data, inventory data, production cost and output data; a feature extraction module 120, which is used to extract a sales information text understanding feature matrix and a sales information association feature matrix from the sales data, the inventory data, the production cost and the output data; a fusion matrix construction module 130, which is used to construct a sales profit feature matrix between the sales information text understanding feature matrix and the sales information association feature matrix, and perform class boundary expectation maximization on the sales profit feature matrix to obtain an optimized sales profit feature matrix; a report generation module 140, which is used to input the optimized sales profit feature matrix into a generator neural network to obtain a sales profit report.
[0047] Here, those skilled in the art can understand that the specific functions and operations of each unit and module in the above-mentioned production report automatic generation device have been referred to above. Figures 1 to 3 The method for automatically generating production reports has been described in detail, and therefore, its repeated description will be omitted.
[0048] As described above, the production report automatic generation device 100 according to the embodiment of the present application can be implemented in various terminal devices, such as a server deployed with a production report automatic generation algorithm. In one example, the production report automatic generation device 100 can be integrated into the terminal device as a software module and / or a hardware module. For example, the production report automatic generation device 100 can be a software module in the operating system of the terminal device, or can be an application developed for the terminal device; of course, the production report automatic generation device 100 can also be one of the many hardware modules of the terminal device.
[0049] Alternatively, in another example, the production report automatic generation apparatus 100 and the terminal device may also be separate devices, and the production report automatic generation apparatus 100 may be connected to the terminal device via a wired and / or wireless network and transmit interactive information in accordance with an agreed data format.
[0050] Specifically, the present application also provides another embodiment, below, refer to Figure 5 To describe an electronic device according to an embodiment of the present application.
[0051] Figure 5 FIG. 1 is a block diagram of an electronic device according to an embodiment of the present application. Figure 5 As shown, the electronic device 50 according to an embodiment of the present disclosure includes a memory 501 and a processor 502. The components in the electronic device 50 are interconnected via a bus system and / or other forms of connection mechanisms (not shown).
[0052] The memory 501 is used to store computer-readable instructions. Specifically, the memory 501 may include one or more computer program products, and the computer program product may include various forms of computer-readable storage media, such as volatile memory and / or non-volatile memory. The volatile memory may include, for example, a random access memory (RAM) and / or a cache memory (cache), etc. The non-volatile memory may include, for example, a read-only memory (ROM), a hard disk, a flash memory, etc.
[0053] The processor 502 may be a central processing unit (CPU), a graphics processing unit (GPU), or other forms of processing units with data processing capabilities and / or instruction execution capabilities, and may control other components in the electronic device 50 to perform desired functions. In one embodiment of the present disclosure, the processor 502 is used to execute the computer-readable instructions stored in the memory 501, so that the electronic device 50 executes the reference Figure 1 and Figure 3 Describe the automated production report generation method or reference Figure 4 The invention discloses a device for automatically generating production reports.
[0054] Furthermore, it is important to understand that Figure 5 The components and structures of the electronic device 50 shown are only exemplary and non-restrictive. The electronic device 50 may also have other components and structures as needed. For example, a monitoring video acquisition device and an output device (not shown). The monitoring video acquisition device can be used to collect the monitoring video to be processed for video processing, and store the collected multiple monitoring videos in the memory 501 for use by other components. Of course, other monitoring video acquisition devices can also be used to collect the monitoring video to be processed, and send the collected multiple monitoring videos to the electronic device 50, and the electronic device 50 can store the received monitoring video in the memory 501. The output device can output various information to the outside (such as a user), such as whether the target to be detected has abnormal behavior. The output device may include one or more of a display, a speaker, a projector, a network card, etc.
[0055] In the several embodiments provided by the present invention, it should be understood that the disclosed devices, apparatuses and methods can be implemented in other ways. For example, the device embodiments described above are only schematic, for example, the division of the modules is only a logical function division, and there may be other division methods in actual implementation.
[0056] The modules described as separate components may or may not be physically separated, and the components shown as modules may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0057] In addition, each functional module in each embodiment of the present invention may be integrated into one processing unit, each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of hardware plus software functional modules.
[0058] It is obvious to those skilled in the art that the present invention is not limited to the details of the above exemplary embodiments, and that the present invention can be implemented in other specific forms without departing from the spirit or essential characteristics of the present invention.
[0059] Therefore, no matter from which point of view, the embodiments should be regarded as illustrative and non-restrictive, and the scope of the present invention is limited by the appended claims rather than the above description, so it is intended that all changes falling within the meaning and scope of the equivalent elements of the claims are included in the present invention. Any attached figure mark in the claims should not be regarded as limiting the claims involved.
[0060] In addition, it is clear that the word "comprising" does not exclude other units or steps, and the singular does not exclude the plural. Multiple units or devices stated in the system claim can also be implemented by one unit or device through software or hardware. The second and other words are used to indicate names, but not to indicate any particular order.
[0061] Finally, it should be noted that the above embodiments are only used to illustrate the technical solution of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solution of the present invention can be modified or replaced by equivalents without departing from the spirit of the technical solution of the present invention.
Claims
1. A method for automatically generating a production report, characterized in that: include: Obtain sales data, inventory data, production cost and output data; Extracting a sales information text comprehension feature matrix and a sales information association feature matrix from the sales data, the inventory data, the production cost and the output data; Constructing a sales profit feature matrix between the sales information text understanding feature matrix and the sales information association feature matrix, and performing class boundary expectation maximization on the sales profit feature matrix to obtain an optimized sales profit feature matrix; The optimized sales profit feature matrix is input into the generator neural network to obtain a sales profit report.
2. The method for automatically generating production reports according to claim 1, characterized in that: Extracting a sales information text understanding feature matrix and a sales information association feature matrix from the sales data, the inventory data, the production cost, and the output data includes: Passing the sales data, the inventory data, the production cost and the output data through a semantic encoder including an embedding layer to obtain a sales data feature vector, an inventory data feature vector, a production cost feature vector and an output data feature vector; Fusion of the sales data feature vector, the inventory data feature vector, the production cost feature vector and the output data feature vector to obtain the sales information text comprehension feature matrix; The sales information text understanding feature matrix is subjected to convolution coding to obtain the sales information association feature matrix.
3. The method for automatically generating production reports according to claim 2, characterized in that: The sales data, the inventory data, the production cost and the output data are respectively passed through a semantic encoder including an embedding layer to obtain a sales data feature vector, an inventory data feature vector, a production cost feature vector and an output data feature vector, including: Passing the sales data through the semantic encoder including the embedding layer to obtain the sales data feature vector; Passing the inventory data through the semantic encoder including the embedding layer to obtain the inventory data feature vector; Passing the production cost through the semantic encoder including the embedding layer to obtain the production cost feature vector; The production data is passed through the semantic encoder including the embedding layer to obtain the production data feature vector.
4. The method for automatically generating production reports according to claim 3, characterized in that: Passing the sales data through the semantic encoder including the embedding layer to obtain the sales data feature vector includes: Segmenting the sales data to obtain a word sequence; Cleaning the word sequence to obtain a cleaned word sequence, wherein cleaning the word sequence includes at least one of the following operations: deleting repeated words, removing punctuation marks, and deleting special symbols; Mapping each word in the cleaned word sequence into a word vector using the embedding layer of the semantic encoder to obtain a word vector sequence; The word vector sequence is semantically encoded using the Bert model of the semantic encoder to generate the sales data feature vector.
5. The method for automatically generating production reports according to claim 4, characterized in that: The sales information text understanding feature matrix is subjected to convolution coding to obtain the sales information association feature matrix, including: Passing the sales information text understanding feature matrix through a text convolutional neural network model as a feature extractor to obtain a sales information text understanding feature graph; The sales information text understanding feature map is passed through a first convolutional neural network model using a spatial attention mechanism to obtain a sales information related feature matrix.
6. The method for automatically generating production reports according to claim 5, characterized in that: Constructing a sales profit feature matrix between the sales information text understanding feature matrix and the sales information association feature matrix, and performing class boundary expectation maximization on the sales profit feature matrix to obtain an optimized sales profit feature matrix, including: The sales information text understanding feature matrix and the sales information association feature matrix are integrated to obtain the sales profit feature matrix; The class boundary expectation maximization is performed on the sales profit feature matrix to obtain the optimized sales profit feature matrix.
7. The method for automatically generating production reports according to claim 6, characterized in that: Performing class boundary expectation maximization on the sales profit feature matrix to obtain the optimized sales profit feature matrix includes: Performing a maximum value-based normalization process on the sales profit feature matrix to obtain a normalized sales profit feature matrix; The normalized sales profit feature matrix is subjected to class boundary expectation maximization to obtain an optimized sales profit feature matrix.
8. The method for automatically generating production reports according to claim 7, characterized in that: Performing class boundary expectation maximization on the normalized sales profit feature matrix to obtain an optimized sales profit feature matrix includes: Calculate a natural exponential function value raised to a power of the eigenvalue at a predetermined position of the normalized sales profit characteristic matrix to obtain a first exponential function value; Calculate the first exponential function value minus one and divide it by the eigenvalue of the predetermined position of the normalized sales profit characteristic matrix to obtain a first quotient value, and take the absolute value of the first quotient value to obtain a first absolute value; Calculating a natural exponential function value raised to a power of the inverse of the eigenvalue at the predetermined position of the normalized sales profit characteristic matrix to obtain a second exponential function value; Calculating the eigenvalue of a predetermined position of the normalized sales profit characteristic matrix and dividing it by the second exponential function value to obtain a second quotient value, and taking the absolute value of the second quotient value to obtain a second absolute value; Calculate the sum of the first absolute value and the second absolute value, calculate the logarithmic function value with base 2 for the sum, and then subtract the bi-norm of the normalized sales profit feature matrix from the calculated logarithmic function value to obtain the eigenvalue of the predetermined position of the optimized sales profit feature matrix.
9. A production report automatic generation device, characterized in that: include: Data acquisition module, used to obtain sales data, inventory data, production cost and output data; A feature extraction module, used for extracting a sales information text understanding feature matrix and a sales information association feature matrix from the sales data, the inventory data, the production cost and the output data; Constructing a fusion matrix module, used to construct a sales profit feature matrix between the sales information text understanding feature matrix and the sales information association feature matrix, and performing class boundary expectation maximization on the sales profit feature matrix to obtain an optimized sales profit feature matrix; The report generation module is used to input the optimized sales profit feature matrix into the generator neural network to obtain a sales profit report.
10. An electronic device, comprising: processor; A memory, in which computer program instructions are stored, and when the computer program instructions are executed by the processor, the processor executes the method for automatically generating production reports according to any one of claims 1 to 8.
