Accessory configuration method and device
Through the target model and multi-objective optimization algorithm combined with hard constraints and soft constraints, the electronic equipment accessories configuration is automatically selected, which solves the problem of time-consuming and insufficient expansion of accessories configuration in the existing technology, and achieves fast and accurate accessories configuration and complexity Adaptation of constraint rules.
Patent Information
- Application Number
- CN202411179709.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-26
- Publication Date
- 2024-12-27
AI Technical Summary
The prior art is difficult to quickly and accurately configure complex electronic equipment accessories, which makes the optional equipment time-consuming and limited scalability, and cannot meet the needs of complex constraint rules.
The target model and multi-objective optimization algorithm are adopted, combined with hard constraints and soft constraints, and the accessory configuration is automatically selected, and the CSP model and NSGA-II algorithm are used to achieve fast and accurate configuration of accessories.
It realizes the rapid and precise configuration of electronic equipment accessories, reduces the need for manual intervention, improves the automation capabilities and scalability of configurations, and adapts to complex constraint rules.
Smart Images

Figure CN119201242A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to equipment accessory configuration technology, and more particularly to an accessory configuration method and device. Background Art
[0002] There are various configurations of electronic devices on the market. These fully configured products are based on a pool of accessories, the compatibility between accessories, and some special strategies formulated by relevant personnel based on market rules.
[0003] With the continuous upgrading of products, more and more configurable accessories are available, and the compatibility relationship between product accessories is becoming more and more complicated. The constraint relationship between accessories is transitive, so it is difficult and time-consuming to select a set of configurations that meet expectations. Summary of the invention
[0004] The present application provides a method and device for configuring an accessory.
[0005] The technical solution of this application is implemented as follows:
[0006] In a first aspect, a method for configuring an accessory is provided, the method comprising:
[0007] Based on the attribute information of at least one first accessory and the first constraint condition related to the usage attribute of the accessory, using the target model, determining whether at least one set of configurations can be obtained;
[0008] If at least one set of configurations is available, a target configuration is determined from the at least one set of configurations using a multi-objective optimization algorithm based on a second constraint condition related to the accessory sales attribute.
[0009] In the above scheme, the method also includes: if at least one set of the configurations cannot be obtained, generating first information, the first information being used to indicate the reason for the unsolvable problem; based on the first information, adjusting the first constraint to obtain an adjusted first constraint; based on the attribute information of at least one of the first accessory models and the adjusted first constraint, using the target model, determining whether at least one set of the configurations can be obtained.
[0010] In the above scheme, based on the second constraint condition related to the sales attribute of the accessories, a multi-objective optimization algorithm is used to determine the target configuration from at least one set of the configurations, including: determining the constraint value corresponding to any set of the configurations based on the second constraint condition and the attribute information of the accessories in any set of the configurations; based on the constraint values corresponding to at least one set of the configurations, grading at least one set of the configurations to obtain the grades corresponding to at least one set of the configurations; based on the grades corresponding to at least one set of the configurations, determining a preset number of target configurations from at least one set of the configurations.
[0011] In the above scheme, based on the level corresponding to at least one set of the configurations, a preset number of target configurations are determined from at least one set of the configurations, including: when the number of configurations of the first N levels is greater than the preset number and the number of configurations of the first N-1 levels is less than the preset number, based on the constraint value corresponding to at least one set of the configurations of the Nth level, determining the first crowding distance corresponding to at least one set of the configurations of the Nth level; sorting the first crowding distances corresponding to at least one set of the configurations of the Nth level in order from large to small; the preset number of target configurations are obtained from the first number of configurations of the Nth level and the second number of configurations of the first N-1 levels.
[0012] In the above solution, the method further includes: when the number of configurations of the top N levels is equal to the preset number of configurations, taking the configurations of the top N levels as the target configurations.
[0013] In the above scheme, the first crowding distance corresponding to at least one set of configurations at the Nth level is determined based on the constraint values corresponding to each set of at least one set of configurations at the Nth level, including: sorting the constraint values corresponding to each set of at least one set of configurations at the Nth level in order from small to large; setting the first crowding distance of the configurations sorted at the head and tail to infinity; and determining the first crowding distance of the middle set of configurations based on the constraint values of the front and rear sets of configurations, and whether the weights between the constraint values are the same.
[0014] In the above scheme, the first crowding distance of the middle set configuration is determined based on the constraint values of the front and rear set configurations, and whether the weights between the constraint values are the same, including: when the constraint values include the selling price and the rate of return, if the weights between the constraint values are the same, then based on the selling price of the front and rear set configurations, the second crowding distance of the middle set configuration is obtained; based on the rate of return of the front and rear set configurations, the third crowding distance of the middle set configuration is obtained; based on the second crowding distance and the third crowding distance of the middle set configuration, the first crowding distance of the middle set configuration is obtained.
[0015] In the above scheme, the first crowding distance of the middle set configuration is determined based on the constraint values of the front and rear sets of configurations, and whether the weights of the constraint values are the same, including: when the constraint values include the selling price and the rate of return, if the weights of the constraint values are not the same, then based on the selling prices of the remaining configurations of at least one set of configurations after the N-th level sorting except the first and last configurations, and the preset selling price, the first reward and punishment coefficient of the selling price is obtained; based on the total number of accessories and the number of key accessories included in the middle set configuration, the second reward and punishment coefficient including key accessories is obtained; based on the selling price of the front and rear sets of configurations, and the first reward and punishment coefficient and the second reward and punishment coefficient, the second crowding distance of the middle set configuration is obtained; based on the rate of return of the front and rear sets of configurations, and the second reward and punishment coefficient, the third crowding distance of the middle set configuration is obtained; based on the second crowding distance and the third crowding distance of the middle set configuration, the first crowding distance is obtained.
[0016] In the above scheme, based on the attribute information of at least one first accessory and the first constraint condition related to the accessory usage attribute, the target model is used to determine whether at least one set of configurations can be obtained, including: the first constraint condition includes: a first sub-constraint condition directly related to the accessory selection, and a second sub-constraint condition not directly related to the accessory selection; based on the first sub-constraint condition and the attribute information of at least one first accessory, at least one second accessory is determined from at least one first accessory; based on the second sub-constraint condition and the attribute information of at least one second accessory, at least one third accessory is determined from at least one second accessory; based on the attribute information of at least one third accessory and the second sub-constraint condition, the target model is used to determine whether at least one set of the configurations can be obtained.
[0017] In a second aspect, a device for configuring an accessory is provided, the device comprising:
[0018] A processing unit, configured to determine whether at least one set of configurations can be obtained by using a target model based on attribute information of at least one first accessory and a first constraint condition related to a usage attribute of the accessory;
[0019] The processing unit is further configured to determine a target configuration from the at least one set of configurations by using a multi-objective optimization algorithm based on a second constraint condition related to the sales attribute of the accessory if at least one set of configurations is available.
[0020] According to a third aspect, an electronic device is provided, comprising: a processor and a memory configured to store a computer program that can be run on the processor, wherein the processor is configured to execute the steps of the method of the first aspect when running the computer program.
[0021] According to a fourth aspect, a computer-readable storage medium is provided, on which a computer program is stored, wherein the computer program implements the steps of the method according to the first aspect when executed by a processor.
[0022] According to a fifth aspect, a computer program product is provided, comprising a computer program, wherein the computer program implements the steps of the method according to the first aspect when executed by a processor.
[0023] The present application provides a method and device for configuring an accessory, the method for configuring an accessory comprising: based on attribute information of at least one first accessory and a first constraint condition related to the accessory usage attribute, using a target model, determining whether at least one set of configurations can be obtained; if at least one set of configurations can be obtained, based on a second constraint condition related to the accessory sales attribute, using a multi-objective optimization algorithm, determining a target configuration from at least one set of configurations. BRIEF DESCRIPTION OF THE DRAWINGS
[0024] Figure 1 The following is a flow chart of the configuration method of the accessories in the embodiment of the present application. Figure 1 ;
[0025] Figure 2 The following is a flow chart of the configuration method of the accessories in the embodiment of the present application. Figure 2 ;
[0026] Figure 3 A schematic diagram of a CSP model block diagram for establishing a device configuration in an embodiment of the present application;
[0027] Figure 4 A schematic diagram of a process for solving a multi-objective optimization model in an embodiment of the present application;
[0028] Figure 5 It is a structural schematic diagram of the configuration device of the accessories in the embodiment of the present application;
[0029] Figure 6 It is a schematic diagram of the structure of the electronic device in the embodiment of the present application. DETAILED DESCRIPTION
[0030] In order to enable a more detailed understanding of the features and technical contents of the embodiments of the present application, the implementation of the embodiments of the present application is described in detail below in conjunction with the accompanying drawings. The attached drawings are for reference only and are not used to limit the embodiments of the present application.
[0031] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which this application belongs. The terms used herein are only for the purpose of describing this embodiment and are not intended to limit this application.
[0032] In the following description, references to “some embodiments,” “this embodiment,” “this embodiment,” and examples, etc., describe a subset of all possible embodiments, but it can be understood that “some embodiments” may be the same subset or different subsets of all possible embodiments, and may be combined with each other without conflict.
[0033] If similar descriptions of "first / second" appear in the application documents, the following instructions are added. In the following description, the terms "first\second\third" involved are merely used to distinguish similar objects and do not represent a specific ordering of the objects. It can be understood that "first\second\third" can be interchanged in a specific order or sequence where permitted, so that the present embodiment described here can be implemented in an order other than that illustrated or described here.
[0034] In this embodiment, the term "and / or" is merely a description of the association relationship between associated objects, indicating that three relationships may exist. For example, object A and / or object B may represent three situations: object A exists alone, object A and object B exist at the same time, and object B exists alone.
[0035] There are various configurations of electronic devices on the market. These fully configured products are based on a pool of accessories, the compatibility between accessories, and some special strategies formulated by relevant personnel based on market rules.
[0036] As products are continuously upgraded, more and more configurable accessories are available, and the compatibility relationship between product accessories is becoming more and more complicated. The constraint relationship between accessories is transitive, and the final constraint rules form a messy network. In this way, it takes a long time to select a set of configurations that meet the expectations. Although there are many configurators on the market for users to choose by themselves, they all have certain limitations.
[0037] Regarding configurators, one type is for professionals. Users need to use configurators to configure a set of final desired configurations according to their own expertise. In the middle, there may be product incompatibility and conflicts, but the configurator cannot accurately locate the cause of the conflict, and some human intervention is still needed to locate the problem; the other type is for end users. Users make some configuration changes based on a set of basic configurations, but this type of configurator can expose very few accessories to users, and the range of user independent selection is very small. In addition, it requires some users who have a certain understanding of product accessories to have a good experience when using it, and the threshold for use is high. And behind these configurators, constraints are calculated based on a set of general rules. If you want to add constraints, you must add constraints according to a unique rule mode. At present, only hard constraints are supported, which are restrictive to constraint rules and have weak expansion capabilities. In terms of use, it depends more on users to select and match, and cannot automatically calculate the best batch of configurations according to the needs of some soft constraints. Among them, constraints that directly point to the scope of specific product accessories and the compatible relationship between accessories are classified as hard constraints.
[0038] Based on this, an embodiment of the present application provides a method for configuring accessories to quickly and accurately complete the configuration of device accessories.
[0039] Figure 1 The following is a flow chart of the configuration method of the accessories in the embodiment of the present application. Figure 1 , used in electronic devices such as Figure 1 As shown, the configuration method of the accessory may include:
[0040] S101: Based on attribute information of at least one first accessory and a first constraint condition related to a usage attribute of the accessory, using a target model, determining whether at least one set of configurations can be obtained.
[0041] In the embodiment of the present application, the attribute information of the first accessory includes at least: the accessory model, the accessory price, and the quantity of the first accessory required to configure the electronic device.
[0042] In the embodiment of the present application, the first constraint condition refers to a constraint condition related to the use attribute of the accessory. The use attribute of the accessory includes at least: the price of the accessory and the compatibility between accessories. The first constraint condition can also be called a hard constraint, that is, a constraint condition that directly points to the scope of specific product accessories and the compatibility relationship between accessories.
[0043] In the embodiment of the present application, the configuration of the electronic device includes various accessories. Using the solver of the target model, according to the attribute information of at least one first accessory included in the various accessories and the first constraint condition related to the usage attribute of the accessory, it is determined whether at least one set of configurations including the various accessories can be obtained.
[0044] Exemplarily, the target model can be a constraint satisfaction problem (CSP) model. The CSP model includes three main components: variable X, value range D and constraint C, wherein the accessory classification is defined as variable X, the specific accessories in each category are defined as value range D, and various constraint relationships are defined as constraint C.
[0045] S102: If at least one set of configurations is available, based on a second constraint condition related to the accessory sales attribute, a multi-objective optimization algorithm is used to determine a target configuration from the at least one set of configurations.
[0046] In the embodiment of the present application, the second constraint condition refers to a constraint condition related to the sales attributes of the accessories. The sales attributes of the accessories include at least: the selling price and the rate of return (or profit rate) of the whole configuration. The second constraint condition can also be called a soft constraint, that is, a tendency constraint condition on the accessories or the whole of the product configuration.
[0047] In an embodiment of the present application, based on a second constraint condition related to the accessory sales attribute, constraint values corresponding to at least one set of configurations are determined, and then a target constraint value is determined from at least one constraint value using a multi-objective optimization algorithm, and the configuration corresponding to the target constraint value is the target configuration.
[0048] In the embodiment of the present application, the multi-objective optimization algorithm can be a second-generation non-dominated sorting genetic algorithm (NSGA-II). The core idea of the NSGA-II algorithm is to stratify the individuals in the population by non-dominated sorting, and use the crowding comparison operator to evaluate the pros and cons of individuals in the same non-dominated layer, so as to select individuals to enter the next generation.
[0049] In an embodiment of the present application, automatic selection of target configuration is achieved by combining a first constraint condition related to accessory usage attributes and a second constraint condition related to accessory sales attributes, thereby quickly and accurately completing the target configuration of device accessories.
[0050] In some embodiments, the method further includes: if at least one set of the configurations cannot be obtained, generating first information, the first information being used to indicate the reason why there is no solution; based on the first information, adjusting the first constraint to obtain an adjusted first constraint; based on the attribute information of at least one of the first accessory models and the adjusted first constraint, using the target model, determining whether at least one set of the configurations can be obtained.
[0051] In the embodiment of the present application, the configuration of the electronic device includes various accessories. Using the solver of the target model, according to the attribute information of at least one first accessory included in each type of accessories and the first constraint condition related to the use attribute of the accessory, it is determined that at least one set of configurations including various types of accessories cannot be obtained, and then further according to the conflict interpreter reasoning algorithm, the specific cause of the conflict, i.e., the first information, is calculated, and the unreasonable first constraint condition is adjusted to recalculate until at least one set of configurations that meet the conditions is obtained.
[0052] In some embodiments, S102 may include: determining a constraint value corresponding to any set of the configurations based on the second constraint condition and attribute information of accessories in any set of the configurations;
[0053] Based on the constraint values corresponding to the at least one set of configurations, the at least one set of configurations is graded to obtain the grade corresponding to the at least one set of configurations;
[0054] Based on the levels corresponding to the at least one set of the configurations, a preset number of target configurations are determined from the at least one set of the configurations.
[0055] In the embodiment of the present application, the attribute information of each accessory included in any set of configurations is used as the independent variable of the second constraint condition, and the constraint value corresponding to any set of configurations, i.e., the dependent variable, is obtained. Next, at least one constraint value is quickly non-dominated sorted, and the number of constraint values m that dominate the current constraint value is recorded each time the traversal is performed, and the constraint value with m being 0 is found and stored in the current non-dominated solution set, and the level rank is defined for the current set at the end of the traversal; the above steps are repeated until all non-dominated layers are obtained. That is, the level corresponding to at least one set of configurations is obtained. Next, according to the preset number of sets, in order from low to high level, if the number of sets of configurations of the first N levels is the preset number of sets, then the configurations of the first N levels are the target configurations. If the number of sets of configurations of the first N levels is greater than the preset number of sets, and the number of sets of configurations of the first N-1 levels is less than the preset number of sets, then the configurations of the first N-1 levels are used as the target configurations, and then the configurations of the remaining number of sets are arbitrarily selected from the Nth level as the target configurations, or in other words, according to the sorting of the constraint values (from large to small, or from small to large), the configurations of the remaining number of sets are selected from the Nth level as the target configurations.
[0056] In some embodiments, if the number of configurations of the first N levels is greater than the preset number, and the number of configurations of the first N-1 levels is less than the preset number, determining the preset number of target configurations from at least one of the configurations may include: determining the first crowding distance corresponding to each of the at least one configuration of the Nth level based on the constraint value corresponding to each of the at least one configuration of the Nth level;
[0057] The first crowding distances corresponding to at least one set of configurations of the Nth level are sorted in order from large to small; the first set of configurations ranked in front of the Nth level and the second set of configurations ranked in the first N-1 levels are used to obtain the preset number of target configurations.
[0058] It should be noted that if the number of configurations of the first N levels is greater than the preset number, and the number of configurations of the first N-1 levels is less than the preset number, the configurations of the first N-1 levels are used as the target configurations, and the remaining number of configurations are selected from the configurations of the Nth level as the target configurations. For the selection of the configuration of the Nth level, the corresponding first crowding distance can be calculated based on the constraint value of the configuration of the Nth level. The first crowding distance is used to evaluate the advantages and disadvantages of each configuration in the same non-dominated layer. The larger the first crowding distance, the higher the advantage of the configuration. Therefore, the configuration of the first number of configurations ranked in front of the Nth level can be selected in order from large to small. Add the configuration of the second number of configurations of the first N-1 levels to obtain the preset number of configurations. The sum of the first number and the second number is equal to the preset number. Because the second constraint condition is a condition related to the attribute of accessory sales, and accessory sales involve revenue, the larger the first crowding distance calculated according to the constraint value of the configuration, the higher the advantage of the configuration.
[0059] In some embodiments, determining the first crowding distance corresponding to each of the at least one set of configurations at the Nth level based on the constraint value corresponding to each of the at least one set of configurations at the Nth level includes:
[0060] Sort the constraint values corresponding to the at least one set of configurations at the Nth level in ascending order;
[0061] Set the first crowding distance of the configurations sorted at the beginning and end to infinity;
[0062] Based on the constraint values of the front and rear set configurations and whether the weights between the constraint values are the same, the first crowding distance of the middle set configuration is determined.
[0063] In the embodiment of the present application, at least one set of configurations of the Nth level is sorted in order of constraint values from small to large, and the first crowding distance of the configurations sorted at the head and tail is set to infinity (or the maximum), so that the selection of configurations can maintain a certain exploration capability at both ends. For the remaining configurations in the Nth level except the head and tail configurations, whether the crowding distance calculation formula needs to increase the reward and punishment coefficient is determined according to the weight between the constraint values.
[0064] In some embodiments, if the weights between the constraint values are the same, then the first crowding distance of the middle set configuration is determined based on the constraint values of the front and rear set configurations and whether the weights between the constraint values are the same, including: when the constraint values include the selling price and the rate of return, the second crowding distance of the middle set configuration is obtained based on the selling price of the front and rear set configurations;
[0065] Based on the yields of the front and rear sets of configurations, the third crowding distance of the middle set of configurations is obtained;
[0066] Based on the second crowding distance and the third crowding distance of the intermediate sleeve configuration, a first crowding distance of the intermediate sleeve configuration is obtained.
[0067] In the embodiment of the present application, the constraint values include the selling price and the rate of return, and when the weights between the constraint values are the same, the difference between the selling price of the latter set of configurations and the selling price of the former set of configurations is used to obtain the second crowding distance of the middle set of configurations; the difference between the rate of return of the latter set of configurations and the rate of return of the former set of configurations is used to obtain the third crowding distance of the middle set of configurations; the sum of the second crowding distance and the third crowding distance of the middle set of configurations is used to obtain the first crowding distance of the middle set of configurations. For example, when the middle set of configurations is the second set of configurations, the former set of configurations refers to the first set of configurations, and the latter set of configurations refers to the third set of configurations.
[0068] In some embodiments, if the weights between the constraint values are different, the first crowding distance of the middle set of configurations is determined based on the constraint values of the front and rear sets of configurations and whether the weights between the constraint values are the same, including: when the constraint values include the selling price and the rate of return, the first reward and penalty coefficient of the selling price is obtained based on the selling prices of the remaining configurations of at least one set of configurations after the Nth level sorting except the first and last configurations, and the preset selling price;
[0069] Based on the total number of accessories and the number of key accessories included in the intermediate set configuration, a second reward and penalty coefficient including key accessories is obtained;
[0070] Based on the selling prices of the front and rear set configurations, and the first reward and punishment coefficients and the second reward and punishment coefficients, a second crowding distance of the middle set configuration is obtained;
[0071] Based on the yields of the front and back sets of configurations and the second reward and punishment coefficient, a third crowding distance of the middle set of configurations is obtained;
[0072] The first crowding distance is obtained based on the second crowding distance and the third crowding distance of the intermediate sleeve configuration.
[0073] It should be noted that the selling price of the product configuration and the key accessories of the specific configuration have a certain correlation with the final sales volume of the product. Therefore, it is necessary to calculate the first reward and punishment coefficient related to the selling price (or the price reward and punishment coefficient), and the second reward and punishment coefficient including the key accessories. Furthermore, the middle set configuration may include key accessories. Therefore, when calculating the second crowding distance of the price constraint dimension of the middle set configuration, it is necessary to consider not only the selling price and price reward and punishment coefficient (i.e., the first reward and punishment coefficient) of the front and rear set configurations, but also the second reward and punishment coefficient including the key accessories. Secondly, when calculating the third crowding distance of the rate of return of the middle set configuration, it is necessary to consider the rate of return of the front and rear set configurations and the second reward and punishment coefficient including the key accessories.
[0074] In the embodiment of the present application, the calculation formula (1) of the first reward and punishment coefficient is:
[0075]
[0076] Among them, f(p i ) is the selling price of at least one configuration after the Nth level sorting except the first and last configurations, K is the preset selling price, and λ1 is the first reward and punishment coefficient.
[0077] The calculation formula (2) for the second reward and penalty coefficient including key accessories is:
[0078] λ2=M / (Mf(c)) (2)
[0079] Where f(c) is the number of configurations containing key accessories, M is the preset number of target configurations, and λ2 is the second reward and punishment coefficient.
[0080] The calculation formula (3) of the second crowding distance of the intermediate sleeve configuration is:
[0081] (λ1+λ2)(f(p i+1 )-f(p i-1 ))(3)
[0082] Among them, f(p i+1 ) is the selling price of the latter configuration, f(p i-1 ) is the selling price of the previous set of configurations, λ1 is the first reward and punishment coefficient, and λ2 is the second reward and punishment coefficient.
[0083] The calculation formula (4) of the third crowding distance of the intermediate set configuration is:
[0084] λ2(f(m i+1 )-f(m i-1 ))(4)
[0085] Among them, f(m i+1 ) is the rate of return of the latter configuration, f(mi-1 ) is the rate of return of the previous configuration, and λ2 is the second reward and punishment coefficient.
[0086] Finally, the sum of the second crowding distance and the third crowding distance of the middle sleeve configuration is the first crowding distance of the middle sleeve configuration.
[0087] In some embodiments, S101 may include: the first constraint condition includes: a first sub-constraint condition directly related to accessory selection, and a second sub-constraint condition not directly related to accessory selection;
[0088] Determine at least one second accessory from at least one first accessory based on the first sub-constraint and attribute information of at least one first accessory;
[0089] Determine at least one third accessory from at least one second accessory based on the second sub-constraint and attribute information of at least one second accessory;
[0090] Based on the attribute information of at least one of the third accessories and the second sub-constraint condition, using the target model, it is determined whether at least one set of the configurations can be obtained.
[0091] In an embodiment of the present application, the first sub-constraint directly related to the selection of accessories may include a price constraint and an accessory sales constraint, wherein the price constraint may indicate the selection of accessories within a certain price range, and the accessory sales constraint may indicate the accessories sold on the market.
[0092] In the embodiment of the present application, the second sub-constraint condition that is not directly related to the selection of accessories may include a compatibility constraint condition between accessories and a quantity limit constraint condition for multiple associated accessories. For example, the associated accessories may be mechanical hard disks and non-mechanical hard disks, and usually the total number of mechanical hard disks and non-mechanical hard disks in a configuration is fixed.
[0093] In the embodiment of the present application, first, based on the first sub-constraint and the attribute information of at least one first accessory included in each type of accessory, at least one first accessory included in each type of accessory is reduced to obtain at least one second accessory included in each type of accessory. Secondly, based on the second sub-constraint and the attribute information of at least one second accessory included in each type of accessory, at least one second accessory included in each type of accessory is reduced again to obtain at least one third accessory included in each type of accessory. Finally, using the solver of the target model, according to the attribute information of at least one third accessory included in each type of accessory and the second sub-constraint, it is determined whether at least one set of configurations including each type of accessory can be obtained.
[0094] In the embodiment of the present application, compared with the configurator selected manually, more diverse constraints can be added, breaking through the limitation that the configurator only has compatibility hard constraints, and is easier to expand.
[0095] Based on the above embodiments, the present application embodiment specifically illustrates a method for configuring an accessory. Figure 2 The following is a flow chart of the configuration method of the accessories in the embodiment of the present application. Figure 2 ,like Figure 2 As shown, the configuration method of the accessory may include:
[0096] S201: Modeling of constraint satisfaction problem CSP model.
[0097] S202: Electronic equipment configuration factor analysis and model building.
[0098] S203: Classify constraint C into soft constraints and hard constraints.
[0099] Abstract and transform product accessories and constraint relationships, and divide constraint relationships into two categories: hard constraints and soft constraints.
[0100] The CSP model block diagram of the established device configuration is as follows Figure 3 As shown, according to the factors 30 related to the electronic device generation configuration, the variables X (31), the value range D (32) and the constraints C (33) therein are determined, and a constraint satisfaction CSP model is constructed.
[0101] The category of the accessory is defined as variable X, and the model, price, and quantity of the accessory are defined as the value range D of variable X.
[0102] For example, the accessory categories of an electronic device, such as Feature1, Feature2, Feature3, etc., are defined as variable X, and the optional accessories of these features are defined as the value range D, such as:
[0103] Define the corresponding variable X: {Feature1, Feature2, Feature3…}
[0104] Define the corresponding range D. Different variables have different range attributes. For example, some have value-related attributes such as price and quantity, while others do not:
[0105] Feature1:[{p1,price1},{p2,price2},{p3,price3}…]
[0106] Feature2:[{m1,price1},{m2,price2}…]
[0107] Feature3:[{h1,price1,qty1},{h2,price2,qty2},{h3,price3,qty3}…]
[0108] Feature3_qty:{qty1,qty2…}
[0109] Feature3_total_qty:{t1,t2…}
[0110] Secondly, establish constraint C. Constraint rules include special constraints and accessory category constraints.
[0111] Among them, special constraints include predefined accessories, that is, the value range D of the preprocessing variable X, as well as price constraints and custom rules. The price constraint can be a price constraint for a single accessory, or it can be a price sum constraint for all accessories in the entire configuration. Therefore, the price constraint for a single accessory and the price sum constraint for all accessories in the entire configuration are both constraint C. Custom rules are rules set by users, which can be converted into constraint language according to specific rules to obtain constraint C.
[0112] Among them, the classification constraints of accessories include the adaptation relationship of different accessories, the quantity limit of the same accessory category, and the quantity limit of different accessory allocations. Therefore, the adaptation relationship (or compatible relationship) of different accessories is converted into a logical expression constraint to obtain constraint C. The quantity limit of the same accessory category and the quantity limit of different accessory allocations are converted into quantity sum constraints to obtain constraint C.
[0113] Exemplarily, 1) the value range D of some variables X is initially narrowed according to other strategies and the price constraints of individual accessories: for example, for this product configuration generation plan, Feature1 mainly sells p1 and p3; Feature3 mainly sells h2 and h3. According to these separately formulated strategies, the value range of the corresponding variable X is narrowed to Feature1: {p1, p3}; Feature3: {h2, h3}.
[0114] For price restrictions, for example, if Feature2 is only sold for 500 RMB to 1000 RMB, the value range of the corresponding variable X is reduced to Feature2:{m2,m3} according to the price of Feature2.
[0115] 2) Establishment of quantity restriction constraint: For variables with multiple quantities, such as variable Feature3 (such as mechanical hard disk and non-mechanical hard disk), the quantity of all selected accessories cannot exceed the maximum value in Feature3_total_qty. The relationship (5) is:
[0116]
[0117] Among them, total qty ∈{t1,t2...}.
[0118] 3) Establishment of compatible relationship constraints:
[0119] The compatibility relationship between accessories can be abstracted as the relationship of logical operations "or||" and "and&". For example, when Feature1 selects p1, Feature2 can select m1 and m2; when Feature1 selects p2, Feature2 can select m2 and m3. It can be expressed as follows:
[0120] (p1&(m1||m2))||(p2&(m2||m3))
[0121] For a certain accessory category, such as Feature1, only one value can be selected, which can be expressed as a logical expression:
[0122] (p1&!p2&!p3)||(p2&!p1&!p3)||(p3&!p1&!p2)
[0123] Based on the above logical expression abstraction principles, all variables X and value domains D (for example, variables representing quantitative values are filtered out because the quantitative constraint relationship has been established) and compatibility constraints are used to establish a multi-branch tree with a maximum depth of three. Then, the entire tree is traversed through the breadth-first search (Breadth-First-Search, BFS) to establish a constraint logical expression. When establishing the logical expression, since different variables have common constraints, duplicate constraints are avoided to simplify the logical expression.
[0124] S204: Prioritize the hard constraints and obtain a final reduced CSP model by calculating the CSP problems with higher priorities.
[0125] The constraints directly on the value range D of variable X are placed in the first priority tier; compatibility and quantity restriction constraints are placed in the second priority tier.
[0126] Calculate the constraint C in the first priority tier and the related variable X and the corresponding value range D, and reduce the value range D of the related variable X according to the constraint C.
[0127] According to the variable X affected by the previous priority calculation result, find the corresponding compatibility constraint C, and further calculate according to the latest value range D of the changed variable X, and transfer the constraint to obtain the final reduced value range D of the variable X.
[0128] The compatibility constraints and quantity constraints as well as the finally reduced variables X and range D are taken as the final factors of the CSP model and are ready to be solved.
[0129] By classifying and prioritizing the constraints C, the CSP large model problem can be decomposed to reduce the problem scale and improve the calculation speed.
[0130] S205: Solve using a CSP solver.
[0131] Introduce a solver (such as Google's or-tools, Microsoft's Z3, etc.) to calculate the configuration that meets the requirements based on the declared variables X, value range D and constraints C.
[0132] S206: Is there a solution? If yes, go to S207; if not, go to S211.
[0133] S207: Obtain a configuration set that satisfies the constraints.
[0134] S208: Establish a multi-objective optimization model based on the soft constraints and the configuration set.
[0135] S209: Solving the multi-objective optimization model of the configuration set based on the NSGAII algorithm.
[0136] S210: Obtain the final optimal solution set.
[0137] S211: The conflict interpreter concludes that there is no solution.
[0138] S212: Adjust the conflict constraint model. Then, continue to execute from S202 until a solution is found.
[0139] Based on the specific reasons for the conflict, the unreasonable hard constraint relationship is adjusted and recalculated to obtain a set of product configurations that meet all hard constraints.
[0140] Figure 4 Schematic diagram of the process of solving the multi-objective optimization model in the embodiment of the present application, such as Figure 4 As shown, this may include:
[0141] S401: The solution of CSP is used as the initial variable value set, that is, at least one set of configurations Q mentioned above.
[0142] S402: Establish all soft constraint functions.
[0143] The selling price formula (6) of the whole configuration is:
[0144]
[0145] Among them, n is the number of all accessories in the whole set, price i is the selling price of an accessory, qty i is the number of an accessory, and i is any accessory in the entire configuration.
[0146] The cost formula (7) for the entire configuration is:
[0147]
[0148] Among them, n is the number of all accessories in the whole set, cost i is the cost price of an accessory, qty i The quantity of an accessory.
[0149] The rate of return formula (8) for the entire configuration is:
[0150]
[0151] Soft constraint functions (dynamically extensible): such as minimum price (Formula (9)), maximum rate of return (Formula (10)),
[0152] C1=min(f(p j )),j∈Q (9)
[0153] C2=max(f(m j )),j∈Q (10)
[0154] S403: Calculate the constraint value of each configuration in the configuration set based on the constraint function, and use the constraint values of all configurations as the initial solution set.
[0155] S404: Classify each configuration by fast non-dominated sorting of the constraint values of each configuration.
[0156] S405: According to the preset number of sets of the target configuration, if the number of sets of the top N levels of configuration is equal to the preset number of sets, the top N levels of configuration are the target configuration.
[0157] S406: According to the preset number of sets of the target configuration, if the number of sets of the configurations of the first N levels is greater than the preset number and the number of sets of the configurations of the first N-1 levels is less than the preset number, a first crowding distance calculation is performed on each configuration of the Nth level.
[0158] a) The crowding distance calculation needs to be performed in each dimension according to each constraint function value in turn;
[0159] b) Each constraint function value is arranged in ascending order by value, and the first crowding distance of the first and last configurations is set to the maximum (i.e., infinity). Other configurations determine whether the crowding distance calculation formula needs to increase the reward and punishment coefficient based on the weights between the constraints.
[0160] If all constraints have the same weight, then (f(x i+1 )-f(x i-1 )) to calculate f(x i) under the current constraints.
[0161] If the weights of the constraints are different, for example, the price of the product configuration and the key accessories of the specific configuration have a certain correlation with the final sales volume of the product, the formula (1) for the first reward and penalty coefficient, i.e., the price reward and penalty coefficient, is:
[0162]
[0163] Among them, f(p i ) is the selling price of at least one configuration after the Nth level sorting except the first and last configurations, K is the preset selling price, and λ1 is the first reward and punishment coefficient.
[0164] The calculation formula (2) for the second reward and penalty coefficient including key accessories is:
[0165] λ2=M / (Mf(c)) (2)
[0166] Where f(c) is the number of configurations containing key accessories, M is the preset number of target configurations, and λ2 is the second reward and punishment coefficient.
[0167] Then the formula (3) for calculating the second crowding distance in the price constraint dimension is:
[0168] (λ1+λ2)(f(p i+1 )-f(p i-1 ))(3)
[0169] Among them, f(p i+1 ) is the selling price of the latter configuration, f(p i-1 ) is the selling price of the previous set of configurations, λ1 is the first reward and punishment coefficient, and λ2 is the second reward and punishment coefficient.
[0170] The third crowding distance formula (4) for calculating the rate of return is:
[0171] λ2(f(m i+1 )-f(m i-1 ))(4)
[0172] Among them, f(m i+1 ) is the rate of return of the latter configuration, f(m i-1 ) is the rate of return of the previous configuration, and λ2 is the second reward and punishment coefficient.
[0173] c) Finally, the distance values under all constraint functions are accumulated to obtain the final crowding distance value of the current configuration, that is, the first crowding distance.
[0174] S407: Sort the first crowding distances of the configurations at the Nth level in descending order.
[0175] S408: The configuration of the first set of numbers in the Nth level and the configuration of the second set of numbers in the first N-1 levels are used to obtain a target configuration of a preset number of numbers.
[0176] In order to implement the method of the embodiment of the present application, based on the same inventive concept, the embodiment of the present application also provides a configuration device for accessories. Figure 5 Schematic diagram of the structure of the configuration device of the accessories in the embodiment of the present application, such as Figure 5 As shown, the configuration device 50 of the accessory includes:
[0177] The processing unit 501 is configured to determine whether at least one set of configurations can be obtained by using a target model based on the attribute information of at least one first accessory and a first constraint condition related to the usage attribute of the accessory;
[0178] The processing unit 501 is further configured to determine a target configuration from the at least one set of configurations by using a multi-objective optimization algorithm based on a second constraint condition related to the accessory sales attribute if at least one set of configurations is available.
[0179] In an embodiment of the present application, automatic selection of target configuration is achieved by combining a first constraint condition related to accessory usage attributes and a second constraint condition related to accessory sales attributes, thereby quickly and accurately completing the target configuration of device accessories.
[0180] In some embodiments, the processing unit 501 is further used to generate first information if at least one set of the configurations cannot be obtained, and the first information is used to indicate the reason why there is no solution; based on the first information, adjust the first constraint condition to obtain the adjusted first constraint condition; based on the attribute information of at least one of the first accessory models and the adjusted first constraint condition, use the target model to determine whether at least one set of the configurations can be obtained.
[0181] In some embodiments, the processing unit 501 is also used to determine the constraint value corresponding to any set of the configurations based on the second constraint condition and the attribute information of the accessories in any set of the configurations; to classify at least one set of the configurations based on the constraint values corresponding to each of the at least one set of the configurations to obtain the level corresponding to each of the at least one set of the configurations; and to determine a preset number of target configurations from at least one set of the configurations based on the level corresponding to each of the at least one set of the configurations.
[0182] In some embodiments, the processing unit 501 is also used to determine the first crowding distance corresponding to at least one set of configurations at the Nth level based on the constraint value corresponding to at least one set of configurations at the Nth level when the number of sets of configurations at the first N levels is greater than the preset number and the number of sets of configurations at the first N-1 levels is less than the preset number; sort the first crowding distances corresponding to at least one set of configurations at the Nth level in order from large to small; and obtain the preset number of target configurations from the first number of configurations sorted in front of the Nth level and the second number of configurations at the first N-1 levels.
[0183] In some embodiments, the processing unit 501 is further configured to use the configurations of the top N levels as the target configurations when the number of sets of the configurations of the top N levels is equal to the preset number of sets.
[0184] In some embodiments, the processing unit 501 is also used to sort the constraint values corresponding to at least one set of configurations of the Nth level in order from small to large; set the first crowding distance of the configurations sorted at the head and tail to infinity; and determine the first crowding distance of the middle set of configurations based on the constraint values of the front and rear sets of configurations, and whether the weights between the constraint values are the same.
[0185] In some embodiments, the processing unit 501 is also used for obtaining, in the case where the constraint values include a selling price and a rate of return, a second crowding distance of the middle set configuration based on the selling price of the front and rear set configurations if the weights between the constraint values are the same; obtaining a third crowding distance of the middle set configuration based on the rate of return of the front and rear set configurations; and obtaining a first crowding distance of the middle set configuration based on the second crowding distance and the third crowding distance of the middle set configuration.
[0186] In some embodiments, the processing unit 501 is also used for the case where the constraint values include selling prices and yield rates. If the weights of the constraint values are different, then based on the selling prices of the remaining configurations of at least one set of configurations after the Nth level sorting except the first and last configurations, and the preset selling prices, a first reward and punishment coefficient of the selling price is obtained; based on the total number of accessories and the number of key accessories included in the middle set configuration, a second reward and punishment coefficient including key accessories is obtained; based on the selling prices of the front and rear set configurations, and the first reward and punishment coefficient and the second reward and punishment coefficient, a second crowding distance of the middle set configuration is obtained; based on the selling prices of the front and rear set configurations, and the first reward and punishment coefficient and the second reward and punishment coefficient, a third crowding distance of the middle set configuration is obtained based on the yield rates of the front and rear set configurations, and the second reward and punishment coefficient; based on the second crowding distance and the third crowding distance of the middle set configuration, the first crowding distance is obtained.
[0187] In some embodiments, the processing unit 501 is also used for the first constraint condition to include: a first sub-constraint condition directly related to accessory selection, and a second sub-constraint condition not directly related to accessory selection; based on the first sub-constraint condition and attribute information of at least one of the first accessories, determining at least one second accessory from at least one of the first accessories; based on the second sub-constraint condition and attribute information of at least one of the second accessories, determining at least one third accessory from at least one of the second accessories; based on the attribute information of at least one of the third accessories and the second sub-constraint condition, using the target model, determining whether at least one set of the configurations can be obtained.
[0188] The present application also provides another electronic device, Figure 6 Schematic diagram of the structure of the electronic device in the embodiment of the present application. Figure 6 As shown, the electronic device 60 includes: a processor 601 and a memory 602 configured to store a computer program that can be run on the processor;
[0189] The processor 601 is configured to execute the method steps in the aforementioned embodiment when running a computer program.
[0190] Of course, in practical applications, Figure 6 As shown, the components in the electronic device 60 are coupled together via a bus system 603. It is understood that the bus system 603 is used to realize the connection and communication between these components. In addition to the data bus, the bus system 603 also includes a power bus, a control bus, and a status signal bus. However, for the sake of clarity, Figure 6 Various buses are labeled as bus system 603.
[0191] In practical applications, the processor may be at least one of an application-specific integrated circuit (ASIC), a digital signal processing device (DSPD), a programmable logic device (PLD), a field-programmable gate array (FPGA), a controller, a microcontroller, and a microprocessor. It is understandable that for different devices, the electronic device used to implement the functions of the processor may also be other, and the embodiments of the present application do not specifically limit this.
[0192] The above-mentioned memory can be a volatile memory (volatile memory), such as a random access memory (RAM); or a non-volatile memory (non-volatile memory), such as a read-only memory (ROM), a flash memory, a hard disk (HDD) or a solid-state drive (SSD); or a combination of the above-mentioned types of memory, and provide instructions and data to the processor.
[0193] In an exemplary embodiment, the present application also provides a computer-readable storage medium for storing a computer program.
[0194] Optionally, the computer-readable storage medium can be applied to any one of the methods in the embodiments of the present application, and the computer program enables the computer to execute the corresponding processes implemented by the processor in each method in the embodiments of the present application. For the sake of brevity, they are not repeated here.
[0195] Illustratively, an embodiment of the present application further provides a computer program product, including a computer program, which can be executed by a processor of an electronic device to complete the steps of any of the aforementioned methods.
[0196] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. The device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as: multiple units or components can be combined, or can be integrated into another system, or some features can be ignored or not executed. In addition, the coupling, direct coupling, or communication connection between the components shown or discussed can be through some interfaces, and the indirect coupling or communication connection of the devices or units can be electrical, mechanical or other forms.
[0197] The units described above as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units; some or all of the units may be selected according to actual needs to achieve the purpose of the scheme of this embodiment.
[0198] In addition, all functional units in the embodiments of the present invention may be integrated into one processing module, or each unit may be a separate unit, 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 hardware plus software functional units. A person of ordinary skill in the art may understand that all or part of the steps of implementing the above method embodiments may be completed by hardware related to program instructions, and the above program may be stored in a computer-readable storage medium, which, when executed, executes the steps of the above method embodiments; and the above storage medium includes various media that can store program codes, such as mobile storage devices, read-only memories (ROM), random access memories (RAM), magnetic disks or optical disks.
[0199] The methods disclosed in several method embodiments provided in this application can be arbitrarily combined without conflict to obtain new method embodiments.
[0200] The features disclosed in several product embodiments provided in this application can be arbitrarily combined without conflict to obtain new product embodiments.
[0201] The features disclosed in several method or device embodiments provided in this application can be arbitrarily combined without conflict to obtain new method embodiments or device embodiments.
[0202] The above description is only a specific implementation mode of the present invention, but the protection scope of the present invention is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed by the present invention, which should be covered by the protection scope of the present invention.
Claims
1. A method for configuring an accessory, the method comprising: Based on the attribute information of at least one first accessory and the first constraint condition related to the usage attribute of the accessory, using the target model, determining whether at least one set of configurations can be obtained; If at least one set of the configurations is available, a target configuration is determined from the at least one set of the configurations using a multi-objective optimization algorithm based on a second constraint condition related to the accessory sales attribute.
2. The method according to claim 1, further comprising: If at least one set of the configurations cannot be obtained, generating first information, wherein the first information is used to indicate a reason why no solution is generated; Based on the first information, adjusting the first constraint condition to obtain an adjusted first constraint condition; Based on the attribute information of at least one of the first accessory models and the adjusted first constraint condition, using the target model, it is determined whether at least one set of the configurations can be obtained.
3. The method according to claim 1, wherein the step of determining a target configuration from at least one set of configurations based on a second constraint condition related to the accessory sales attribute and using a multi-objective optimization algorithm comprises: Determine a constraint value corresponding to any one of the configurations based on the second constraint condition and attribute information of the accessories in any one of the configurations; Based on the constraint values corresponding to the at least one set of configurations, the at least one set of configurations is graded to obtain the grade corresponding to the at least one set of configurations; Based on the levels corresponding to the at least one set of the configurations, a preset number of target configurations are determined from the at least one set of the configurations.
4. The method according to claim 3, wherein determining a preset number of target configurations from at least one set of the configurations based on the levels corresponding to each of the at least one set of the configurations comprises: When the number of configurations of the first N levels is greater than the preset number and the number of configurations of the first N-1 levels is less than the preset number, determining the first crowding distance corresponding to at least one configuration of the Nth level based on the constraint value corresponding to each of the at least one configuration of the Nth level; The first crowding distances corresponding to at least one set of configurations of the Nth level are sorted in order from large to small; the first set of configurations ranked in front of the Nth level and the second set of configurations ranked in the first N-1 levels are used to obtain the preset number of target configurations.
5. The method according to claim 4, further comprising: When the number of sets of the top N levels of configurations is equal to the preset number of sets, the top N levels of configurations are used as the target configurations.
6. The method according to claim 4, wherein determining the first crowding distance corresponding to each of the at least one set of configurations at the Nth level based on the constraint value corresponding to each of the at least one set of configurations at the Nth level comprises: Sort the constraint values corresponding to the at least one set of configurations at the Nth level in ascending order; Set the first crowding distance of the configurations sorted at the beginning and end to infinity; Based on the constraint values of the front and rear set configurations and whether the weights between the constraint values are the same, the first crowding distance of the middle set configuration is determined.
7. The method according to claim 6, wherein the determining the first crowding distance of the middle set configuration based on the constraint values of the front and rear set configurations and whether the weights between the constraint values are the same comprises: When the constraint values include the selling price and the rate of return, if the weights of the constraint values are the same, the second crowding distance of the middle set configuration is obtained based on the selling prices of the front and rear set configurations; Based on the yields of the front and rear sets of configurations, the third crowding distance of the middle set of configurations is obtained; Based on the second crowding distance and the third crowding distance of the intermediate sleeve configuration, a first crowding distance of the intermediate sleeve configuration is obtained.
8. The method according to claim 6, wherein the determining the first crowding distance of the middle set configuration based on the constraint values of the front and rear set configurations and whether the weights between the constraint values are the same comprises: In the case where the constraint values include the selling price and the rate of return, if the weights of the constraint values are different, then based on the selling prices of the remaining configurations of at least one set of configurations after the Nth level sorting except the first and last configurations, and the preset selling price, a first reward and penalty coefficient of the selling price is obtained; Based on the total number of accessories and the number of key accessories included in the intermediate set configuration, a second reward and penalty coefficient including key accessories is obtained; Based on the selling prices of the front and rear set configurations, and the first reward and punishment coefficients and the second reward and punishment coefficients, a second crowding distance of the middle set configuration is obtained; Based on the yields of the front and back sets of configurations and the second reward and punishment coefficient, a third crowding distance of the middle set of configurations is obtained; The first crowding distance is obtained based on the second crowding distance and the third crowding distance of the intermediate sleeve configuration.
9. The method according to any one of claims 1 to 8, wherein the step of determining whether at least one set of configurations can be obtained based on the attribute information of at least one first accessory and the first constraint condition related to the usage attribute of the accessory using the target model comprises: The first constraint condition includes: a first sub-constraint condition directly related to accessory selection, and a second sub-constraint condition not directly related to accessory selection; Determine at least one second accessory from at least one first accessory based on the first sub-constraint and attribute information of at least one first accessory; Determine at least one third accessory from at least one second accessory based on the second sub-constraint and attribute information of at least one second accessory; Based on the attribute information of at least one of the third accessories and the second sub-constraint condition, using the target model, it is determined whether at least one set of the configurations can be obtained.
10. A device for configuring an accessory, the device comprising: A processing unit, configured to determine whether at least one set of configurations can be obtained by using a target model based on attribute information of at least one first accessory and a first constraint condition related to a usage attribute of the accessory; The processing unit is further configured to determine a target configuration from the at least one set of the configurations by using a multi-objective optimization algorithm based on a second constraint condition related to the sales attribute of the accessory if at least one set of the configurations is available.
