Model adjustment method, vehicle data query method and device and vehicle

By determining the dynamic target rank in LORA model adjustment and generating the target low rank adaptation matrix, the problem of low model adjustment efficiency and inability to meet the diverse query needs is solved, and more efficient model adjustment and better query capabilities are achieved.

CN120045933APending Publication Date: 2025-05-27GREAT WALL MOTOR CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411329882.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-24
Publication Date
2025-05-27

AI Technical Summary

Technical Problem

When adjusting the model using the low-rank adaptation matrix (LORA), the model's adjustment efficiency is low and cannot meet the diverse query needs, resulting in repeated adjustments to the initial model.

Method used

By obtaining the initial model and sample query data, the target rank of the initial low-rank adaptation matrix in the initial model is determined, and the target low-rank adaptation matrix is ​​obtained based on the target rank and the initial low-rank adaptation matrix, and the initial model is adjusted through the target low-rank adaptation matrix to obtain the adjusted initial model.

Benefits of technology

The adjustment efficiency of the model is improved, so that the adjusted initial model can meet the diverse query needs, reduce the number of adjustments to the initial model, and avoid the problem that the rank of the initial low-rank adapter matrix is ​​fixed and the sample query data does not match.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120045933A_ABST
    Figure CN120045933A_ABST
Patent Text Reader

Abstract

The invention provides a model adjustment method, a vehicle data query method and device and a vehicle, and relates to the technical field of computers. The method comprises the steps of obtaining an initial model and sample query data; wherein the initial model is used for representing a model trained based on sample query data; based on the sample query data, determining a target rank of an initial low-rank adaptation matrix in the initial model; obtaining a target low-rank adaptation matrix based on the target rank and the initial low-rank adaptation matrix; and adjusting the initial model based on the target low-rank adaptation matrix to obtain an adjusted initial model. Based on the scheme, when the low-rank adaptation matrix is used for adjusting the model, the adjustment efficiency of the model can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to a model adjustment method, a vehicle data query method, a device and a vehicle in the field of computer technology. Background Art

[0002] Low-Rank Adaptation (LORA) is a method for fine-tuning models. It is suitable for efficient fine-tuning of models, which can reduce the number of adjustments to model parameters and improve the adjustment efficiency of the model. However, LORA still has certain limitations and cannot meet diverse query requirements. The initial model needs to be adjusted repeatedly, which reduces the adjustment efficiency of the model.

[0003] Therefore, when using LORA to adjust the model, how to improve the adjustment efficiency of the model is an urgent problem that needs to be solved. Summary of the invention

[0004] The present application provides a model adjustment method, a vehicle data query method, a device and a vehicle, which can improve the adjustment efficiency of the model when using LORA to adjust the model.

[0005] In a first aspect, the present application provides a method for adjusting a model, the method comprising:

[0006] Obtain an initial model and sample query data; wherein the initial model is used to represent a model trained based on the sample query data; based on the sample query data, determine the target rank of the initial low-rank adaptation matrix in the initial model; based on the target rank and the initial low-rank adaptation matrix, obtain the target low-rank adaptation matrix; adjust the initial model based on the target low-rank adaptation matrix to obtain the adjusted initial model.

[0007] In an embodiment of the present application, when adjusting the model, the initial model and sample query data trained by the sample query data can be obtained first; then based on the sample query data, the rank (i.e., target rank) corresponding to the initial low-rank adaptation moment in the initial model is determined, and the target low-rank adaptation matrix for adjusting the initial model is obtained through the target rank and the initial low-rank adaptation matrix; finally, the initial model is adjusted through the target low-rank adaptation matrix to obtain the adjusted initial model. Since the target rank (i.e., the target rank is dynamically changing) is determined by the sample query data, the target rank can be matched with the sample query data. Therefore, through the target rank and the initial low-rank adaptation matrix, the target low-rank adaptation matrix for adjusting the initial model is obtained, which can make the initial model adjusted by the target low-rank adaptation matrix more matched with the sample query data, so that the adjusted initial model can meet the diverse query requirements, avoiding the problem that the rank of the initial low-rank adaptation matrix is ​​a fixed value, does not match the sample query data, and cannot meet the diverse query requirements, resulting in repeated adjustments to the initial model, thereby reducing the number of adjustments to the initial model and improving the adjustment efficiency of the initial model.

[0008] In combination with the first aspect, in some implementations of the first aspect, determining the target rank of the initial low-rank adaptation matrix in the initial model based on the sample query data includes:

[0009] Based on the sample query data, the target complexity of the corresponding query business is obtained; based on the target complexity, the target rank is determined; wherein the target complexity is positively correlated with the target rank.

[0010] In the embodiment of the present application, the complexity of the corresponding query service (i.e., the target complexity) can be first obtained through the sample query data; then the target rank is determined through the target complexity, and the accuracy of the determined target rank can be improved by converting the sample query data into the complexity of the query service and then determining the target rank through the complexity of the query service. Furthermore, on the basis of a more accurate target rank, the adjusted initial model can be made more accurate, which can reduce the number of adjustments to the initial model and further improve the adjustment efficiency of the initial model.

[0011] In combination with the first aspect and the above implementations, in some implementations of the first aspect, the sample query data includes a sample query statement and / or a sample query table, and the above obtaining the target complexity of the corresponding query business based on the sample query data includes:

[0012] Obtain the length value of the sample query statement and / or the number of rows and columns of the sample query table; obtain the target complexity based on the length value and / or the number of rows and columns; wherein the length value, the number of rows and the number of columns are positively correlated with the target complexity.

[0013] In an embodiment of the present application, when the sample query data includes a sample query statement and / or a sample query table, the target complexity of the query service corresponding to the sample query data can be obtained through the length value of the sample query statement and / or the number of rows and columns of the sample query table. By obtaining the corresponding target complexity through the specific data information of the sample query data, the target complexity can be more closely matched with the sample query data, thereby enabling the target rank to be more closely matched with the sample query data. Therefore, through the target rank and the initial low-rank adaptation matrix that are more closely matched with the sample query data, a target low-rank adaptation matrix that is more closely matched with the sample query data can be obtained, so that the initial model adjusted by the target low-rank adaptation matrix is ​​more closely matched with the sample query data, further reducing the number of adjustments to the initial model, thereby improving the adjustment efficiency of the initial model.

[0014] In combination with the first aspect and the above implementations, in some implementations of the first aspect, obtaining the target complexity based on the length value and / or the number of rows and columns includes:

[0015] Based on the length value, determine the first complexity; based on the number of rows and columns, determine the second complexity; obtain the target complexity by adding the first complexity and the second complexity; or obtain the target complexity by weighting the first complexity and the first weight, and the second complexity and the second weight; wherein the length value is positively correlated with the first complexity, and the number of rows and columns is positively correlated with the second complexity; the first weight corresponds to the length value, and the second weight corresponds to the number of rows and columns.

