Data analysis method and device, storage medium and electronic device

By receiving analysis requests, matching process logs and selecting analysis algorithms, the problem that data analysis methods in the existing technology are difficult to cope with diversified needs, and flexible data analysis and user experience improvement are achieved.

CN113342770BActive Publication Date: 2024-12-20CHINA COMMERCE NETWORKS (SHANGHAI) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202110706034.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-06-24
Publication Date
2024-12-20
Estimated Expiration
2041-06-24

AI Technical Summary

Technical Problem

Existing data analysis methods are difficult to flexibly respond to the diverse analysis needs of product process data, resulting in poor user experience.

Method used

By receiving analysis requests, determine product identification code and analyze data attributes, match process logs and target process logs, combine process information, select appropriate analysis algorithms for data analysis, and display the results in a user-specified way.

Benefits of technology

It realizes flexible analysis of product process data, meets diverse needs, and improves user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113342770B_ABST
    Figure CN113342770B_ABST
Patent Text Reader

Abstract

The present invention provides a data analysis method and device, a storage medium and an electronic device, the method comprising: when an analysis request is received, determining each product identification code and each analysis data attribute corresponding to the analysis request; determining each process log corresponding to each product identification code; in each process log corresponding to each product identification code, determining each target process log corresponding to each product identification code; determining the process information set corresponding to each product identification code, and in each preset analysis algorithm, determining the target analysis algorithm corresponding to the analysis request; performing data analysis based on the process information set and the target analysis algorithm corresponding to each product identification code, obtaining an analysis result, and sending the analysis information corresponding to the analysis result to the front end, so as to trigger the front end to display the analysis information according to the corresponding display mode. By applying the method of the present invention, data analysis can be flexibly performed on the process data of the product, various analysis requirements can be met, and user experience can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of information technology, and in particular to a data analysis method and device, a storage medium and an electronic device. Background Art

[0002] In the process of product supervision, product manufacturers, distributors or relevant regulatory agencies often need to conduct data analysis based on process information in the production, circulation and other processes of each product to check whether there are any abnormalities in the production or circulation of the product.

[0003] At present, in the process of data analysis of product process information, for various types of products, data analysis is performed through inherent algorithms and inherent types of process information, and the data analysis functions achieved are all single. In the actual product supervision process, as the supervision needs continue to change, the data analysis needs for product process data are also constantly changing. Based on the current data analysis methods, it is difficult to flexibly analyze product process data to meet various analysis needs, and the user experience is poor. Summary of the invention

[0004] In view of this, an embodiment of the present invention provides a data analysis method to solve the problem that it is difficult to flexibly analyze the process data of a product and the user experience is poor.

[0005] The embodiment of the present invention also provides a data analysis device to ensure the practical implementation and application of the above method.

[0006] To achieve the above objectives, the embodiments of the present invention provide the following technical solutions:

[0007] A data analysis method, comprising:

[0008] When receiving the analysis request sent by the front end, determining each product identification code and each analysis data attribute corresponding to the analysis request;

[0009] Determine each process log corresponding to each of the product identification codes;

[0010] In each of the process logs corresponding to each of the product identification codes, each of the target process logs corresponding to each of the product identification codes is determined; each of the target process logs corresponding to each of the product identification codes corresponds to each of the analysis data attributes one by one;

[0011] Determine a process information set corresponding to each of the product identification codes, wherein the process information set corresponding to each of the product identification codes includes process information corresponding to each target process log corresponding to the product identification code;

[0012] Determine, among various preset analysis algorithms, a target analysis algorithm corresponding to the analysis request;

[0013] Performing data analysis based on the process information set corresponding to each of the product identification codes and the target analysis algorithm to obtain analysis results, and determining analysis information corresponding to the analysis results;

[0014] The analysis information is sent to the front end to trigger the front end to display the analysis information according to the display mode corresponding to the analysis request, thereby completing the data analysis process corresponding to the analysis request.

[0015] In the above method, optionally, the determining of each process log corresponding to each product identification code includes:

[0016] Determine the identification code corresponding to each process log in the preset process log library;

[0017] For each of the product identification codes, the identification code corresponding to each process log in the process log library is matched with the product identification code, and the process log corresponding to each identification code matching the product identification code is determined as the process log corresponding to the product identification code.

[0018] In the above method, optionally, determining each target process log corresponding to each product identification code in each process log corresponding to each product identification code includes:

[0019] Determine the business type corresponding to each of the process logs corresponding to each of the product identification codes;

[0020] For each process log corresponding to each product identification code, the business type corresponding to the process log is matched with each analysis data attribute respectively. If the business type corresponding to the process log matches any analysis data attribute, the process log is determined as the target process log corresponding to the product identification code.

[0021] In the above method, optionally, determining the process information set corresponding to each product identification code includes:

[0022] Determine each data identifier corresponding to each of the product identification codes, wherein each of the data identifiers corresponding to each of the product identification codes is a data identifier contained in each target process log corresponding to the product identification code;

[0023] In a preset process information library, determining the process information corresponding to each of the data identifiers corresponding to each of the product identification codes;

[0024] The process information corresponding to each of the data identifiers corresponding to each of the product identification codes is combined into a process information set corresponding to each of the product identification codes.

[0025] In the above method, optionally, determining the target analysis algorithm corresponding to the analysis request from among various preset analysis algorithms includes:

