Model training method, model inference method, device, medium and program product
By screening attribute values related to the training objectives during model training and using the median and binary search algorithms of ordered arrays, the problems of slow training speed and high computing power under large data volumes are solved, achieving efficient model training and improving training accuracy.
Patent Information
- Application Number
- CN202510942156.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-09
- Publication Date
- 2025-09-23
- Estimated Expiration
- 2045-07-09
AI Technical Summary
In model training, as the amount of data increases, the problems of slow training speed and high computing power required for training are particularly prominent, especially when there is a large amount of data in the dataset that is not strongly related to or irrelevant to the training objectives, resulting in additional computing power consumption and low training efficiency.
By matching multiple attributes according to the application scenario of the target training task, the target sample data is determined, and the attribute values related to the training target are filtered out by the median using an ordered array, redundant data is eliminated, and a binary search algorithm is used to quickly determine the median to reduce the data volume and computational complexity.
It significantly improves model training efficiency, saves computing power, enhances the model's ability to capture key features, and improves training accuracy and generalization performance, especially in scenarios with large amounts of data.
Smart Images

Figure CN120450087B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of machine learning technology, and in particular to a model training method, a model reasoning method, a device, a medium, and a program product. Background Art
[0002] The ever-increasing amount of data in model training presents numerous challenges, such as slower training speeds and increased computing power requirements. This is especially true when a dataset contains a large amount of data that is weakly relevant to, or even irrelevant to, the training objective. The model then consumes additional computing power to process and analyze this data, further exacerbating the issues of slow training speeds and high computing power requirements. Summary of the Invention
[0003] In view of the above problems, the present application provides a model training method, a model reasoning method, an apparatus, a device, a medium and a program product.
[0004] According to the first aspect of the present application, a model training method is provided, comprising: determining at least one target sample data for each of a plurality of attributes that match an application scenario in a field to which a target training task belongs, the target sample data including the attribute value of any one of the plurality of attributes; training an initial model using the at least one target sample data to obtain a target model for the training task; wherein, for any one of the plurality of attributes, the at least one target sample data is determined in the following manner: obtaining at least two sample data for any one attribute, the sample data being an ordered array including at least one attribute value; determining a median of a plurality of attribute values in the ordered array pair based on an ordered array pair obtained from the at least two sample data; and screening a target attribute value from the ordered array pair based on the median and the training target of the target training task to obtain at least one target sample data.
[0005] The second aspect of the present application provides a model inference method, comprising: inputting attribute data of a task to be inferred that matches a target training task into a target model, and outputting an inference result; wherein the target model is obtained according to the above method.
[0006] The third aspect of the present application provides a model training device, comprising: a sample determination module, for determining at least one target sample data for each of multiple attributes that match the application scenario in the field to which the target training task belongs, wherein the target sample data includes the attribute value of any one of the multiple attributes; a training module, for training an initial model using the at least one target sample data to obtain a target model for the training task. For any one of the multiple attributes, the at least one target sample data is determined in the following manner: obtaining at least two sample data for any one attribute, wherein the sample data is an ordered array including at least one attribute value; determining the median of the multiple attribute values in the ordered array based on the ordered array pair obtained from the at least two sample data; and filtering the target attribute value from the ordered array pair based on the median and the training target of the target training task to obtain at least one target sample data.
[0007] The fourth aspect of the present application provides a model inference device, including: an inference module, used to input attribute data of the task to be inferred that matches the target training task into a target model and output an inference result; wherein the target model is obtained according to the above method.
[0008] The fifth aspect of the present application provides an electronic device, comprising: one or more processors; a memory for storing one or more computer programs, wherein the one or more processors execute the one or more computer programs to implement the steps of the above method.
[0009] The sixth aspect of the present application further provides a computer-readable storage medium having a computer program or instruction stored thereon, which implements the steps of the above method when the above computer program or instruction is executed by a processor.
[0010] The seventh aspect of the present application further provides a computer program product, comprising a computer program or instructions, which implement the steps of the above method when executed by a processor.
[0011] According to the embodiments of the present application, since the ordered array pair is composed of the attribute value of any attribute in a plurality of attributes, and the plurality of attributes are matched with the application scenario in the field to which the target training task belongs, therefore, by determining the median of the plurality of attribute values in the ordered array pair, redundant data irrelevant to the training target can be eliminated, thereby greatly reducing the amount of data, saving the computing power required for training the model, and significantly improving the efficiency of model training. In addition, since the median of the plurality of attribute values in the ordered array pair can focus on the core part of the data, it helps to enhance the model's ability to capture key features, thereby improving the model's training accuracy and generalization performance, especially in scenarios with a large amount of data, the advantages are more prominent. BRIEF DESCRIPTION OF THE DRAWINGS
[0012] The above contents and other objects, features and advantages of the present application will become more apparent through the following description of the embodiments of the present application with reference to the accompanying drawings.
[0013] Figure 1 An application scenario diagram of the model training method, model reasoning method, apparatus, equipment, medium, and program product according to an embodiment of the present application is shown.
[0014] Figure 2 A flowchart of a model training method according to an embodiment of the present application is shown.
[0015] Figure 3 A schematic diagram of determining a median according to an embodiment of the present application is shown.
[0016] Figure 4 A schematic diagram of determining the median of multiple attribute values in an ordered array pair consisting of a first ordered array and a second ordered array according to an embodiment of the present application is shown.
[0017] Figure 5 A schematic diagram of obtaining at least one target sample data according to an embodiment of the present application is shown.
[0018] Figure 6 A flowchart of a model reasoning method according to an embodiment of the present application is shown.
[0019] Figure 7 The figure shows a structural block diagram of a model training device according to an embodiment of the present application.
[0020] Figure 8 The figure shows a structural block diagram of a model inference device according to an embodiment of the present application.
[0021] Figure 9 A block diagram of an electronic device suitable for implementing a model training method and a model inference method according to an embodiment of the present application is shown. DETAILED DESCRIPTION
[0022] Hereinafter, embodiments of the present application will be described with reference to the accompanying drawings. However, it should be understood that these descriptions are exemplary only and are not intended to limit the scope of the present application. In the detailed description below, for ease of explanation, many specific details are set forth to provide a comprehensive understanding of the embodiments of the present application. However, it is apparent that one or more embodiments may also be implemented without these specific details. In addition, in the following description, descriptions of known structures and technologies are omitted to avoid unnecessarily confusing the concepts of the present application.
[0023] The terms used herein are only for describing specific embodiments and are not intended to limit the present application. The terms "comprise," "include," etc. used herein indicate the presence of features, steps, operations, and / or components, but do not exclude the presence or addition of one or more other features, steps, operations, or components.
[0024] All terms used herein (including technical and scientific terms) have the meanings commonly understood by those skilled in the art unless otherwise defined. It should be noted that the terms used herein should be interpreted as having a meaning consistent with the context of this specification and should not be interpreted in an idealized or overly rigid manner.
[0025] When expressions such as "at least one of A, B, and C, etc." are used, they should generally be interpreted in accordance with the meaning commonly understood by those skilled in the art (for example, "a system having at least one of A, B, and C" should include but is not limited to a system having A alone, B alone, C alone, A and B, A and C, B and C, and / or A, B, C, etc.).
[0026] In the process of implementing the embodiments of the present application, it was found that in a related example, by introducing a crowdsourcing-based model testing framework, each client participating in the crowdsourcing is allowed to use its own local data set to test the model, thereby solving the problem of test set construction. At the same time, by introducing a reputation mechanism based on a relevant consistency mechanism in the evaluation process, it is solved to ensure that the participating clients provide true and high-quality evaluations, enhance the credibility and effectiveness of the entire model training process, and ultimately promote the efficient, reliable and safe operation of the smart grid. However, there are still problems such as poor data quality and high preprocessing overhead of the data set, which affect the efficiency of model training.
[0027] In another related example, for the safety hazard inspection scenario of hazardous waste disposal plants, the target detection model in image recognition technology was optimized from the data set perspective. Relying on containerization technology and distributed file storage database technology, the automatic collection, labeling, automatic training and deployment of high-quality data sets of the target detection model were achieved in the safety hazard inspection scenario of hazardous waste disposal plants. However, the preprocessing overhead of the data set was high, which affected the efficiency of model training.
[0028] Since the amount of data is relatively large in the data preprocessing, performance evaluation, feature engineering, anomaly detection and model optimization stages, even though various tools are relatively flexible, it is still difficult to process them quickly and the accuracy is difficult to guarantee. Therefore, the model training efficiency is low.
[0029] In view of this, an embodiment of the present application provides a model training method, including: determining at least one target sample data for each of multiple attributes that match the application scenario in the field to which the target training task belongs, the target sample data including the attribute value of any one of the multiple attributes; using the at least one target sample data to train the initial model to obtain a target model for the training task; wherein, for any one of the multiple attributes, at least one target sample data is determined in the following manner: obtaining at least two sample data for any one attribute, the sample data being an ordered array including at least one attribute value; based on the ordered array pair obtained from the at least two sample data, determining the median of multiple attribute values in the ordered array pair; based on the median and the training target of the target training task, filtering the target attribute value from the ordered array pair to obtain at least one target sample data.
[0030] Figure 1 An application scenario diagram of the model training method, model reasoning method, apparatus, equipment, medium, and program product according to an embodiment of the present application is shown.
[0031] like Figure 1 As shown, the application scenario 100 according to this embodiment may include a first terminal device 101, a second terminal device 102, a third terminal device 103, a network 104, and a server 105. The network 104 is used as a medium for providing a communication link between the first terminal device 101, the second terminal device 102, the third terminal device 103, and the server 105. The network 104 may include various connection types, such as wired or wireless communication links or optical fiber cables.
[0032] A user may use a first terminal device 101, a second terminal device 102, or a third terminal device 103 to interact with a server 105 via a network 104 to receive or send messages, etc. Various communication client applications may be installed on the first terminal device 101, the second terminal device 102, or the third terminal device 103, such as an intelligent agent client, a model client, a web browser application, a search application, an instant messaging tool, an email client, a social platform software, etc. (for example only).
[0033] The first terminal device 101 , the second terminal device 102 , and the third terminal device 103 may be various electronic devices having display screens and supporting web browsing, including but not limited to smart phones, tablet computers, laptop computers, desktop computers, and the like.
[0034] The server 105 may be a server that provides various services, such as a background management server (for example only) that supports websites browsed by users using the first terminal device 101, the second terminal device 102, and the third terminal device 103. The background management server may analyze and process received data such as user requests, and feed back the processing results (such as the model parameters of the trained target model) to the terminal device.
[0035] It should be noted that the model training method and model reasoning method provided in the embodiment of the present application can generally be executed by the server 105. Accordingly, the model training device and model reasoning device provided in the embodiment of the present application can generally be set in the server 105. The model training method and model reasoning method provided in the embodiment of the present application can also be executed by a server or server cluster that is different from the server 105 and can communicate with the first terminal device 101, the second terminal device 102, the third terminal device 103 and / or the server 105. Accordingly, the model training device and model reasoning device provided in the embodiment of the present application can also be set in a server or server cluster that is different from the server 105 and can communicate with the first terminal device 101, the second terminal device 102, the third terminal device 103 and / or the server 105.
[0036] It should be understood that Figure 1 The number of the first terminal device, the second terminal device, the third terminal device, the network and the server is only illustrative. According to implementation requirements, there can be any number of the first terminal device, the second terminal device, the third terminal device, the network and the server.
[0037] The following will be based on Figure 1 The scene described by Figures 2 to 5 The model training method of the application embodiment is described in detail.
[0038] Figure 2 A flowchart of a model training method according to an embodiment of the present application is shown.
[0039] like Figure 2 As shown, the model training method of this embodiment includes operations S210 to S220.
[0040] In operation S210 , at least one target sample data is determined for each of a plurality of attributes that match an application scenario in a field to which a target training task belongs.
[0041] In operation S220, the initial model is trained using at least one target sample data to obtain a target model for the training task.
[0042] In the embodiment of the present application, the target sample data includes the attribute value of any attribute among multiple attributes.
[0043] Different training tasks can belong to different fields, and different fields can also have different application scenarios. Different application scenarios also require different attributes to match them.
[0044] Any attribute may include multiple attribute values, and the multiple attribute values may be in a numerical format that can be recognized by a computer.
[0045] For any of the multiple attributes, at least one target sample data is determined in the following manner: at least two sample data for the attribute are obtained. Based on an ordered array pair obtained from the at least two sample data, a median of multiple attribute values in the ordered array pair is determined. Based on the median and a training target of a target training task, a target attribute value is selected from the ordered array pair to obtain at least one target sample data.
[0046] The sample data may be an ordered array including at least one attribute value, and the ordered array may be arranged in ascending order or descending order.
[0047] The data sources of at least two sample data can be different, which can enhance the diversity of sample data and is beneficial to the accuracy of model training.
[0048] For example, attribute values in at least two sample data may be combined to obtain a new ordered array, and the median of multiple attribute values in the new ordered array may be determined based on the number of attribute values in the new ordered array.
[0049] The training target can be pre-configured based on the target training task. For different types of training targets, the filtering strategy for filtering the target attribute value from the ordered array pair is different.
[0050] Different types of training objectives can include, but are not limited to, anomaly detection, data normalization, data balancing, robustness training, and distribution analysis. For example, for anomaly detection, you can filter attribute values that are far from the median. For data normalization, you can filter attribute values that are close to the median. For data balancing, you can filter attribute values that are symmetrically distributed around the median. For robustness training, you can filter values within a certain range around the median. For distribution analysis, you can filter the relationship between different percentiles and the median.
[0051] The initial model can be a neural network model or a large language model, and can be determined based on the target training task. This application does not specifically limit the model training method. For example, the target sample data can be input into the initial model, the training reasoning results can be output, and the parameters of the initial model can be adjusted based on the training reasoning results until the number of training iterations reaches the maximum number, thereby obtaining the target model for the training task.
[0052] Since an ordered array pair is composed of the attribute values of any of multiple attributes, and multiple attributes match the application scenario in the field to which the target training task belongs, by determining the median of multiple attribute values in the ordered array pair, redundant data irrelevant to the training target can be eliminated, thereby significantly reducing the amount of data, saving the computing power required to train the model, and significantly improving model training efficiency. In addition, since the median of multiple attribute values in the ordered array pair can focus on the core part of the data, it helps to enhance the model's ability to capture key features, thereby improving the model's training accuracy and generalization performance. This advantage is particularly prominent in scenarios with large amounts of data.
[0053] During the implementation of the embodiments of the present application, it was found that although the median can be determined based on the number of ordered array pairs after merging the ordered array pairs, this method is less efficient when the ordered array pairs have many attribute values and are long.
[0054] Based on this, in this embodiment, for the above-mentioned ordered array pair obtained from at least two sample data, determining the median of multiple attribute values in the ordered array pair can include the following operations: based on the multiple attribute values in the ordered array pair, using a binary search algorithm to determine the median of the multiple attribute values in the ordered array pair.
[0055] Exemplarily, the maximum and minimum values of multiple attribute values in an ordered array pair can be determined, and then a binary search can be performed between the maximum and minimum values. For any candidate attribute value, the number of values in the ordered array pair that are less than or equal to the candidate attribute value is counted, the search range is adjusted according to the positional relationship between the number and the median, and the median is determined according to the parity of the number.
[0056] Because using a binary search algorithm to determine the median significantly reduces computational time and space complexity, it can also reduce the time required to pre-process the sample data. Combined with excluding data irrelevant to the training objective, this can further reduce the computing power required for training and speed up training.
[0057] In another example, determining a median of the multiple attribute values in the ordered array pair using a binary search algorithm based on multiple attribute values in the ordered array pair may include: when it is determined that the attribute values in any ordered array in the ordered array pair are arranged in ascending order, dividing the total number of the multiple attribute values in the ordered array pair into two equal parts and rounding the result to obtain a reference position. Determining the median based on the reference position.
[0058] The reference position indicates the position of the associated attribute value associated with the median when multiple attribute values in the ordered array pair are arranged in order.
[0059] For example, when the total number of attribute values in the ordered array pair is an odd number, the position of the attribute value associated with the median is the position of the median. When the total number of attribute values in the ordered array pair is an even number, the position of the attribute value associated with the median is the position of the attribute values on both sides of the center of the median.
[0060] Rounding can include rounding up or rounding down.
[0061] The reference position is helpful to accurately locate the center position of the data, which in turn helps to improve the data quality of the target sample data.
[0062] Figure 3 A schematic diagram of determining a median according to an embodiment of the present application is shown.
[0063] In yet another example, the ordered array pair may include a first ordered array and a second ordered array. Based on the reference position, determining the median may include: Figure 3 Operations S301~S310 are shown.
[0064] In operation S301, it is determined whether the reference position meets a predetermined condition. If it is determined that the reference position does not meet the predetermined condition, operation S303 is performed. If it is determined that the reference position meets the predetermined condition, operation S302 is performed.
[0065] In operation S302 , a median is determined based on attribute values at reference positions in the first ordered array and the second ordered array, respectively.
[0066] In operation S303 , a first removal strategy is determined based on an operation of dividing the number of reference positions into two equal parts and then rounding the number of reference positions.
[0067] In operation S304 , based on the first removal strategy, the first ordered array or the second ordered array is updated.
[0068] In operation S305 , the reference position is updated to obtain an updated reference position.
[0069] In operation S306, it is determined whether the updated reference position meets the predetermined condition. If it is determined that the updated reference position meets the predetermined condition, operation S307 is performed. If it is determined that the updated reference position does not meet the predetermined condition, operation S308 is performed.
[0070] In operation S307 , a median is determined based on the attribute value located at a reference position in the updated first ordered array or the updated second ordered array.
[0071] In operation S308 , a second removal strategy is determined based on an operation of dividing the position number of the updated reference position into two equal parts and then rounding it to an integer.
[0072] In operation S309 , the updated reference position is updated again to obtain a target reference position.
[0073] In operation S310 , a median is determined based on the attribute value at the target reference position in the first ordered array or the second ordered array after the second removal strategy is updated.
[0074] The predetermined condition may indicate that the reference position is located at the first position in an ordered array pair in which a plurality of attribute values are arranged in order. That is, when the reference position is the kth position, when k=1, the reference position may be considered to meet the predetermined condition. The attribute values at the reference positions in the first and second ordered arrays, respectively, i.e., the attribute values in the first and second ordered arrays, may be averaged to obtain the median. When k≠1, the reference position may be considered to not meet the predetermined condition.
[0075] The first removal strategy may indicate the attribute values in the first ordered array or the second ordered array that need to be removed.
[0076] For example, when k≠1, the comparison position for comparing the attribute values in the first ordered array and the second ordered array can be determined based on the operation of dividing the number of positions of the reference position into two equal parts and then rounding it. When it is determined that the number of positions of the comparison position is less than or equal to the number of multiple attribute values in the first ordered array and the number of multiple attribute values in the second ordered array, the comparison attribute values of the first ordered array and the second ordered array at the comparison position are determined. When it is determined that the comparison attribute value of the first ordered array is greater than the comparison attribute value of the second ordered array, it can be determined that the first removal strategy is to remove the attribute values at the comparison position and before the comparison position in the second ordered array. Executing the first removal strategy can obtain the second ordered array after removal. When it is determined that the comparison attribute value of the first ordered array is less than or equal to the comparison attribute value of the second ordered array, it can be determined that the first removal strategy is to remove the attribute values at the comparison position and before the comparison position in the first ordered array. Executing the first removal strategy can obtain the first ordered array after removal.
[0077] The second removal strategy indicates the attribute values in the updated first ordered array or the updated second ordered array that need to be removed.
[0078] By updating the reference position, it can be determined whether the updated reference position meets the predetermined conditions, that is, when the updated reference position is the k'th position, when k'=1, it can be considered to meet the predetermined conditions, and when k'≠1, it can be considered not to meet the predetermined conditions. When k'≠1, the operation of dividing into two equal parts and rounding up can be continued on k' to update the comparison position and obtain the updated comparison position. Taking the first removal strategy for the removal of attribute values in the second ordered array as an example, after obtaining the updated comparison position, it can be determined again whether the number of positions of the updated comparison position is less than or equal to the number of multiple attribute values in the first ordered array and the number of multiple attribute values in the second ordered array after removal. If so, the comparison attribute values of the first ordered array and the second ordered array after removal at the comparison positions can be determined respectively. If the comparison attribute value of the first ordered array is less than or equal to the comparison attribute value of the second ordered array after removal, it can be determined that the second removal strategy is to remove the attribute values in the first ordered array located at the updated comparison position and before the updated comparison position. By executing the second removal strategy, the first ordered array after removal can be obtained. If the comparison attribute value of the first ordered array is greater than the comparison attribute value of the second ordered array after removal, the second removal strategy can be determined to remove the attribute value located at the updated comparison position and before the updated comparison position in the second ordered array after removal. If the number of positions of the updated comparison position is not less than or equal to the number of the multiple attribute values in the first ordered array and the number of the multiple attribute values in the second ordered array after removal, the last attribute value in the first ordered array can be used as a candidate attribute value, and the median is determined based on the candidate attribute value.
[0079] The updated reference position can be updated again to obtain the target reference position. In this embodiment, the target reference position can be considered to meet the predetermined conditions. However, it should be noted that in other embodiments, the target reference position may not meet the predetermined conditions, and the target reference position can be updated by repeatedly performing the operation of bisection and rounding until the updated target reference position meets the predetermined conditions.
[0080] Since the reference position in an ordered array pair indicates the position of the associated attribute value associated with the median when multiple attribute values are arranged in order, the median can be quickly and accurately located based on the reference position. In addition, since the ordered array pair is not rearranged, there is no need to fully traverse the data, which can improve computational efficiency. On this basis, by dividing the number of reference positions into two equal parts and then rounding them, a removal strategy is determined, which can more accurately determine the median and ensure the representativeness of the median as a data center point. This helps with subsequent model training, allowing the model to focus more on the parts associated with the training objectives, thereby improving training accuracy and efficiency.
[0081] For example, updating the reference position to obtain an updated reference position may include: obtaining the position number of the updated reference position based on the difference between the position number of the reference position and the halves of the position number of the reference position; and changing the position number of the reference position to the position number of the updated reference position.
[0082] The halved fraction of the position number of the reference position may be obtained by dividing the position number of the reference position by half and then rounding down.
[0083] By updating the reference position, the search range can be accurately reduced, which is conducive to quickly determining the median.
[0084] It should be noted that the operation of re-updating the updated reference position may be the same as the operation of updating the reference position described above.
[0085] Figure 4 A schematic diagram of determining the median of multiple attribute values in an ordered array pair consisting of a first ordered array and a second ordered array according to an embodiment of the present application is shown.
[0086] like Figure 4 As shown, in the ordered array pair 401, taking the first ordered array A and the second ordered array B as an example, the total number of attribute values of the first ordered array A and the second ordered array B is 13. After performing halving and rounding up, k = 7 can be obtained. By performing halving and rounding down on k = 7 and subtracting 1, the number of comparison positions m = 2 is obtained.
[0087] For multiple attribute values in the first ordered array A or the second ordered array B: the first position of the attribute value in the first ordered array A or the second ordered array B can be marked as the starting position, and the position number is 0. Similarly, the position number corresponding to any position of the attribute value in the first ordered array A or the second ordered array B can be determined.
[0088] According to the number of comparison positions m=2, it can be determined that the comparison attribute value of the first ordered array A is 4, and the comparison attribute value of the second ordered array B is 3, such as Figure 4 In the figure, the dotted ellipse is used to mark the ordered array pair 402 of the comparison attribute values.
[0089] Since the comparison attribute value of the first ordered array A is greater than the comparison attribute value of the second ordered array B, that is, 4>3, it can be determined that the first removal strategy is to remove the comparison attribute value of the second ordered array B and the attribute value located before the comparison attribute value, that is, remove 1, 2, and 3 in the second ordered array B. By dividing k=7 into two equal parts and rounding it down, it can be obtained that the bisection of k is 3, and the difference between the bisections of k and k is 4, that is, k'=4. By dividing k'=4 into two equal parts and rounding it down and subtracting 1, the updated position number of the comparison position m'=1 is obtained. It can be determined that the comparison attribute value of the first ordered array A is 3, and the comparison attribute value of the second ordered array B after removal is 5, as shown in Figure 4 In the figure, the removed attribute values are marked with squares, and the updated ordered array of the compared attribute values is marked with dotted elliptical circles as shown in 403 .
[0090] Since the comparison attribute value of the first ordered array A is smaller than the comparison attribute value of the second ordered array B after removal, that is, 3<5, it can be determined that the second removal strategy is to remove the updated comparison attribute value of the first ordered array A and the attribute value before the updated comparison attribute value, that is, remove 1 and 3 in the first ordered array A. By dividing k'=4 into two equal parts and rounding it down, it can be obtained that the halves of k' are 2, and the difference between the halves of k' and k' is 2, that is, the number of positions of the target reference position is k''=2. This example is an example where the target reference position does not meet the predetermined conditions. By dividing k''=2 into two equal parts and rounding it down and subtracting 1, the number of positions of the target comparison position is m''=0. It can be determined that the target comparison attribute value of the first ordered array A after removal is 4, and the target comparison attribute value of the second ordered array B after removal is 4, as shown in Figure 4 In the figure, the removed attribute values are marked with boxes, and the ordered array of target comparison attribute values is marked with dotted elliptical circles as shown in 404 .
[0091] Since the target comparison attribute value of the first ordered array A after removal is equal to the target comparison attribute value of the second ordered array B after removal, that is, 4=4, it can be determined that the third removal strategy is to remove the target comparison attribute value of the first ordered array A after removal and the attribute value before the target comparison attribute value, that is, to remove 4 from the first ordered array A again. By performing a halving on k''=2 and rounding it down, it can be obtained that the halving of k'' is 1, and the difference between the halvings of k'' and k'' is 1, that is, the position number of the updated target reference position is k'''=1, that is, the updated target reference position meets the predetermined conditions. Figure 4 In the figure, the removed attribute values are marked with squares, and the updated ordered array of target comparison attribute values is marked with dotted elliptical circles as shown in 405 .
[0092] Since the updated target comparison attribute value corresponding to the first ordered array A is greater than the updated target comparison attribute value corresponding to the second ordered array B, that is, 9>4, it can be determined that the median of the ordered array pair 401 is 4.
[0093] Rearranging multiple attribute values is time-consuming and computationally expensive, especially for large data volumes. Determining the median bypasses this energy-consuming process, improving efficiency. Furthermore, in some cases, the order of data contains crucial information, and reordering it can disrupt underlying patterns and associations, compromising the accuracy of subsequent analysis. Furthermore, directly determining the median simplifies data processing, reduces the risk of errors caused by moving or restoring data, and improves the stability and reliability of overall data processing.
[0094] For example, the target training task may belong to one of the following fields: image processing and time series analysis. If the target training task is determined to belong to image processing, the application scenario may include one of the following: recognition, reconstruction, question answering, and data augmentation. If the training task is determined to belong to time series analysis, the application scenario may include trend prediction or anomaly detection.
[0095] For example, attributes matching recognition may include at least one of the following: pixel value matrix, color histogram, texture features, and shape features. Attributes matching reconstruction may include at least one of the following: low-frequency components, high-frequency components, viewing angle, and depth. Attributes matching question-answering may include at least one of the following: visual features and spatial relationship features. Attributes matching data augmentation may include one of the following: data augmentation parameters, image resolution, and color jitter parameters. Attributes matching trend prediction or anomaly detection may include at least one of the following: timestamp, measurement value, and growth rate.
[0096] Exemplarily, obtaining at least two sample data for any attribute may include the following operations: for any one of the at least two sample data for any attribute, obtaining multiple attribute values corresponding to the attribute from different data sources, and arranging them in a preset order to obtain any one sample data.
[0097] The preset order may include but is not limited to order from small to large, etc.
[0098] Data sources may include but are not limited to open source databases, log files, etc.
[0099] For example, for the server log files, regular expressions can be used to extract timestamps and server performance indicators such as response time, processor usage rate, processor usage growth rate, etc., determine multiple attribute values corresponding to each attribute such as timestamp, response time, processor usage rate, processor usage growth rate, and obtain multiple sample data.
[0100] Furthermore, based on the above median determination method, the median of multiple attribute values corresponding to each attribute can be determined, thereby determining the target sample data, training the target model, and thus performing anomaly detection on server performance.
[0101] Obtaining attribute values for multiple attributes that match the application scenarios in the target training task domain as training samples ensures data relevance and validity. This allows the model to focus on key features during training and better capture data patterns, thereby improving the model's accuracy and generalization capabilities, enabling it to perform well in real-world applications while avoiding interference from irrelevant data and improving training efficiency.
[0102] Exemplarily, the training objectives may include at least one of the following: model training accuracy, training cost, and application scenario.
[0103] Figure 5 A schematic diagram of obtaining at least one target sample data according to an embodiment of the present application is shown.
[0104] like Figure 5 As shown, based on the median and the training target of the target training task, the target attribute value is filtered from the ordered array pair to obtain at least one target sample data, which may include operations S510~S530.
[0105] In operation S510 , the distribution of multiple attribute values in the ordered array pair is determined according to the median.
[0106] In operation S520 , a screening strategy is determined according to the distribution of multiple attribute values in the ordered array pairs and a training objective.
[0107] In operation S530 , target attribute values are filtered from the ordered array pairs according to a filtering strategy.
[0108] In this embodiment of the application, if the attribute values in the ordered array pair are symmetrically distributed on both sides of the median, it means that the attribute value distribution is relatively uniform and may be close to a normal distribution. Since the degree of deviation of the data is low, the model may converge more easily during training. If the attribute values in the ordered array pair are too large or too small on both sides of the median, it means that the attribute value distribution is uneven. Since the degree of deviation of the data is high, the model may need to pay more attention to attribute values that deviate far from the median during training.
[0109] Model training accuracy and training cost can be used to determine the amount of training data. The application scenario can be used to determine the scope of training sample screening. Based on the requirements for model training accuracy and training cost, a predetermined amount of training data can be configured to match the required amount. Based on the application scenario, value requirements associated with the distribution of multiple attribute values can be configured in advance. The screening strategy can then be determined based on the predetermined amount of training data and the value requirements.
[0110] For example, if the planned training data volume is 20% of the original sample data, and the value requirements for the reconstructed application scenario indicate that the values need to be evenly distributed, the screening strategy can be determined to screen 20% of the attribute values around the median as the target attribute value. If the planned training data volume is 20% of the original sample data, and the value requirements for the anomaly detection application scenario indicate that the values need to be unevenly distributed, the screening strategy can be determined to screen 10% of the attribute values farther from the median and 10% of the attribute values closer to the median as the target attribute value.
[0111] Because the selection strategy comprehensively considers factors such as model training accuracy, training cost, application scenarios, and median values, we can ensure that the selected attribute values not only represent the key characteristics of the data but also efficiently support model training within limited resources. This comprehensive consideration helps balance model performance and computing resource consumption, ensuring that the model meets business needs while avoiding unnecessary data processing and computing burdens.
[0112] In another real-time example of the present application, after determining the target attribute value to obtain at least one target sample data, the initial model can also be trained using the target sample data. After obtaining the target model, the target model is evaluated using the validation set. If the evaluation index value is less than the threshold, feedback information is generated and sent to the client so that the client can update the predetermined amount of training data and value requirements that match the requirements of model training accuracy and training cost. Based on the updated predetermined amount of training data and the updated value requirements, the screening strategy is updated, and then the target sample data is updated.
[0113] For example, feedback can indicate that the target model does not meet the training objectives. The client can adjust the required training data volume and value requirements, such as expanding or narrowing the filtering range around the median, or redefining the attribute value range closely related to the training objectives.
[0114] Since the above feedback mechanism enables the client to adjust the sample data in a timely manner according to the actual performance of the model, it can ensure the dynamic optimization of the model training data, improve the training efficiency and final performance of the model, and make it better meet the actual application needs.
[0115] Since model optimization usually involves multiple training of the model and comparing the performance under different parameter settings, in some cases, these performance indicators may exist in the form of ordered arrays. Therefore, the method of determining the median in this application can also be applied to determine the performance indicator threshold in the performance indicator, which is used to evaluate the performance of the model on different data sets.
[0116] Based on the above model training method, this application also provides a model reasoning method. Figure 6 The model inference method is described in detail.
[0117] Figure 6 A flowchart of a model reasoning method according to an embodiment of the present application is shown.
[0118] like Figure 6 As shown, the model inference method of this embodiment may include operation S610.
[0119] In operation S610 , attribute data of a task to be inferred that matches a target training task is input into a target model, and an inference result is output.
[0120] For example, the task to be inferred may be to identify a target object in images taken from different angles, and the attribute data may include but is not limited to a pixel value matrix, texture eigenvalues, shape eigenvalues, etc. of the target object.
[0121] The inference result can be the category of the target object, etc.
[0122] It should be noted that the target model is trained according to the above model training method, which will not be described here.
[0123] Based on the above model training method, this application also provides a model training device. Figure 7 The device is described in detail.
[0124] Figure 7 The figure shows a structural block diagram of a model training device according to an embodiment of the present application.
[0125] like Figure 7 As shown, the model training device 700 of this embodiment includes a sample determination module 710 and a training module 720. The sample determination module 710 is used to determine at least one target sample data for each of the multiple attributes that match the application scenario in the field to which the target training task belongs, and the target sample data includes the attribute value of any attribute among the multiple attributes. The training module 720 is used to train the initial model using at least one target sample data to obtain a target model for the training task. For any attribute among the multiple attributes, at least one target sample data is determined in the following manner: obtaining at least two sample data for any attribute, the sample data being an ordered array including at least one attribute value; determining the median of multiple attribute values in the ordered number based on the ordered array pair obtained from the at least two sample data; and filtering the target attribute value from the ordered array pair based on the median and the training target of the target training task to obtain at least one target sample data.
[0126] According to an embodiment of the present application, based on an ordered array pair obtained from at least two sample data, the median of multiple attribute values in the ordered array pair is determined, including: based on the multiple attribute values in the ordered array pair, using a binary search algorithm to determine the median of multiple attribute values in the ordered array pair.
[0127] According to an embodiment of the present application, based on multiple attribute values in an ordered array pair, a binary search algorithm is used to determine the median of multiple attribute values in the ordered array pair, including: when it is determined that the attribute values in any ordered array in the ordered array pair are arranged in ascending order, the total number of multiple attribute values in the ordered array pair is divided into two equal parts and then rounded to obtain a reference position, the reference position indicates the position of the associated attribute value associated with the median when the multiple attribute values in the ordered array pair are arranged in ascending order; based on the reference position, the median is determined.
[0128] According to an embodiment of the present application, an ordered array pair includes a first ordered array and a second ordered array; based on a reference position, a median is determined, including: when it is determined that the reference position does not meet a predetermined condition, based on an operation of dividing the number of positions of the reference position into two equal parts and then rounding, determining a first removal strategy, the first removal strategy indicating the attribute value in the first ordered array or the second ordered array that needs to be removed; based on the first removal strategy, updating the first ordered array or the second ordered array; updating the reference position to obtain an updated reference position; when it is determined that the updated reference position meets the predetermined condition, determining the median based on the attribute value located at the reference position in the updated first ordered array or the updated second ordered array.
[0129] According to an embodiment of the present application, the reference position is updated to obtain an updated reference position, including: obtaining the position number of the updated reference position based on the difference between the position number of the reference position and the halves of the position number of the reference position; and changing the position number of the reference position to the position number of the updated reference position.
[0130] According to an embodiment of the present application, determining the median based on the reference position also includes: when it is determined that the updated reference position does not meet the predetermined conditions, determining a second removal strategy based on an operation of dividing the position number of the updated reference position into two equal parts and then rounding it, the second removal strategy indicating the attribute value in the updated first ordered array or the updated second ordered array that needs to be removed; when it is determined that the target reference position obtained by updating the reference position meets the predetermined conditions, determining the median based on the attribute value located at the target reference position in the updated first ordered array or the second ordered array according to the second removal strategy.
[0131] According to an embodiment of the present application, determining the median based on the reference position includes: when it is determined that the reference position meets a predetermined condition, determining the median based on the attribute values at the reference position in the first ordered array and the second ordered array respectively.
[0132] According to an embodiment of the present application, obtaining at least two sample data for any attribute includes: for any one of the at least two sample data for any attribute, obtaining multiple attribute values corresponding to the attribute from different data sources, and arranging them in a preset order to obtain any one sample data.
[0133] According to an embodiment of the present application, the field to which the target training task belongs includes one of the following: image processing, time series analysis; when it is determined that the field to which the training task belongs is image processing, the application scenario includes one of the following: recognition, reconstruction, question and answer, and data expansion; when it is determined that the field to which the training task belongs is time series analysis, the application scenario includes: trend prediction or anomaly detection.
[0134] According to an embodiment of the present application, the attributes that match recognition include at least one of the following: pixel value matrix, color histogram, texture features, shape features; the attributes that match reconstruction include at least one of the following: low-frequency components, high-frequency components, viewing angle, depth, or the attributes that match question and answer include at least one of the following: visual features, spatial relationship features; the attributes that match data expansion include one of the following: data enhancement parameters, image resolution, color jitter parameters; the attributes that match trend prediction or anomaly detection include at least one of the following: timestamp, measurement value, growth rate.
[0135] According to an embodiment of the present application, the training objectives include at least one of the following: model training accuracy, training cost, and application scenarios; based on the training objectives of the median and the target training task, the target attribute value is filtered from the ordered array pair to obtain at least one target sample data, including: determining the distribution of multiple attribute values in the ordered array pair according to the median; determining the filtering strategy according to the distribution of multiple attribute values in the ordered array pair and the training objectives; and filtering the target attribute value from the ordered array pair according to the filtering strategy.
[0136] Figure 8 The figure shows a structural block diagram of a model inference device according to an embodiment of the present application.
[0137] like Figure 8 As shown, the model reasoning device 800 of this embodiment includes a reasoning module 810.
[0138] The reasoning module 810 is used to input the attribute data of the task to be reasoned that matches the target training task into the target model and output the reasoning result.
[0139] It should be noted that the target model is trained according to the above model training method, which will not be described here.
[0140] According to embodiments of the present application, any multiple modules in the sample determination module 710 and the training module 720, or the inference module 810, may be combined into a single module, or any one of these modules may be split into multiple modules. Alternatively, at least part of the functionality of one or more of these modules may be combined with at least part of the functionality of other modules and implemented in a single module. According to embodiments of the present application, at least one of the sample determination module 710 and the training module 720, or the inference module 810, may be at least partially implemented as a hardware circuit, such as a field programmable gate array (FPGA), a programmable logic array (PLA), a system on a chip, a system on a substrate, a system on a package, an application-specific integrated circuit (ASIC), or may be implemented in hardware or firmware through any other reasonable means of circuit integration or packaging, or may be implemented in any one of the three implementation methods of software, hardware, and firmware, or any appropriate combination of any of these. Alternatively, at least one of the sample determination module 710 and the training module 720, or the inference module 810, may be at least partially implemented as a computer program module that, when executed, performs the corresponding functionality.
[0141] Figure 9 A block diagram of an electronic device suitable for implementing a model training method and a model inference method according to an embodiment of the present application is shown.
[0142] like Figure 9 As shown, an electronic device 900 according to an embodiment of the present application includes a processor 901, which can perform various appropriate actions and processes based on programs stored in a read-only memory (ROM) 902 or programs loaded from a storage unit 908 into a random access memory (RAM) 903. The processor 901 may include, for example, a general-purpose microprocessor (e.g., a CPU), an instruction set processor and / or related chipsets and / or a dedicated microprocessor (e.g., an application-specific integrated circuit (ASIC)), etc. The processor 901 may also include onboard memory for caching purposes. The processor 901 may include a single processing unit or multiple processing units for performing different actions of the method flow according to the embodiment of the present application.
[0143] Various programs and data required for the operation of the electronic device 900 are stored in the RAM 903. The processor 901, the ROM 902, and the RAM 903 are connected to each other via a bus 904. The processor 901 performs various operations of the method flow according to the embodiment of the present application by executing the programs in the ROM 902 and / or the RAM 903. It should be noted that the programs may also be stored in one or more memories other than the ROM 902 and the RAM 903. The processor 901 may also perform various operations of the method flow according to the embodiment of the present application by executing the programs stored in one or more memories.
[0144] According to an embodiment of the present application, electronic device 900 may further include an input / output (I / O) interface 905, which is also connected to bus 904. Electronic device 900 may also include one or more of the following components connected to I / O interface 905: an input section 906 including a keyboard, mouse, etc.; an output section 907 including devices such as a cathode ray tube (CRT), liquid crystal display (LCD), and speakers; a storage section 908 including a hard disk; and a communication section 909 including a network interface card such as a LAN card or modem. Communication section 909 performs communication processing via a network such as the Internet. A drive 910 is also connected to I / O interface 905 as needed. Removable media 911, such as a magnetic disk, optical disk, magneto-optical disk, semiconductor memory, etc., is installed in drive 910 as needed, so that computer programs read from the removable media can be installed into storage section 908 as needed.
[0145] This application also provides a computer-readable storage medium, which may be included in the device / apparatus / system described in the above embodiments, or may exist independently and not be incorporated into the device / apparatus / system. The computer-readable storage medium carries one or more programs, and when the one or more programs are executed, the method according to the embodiments of this application is implemented.
[0146] According to an embodiment of the present application, a computer-readable storage medium may be a non-volatile computer-readable storage medium, and may include, for example, but not limited to: a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof. In the present application, a computer-readable storage medium may be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. For example, according to an embodiment of the present application, a computer-readable storage medium may include the ROM 902 and / or RAM 903 described above and / or one or more memories other than ROM 902 and RAM 903.
[0147] The embodiments of the present application also include a computer program product, which includes a computer program containing program code for executing the method shown in the flowchart. When the computer program product is run in a computer system, the program code is used to enable the computer system to implement the method provided in the embodiments of the present application.
[0148] The computer program executes the above functions defined in the system / device of the embodiment of the present application when the processor 901 executes the computer program. According to the embodiment of the present application, the system, device, module, unit, etc. described above can be implemented by a computer program module.
[0149] In one embodiment, the computer program may be stored on a tangible storage medium such as an optical storage device or a magnetic storage device. In another embodiment, the computer program may be transmitted and distributed in the form of a signal on a network medium, downloaded and installed via the communication portion 909, and / or installed from a removable medium 911. The program code contained in the computer program may be transmitted using any appropriate network medium, including but not limited to wireless, wired, or any suitable combination thereof.
[0150] In such an embodiment, the computer program can be downloaded and installed from a network via the communication section 909, and / or installed from a removable medium 911. When the computer program is executed by the processor 901, the above-mentioned functions defined in the system of the embodiment of the present application are performed. According to the embodiment of the present application, the systems, devices, means, modules, units, etc. described above can be implemented by computer program modules.
[0151] According to an embodiment of the present application, the program code for executing the computer program provided by the embodiment of the present application can be written in any combination of one or more programming languages. Specifically, these computer programs can be implemented using high-level procedural and / or object-oriented programming languages, and / or assembly / machine languages. Programming languages include, but are not limited to, languages such as Java, C++, Python, "C" or similar programming languages. The program code can be executed entirely on the user computing device, partially on the user device, partially on a remote computing device, or entirely on a remote computing device or server. In the case of a remote computing device, the remote computing device can be connected to the user computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or can be connected to an external computing device (for example, using an Internet service provider to connect via the Internet).
[0152] The flowcharts and block diagrams in the accompanying drawings illustrate the possible implementation architecture, functions and operations of the systems, methods and computer program products according to various embodiments of the present application. In this regard, each box in the flowchart or block diagram can represent a module, program segment, or a part of code, and the above-mentioned module, program segment, or a part of code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in an order different from that marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flowchart, and the combination of the boxes in the block diagram or flowchart, can be implemented with a dedicated hardware-based system that performs the specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0153] Those skilled in the art will appreciate that the features described in the various embodiments of this application may be combined and / or coupled in various ways, even if such combinations or couplings are not explicitly described in this application. In particular, the features described in the various embodiments of this application may be combined and / or coupled in various ways without departing from the spirit and teachings of this application. All such combinations and / or couplings fall within the scope of this application.
[0154] The embodiments of the present application have been described above. However, these embodiments are for illustrative purposes only and are not intended to limit the scope of the present application. Although each embodiment has been described separately above, this does not mean that the measures in each embodiment cannot be advantageously used in combination. Without departing from the scope of the present application, those skilled in the art may make various substitutions and modifications, and these substitutions and modifications should all fall within the scope of the present application.
Claims
1. A model training method, characterized in that: The method comprises: For each of the multiple attributes that match the application scenario in the field of the target training task, at least one target sample data is determined, the target sample data including the attribute value of any one of the multiple attributes, the field of the target training task including one of the following: image processing, time series analysis; when the field of the training task is determined to be image processing, the application scenario includes one of the following: recognition, reconstruction, question answering, and data augmentation; when the field of the training task is determined to be time series analysis, the application scenario includes trend prediction or anomaly detection; Training an initial model using at least one target sample data to obtain a target model for the training task; For any one of the multiple attributes, the data of at least one target sample is determined using the following method: Obtain at least two sample data for any of the attributes, where the sample data is an ordered array including at least one attribute value; Determining the median of a plurality of attribute values in the ordered array pair based on the ordered array pair obtained from at least two of the sample data; Based on the median and the training target of the target training task, target attribute values are filtered from the ordered array pairs to obtain at least one target sample data.
2. The method according to claim 1, characterized in that The determining of the median of multiple attribute values in the ordered array pair based on the ordered array pair obtained from at least two of the sample data includes: Based on the multiple attribute values in the ordered array pair, a median of the multiple attribute values in the ordered array pair is determined using a binary search algorithm.
3. The method according to claim 2, characterized in that Determining the median of the plurality of attribute values in the ordered array pair by using a binary search algorithm based on the plurality of attribute values in the ordered array pair includes: When it is determined that the attribute values in any ordered array of the ordered array pair are arranged in ascending order, a total number of the multiple attribute values in the ordered array pair is divided into two equal parts and then rounded to an integer to obtain a reference position, the reference position indicating a position of an associated attribute value associated with the median when the multiple attribute values in the ordered array pair are arranged in order; Based on the reference position, the median is determined.
4. The method according to claim 3, characterized in that The ordered array pair includes a first ordered array and a second ordered array; The determining the median based on the reference position includes: In a case where it is determined that the reference position does not meet the predetermined condition, determining a first removal strategy based on an operation of dividing the number of positions of the reference position by two and then rounding it off, the first removal strategy indicating attribute values in the first ordered array or the second ordered array that need to be removed; Based on the first removal strategy, updating the first ordered array or the second ordered array; Updating the reference position to obtain an updated reference position; When it is determined that the updated reference position meets the predetermined condition, the median is determined based on the attribute value located at the reference position in the updated first ordered array or the updated second ordered array.
5. The method according to claim 4, characterized in that The updating of the reference position to obtain an updated reference position includes: Obtaining an updated position number of the reference position according to a difference between the position number of the reference position and a halves of the position number of the reference position; The position number of the reference position is changed to the position number of the updated reference position.
6. The method according to claim 4, characterized in that The determining the median based on the reference position further includes: If it is determined that the updated reference position does not meet the predetermined condition, determining a second removal strategy based on an operation of dividing the position number of the updated reference position by half and then rounding it off, the second removal strategy indicating attribute values in the updated first ordered array or the updated second ordered array that need to be removed; When it is determined that the target reference position obtained by updating the reference position meets the predetermined condition, the median is determined based on the attribute value located at the target reference position in the first ordered array or the second ordered array after the second removal strategy is updated.
7. The method according to claim 4, characterized in that The determining the median based on the reference position includes: When it is determined that the reference position meets the predetermined condition, the median is determined according to the attribute values at the reference position in the first ordered array and the second ordered array respectively.
8. The method according to claim 1, characterized in that The acquiring of at least two sample data for any of the attributes includes: For any one of the at least two sample data of any one of the attributes, multiple attribute values corresponding to the attribute are acquired from different data sources and arranged in a preset order to obtain the sample data.
9. The method according to claim 1, characterized in that The attributes matched with the identification include at least one of the following: pixel value matrix, color histogram, texture feature, shape feature; The attributes matched with the reconstruction include at least one of the following: low-frequency component, high-frequency component, viewing angle, depth, or the attributes matched with the question-answer include at least one of the following: visual features, spatial relationship features; The attribute matched with the data augmentation includes one of the following: data augmentation parameter, image resolution, color jitter parameter; The attributes matching the trend prediction or the anomaly detection include at least one of the following: a timestamp, a measurement value, and a growth rate.
10. The method according to claim 1, characterized in that The training objectives include at least one of the following: model training accuracy, training cost, and the application scenario; The step of filtering target attribute values from the ordered array pairs based on the median and the training target of the target training task to obtain at least one target sample data includes: Determining, based on the median, a distribution of multiple attribute values in the ordered array pair; Determining a screening strategy based on the distribution of multiple attribute values in the ordered array pair and the training goal; The target attribute value is filtered from the ordered array pair according to the filtering strategy.
11. A model reasoning method, characterized in that: The method comprises: Input the attribute data of the task to be inferred that matches the target training task into the target model and output the inference result; The target model is obtained according to the method according to any one of claims 1 to 10.
12. An electronic device comprising: one or more processors; a memory for storing one or more computer programs, It is characterized in that the one or more processors execute the one or more computer programs to implement the steps of the method according to any one of claims 1 to 11.
13. A computer-readable storage medium having a computer program or instruction stored thereon, characterized in that: When the computer program or instruction is executed by a processor, the steps of the method according to any one of claims 1 to 11 are implemented.
14. A computer program product comprising a computer program, which, when executed by a processor, implements the method according to any one of claims 1 to 11.
Citation Information
Patent Citations
Sample generation method, classification model training method, recognition method and corresponding devices
CN111476296A
Multi-wave seismic oil and gas reservoir prediction method based on deep neural network
CN112083498A