[0016] In an embodiment of the present application, when the sample query data is a sample query statement and a sample query table, the first complexity corresponding to the sample query statement can be determined first; and the second complexity corresponding to the sample query table. Then, the complexity corresponding to the sample query data (i.e., the target complexity) is obtained by adding the second complexity of the first complexity. Alternatively, the corresponding target complexity is obtained by weighting the first weight corresponding to the first complexity and the sample query statement, and the second weight corresponding to the second complexity and the sample query table. Obtaining the target complexity by adding or weighting the complexities corresponding to different data can avoid the problem that when a single data is wrong, the target complexity is also wrong, thereby improving the accuracy of the target complexity.

[0017] Furthermore, by weighting the first complexity and the first weight corresponding to the sample query statement and the second complexity and the second weight corresponding to the sample query table, the corresponding target complexity is obtained, which can reduce the deviation of the target complexity and further improve the accuracy of the target complexity.

[0018] In combination with the first aspect and the foregoing implementations, in some implementations of the first aspect, the method further includes:

[0019] Obtain an initial rank and a target adjustment coefficient; wherein the target adjustment coefficient is used to represent the adjustment coefficient corresponding to the optimal output result of the initial model; the initial rank is used to represent the rank of the initial low-rank adaptation matrix; the above-mentioned determination of the target rank based on the target complexity includes: determining the target rank based on the initial rank, the target adjustment coefficient and the target complexity.

[0020] In the embodiment of the present application, on the basis of the target complexity, the rank of the initial low-rank adaptation matrix and the adjustment coefficient corresponding to the optimal output result of the initial model are introduced to jointly determine the target rank, and the target rank is determined by multiple data, thereby avoiding the problem of deviation of the target rank caused by a single data, thereby improving the accuracy of the target rank. Furthermore, on the basis of a more accurate target rank, the adjusted initial model can be made more accurate, which can reduce the number of adjustments to the initial model and further improve the adjustment efficiency of the initial model.

[0021] In combination with the first aspect and the foregoing implementations, in some implementations of the first aspect, determining the target rank based on the initial rank, the target adjustment coefficient, and the target complexity includes:

[0022] The first rank is obtained by multiplying the target adjustment coefficient by the target complexity; the target rank is obtained by adding the initial rank to the first rank.

[0023] In a second aspect, the present application provides a vehicle data query method, the method comprising:

[0024] Obtain vehicle data to be queried input by the user; input the vehicle data to be queried into the adjusted initial model to obtain a vehicle query result; output the vehicle query result; wherein the adjustment method of the adjusted initial model is as shown in the method in the first aspect or any possible implementation method of the first aspect mentioned above.

[0025] In the embodiment of the present application, the adjusted initial model can be obtained by the model adjustment method of the present application, and the adjusted initial model can meet various query requirements. Therefore, after obtaining the vehicle data to be queried input by the user, the vehicle data to be queried can be input into the adjusted initial model, and the vehicle query result corresponding to the vehicle data to be queried can be successfully found, avoiding the problem that the initial model cannot meet the various query requirements and causes the query failure, thereby improving the success rate of the adjusted initial model querying the vehicle data.

[0026] In a third aspect, the present application provides a model adjustment device, the device comprising:

[0027] An acquisition module is used to acquire an initial model and sample query data; wherein the initial model is used to represent a model trained based on the sample query data;

[0028] A determination module, used to determine a target rank of an initial low-rank adaptation matrix in an initial model based on sample query data;

[0029] A processing module, used for obtaining a target low-rank adaptation matrix based on the target rank and the initial low-rank adaptation matrix;

[0030] The adjustment module is used to adjust the initial model based on the target low-rank adaptation matrix to obtain an adjusted initial model.

[0031] In a fourth aspect, the present application provides a vehicle data query device, the device comprising:

[0032] The acquisition module is used to obtain the vehicle data to be queried input by the user;

[0033] A query module, used for inputting the vehicle data to be queried into the adjusted initial model to obtain the vehicle query result;

[0034] An output module is used to output vehicle query results; wherein, the adjustment method of the adjusted initial model is as shown in the method in the above-mentioned first aspect or any possible implementation method of the first aspect.

[0035] In a fifth aspect, the present application provides an electronic device, comprising a memory and a processor. The memory is used to store executable program code, and the processor is used to call and run the executable program code from the memory, so that the electronic device executes the method in the first aspect or any possible implementation of the first aspect, and the method in the second aspect.

[0036] In a sixth aspect, the present application provides a vehicle, comprising a memory and a processor. The memory is used to store executable program code, and the processor is used to call and run the executable program code from the memory, so that the vehicle executes the method in the first aspect or any possible implementation of the first aspect, and the method in the second aspect.

[0037] In the seventh aspect, the present application provides a computer program product, which includes: a computer program code, which, when executed on a computer, enables the computer to execute the method in the first aspect or any possible implementation of the first aspect, as well as the method in the second aspect.

[0038] In an eighth aspect, the present application provides a computer-readable storage medium storing a computer program code. When the computer program code runs on a computer, the computer executes the method in the above-mentioned first aspect or any possible implementation of the first aspect, as well as the method in the above-mentioned second aspect. BRIEF DESCRIPTION OF THE DRAWINGS

[0039] Figure 1 It is a schematic diagram of the scenario of model training of related technologies.

[0040] Figure 2 It is a flow chart of a model adjustment method provided in an embodiment of the present application.

[0041] Figure 3 It is a flowchart of a query service provided in an embodiment of the present application.

[0042] Figure 4 It is a flow chart of another model adjustment method provided in an embodiment of the present application.

[0043] Figure 5 It is a flowchart of a vehicle data query method provided in an embodiment of the present application.

[0044] Figure 6 It is a flowchart of a business system provided in an embodiment of the present application.

[0045] Figure 7 It is a structural schematic diagram of the adjustment device of the model provided in the embodiment of the present application.

[0046] Figure 8 It is a structural diagram of a vehicle data query device provided in an embodiment of the present application.

[0047] Fig. 9 It is a schematic diagram of the structure of a vehicle provided in an embodiment of the present application. DETAILED DESCRIPTION

[0048] The technical solution in the present application will be described clearly and in detail below in conjunction with the accompanying drawings. In the description of the embodiments of the present application, unless otherwise specified, " / " means or, for example, A / B can mean A or B: "and / or" in the text is only a description of the association relationship of associated objects, indicating that there can be three relationships, for example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. In addition, in the description of the embodiments of the present application, "multiple" means two or more than two.

[0049] In the following, the terms "first" and "second" are used for descriptive purposes only and are not to be understood as suggesting or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of the features.

[0050] Figure 1 It is a schematic diagram of the scenario of model training of related technologies.