[0026] Determine an algorithm identifier included in the analysis request, wherein the algorithm identifier includes an input parameter type and an output parameter type;

[0027] Determining an algorithm identifier corresponding to each of the preset analysis algorithms;

[0028] A first analysis algorithm is determined from among the preset analysis algorithms, and the first analysis algorithm is determined as the target analysis algorithm, wherein an algorithm identifier corresponding to the first analysis algorithm matches the algorithm identifier included in the analysis request.

[0029] In the above method, optionally, determining the analysis information corresponding to the analysis result includes:

[0030] Determine the output data type corresponding to the analysis request;

[0031] If the output data type indicates that only the analysis result is output, the analysis result is determined as the analysis information.

[0032] The above method may optionally further include:

[0033] If the output data type represents the output analysis result and process information, the analysis result and the process information set corresponding to each of the product identification codes are determined as the analysis information.

[0034] A data analysis device, comprising:

[0035] A first determining unit, configured to, when receiving an analysis request sent by the front end, determine each product identification code and each analysis data attribute corresponding to the analysis request;

[0036] A second determining unit, configured to determine each process log corresponding to each of the product identification codes;

[0037] A third determining unit is used to determine, in each of the process logs corresponding to each of the product identification codes, each of the target process logs corresponding to each of the product identification codes; each of the target process logs corresponding to each of the product identification codes has a one-to-one correspondence with each of the analysis data attributes;

[0038] A fourth determining unit is used to determine a process information set corresponding to each of the product identification codes, wherein the process information set corresponding to each of the product identification codes includes process information corresponding to each target process log corresponding to the product identification code;

[0039] A fifth determining unit, configured to determine a target analysis algorithm corresponding to the analysis request from among various preset analysis algorithms;

[0040] a sixth determining unit, configured to perform data analysis based on the process information set corresponding to each of the product identification codes and the target analysis algorithm, obtain an analysis result, and determine analysis information corresponding to the analysis result;

[0041] The sending unit is used to send the analysis information to the front end to trigger the front end to display the analysis information according to the display mode corresponding to the analysis request, thereby completing the data analysis process corresponding to the analysis request.

[0042] In the above device, optionally, the second determining unit includes:

[0043] A first determining subunit is used to determine an identification code corresponding to each process log in a preset process log library;

[0044] The second determination subunit is used to match the identification code corresponding to each process log in the process log library with the product identification code for each product identification code, and determine the process log corresponding to each identification code matching the product identification code as the process log corresponding to the product identification code.

[0045] In the above device, optionally, the third determining unit includes:

[0046] A third determining subunit is used to determine the business type corresponding to each of the process logs corresponding to each of the product identification codes;

[0047] The fourth determination sub-unit is used to match the business type corresponding to each of the process logs corresponding to each of the product identification codes with each of the analysis data attributes respectively; if the business type corresponding to the process log matches any of the analysis data attributes, the process log is determined as the target process log corresponding to the product identification code.

[0048] In the above device, optionally, the fourth determining unit includes:

[0049] A fifth determining subunit is used to determine each data identifier corresponding to each of the product identification codes, wherein each of the data identifiers corresponding to each of the product identification codes is a data identifier contained in each target process log corresponding to the product identification code;

[0050] A sixth determining subunit, configured to determine, in a preset process information library, the process information corresponding to each of the data identifiers corresponding to each of the product identification codes;

[0051] The seventh determining subunit is used to combine the process information corresponding to each of the data identifiers corresponding to each of the product identification codes into a process information set corresponding to each of the product identification codes.

[0052] In the above device, optionally, the fifth determining unit includes:

[0053] an eighth determination subunit, configured to determine an algorithm identifier included in the analysis request, wherein the algorithm identifier includes an input parameter type and an output parameter type;

[0054] A ninth determining subunit, configured to determine an algorithm identifier corresponding to each of the preset analysis algorithms;

[0055] The tenth determination subunit is used to determine a first analysis algorithm from among the preset analysis algorithms, and determine the first analysis algorithm as the target analysis algorithm, wherein an algorithm identifier corresponding to the first analysis algorithm matches the algorithm identifier included in the analysis request.

[0056] In the above device, optionally, the sixth determining unit includes:

[0057] an eleventh determining subunit, configured to determine the output data type corresponding to the analysis request;

[0058] A twelfth determining subunit is configured to determine the analysis result as the analysis information if the output data type indicates that only the analysis result is output.

[0059] In the above device, optionally, the sixth determining unit further includes:

[0060] The thirteenth determining subunit is configured to determine the analysis result and a set of process information corresponding to each of the product identification codes as the analysis information if the output data type represents the output analysis result and process information.

[0061] A storage medium includes stored instructions, wherein when the instructions are executed, the device where the storage medium is located is controlled to execute the data analysis method as described above.

[0062] An electronic device includes a memory and one or more instructions, wherein the one or more instructions are stored in the memory and are configured to be executed by one or more processors to perform the data analysis method as described above.

