Article classification method and device
By determining latent variable parameters and correlation parameters under the latent dimension in item classification, the problem of reduced classification efficiency and accuracy when the latent dimension is high is solved, and more efficient and accurate item classification is achieved.
Patent Information
- Application Number
- CN202411718500.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-27
- Publication Date
- 2025-03-14
AI Technical Summary
During the item classification process, when the latent dimension is high, the complexity of using the maximum likelihood function to calculate the latent variable parameters is higher, resulting in a reduction in classification efficiency and accuracy.
Determine the category of the item to be classified by determining its latent variable parameters in a preconfigured latent dimension based on the attribute value of the item to be classified, and calculate the correlation parameters between the latent dimensions.
The efficiency and accuracy of item classification are improved, the problem of high-dimensional integral is avoided, and the calculation of marginal likelihood is simplified through local information, ensuring the calculation accuracy while improving efficiency.
Smart Images

Figure CN119622516A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer technology, and in particular to an object classification method and device. Background Art
[0002] When classifying objects, latent variables that cannot be directly observed can usually explain the changes in observed variables that can be directly observed, which helps to capture the intrinsic characteristics or potential similarities and differences of the objects to be classified during the classification process, and thus helps to classify the objects to be classified. In the prior art, the maximum likelihood estimation method is usually used to calculate the latent variable parameters for classification operations. However, when the latent dimension is high, the complexity of calculating the latent variable parameters using the maximum likelihood function is high, which leads to reduced efficiency and accuracy of object classification. Summary of the invention
[0003] In view of this, the embodiments of the present disclosure at least provide a method, device, electronic device and storage medium for object classification, which can improve the efficiency and accuracy of object classification using the maximum likelihood function.
[0004] In a first aspect, an embodiment of the present disclosure provides an object classification method, comprising:
[0005] Based on the attribute values of the objects to be classified under each observed dimension, determining the latent variable parameters of the objects to be classified under each pre-configured latent dimension; the latent variable parameters represent the degree of influence of each latent dimension on the category of the objects to be classified and the initial benchmark of the category of the objects to be classified;
[0006] Determine the correlation parameters between the potential dimensions according to the latent variable parameters of the objects to be classified under the pre-configured potential dimensions;
[0007] Based on the correlation parameters between the latent variable parameters and each latent dimension, the category of the object to be classified is determined.
[0008] Optionally, based on the attribute values of the objects to be classified in each observation dimension, determining the latent variable parameters of the objects to be classified in each pre-configured latent dimension includes:
[0009] Calculate the function value of the first likelihood function according to the latent variable parameters initialized under each pre-configured potential dimension and the preset first likelihood function;
[0010] With the goal of maximizing the function value of the first likelihood function, the latent variable parameters are adjusted, and the latent variable parameters corresponding to the maximum function value of the first likelihood function are used as the latent variable parameters of the items to be classified under the pre-configured latent dimensions; wherein, the maximum value of the first likelihood function indicates that the probability of the attribute value appearing in the items to be classified under each observation dimension is the largest.
[0011] Optionally, the initial benchmark of the category of the object to be classified is obtained by the following steps:
[0012] Replace the values of the to-be-classified objects in the target dimension in each potential dimension with zero, and replace the values of the to-be-classified objects in other dimensions in each potential dimension except the target dimension with a preset constant;
[0013] Based on the values of the objects to be classified after replacement in each potential dimension, the initial benchmark of the category of the objects to be classified corresponding to the target dimension is calculated;
[0014] Each potential dimension is used as the target dimension one by one, and the above steps are repeated to determine the initial benchmark of the category of the to-be-classified object corresponding to each potential dimension.
[0015] Optionally, according to the latent variable parameters of the objects to be classified under the pre-configured latent dimensions, the correlation parameters between the latent dimensions are determined, including:
[0016] Calculating the function value of the second likelihood function under preset constraints according to the initialized correlation parameter and the preset second likelihood function;
[0017] With the goal of maximizing the function value of the second likelihood function, the correlation parameter is adjusted, and the correlation parameter when the function value of the second likelihood function is maximum is used as the correlation parameter between the potential dimensions in the latent variable.
[0018] Optionally, the potential dimension includes at least one reference aspect; the reference aspect includes physical property aspect, item characteristic aspect, transportation aspect and storage requirement aspect.
[0019] Optionally, determining the category of the object to be classified based on the correlation parameter between the latent variable parameter and each latent dimension includes:
[0020] Based on the correlation parameters between the latent variable parameters and each latent dimension, the probability that the item to be classified belongs to each candidate category is calculated;
[0021] Based on the probability that the object to be classified belongs to each candidate category, the target category of the object to be classified is determined from each candidate category.
[0022] In a second aspect, an embodiment of the present disclosure provides an object classification device, comprising:
[0023] The first determination module is used to determine the latent variable parameters of the objects to be classified in each pre-configured latent dimension based on the attribute values of the objects to be classified in each observed dimension; the latent variable parameters represent the influence of the attribute values in each observed dimension on the latent dimension and the initial benchmark in the latent dimension;
[0024] The second determination module is used to determine the correlation parameters between the potential dimensions according to the latent variable parameters of the objects to be classified under the pre-configured potential dimensions;
[0025] The classification module is used to determine the category of the object to be classified based on the correlation parameters between the latent variable parameters and each latent dimension.
[0026] In a third aspect, an embodiment of the present disclosure further provides an electronic device, comprising: a processor, a memory and a bus, wherein the memory stores machine-readable instructions executable by the processor, and when the computer device is running, the processor and the memory communicate through the bus, and when the machine-readable instructions are executed by the processor, the above-mentioned first aspect, or the steps in any optional implementation of the first aspect are performed.
[0027] In a fourth aspect, an embodiment of the present disclosure further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the above-mentioned first aspect, or any optional implementation of the first aspect are executed.
[0028] In a fifth aspect, an embodiment of the present disclosure further provides a computer program product, including a computer program, which implements the method of any of the above embodiments when executed by a processor.
[0029] Any of the above aspects or any implementation methods of any of the aspects, by determining the latent variable parameters of the items to be classified under each pre-configured latent dimension based on the attribute values of the items to be classified under each observed dimension, provides a more detailed and accurate basis for the classification of items. The latent variable parameters here not only reflect the degree of influence of the items to be classified on the latent dimension under each observed dimension, but also clarify the initial benchmark of each latent dimension. Assuming that the observed dimensions include weight, size and volume, and the latent dimensions include transportation time, transportation cost and loss rate; the degree of influence here indicates what impact will be caused to the transportation time, transportation cost and loss rate respectively when the specific values of weight, size or volume change; the initial benchmark here indicates what the initial values of transportation time, transportation cost and loss rate are when a certain observed dimension is not considered. In this way, the estimated values of the items to be classified under each latent dimension can be accurately mined, which helps to improve the accuracy of item classification. In addition, by calculating the correlation parameters between the latent dimensions, the classification operation can no longer rely solely on a single observed variable, but by establishing associations between the latent dimensions, the classification results can be made more scientific and comprehensive. In addition, by determining the category of the items to be classified based on the correlation parameters between the latent variable parameters and each latent dimension, the problem of high-dimensional integration is avoided compared to the traditional maximum likelihood method. By using the correlation parameters between the latent variable parameters under each latent dimension and each latent dimension, the calculation of the marginal likelihood can be simplified by using local information, which improves the calculation efficiency while ensuring the calculation accuracy.
[0030] The effects of the above-mentioned object classification device, electronic device and storage medium can be found in the description of the above-mentioned object classification method, which will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS
[0031] In order to more clearly illustrate the technical solutions of the embodiments of the present disclosure, the following is a brief introduction to the drawings required for use in the embodiments. The drawings herein are incorporated into the specification and constitute a part of the specification. These drawings illustrate embodiments consistent with the present disclosure and are used together with the specification to illustrate the technical solutions of the present disclosure. It should be understood that the following drawings only illustrate certain embodiments of the present disclosure and should not be regarded as limiting the scope. For ordinary technicians in this field, other relevant drawings can also be obtained based on these drawings without creative work.
[0032] Figure 1 A flowchart of an object classification method provided by an embodiment of the present disclosure is shown;
[0033] Figure 2 A schematic diagram of a process of an object classification method provided by an embodiment of the present disclosure is shown;
[0034] Figure 3A schematic diagram of an article classification device provided by an embodiment of the present disclosure is shown;
[0035] Figure 4 An exemplary system architecture is shown in which embodiments of the present disclosure may be applied;
[0036] Figure 5 A schematic diagram of the structure of a computer system of a terminal device or a server used to implement an embodiment of the present disclosure is shown. DETAILED DESCRIPTION
[0037] In order to make the purpose, technical scheme and advantages of the embodiments of the present disclosure clearer, the technical scheme in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the drawings in the embodiments of the present disclosure. Obviously, the described embodiments are only part of the embodiments of the present disclosure, rather than all of the embodiments. The components of the embodiments of the present disclosure generally described and shown in the drawings here can be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present disclosure provided in the drawings is not intended to limit the scope of the present disclosure for protection, but merely represents the selected embodiments of the present disclosure. Based on the embodiments of the present disclosure, all other embodiments obtained by those skilled in the art without making creative work belong to the scope of protection of the present disclosure.
[0038] It should be noted that in the technical solution of the present invention, the collection, use, storage, sharing and transfer of user personal information involved are in compliance with the provisions of relevant laws and regulations, and it is necessary to inform the user and obtain the user's consent or authorization. When applicable, the user's personal information is de-identified and / or anonymized and / or encrypted.
[0039] The raising of the above problems and the solutions are the results obtained by the inventor after practice and careful research. The discovery process of the above problems and the solutions proposed for the above problems should be the contributions made by the inventor to the present disclosure during the disclosure process.
[0040] The technical solutions in the present disclosure will be clearly and completely described below in conjunction with the drawings in the present disclosure. Obviously, the described embodiments are only part of the embodiments of the present disclosure, rather than all of the embodiments. The components of the present disclosure generally described and shown in the drawings here can be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present disclosure provided in the drawings is not intended to limit the scope of the present disclosure claimed for protection, but merely represents the selected embodiments of the present disclosure. Based on the embodiments of the present disclosure, all other embodiments obtained by those skilled in the art without making creative work belong to the scope of protection of the present disclosure.
[0041] It should be noted that similar reference numerals and letters denote similar items in the following drawings, and therefore, once an item is defined in one drawing, further definition and explanation thereof is not required in subsequent drawings.
[0042] To facilitate understanding of this embodiment, a method for classifying items disclosed in the embodiment of the present disclosure is first introduced in detail. The execution subject of the method for classifying items provided in the embodiment of the present disclosure is generally a computer device with certain computing capabilities, and the computer device includes, for example: a terminal device or a server or other processing device, and the terminal device may be a user equipment (UE), a mobile device, a user terminal, a terminal, a cellular phone, a cordless phone, a personal digital assistant (PDA), a handheld device, a computing device, a vehicle-mounted device, a wearable device, etc. In some possible implementations, the method for classifying items may be implemented by a processor calling a computer-readable instruction stored in a memory.
[0043] See also Figure 1 FIG. 1 is a flowchart of an object classification method provided by an embodiment of the present disclosure, and the method includes S101 to S103, wherein:
[0044] S101: Based on the attribute values of the to-be-classified objects in each observed dimension, determining the latent variable parameters of the to-be-classified objects in each pre-configured latent dimension.
[0045] In the disclosed embodiments, the observed dimension may refer to those item attribute values that can be directly observed or measured, such as weight, size, volume, color, etc. The latent dimension may refer to those item attribute values that cannot be directly observed, such as transportation time, transportation cost, loss rate, etc. The attribute values under different observed dimensions may have different effects on the latent variable parameters under the latent dimension. Assuming that the latent dimension includes transportation cost, the heavier the weight of the item, the higher its transportation cost may be; the lighter the weight, the lower the transportation cost may be.
[0046] In a specific implementation, the potential dimension can be pre-set, for example, the transportation cost and transportation time are pre-set as potential dimensions, then in the process of classifying items, the latent variable is a two-dimensional variable, and its two dimensions are the transportation time dimension and the transportation cost dimension. It should be noted that the potential dimension can be set according to actual conditions and needs, including at least one reference aspect, such as physical attributes, item characteristics, transportation, and storage requirements. Among them, the physical attributes may include size, weight, volume, etc.; the item characteristics may include whether it is fragile, whether it is dangerous, etc.; the transportation may include transportation time, transportation cost, loss rate, etc.; the storage requirements may include temperature requirements, humidity requirements, safety level, etc. The above selection range for defining the potential dimension is only used as an example of possible implementation methods of the embodiment of the present disclosure, and does not constitute an improper prior limitation of the present invention. In actual applications, it can be set according to actual conditions and needs. The embodiment of the present disclosure does not make specific limitations on this, and its function can be realized.
[0047] In the disclosed embodiment, each latent dimension may have a corresponding latent variable parameter. The latent variable parameter may include a slope parameter, which is used to measure the degree of influence of the attribute value under the observed dimension on the latent dimension; specifically, the slope parameter may represent the change in the category probability of the item to be classified when the latent variable increases by one unit. Exemplarily, if the slope parameter in the latent variable parameter of a latent dimension is 2, it means that when the latent variable increases by 1 unit, the category probability of the item to be classified will increase by 2 units. At the same time, the slope parameter in the latent variable parameter can be directional, that is, a positive slope indicates that an increase in the latent variable will increase the probability that the item to be classified belongs to a certain category, while a negative slope indicates that an increase in the latent variable will reduce the probability that the item to be classified belongs to a certain category.
[0048] In the disclosed embodiment, the latent variable parameters may also include an intercept parameter, which indicates the baseline level of the category probability when a certain latent dimension takes the value of 0. It can be understood as the initial probability that the item to be classified belongs to a certain category when a certain latent dimension among the preset latent dimensions does not affect the category of the item to be classified. Exemplarily, assuming that the intercept parameter under the latent dimension of transportation time is 0.5, it means that when the influencing factor of transportation time is not considered, the initial probability that the item to be classified belongs to a certain category is 50%.
[0049] It should be noted that in addition to the slope parameters mentioned above, which are used to represent the degree of influence of each potential dimension on the category of the item to be classified, and the intercept parameters, which are used to represent the initial benchmark of the category of the item to be classified, the latent variable parameters may also include nonlinear parameters, weight parameters, etc. Among them, when capturing the relationship between the potential dimension and the category of the item to be classified, the two may be in a nonlinear relationship. In this case, the nonlinear relationship between the two can be captured by introducing nonlinear parameters. Alternatively, if the weighting between different potential dimensions is involved in determining the final category of the item to be classified, the contribution of different potential dimensions to the final category can be adjusted by setting weight parameters.
[0050] In an embodiment of the present disclosure, latent variable parameters of an object to be classified under each preconfigured latent dimension are determined, including: calculating a function value of a first likelihood function according to the latent variable parameters initialized under each preconfigured latent dimension and a preset first likelihood function; adjusting the latent variable parameters with the goal of maximizing the function value of the first likelihood function, and taking the latent variable parameters corresponding to the maximum function value of the first likelihood function as the latent variable parameters of the object to be classified under each preconfigured latent dimension; wherein the maximum value of the first likelihood function indicates that the probability of the attribute value of the object to be classified appearing in each observation dimension is the maximum.
[0051] In the specific implementation, it is assumed that the distribution of the latent variable Z is a multivariate normal distribution , assuming that the latent variable Z satisfies the conditional independence assumption, represents the latent variable parameter, Represents a vector with mean and the covariance matrix The multivariate normal density function of Represents the number of items to be classified, and Defined as individual The attribute value under the I-dimensional observation dimension. From this, the following first likelihood function formula can be obtained:
[0052]
[0053] Then, we can get the maximum likelihood function formula:
[0054]
[0055] In the marginal likelihood function, It is to find the likelihood between the estimated attribute value and the actual attribute value of the item to be classified in each observation dimension under the given current latent variable parameters; is the conditional probability, which means the probability of the attribute value under the observation dimension given the latent variable Z. By integrating the latent variable z, the latent variable z can be marginalized, so that the specific value of the latent variable is not directly considered, but the overall influence of the latent variable is considered, and then the likelihood between the estimated attribute value and the actual attribute value of the item to be classified under each observation dimension is obtained under the current latent variable parameters. In the first likelihood function, we hope to find a set of latent variable parameters , so that under the premise of given latent variable parameters, the probability of observing the actual attribute value under each observation dimension is maximized. Assuming that the mean and variance of the latent variable are known, the current latent variable parameters can be continuously adjusted according to the function value of the first likelihood function, and the latent variable parameters corresponding to the maximum likelihood between the estimated attribute value and the actual attribute value of the item to be classified under each observation dimension are taken as the final latent variable parameters.
[0056] In a specific implementation, after obtaining the latent variable parameters, the intercept parameter and the slope parameter can be separated from them. Among them, the slope parameter represents the influence of each latent dimension on the category of the items to be classified, and the intercept parameter represents the initial benchmark of the category of the items to be classified under each latent dimension.
[0057] In another possible implementation, in addition to separating the intercept parameter for representing the initial benchmark of the category of the to-be-classified object from the latent variable parameter, the initial benchmark of the category of the to-be-classified object can also be obtained by the following steps: replacing the value of the to-be-classified object in each latent dimension under the target dimension with zero, and replacing the value of the to-be-classified object in each latent dimension other than the target dimension with a preset constant; calculating the initial benchmark of the category of the to-be-classified object corresponding to the target dimension based on the replaced value of the to-be-classified object in each latent dimension; taking each latent dimension as the target dimension one by one, repeating the above steps to determine the initial benchmark of the category of the to-be-classified object corresponding to each latent dimension.
[0058] It should be noted that the preset constant here can be a mean, median, etc. calculated through several samples, or it can be a constant pre-set based on experience. The embodiment of the present disclosure does not specifically limit the method for determining the preset constant. In practical applications, the corresponding method and specific value can be set according to actual needs and circumstances.
[0059] Exemplarily, assume that the pre-configured latent dimensions include volume, weight, and transportation cost. You can first use volume as the target dimension, then replace the original value 50L in the volume dimension with 0, and replace the values of the weight dimension and the transportation cost dimension with preset constants, such as replacing the original 10 kg and 20 yuan with 5 kg and 15 yuan. Then you can use the replaced values to calculate the initial benchmark probability that the item belongs to different candidate categories when the volume is 0, the weight is 5 kg, and the transportation cost is 15 yuan. Then you can use the weight and transportation cost as target dimensions one by one, and calculate the initial benchmarks corresponding to different target dimensions. When all potential dimensions are calculated, you can get the initial benchmark probability that the item to be classified belongs to different candidate categories under each potential dimension.
[0060] In another possible implementation, the intercept parameter or slope parameter in the latent variable parameters can also be determined by empirical distribution method, Bayesian inference and other methods. For example, based on historical data, the frequency of occurrence of each category under different latent dimensions can be counted, and by analyzing the classification results of similar items in the past, the initial baseline probability of each category under different conditions can be calculated; the decision tree algorithm can also be used to train historical data, and the model can automatically determine the impact of each latent dimension on the category, thereby outputting the initial baseline probability of each category. In practical applications, the method for determining the latent variable parameters can be set according to actual needs and circumstances. The above is only used as an example to illustrate several feasible implementation methods in the embodiments of the present disclosure, and does not constitute an improper limitation on the present invention. The embodiments of the present disclosure will not repeat other methods that can achieve similar purposes, and the functions that can be achieved shall prevail.
[0061] In a specific implementation, the latent dimension pre-configured by the latent variable can be one-dimensional or multi-dimensional. When the latent variable is a one-dimensional variable, that is, it only includes one latent dimension, the first likelihood function can be expressed as:
[0062]
[0063] in, It indicates the likelihood between the estimated attribute value and the actual attribute value under each observation dimension when the latent variable parameters and the actual attribute value of the item to be classified under each observation dimension are given; I indicates the number of potential dimensions of the latent variable; Represents latent variables Probability distribution under category c; Represents latent variables The mean of Represents latent variables It should be noted that in practical applications, the first likelihood function can be adjusted according to the number of dimensions and the latent variable parameters that need to be estimated, and the embodiments of the present disclosure do not specifically limit this.
[0064] However, when the number of pre-configured latent dimensions is large, the calculation process becomes very complicated. In order to simplify the calculation of the first likelihood function and improve the efficiency and calculation accuracy of determining the latent variable parameters, Figure 2 As shown, the above calculations can be performed for each potential dimension respectively, so as to obtain the latent variable parameters corresponding to each potential dimension.
[0065] Specifically, its latent variable parameters can be expressed as:
[0066]
[0067] in, represents the latent variable parameters of the j-th potential dimension; It indicates the likelihood between the estimated attribute value and the actual attribute value in each observation dimension when the latent variable parameters and the actual attribute value of the item to be classified in each observation dimension are given; Represents the number of potential dimensions.
[0068] S102: Determine correlation parameters between the latent dimensions according to the latent variable parameters of the objects to be classified under the pre-configured latent dimensions.
[0069] As mentioned above, when there are many pre-configured latent dimensions, such as when the latent dimensions include transportation cost, transportation time, loss rate, safety level and other dimensions, the calculation process according to the traditional likelihood estimation will become very complicated due to the scenario involving high-dimensional integration, and it is difficult to implement in a general computing environment. In order to simplify the calculation process of the above situation, the embodiment of the present disclosure proposes to estimate the latent variable parameters and the correlation parameters separately. Specifically, the latent variable parameters corresponding to each pre-configured latent dimension can be determined first, and then the correlation parameters between the latent dimensions can be calculated. Thus, by splitting the estimation of multi-dimensional parameters into one-dimensional and two-dimensional estimation, the complexity of the calculation is reduced, the difficulty of directly performing high-dimensional integration is avoided, and the estimation of each parameter is relatively independent, the calculation efficiency is higher, and the results can be obtained faster in practical applications. In addition, since the latent variable parameters are calculated first, and then the latent variable parameters are used for double integration to obtain the correlation parameters, this step-by-step calculation method can be more carefully optimized and adjusted in each step, which helps to improve the accuracy of the calculation.
[0070] In the disclosed embodiment, the correlation parameters between the latent dimensions are determined according to the latent variable parameters of the items to be classified under the pre-configured latent dimensions, including: calculating the function value of the second likelihood function under preset constraints according to the initialized correlation parameters and the preset second likelihood function; adjusting the correlation parameters with the goal of maximizing the function value of the second likelihood function, and taking the correlation parameters when the function value of the second likelihood function is maximized as the correlation parameters between the latent dimensions in the latent variable.
[0071] In a specific implementation, after determining the pre-configured latent variable parameters of each potential dimension, the determined latent variable parameters of each potential dimension can be substituted into the following formula to determine the correlation parameter between two potential dimensions:
[0072]
[0073] in, Represents the correlation parameter between latent dimension m and latent dimension n; Indicates the range of the correlation parameter, that is, the final correlation parameter needs to be between -1 and 1; It is the second likelihood function, which indicates the likelihood between the estimated attribute value and the actual attribute value under each observation dimension when the correlation parameter and the actual attribute value of the item to be classified under each observation dimension are given. Through the above formula, the function value of the second likelihood function can be calculated according to a given initialization correlation parameter and the determined latent variable parameter, and then the function value of the second likelihood function can be maximized by adjusting the correlation parameter, and the correlation parameter corresponding to the maximum function value of the second likelihood function is used as the final correlation parameter. It can be seen from the above formula that the correlation parameter between any two different latent variables can be determined using the above formula.
[0074] S103: Determine the category of the object to be classified based on the correlation parameters between the latent variable parameters and each latent dimension.
[0075] In the embodiment of the present disclosure, after determining the latent variable parameters and the correlation parameters between the latent dimensions, the category of the object to be classified can be further determined. Specifically, based on the correlation parameters between the latent variable parameters and the latent dimensions, the category of the object to be classified is determined, including: based on the correlation parameters between the latent variable parameters and the latent dimensions, calculating the probability that the object to be classified belongs to each candidate category; based on the probability that the object to be classified belongs to each candidate category, determining the target category of the object to be classified from each candidate category.
[0076] For example, suppose the goal is to classify the items to be classified into two categories, corresponding to the two modes of transportation: road transportation and air transportation; the observation dimensions are set to three, namely volume, weight and size. In other words, there are two candidate categories, road transportation and air transportation. Assuming that the road transportation category corresponds to 1 and the air transportation category corresponds to 0, the probabilities of the items to be classified belonging to these two categories are:
[0077]
[0078] in, represents the probability that the item i to be classified belongs to the road transport category; represents the probability that the item to be classified belongs to the air transport category; represents the slope parameter in the latent variable parameter; represents the intercept parameter in the latent variable parameters; represents the potential dimension; Indicates the index of the item to be classified; Represents the index of the attribute value under three observation dimensions. Assuming that the number of samples of items to be classified is N, the slope ,intercept ; Potential dimensions include transportation time, transportation cost and loss rate. The average transportation time, average transportation cost and average loss rate can be determined based on the relevant data of the corresponding scenarios of the items to be classified, so as to set the mean vector , and set the covariance matrix to:
[0079] .
[0080] Then, according to the method described above, the latent variable parameters under each potential dimension can be determined first, and then the correlation parameters between each two potential dimensions can be calculated based on the determined latent variable parameters, and then the probability of the items to be classified belonging to each candidate category can be calculated, and the candidate category with the highest probability among the candidate categories can be determined as the final target category of the items to be classified. Alternatively, the candidate category that exceeds the preset probability threshold among the calculated probabilities of the candidate categories can be determined as the final target category of the items to be classified by setting a threshold. The disclosed embodiment does not specifically limit the basis for determining the final target category, and can be set and adjusted according to actual conditions in actual applications to achieve its function.
[0081] In a possible implementation, after determining the latent variable parameters and the correlation parameters, the root mean square error and absolute deviation of each parameter can also be calculated to verify the rationality of the determined latent variable parameters and the correlation parameters. The specific method for verifying rationality is not specifically limited in the embodiment of the present disclosure, and can be set according to actual needs in practical applications, and the embodiment of the present disclosure does not specifically limit this.
[0082] According to a second aspect of the embodiment of the present disclosure, Figure 3 As shown, an article classification device 300 is provided, comprising:
[0083] The first determination module 301 is used to determine the latent variable parameters of the objects to be classified in each pre-configured latent dimension based on the attribute values of the objects to be classified in each observed dimension; the latent variable parameters represent the influence of each latent dimension on the category of the objects to be classified and the initial benchmark of the category of the objects to be classified;
[0084] The second determination module 302 is used to determine the correlation parameters between the potential dimensions according to the latent variable parameters of the objects to be classified under the pre-configured potential dimensions;
[0085] The classification module 303 is used to determine the category of the object to be classified based on the correlation parameters between the latent variable parameters and each latent dimension.
[0086] Optionally, the first determining module 301 is specifically configured to:
[0087] Calculate the function value of the first likelihood function according to the latent variable parameters initialized under each pre-configured potential dimension and the preset first likelihood function;
[0088] With the goal of maximizing the function value of the first likelihood function, the latent variable parameters are adjusted, and the latent variable parameters corresponding to the maximum function value of the first likelihood function are used as the latent variable parameters of the items to be classified under the pre-configured latent dimensions; wherein, the maximum value of the first likelihood function indicates that the probability of the attribute value appearing in the items to be classified under each observation dimension is the largest.
[0089] Optionally, the first determining module 301 is further configured to:
[0090] Replace the values of the to-be-classified objects in the target dimension in each potential dimension with zero, and replace the values of the to-be-classified objects in other dimensions in each potential dimension except the target dimension with a preset constant;
[0091] Based on the values of the objects to be classified after replacement in each potential dimension, the initial benchmark of the category of the objects to be classified corresponding to the target dimension is calculated;
[0092] Each potential dimension is used as the target dimension one by one, and the above steps are repeated to determine the initial benchmark of the category of the to-be-classified object corresponding to each potential dimension.
[0093] Optionally, the second determining module 302 is specifically configured to:
[0094] Calculating the function value of the second likelihood function under preset constraints according to the initialized correlation parameter and the preset second likelihood function;
[0095] With the goal of maximizing the function value of the second likelihood function, the correlation parameter is adjusted, and the correlation parameter when the function value of the second likelihood function is maximum is used as the correlation parameter between the potential dimensions in the latent variable.
[0096] Optionally, the potential dimension includes at least one reference aspect; the reference aspect includes physical property aspect, item characteristic aspect, transportation aspect and storage requirement aspect.
[0097] Optionally, the classification module 303 is specifically used for:
[0098] Based on the correlation parameters between the latent variable parameters and each latent dimension, the probability that the item to be classified belongs to each candidate category is calculated;
[0099] Based on the probability that the object to be classified belongs to each candidate category, the target category of the object to be classified is determined from each candidate category.
[0100] According to a third aspect of an embodiment of the present disclosure, there is provided an electronic device for classifying items, comprising: one or more processors; a storage device for storing one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors implement the method provided by the first aspect of the embodiment of the present disclosure.
[0101] According to a fourth aspect of an embodiment of the present disclosure, a computer-readable medium is provided, on which a computer program is stored, and when the program is executed by a processor, the method provided by the first aspect of the embodiment of the present disclosure is implemented.
[0102] According to a fifth aspect of an embodiment of the present invention, there is provided a computer program product, including a computer program, which implements the method of any of the above embodiments when executed by a processor.
[0103] Figure 4 An exemplary system architecture 400 is shown to which the object classification method or the object classification device implemented by the present disclosure can be applied.
[0104] like Figure 4 As shown, system architecture 400 may include terminal devices 401, 402, 403, network 404 and server 405. Network 404 is used to provide a medium for communication links between terminal devices 401, 402, 403 and server 405. Network 404 may include various connection types, such as wired, wireless communication links or optical fiber cables, etc.
[0105] Users can use terminal devices 401, 402, 403 to interact with server 405 through network 404 to receive or send messages, etc. Various communication client applications can be installed on terminal devices 401, 402, 403, such as shopping applications, web browser applications, search applications, instant messaging tools, email clients, social platform software, etc. (only for example).
[0106] The terminal devices 401 , 402 , and 403 may be various electronic devices having a display screen and supporting web browsing, including but not limited to smart phones, tablet computers, laptop computers, and desktop computers.
[0107] The server 405 may be a server that provides various services, such as a backend management server (for example only) that provides support for shopping websites browsed by users using the terminal devices 401, 402, and 403. The backend management server may process the received item classification request and feed back the processing result (for example only) to the terminal device.
[0108] It should be noted that the method for classifying items provided in the embodiment of the present invention is generally executed by the server 405, and accordingly, the device for classifying items is generally disposed in the server 405. The method for classifying items provided in the embodiment of the present invention may also be executed by the terminal devices 401, 402, 403, and accordingly, the device for classifying items may be disposed in the terminal devices 401, 402, 403.
[0109] It should be understood that Figure 4 The number of terminal devices, networks and servers in the embodiment is only for illustration. Any number of terminal devices, networks and servers may be provided according to implementation requirements.
[0110] Reference below Figure 5 , which shows a schematic diagram of the structure of a computer system 500 of a terminal device suitable for implementing an embodiment of the present invention. Figure 5 The terminal device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present invention.
[0111] like Figure 5 As shown, the computer system 500 includes a central processing unit (CPU) 501, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 502 or a program loaded from a storage part 508 into a random access memory (RAM) 503. In the RAM 503, various programs and data required for the operation of the system 500 are also stored. The CPU 501, the ROM 502, and the RAM 503 are connected to each other through a bus 504. An input / output (I / O) interface 505 is also connected to the bus 504.
[0112] The following components are connected to the I / O interface 505: an input section 506 including a keyboard, a mouse, etc.; an output section 507 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 508 including a hard disk, etc.; and a communication section 509 including a network interface card such as a LAN card, a modem, etc. The communication section 509 performs communication processing via a network such as the Internet. A drive 510 is also connected to the I / O interface 505 as needed. A removable medium 511, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 510 as needed, so that a computer program read therefrom is installed into the storage section 508 as needed.
[0113] In particular, according to the embodiments disclosed in the present invention, the process described above with reference to the flowchart can be implemented as a computer software program. For example, the embodiments disclosed in the present invention include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program contains program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication part 509, and / or installed from the removable medium 511. When the computer program is executed by the central processing unit (CPU) 501, the above-mentioned functions defined in the system of the present invention are executed.
[0114] It should be noted that the computer-readable medium shown in the present invention may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present invention, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, device or device. In the present invention, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, which carries a computer-readable program code. This propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Computer-readable signal media may also be any computer-readable medium other than computer-readable storage media, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer-readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, optical cable, RF, etc., or any suitable combination of the above.
[0115] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present invention. In this regard, each box in the flow chart or block diagram can represent a module, a program segment, or a part of a code, and the above-mentioned module, program segment, or a part of a code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flow chart, and the combination of the boxes in the block diagram or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0116] The modules involved in the embodiments of the present invention may be implemented by software or hardware. The modules described may also be set in a processor. For example, a processor includes a first determination module, a second determination module, and a classification module, wherein the names of these modules do not constitute a limitation on the modules themselves in some cases. For example, the first determination module may also be described as "a module for determining the latent variable parameters of the items to be classified under each pre-configured latent dimension based on the attribute values of the items to be classified under each observed dimension".
[0117] As another aspect, the present invention also provides a computer-readable medium, which may be included in the device described in the above embodiment; or it may exist independently without being assembled into the device. The above computer-readable medium carries one or more programs. When the above one or more programs are executed by a device, the device implements the following method: based on the attribute values of the items to be classified under each observed dimension, determine the latent variable parameters of the items to be classified under each pre-configured latent dimension; the latent variable parameters represent the degree of influence of each latent dimension on the category of the items to be classified and the initial benchmark of the category of the items to be classified; according to the latent variable parameters of the items to be classified under each pre-configured latent dimension, determine the correlation parameters between the latent dimensions; based on the correlation parameters between the latent variable parameters and each latent dimension, determine the category of the items to be classified.
[0118] Finally, it should be noted that the above embodiments are only specific implementation methods of the present disclosure, which are used to illustrate the technical solutions of the present disclosure, rather than to limit them. The protection scope of the present disclosure is not limited thereto. Although the present disclosure is described in detail with reference to the above embodiments, ordinary technicians in the field should understand that any technician familiar with the technical field can still modify the technical solutions recorded in the above embodiments within the technical scope disclosed in the present disclosure, or can easily think of changes, or make equivalent replacements for some of the technical features therein; and these modifications, changes or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present disclosure, and should be included in the protection scope of the present disclosure. Therefore, the protection scope of the present disclosure should be based on the protection scope of the claims.
Claims
1. A method for classifying items, characterized in that: include: Based on the attribute values of the to-be-classified objects under each observed dimension, determining the latent variable parameters of the to-be-classified objects under each pre-configured latent dimension; The latent variable parameters represent the influence of each latent dimension on the category of the object to be classified and the initial benchmark of the category of the object to be classified; Determine the correlation parameters between the potential dimensions according to the latent variable parameters of the objects to be classified under the pre-configured potential dimensions; Based on the correlation parameters between the latent variable parameters and each latent dimension, the category of the object to be classified is determined.
2. The method according to claim 1, characterized in that Based on the attribute values of the objects to be classified in each observation dimension, determining the latent variable parameters of the objects to be classified in each pre-configured latent dimension includes: Calculating a function value of the first likelihood function according to the latent variable parameters initialized under each pre-configured potential dimension and a preset first likelihood function; With the goal of maximizing the function value of the first likelihood function, the latent variable parameters are adjusted, and the latent variable parameters corresponding to the maximum function value of the first likelihood function are used as the latent variable parameters of the object to be classified under each pre-configured latent dimension; wherein the maximum value of the first likelihood function indicates that the probability of the attribute value appearing in the object to be classified under each observation dimension is the largest.
3. The method according to claim 1, characterized in that The initial benchmark of the category of the object to be classified is obtained by the following steps: Replacing the values of the to-be-classified objects in the target dimension in each potential dimension with zero, and replacing the values of the to-be-classified objects in other dimensions in each potential dimension except the target dimension with a preset constant; Based on the values of the to-be-classified objects after replacement in each potential dimension, an initial benchmark of the category of the to-be-classified objects corresponding to the target dimension is calculated; Each potential dimension is used as the target dimension one by one, and the above steps are repeatedly performed to determine the initial benchmark of the category of the to-be-classified object corresponding to each potential dimension.
4. The method according to claim 1, characterized in that: According to the latent variable parameters of the items to be classified under the pre-configured latent dimensions, the correlation parameters between the latent dimensions are determined, including: Calculating, according to the initialized correlation parameter and the preset second likelihood function, a function value of the second likelihood function under preset constraints; The correlation parameter is adjusted with the goal of maximizing the function value of the second likelihood function, and the correlation parameter when the function value of the second likelihood function is maximum is used as the correlation parameter between the potential dimensions in the latent variable.
5. The method according to claim 1, characterized in that The potential dimensions include at least one reference aspect; the reference aspects include physical properties, item characteristics, transportation, and storage requirements.
6. The method according to any one of claims 1 to 5, characterized in that: Determining the category of the object to be classified based on the correlation parameter between the latent variable parameter and each latent dimension includes: Calculating the probability that the object to be classified belongs to each candidate category based on the correlation parameters between the latent variable parameters and each latent dimension; Based on the probability that the object to be classified belongs to each candidate category, the target category of the object to be classified is determined from each candidate category.
7. An article classification device, characterized in that: include: A first determination module is used to determine the latent variable parameters of the object to be classified based on the attribute values of the object to be classified in each observation dimension; The latent variable parameters represent the influence of the attribute values under each observed dimension on each potential dimension in the latent variable and the initial benchmark of each potential dimension; A second determination module is used to determine the correlation parameters between the potential dimensions in the latent variable according to the latent variable parameters; The classification module is used to determine the category of the object to be classified based on the correlation parameters between the latent variable parameters and each latent dimension.
8. An electronic device, characterized in that: include: one or more processors; a storage device for storing one or more programs, When the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1 to 6.
9. A computer readable medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the method according to any one of claims 1 to 6 is implemented.
10. A computer program product, comprising a computer program, which, when executed by a processor, implements the method according to any one of claims 1 to 6.