[0051] For example, Figure 1 As shown, Figure 1The electronic device 110 is included, and the pre-trained model 111 is configured in the electronic device 110. A pre-trained model refers to a machine learning or deep learning model that is pre-trained on a large-scale data set. Among them, the pre-trained model generally includes a pre-training stage and a fine-tuning stage. The pre-training stage means unsupervised training on large-scale unlabeled data to learn common features. The fine-tuning stage means supervised training on a data set of a specific task to adjust the model parameters to adapt to the new task.

[0052] Exemplarily, when using a pre-trained model, it is usually necessary to adjust and optimize the parameters of the pre-trained model. However, since the training of the pre-trained model is relatively complicated, it will take a long time and equipment resources to adjust and optimize the parameters of the pre-trained model, affecting the adjustment efficiency of the pre-trained model. Therefore, in order to improve the adjustment efficiency of the pre-trained model, LORA is introduced to adjust and optimize the parameters of the pre-trained model. As a lightweight model fine-tuning method, LORA can reduce the time and equipment resources consumed when adjusting and optimizing the parameters of the pre-trained model by introducing a low-rank matrix, as well as reduce the number of adjustments to the parameters of the pre-trained model, thereby improving the adjustment efficiency of the pre-trained model.

[0053] However, since the rank of LORA is generally preset, there are certain limitations in the adjustment and optimization of the parameters of the pre-trained model by LORA, and it cannot meet the diverse query requirements. The initial model needs to be adjusted repeatedly, which reduces the adjustment efficiency of the pre-trained model.

[0054] It should be noted that the electronic device may be a smart device configured with a pre-trained model, including but not limited to: a personal computer, a tablet computer, a handheld device, a vehicle-mounted device, a wearable device, a computing device or other processing device connected to a wireless modem, etc. Electronic devices may be called different names in different networks, such as: user equipment, access electronic equipment, user unit, user station, mobile station, mobile station, remote station, remote electronic device, mobile device, user electronic device, electronic device, wireless communication device, user agent or user device, cellular phone, cordless phone, 5G network or electronic device in future evolution network, etc., which is not limited by the comparison of the embodiments of the present application.

[0055] Therefore, when using LORA to adjust the model, in order to solve the problem of low model adjustment efficiency, the present application proposes a model adjustment method, a vehicle data query method, a device and a vehicle.

[0056] Combine the following Figures 2 to 6 The adjustment method of the model provided in the embodiment of the present application is described in detail.

[0057] Figure 2 is a flow chart of a method for adjusting a model provided in an embodiment of the present application. The method can be Figure 1 The electronic device 110 is executed.

[0058] For example, Figure 2 As shown, the method 200 includes the following implementation process:

[0059] S210, obtaining an initial model and sample query data.

[0060] The initial model (eg, pre-trained model) is used to represent a model trained based on sample query data.

[0061] Exemplarily, when using the initial model, in order to improve the accuracy of the output results of the initial model, LORA can be introduced to adjust and optimize the initial model. In the process of adjusting and optimizing the initial model through LORA, the initial model and sample query data can be obtained first. Among them, the sample query data can represent the data used to train the initial model during the training process.

[0062] Optionally, the initial model includes but is not limited to a large-scale language model (LLM), a computer vision model, and a multimodal model.

[0063] S220, determining a target rank of an initial low-rank adaptation matrix in the initial model based on the sample query data.

[0064] For example, when the initial model is obtained, the initial model may include LORA (which may be called "initial low-rank adaptation matrix", denoted as "LORA1") to adjust and optimize the initial model through LORA1. However, since the rank of LORA1 is generally set in advance by the developer according to the user's query requirements, that is, the rank of LORA1 is a fixed value (for example, 10), which cannot match the sample query data, there are certain limitations in the adjustment and optimization of the parameters of the initial model by LORA1, and it cannot meet the diverse query requirements, reducing the adjustment efficiency of the initial model.

[0065] Therefore, in order to ensure that the initial model adjusted by LORA1 can meet diverse query requirements, the rank that matches the sample query data (which can be called the "target rank") can be determined through the sample query data.

[0066] In one possible implementation, the above-mentioned determination of the target rank of the initial low-rank adaptation matrix in the initial model based on the sample query data includes: obtaining the target complexity of the corresponding query service based on the sample query data; determining the target rank based on the target complexity; wherein the target complexity is positively correlated with the target rank.

[0067] Exemplarily, in the process of determining the above-mentioned target rank through sample query data, the complexity A (which may be referred to as "target complexity") of the query service A corresponding to the sample query data A may be first determined through the sample query data (for example, sample query data A).

[0068] The query service may refer to the query process involved in which the initial model queries the corresponding query results through sample query data, and the data associated with the query process.

[0069] Figure 3 It is a flowchart of a query service provided in an embodiment of the present application.

[0070] For example, Figure 3 As shown, Figure 3 The initial model is the LLM model, the input is the sample query data A, and the output is the query result A.

[0071] Exemplarily, when sample query data A is input into the LLM model, the LLM model will query the query result A corresponding to the sample query data A. During the query process, the LLM model can first query data 3 through data 1 and data 2, then query data 5 through data 3 and data 4, and continue to obtain query result A through data 5, data 6, and data 7. The process 310 of querying the LLM model can be called a query service, and data 1 to data 7 can be used as data that needs to be associated with the query service.

[0072] Further, when the query service A corresponding to the sample query data A is obtained, the complexity corresponding to the query service A can be determined. The sample query data A can be a sample query statement (eg, Structured Query Language (SQL)) and / or a sample query table.

[0073] Optionally, the above-mentioned target complexity of the corresponding query business is obtained based on the sample query data, including: obtaining the length value of the sample query statement, and / or obtaining the number of rows and columns of the sample query table; obtaining the target complexity based on the length value, and / or the number of rows and columns; wherein the length value, the number of rows and the number of columns are positively correlated with the target complexity.

[0074] For example, when the sample query data A is an SQL statement, the length value of the SQL statement, that is, the number of characters included in the SQL statement, can be obtained, and the complexity A corresponding to the query service A can be determined by the number of characters included in the SQL statement.

[0075] For example, when the number of characters included in the SQL statement is 10, the complexity corresponding to the query service A can be determined to be 15% based on the numerical relationship between the number of characters and the complexity. It should be understood that the numerical relationship between the number of characters included in the SQL statement and the complexity can be preset and can also be changed according to the query service; for example, when the number of characters included in the SQL statement is 10, the complexity corresponding to the query service A can also be determined to be 10%, and the embodiments of the present application are not limited to this.

[0076] The number of characters contained in the SQL statement is positively correlated with the complexity of the query service, that is, the more characters there are, the greater the corresponding complexity; conversely, the fewer characters there are, the smaller the corresponding complexity.