[0063] Based on a data analysis method provided by the above embodiment of the present invention, when receiving an analysis request, each product identification code and each analysis data attribute corresponding to the analysis request are determined, and each process log corresponding to each product identification code is determined, so as to determine each target process log corresponding to each product identification code based on each analysis data attribute. A process information set corresponding to each product identification code is determined, and the process information set corresponding to each product identification code includes the process information corresponding to each target process log corresponding to the product identification code. A target analysis algorithm is determined in each preset analysis algorithm. Data analysis is performed based on the process information set corresponding to each product identification code and the target analysis algorithm to obtain an analysis result, and the analysis information corresponding to the analysis result is determined. The analysis information is sent to the front end to trigger the front end to display the analysis information according to the display mode corresponding to the analysis request. By applying the method provided by the embodiment of the present invention, the process information to be analyzed and the target analysis algorithm can be determined in the analysis request sent by the front end to obtain the analysis information. The front end can also display the analysis information according to the display mode corresponding to the analysis request. The user can send an analysis request according to actual needs, and can flexibly perform data analysis on the process data of the product to meet various analysis needs and improve user experience. BRIEF DESCRIPTION OF THE DRAWINGS

[0064] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying creative work.

[0065] Figure 1 A method flow chart of a data analysis method provided by an embodiment of the present invention;

[0066] Figure 2 A schematic diagram of a data flow process provided by an embodiment of the present invention;

[0067] Figure 3 A flowchart of another method of a data analysis method provided by an embodiment of the present invention;

[0068] Figure 4 A schematic diagram of the structure of a data analysis device provided by an embodiment of the present invention;

[0069] Figure 5 Another structural schematic diagram of a data analysis device provided by an embodiment of the present invention;

[0070] Figure 6 A schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0071] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0072] In this application, the terms "comprises", "comprising" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprising a ..." does not exclude the presence of other identical elements in the process, method, article or device comprising the element.

[0073] An embodiment of the present invention provides a data analysis method, which can be applied to a data analysis system for product process data. The execution subject of the method can be a server of the system. The flowchart of the method is as follows: Figure 1 As shown, including:

[0074] S101: When receiving an analysis request sent by a front end, determining each product identification code and each analysis data attribute corresponding to the analysis request;

[0075] In the method provided by the embodiment of the present invention, the front end provides an information selection interface for various types of analysis needs. The user can select corresponding screening conditions and analysis types at the front end according to the actual analysis needs. The analysis type refers to the type of information required to be output for the current analysis. For example, the batch of the product, or the production time, production time period and other screening information of the product can be selected. The analysis type can be determined according to the actual analysis needs. For example, for product circulation analysis, the type of information required to be output is the ratio of the number of mixed goods products to the number of products, so as to analyze whether mixed goods behavior occurs. Mixed goods behavior refers to a regional agent selling his own products to the agency area of ​​other agents of the same brand. In layman's terms, it is the behavior of selling products with regional restrictions in non-local sales areas. For example, for product operation details analysis, the information required to be output may include product feeding time, feeder, outbound time, outbound location, logistics transfer point, arrival time at the transfer point, consignee and other information.

[0076] When the server receives an analysis request, it can determine the product identification codes corresponding to each product targeted by the current analysis based on the user selected information carried in the analysis request. For example, if the user selects a batch of products, the product identification codes corresponding to each product associated with the batch number of this batch are obtained. The system can pre-configure various data attributes required for each type of analysis, and can determine the required data attributes as each analysis data attribute based on the analysis type in the analysis request. For example, if the identifier related to the analysis type in the analysis request represents a product circulation analysis, and the data attribute corresponding to the product circulation analysis is the circulation location of each logistics process, then the circulation location of each logistics process is determined as each analysis data attribute.

[0077] S102: Determine each process log corresponding to each product identification code;

[0078] In the method provided by the embodiment of the present invention, during the production and circulation of a product, in each process, the product identification code of the product can be bound to the process information of the process. During the information binding process of each process, when the product identification code is bound to the process information of the process, a process log corresponding to the binding process will be generated. The system pre-collects the various process logs generated in the various information binding processes of the various product identification codes. In the current data analysis process, the various process logs corresponding to each current product identification code can be selected from the various process logs collected in advance according to each current product identification code.

[0079] S103: in each of the process logs corresponding to each of the product identification codes, determining each of the target process logs corresponding to each of the product identification codes; each of the target process logs corresponding to each of the product identification codes has a one-to-one correspondence with each of the analysis data attributes;

[0080] In the method provided by the embodiment of the present invention, for each product identification code, each process log matching each analysis data attribute can be determined in its corresponding process logs, that is, the process log corresponding to each analysis data attribute is selected, and the process log corresponding to each analysis data attribute is determined as the target process log.

[0081] S104: Determine a process information set corresponding to each of the product identification codes, wherein the process information set corresponding to each of the product identification codes includes process information corresponding to each target process log corresponding to the product identification code;

[0082] In the method provided by the embodiment of the present invention, each product identification code is bound to the process information of its corresponding product in each process. Each process log records the data identification corresponding to its corresponding process information, and in the process information database, the process information is stored corresponding to the data identification corresponding to it. The process information corresponding to each target process log can be obtained based on the information recorded in each target process log corresponding to each product identification code.

[0083] S105: Determine a target analysis algorithm corresponding to the analysis request from among various preset analysis algorithms;

[0084] In the method provided by the embodiment of the present invention, various types of analysis algorithms are pre-set in the system according to actual business needs. For example, for the analysis algorithm of product flow analysis, it can be determined whether there are products flowing to unplanned areas according to the flow of each product logistics to be analyzed, what proportion of products with abnormal flow and normal flow, etc. According to the information associated with the analysis algorithm contained in the analysis request, the analysis algorithm corresponding to the analysis request can be matched in each preset analysis algorithm as the target analysis algorithm. It should be noted that in the method provided by the embodiment of the present invention, various types of preset analysis algorithms can be designed according to actual needs, and existing product data analysis algorithms can also be used, which does not affect the function of the method provided by the embodiment of the present invention.

