WO2019223104A1 - 确定事件影响因素的方法、装置、终端设备及可读存储介质 - Google Patents
确定事件影响因素的方法、装置、终端设备及可读存储介质 Download PDFInfo
- Publication number
- WO2019223104A1 WO2019223104A1 PCT/CN2018/097557 CN2018097557W WO2019223104A1 WO 2019223104 A1 WO2019223104 A1 WO 2019223104A1 CN 2018097557 W CN2018097557 W CN 2018097557W WO 2019223104 A1 WO2019223104 A1 WO 2019223104A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- factor
- node
- sample
- sample set
- structure tree
- Prior art date
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F18/00—Pattern recognition
- G06F18/20—Analysing
- G06F18/21—Design or setup of recognition systems or techniques; Extraction of features in feature space; Blind source separation
- G06F18/214—Generating training patterns; Bootstrap methods, e.g. bagging or boosting
- G06F18/2155—Generating training patterns; Bootstrap methods, e.g. bagging or boosting characterised by the incorporation of unlabelled data, e.g. multiple instance learning [MIL], semi-supervised techniques using expectation-maximisation [EM] or naïve labelling
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F18/00—Pattern recognition
- G06F18/20—Analysing
- G06F18/21—Design or setup of recognition systems or techniques; Extraction of features in feature space; Blind source separation
- G06F18/214—Generating training patterns; Bootstrap methods, e.g. bagging or boosting
Definitions
- the present application belongs to the technical field of data processing, and particularly relates to a method, a device, a terminal device, and a computer-readable storage medium for determining an influence factor of an event.
- the outcome of an event is often related to some influencing factors, such as the rainfall in a region and the influencing factors such as the sea and land location, topography, barometric pressure, and wind.
- Statistics is the science of recognizing the overall quantitative characteristics and quantitative relationships of objective phenomena. When determining the influencing factors of an event, you need to use statistics to obtain a large number of samples related to the event, and observe and calculate the samples to obtain the events. Related factors.
- a part related to a sample and a single factor is often extracted, and whether the factor is an influence factor of an event is determined according to whether the part of the sample changes under the influence of the factor.
- events may be related to multiple influencing factors, and multiple influencing factors may affect each other, thereby changing the outcome of the event.
- the existing methods for determining the influencing factors of an event cannot be applied to a scenario with multiple influencing factors, and the accuracy of determining the influencing factors is low.
- embodiments of the present application provide a method, an apparatus, a terminal device, and a computer-readable storage medium for determining an influencing factor of an event, so as to solve the inaccurate determination of the influencing factor of an event in the prior art, and determine the applicability of the method Low problem.
- a first aspect of the embodiments of the present application provides a method for determining an influencing factor of an event, including:
- the data samples include a tag characteristic value and a plurality of factor characteristic values
- the tag characteristic value is used to indicate an event result
- each of the factor characteristic values is respectively associated with a preset sample Factor correspondence
- a factor node is determined from the structural nodes of the factor structure tree, and a sample factor corresponding to the factor node is output as an influence factor of the event.
- a second aspect of the embodiments of the present application provides an apparatus for determining an influence factor of an event, which may include a unit for implementing the steps of the foregoing method for determining an influence factor of an event.
- a third aspect of the embodiments of the present application provides a terminal device including a memory and a processor.
- the memory stores computer-readable instructions executable on the processor, and the processor executes the computer-readable instructions.
- the steps of the method for determining the influence factors of the event described above are implemented when the instruction is read.
- a fourth aspect of the embodiments of the present application provides a computer-readable storage medium, where the computer-readable storage medium stores computer-readable instructions, and when the computer-readable instructions are executed by a processor, the above-mentioned method for determining an influence factor of an event is implemented. Method steps.
- each data sample includes a tag characteristic value and multiple factor characteristic values, wherein the tag characteristic value indicates an event result in which the data sample is located, and the multiple factor characteristic values are data.
- Quantitative values of multiple sample factors corresponding to the sample are obtained.
- multiple data samples are fitted to the learning model, and the fitted learning model is used as the factor structure tree.
- the factors are determined from the structural nodes in the factor structure tree. Nodes, and output the sample factors corresponding to the factor nodes as the influencing factors of the event.
- by constructing a factor structure tree it covers multiple influencing factors that interact with each other, thus affecting the event, and improving the determination of influencing factors. Accuracy and applicability.
- Embodiment 1 is an implementation flowchart of a method for determining an influencing factor of an event in Embodiment 1 of the present application;
- FIG. 2 is an implementation flowchart of a method for determining an influencing factor of an event in Embodiment 2 of the present application
- Embodiment 3 is an implementation flowchart of a method for determining an influencing factor of an event in Embodiment 3 of the present application;
- Embodiment 4 is an implementation flowchart of a method for determining an influence factor of an event in Embodiment 4 of the present application
- Embodiment 5 is an implementation flowchart of a method for determining an influence factor of an event in Embodiment 5 of the present application
- FIG. 6 is a structural block diagram of an apparatus for automatically finding logistics information in Embodiment 6 of the present application.
- FIG. 7 is a schematic diagram of a terminal device in Embodiment 7 of the present application.
- FIG. 1 is an implementation flowchart of a method for determining an influence factor of an event according to an embodiment of the present application. As shown in Figure 1, the method includes the following steps:
- S101 Obtain multiple data samples related to an event.
- the data samples include a tag characteristic value and multiple factor characteristic values.
- the tag characteristic value is used to indicate an event result, and each of the factor characteristic values is associated with a preset. Corresponding to the sample factors.
- an event is affected by influencing factors, and the result of the event changes due to changes in influencing factors.
- the sample factors may include sea and land locations, topography, barometric pressure, the number of residents, and the education level of the residents. Therefore, it is necessary to determine the impact related to the average annual rainfall from the above sample factors. factor.
- a plurality of data samples related to an event are first obtained, and each data sample includes a tag characteristic value and a plurality of factor characteristic values, and the tag characteristic value indicates the event result, such as the above-mentioned annual average rainfall value,
- Each factor characteristic value corresponds to a sample factor, indicating the specific value of the sample factor. Because the data samples are all specific values, before each data sample is obtained, the event results and multiple sample factors corresponding to the data samples are numerically processed, the event results are converted into label feature values, and multiple samples are Factors are converted into multiple factor characteristic values. Take the annual average rainfall as an example. For the convenience of calculation, the specific value of the annual average rainfall is generally not used as the label characteristic value.
- three zone value intervals are set to reduce the annual average rainfall to less than
- the feature value of the tag corresponding to 100 mm or more is set to 0, the feature value of the tag corresponding to the annual average rainfall greater than 100 mm and less than or equal to 500 mm is set to 1, and the feature value of the tag corresponding to the annual average rainfall greater than 500 mm is set to 0.
- Is 2 for example, if all the sea and land positions are preset to include A, and the values are 1, 2, ..., A, the type of the sea and land position in the data sample is determined, and the value corresponding to the type is assigned to the sea and land position.
- the above examples do not limit the embodiments of the present application. In some application scenarios, multiple data samples have been numerically processed during recording and stored in a database. Therefore, in the embodiment of the present application, multiple data samples can be obtained directly from the database.
- multiple data samples are selected according to the sample conditions. Since there may be a large number of samples related to the event, a data sample may be selected from the large number of samples according to preset sample conditions. Sample conditions can be related to regions and orders of magnitude. For example, a large number of samples are selected from a range of latitudes and longitudes within a certain range, and the number of samples is one thousand, and the selected samples are used as data samples. The sample conditions can be determined according to the actual application scenario, which improves the applicability of data sample selection to different application scenarios.
- S102 Fit the plurality of data samples with a preset learning model, and output the fitted learning model as a factor structure tree.
- a plurality of data samples are fitted to a preset learning model to generate a factor structure tree.
- multiple data samples are first constructed as the root nodes of the factor structure tree.
- a certain value within the range of the characteristic value of a certain type of factor is used as the split condition, and the root node is Split into left node and right node (for example, classify data samples with factor characteristic values less than or equal to the value to the left node, and classify data samples with factor characteristic values greater than the value to the right node), and then calculate based on multiple data samples
- the left node and the right node are split until a preset stop condition is reached, and then a factor structure tree is generated, where a certain type of factor characteristic value refers to a factor characteristic value corresponding to a certain sample factor.
- S103 Determine a factor node from the structural nodes of the factor structure tree, and output a sample factor corresponding to the factor node as an influence factor of the event.
- the factor nodes are determined from the structural nodes.
- the factor nodes may be all the structural nodes, or a part of the structural nodes may be filtered out according to preset filtering conditions as Factor nodes, the specific process is explained later. Because the structural node is obtained by splitting the upper-level node according to a certain value within the value range of the characteristic value of a certain type of factor, after determining the factor node, the characteristic value of a certain type of factor corresponding to the factor node is found. Thus, a sample factor corresponding to the characteristic value of the factor is determined, and the sample factor is output as an influence factor of the event.
- each data sample when there are multiple sample factors, by acquiring multiple data samples related to an event, each data sample includes a label feature value and multiple factor features. Values, label feature values are used to indicate event results, each factor feature value corresponds to a preset sample factor, and then multiple data samples are fitted to a preset learning model to train the learning model.
- the combined learning model is used as the factor structure tree, and the factor nodes are determined from the structural nodes of the factor structure tree, and the sample factors corresponding to the factor nodes are output as influencing factors related to the event. Scenarios, improving the applicability and accuracy of the method for determining the factors that affect an event.
- FIG. 2 is an implementation flowchart of a method for determining an influence factor of an event provided in Embodiment 2 of the present application.
- this embodiment refines S102 to obtain S201 to S205, which are detailed as follows:
- S201 Construct a data sample set according to the multiple data samples, set a label feature value of each of the data samples as a label parameter of the data sample set, and set the multiple factors of each of the data samples The eigenvalue is set as an input parameter of the data sample set.
- a data sample set is first constructed based on the multiple data samples, where the label feature values of each data sample constitute the label parameters of the data sample set, and multiple factors for each data sample
- the eigenvalues constitute the input parameters of the data sample set.
- the data sample set is (Eigenvalue label1 , Eigenvalue factor1 ), (Eigenvalue label2 , Eigenvalue factor2 ) ... (Eigenvalue labeln , Eigenvalue factorn ), where Eigenvalue labeli represents the label feature value of the i-th data sample.
- Eigenvalue factori is used to represent multiple factor characteristic values of the i-th data sample, and n represents the total number of data samples.
- S202 Obtain a value range of the characteristic value of the factor corresponding to each of the sample factors in the input parameters, and perform a binary operation on the value range until N dichotomous points are obtained, where N is greater than zero. Integer.
- the maximum and minimum values of the eigenvalues of a class of factors corresponding to each sample factor in all input parameters of the statistical data sample set that is, the value range
- the dichotomy method uses the dichotomy method to perform a dichotomy operation on this value range until N dichotomy points are obtained, where N is an integer greater than zero, which can be formulated according to the actual application scenario.
- N is an integer greater than zero
- the generated factor structure tree The effect is better, but at the same time the training time will increase accordingly.
- the maximum value is 10
- the minimum value is 0.
- the binary value is divided according to a preset value range. For example, a value range with the smallest boundary point value may be preferentially selected and divided into two. In the example where the value range is 0 to 10 and the value is divided into two, if you want to obtain four dichotomy points, in the last dichotomy operation, you bisect the value range from 0 to 2.5, that is, the obtained dichotomy point is 1.25. , 2.5, 5 and 7.5.
- S203 Construct a root node of the factor structure tree according to the data sample set, and calculate an optimal splitting income obtained by splitting the root node according to the N binary points corresponding to a plurality of the sample factors.
- F () in the formula indicates a function that exists in function space.
- Function space refers to a set of functions of a given kind from one set to another, that is, the f () function is initially in an unknown state.
- K indicates that there are K above-mentioned f () functions in the learning model. The results calculated by all the f () functions need to be accumulated to obtain the final predicted value.
- the K f () functions of the trained learning model are the factor structure trees, that is, there are K factor structure trees.
- the f () function is trained by using a forward prediction method, so that the finally obtained K f () functions can be matched with the data in the data sample set to the greatest extent. For example, based on the input parameter Eigenvalue factori , the t-round prediction is performed on the input parameter, and when the t-round prediction is performed, the prediction result of the t-1 round is retained, that is, based on the result of the previous training Train the factor structure tree so that the predicted value The gap between the actual label parameter (Eigenvalue labeli ) is gradually reduced.
- the specific forward prediction formula is as follows:
- the values of t and K are the same.
- the predicted value after the t-th round of prediction is performed.
- the objective function is constructed. The specific formula is as follows:
- ⁇ (f t ) is a regular term and D is a constant term.
- the regular term controls the degree of training of the f () function and prevents the data sample set from overfitting the learning model.
- the constant term is a constant.
- the constant term is used to limit the numerical range of the objective function. It is worth mentioning that, As an error function, the process of optimizing the objective function is a process of determining a suitable f () function so that the value of the above error function is minimized.
- the expanded objective function is:
- the constant term in the expanded objective function is extracted to generate a training function of the expanded objective function in the t-th round, the formula is as follows:
- the output value obtained by the training function depends on the values of g i and h i .
- the label parameter Value i and the input parameter Eigenvalue factori corresponding to each data sample in the data sample set there are first split data g i and second split data h i corresponding to the data sample.
- the root node is split according to the N dichotomous points corresponding to the multiple sample factors.
- the bisection point is used as the splitting condition, and the root node is split into a first sample set and a second sample set (the corresponding factor characteristics in the input parameters can be used)
- Data samples with a value less than or equal to the dichotomy point are classified into the first sample set, and data samples with corresponding factor characteristic values greater than the dichotomy point in the input parameters are categorized into the second sample set.
- the first split data and the second split data of the data sample, and the first split data and the second split data of the data sample under the second sample set are calculated, and the split income corresponding to the dichotomy point can be calculated.
- Count the multiple split returns of N dichotomous points corresponding to multiple sample factors and use the split return with the largest value as the best split return.
- a revenue threshold is set, and it is determined whether the optimal split revenue is greater than the revenue threshold. If the optimal splitting return is greater than the return threshold, perform a binary operation on the root node according to the dichotomy point to obtain the left node and the right node; if the optimal splitting return is less than or equal to the return threshold, it means that there are N corresponding to multiple sample factors Neither the bifurcation point is suitable for the bisection operation, then it is judged whether the prediction of the factor structure tree reaches the t-th round. If it does not reach the t-th round, the next round of prediction is made. If the t-th round has been reached, the factor structure is stopped. Tree prediction.
- the stopping conditions include the first stopping condition in the first to t-1 prediction processes and the second stopping condition in the t-th prediction process, for example, the first stopping condition in the first to t-1 predictions. It can be set to stop the prediction of the round and perform the next round of prediction when the number of nodes of the factor structure tree reaches the preset number during the prediction process of the round, or the depth of the factor structure tree reaches the preset depth;
- the second stopping condition in the round prediction process can be set to stop the prediction when the number of nodes in the factor structure tree reaches a preset number or the depth of the factor structure tree reaches a preset depth, and the factor structure tree The prediction is complete.
- the label feature values and multiple factor feature values of the data samples are set as the label parameters and Input parameters, and obtain the value range of the factor eigenvalues corresponding to each sample factor in the input parameters.
- Divide the value range to obtain N dichotomous points, where N is an integer greater than zero, and construct the root node according to the data sample set.
- Binary operation and then continue to perform binary operation on the left and right nodes after the binary operation is performed, until the constructed factor structure tree reaches a preset stop condition, the factor structure tree is generated, and the generated factor structure tree is improved for multiple data.
- Sample accuracy is used to perform binary operation on the left and right nodes after the binary operation is performed, until the constructed factor structure tree reaches a preset stop condition, the factor structure tree is generated, and
- FIG. 3 is an implementation flowchart of a method for determining an influence factor of an event provided in Embodiment 3 of the present application. Compared with the embodiment corresponding to FIG. 2, this embodiment refines S203 to obtain S301 to S302, which are detailed as follows:
- the data sample set includes 4 data samples, separated by the bisection, the first sample set is called I L , which contains 2 data samples, (Eigenvalue label1 , Eigenvalue factor1 ), (Eigenvalue label2 , Eigenvalue factor2 ); the second The sample set is called I R , which contains 2 data samples, which are (Eigenvalue label3 , Eigenvalue factor3 ), (Eigenvalue label4 , Eigenvalue factor4 ). Then calculate the first dependence number and the second dependence number of each data sample in the first sample set IL , and take the data sample with the label parameter Eigenvalue label1 as an example:
- g 1 , h 1 , g 2 , h 2 of the first sample set I L and g 3 , h 3 , g 4 , h 4 of the second sample set I R can be calculated, and according to a preset return formula Calculate the split income:
- Value P1 is a constant term, which is used to reduce the error during the calculation of the split revenue, to prevent the error of the generated split revenue from being too large;
- Value P2 is another constant term, which is used to make the split revenue at a certain value. Within the range of values, it is convenient to compare the best split income generated based on multiple split returns with a preset return threshold.
- S302 Obtain a plurality of the split returns corresponding to the N dichotomies of the plurality of sample factors, and use the split return with the largest value as the optimal split return.
- each sample factor corresponds to N dichotomous points
- multiple splitting factors corresponding to all dichotomous points are calculated according to the above-mentioned return formula, and the splitting return with the largest value is used as the best splitting return.
- the data sample set is divided into a first sample set and a second sample set according to a bisection point, and the data sample and the The data samples in the two-sample set are input to a preset return formula to obtain the split income corresponding to the bisected point.
- the multiple split returns corresponding to the N bis points of all sample factors are compared, and the split value with the largest value is compared.
- the income formula improves the degree of fit between the split income and the data sample set, and improves the accuracy of the split income.
- FIG. 4 is an implementation flowchart of a method for automatically finding logistics information provided in Embodiment 4 of the present application. Compared with the embodiment corresponding to FIG. 1, this embodiment obtains S401 to S402 after refinement of S103 based on the existence of multiple influencing factors. The details are as follows:
- the number of occurrences of the factor nodes in the factor structure tree is counted. Due to the existence of multiple influencing factors, the factor nodes and influencing factors Correspondingly, there are multiple occurrences.
- the number of occurrences of the split condition in the factor structure tree is counted. Since the split condition is a certain value within the range of the characteristic value of a certain type of factor, the number of occurrences of the split condition can be equal to the factor characteristic. The value corresponds to the number of occurrences of factor nodes, which improves the convenience of obtaining the number of occurrences of factor nodes.
- S402 Sort a plurality of the influencing factors corresponding to the factor node according to the number of occurrences, and output the sorted plurality of the influencing factors.
- multiple influencing factors can be sorted according to the value of the number of occurrences in descending order.
- the number of occurrences is 4, 3, 5, and the corresponding influencing factors are sea and land respectively.
- the output is sorted into multiple factors that are barometric pressure, sea and land location, and terrain. The earlier the ranking of the influencing factors, the greater the degree of influence of the influencing factors on the event.
- the number of occurrences of the factor node in the factor structure tree is counted, where there are multiple occurrences, and multiple impacts corresponding to the factor node are affected according to the occurrence number.
- Factors are sorted, and multiple sorted influencing factors are output, realizing the importance of event influencing factors, and adapting to the needs of users for the importance of influencing factors.
- FIG. 5 is a flowchart of a method for automatically finding logistics information provided in Embodiment 5 of the present application. Compared to the embodiment corresponding to FIG. 1, this embodiment refines S103 to obtain S501 to S502, which are detailed as follows:
- the weight values of each structural node in the factor structure tree are obtained separately.
- the weight value is automatically generated according to a preset weight calculation formula of the learning model. Therefore, in the embodiment of the present application, the weight value is obtained directly after the factor structure tree is generated.
- the weight values of a type of structure node are added, where a type of structure node corresponds to a sample factor.
- the weight calculation formula can be set as:
- Weight i indicates a weight value of a node in the structure, g i for the structure corresponding to the node number of a first data sample dependent, the number of h i second dependency structure for data samples corresponding to the node.
- S502 Output the structural node whose weight value is greater than a preset weight threshold as the factor node.
- a weight threshold is set, and if the weight value of a certain type of structural node after the addition operation is greater than the weight threshold, the type of structural node is output as a factor node. Because the structural nodes correspond to sample factors, the above process essentially outputs sample factors that are greater than a predetermined significance level as the influencing factors of the event.
- the superimposed weights are A type of structural node whose value is greater than a preset weight threshold is output as a factor node.
- FIG. 6 shows a structural block diagram of an apparatus for determining an influencing factor of an event according to an embodiment of the present application.
- the apparatus includes:
- An obtaining unit 61 is configured to obtain multiple data samples related to an event, where the data samples include a tag characteristic value and multiple factor characteristic values, and the tag characteristic value is used to indicate an event result, and each of the factor characteristic values is respectively Corresponds to a preset sample factor;
- a fitting unit 62 configured to fit the plurality of data samples with a preset learning model, and output the fitted learning model as a factor structure tree;
- An output unit 63 is configured to determine a factor node from the structural nodes of the factor structure tree, and output a sample factor corresponding to the factor node as an influence factor of the event.
- the fitting unit 62 includes:
- a construction unit configured to construct a data sample set according to the multiple data samples, set a label feature value of each of the data samples as a label parameter of the data sample set, and set the Multiple factor characteristic values are set as input parameters of the data sample set;
- a value obtaining unit is configured to obtain a value range of the characteristic value of the factor corresponding to each of the sample factors in the input parameter, and perform a binary operation on the value range until N binary points are obtained, where , N is an integer greater than zero;
- a revenue calculation unit configured to construct a root node of the factor structure tree according to the data sample set, and calculate an optimum obtained by splitting the root node according to the N dichotomous points corresponding to a plurality of the sample factors Split income
- a dichotomy unit configured to perform a dichotomy operation on the root node according to a dichotomy point corresponding to the optimal splitting revenue if the optimal splitting revenue is greater than a preset revenue threshold;
- the continuation dichotomy unit is configured to perform dichotomy on the node obtained by performing the dichotomy operation on the root node until the factor structure tree constructed based on the dichotomy operation node reaches a preset stop condition.
- the revenue calculation unit includes:
- a calculation subunit configured to divide the data sample set into a first sample set and a second sample set according to the bisection point, and input the first sample set and the second sample set into a preset return formula To get split income;
- the comparison unit is configured to obtain a plurality of the split returns corresponding to the N dichotomies of the plurality of sample factors, and use the split return with the largest value as the optimal split return.
- the output unit 63 includes:
- a statistics unit configured to count the number of occurrences of the factor node in the factor structure tree
- a sorting unit is configured to sort a plurality of the influencing factors corresponding to the factor node according to the number of occurrences, and output the plurality of the influencing factors after being sorted.
- the output unit 63 includes:
- a weight obtaining unit configured to obtain a weight value of each of the structural nodes in the factor structure tree separately;
- An output subunit is configured to output the structural node whose weight value is greater than a preset weight threshold as the factor node.
- FIG. 7 is a schematic diagram of a terminal device according to an embodiment of the present application.
- the terminal device 7 of this embodiment includes a processor 70 and a memory 71.
- the memory 71 stores computer-readable instructions 72 that can be run on the processor 70, for example, determining an influence factor of an event. program of.
- the processor 70 executes the computer-readable instructions 72
- the steps in the foregoing method embodiment for determining an influence factor of an event are implemented, for example, steps S101 to S103 shown in FIG. 1.
- the processor 70 executes the computer-readable instructions 72
- the functions of the units in the foregoing device embodiments are implemented, for example, the functions of the units 61 to 63 shown in FIG. 6.
- the computer-readable instructions 72 may be divided into one or more modules / units, the one or more modules / units are stored in the memory 71 and executed by the processor 70, To complete this application.
- the one or more modules / units may be a series of computer-readable instruction segments capable of performing specific functions, and the instruction segments are used to describe the execution process of the computer-readable instructions 72 in the terminal device 7.
- the computer-readable instructions 72 may be divided into an acquisition unit, a fitting unit, and an output unit, and the specific functions of each unit are as described above.
- the terminal device may include, but is not limited to, a processor 70 and a memory 71.
- FIG. 7 is only an example of the terminal device 7 and does not constitute a limitation on the terminal device 7. It may include more or fewer components than shown in the figure, or combine some components or different components.
- the terminal device may further include an input / output device, a network access device, a bus, and the like.
- the so-called processor 70 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application specific integrated circuits (ASICs), Ready-made programmable gate array (Field-Programmable Gate Array, FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc.
- a general-purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
- the memory 71 may be an internal storage unit of the terminal device 7, such as a hard disk or a memory of the terminal device 7.
- the memory 71 may also be an external storage device of the terminal device 7, such as a plug-in hard disk, a Smart Media Card (SMC), and a Secure Digital (SD) provided on the terminal device 7. Cards, flash cards, etc. Further, the memory 71 may further include both an internal storage unit of the terminal device 7 and an external storage device.
- the memory 71 is configured to store the computer-readable instructions and other programs and data required by the terminal device.
- the memory 71 may also be used to temporarily store data that has been output or is to be output.
- each functional unit in each embodiment of the present application may be integrated into one processing unit, or each of the units may exist separately physically, or two or more units may be integrated into one unit.
- the above integrated unit may be implemented in the form of hardware or in the form of software functional unit.
- the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it may be stored in a computer-readable storage medium.
- the technical solution of the present application is essentially a part that contributes to the existing technology or all or part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium , Including a number of instructions to enable a computer device (which may be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application.
- the foregoing storage media include: U disks, mobile hard disks, read-only memories (ROMs), random access memories (RAMs), magnetic disks or compact discs and other media that can store program codes .
Landscapes
- Engineering & Computer Science (AREA)
- Data Mining & Analysis (AREA)
- Theoretical Computer Science (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Bioinformatics & Cheminformatics (AREA)
- Bioinformatics & Computational Biology (AREA)
- Artificial Intelligence (AREA)
- Evolutionary Biology (AREA)
- Evolutionary Computation (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Life Sciences & Earth Sciences (AREA)
- Management, Administration, Business Operations System, And Electronic Commerce (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
本方案适用于数据处理技术领域,提供了确定事件影响因素的方法、终端设备及计算机可读存储介质,包括:获取与事件相关的多个数据样本,所述数据样本包括标签特征值和多个因素特征值,所述标签特征值用于指示事件结果,每个所述因素特征值分别与一个预设的样本因素对应;将所述多个数据样本与预设的学习模型进行拟合,并将拟合完成的所述学习模型输出为因素结构树;从所述因素结构树的结构节点中确定出因素节点,并将与所述因素节点对应的样本因素输出为所述事件的影响因素。本方案通过构建因素结构树,提升了对事件的影响因素确定的准确性和适用性。
Description
本申请要求于2018年05月22日提交中国专利局、申请号为201810496726.7、发明名称为“确定事件影响因素的方法及终端设备”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
本申请属于数据处理技术领域,尤其涉及一种确定事件影响因素的方法、装置、终端设备及计算机可读存储介质。
在现实生活中,事件的结果往往与某些影响因素相关,例如某地区的降雨量与该地区的海陆位置、地形、气压带和风带等影响因素有关。统计学是关于认识客观现象总体数量特征和数量关系的科学,在确定事件的影响因素时,需要利用统计学,获取大量的与事件相关的样本,并对样本进行观察和计算,从而得到与事件相关的影响因素。
在现有技术中,往往是提取出与样本与单个因素相关的部分,并根据该部分样本在该因素影响下是否发生改变,来判断该因素是否为事件的影响因素。但是,事件可能与多个影响因素有关,并且多个影响因素之间可能会互相影响,从而改变事件的结果。综上,现有的确定事件影响因素的方法无法适用于存在多个影响因素的场景,并且确定影响因素的准确性低。
有鉴于此,本申请实施例提供了一种确定事件影响因素的方法、装置、终端设备及计算机可读存储介质,以解决现有技术中事件的影响因素确定不准确,且确定方法的适用性低的问题。
本申请实施例的第一方面提供了一种确定事件影响因素的方法,包括:
获取与事件相关的多个数据样本,所述数据样本包括标签特征值和多个因素特征值,所述标签特征值用于指示事件结果,每个所述因素特征值分别与一个预设的样本因素对应;
将所述多个数据样本与预设的学习模型进行拟合,并将拟合完成的所述学习模型输出为因素结构树;
从所述因素结构树的结构节点中确定出因素节点,并将与所述因素节点对应的样本因素输出为所述事件的影响因素。
本申请实施例的第二方面提供了一种确定事件影响因素的装置,可以包括用于实现上述 确定事件影响因素的方法的步骤的单元。
本申请实施例的第三方面提供了一种终端设备,包括存储器以及处理器,所述存储器中存储有可在所述处理器上运行的计算机可读指令,所述处理器执行所述计算机可读指令时实现上述确定事件影响因素的方法的步骤。
本申请实施例的第四方面提供了一种计算机可读存储介质,所述计算机可读存储介质存储有计算机可读指令,所述计算机可读指令被处理器执行时实现上述确定事件影响因素的方法的步骤。
本申请实施例通过获取与事件相关的多个数据样本,每个数据样本包括标签特征值和多个因素特征值,其中,标签特征值指示数据样本处于的事件结果,多个因素特征值是数据样本对应的多个样本因素的量化值,接下来将多个数据样本与学习模型进行拟合,并将拟合完成的学习模型作为因素结构树,最后从因素结构树中的结构节点确定出因素节点,将因素节点对应的样本因素输出为事件的影响因素,本申请实施例通过构建因素结构树,涵盖了多个影响因素存在互相影响,从而对事件造成影响的情况,提升了影响因素确定的准确性和适用性。
图1是本申请实施例一中确定事件影响因素的方法的实现流程图;
图2是本申请实施例二中确定事件影响因素的方法的实现流程图;
图3是本申请实施例三中确定事件影响因素的方法的实现流程图;
图4是本申请实施例四中确定事件影响因素的方法的实现流程图;
图5是本申请实施例五中确定事件影响因素的方法的实现流程图;
图6是本申请实施例六中自动查找物流信息的装置的结构框图;
图7是本申请实施例七中终端设备的示意图。
为了对本申请的技术特征、目的和效果有更加清楚的理解,现对照附图详细说明本申请的具体实施方式。
请参阅图1,图1是本申请实施例提供的一种确定事件影响因素的方法的实现流程图。如图1所示,该方法包括以下步骤:
S101:获取与事件相关的多个数据样本,所述数据样本包括标签特征值和多个因素特征值,所述标签特征值用于指示事件结果,每个所述因素特征值分别与一个预设的样本因素对 应。
通常来说,一个事件被影响因素影响,事件结果因影响因素的改变而发生变化,而在实际场景中,往往存在多个样本因素,故需要从多个样本因素中确定与事件关联的影响因素。比如在事件为年平均降雨量的情况下,样本因素可能有海陆位置、地形、气压带、居民人数和居民受教育程度等,故需要从上述的样本因素中确定与年平均降雨量相关的影响因素。在本申请实施例中,首先获取与事件相关的多个数据样本,每个数据样本包括标签特征值和多个因素特征值,标签特征值指示事件结果,如上述的年平均降雨量的数值,每个因素特征值与一个样本因素对应,指示该样本因素的具体数值。由于在数据样本都为具体的数值,故获取每个数据样本之前,对该数据样本对应的事件结果和多个样本因素进行数值化处理,将事件结果转换为标签特征值,并将多个样本因素转换为多个因素特征值,以年平均降雨量举例,为了计算方便,一般不以年平均降雨量的具体数值作为标签特征值,而是设置三个区值区间,将年平均降雨量小于或等于100毫米对应的标签特征值置为0,将年平均降雨量大于100毫米且小于或等于500毫米对应的标签特征值置为1,将年平均降雨量大于500毫米对应的标签特征值置为2;再比如预设所有的海陆位置包括A种,数值分别为1、2、……、A,则判断数据样本中的海陆位置属于的种类,并将种类对应的数值赋予至海陆位置对应的因素特征值,其中,A为大于零的整数。当然,上述例子并不构成对本申请实施例的限定。在某些应用场景下,多个数据样本在记录时已进行了数值化处理,并存储在数据库中,故在本申请实施例中,可直接在数据库中获取多个数据样本。
可选地,根据样本条件选定多个数据样本。由于可能存在与事件相关的大量样本,故可依照预设的样本条件从大量样本中选取数据样本。样本条件可以与地域和数量级等相关,例如在大量样本中选取经纬度在一定范围的地区内的样本,且选取数量为一千个,并将选取出的样本作为数据样本。样本条件可根据实际应用场景进行确定,提升了数据样本选择对不同应用场景的适用性。
S102:将所述多个数据样本与预设的学习模型进行拟合,并将拟合完成的所述学习模型输出为因素结构树。
在传统的方法中,往往是根据理论推断或者提取多个数据样本中与单个因素相关的部分进行比对,来分别确定多个样本因素中对事件存在影响的影响因素。比如单独提取数据样本中的标签特征值以及与海陆位置对应的因素特征值进行分析,从而可以判断靠近大海的位置的年平均降雨量更高,故将海陆位置作为年平均降雨量的影响因素。但是,对单个因素单独提取进行分析的方法,可能会因事件被其他因素影响,造成分析不准确,并且多个样本因素之间可能互相影响,故传统的方法不适用于分析存在多个样本因素的情况。在本申请实施例 中,将多个数据样本与预设的学习模型进行拟合,生成因素结构树。在拟合过程中,首先将多个数据样本构建为因素结构树的根节点,并根据多个数据样本计算将某一类因素特征值取值范围内的某个数值作为***条件,将根节点***为左节点和右节点(如将因素特征值小于或等于该数值的数据样本归至左节点,将因素特征值大于该数值的数据样本归至右节点),再根据多个数据样本进行计算,进而对左节点和右节点进行***,直到达到预设的停止条件,则因素结构树生成,其中,某一类因素特征值是指与某个样本因素对应的因素特征值。
S103:从所述因素结构树的结构节点中确定出因素节点,并将与所述因素节点对应的样本因素输出为所述事件的影响因素。
将因素结构树中除开根节点的所有节点作为结构节点,并从结构节点中确定因素节点,其中,因素节点可以是所有的结构节点,也可以根据预设的筛选条件筛选出部分的结构节点作为因素节点,具体过程在后文进行阐述。由于结构节点是根据某一类因素特征值取值范围内的某个数值对上一级节点进行***得到的,故在确定出因素节点后,查找到与因素节点对应的某类因素特征值,从而确定与该因素特征值对应的样本因素,并将该样本因素输出为事件的影响因素。
通过图1所示实施例可知,在本申请实施例中,在存在多个样本因素的情况下,通过获取与事件相关的多个数据样本,每个数据样本包括标签特征值和多个因素特征值,标签特征值用于指示事件结果,每个因素特征值分别与一个预设的样本因素对应,然后将多个数据样本与预设的学习模型进行拟合,以训练该学习模型,将拟合完成的学习模型作为因素结构树,并且从因素结构树的结构节点中确定出因素节点,将因素节点对应的样本因素作为与事件相关的影响因素进行输出,可适用于存在多个影响因素的场景,提升了确定事件影响因素的方法的适用性和准确性。
请参阅图2,图2是本申请实施例二提供的一种确定事件影响因素的方法的实现流程图。相对于图1对应的实施例,本实施例对S102进行细化后得到S201~S205,详述如下:
S201:根据所述多个数据样本构建数据样本集,将每个所述数据样本的标签特征值设置为所述数据样本集的标签参数,并将每个所述数据样本的所述多个因素特征值设置为所述数据样本集的输入参数。
在根据多个数据样本训练学习模型时,首先根据多个数据样本构建数据样本集,其中,每个所述数据样本的标签特征值构成数据样本集的标签参数,每个数据样本的多个因素特征值构成数据样本集的输入参数。举例来说,数据样本集为(Eigenvalue
label1,Eigenvalue
factor1),(Eigenvalue
label2,Eigenvalue
factor2)……(Eigenvalue
labeln,Eigenvalue
factorn),其中,Eigenvalue
labeli代表第i个数据样本的标签特征值,在本申请实施例中Eigenvalue
factori用于表示第i个数据样 本的多个因素特征值,n代表数据样本的总数。
S202:获取所述输入参数内与每个所述样本因素对应的所述因素特征值的取值范围,并对所述取值范围进行二分操作直至得到N个二分点,其中,N为大于零的整数。
在数据样本集构建成功后,即所有数据样本都输入完毕后,统计数据样本集的所有输入参数中与每一种样本因素对应的一类因素特征值的最大值和最小值,即取值范围,并通过二分法,对该取值范围进行二分操作,直到得到N个二分点,N为大于零的整数,可根据实际应用场景进行制定,通常来说,N越大,生成的因素结构树效果更好,但同时训练时间也会对应增长。比如对于海陆位置对应的因素特征值,最大值为10,最小值为0,要获得三个二分点,则对最大值与最小值构成的取值范围进行三次二分操作,得到的二分点为2.5、5和7.5。值得一提的是,若N为偶数,则在二分操作的最后一步时,根据预设的取值范围进行二分,例如可制定优先选取边界点数值最小的取值范围进行二分,在上述对取值范围为0到10的取值范围进行二分的例子中,若要获得四个二分点,则在最后一次二分操作时,对0到2.5的取值范围进行二分,即得到的二分点为1.25、2.5、5和7.5。
S203:根据所述数据样本集构建所述因素结构树的根节点,并计算根据多个所述样本因素对应的所述N个二分点对所述根节点进行***得到的最佳***收益。
为了便于说明,首先对学习模型(因素结构树)的训练过程进行介绍,学习模型对输入参数的计算公式为:
在上述公式中,
代表对输入参数为Eigenvalue
factori的预测值,即是将Eigenvalue
factori作为输入参数输入至学习模型后,学习模型计算后的输出结果。公式中的f()指示一个存在于函数空间的函数,函数空间指的是从一个集合到另一个集合的给定种类的函数的集合,即f()函数最初处于未知状态。K则表示学习模型中存在K个上述的f()函数,需要将所有的f()函数计算出的结果累加后,才能得到最终的预测值。值得一提的是,训练完成的学习模型的K个f()函数即为因素结构树,即因素结构树存在K个。
计算公式确定后,在本申请实施例中,采用前向预测的方法对f()函数进行训练,以使最终得到的K个f()函数最大限度地符合数据样本集中的数据。举例来说,在输入参数为Eigenvalue
factori的基础上,对输入参数进行t轮的预测,并在进行第t轮的预测时,保留第t-1轮的预测结果,即依据前次训练的结果训练因素结构树,使得预测值
与实际的标签参数(Eigenvalue
labeli)之间的差距逐渐减小,具体的前向预测的公式见下:
在本申请实施例中,t和K的数值相同,上述公式中的
是在给出输入参数为Eigenvalue
factori的基础上,进行第t轮预测后的预测值。为了确定在前向预测过程中的f()函数,使其尽量贴近于数据样本集,故构建目标函数,具体公式见下:
在上述公式中,Eigenvalue
labeli是数据样本集中与输入参数Eigenvalue
factori对应的标签参数,即是数据样本中的标签特征值。目标函数公式中的Ω(f
t)为正则项,D为常数项,其中,正则项控制f()函数的训练程度,防止数据样本集与学习模型过拟合;常数项为一个常量,设置常数项是为了限制目标函数的数值范围。值得一提的是,
为误差函数,对目标函数进行优化的过程,即是确定合适的f()函数使得上述误差函数的值尽量减小的过程。
展开后的目标函数为:
由于常数项实质并不影响目标函数的优化过程,故提取出展开后的目标函数中的常数项,可生成展开后的目标函数在第t轮的训练函数,公式如下:
在最终的训练函数中,训练函数得到的输出值依赖于g
i和h
i的值。基于数据样本集中每一个数据样本对应的标签参数Value
i和输入参数Eigenvalue
factori,都存在与该数据样本对应的第一***数据g
i和第二***数据h
i。在确定根节点和每个样本因素对应的N个二分点后,根据多个样本因素对应的N个二分点对根节点进行***。举例来说,若根据其中一个二分点对根节点进行***,则将该二分点作为***条件,将根节点***为第一样本集和第二样本集(可将输入参数中对应的因素特征值小于或等于该二分点的数据样本归至第一样本集,将输入参数中对应的因素特征值大于该二分点的数据样本归至第二样本集),并根据第一样本集下数据样本的第一***数据和第二***数据,第二样本集下数据样本的第一***数据和第二***数据进行计算,即可计算得到该二分点对应的***收益。统计多个样本因素对应的N个二分点的多个***收益,将其中数值最大的***收益作为最佳***收益。
S204:若所述最佳***收益大于预设的收益阈值,则根据所述最佳***收益对应的二分点对所述根节点进行二分操作。
在本申请实施例中,对于因素结构树的构建过程,设置收益阈值,并判断最佳***收益是否大于收益阈值。若最佳***收益大于收益阈值,则根据该二分点对根结点进行二分操作,得到左节点和右节点;若最佳***收益小于或等于收益阈值,则说明多个样本因素对应的N个二分点都不适于进行二分操作,则判断对因素结构树的预测是否达到第t轮,若未达到第t轮,则进行下一轮的预测,若已达到第t轮,则停止对因素结构树的预测。
S205:对将所述根节点进行二分操作后得到的节点继续进行二分操作,直到基于二分操作得到的节点构建的所述因素结构树达到预设的停止条件。
对根节点进行二分操作得到左节点和右节点后,对左节点和右节点继续按照步骤S203和S204的方法,即计算根据每个所述样本因素对应的所述N个二分点对左节点(右节点)进行***得到的最佳***收益,若最佳***收益大于收益阈值,则根据最佳***收益对应的二分点对左节点(右节点)进行二分操作,不断迭代上述过程,直到构建的因素结构树达到预设的停止条件。其中,停止条件包含第1至t-1轮预测过程中的第一停止条件和第t轮预测过程中的第二停止条件,比如,第1至t-1轮预测过程中的第一停止条件可设置为当该轮预测过程中的因素结构树的节点达到预设的个数,或因素结构树的深度达到预设深度时,停止该轮的预测,并进行下一轮的预测;第t轮预测过程中的第二停止条件可设置为当该轮预测过程中的因素结构树的节点达到预设的个数,或因素结构树的深度达到预设深度时,停止进行预测,因素结构树预测完成。
通过图2所示实施例可知,在本申请实施例中,通过根据多个数据样本构建数据样本集,分别将数据样本的标签特征值和多个因素特征值设置为数据样本集的标签参数和输入参数,并获取输入参数中每个样本因素对应的因素特征值的取值范围,对取值范围进行二分操作得到N个二分点,N为大于零的整数,根据数据样本集构建根节点,计算根据多个样本因素对应的N个二分点对根节点进行***得到的最佳***收益,若最佳***收益大于预设的收益阈值,则根据最佳***收益对应的二分点对根节点进行二分操作,然后对进行二分操作后的左节点和右节点继续进行二分操作,直到构建的因素结构树达到预设的停止条件,因素结构树生成完毕,提升了生成的因素结构树对于多个数据样本的准确性。
请参阅图3,图3是本申请实施例三提供的一种确定事件影响因素的方法的实现流程图。相对于图2对应的实施例,本实施例对S203进行细化后得到S301~S302,详述如下:
S301:根据所述二分点将所述数据样本集分为第一样本集和第二样本集,并将所述第一样本集和第二样本集输入预设的收益算式,得到***收益。
以多个样本因素对应的N个二分点中的其中一个二分点进行举例,根据该二分点将数据样本集分为第一样本集和第二样本集,举例来说,若数据样本集包括4个数据样本,根据二分点分隔后,将第一样本集称为I
L,其内含2个数据样本,为(Eigenvalue
label1,Eigenvalue
factor1),(Eigenvalue
label2,Eigenvalue
factor2);将第二样本集称为I
R,其内包含2个数据样本,为(Eigenvalue
label3,Eigenvalue
factor3),(Eigenvalue
label4,Eigenvalue
factor4)。然后分别计算第一样本集I
L内各个数据样本的第一依赖数和第二依赖数,以标签参数为Eigenvalue
label1的数据样本举例:
故可计算出第一样本集I
L的g
1,h
1,g
2,h
2,第二样本集I
R的g
3,h
3,g
4,h
4,并根据预设的收益算式计算出***收益:
其中,Value
P1为常数项,用于在***收益的计算过程中进行减少误差的处理,防止生成的***收益的误差过大;Value
P2为另一个常数项,用于使***收益在一定的取值范围内,方便将基于多个***收益产生的最佳***收益与预设的收益阈值进行比较。
将数据样本集称为I,可得到更通用的收益算式,如下:
S302:获取多个所述样本因素的所述N个二分点对应的多个所述***收益,并将数值最大的所述***收益作为所述最佳***收益。
由于每个样本因素都对应N个二分点,故根据上述的收益算式计算出多个样本因素对应所有二分点的多个***收益,并将其中数值最大的***收益作为最佳***收益。
通过图3所示实施例可知,在本申请实施例中,通过根据二分点将数据样本集分为第一样本集和第二样本集,并将第一样本集下的数据样本和第二样本集下的数据样本输入至预设的收益算式,得到与该二分点对应的***收益,将所有样本因素的N个二分点对应的多个***收益进行比较,并将数值最大的***收益作为最佳***收益,通过收益算式提升了***收益与数据样本集的贴合程度,提升了***收益的准确性。
请参阅图4,图4是本申请实施例四提供的一种自动查找物流信息的方法的实现流程图。相对于图1对应的实施例,本实施例在存在多个影响因素的基础上,对S103进行细化后得到S401~S402,详述如下:
S401:统计所述因素节点在所述因素结构树中出现的出现次数。
在从因素结构树的结构节点中确定出因素节点,并确定与因素节点对应的影响因素后,统计因素节点在因素结构树中的出现次数,由于存在多个影响因素,故因素节点与影响因素 对应,其出现次数也存在多个。可选地,首先统计因素结构树中的***条件的出现次数,由于***条件是某一类因素特征值取值范围内的某个数值,故可将该***条件的出现次数等同于该因素特征值对应因素节点的出现次数,提升了获取因素节点的出现次数的便利性。另外,由于因素结构树可能存在多个,故需要获取每个因素结构树中因素节点出现的子次数,并将所有的子次数叠加为因素节点的出现次数。
S402:根据所述出现次数对与所述因素节点对应的多个所述影响因素进行排序,并输出排序后的多个所述影响因素。
由于出现次数和影响因素存在对应关系,故可根据出现次数的数值,按照从大到小的顺序对多个影响因素进行排序,比如出现次数为4,3,5,对应的影响因素分别为海陆位置、地形和气压带,则输出排序后的多个影响因素为气压带、海陆位置和地形。影响因素的排序越前,就证明该影响因素对事件的影响程度越大。
通过图4所示实施例可知,在本申请实施例中,通过统计因素节点在因素结构树中的出现次数,其中,出现次数存在多个,并根据出现次数对与因素节点对应的多个影响因素进行排序,并输出排序后的多个影响因素,实现了对事件影响因素重要性的获取,适应了用户对影响因素重要性的需求。
请参阅图5,图5是本申请实施例五提供的一种自动查找物流信息的方法的实现流程图。相对于图1对应的实施例,本实施例对S103进行细化后得到S501~S502,详述如下:
S501:分别获取每个所述结构节点在所述因素结构树中的权重值。
在确定出因素结构树的多个结构节点后,分别获取每个结构节点在因素结构树中的权重值。权重值在将多个数据样本与学习模型进行拟合时,根据学习模型预设的权重算式自动生成,故在本申请实施例中,在因素结构树生成后直接进行权重值的获取。另外,由于因素结构树可能存在多个,故在获取多个因素结构树中每个结构节点的权重值后,将一类结构节点的权重值进行加法运算,其中,一类结构节点对应一个样本因素。
举例来说,若按照上述的训练函数进行因素结构树的构建,则权重算式可以设置为:
其中,Weight
i指示某个结构节点的权重值,g
i为该结构节点对应数据样本的第一依赖数,h
i为该结构节点对应数据样本的第二依赖数。
S502:将所述权重值大于预设的权重阈值的所述结构节点作为所述因素节点进行输出。
在本申请实施例中,设置权重阈值,若进行加法运算后的某类结构节点的权重值大于 权重阈值,则将该类结构节点作为因素节点进行输出。由于结构节点对应样本因素,故上述过程实质上是将大于预设的重要程度的样本因素作为事件的影响因素进行输出。
通过图5所示实施例可知,在本申请实施例中,通过分别获取每个结构节点在所述因素结构树中的权重值,并将一类结构节点的权重值叠加,将叠加后的权重值大于预设的权重阈值的一类结构节点作为因素节点进行输出,通过对结构节点进行筛选,提升了输出的因素节点的有效性。
对应于上文实施例所述的一种确定事件影响因素的方法,图6示出了本申请实施例提供的一种确定事件影响因素的装置的一个结构框图,参照图6,该装置包括:
获取单元61,用于获取与事件相关的多个数据样本,所述数据样本包括标签特征值和多个因素特征值,所述标签特征值用于指示事件结果,每个所述因素特征值分别与一个预设的样本因素对应;
拟合单元62,用于将所述多个数据样本与预设的学习模型进行拟合,并将拟合完成的所述学习模型输出为因素结构树;
输出单元63,用于从所述因素结构树的结构节点中确定出因素节点,并将与所述因素节点对应的样本因素输出为所述事件的影响因素。
可选地,所述拟合单元62,包括:
构建单元,用于根据所述多个数据样本构建数据样本集,将每个所述数据样本的标签特征值设置为所述数据样本集的标签参数,并将每个所述数据样本的所述多个因素特征值设置为所述数据样本集的输入参数;
取值获取单元,用于获取所述输入参数内与每个所述样本因素对应的所述因素特征值的取值范围,并对所述取值范围进行二分操作直至得到N个二分点,其中,N为大于零的整数;
收益计算单元,用于根据所述数据样本集构建所述因素结构树的根节点,并计算根据多个所述样本因素对应的所述N个二分点对所述根节点进行***得到的最佳***收益;
二分单元,用于若所述最佳***收益大于预设的收益阈值,则根据所述最佳***收益对应的二分点对所述根节点进行二分操作;
继续二分单元,用于对将所述根节点进行二分操作后得到的节点继续进行二分操作,直到基于二分操作得到的节点构建的所述因素结构树达到预设的停止条件。
可选地,所述收益计算单元,包括:
计算子单元,用于根据所述二分点将所述数据样本集分为第一样本集和第二样本集,并将所述第一样本集和第二样本集输入预设的收益算式,得到***收益;
比对单元,用于获取多个所述样本因素的所述N个二分点对应的多个所述***收益,并 将数值最大的所述***收益作为所述最佳***收益。
可选地,若存在多个所述影响因素,则所述输出单元63,包括:
统计单元,用于统计所述因素节点在所述因素结构树中出现的出现次数;
排序单元,用于根据所述出现次数对与所述因素节点对应的多个所述影响因素进行排序,并输出排序后的多个所述影响因素。
可选地,所述输出单元63,包括:
权重获取单元,用于分别获取每个所述结构节点在所述因素结构树中的权重值;
输出子单元,用于将所述权重值大于预设的权重阈值的所述结构节点作为所述因素节点进行输出。
图7是本申请实施例提供的终端设备的示意图。如图7所示,该实施例的终端设备7包括:处理器70以及存储器71,所述存储器71中存储有可在所述处理器70上运行的计算机可读指令72,例如确定事件影响因素的程序。所述处理器70执行所述计算机可读指令72时实现上述各个确定事件影响因素的方法实施例中的步骤,例如图1所示的步骤S101至S103。或者,所述处理器70执行所述计算机可读指令72时实现上述装置实施例中各单元的功能,例如图6所示单元61至63的功能。
示例性的,所述计算机可读指令72可以被分割成一个或多个模块/单元,所述一个或者多个模块/单元被存储在所述存储器71中,并由所述处理器70执行,以完成本申请。所述一个或多个模块/单元可以是能够完成特定功能的一系列计算机可读指令段,该指令段用于描述所述计算机可读指令72在所述终端设备7中的执行过程。例如,所述计算机可读指令72可以被分割成获取单元、拟合单元及输出单元,各单元具体功能如上所述。
所述终端设备可包括,但不仅限于,处理器70、存储器71。本领域技术人员可以理解,图7仅仅是终端设备7的示例,并不构成对终端设备7的限定,可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件,例如所述终端设备还可以包括输入输出设备、网络接入设备、总线等。
所称处理器70可以是中央处理单元(Central Processing Unit,CPU),还可以是其他通用处理器、数字信号处理器(Digital Signal Processor,DSP)、专用集成电路(Application Specific Integrated Circuit,ASIC)、现成可编程门阵列(Field-Programmable Gate Array,FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件等。通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等。
所述存储器71可以是所述终端设备7的内部存储单元,例如终端设备7的硬盘或内存。所述存储器71也可以是所述终端设备7的外部存储设备,例如所述终端设备7上配备的插 接式硬盘,智能存储卡(Smart Media Card,SMC),安全数字(Secure Digital,SD)卡,闪存卡(Flash Card)等。进一步地,所述存储器71还可以既包括所述终端设备7的内部存储单元也包括外部存储设备。所述存储器71用于存储所述计算机可读指令以及所述终端设备所需的其他程序和数据。所述存储器71还可以用于暂时地存储已经输出或者将要输出的数据。
另外,在本申请各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。
所述集成的单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本申请各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(Read-Only Memory,ROM)、随机存取存储器(Random Access Memory,RAM)、磁碟或者光盘等各种可以存储程序代码的介质。
以上所述,以上实施例仅用以说明本申请的技术方案,而非对其限制;尽管参照前述实施例对本申请进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本申请各实施例技术方案的精神和范围。
Claims (20)
- 一种确定事件影响因素的方法,其特征在于,包括:获取与事件相关的多个数据样本,所述数据样本包括标签特征值和多个因素特征值,所述标签特征值用于指示事件结果,每个所述因素特征值分别与一个预设的样本因素对应;将所述多个数据样本与预设的学习模型进行拟合,并将拟合完成的所述学习模型输出为因素结构树;从所述因素结构树的结构节点中确定出因素节点,并将与所述因素节点对应的样本因素输出为所述事件的影响因素。
- 如权利要求1所述的方法,其特征在于,所述将所述多个数据样本与预设的学习模型进行拟合,并将拟合完成的所述学习模型输出为因素结构树,包括:根据所述多个数据样本构建数据样本集,将每个所述数据样本的标签特征值设置为所述数据样本集的标签参数,并将每个所述数据样本的所述多个因素特征值设置为所述数据样本集的输入参数;获取所述输入参数内与每个所述样本因素对应的所述因素特征值的取值范围,并对所述取值范围进行二分操作直至得到N个二分点,其中,N为大于零的整数;根据所述数据样本集构建所述因素结构树的根节点,并计算根据多个所述样本因素对应的所述N个二分点对所述根节点进行***得到的最佳***收益;若所述最佳***收益大于预设的收益阈值,则根据所述最佳***收益对应的二分点对所述根节点进行二分操作;对将所述根节点进行二分操作后得到的节点继续进行二分操作,直到基于二分操作得到的节点构建的所述因素结构树达到预设的停止条件。
- 如权利要求2所述的方法,其特征在于,所述计算根据多个所述样本因素对应的所述N个二分点对所述根节点进行***得到的最佳***收益,包括:根据所述二分点将所述数据样本集分为第一样本集和第二样本集,并将所述第一样本集和第二样本集输入预设的收益算式,得到***收益;获取多个所述样本因素的所述N个二分点对应的多个所述***收益,并将数值最大的所述***收益作为所述最佳***收益。
- 如权利要求1所述的方法,其特征在于,若存在多个所述影响因素,所述将与所述因素节点对应的样本因素输出为所述事件的影响因素,还包括:统计所述因素节点在所述因素结构树中出现的出现次数;根据所述出现次数对与所述因素节点对应的多个所述影响因素进行排序,并输出排序后的多个所述影响因素。
- 如权利要求1所述的方法,其特征在于,所述从所述因素结构树的结构节点中确定出因素节点,包括:分别获取每个所述结构节点在所述因素结构树中的权重值;将所述权重值大于预设的权重阈值的所述结构节点作为所述因素节点进行输出。
- 一种自动查找物流信息的装置,其特征在于,包括:获取单元,用于获取与事件相关的多个数据样本,所述数据样本包括标签特征值和多个因素特征值,所述标签特征值用于指示事件结果,每个所述因素特征值分别与一个预设的样本因素对应;拟合单元,用于将所述多个数据样本与预设的学习模型进行拟合,并将拟合完成的所述学习模型输出为因素结构树;输出单元,用于从所述因素结构树的结构节点中确定出因素节点,并将与所述因素节点对应的样本因素输出为所述事件的影响因素。
- 如权利要求6所述的装置,其特征在于,所述拟合单元,包括:构建单元,用于根据所述多个数据样本构建数据样本集,将每个所述数据样本的标签特征值设置为所述数据样本集的标签参数,并将每个所述数据样本的所述多个因素特征值设置为所述数据样本集的输入参数;取值获取单元,用于获取所述输入参数内与每个所述样本因素对应的所述因素特征值的取值范围,并对所述取值范围进行二分操作直至得到N个二分点,其中,N为大于零的整数;收益计算单元,用于根据所述数据样本集构建所述因素结构树的根节点,并计算根据多个所述样本因素对应的所述N个二分点对所述根节点进行***得到的最佳***收益;二分单元,用于若所述最佳***收益大于预设的收益阈值,则根据所述最佳***收益对应的二分点对所述根节点进行二分操作;继续二分单元,用于对将所述根节点进行二分操作后得到的节点继续进行二分操作,直到基于二分操作得到的节点构建的所述因素结构树达到预设的停止条件。
- 如权利要求7所述的装置,其特征在于,所述收益计算单元,包括:计算子单元,用于根据所述二分点将所述数据样本集分为第一样本集和第二样本集,并将所述第一样本集和第二样本集输入预设的收益算式,得到***收益;比对单元,用于获取多个所述样本因素的所述N个二分点对应的多个所述***收益,并 将数值最大的所述***收益作为所述最佳***收益。
- 如权利要求6所述的装置,其特征在于,若存在多个所述影响因素,所述输出单元,包括:统计单元,用于统计所述因素节点在所述因素结构树中出现的出现次数;排序单元,用于根据所述出现次数对与所述因素节点对应的多个所述影响因素进行排序,并输出排序后的多个所述影响因素。
- 如权利要求6所述的装置,其特征在于,所述输出单元,包括:权重获取单元,用于分别获取每个所述结构节点在所述因素结构树中的权重值;输出子单元,用于将所述权重值大于预设的权重阈值的所述结构节点作为所述因素节点进行输出。
- 一种终端设备,其特征在于,包括存储器以及处理器,所述存储器中存储有可在所述处理器上运行的计算机可读指令,所述处理器执行所述计算机可读指令时实现如下步骤:获取与事件相关的多个数据样本,所述数据样本包括标签特征值和多个因素特征值,所述标签特征值用于指示事件结果,每个所述因素特征值分别与一个预设的样本因素对应;将所述多个数据样本与预设的学习模型进行拟合,并将拟合完成的所述学习模型输出为因素结构树;从所述因素结构树的结构节点中确定出因素节点,并将与所述因素节点对应的样本因素输出为所述事件的影响因素。
- 根据权利要求11所述的终端设备,其特征在于,所述将所述多个数据样本与预设的学习模型进行拟合,并将拟合完成的所述学习模型输出为因素结构树,包括:根据所述多个数据样本构建数据样本集,将每个所述数据样本的标签特征值设置为所述数据样本集的标签参数,并将每个所述数据样本的所述多个因素特征值设置为所述数据样本集的输入参数;获取所述输入参数内与每个所述样本因素对应的所述因素特征值的取值范围,并对所述取值范围进行二分操作直至得到N个二分点,其中,N为大于零的整数;根据所述数据样本集构建所述因素结构树的根节点,并计算根据多个所述样本因素对应的所述N个二分点对所述根节点进行***得到的最佳***收益;若所述最佳***收益大于预设的收益阈值,则根据所述最佳***收益对应的二分点对所述根节点进行二分操作;对将所述根节点进行二分操作后得到的节点继续进行二分操作,直到基于二分操作得到的节点构建的所述因素结构树达到预设的停止条件。
- 根据权利要求12所述的终端设备,其特征在于,所述计算根据多个所述样本因素对应的所述N个二分点对所述根节点进行***得到的最佳***收益,包括:根据所述二分点将所述数据样本集分为第一样本集和第二样本集,并将所述第一样本集和第二样本集输入预设的收益算式,得到***收益;获取多个所述样本因素的所述N个二分点对应的多个所述***收益,并将数值最大的所述***收益作为所述最佳***收益。
- 根据权利要求11所述的终端设备,其特征在于,若存在多个所述影响因素,所述将与所述因素节点对应的样本因素输出为所述事件的影响因素,还包括:统计所述因素节点在所述因素结构树中出现的出现次数;根据所述出现次数对与所述因素节点对应的多个所述影响因素进行排序,并输出排序后的多个所述影响因素。
- 根据权利要求11所述的终端设备,其特征在于,所述从所述因素结构树的结构节点中确定出因素节点,包括:分别获取每个所述结构节点在所述因素结构树中的权重值;将所述权重值大于预设的权重阈值的所述结构节点作为所述因素节点进行输出。
- 一种计算机可读存储介质,所述计算机可读存储介质存储有计算机可读指令,其特征在于,所述计算机可读指令被至少一个处理器执行时实现如下步骤:获取与事件相关的多个数据样本,所述数据样本包括标签特征值和多个因素特征值,所述标签特征值用于指示事件结果,每个所述因素特征值分别与一个预设的样本因素对应;将所述多个数据样本与预设的学习模型进行拟合,并将拟合完成的所述学习模型输出为因素结构树;从所述因素结构树的结构节点中确定出因素节点,并将与所述因素节点对应的样本因素输出为所述事件的影响因素。
- 根据权利要求16所述的计算机可读存储介质,其特征在于,所述计算机可读指令被至少一个处理器执行时实现如下步骤:根据所述多个数据样本构建数据样本集,将每个所述数据样本的标签特征值设置为所述数据样本集的标签参数,并将每个所述数据样本的所述多个因素特征值设置为所述数据样本集的输入参数;获取所述输入参数内与每个所述样本因素对应的所述因素特征值的取值范围,并对所述取值范围进行二分操作直至得到N个二分点,其中,N为大于零的整数;根据所述数据样本集构建所述因素结构树的根节点,并计算根据多个所述样本因素对应 的所述N个二分点对所述根节点进行***得到的最佳***收益;若所述最佳***收益大于预设的收益阈值,则根据所述最佳***收益对应的二分点对所述根节点进行二分操作;对将所述根节点进行二分操作后得到的节点继续进行二分操作,直到基于二分操作得到的节点构建的所述因素结构树达到预设的停止条件。
- 根据权利要求17所述的计算机可读存储介质,其特征在于,所述计算机可读指令被至少一个处理器执行时实现如下步骤:根据所述二分点将所述数据样本集分为第一样本集和第二样本集,并将所述第一样本集和第二样本集输入预设的收益算式,得到***收益;获取多个所述样本因素的所述N个二分点对应的多个所述***收益,并将数值最大的所述***收益作为所述最佳***收益。
- 根据权利要求16所述的计算机可读存储介质,其特征在于,若存在多个所述影响因素,所述计算机可读指令被至少一个处理器执行时还实现如下步骤:统计所述因素节点在所述因素结构树中出现的出现次数;根据所述出现次数对与所述因素节点对应的多个所述影响因素进行排序,并输出排序后的多个所述影响因素。
- 根据权利要求16所述的计算机可读存储介质,其特征在于,所述计算机可读指令被至少一个处理器执行时实现如下步骤:分别获取每个所述结构节点在所述因素结构树中的权重值;将所述权重值大于预设的权重阈值的所述结构节点作为所述因素节点进行输出。
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810496726.7A CN108681751B (zh) | 2018-05-22 | 2018-05-22 | 确定事件影响因素的方法及终端设备 |
CN201810496726.7 | 2018-05-22 |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2019223104A1 true WO2019223104A1 (zh) | 2019-11-28 |
Family
ID=63807602
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2018/097557 WO2019223104A1 (zh) | 2018-05-22 | 2018-07-27 | 确定事件影响因素的方法、装置、终端设备及可读存储介质 |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN108681751B (zh) |
WO (1) | WO2019223104A1 (zh) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111337956A (zh) * | 2020-03-16 | 2020-06-26 | 北京工业大学 | 导航接收机性能综合评价方法及装置 |
CN116610931A (zh) * | 2023-07-17 | 2023-08-18 | 成都飞机工业(集团)有限责任公司 | 一种飞机数控锪窝影响因素提取方法、装置、介质及设备 |
Families Citing this family (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111292106A (zh) * | 2018-12-06 | 2020-06-16 | 北京嘀嘀无限科技发展有限公司 | 一种业务需求影响因素确定方法以及装置 |
CN110807589A (zh) * | 2019-10-31 | 2020-02-18 | 广东电网有限责任公司 | 一种电力现货市场的案例分析*** |
CN113515507B (zh) * | 2021-03-12 | 2024-02-02 | 中电建电力检修工程有限公司 | 应用于大坝渗水检测的方法及*** |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106326904A (zh) * | 2015-06-16 | 2017-01-11 | 富士通株式会社 | 获取特征排序模型的装置和方法以及特征排序方法 |
CN107798332A (zh) * | 2016-09-05 | 2018-03-13 | 华为技术有限公司 | 一种用户行为预测方法及装置 |
CN108053120A (zh) * | 2017-12-15 | 2018-05-18 | 阿里巴巴集团控股有限公司 | 一种模型整合方法及装置 |
Family Cites Families (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US9047319B2 (en) * | 2010-12-17 | 2015-06-02 | Microsoft Technology Licensing, Llc | Tag association with image regions |
US9070047B2 (en) * | 2011-12-27 | 2015-06-30 | Microsoft Technology Licensing, Llc | Decision tree fields to map dataset content to a set of parameters |
CN107480696A (zh) * | 2017-07-12 | 2017-12-15 | 深圳信息职业技术学院 | 一种分类模型构建方法、装置及终端设备 |
CN107748862A (zh) * | 2017-09-21 | 2018-03-02 | 清华大学 | 一种基于双频雷达信号时频分布的无人机分类方法及装置 |
-
2018
- 2018-05-22 CN CN201810496726.7A patent/CN108681751B/zh active Active
- 2018-07-27 WO PCT/CN2018/097557 patent/WO2019223104A1/zh active Application Filing
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106326904A (zh) * | 2015-06-16 | 2017-01-11 | 富士通株式会社 | 获取特征排序模型的装置和方法以及特征排序方法 |
CN107798332A (zh) * | 2016-09-05 | 2018-03-13 | 华为技术有限公司 | 一种用户行为预测方法及装置 |
CN108053120A (zh) * | 2017-12-15 | 2018-05-18 | 阿里巴巴集团控股有限公司 | 一种模型整合方法及装置 |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111337956A (zh) * | 2020-03-16 | 2020-06-26 | 北京工业大学 | 导航接收机性能综合评价方法及装置 |
CN116610931A (zh) * | 2023-07-17 | 2023-08-18 | 成都飞机工业(集团)有限责任公司 | 一种飞机数控锪窝影响因素提取方法、装置、介质及设备 |
CN116610931B (zh) * | 2023-07-17 | 2023-11-10 | 成都飞机工业(集团)有限责任公司 | 一种飞机数控锪窝影响因素提取方法、装置、介质及设备 |
Also Published As
Publication number | Publication date |
---|---|
CN108681751A (zh) | 2018-10-19 |
CN108681751B (zh) | 2020-05-01 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
WO2019223104A1 (zh) | 确定事件影响因素的方法、装置、终端设备及可读存储介质 | |
CN110909725B (zh) | 识别文本的方法、装置、设备及存储介质 | |
US10685044B2 (en) | Identification and management system for log entries | |
US10482174B1 (en) | Systems and methods for identifying form fields | |
US20210382937A1 (en) | Image processing method and apparatus, and storage medium | |
US20200097709A1 (en) | Classification model training method, server, and storage medium | |
US11816138B2 (en) | Systems and methods for parsing log files using classification and a plurality of neural networks | |
US11157816B2 (en) | Systems and methods for selecting and generating log parsers using neural networks | |
CN106919957B (zh) | 处理数据的方法及装置 | |
WO2015135452A1 (en) | Text information processing method and apparatus | |
CN110442516B (zh) | 信息处理方法、设备及计算机可读存储介质 | |
CN108090216B (zh) | 一种标签预测方法、装置及存储介质 | |
CN110991474A (zh) | 一种机器学***台 | |
WO2022121163A1 (zh) | 用户行为倾向识别方法、装置、设备及存储介质 | |
US11657222B1 (en) | Confidence calibration using pseudo-accuracy | |
CN112396428B (zh) | 一种基于用户画像数据的客群分类管理方法及装置 | |
CN112784054A (zh) | 概念图处理装置、概念图处理方法和计算机可读介质 | |
CN111639493A (zh) | 一种地址信息标准化方法、装置、设备及可读存储介质 | |
WO2019218482A1 (zh) | 基于大数据的人群筛选方法、装置、终端设备及可读存储介质 | |
CN112732690A (zh) | 一种用于慢病检测及风险评估的稳定***及方法 | |
EP3640861A1 (en) | Systems and methods for parsing log files using classification and a plurality of neural networks | |
CN116362589A (zh) | 一种质量工作考核评价方法 | |
CN109308565B (zh) | 人群绩效等级识别方法、装置、存储介质及计算机设备 | |
CN111708884A (zh) | 文本分类方法、装置及电子设备 | |
CN117390292B (zh) | 基于机器学习的应用程序信息推荐方法、***及设备 |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 18920091 Country of ref document: EP Kind code of ref document: A1 |
|
NENP | Non-entry into the national phase |
Ref country code: DE |
|
32PN | Ep: public notification in the ep bulletin as address of the adressee cannot be established |
Free format text: NOTING OF LOSS OF RIGHTS (EPO FORM 1205A DATED 18.03.2021) |
|
122 | Ep: pct application non-entry in european phase |
Ref document number: 18920091 Country of ref document: EP Kind code of ref document: A1 |