[0077] Alternatively, when the sample query data A is a sample query table, the number of rows and columns corresponding to the sample query table may be obtained, and the complexity A corresponding to the query service A may be determined based on the number of rows and columns in the sample query table.

[0078] For example, the number of rows and columns corresponding to the sample query table is 3 and 4, and the complexity corresponding to the query service A can be determined to be 20% based on the numerical relationship between the number of rows and columns and the complexity. It should be understood that the numerical relationship between the number of rows and columns and the complexity can be preset and can also be changed according to the query service; for example, when the number of rows and columns corresponding to the sample query table is 3 and the number of columns is 4, it can also be determined that the complexity corresponding to the query service A is 25%, and the embodiments of the present application are not limited to this.

[0079] The number of rows and columns in the sample query table is positively correlated with the complexity of the query service, that is, the more rows and columns, the greater the corresponding complexity; conversely, the fewer rows and columns, the smaller the corresponding complexity. For example, the complexity of the query service corresponding to the sample query table with 3 rows and 4 columns is greater than the complexity of the query service corresponding to the sample query table with 3 rows and 2 columns.

[0080] Optionally, the sum of the number of rows and columns in the sample query table can be calculated, and the complexity corresponding to the query service can be determined based on the sum of the number of rows and columns. The sum of the number of rows and columns is positively correlated with the complexity corresponding to the query service, that is, the greater the sum of the number of rows and columns, the greater the corresponding complexity; conversely, the smaller the sum of the number of rows and columns, the smaller the corresponding complexity. For example, the complexity corresponding to the query service with the sum of the number of rows and columns being 7 is greater than the complexity corresponding to the query service with the sum of the number of rows and columns being 5.

[0081] Alternatively, when the sample query data A is an SQL statement and a sample query table, the complexity A corresponding to the query service A may be determined by the number of characters included in the SQL statement and the number of rows and columns in the sample query table.

[0082] In an embodiment of the present application, when the sample query data includes a sample query statement and / or a sample query table, the target complexity of the query service corresponding to the sample query data can be obtained through the length value of the sample query statement and / or the number of rows and columns of the sample query table. By obtaining the corresponding target complexity through the specific data information of the sample query data, the target complexity can be more closely matched with the sample query data, thereby enabling the target rank to be more closely matched with the sample query data. Therefore, through the target rank and the initial low-rank adaptation matrix that are more closely matched with the sample query data, a target low-rank adaptation matrix that is more closely matched with the sample query data can be obtained, so that the initial model adjusted by the target low-rank adaptation matrix is ​​more closely matched with the sample query data, further reducing the number of adjustments to the initial model, thereby improving the adjustment efficiency of the initial model.

[0083] Optionally, the target complexity is obtained based on the length value, and / or the number of rows and columns, including: determining a first complexity based on the length value; determining a second complexity based on the number of rows and columns; obtaining the target complexity by adding the first complexity to the second complexity; or obtaining the target complexity by weighting the first complexity and the first weight, and the second complexity and the second weight; wherein the length value is positively correlated with the first complexity, and the number of rows and columns is positively correlated with the second complexity; the first weight corresponds to the length value, and the second weight corresponds to the number of rows and columns.

[0084] Exemplarily, when the sample query data A is an SQL statement and a sample query table, we can first determine the complexity of the query business corresponding to the number of characters contained in the SQL statement (which can be called the "first complexity"); and the complexity of the query business corresponding to the number of rows and columns in the sample query table (which can be called the "second complexity").

[0085] Afterwards, when the first complexity and the second complexity are determined, the first complexity and the second complexity may be added to obtain the corresponding complexity A. For example, the first complexity is 15%, the second complexity is 20%, and the complexity A=15%+20%=35%.

[0086] Alternatively, the weight corresponding to the number of characters contained in the SQL statement (which may be referred to as the "first weight") and the weight corresponding to the number of rows and columns in the sample query table (which may be referred to as the "second weight") may be obtained. The first complexity and the first weight, and the second complexity and the second weight are weighted to obtain the corresponding complexity A, that is, complexity A = first complexity × first weight + second complexity × second weight. For example, if the first complexity is 15%, the first weight is 0.3, the second complexity is 20%, and the second weight is 0.7, then complexity A = 15% × 0.3 + 20% × 0.7 = 18.5%.

[0087] It should be noted that the first weight and the second weight are related to the number of characters contained in the SQL statement and the number of rows and columns in the sample query table, and the embodiment of the present application does not limit this.

[0088] Among them, the number of characters contained in the SQL statement is positively correlated with the first complexity, that is, the more characters, the greater the corresponding first complexity; conversely, the fewer characters, the smaller the corresponding first complexity. And the number of rows and columns in the sample query table is positively correlated with the second complexity, that is, the more rows and columns, the greater the corresponding second complexity; conversely, the fewer rows and columns, the smaller the corresponding second complexity.

[0089] In an embodiment of the present application, when the sample query data is a sample query statement and a sample query table, the first complexity corresponding to the sample query statement can be determined first; and the second complexity corresponding to the sample query table. Then, the complexity corresponding to the sample query data (i.e., the target complexity) is obtained by adding the second complexity of the first complexity. Alternatively, the corresponding target complexity is obtained by weighting the first weight corresponding to the first complexity and the sample query statement, and the second weight corresponding to the second complexity and the sample query table. Obtaining the target complexity by adding or weighting the complexities corresponding to different data can avoid the problem that when a single data is wrong, the target complexity is also wrong, thereby improving the accuracy of the target complexity.

[0090] Furthermore, by weighting the first complexity and the first weight corresponding to the sample query statement and the second complexity and the second weight corresponding to the sample query table, the corresponding target complexity is obtained, which can reduce the deviation of the target complexity and further improve the accuracy of the target complexity.

[0091] Further, when the complexity A corresponding to the query service A is determined, the corresponding rank A, ie, the target rank, may be determined through the complexity A.

[0092] Among them, complexity A is positively correlated with the rank corresponding to complexity A, that is, the larger the complexity A is, the larger the corresponding rank is; conversely, the smaller the complexity A is, the smaller the corresponding rank is. In addition, since complexity A is positively correlated with the number of characters contained in the SQL statement and / or the number of rows and columns in the sample query table, complexity A is positively correlated with the rank corresponding to complexity A, and therefore the rank corresponding to complexity A is also positively correlated with the number of characters contained in the SQL statement and / or the number of rows and columns in the sample query table.

[0093] In the embodiment of the present application, the complexity of the corresponding query service (i.e., the target complexity) can be first obtained through the sample query data; then the target rank is determined through the target complexity, and the accuracy of the determined target rank can be improved by converting the sample query data into the complexity of the query service and then determining the target rank through the complexity of the query service. Furthermore, on the basis of a more accurate target rank, the adjusted initial model can be made more accurate, which can reduce the number of adjustments to the initial model and further improve the adjustment efficiency of the initial model.