[0085] S106: performing data analysis based on the process information set corresponding to each of the product identification codes and the target analysis algorithm to obtain analysis results, and determining analysis information corresponding to the analysis results;

[0086] In the method provided by the embodiment of the present invention, each process information in the process information set corresponding to each product identification code can be used as input information of the target analysis algorithm, so as to perform data analysis on the process data of each product through the target analysis algorithm to obtain an analysis result. The analysis information corresponding to the analysis result can be determined according to the data type of the analysis information to be displayed contained in the analysis request.

[0087] S107: Sending the analysis information to the front end to trigger the front end to display the analysis information according to the display mode corresponding to the analysis request, thereby completing the data analysis process corresponding to the analysis request.

[0088] In the method provided by the embodiment of the present invention, the system may send the determined analysis information to the front end so that the front end displays the received analysis information according to the display mode corresponding to the analysis request. The display mode corresponding to the analysis request may be a display mode selected by the user through the front end interface, for example, a table display, a bar chart display, and the like may be selected. If the analysis request corresponds to a table display mode, the front end generates a corresponding table based on the analysis information, and displays the analysis information to the user in the generated table on the front end interface. If the analysis request corresponds to a bar chart display, the front end generates a corresponding bar chart based on the analysis information, and displays the analysis information to the user in the generated bar chart on the front end interface.

[0089] Based on the method provided by the embodiment of the present invention, when an analysis request is received, the product identification code corresponding to each product to be analyzed and each analysis data attribute can be determined. Based on the process logs and analysis data attributes corresponding to each product identification code, the target process logs corresponding to each product identification code are determined to determine the process information set corresponding to each product identification code. In each preset analysis algorithm, the target analysis algorithm is determined, and data analysis is performed based on the target analysis algorithm and each process information set to obtain the analysis result, and the analysis information corresponding to the analysis result is sent to the front end, so that the front end displays the analysis information according to the display method corresponding to the analysis request. Applying the method provided by the embodiment of the present invention, the user can send an analysis request through the front end according to the actual analysis needs, and the system can flexibly obtain the corresponding process information according to the process log corresponding to the product identification code of the product, flexibly perform data analysis on the process data of the product, meet various analysis needs, and improve user experience.

[0090] In order to better illustrate the method provided by the embodiment of the present invention, Figure 2 The data flow diagram shown in FIG. 1 briefly illustrates the implementation of the method provided by the embodiment of the present invention in an actual application scenario. Figure 2As shown, when each regulated product is in each processing flow, the product information management system will bind the product identification code of the product with the process data associated with the product in the current process. After the information binding of the current process is completed, the corresponding process log will be generated. Each process log is sent to ES for storage. ES refers to Elasticsearch, which is a search server based on Lucene. That is, in ES, the process log corresponding to each process in the process chain corresponding to each regulated product is stored. The process chain corresponding to each product refers to the process set composed of each process to which the product identification code corresponding to the product needs to bind process information. Each process in the process chain of each type of product can be customized by the user in advance. The process chains corresponding to each type of product can be different. That is, in ES, the number of process logs corresponding to the product identification code corresponding to each type of product can be different, and the business type (process type) corresponding to each process log corresponding to each type of product identification code can also be different. When it is necessary to analyze the process data of the product, the user can select the product to be analyzed and the analysis type through the front end built based on business intelligence technology (BI). In response to the user's operation, the BI front-end can generate a corresponding analysis request based on the information selected by the user, and send the analysis request to the data analysis engine built on Spark, which is a fast and general computing engine designed for large-scale data processing. The Spark data analysis engine can determine the product identification code corresponding to each product to be analyzed based on the received analysis request, and obtain the corresponding process logs from ES based on each product identification code to obtain the various process information required for the current data analysis. The Spark data analysis engine can match the corresponding data analysis algorithm according to the analysis request, perform data analysis in combination with the obtained process information, obtain the analysis results, and feed back the analysis information corresponding to the analysis results to the BI front-end. The BI front-end then displays the analysis information based on the corresponding display method.

[0091] Next, the process log mentioned in the method provided in the embodiment of the present invention is further described. The format of the process log mentioned in the method provided in the embodiment of the present invention can be a data format of "time|product identification code|business process ID|form ID|data ID|log type|log information". The specific description of each parameter in the data format is shown in the following table:

[0092] name type describe time Datetime Time format Product Identification Code String Product identification code of the product Business Process ID int The identifier of the process Form ID int The identifier of the custom process chain Data ID int Identifier indicating process information Log Type int Indicates success or failure of the operation Log information string Always prompt information or error message

[0093] It should be noted that the specific log format mentioned in the method provided in the embodiment of the present invention is only an embodiment provided to better illustrate the method provided in the embodiment of the present invention. In the specific implementation process, data can be collected based on other data formats to generate process logs, which does not affect the implementation function of the method provided in the embodiment of the present invention.

[0094] In order to better illustrate the method provided by the embodiment of the present invention, Figure 1 Based on the method shown, an embodiment of the present invention provides another data analysis method, wherein the process of determining each process log corresponding to each product identification code mentioned in step S102 includes:

[0095] Determine the identification code corresponding to each process log in the preset process log library;

