A method and device for generating an automobile accessory adaptation model
By perturbing positive samples and converting them into negative samples, the number and richness of negative samples are increased, which solves the problem of insufficient negative sample quantity in the existing technology and improves the accuracy and adaptation effect of the automotive parts adaptation model.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- BEIJING WODONG TIANJUN INFORMATION TECH CO LTD
- Filing Date
- 2023-06-13
- Publication Date
- 2026-04-14
AI Technical Summary
Existing technologies have a limited number of negative samples, resulting in low construction efficiency and difficulty in representing the characteristics of mismatch relationships, which affects the accuracy and effectiveness of automotive parts adaptation models.
By perturbing positive samples into negative samples to increase the number and richness of negative samples, and perturbing positive samples to increase the difference, training samples are generated for model training, thus generating an automotive parts adaptation model.
It improves the accuracy of automotive parts compatibility models, enabling accurate identification of a small number of incompatible relationships among a large number of compatibility relationships, thereby enhancing the model's accuracy and usability.
Smart Images

Figure CN116776147B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of computer technology, and in particular to a method and apparatus for generating an adaptation model for automotive parts. Background Technology
[0002] In the automotive manufacturing industry, different brands and models of cars require parts with different parameters. The current automotive parts adaptation solution is as follows: positive samples are constructed directly using the parameters of the adapted cars and parts, negative samples are constructed through manual collection and random construction, and the positive and negative samples are used to train the model to generate an automotive parts adaptation model. The automotive parts adaptation model is then used to identify the adaptation relationship between cars and parts.
[0003] In the process of realizing this invention, the inventors discovered at least the following problems in the prior art:
[0004] The limited number of negative samples leads to low construction efficiency and difficulty in representing the characteristics of mismatch relationships, thus affecting the accuracy and effectiveness of automotive parts adaptation models. Summary of the Invention
[0005] In view of this, embodiments of the present invention provide a method and apparatus for generating an automotive parts adaptation model. By perturbing positive samples into negative samples, the number of negative samples and construction efficiency can be increased, making the negative samples have the characteristics of mismatch relationships, thereby facilitating the construction of the automotive parts adaptation model and making the automotive parts adaptation model more accurate. It can more accurately identify the few mismatch relationships existing in a large number of adaptation relationships. Furthermore, by perturbing the positive samples, the difference of the positive samples is increased, thereby further improving the accuracy and usability of the automotive parts adaptation model.
[0006] To achieve the above objectives, according to one aspect of the present invention, a method for generating an automotive parts adaptation model is provided.
[0007] A method for generating an automotive parts adaptation model includes: responding to a request to generate an automotive parts adaptation model, acquiring at least one initial sample, each initial sample including parts information and sample labels, the sample labels including positive sample labels indicating that the vehicle and the parts are compatible and negative sample labels indicating that the vehicle and the parts are not compatible; selecting an initial sample corresponding to at least one positive sample label as a first initial sample, and for each first initial sample, perturbing the first initial sample according to a preset first perturbation rule, and modifying the sample label of the perturbed first initial sample to a negative sample label; generating training samples based on the perturbed first initial sample and a second initial sample other than the first initial sample in the initial samples, and training the model using the training samples to generate an automotive parts adaptation model.
[0008] Optionally, the step of perturbing the first initial sample according to a preset first perturbation rule includes: determining at least one first type of accessory parameter and at least one second type of accessory parameter based on the accessory information of the first initial sample; for each first type of accessory parameter, calculating an intermediate parameter value using a preset distribution function according to a preset perturbation threshold, and perturbing the parameter value corresponding to the first type of accessory parameter based on the intermediate parameter value; for each second type of accessory parameter, performing character segmentation on the parameter value of the second type of accessory parameter to perturble the parameter value corresponding to the second type of accessory parameter.
[0009] Optionally, before generating training samples based on the perturbated first initial sample and the second initial sample other than the first initial sample, the method further includes: perturbing each second initial sample according to a preset second perturbation rule.
[0010] Optionally, the step of perturbing the second initial sample according to a preset second perturbation rule includes: determining at least one first-type component parameter and at least one second-type component parameter based on the component information of the second initial sample; for each first-type component parameter, calculating an intermediate parameter value using a uniform distribution function according to a preset perturbation threshold, and perturbing the parameter value corresponding to the first-type component parameter based on the intermediate parameter value; for each second-type component parameter, performing character segmentation on the parameter value of the second-type component parameter to perturble the parameter value corresponding to the second-type component parameter.
[0011] Optionally, the step of perturbing the parameter value corresponding to the first type of component parameter based on the intermediate parameter value includes: obtaining the maximum and minimum parameter values based on the parameter values corresponding to the first type of component parameter; performing precision processing on the intermediate parameter value based on the precision of the parameter value corresponding to the first type of component parameter; calculating the perturbed parameter value based on the parameter value corresponding to the first type of component parameter, the precision-processed intermediate parameter value, the maximum parameter value, and the minimum parameter value, and modifying the parameter value corresponding to the first type of component parameter to the perturbed parameter value.
[0012] Optionally, the step of performing character segmentation on the parameter values of the second type of accessory parameters to perturb the parameter values corresponding to the second type of accessory parameters includes: for each second type of accessory parameter, if the parameter value corresponding to the second type of accessory parameter includes a specific character, segmenting the parameter value corresponding to the second type of accessory parameter using the specific character to generate multiple segmentation results, and randomly modifying the parameter value corresponding to the second type of accessory parameter to any segmentation result.
[0013] Optionally, determining at least one first type of accessory parameter includes: selecting all first type of accessory parameters from the accessory information and determining the total number of first type of accessory parameters; calculating the number of first type of accessory parameters to be selected based on the total number of first type of accessory parameters; and randomly selecting a corresponding number of first type of accessory parameters from all first type of accessory parameters according to the number of first type of accessory parameters to be selected.
[0014] According to another aspect of the present invention, an apparatus for generating an automotive parts adaptation model is provided.
[0015] An apparatus for generating an automotive parts adaptation model includes: an initial sample acquisition module, configured to acquire at least one initial sample in response to a request to generate an automotive parts adaptation model, each initial sample including parts information and sample labels, the sample labels including positive sample labels indicating that the vehicle and the parts are compatible and negative sample labels indicating that the vehicle and the parts are not compatible; a perturbation processing module, configured to select an initial sample corresponding to at least one positive sample label as a first initial sample, and for each first initial sample, perturb the first initial sample according to a preset first perturbation rule, and modify the sample label of the perturbated first initial sample to a negative sample label; and an automotive parts adaptation model generation module, configured to generate training samples based on the perturbated first initial sample and a second initial sample other than the first initial sample in the initial samples, and train the model using the training samples to generate an automotive parts adaptation model.
[0016] Optionally, the perturbation processing module is further configured to: determine at least one first-type accessory parameter and at least one second-type accessory parameter based on the accessory information of the first initial sample; for each first-type accessory parameter, calculate an intermediate parameter value using a preset distribution function according to a preset perturbation threshold, and perturb the parameter value corresponding to the first-type accessory parameter based on the intermediate parameter value; for each second-type accessory parameter, perform character segmentation on the parameter value of the second-type accessory parameter to perturb the parameter value corresponding to the second-type accessory parameter.
[0017] Optionally, the perturbation processing module is further configured to: for each second initial sample, perform perturbation processing on the second initial sample according to a preset second perturbation rule.
[0018] Optionally, the perturbation processing module is further configured to: determine at least one first-type component parameter and at least one second-type component parameter based on the component information of the second initial sample; for each first-type component parameter, calculate using a uniform distribution function according to a preset perturbation threshold to obtain an intermediate parameter value, and perturb the parameter value corresponding to the first-type component parameter based on the intermediate parameter value; for each second-type component parameter, perform character segmentation on the parameter value of the second-type component parameter to perturb the parameter value corresponding to the second-type component parameter.
[0019] Optionally, the disturbance processing module is further configured to: obtain the maximum and minimum parameter values based on the parameter values corresponding to the first type of component parameters; perform precision processing on the intermediate parameter values based on the precision of the parameter values corresponding to the first type of component parameters; calculate the disturbed parameter values based on the parameter values corresponding to the first type of component parameters, the precision-processed intermediate parameter values, the maximum parameter values, and the minimum parameter values, and modify the parameter values corresponding to the first type of component parameters to the disturbed parameter values.
[0020] Optionally, the disturbance processing module is further configured to: for each accessory parameter of the second type, if the parameter value corresponding to the accessory parameter of the second type includes a specific character, segment the parameter value corresponding to the accessory parameter of the second type using the specific character to generate multiple segmentation results, and randomly modify the parameter value corresponding to the accessory parameter of the second type to any segmentation result.
[0021] Optionally, the disturbance processing module is further configured to: select all first-type accessory parameters from the accessory information and determine the total number of first-type accessory parameters; calculate the number of first-type accessory parameters to be selected based on the total number of first-type accessory parameters; and randomly select a corresponding number of first-type accessory parameters from all first-type accessory parameters according to the number of first-type accessory parameters to be selected.
[0022] According to another aspect of the present invention, an electronic device is provided.
[0023] An electronic device includes: one or more processors; and a memory for storing one or more programs, which, when executed by the one or more processors, cause the one or more processors to implement the method for generating an automotive parts adaptation model provided in the embodiments of the present invention.
[0024] According to another aspect of the present invention, a computer-readable medium is provided.
[0025] A computer-readable medium having a computer program stored thereon, which, when executed by a processor, implements the method for generating an automotive parts adaptation model provided in embodiments of the present invention.
[0026] An embodiment of the above invention has the following advantages or beneficial effects: In response to a request to generate an automotive parts adaptation model, at least one initial sample is obtained. Each initial sample includes parts information and sample labels. The sample labels include positive sample labels indicating vehicle-part compatibility and negative sample labels indicating vehicle-part incompatibility. At least one initial sample corresponding to a positive sample label is selected as a first initial sample. For each first initial sample, a perturbation process is performed according to a preset first perturbation rule, and the sample label of the perturbated first initial sample is modified to a negative sample label. Based on the perturbated first initial sample... The technical solution involves generating training samples from the initial samples and the second initial samples (excluding the first initial sample), and then training the model using these training samples to generate an automotive parts adaptation model. By perturbing positive samples into negative samples, the number of negative samples and the construction efficiency can be increased, giving the negative samples characteristics of mismatch relationships. This facilitates the construction of the automotive parts adaptation model, resulting in higher accuracy and the ability to accurately identify a small number of mismatch relationships among a large number of adaptation relationships. Furthermore, by perturbing the positive samples, the difference between them is increased, thereby further improving the accuracy and effectiveness of the automotive parts adaptation model.
[0027] The further effects of the aforementioned unconventional alternative methods will be explained below in conjunction with specific implementation methods. Attached Figure Description
[0028] The accompanying drawings are provided to better understand the invention and are not intended to unduly limit the scope of the invention. Wherein:
[0029] Figure 1 This is a schematic diagram of the main steps of a method for generating an automotive parts adaptation model according to an embodiment of the present invention;
[0030] Figure 2 This is a flowchart illustrating a method for generating an automotive parts adaptation model according to an embodiment of the present invention.
[0031] Figure 3 This is a schematic diagram of the main modules of an apparatus for generating an automotive parts adaptation model according to an embodiment of the present invention.
[0032] Figure 4 This is an exemplary system architecture diagram in which embodiments of the present invention can be applied;
[0033] Figure 5 This is a schematic diagram of the structure of a computer system suitable for implementing terminal devices or servers of the present invention. Detailed Implementation
[0034] The following description, in conjunction with the accompanying drawings, illustrates exemplary embodiments of the present invention, including various details to aid understanding. These details should be considered merely exemplary. Therefore, those skilled in the art will recognize that various changes and modifications can be made to the embodiments described herein without departing from the scope and spirit of the invention. Similarly, for clarity and brevity, descriptions of well-known functions and structures are omitted in the following description.
[0035] It should be noted that the collection, gathering, updating, analysis, processing, use, transmission, and storage of user personal information involved in the technical solution of this invention all comply with the provisions of relevant laws and regulations, are used for legitimate purposes, and do not violate public order and good morals. Necessary measures are taken to prevent unauthorized access to user personal information data and to safeguard user personal information security, network security, and national security.
[0036] In the automotive industry, different parts have different parameters and are compatible with different car brands and models. Therefore, a single part may be compatible with thousands of cars, and a single car may have thousands of compatible parts. Purchasing the wrong part can lead to installation failure or the part malfunctioning; installing the wrong part can affect the normal operation and lifespan of the car. Currently, parts manufacturers provide a list of compatible models, but due to the large number of cars requiring compatibility, the compatibility relationships provided by manufacturers are not comprehensive. It is necessary to identify and judge the compatibility relationships between cars and parts. Currently, among the compatibility relationships provided by parts manufacturers, there may be a small number that are actually incompatible. Therefore, it is necessary to identify these incompatible relationships from the large number of compatibility relationships to avoid installation problems or car damage caused by incompatibility between the purchased parts and the user's car.
[0037] In existing technologies, positive samples are constructed by directly using the parameters of the compatible car and parts. However, since the parameters of parts compatible with different brands of the same car vary slightly, this method of constructing positive samples is ineffective. Negative samples are constructed through random construction and manual collection. Random construction involves randomly selecting incompatible cars and parts and constructing negative samples based on their respective parameters. While the parameters of specific parts compatible with a car do not change significantly, the parameters of randomly selected parts vary considerably. Therefore, negative samples constructed in this way are not representative and cannot uncover the characteristics of the few incompatible parts corresponding to the few incompatible relationships in the compatibility relationships. Manual collection uses manually collected incompatible relationships as negative samples. Since there are very few actual incompatible relationships among a large number of compatibility relationships, and only a few or a dozen incompatible relationships may exist among the thousands of car models compatible with a single part, it is difficult and impractical to accumulate enough negative samples to train the model over a long period of time.
[0038] This invention proposes a novel method for constructing training samples for the compatibility relationships between automobiles and their parts. By perturbing the parameters of the parts with different types and degrees, and combining this with the parameters of the automobiles to which the parts are compatible, positive and negative samples are obtained for training the model. Randomly constructed mismatch relationships and collected mismatch relationships are also used as negative samples to obtain training data for model training. This results in a model that converges faster and has higher accuracy, and can more accurately identify a small number of mismatch relationships among a large number of compatibility relationships.
[0039] Figure 1 This is a schematic diagram illustrating the main steps of a method for generating an automotive parts adaptation model according to an embodiment of the present invention.
[0040] like Figure 1 As shown, the method for generating an automotive parts adaptation model according to an embodiment of the present invention mainly includes the following steps S101 to S103.
[0041] Step S101: In response to the request to generate the vehicle accessory adaptation model, obtain at least one initial sample. Each initial sample includes accessory information and sample labels. Sample labels may include positive sample labels indicating that the vehicle and the accessory are compatible and negative sample labels indicating that the vehicle and the accessory are not compatible.
[0042] Specifically, the initial sample can include vehicle information, parts information, and sample labels. Vehicle information can include parameters such as brand, model, year, and engine model. Parts can include tires, oil filters, windshield wipers, spark plugs, etc. Different parts have different parts information; for example, battery parts information includes parameters such as cold start current, rated capacity, and battery length. Compatibility: Whether the parts can be installed on the vehicle.
[0043] The types of initial samples can include: (1) initial samples of cars and parts provided by parts manufacturers that are compatible with the cars and parts, with the sample label being a positive sample label; (2) initial samples of cars and parts that are not compatible with the cars and parts collected manually, with the sample label being a negative sample label; (3) initial samples of cars and parts that are not compatible with the cars and parts randomly constructed, with the sample label being a negative sample label. Among them, the initial sample of type (1) can be selected with probability P1, the initial sample of type (2) can be selected with probability P2, and the initial sample of type (3) can be selected with probability P3, and P1+P2+P3=1. P1, P2, and P3 can be determined based on manual experience, and it is necessary to ensure that P1+P2+P3=1. Generally speaking, P1=0.9, P2=0.05, and P3=0.05 is sufficient. By using P1, P2, and P3, the number of different types of samples can be limited to avoid the problem of too many samples in type (2) and type (3) and too few samples in type (1), which would lead to a deterioration in model performance.
[0044] Step S102: Select an initial sample corresponding to at least one positive sample label as the first initial sample, and for each first initial sample, perform perturbation processing on the first initial sample according to the preset first perturbation rule, and modify the sample label of the perturbation-processed first initial sample to a negative sample label.
[0045] Specifically, for each initial sample with a positive sample label, it can be kept as a positive sample label with probability P4, and modified to a negative sample label with probability P5, and used as the first initial sample. The above P4+P5=1, so that at least one initial sample corresponding to a positive sample label is selected as the first initial sample.
[0046] In this embodiment of the invention, since most of the initial samples are positive samples, in order to maintain the balance between positive and negative samples, a certain number of positive samples need to be converted into negative samples to avoid having too many positive samples and too few negative samples, resulting in all samples available for model training being positive samples, making model training impossible. Furthermore, although the samples of types (2) and (3) mentioned above are also negative samples, the number of these negative samples is too small, and the richness of these negative samples is poor. Therefore, converting a certain number of positive samples into negative samples can increase the number and richness of negative samples.
[0047] In one embodiment, perturbing the first initial sample according to a preset first perturbation rule may include: determining at least one first-type component parameter and at least one second-type component parameter based on the component information of the first initial sample; for each first-type component parameter, calculating an intermediate parameter value using a preset distribution function according to a preset perturbation threshold, and perturbing the parameter value corresponding to the first-type component parameter based on the intermediate parameter value; for each second-type component parameter, performing character segmentation on the parameter value of the second-type component parameter to perturble the parameter value corresponding to the second-type component parameter. The preset distribution function may be a Γ-distribution distribution function, the first type may be a numerical type, such as the length, width, and height of the component, and the second type may be a character type, such as the brand and part number of the component.
[0048] Specifically, for each component parameter of a numerical type selected in the first initial sample, a perturbation threshold T is determined empirically. For example, for a certain car model, a battery with a length ranging from 150 to 250 mm can be installed on that car; therefore, the perturbation threshold for this parameter can be (250-150) / 2 = 50. Based on the perturbation threshold T, the intermediate parameter value v... mid The calculation formula can be:
[0049]
[0050] Where Γ is the Γ distribution, and random() generates random numbers uniformly distributed within [0, 1]. The above formula represents the intermediate parameter value v. mid There is a 50% probability of taking the value T+Γ, and a 50% probability of taking the value -(T+Γ). The distribution function pdf(x) of the Γ distribution is as follows:
[0051]
[0052] Wherein, Γ(α) is the Γ function, which is defined as follows when α is a positive integer: Γ(α)=(α-1)!, α and β are parameters, "!" is factorial, and α and β can take different values according to experience. Preferably, α=2, β=2, and the numerical range of the Γ distribution is (0,+∞).
[0053] The embodiments of the present invention use the Γ distribution for perturbation processing. After perturbation, the probability density function of the data increases from 0, reaches a peak, and then gradually decreases. This can overcome the shortcomings of too little negative sample data in the adaptation relationship between automobiles and parts, and the fact that randomly constructed negative samples cannot approach the real adaptation error relationship.
[0054] In one embodiment, before generating training samples based on the perturbated first initial sample and the second initial sample (excluding the first initial sample), the method may further include: perturbing the second initial sample according to a preset second perturbation rule, which may include: determining at least one first-type component parameter and at least one second-type component parameter based on the component information of the second initial sample; for each first-type component parameter, calculating an intermediate parameter value using a uniform distribution function according to a preset perturbation threshold, and perturbing the parameter value corresponding to the first-type component parameter based on the intermediate parameter value; for each second-type component parameter, performing character segmentation on the parameter value of the second-type component parameter to perturble the parameter value corresponding to the second-type component parameter. Here, the first type can be a numeric type, and the second type can be a character type.
[0055] Specifically, for each component parameter of a numerical type selected in the second initial sample, a perturbation threshold T is determined empirically, and based on the perturbation threshold T,
[0056] v mid = random_uniform(-T,T);
[0057] Here, random_uniform(-T,T) represents a random number that is uniformly distributed within the range [-T,T].
[0058] In one embodiment, determining at least one first type of accessory parameter may include: selecting all first type of accessory parameters from accessory information and determining the total number of first type of accessory parameters; calculating the number of first type of accessory parameters to be selected based on the total number of first type of accessory parameters; and randomly selecting a corresponding number of first type of accessory parameters from all first type of accessory parameters according to the number of first type of accessory parameters to be selected.
[0059] Specifically, for all numerical component parameters included in the component information, k component parameters are randomly selected for perturbation. Assuming there are a total of n1 numerical component parameters, k is calculated as follows:
[0060]
[0061] Here, int represents integer division.
[0062] In this embodiment of the invention, when perturbing the data, not all numerical parameters are perturbed, but some numerical parameters are randomly perturbed while the remaining numerical parameters are not perturbed. However, the numerical parameters and the range of perturbation are different each time. This results in a larger range of sample parameters, richer parameters, and better avoidance of the model falling into overfitting.
[0063] In one embodiment, perturbing the parameter value corresponding to the first type of component parameter based on the intermediate parameter value may include: obtaining the maximum and minimum parameter values based on the parameter values corresponding to the first type of component parameter; performing precision processing on the intermediate parameter value based on the precision of the parameter value corresponding to the first type of component parameter; calculating the perturbed parameter value based on the parameter value corresponding to the first type of component parameter, the precision-processed intermediate parameter value, the maximum parameter value, and the minimum parameter value, and modifying the parameter value corresponding to the first type of component parameter to the perturbed parameter value.
[0064] Specifically, the intermediate parameter value v mid Perform precision processing to obtain the intermediate parameter value v after precision processing, that is, if the current parameter v in If it is an integer, then the intermediate parameter value v mid Rounding down, if the current parameter v in For a floating-point number containing 1 significant bit, then for the intermediate parameter value v mid Retain one decimal place to ensure that the precision of the perturbed data is consistent with that of the initial data. The perturbed parameter value v out The calculation formula can be:
[0065]
[0066] Wherein, min and max represent the maximum and minimum parameter values corresponding to the accessory parameter when adapted to the corresponding vehicle information, respectively.
[0067] In one embodiment, performing character segmentation on the parameter values of the second type of accessory parameters to perturb the parameter values corresponding to the second type of accessory parameters may include: for each second type of accessory parameter, if the parameter value corresponding to the second type of accessory parameter includes a specific character, segmenting the parameter value corresponding to the second type of accessory parameter by the specific character to generate multiple segmentation results, and randomly modifying the parameter value corresponding to the second type of accessory parameter to any segmentation result.
[0068] Specifically, for all character-type accessory parameters, it is determined whether the parameter value contains a specific character. Specific characters can include semicolons (";"), forward slashes (" / "), and spaces ("). If the parameter value for a numeric accessory parameter contains a specific character, then the specific character is used to split each parameter value, and a random split result is selected as the updated parameter value. For example, if the parameter value is "abc / def;gh", then splitting it with semicolons (";") and forward slashes (" / ") will result in "abc", "def", and "gh", and a random split result, such as "def", is selected as the processed parameter value. If the parameter value for a numeric accessory parameter does not contain the specific character, then no processing is required for that parameter value.
[0069] Step S103: Based on the first initial sample after perturbation and the second initial sample other than the first initial sample in the initial samples, generate training samples, and train the model using the training samples to generate an automotive parts adaptation model.
[0070] Specifically, for the first initial sample, training samples are generated using vehicle information, modified sample labels, and perturbed part information; for the second initial sample, training samples are generated using vehicle information, sample labels, and perturbed part information. The vehicle and part information from the training samples are used as input, and the sample labels are used as the training target to train the model and generate a vehicle part adaptation model.
[0071] Figure 2 This is a flowchart illustrating a method for generating an automotive parts adaptation model according to an embodiment of the present invention.
[0072] like Figure 2 As shown, in one embodiment, at least one initial sample is obtained. Each initial sample includes accessory information and a sample label. The sample label includes a positive sample label indicating that the vehicle and the accessory are compatible, and a negative sample label indicating that the vehicle and the accessory are not compatible. The initial sample corresponding to at least one positive sample label is selected as the first initial sample, and all initial samples other than the first initial sample are selected as the second initial samples. For each first initial sample, the sample label is modified to a negative sample label. A preset distribution function is used to perturb the numerical accessory parameters, and character-type accessory parameters are segmented using specific characters to obtain the perturbated first initial sample. For each second initial sample, a uniform distribution function is used to perturb the numerical accessory parameters, and character-type accessory parameters are segmented using specific characters to obtain the perturbated second initial sample. Training samples are generated based on the perturbated initial samples, and the model is trained using the training samples to generate a vehicle accessory compatibility model.
[0073] Figure 3 This is a schematic diagram of the main modules of an apparatus for generating an automotive parts adaptation model according to an embodiment of the present invention.
[0074] like Figure 3 As shown, the automotive parts adaptation model generation device 300 of one embodiment of the present invention mainly includes: an initial sample acquisition module 301, a disturbance processing module 302, and an automotive parts adaptation model generation module 303.
[0075] The initial sample acquisition module 301 is used to acquire at least one initial sample in response to the generation request of the automotive parts adaptation model. Each initial sample includes parts information and sample labels. The sample labels include positive sample labels indicating that the car and the parts are compatible and negative sample labels indicating that the car and the parts are not compatible.
[0076] The perturbation processing module 302 is used to select an initial sample corresponding to at least one positive sample label as a first initial sample, and for each first initial sample, to perform perturbation processing on the first initial sample according to a preset first perturbation rule, and to modify the sample label of the perturbation-processed first initial sample to a negative sample label.
[0077] The automotive parts adaptation model generation module 303 is used to generate training samples based on the first initial sample after perturbation processing and the second initial sample other than the first initial sample in the initial samples, and to train the model using the training samples to generate an automotive parts adaptation model.
[0078] In one embodiment, the perturbation processing module 302 is specifically configured to: determine at least one first-type accessory parameter and at least one second-type accessory parameter based on the accessory information of the first initial sample; for each first-type accessory parameter, calculate an intermediate parameter value using a preset distribution function according to a preset perturbation threshold, and perturb the parameter value corresponding to the first-type accessory parameter based on the intermediate parameter value; for each second-type accessory parameter, perform character segmentation on the parameter value of the second-type accessory parameter to perturb the parameter value corresponding to the second-type accessory parameter.
[0079] In one embodiment, the perturbation processing module 302 is specifically used to: for each second initial sample, perform perturbation processing on the second initial sample according to a preset second perturbation rule.
[0080] In one embodiment, the perturbation processing module 302 is specifically configured to: determine at least one first-type accessory parameter and at least one second-type accessory parameter based on the accessory information of the second initial sample; for each first-type accessory parameter, calculate using a uniform distribution function according to a preset perturbation threshold to obtain an intermediate parameter value, and perturb the parameter value corresponding to the first-type accessory parameter based on the intermediate parameter value; for each second-type accessory parameter, perform character segmentation processing on the parameter value of the second-type accessory parameter to perturb the parameter value corresponding to the second-type accessory parameter.
[0081] In one embodiment, the disturbance processing module 302 is specifically used to: obtain the maximum and minimum parameter values based on the parameter values corresponding to the first type of component parameters; perform precision processing on the intermediate parameter values based on the precision of the parameter values corresponding to the first type of component parameters; calculate the disturbed parameter values based on the parameter values corresponding to the first type of component parameters, the precision-processed intermediate parameter values, the maximum parameter values, and the minimum parameter values, and modify the parameter values corresponding to the first type of component parameters to the disturbed parameter values.
[0082] In one embodiment, the disturbance processing module 302 is specifically used to: for each second type of accessory parameter, if the parameter value corresponding to the second type of accessory parameter includes a specific character, to segment the parameter value corresponding to the second type of accessory parameter by the specific character, generate multiple segmentation results, and randomly modify the parameter value corresponding to the second type of accessory parameter to any segmentation result.
[0083] In one embodiment, the disturbance processing module 302 is specifically used to: select all first-type accessory parameters from the accessory information and determine the total number of first-type accessory parameters; calculate the number of first-type accessory parameters to be selected based on the total number of first-type accessory parameters; and randomly select a corresponding number of first-type accessory parameters from all first-type accessory parameters according to the number of first-type accessory parameters to be selected.
[0084] Furthermore, the specific implementation details of the vehicle parts adaptation model generation device in this embodiment of the invention have been described in detail in the above-described vehicle parts adaptation model generation method, so they will not be repeated here.
[0085] Figure 4 An exemplary system architecture 400 is shown, in which the method or apparatus for generating an automotive parts adaptation model according to embodiments of the present invention can be applied.
[0086] like Figure 4As shown, system architecture 400 may include terminal devices 401, 402, and 403, a network 404, and a server 405. Network 404 serves as the medium for providing communication links between terminal devices 401, 402, and 403 and server 405. Network 404 may include various connection types, such as wired or wireless communication links, or fiber optic cables, etc.
[0087] Users can use terminal devices 401, 402, and 403 to interact with server 405 via network 404 to receive or send messages, etc. Various communication client applications can be installed on terminal devices 401, 402, and 403, such as automotive parts adaptation applications, model training applications, sample construction applications, instant messaging tools, email clients, social media platform software, etc. (for example only).
[0088] Terminal devices 401, 402, and 403 can be various electronic devices with displays that support web browsing, including but not limited to smartphones, tablets, laptops, and desktop computers.
[0089] Server 405 can be a server providing various services, such as a backend management server supporting automotive parts adaptation websites browsed by users using terminal devices 401, 402, and 403 (for example only). The backend management server can respond to received data such as requests to generate automotive parts adaptation models by obtaining at least one initial sample. Each initial sample includes parts information and sample labels. The sample labels include positive sample labels indicating car-part compatibility and negative sample labels indicating incompatibility. It selects at least one initial sample corresponding to a positive sample label as a first initial sample. For each first initial sample, it perturbs it according to a preset first perturbation rule and modifies the sample label of the perturbated first initial sample to a negative sample label. Based on the perturbated first initial sample and second initial samples other than the first initial sample, it generates training samples and trains the model using these training samples to generate an automotive parts adaptation model. The processing results (e.g., the generated automotive parts adaptation model – for example only) are then fed back to the terminal device.
[0090] It should be noted that the method for generating the automotive parts adaptation model provided in this embodiment of the invention is generally executed by the server 405, and correspondingly, the device for generating the automotive parts adaptation model is generally located in the server 405.
[0091] It should be understood that Figure 4 The number of terminal devices, networks, and servers shown is merely illustrative. Depending on implementation needs, any number of terminal devices, networks, and servers can be included.
[0092] The following is for reference. Figure 5 It shows a schematic diagram of the structure of a computer system 500 suitable for implementing terminal devices or servers of the present invention. Figure 5 The terminal device or server shown is merely an example and should not impose any limitation on the functionality and scope of use of the embodiments of the present invention.
[0093] like Figure 5 As shown, the computer system 500 includes a central processing unit (CPU) 501, which can perform various appropriate actions and processes based on programs stored in read-only memory (ROM) 502 or programs loaded from storage section 508 into random access memory (RAM) 503. The RAM 503 also stores various programs and data required for the operation of the system 500. The CPU 501, ROM 502, and RAM 503 are interconnected via a bus 504. An input / output (I / O) interface 505 is also connected to the bus 504.
[0094] The following components are connected to I / O interface 505: an input section 506 including a keyboard, mouse, etc.; an output section 507 including a cathode ray tube (CRT), liquid crystal display (LCD), etc., and speakers, 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, modem, etc. The communication section 509 performs communication processing via a network such as the Internet. A drive 510 is also connected to I / O interface 505 as needed. A removable medium 511, such as a disk, optical disk, magneto-optical disk, semiconductor memory, etc., is installed on drive 510 as needed so that computer programs read from it can be installed into storage section 508 as needed.
[0095] In particular, according to the embodiments disclosed in this invention, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments disclosed in this invention include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via communication section 509, and / or installed from removable medium 511. When the computer program is executed by central processing unit (CPU) 501, it performs the functions defined above in the system of this invention.
[0096] It should be noted that the computer-readable medium shown in this invention can be a computer-readable signal medium or a computer-readable storage medium, or any combination thereof. A computer-readable storage medium can be, for example,—but not limited to—an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of a computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this invention, a computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. In this invention, a computer-readable signal medium can include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. Computer-readable signal media can also be any computer-readable medium other than computer-readable storage media, which can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium can be transmitted using any suitable medium, including but not limited to: wireless, wire, optical fiber, RF, etc., or any suitable combination thereof.
[0097] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of the present invention. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in a block diagram or flowchart, and combinations of blocks in a block diagram or flowchart, may be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.
[0098] The modules described in the embodiments of the present invention can be implemented in software or hardware. The described modules can also be housed in a processor; for example, a processor may be described as including an initial sample acquisition module, a perturbation processing module, and an automotive parts adaptation model generation module. The names of these modules do not necessarily limit the module itself; for example, the initial sample acquisition module may also be described as "a module for acquiring at least one initial sample in response to a request to generate an automotive parts adaptation model."
[0099] In another aspect, the present invention also provides a computer-readable medium, which may be included in the device described in the above embodiments; or it may exist independently and not assembled into the device. The computer-readable medium carries one or more programs, which, when executed by the device, cause the device to include: in response to a request to generate an automotive parts adaptation model, acquiring at least one initial sample, each initial sample including parts information and sample labels, the sample labels including positive sample labels indicating vehicle-part compatibility and negative sample labels indicating vehicle-part incompatibility; selecting an initial sample corresponding to at least one positive sample label as a first initial sample, and for each first initial sample, perturbing the first initial sample according to a preset first perturbation rule, and modifying the sample label of the perturbed first initial sample to a negative sample label; generating training samples based on the perturbed first initial sample and second initial samples other than the first initial sample, and training the model using the training samples to generate an automotive parts adaptation model.
[0100] According to the technical solution of the present invention, in response to the request to generate an automotive parts adaptation model, at least one initial sample is obtained. Each initial sample includes parts information and sample labels. The sample labels include positive sample labels indicating that the vehicle and the parts are compatible and negative sample labels indicating that the vehicle and the parts are not compatible. At least one initial sample corresponding to a positive sample label is selected as a first initial sample. For each first initial sample, the first initial sample is perturbed according to a preset first perturbation rule, and the sample label of the perturbed first initial sample is modified to a negative sample label. Based on the perturbed first initial sample and a second initial sample other than the first initial sample in the initial samples, training samples are generated, and the model is trained using the training samples to generate an automotive parts adaptation model. By perturbing positive samples into negative samples, the number of negative samples and construction efficiency can be increased, giving the negative samples the characteristics of mismatch relationships. This facilitates the construction of automotive parts adaptation models, resulting in higher accuracy and the ability to accurately identify a small number of mismatch relationships among a large number of adaptation relationships. Furthermore, by perturbing positive samples, the variability of positive samples is increased, thereby further improving the accuracy and effectiveness of automotive parts adaptation models.
[0101] The specific embodiments described above do not constitute a limitation on the scope of protection of this invention. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can occur depending on design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this invention should be included within the scope of protection of this invention.
Claims
1. A method for generating an adaptation model for automotive parts, characterized in that, include: In response to the request to generate an automotive parts adaptation model, at least one initial sample is obtained. Each initial sample includes parts information and sample labels. The sample labels include positive sample labels indicating that the vehicle and the parts are compatible and negative sample labels indicating that the vehicle and the parts are not compatible. Select an initial sample corresponding to at least one positive sample label as the first initial sample, and for each first initial sample, perform perturbation processing on the first initial sample according to a preset first perturbation rule, and modify the sample label of the perturbation-processed first initial sample to a negative sample label; Based on the first initial sample after perturbation processing and the second initial sample other than the first initial sample in the initial sample, training samples are generated, and the model is trained using the training samples to generate an automotive parts adaptation model. The step of perturbing the first initial sample according to a preset first perturbation rule includes: determining at least one first type of component parameter and at least one second type of component parameter based on the component information of the first initial sample; for each first type of component parameter, calculating an intermediate parameter value using a preset distribution function according to a preset perturbation threshold, and perturbing the parameter value corresponding to the first type of component parameter based on the intermediate parameter value; for each second type of component parameter, performing character segmentation on the parameter value of the second type of component parameter to perturble the parameter value corresponding to the second type of component parameter.
2. The method according to claim 1, characterized in that, Before generating training samples based on the perturbated first initial sample and the second initial sample other than the first initial sample, the method further includes: For each of the second initial samples, the second initial samples are perturbed according to a preset second perturbation rule.
3. The method according to claim 2, characterized in that, The step of perturbing the second initial sample according to a preset second perturbation rule includes: Based on the accessory information of the second initial sample, determine at least one accessory parameter of the first type and at least one accessory parameter of the second type; For each accessory parameter of the first type, an intermediate parameter value is calculated using a uniform distribution function according to a preset disturbance threshold, and the parameter value corresponding to the accessory parameter of the first type is disturbed based on the intermediate parameter value. For each accessory parameter of the second type, the parameter value of the accessory parameter of the second type is split into characters to perturb the parameter value corresponding to the accessory parameter of the second type.
4. The method according to claim 1 or 3, characterized in that, The step of perturbing the parameter values corresponding to the first type of accessory parameters based on the intermediate parameter values includes: The maximum and minimum parameter values are obtained based on the parameter values corresponding to the parameters of the first type of accessory. The intermediate parameter values are processed to improve their accuracy based on the accuracy of the parameter values corresponding to the first type of accessory parameters. The disturbed parameter values are calculated based on the parameter values corresponding to the first type of accessory parameters, the intermediate parameter values after precision processing, the maximum parameter value, and the minimum parameter value. The parameter values corresponding to the first type of accessory parameters are then modified to the disturbed parameter values.
5. The method according to claim 1 or 3, characterized in that, The step of performing character segmentation on the parameter values of the second type of accessory parameters to perturb the parameter values corresponding to the second type of accessory parameters includes: For each accessory parameter of the second type, if the parameter value corresponding to the accessory parameter of the second type includes a specific character, the parameter value corresponding to the accessory parameter of the second type is segmented by the specific character to generate multiple segmentation results, and the parameter value corresponding to the accessory parameter of the second type is randomly modified to any segmentation result.
6. The method according to claim 1 or 3, characterized in that, The determination of at least one first type of accessory parameter includes: Select all accessory parameters of the first type from the accessory information, and determine the total number of accessory parameters of the first type; Based on the total number of accessory parameters of the first type, calculate the number of accessory parameters of the first type to be selected; Based on the number of first-type accessory parameters to be selected, a corresponding number of first-type accessory parameters are randomly selected from all first-type accessory parameters.
7. A device for generating an adaptation model for automotive parts, characterized in that, include: An initial sample acquisition module is used to acquire at least one initial sample in response to a request to generate an automotive parts adaptation model. Each initial sample includes parts information and sample labels. The sample labels include positive sample labels indicating that the vehicle and the parts are compatible and negative sample labels indicating that the vehicle and the parts are not compatible. The perturbation processing module is used to select an initial sample corresponding to at least one positive sample label as a first initial sample, and for each first initial sample, to perform perturbation processing on the first initial sample according to a preset first perturbation rule, and to modify the sample label of the perturbation-processed first initial sample to a negative sample label. The automotive parts adaptation model generation module is used to generate training samples based on the first initial sample after perturbation processing and the second initial sample other than the first initial sample in the initial sample, and to train the model using the training samples to generate an automotive parts adaptation model. The perturbation processing module is further configured to: determine at least one first-type component parameter and at least one second-type component parameter based on the component information of the first initial sample; for each first-type component parameter, calculate an intermediate parameter value using a preset distribution function according to a preset perturbation threshold, and perturb the parameter value corresponding to the first-type component parameter based on the intermediate parameter value; for each second-type component parameter, perform character segmentation on the parameter value of the second-type component parameter to perturb the parameter value corresponding to the second-type component parameter.
8. An electronic device, characterized in that, include: One or more processors; 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 as described in any one of claims 1-6.
9. A computer-readable medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the method as described in any one of claims 1-6.
Citation Information
Patent Citations
Method and device for training classification model and method and device for identifying private data
CN114398680A