[0094] S230, obtaining a target low-rank adaptation matrix based on the target rank and the initial low-rank adaptation matrix.

[0095] For example, when the target rank corresponding to the query service (e.g., rank A) is determined by the above method, the rank in LORA1 (e.g., 10) can be updated to rank A (e.g., 12), that is, the rank in the updated LORA1 (which can be called the "target low-rank adaptation matrix", denoted as "LORA2") is 12.

[0096] Optionally, an initial rank and a target adjustment coefficient are obtained; wherein the target adjustment coefficient is used to represent the adjustment coefficient corresponding to the optimal output result of the initial model; the initial rank is used to represent the rank of the initial low-rank adaptation matrix; the above-mentioned determination of the target rank based on the target complexity includes: determining the target rank based on the initial rank, the target adjustment coefficient and the target complexity.

[0097] For example, the rank in LORA1 (e.g., 10), i.e., the initial rank, and the adjustment coefficient corresponding to the optimal output result of the initial model (which may be referred to as the "target adjustment coefficient") may be obtained. Then, the corresponding rank A is determined by the initial rank, the target adjustment coefficient, and the complexity A.

[0098] The initial model may set multiple adjustment coefficients, such as 0.5, 0.8, 1.5, etc. In order to select the target adjustment coefficient (i.e., the optimal adjustment coefficient), each adjustment coefficient may be used to query the query result corresponding to the sample query data A once, and the adjustment coefficient corresponding to the optimal query result (i.e., the optimal output result) is determined as the target adjustment coefficient. For example, if the query result corresponding to 0.5 is better than the query result corresponding to 0.8 and the query result corresponding to 1.5, 0.5 may be determined as the target adjustment coefficient.

[0099] The evaluation criteria for the best query result may include, but are not limited to, the comprehensiveness, accuracy, and query speed of the query result. For example, the more comprehensive the query result, the higher the accuracy, and the higher the query speed, the better the corresponding query result.

[0100] In the embodiment of the present application, on the basis of the target complexity, the rank of the initial low-rank adaptation matrix and the adjustment coefficient corresponding to the optimal output result of the initial model are introduced to jointly determine the target rank, and the target rank is determined by multiple data, thereby avoiding the problem of deviation of the target rank caused by a single data, thereby improving the accuracy of the target rank. Furthermore, on the basis of a more accurate target rank, the adjusted initial model can be made more accurate, which can reduce the number of adjustments to the initial model and further improve the adjustment efficiency of the initial model.

[0101] Optionally, the above-mentioned determining the target rank based on the initial rank, the target adjustment coefficient and the target complexity includes: obtaining a first rank by multiplying the target adjustment coefficient and the target complexity; and obtaining the target rank by adding the initial rank and the first rank.

[0102] For example, when the initial rank is 10, the target adjustment coefficient is 0.5, and the complexity corresponding to the query service is 35%, the target adjustment coefficient 0.5 and the complexity 35% can be multiplied to obtain a rank (which can be called the "first rank"); then the initial rank 10 is added to the first rank to obtain the above target rank. That is, the target rank = initial rank + target adjustment coefficient × target complexity = 10 + 0.5 × 35% = 10.175≈10. This can be explained by formula (1):

[0103] r=f(C) (1)

[0104] In formula (1), f(C) can be a linear or nonlinear function. For example:

[0105] r=f(C)=r0+αC (2)

[0106] Wherein, in formula (2), r0 is the above initial rank, α is the above target adjustment coefficient, and C is the above target complexity.

[0107] Optionally, since the rank is generally a non-negative integer, after obtaining the target rank, the target rank may be rounded, for example, rounded off, rounded down, or rounded up.

[0108] S240, adjusting the initial model based on the target low-rank adaptation matrix to obtain an adjusted initial model.

[0109] For example, when LORA2 with a rank of 12 is obtained, the initial model can be adjusted and optimized through LORA2 to obtain an adjusted initial model, so that the query results output by the adjusted initial model are more matched with the sample query data, thereby meeting diverse query needs.

[0110] Optionally, sample query data can be obtained from a database related to the vehicle query business, so that the adjusted initial model obtained after fine-tuning by LORA2 can more accurately handle complex business logic and data structure, and adapt to different query requirements, thereby improving the business processing capabilities of the adjusted initial model.

[0111] In such Figure 2 In the method 200 shown, when adjusting the model, the initial model and sample query data trained by the sample query data can be obtained first; then based on the sample query data, the rank corresponding to the initial low-rank adaptation moment in the initial model (i.e., the target rank) is determined, and the target low-rank adaptation matrix for adjusting the initial model is obtained through the target rank and the initial low-rank adaptation matrix; finally, the initial model is adjusted through the target low-rank adaptation matrix to obtain the adjusted initial model. Since the target rank (i.e., the target rank is dynamically changing) is determined by the sample query data, the target rank can be matched with the sample query data. Therefore, by obtaining the target low-rank adaptation matrix for adjusting the initial model through the target rank and the initial low-rank adaptation matrix, the initial model adjusted by the target low-rank adaptation matrix can be more matched with the sample query data, so that the adjusted initial model can flexibly adapt to the diverse query requirements, avoiding the problem that the rank of the initial low-rank adaptation matrix is ​​a fixed value, does not match the sample query data, and cannot meet the diverse query requirements, resulting in repeated adjustment of the initial model, that is, reducing the number of adjustments to the initial model, thereby improving the adjustment efficiency of the initial model. Furthermore, when the adjusted initial model better matches the sample query data, the query results output by the adjusted initial model can be made more accurate, thereby improving the query capability of the adjusted initial model.

[0112] Figure 4 It is a flow chart of another model adjustment method provided in an embodiment of the present application.

[0113] For example, Figure 4 As shown, the method 400 includes the following implementation process:

[0114] S401, obtaining an initial model and sample query data.

[0115] Exemplarily, in the process of adjusting and optimizing the initial model through LORA, the initial model and sample query data can be obtained first.

[0116] 402, obtain the length value of the sample query statement in the sample query data, and the number of rows and columns of the sample query table in the sample query data; determine complexity 1 based on the length value, and determine complexity 2 based on the number of rows and columns; add complexity 1 and complexity 2 to obtain the target complexity of the corresponding query business.

[0117] Exemplarily, the data type of the sample query data A may be obtained. When the sample query data A is an SQL statement and a sample query table, the number of characters included in the SQL statement and the number of rows and columns in the sample query table may be obtained.

[0118] Furthermore, the complexity 1 corresponding to the number of characters contained in the SQL statement and the complexity 2 corresponding to the number of rows and columns in the sample query table can be used. When complexity 1 and complexity 2 are determined, complexity 1 and complexity 2 can be added to obtain complexity A corresponding to the sample query data. For example, if complexity 1 is 15% and complexity 2 is 20%, then complexity A = 15% + 20% = 35%.