[0096] In the method provided by the embodiment of the present invention, the preset process log library is a database for storing pre-collected process logs, which can be the ES mentioned above, or other data storage warehouses. The identification code corresponding to each process log in the process log library can be obtained, that is, the product identification code contained in the process log, and the process log is associated with the process information of the product corresponding to the product identification code.

[0097] For each of the product identification codes, the identification code corresponding to each process log in the process log library is matched with the product identification code, and the process log corresponding to each identification code matching the product identification code is determined as the process log corresponding to the product identification code.

[0098] The identification code corresponding to each process log can be compared with the product identification codes of each current product to be analyzed. Among the identification codes corresponding to each process log, the identification code that matches each current product identification code is determined, and the process log corresponding to the identification code that matches each product identification code is determined as the process log corresponding to the product identification code. In the method provided by the embodiment of the present invention, each process log only records the relevant information of one process, and there are multiple processes in the processing of a product, so the product identification code of the product can correspond to multiple process logs, so the identification code corresponding to each process log is repeatable.

[0099] Based on the method provided by the embodiment of the present invention, each process log corresponding to each product identification code can be determined from the process log library by matching the identification code, which is more convenient and quick to process and can improve the processing efficiency.

[0100] Further, in Figure 1Based on the method shown, an embodiment of the present invention provides another data analysis method, wherein the process of determining each target process log corresponding to each product identification code in each process log corresponding to each product identification code mentioned in step S103 includes:

[0101] Determine the business type corresponding to each of the process logs corresponding to each of the product identification codes;

[0102] In the method provided by the embodiment of the present invention, the business type corresponding to each process log can be determined according to the business process ID contained in each process log, that is, the identifier representing the process. The business type can be specifically represented by the business process ID.

[0103] For each process log corresponding to each product identification code, the business type corresponding to the process log is matched with each analysis data attribute respectively. If the business type corresponding to the process log matches any analysis data attribute, the process log is determined as the target process log corresponding to the product identification code.

[0104] In the method provided by the embodiment of the present invention, each analysis data attribute represents the data attribute of the process data required for the current data analysis, which is associated with the process type, for example, the circulation place is associated with the logistics process. The business type (process type) corresponding to each process log corresponding to each product identification code can be matched with each analysis data attribute respectively. If the business type corresponding to the process log matches any analysis data attribute, the process log is determined to be the target process log corresponding to its corresponding product identification code.

[0105] Based on the method provided by the embodiment of the present invention, the target process logs corresponding to each product identification code can be determined by matching the business type corresponding to the process log with the analysis data attributes. The process is relatively simple and fast, and the processing efficiency can be further improved.

[0106] In order to better illustrate the method provided by the embodiment of the present invention, Figure 3 As shown in the flow chart, Figure 1 Based on the method shown, an embodiment of the present invention provides another data analysis method, wherein the process of determining the process information set corresponding to each product identification code mentioned in step S104 includes:

[0107] S201: Determine each data identifier corresponding to each product identification code, where each data identifier corresponding to each product identification code is a data identifier contained in each target process log corresponding to the product identification code;

[0108] In the method provided by the embodiment of the present invention, the corresponding data ID can be obtained from each target process log corresponding to each product identification code, and the data ID can be used as the data identification corresponding to the corresponding product identification code.

[0109] S202: Determine, in a preset process information library, the process information corresponding to each of the data identifiers corresponding to each of the product identification codes;

[0110] In the method provided by the embodiment of the present invention, the process information bound to the product identification code corresponding to each regulated product can be stored in the database of the product information management system. The preset process information library contains multiple process information, that is, it contains process information corresponding to all regulated products. Each process information in the process information library is associated with its corresponding information identifier, and the information identifier corresponding to each process information is the same as the data ID recorded in the corresponding process log. Each data identifier corresponding to the product identification code corresponding to each product to be analyzed can be matched with the information identifier corresponding to each process information in the process information library to determine the information identifier that matches each data identifier, and the process information corresponding to the information identifier matched by each data identifier is used as the process information corresponding to each data identifier.

[0111] S203: The process information corresponding to each of the data identifiers corresponding to each of the product identification codes is combined into a process information set corresponding to each of the product identification codes.

[0112] In the method provided by the embodiment of the present invention, for each product identification code, the process information corresponding to all the data identifications corresponding to the product identification code is used as the process information set corresponding to the product identification code. That is, the process information set corresponding to each product identification code includes the process information corresponding to each data identification corresponding to the product identification code.

[0113] Based on the method provided in the embodiment of the present invention, various process information required for data analysis can be obtained in the process information library through matching of data identifiers. The processing process is relatively convenient and fast, and the processing efficiency can be further improved.

[0114] Further, in Figure 1 On the basis of the method shown, an embodiment of the present invention provides another data analysis method, in which, in each preset analysis algorithm mentioned in step S105, a target analysis algorithm corresponding to the analysis request is determined, including:

[0115] Determine an algorithm identifier included in the analysis request, wherein the algorithm identifier includes an input parameter type and an output parameter type;

[0116] In the method provided by the embodiment of the present invention, the input parameter type and output parameter type selected by the user in the analysis request can be obtained as an algorithm identifier. For example, if the user selects a batch of products at the front end and chooses to display the proportion of mixed goods products in the batch of products, the input parameter type is the product batch, and the output parameter type is the proportion of mixed goods products.

[0117] Determining an algorithm identifier corresponding to each of the preset analysis algorithms;

[0118] In the method provided in the embodiment of the present invention, the algorithm identifier corresponding to each preset analysis algorithm is pre-configured, that is, the input parameter type corresponding to each analysis algorithm and the type of parameter output by the analysis algorithm. For example, for the product flow analysis algorithm, the corresponding input parameter type is the parameter for selecting products, and the output parameter type is the proportion of mixed goods products.

[0119] A first analysis algorithm is determined from among the preset analysis algorithms, and the first analysis algorithm is determined as the target analysis algorithm, wherein an algorithm identifier corresponding to the first analysis algorithm matches the algorithm identifier included in the analysis request.

[0120] In the method provided by the embodiment of the present invention, the algorithm identifier of each preset analysis algorithm can be matched with the algorithm identifier included in the analysis request, and the algorithm identifier corresponding to each preset analysis algorithm, which matches the algorithm identifier included in the analysis request, is used as the target algorithm identifier, and the analysis algorithm corresponding to the target algorithm identifier is determined as the first analysis algorithm, and the first analysis algorithm is used as the target analysis algorithm. For example, if the user selects a product batch, that is, a product, and chooses to output the proportion of mixed goods products, then the product circulation analysis algorithm is matched.

[0121] Based on the method provided in the embodiment of the present invention, the target analysis algorithm required for the current analysis can be conveniently and quickly determined based on the matching of the algorithm identifiers, which can further improve the processing efficiency.

[0122] Furthermore, the present invention provides another data analysis method. Figure 1 Based on the method shown, the step S106 of determining the analysis information corresponding to the analysis result includes:

[0123] Determine the output data type corresponding to the analysis request;

[0124] If the output data type indicates that only the analysis result is output, the analysis result is determined as the analysis information.

[0125] In the method provided by the embodiment of the present invention, the user can select the data type required to be output for the current analysis through the front end, such as only outputting the analysis results, or outputting detailed analysis information, that is, outputting the analysis results and the specific process information corresponding to the analysis. If the output data type in the analysis request indicates that only the analysis results are output, only the analysis results obtained by the target analysis algorithm are used as analysis information and sent to the front end for display. For example, in the circulation analysis of products, only the proportion of mixed goods products is used as analysis information.

[0126] Furthermore, in the method provided by the embodiment of the present invention, if the output data type represents the output analysis result and process information, the analysis result and the process information set corresponding to each product identification code are determined as the analysis information. For example, in the product circulation analysis, the proportion of mixed goods products and the circulation location information corresponding to the product identification code of each product currently analyzed are sent to the front end as analysis information for display.

[0127] Based on the method provided in the embodiment of the present invention, the user can select the type of data to be displayed according to actual needs, and can obtain detailed information for further business processing, or can only obtain brief analysis results, which can further improve the user experience.

[0128] and Figure 1 Corresponding to the data analysis method shown in FIG. 1 , the embodiment of the present invention further provides a data analysis device for analyzing Figure 1 The specific implementation of the method shown in is shown in the structural diagram Figure 4 As shown, including:

[0129] The first determining unit 301 is used to determine each product identification code and each analysis data attribute corresponding to the analysis request when receiving the analysis request sent by the front end;

[0130] The second determining unit 302 is used to determine each process log corresponding to each product identification code;

[0131] The third determining unit 303 is used to determine, in each of the process logs corresponding to each of the product identification codes, each of the target process logs corresponding to each of the product identification codes; each of the target process logs corresponding to each of the product identification codes has a one-to-one correspondence with each of the analysis data attributes;

[0132] The fourth determining unit 304 is used to determine a process information set corresponding to each of the product identification codes, wherein the process information set corresponding to each of the product identification codes includes process information corresponding to each target process log corresponding to the product identification code;

[0133] A fifth determining unit 305, configured to determine a target analysis algorithm corresponding to the analysis request from among various preset analysis algorithms;

[0134] A sixth determining unit 306, configured to perform data analysis based on the process information set corresponding to each of the product identification codes and the target analysis algorithm to obtain an analysis result, and determine analysis information corresponding to the analysis result;

[0135] The sending unit 307 is used to send the analysis information to the front end to trigger the front end to display the analysis information according to the display mode corresponding to the analysis request, thereby completing the data analysis process corresponding to the analysis request.

[0136] Based on the device provided by the embodiment of the present invention, when an analysis request is received, the product identification code corresponding to each product to be analyzed and each analysis data attribute can be determined. Based on the process logs and analysis data attributes corresponding to each product identification code, the target process logs corresponding to each product identification code are determined to determine the process information set corresponding to each product identification code. In each preset analysis algorithm, the target analysis algorithm is determined, and data analysis is performed based on the target analysis algorithm and each process information set to obtain the analysis result, and the analysis information corresponding to the analysis result is sent to the front end, so that the front end displays the analysis information according to the display method corresponding to the analysis request. By applying the device provided by the embodiment of the present invention, the user can send an analysis request through the front end according to the actual analysis needs, and the system can flexibly obtain the corresponding process information according to the process log corresponding to the product identification code of the product, flexibly perform data analysis on the process data of the product, meet various analysis needs, and improve user experience.

[0137] On the basis of the above device, in the device provided by the embodiment of the present invention, the second determining unit 302 includes:

[0138] A first determining subunit is used to determine an identification code corresponding to each process log in a preset process log library;