[0119] Alternatively, we can obtain the weight 1 corresponding to the number of characters contained in the SQL statement and the weight 2 corresponding to the number of rows and columns in the sample query table. Then, we weight the complexity 1 with the weight 1, and the complexity 2 with the weight 2 to obtain the corresponding complexity A, that is, complexity A = complexity 1 × weight 1 + complexity 2 × weight 2.

[0120] Optionally, when the sample query data A is only an SQL statement, the complexity A may be determined based on the numerical relationship between the number of characters and the complexity. For example, when the number of characters contained in the SQL statement is 10, the corresponding complexity is 10%.

[0121] Optionally, when the sample query data A is only a sample query table, the complexity A can be determined based on the numerical relationship between the number of rows and columns and the complexity. For example, when the number of rows and columns corresponding to the sample query table is 3 and the number of columns is 4, the corresponding complexity is 25%.

[0122] S403, the product of the adjustment coefficient corresponding to the optimal output result of the initial model and the target complexity is added to the rank of the initial low-rank adaptation matrix to obtain the target rank.

[0123] For example, the adjustment coefficient C corresponding to the optimal output result of the initial model, that is, the above-mentioned target adjustment coefficient, can be obtained. When the adjustment coefficient C is obtained, the product of the adjustment coefficient C and the complexity A can be calculated first, and then the product is added to the rank 10 corresponding to LORA1 to obtain the target rank.

[0124] S404, obtaining a target low-rank adaptation matrix based on the target rank and the initial low-rank adaptation matrix.

[0125] For example, when the target rank corresponding to the query service is determined (e.g., rank A), the rank in LORA1 (e.g., 10) can be updated to rank A (e.g., 12), that is, the rank in the updated LORA1 is 12, that is, LORA2.

[0126] S405, adjusting the initial model based on the target low-rank adaptation matrix to obtain an adjusted initial model.

[0127] For example, when LORA2 with a rank of 12 is obtained, the initial model can be adjusted and optimized through LORA2 to obtain an adjusted initial model, so that the query results output by the adjusted initial model are more matched with the sample query data, thereby meeting diverse query needs.

[0128] Optionally, in order to improve the ability of the adjusted initial model to adapt to different query requirements, a multi-service joint optimization strategy can be introduced in the process of fine-tuning the initial model in LORA2. In the process of adjusting the initial model, the loss functions and weights corresponding to multiple services are optimized at the same time, thereby improving the generalization ability of the adjusted initial model, so that the adjusted initial model can adapt to multiple query services. For example, multiple services, T1, T2, ... Tn, can be set, and the objective function of multi-task joint optimization can be expressed by formula (3):

[0129]

[0130] In formula (3), represents the loss function corresponding to each task, λ i Represents the weight factor corresponding to each task.

[0131] Optionally, in order to reduce the computational complexity and storage requirements of LORA2 when fine-tuning the initial model, sparse processing can be introduced to reduce the resource consumption and adjustment time required when adjusting the initial model. Assume that LORA2 consists of matrix A and matrix B. When the update of matrix A and matrix B follows the sparse strategy, the sparse matrix A is A s , the sparse matrix B is B s , and A s and B s The following conditions are met:

[0132] ||A s || 0 ≤k 1

[0133] ||B s || 0 ≤k 2

[0134] Among them, |||| 0 represents the number of non-zero elements in the matrix, k 1 and k 2 The threshold parameter representing sparsification, for example, 5%, 6%, can be adjusted according to the training requirements of the initial model, and the embodiments of the present application are not limited to this.

[0135] For example, when the initial model is adjusted and optimized through LORA2, the initial model can also be adjusted and trained through a multi-service joint optimization strategy and sparse processing to obtain an adjusted initial model.

[0136] It should be noted that Figure 4 All steps in Figure 2 The corresponding embodiments are described in detail in the embodiment, which will not be repeated here.

[0137] Figure 5 It is a flowchart of a vehicle data query method provided in an embodiment of the present application.

[0138] S510, obtaining vehicle data to be queried input by the user.

[0139] For example, when a user has a query demand for vehicle business, a visual collection page can be displayed to the user, and the data to be queried (which may be called "vehicle data to be queried") input by the user can be obtained through the collection page, for example, the sales volume of white vehicles in 6 months.

[0140] S520, inputting the vehicle data to be queried into the adjusted initial model to obtain a query result.

[0141] For example, when the vehicle data to be queried input by the user is obtained, the vehicle data to be queried can be input into LORA2, and the sales data of white vehicles in 6 months, for example, 500 vehicles, can be queried through LORA2.

[0142] S530, outputting vehicle query results.

[0143] Among them, the adjustment method of the adjusted initial model is as follows Figures 2 to 4 The adjustment method of the model shown will not be described in detail here.

[0144] For example, when LORA2 queries the sales data of white vehicles, the query results (which may be referred to as "vehicle query results") of 500 vehicles can be displayed to the user in a visual manner (e.g., tables, graphs, subject models, etc.). For example, the sales of white vehicles in each of the six months are displayed to the user in the form of a pie chart. By displaying the vehicle query results to the user in a visual manner, the user can intuitively see the vehicle query results, thereby improving the user experience.

[0145] Alternatively, the vehicle query result may be output to the user in the form of voice broadcast, so that the user can obtain the vehicle query result more conveniently.

[0146] In the embodiment of the present application, the adjusted initial model can be obtained by the model adjustment method of the present application, and the adjusted initial model can meet various query requirements. Therefore, after obtaining the vehicle data to be queried input by the user, the vehicle data to be queried can be input into the adjusted initial model, and the vehicle query result corresponding to the vehicle data to be queried can be successfully found, avoiding the problem that the initial model cannot meet the various query requirements and causes the query failure, thereby improving the success rate of the adjusted initial model querying the vehicle data.

[0147] Figure 6 It is a flowchart of a business system provided in an embodiment of the present application.

[0148] For example, Figure 6 As shown, Figure 6 The business system 600 in the embodiment adopts a hybrid cloud architecture to process the query requirements of users, wherein the hybrid cloud architecture includes a public cloud and a private cloud.

[0149] For example, when the adjusted initial model is obtained, the adjusted initial model can be deployed on the public cloud, and the query business can be processed by using the powerful computing power and resource elasticity of the public cloud. In addition, the relevant business data of the vehicle is stored on the private cloud to avoid the leakage of business data and ensure the security of business data. Among them, the business data includes but is not limited to the color, model and sales volume of the vehicle.

[0150] In order to simplify user operations, the business data stored on the private cloud can be displayed to users in a visual manner, allowing users to interact with the business system more intuitively, simplifying user operations and improving the usability of the business system.