[0139] The second determination subunit is used to match the identification code corresponding to each process log in the process log library with the product identification code for each product identification code, and determine the process log corresponding to each identification code matching the product identification code as the process log corresponding to the product identification code.

[0140] On the basis of the above device, in the device provided by the embodiment of the present invention, the third determining unit 303 includes:

[0141] A third determining subunit is used to determine the business type corresponding to each of the process logs corresponding to each of the product identification codes;

[0142] The fourth determination sub-unit is used to match the business type corresponding to each of the process logs corresponding to each of the product identification codes with each of the analysis data attributes respectively; if the business type corresponding to the process log matches any of the analysis data attributes, the process log is determined as the target process log corresponding to the product identification code.

[0143] Based on the above device, the structural diagram of the device provided by the embodiment of the present invention is as follows: Figure 5 As shown, the fourth determining unit 304 includes:

[0144] The fifth determining subunit 308 is used to determine each data identifier corresponding to each of the product identification codes, where each data identifier corresponding to each of the product identification codes is a data identifier contained in each target process log corresponding to the product identification code;

[0145] The sixth determining subunit 309 is used to determine the process information corresponding to each of the data identifiers corresponding to each of the product identification codes in a preset process information library;

[0146] The seventh determining subunit 310 is used to combine the process information corresponding to each of the data identifiers corresponding to each of the product identification codes into a process information set corresponding to each of the product identification codes.

[0147] On the basis of the above device, in the device provided by the embodiment of the present invention, the fifth determining unit 305 includes:

[0148] an eighth determination subunit, configured to determine an algorithm identifier included in the analysis request, wherein the algorithm identifier includes an input parameter type and an output parameter type;

[0149] A ninth determining subunit, configured to determine an algorithm identifier corresponding to each of the preset analysis algorithms;

[0150] The tenth determination subunit is used to determine a first analysis algorithm from among the preset analysis algorithms, and determine the first analysis algorithm as the target analysis algorithm, wherein an algorithm identifier corresponding to the first analysis algorithm matches the algorithm identifier included in the analysis request.

[0151] On the basis of the above device, in the device provided by the embodiment of the present invention, the sixth determining unit 306 includes:

[0152] an eleventh determining subunit, configured to determine the output data type corresponding to the analysis request;

[0153] A twelfth determining subunit is configured to determine the analysis result as the analysis information if the output data type indicates that only the analysis result is output.

[0154] On the basis of the above device, in the device provided by the embodiment of the present invention, the sixth determining unit 306 further includes:

[0155] The thirteenth determining subunit is configured to determine the analysis result and a set of process information corresponding to each of the product identification codes as the analysis information if the output data type represents the output analysis result and process information.

[0156] An embodiment of the present invention further provides a storage medium, which includes stored instructions, wherein when the instructions are executed, the device where the storage medium is located is controlled to execute the above-mentioned data analysis method.

[0157] The embodiment of the present invention further provides an electronic device, the structural diagram of which is shown in FIG. Figure 6 As shown, it specifically includes a memory 401 and one or more instructions 402, wherein the one or more instructions 402 are stored in the memory 401 and are configured to be executed by one or more processors 403 to perform the following operations:

[0158] When receiving the analysis request sent by the front end, determining each product identification code and each analysis data attribute corresponding to the analysis request;

[0159] Determine each process log corresponding to each of the product identification codes;

[0160] In each of the process logs corresponding to each of the product identification codes, each of the target process logs corresponding to each of the product identification codes is determined; each of the target process logs corresponding to each of the product identification codes corresponds to each of the analysis data attributes one by one;

[0161] Determine a process information set corresponding to each of the product identification codes, wherein the process information set corresponding to each of the product identification codes includes process information corresponding to each target process log corresponding to the product identification code;

[0162] Determine, among various preset analysis algorithms, a target analysis algorithm corresponding to the analysis request;

[0163] Performing data analysis based on the process information set corresponding to each of the product identification codes and the target analysis algorithm to obtain analysis results, and determining analysis information corresponding to the analysis results;

[0164] The analysis information is sent to the front end to trigger the front end to display the analysis information according to the display mode corresponding to the analysis request, thereby completing the data analysis process corresponding to the analysis request.

[0165] Each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can refer to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the system or system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can refer to the partial description of the method embodiment. The system and system embodiments described above are merely schematic, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without creative work.

[0166] Professionals may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in the above description according to function. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.