[0151] Exemplarily, when there is a query demand, the user can enter the corresponding user demand expression (i.e. the above-mentioned vehicle data to be queried) on the business operation interface, for example, the sales volume of white vehicles; combine the user demand expression with the data table fields and the physical meaning of the fields to generate business query data corresponding to the vehicle data to be queried. Then input the business query data into the LLM model configured in the public cloud (i.e. the above-mentioned adjusted initial model), so that the LLM model generates the corresponding execution code, such as SQL code, according to the input business query data; avoiding the developer from manually writing SQL code, and automatically generating the SQL code corresponding to the business query data through the LLM model, which lowers the threshold for data query and makes data query through the LLM model universal.

[0152] Furthermore, the SQL code can be coded and sent to the private cloud, which executes the coded SQL code and combines it with the relevant business data of the vehicle (for example, sales data) to obtain the final vehicle query result. The vehicle query result is visualized to obtain a visualization result, which is displayed to the user, so that the vehicle query result can be displayed to the user intuitively, making it easier for the user to analyze the vehicle query result, reducing the use threshold of the LLM model and improving the user experience.

[0153] Among them, the user demand expression can be expressed in the form of text, voice and / or image, etc., which is not limited in the embodiments of the present application.

[0154] It should be noted that a data table field can represent specific data stored in a database. The physical meaning of a field can represent the meaning of the field in actual applications or the specific information it represents. For example, "username" represents the user name, which is used for user login and identification; "password" represents the password, which is used for user login verification.

[0155] Optionally, SQL codes may be collected in advance in the business system, including but not limited to database table structure information, stored procedures, and trigger information. When the SQL codes are collected, all the collected SQL codes may be annotated, and the annotated content may include functional descriptions of the SQL codes, business meanings of the fields, logical relationships of the table structures, etc., thereby providing accurate sample query data for fine-tuning the initial model, so as to improve the business processing and understanding capabilities of the adjusted initial model.

[0156] It should be understood that the above examples are intended to help those skilled in the art understand the embodiments of the present application, rather than to limit the embodiments of the present application to the specific numerical values ​​or specific scenarios illustrated. Those skilled in the art can obviously make various equivalent modifications or changes based on the above examples, and such modifications or changes also fall within the scope of the embodiments of the present application.

[0157] Combination of the above Figures 1 to 6 The adjustment method and query method of the model provided in the embodiment of the present application are described in detail; Figure 7 and Fig. 9 The device embodiments of the present application are described in detail. It should be understood that the device in the embodiments of the present application can execute the various methods of the aforementioned embodiments of the present application, that is, the specific working processes of the following various products can refer to the corresponding processes in the aforementioned method embodiments.

[0158] Figure 7 It is a structural schematic diagram of the adjustment device of the model provided in the embodiment of the present application.

[0159] For example, Figure 7 As shown, the device 700 includes:

[0160] The acquisition module 710 is used to acquire an initial model and sample query data; wherein the initial model is used to represent a model trained based on the sample query data;

[0161] A determination module 720, configured to determine a target rank of an initial low-rank adaptation matrix in an initial model based on sample query data;

[0162] A processing module 730 is used to obtain a target low-rank adaptation matrix based on the target rank and the initial low-rank adaptation matrix;

[0163] The adjustment module 740 is used to adjust the initial model based on the target low-rank adaptation matrix to obtain an adjusted initial model.

[0164] In a possible implementation, the determination module 720 is specifically used to: obtain a target complexity of a corresponding query service based on sample query data; and determine a target rank based on the target complexity; wherein the target complexity is positively correlated with the target rank.

[0165] In one possible implementation, the determination module 720 is specifically used to: obtain the length value of the sample query statement, and / or, obtain the number of rows and columns of the sample query table; based on the length value, and / or, the number of rows and columns, obtain the target complexity; wherein the length value, the number of rows and the number of columns are positively correlated with the target complexity.

[0166] In one possible implementation, the determination module 720 is specifically used to: determine the first complexity based on the length value; determine the second complexity based on the number of rows and columns; obtain the target complexity by adding the first complexity to the second complexity; or obtain the target complexity by weighting the first complexity and the first weight, and the second complexity and the second weight; wherein the length value is positively correlated with the first complexity, and the number of rows and columns is positively correlated with the second complexity; the first weight corresponds to the length value, and the second weight corresponds to the number of rows and columns.

[0167] In one possible implementation, the acquisition module 710 is also used to: obtain the initial rank and the target adjustment coefficient; wherein the target adjustment coefficient is used to represent the adjustment coefficient corresponding to the optimal output result of the initial model; the initial rank is used to represent the rank of the initial low-rank adaptation matrix; the determination module 720 is specifically used to: determine the target rank based on the initial rank, the target adjustment coefficient and the target complexity.

[0168] In a possible implementation, the determination module 720 is specifically configured to: obtain a first rank by multiplying a target adjustment coefficient by a target complexity; and obtain a target rank by adding an initial rank to the first rank.

[0169] Figure 8It is a structural diagram of a vehicle data query device provided in an embodiment of the present application.

[0170] For example, Figure 8 As shown, the device 800 includes:

[0171] The acquisition module 810 is used to obtain the vehicle data to be queried input by the user;

[0172] A query module 820, used to input the vehicle data to be queried into the adjusted initial model to obtain a vehicle query result;

[0173] Output module 830 is used to output vehicle query results; wherein the adjustment method of the adjusted initial model is as follows: Figures 2 to 4 Adjustment method for the model shown.

[0174] It should be noted that the above-mentioned apparatus 700 and apparatus 800 are embodied in the form of functional modules. The term "module" here can be implemented in the form of software and / or hardware, and is not specifically limited to this.

[0175] For example, a "module" may be a software program, a hardware circuit, or a combination of the two that implements the above functions. The hardware circuit may include an application specific integrated circuit (ASIC), an electronic circuit, a processor (such as a shared processor, a dedicated processor, or a group processor, etc.) and a memory for executing one or more software or firmware programs, a combined logic circuit, and / or other suitable components that support the described functions.

[0176] Therefore, the modules of each example described in the embodiments of the present application can be implemented by electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.

[0177] Fig. 9 It is a schematic diagram of the structure of a vehicle provided in an embodiment of the present application.

[0178] For example, Fig. 9 As shown, the vehicle 900 includes: a memory 910 and a processor 920, wherein the memory 910 stores an executable program code 9101, and the processor 920 is used to call and execute the executable program code 9101 to perform a model adjustment method and a vehicle data query method.

[0179] The present application can divide the functional modules of the vehicle according to the above method example. For example, each functional module can be corresponded, or two or more functions can be integrated into one processing module. The above integrated module can be implemented in the form of hardware. It should be noted that the division of modules in this embodiment is schematic and is only a logical function division. There may be other division methods in actual implementation.

[0180] In the case of dividing each functional module according to each function, the vehicle may include: an acquisition module, a determination module, a processing module, an adjustment module, a collection module, a query module, and an output module, etc. It should be noted that all relevant contents of each step involved in the above method embodiment can be referred to the functional description of the corresponding functional module, and will not be repeated here.

[0181] The vehicle provided in the present application is used to execute the above-mentioned model adjustment method and vehicle data query method, so it can achieve the same effect as the above-mentioned implementation method.

[0182] In the case of an integrated unit, the vehicle may include a processing module and a storage module. The processing module may be used to control and manage the actions of the vehicle. The storage module may be used to support the vehicle in executing related program codes and data.

[0183] The processing module may be a processor or a controller, which may implement or execute various exemplary logic blocks, modules and circuits shown in conjunction with the disclosure of the present application. The processor may also be a combination that implements computing functions, such as a combination of one or more microprocessors, a combination of digital signal processing (DSP) and a microprocessor, etc. The storage module may be a memory.

[0184] The present application also provides a computer-readable storage medium, on which a computer program is stored, and when the program is executed by a processor, the steps of the method of any of the above embodiments are implemented. The computer-readable storage medium may include, but is not limited to, any type of disk, including a floppy disk, an optical disk, a DVD (Digital Video Disc), a CD-ROM (Compact Disc Read-Only Memory), a micro drive and a magneto-optical disk, a ROM (Read-Only Memory), a RAM (Random Access Memory), an EPROM (Erasable Programmable Read-Only Memory), an EEPROM (Electrically Erasable Programmable Read Only Memory), a DRAM (Dynamic Random Access Memory), a VRAM (Video Random Access Memory), a flash memory device, a magnetic card or an optical card, a nanosystem (including a molecular memory IC), or any type of medium or device suitable for storing instructions and / or data.

[0185] The present application also provides a computer program product. When the computer program product runs on a computer, the computer executes the above-mentioned related steps to implement a model adjustment method and a vehicle data query method in the above-mentioned embodiment.

[0186] In addition, the vehicle provided in the embodiments of the present application may specifically be a chip, component or module, and the vehicle may include a connected processor and memory; wherein the memory is used to store instructions, and when the vehicle is running, the processor may call and execute instructions so that the chip executes a model adjustment method and a vehicle data query method in the above-mentioned embodiments.

[0187] Among them, the vehicle, computer-readable storage medium, computer program product or chip provided in this application are all used to execute the corresponding methods provided above. Therefore, the beneficial effects that can be achieved can refer to the beneficial effects in the corresponding methods provided above, and will not be repeated here.

[0188] Through the description of the above implementation methods, technical personnel in the relevant field can understand that for the convenience and simplicity of description, only the division of the above-mentioned functional modules is used as an example. In actual applications, the above-mentioned functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above.

[0189] In the embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic, for example, the division of modules or units is only a logical function division, and there may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another device, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0190] The above contents are only specific implementation methods of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

Claims

1. A method for adjusting a model, characterized in that: The method comprises: Acquire an initial model and sample query data; wherein the initial model is used to represent a model trained based on the sample query data; Based on the sample query data, determining a target rank of an initial low-rank adaptation matrix in the initial model; Based on the target rank and the initial low-rank adaptation matrix, obtaining a target low-rank adaptation matrix; The initial model is adjusted based on the target low-rank adaptation matrix to obtain an adjusted initial model.

2. The method according to claim 1, characterized in that The determining, based on the sample query data, a target rank of an initial low-rank adaptation matrix in the initial model comprises: Based on the sample query data, obtaining a target complexity of a corresponding query service; Based on the target complexity, the target rank is determined; wherein the target complexity is positively correlated with the target rank.

3. The method according to claim 2, characterized in that The sample query data includes a sample query statement and / or a sample query table. The obtaining of the target complexity of the corresponding query service based on the sample query data includes: Obtaining the length value of the sample query statement, and / or obtaining the number of rows and columns of the sample query table; Based on the length value, and / or the number of rows and the number of columns, obtain the target complexity; The length value, the number of rows and the number of columns are positively correlated with the target complexity.

4. The method according to claim 3, characterized in that The obtaining the target complexity based on the length value and / or the number of rows and the number of columns includes: Based on the length value, determining a first complexity; Determining a second complexity based on the number of rows and the number of columns; The target complexity is obtained by adding the first complexity to the second complexity; or, Obtain the target complexity by weighting the first complexity and the first weight, and the second complexity and the second weight; The length value is positively correlated with the first complexity, and the number of rows and the number of columns are positively correlated with the second complexity; the first weight corresponds to the length value, and the second weight corresponds to the number of rows and the number of columns.

5. The method according to any one of claims 2 to 4, characterized in that The method further comprises: Acquire an initial rank and a target adjustment coefficient; wherein the target adjustment coefficient is used to represent the adjustment coefficient corresponding to the optimal output result of the initial model; and the initial rank is used to represent the rank of the initial low-rank adaptation matrix; The determining the target rank based on the target complexity includes: The target rank is determined based on the initial rank, the target adjustment coefficient and the target complexity.

6. The method according to claim 5, characterized in that The determining the target rank based on the initial rank, the target adjustment coefficient and the target complexity includes: Obtaining a first rank by multiplying the target adjustment coefficient by the target complexity; The target rank is obtained by adding the initial rank to the first rank.

7. A vehicle data query method, characterized in that: The method comprises: Obtain the vehicle data to be queried input by the user; Inputting the to-be-queried vehicle data into the adjusted initial model to obtain a vehicle query result; Outputting the vehicle query result; Wherein, the adjustment method of the adjusted initial model is the method described in any one of claims 1 to 6.

8. A model adjustment device, characterized in that: The device comprises: An acquisition module, used to acquire an initial model and sample query data; wherein the initial model is used to represent a model trained based on the sample query data; A determination module, configured to determine a target rank of an initial low-rank adaptation matrix in the initial model based on the sample query data; A processing module, configured to obtain a target low-rank adaptation matrix based on the target rank and the initial low-rank adaptation matrix; An adjustment module is used to adjust the initial model based on the target low-rank adaptation matrix to obtain an adjusted initial model.

9. A vehicle data query device, characterized in that: The device comprises: The acquisition module is used to obtain the vehicle data to be queried input by the user; A query module, used for inputting the vehicle data to be queried into the adjusted initial model to obtain a vehicle query result; An output module is used to output vehicle query results; wherein the adjustment method of the adjusted initial model is the method described in any one of claims 1 to 6.

10. A vehicle, characterized in that: The vehicle comprises: A memory for storing executable program codes; A processor is used to call and run the executable program code from the memory so that the vehicle executes the method as claimed in any one of claims 1 to 7.