[0167] The above description of the disclosed embodiments enables one skilled in the art to implement or use the present invention. Various modifications to these embodiments will be apparent to one skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to the embodiments shown herein, but rather to the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A data analysis method, characterized in that: include: When receiving an analysis request sent by the front end, determine the product identification codes corresponding to the analysis request according to the information selected by the user carried in the analysis request, pre-configure the data attributes required for each type of analysis, and determine the required data attributes according to the analysis type in the analysis request as the analysis data attributes; Determine each process log corresponding to each of the product identification codes; wherein each process log only records relevant information of one process, and there are multiple processes in the processing of a product, so the product identification code of the product may correspond to multiple process logs, and therefore the identification code corresponding to each process log is repeatable; In each of the process logs corresponding to each of the product identification codes, each of the target process logs corresponding to each of the product identification codes is determined; each of the target process logs corresponding to each of the product identification codes corresponds to each of the analysis data attributes one by one; Determine a process information set corresponding to each of the product identification codes, wherein the process information set corresponding to each of the product identification codes includes process information corresponding to each target process log corresponding to the product identification code; Determine an algorithm identifier included in the analysis request, wherein the algorithm identifier includes an input parameter type and an output parameter type; Determine the algorithm identifier corresponding to each preset analysis algorithm; Matching the algorithm identifier of each of the preset analysis algorithms with the algorithm identifier included in the analysis request, taking the algorithm identifier corresponding to each of the preset analysis algorithms, which matches the algorithm identifier included in the analysis request as the target algorithm identifier, determining the analysis algorithm corresponding to the target algorithm identifier as the first analysis algorithm, taking the first analysis algorithm as the target analysis algorithm, and matching the algorithm identifier corresponding to the first analysis algorithm with the algorithm identifier included in the analysis request; Performing data analysis based on the process information set corresponding to each of the product identification codes and the target analysis algorithm to obtain analysis results, and determining the output data type corresponding to the analysis request; If the output data type indicates that only the result of the analysis is output, the analysis result is determined as analysis information; If the output data type represents the output analysis result and process information, the analysis result and the process information set corresponding to each product identification code are determined as analysis information; The analysis information is sent to the front end to trigger the front end to display the analysis information according to the display mode corresponding to the analysis request, thereby completing the data analysis process corresponding to the analysis request.

2. The method according to claim 1, characterized in that The determining of each process log corresponding to each product identification code includes: Determine the identification code corresponding to each process log in the preset process log library; For each of the product identification codes, the identification code corresponding to each process log in the process log library is matched with the product identification code, and the process log corresponding to each identification code matching the product identification code is determined as the process log corresponding to the product identification code.

3. The method according to claim 1, characterized in that Determining, in each of the process logs corresponding to each of the product identification codes, each of the target process logs corresponding to each of the product identification codes comprises: Determine the business type corresponding to each of the process logs corresponding to each of the product identification codes; For each process log corresponding to each product identification code, the business type corresponding to the process log is matched with each analysis data attribute respectively. If the business type corresponding to the process log matches any analysis data attribute, the process log is determined as the target process log corresponding to the product identification code.

4. The method according to claim 1, characterized in that: The step of determining a set of process information corresponding to each product identification code includes: Determine each data identifier corresponding to each of the product identification codes, wherein each of the data identifiers corresponding to each of the product identification codes is a data identifier contained in each target process log corresponding to the product identification code; In a preset process information library, determining the process information corresponding to each of the data identifiers corresponding to each of the product identification codes; The process information corresponding to each of the data identifiers corresponding to each of the product identification codes is combined into a process information set corresponding to each of the product identification codes.

5. A data analysis device, executing the data analysis method according to any one of claims 1 to 4, characterized in that: include: A first determining unit, configured to, when receiving an analysis request sent by the front end, determine each product identification code and each analysis data attribute corresponding to the analysis request; A second determining unit, configured to determine each process log corresponding to each of the product identification codes; A third determining unit is used to determine, in each of the process logs corresponding to each of the product identification codes, each of the target process logs corresponding to each of the product identification codes; each of the target process logs corresponding to each of the product identification codes has a one-to-one correspondence with each of the analysis data attributes; A fourth determining unit is used to determine a process information set corresponding to each of the product identification codes, wherein the process information set corresponding to each of the product identification codes includes process information corresponding to each target process log corresponding to the product identification code; A fifth determining unit, configured to determine a target analysis algorithm corresponding to the analysis request from among various preset analysis algorithms; a sixth determining unit, configured to perform data analysis based on the process information set corresponding to each of the product identification codes and the target analysis algorithm, obtain an analysis result, and determine analysis information corresponding to the analysis result; A sending unit, configured to send the analysis information to the front end, so as to trigger the front end to display the analysis information according to the display mode corresponding to the analysis request, thereby completing the data analysis process corresponding to the analysis request; The fifth determining unit includes: an eighth determination subunit, configured to determine an algorithm identifier included in the analysis request, wherein the algorithm identifier includes an input parameter type and an output parameter type; A ninth determining subunit, configured to determine an algorithm identifier corresponding to each of the preset analysis algorithms; a tenth determination subunit, configured to match the algorithm identifier of each of the preset analysis algorithms with the algorithm identifier included in the analysis request, use the algorithm identifier corresponding to each of the preset analysis algorithms, which matches the algorithm identifier included in the analysis request, as a target algorithm identifier, determine the analysis algorithm corresponding to the target algorithm identifier as a first analysis algorithm, use the first analysis algorithm as the target analysis algorithm, and the algorithm identifier corresponding to the first analysis algorithm matches the algorithm identifier included in the analysis request; The sixth determining unit includes: an eleventh determining subunit, configured to determine the output data type corresponding to the analysis request; a twelfth determining subunit, configured to determine the analysis result as the analysis information if the output data type indicates that only the analysis result is output; The thirteenth determining subunit is configured to determine the analysis result and a set of process information corresponding to each of the product identification codes as the analysis information if the output data type represents the output analysis result and process information.

6. A storage medium, characterized in that: The storage medium includes stored instructions, wherein when the instructions are executed, the device where the storage medium is located is controlled to execute the data analysis method according to any one of claims 1 to 4.

7. An electronic device, characterized in that: The device comprises a memory and one or more instructions, wherein the one or more instructions are stored in the memory and configured to be executed by one or more processors to perform the data analysis method according to any one of claims 1 to 4.