A method, apparatus, device and medium for data reasoning

CN117313860BActive Publication Date: 2026-11-03HANGZHOU HIKVISION DIGITAL TECHNOLOGY CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202311250479.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-09-26
Publication Date
2026-11-03
Estimated Expiration
2043-09-26

AI Technical Summary

Technical Problem

Existing neural network models based on attention mechanisms suffer from large quantization errors during data inference, resulting in low accuracy.

Method used

By acquiring the features and attention weights of floating-point data, quantizing them, and then obtaining the features and attention weights of fixed-point data, a normalization factor is calculated and used to adjust the output fixed-point data features, thereby reducing quantization error and improving inference accuracy.

Benefits of technology

It reduces the error caused by attention weights during the reasoning process, improves the accuracy of data reasoning, and reduces costs while increasing efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117313860B_ABST
    Figure CN117313860B_ABST
Patent Text Reader

Abstract

The embodiment of the application provides a data reasoning method, device, equipment and medium, when target floating point data is reasoned, each quantized attention weight is normalized again, error caused by the attention weight in the reasoning process is reduced, further, the normalized factor is used to adjust output fixed point data features to realize feature correction, target fixed point data features are obtained, the reasoning result obtained based on the target fixed point data features is more accurate, and the accuracy of data reasoning is improved. Moreover, in the reasoning process, no hardware needs to be customized, thereby the cost of data reasoning is reduced, and the efficiency of data reasoning is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of artificial intelligence technology, and in particular to a method, apparatus, device and medium for data reasoning. Background Technology

[0002] In existing technologies, in various fields such as vision, speech, and text processing, the process of reasoning about target floating-point data typically involves neural network models based on attention mechanisms. However, because the recognition and reasoning process requires quantization of each data point, it introduces significant quantization errors, resulting in low accuracy in data reasoning. Summary of the Invention

[0003] The purpose of this application is to provide a method, apparatus, device, and medium for data reasoning, so as to improve the accuracy of data reasoning. The specific technical solution is as follows:

[0004] In a first aspect, embodiments of this application provide a data reasoning method, the method comprising:

[0005] Obtain multiple sub-floating-point data contained in the target floating-point data to be inferred;

[0006] Obtain the floating-point data features of each sub-floating-point data and the floating-point attention weights corresponding to each sub-floating-point data;

[0007] The floating-point data features are quantized to obtain fixed-point data features, and the floating-point attention weights are quantized to obtain fixed-point attention weights.

[0008] Based on the fixed-point data features and the fixed-point attention weights, the output fixed-point data features are obtained;

[0009] The normalization factor is obtained by statistically analyzing the attention weights at each fixed point;

[0010] The output fixed-point data features are adjusted based on the normalization factor to obtain target fixed-point data features, wherein the target fixed-point data features are negatively correlated with the normalization factor.

[0011] Inference is performed based on the target fixed-point data characteristics to obtain the inference result.

[0012] In one possible implementation, adjusting the output fixed-point data features based on the normalization factor to obtain the target fixed-point data features includes:

[0013] The ratio of the output fixed-point data feature to the normalization factor is calculated and used as the target fixed-point data feature.

[0014] In one possible implementation, the process of obtaining a normalization factor from the statistical analysis of each fixed-point attention weight includes:

[0015] The normalization factor is obtained by summing the attention weights at each fixed point.

[0016] In one possible implementation, obtaining the output fixed-point data features based on the fixed-point data features and the fixed-point attention weights includes:

[0017] The fixed-point data features and the fixed-point attention weights of each of the sub-floating-point data are multiplied to obtain the output fixed-point data features.

[0018] In one possible implementation, the target floating-point data to be inferred is a vehicle image of the vehicle to be identified, and the method includes:

[0019] The acquisition of the target floating-point data to be inferred includes multiple sub-floating-point data, including:

[0020] Obtain multiple image data blocks contained in the vehicle image of the vehicle to be identified;

[0021] The process of acquiring the floating-point data features of each sub-floating-point data and the floating-point attention weights corresponding to each sub-floating-point data includes:

[0022] Obtain the floating-point vehicle data features of each image data block;

[0023] Based on the similarity between the features of each floating-point vehicle data, the floating-point vehicle attention weights of each image data block are obtained.

[0024] The step of reasoning based on the target fixed-point data features to obtain the reasoning result includes:

[0025] Vehicle identification is performed based on the target fixed-point data features to obtain vehicle identification results.

[0026] In one possible implementation, the target floating-point data to be inferred is a video obtained by filming the target person, and the method includes:

[0027] The acquisition of the target floating-point data to be inferred includes multiple sub-floating-point data, including:

[0028] The video obtained from the target person contains multiple video image segments;

[0029] The process of acquiring the floating-point data features of each sub-floating-point data and the floating-point attention weights corresponding to each sub-floating-point data includes:

[0030] Obtain the floating-point behavior data features of each video image segment;

[0031] Based on the similarity between the features of each floating-point behavior data, the floating-point behavior attention weights of each video image frame are obtained.

[0032] The step of reasoning based on the target fixed-point data features to obtain the reasoning result includes:

[0033] Behavior recognition is performed based on the target fixed-point data features to obtain behavior recognition results.

[0034] In one possible implementation, the target floating-point data to be inferred is text to be processed, and the method includes:

[0035] The acquisition of the target floating-point data to be inferred includes multiple sub-floating-point data, including:

[0036] Obtain multiple character segments contained in the text to be processed;

[0037] The process of acquiring the floating-point data features of each sub-floating-point data and the floating-point attention weights corresponding to each sub-floating-point data includes:

[0038] Obtain the floating-point text data features of each of the above;

[0039] Based on the similarity between the features of each floating-point text data, the floating-point text attention weights of each character segment are obtained;

[0040] The step of reasoning based on the target fixed-point data features to obtain the reasoning result includes:

[0041] Based on the target fixed-point data features, text recognition is performed to obtain the text recognition result.

[0042] In one possible implementation, the target floating-point data to be inferred is the voiceprint data to be identified, and the method includes:

[0043] The acquisition of the target floating-point data to be inferred includes multiple sub-floating-point data, including:

[0044] Obtain multiple voiceprint segments contained in the voiceprint data to be identified;

[0045] The process of acquiring the floating-point data features of each sub-floating-point data and the floating-point attention weights corresponding to each sub-floating-point data includes:

[0046] Obtain the floating-point voiceprint data features of each voiceprint segment;

[0047] Based on the similarity between the features of each floating-point voiceprint data, the floating-point voiceprint attention weights of each voiceprint segment are obtained.

[0048] The step of reasoning based on the target fixed-point data features to obtain the reasoning result includes:

[0049] Voiceprint recognition is performed based on the target fixed-point data features to obtain the voiceprint recognition result.

[0050] Secondly, embodiments of this application provide a data reasoning apparatus, the apparatus comprising:

[0051] The data acquisition module is used to acquire multiple sub-floating-point data contained in the target floating-point data to be inferred;

[0052] The vector acquisition module is used to acquire the floating-point data features of each sub-floating-point data and the floating-point attention weights corresponding to each sub-floating-point data.

[0053] The vector quantization module is used to quantize the floating-point data features to obtain fixed-point data features, and to quantize the floating-point attention weights to obtain fixed-point attention weights.

[0054] The feature output module is used to obtain output fixed-point data features based on the fixed-point data features and the fixed-point attention weights;

[0055] The factor statistics module is used to calculate the attention weights at each fixed point to obtain a normalized factor.

[0056] The feature adjustment module is used to adjust the output fixed-point data features based on the normalization factor to obtain target fixed-point data features, wherein the target fixed-point data features are negatively correlated with the normalization factor;

[0057] The data reasoning module is used to perform reasoning based on the target fixed-point data characteristics to obtain the reasoning result.

[0058] In one possible implementation, the feature adjustment module includes:

[0059] The feature adjustment submodule is used to calculate the ratio of the output fixed-point data feature to the normalization factor, and use it as the target fixed-point data feature.

[0060] The factor statistics module includes:

[0061] The factor statistics submodule is used to sum the attention weights at each fixed point to obtain a normalized factor.

[0062] The feature output module includes:

[0063] The feature output submodule is used to multiply the fixed-point data features and the fixed-point attention weights of each of the sub-floating-point data to obtain the output fixed-point data features;

[0064] The target floating-point data to be inferred is a vehicle image of the vehicle to be identified, and the device includes:

[0065] The data acquisition module includes:

[0066] The first data acquisition submodule is used to acquire multiple image data blocks contained in the vehicle image of the vehicle to be identified;

[0067] The vector acquisition module includes:

[0068] The vector acquisition first submodule is used to acquire the floating-point vehicle data features of each image data block;

[0069] The second submodule for vector acquisition is used to obtain the floating-point vehicle attention weights of each image data block based on the similarity between the features of each floating-point vehicle data.

[0070] The data inference module includes:

[0071] The first data inference submodule is used to perform vehicle identification based on the target fixed-point data features and obtain the vehicle identification result.

[0072] The target floating-point data to be inferred is a video obtained by filming the target person, and the device includes:

[0073] The data acquisition module includes:

[0074] The second data acquisition submodule is used to acquire multiple video image segments contained in the video obtained from the target person being filmed;

[0075] The vector acquisition module includes:

[0076] The third submodule for vector acquisition is used to acquire the floating-point behavioral data features of each video image segment;

[0077] The fourth submodule for vector acquisition is used to obtain the floating-point behavior attention weights of each video image frame based on the similarity between the features of each floating-point behavior data.

[0078] The data inference module includes:

[0079] The second data reasoning submodule is used to perform behavior recognition based on the target fixed-point data features and obtain the behavior recognition result.

[0080] The target floating-point data to be reasoned is text to be processed, and the device includes:

[0081] The data acquisition module includes:

[0082] The third data acquisition submodule is used to acquire multiple character segments contained in the text to be processed;

[0083] The vector acquisition module includes:

[0084] The fifth submodule for vector acquisition is used to acquire the floating-point text data features of each character segment;

[0085] The sixth submodule for vector acquisition is used to obtain the floating-point text attention weights of each character segment based on the similarity between the features of each floating-point text data.

[0086] The data inference module includes:

[0087] The third data reasoning submodule is used to perform text recognition based on the target fixed-point data features to obtain text recognition results.

[0088] The target floating-point data to be reasoned is the voiceprint data to be identified, and the device includes:

[0089] The data acquisition module includes:

[0090] The fourth submodule for data acquisition is used to identify multiple voiceprint segments contained in the voiceprint data to be identified;

[0091] The vector acquisition module includes:

[0092] The seventh submodule for vector acquisition is used to acquire the floating-point voiceprint data features of each voiceprint segment;

[0093] The vector acquisition eighth submodule is used to obtain the floating-point voiceprint attention weight of each voiceprint segment based on the similarity between the features of each floating-point voiceprint data.

[0094] The data inference module includes:

[0095] The fourth submodule of data inference is used to perform voiceprint recognition based on the target fixed-point data features to obtain the voiceprint recognition result.

[0096] Thirdly, embodiments of this application provide an electronic device, including a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other through the communication bus;

[0097] Memory, used to store computer programs;

[0098] When a processor executes a program stored in memory, it implements any of the data reasoning method steps described above.

[0099] Fourthly, embodiments of this application also provide a computer-readable storage medium storing a computer program, which, when executed by a processor, implements any of the data reasoning method steps described above.

[0100] Beneficial effects of the embodiments in this application:

[0101] This application provides a data inference method that involves: acquiring multiple sub-floating-point data contained in the target floating-point data to be inferred; acquiring the floating-point data features of each sub-floating-point data and the corresponding floating-point attention weights; quantizing the floating-point data features to obtain fixed-point data features, and quantizing the floating-point attention weights to obtain fixed-point attention weights; obtaining output fixed-point data features based on the fixed-point data features and the fixed-point attention weights; statistically analyzing each fixed-point attention weight to obtain a normalization factor; adjusting the output fixed-point data features based on the normalization factor to obtain target fixed-point data features, wherein the target fixed-point data features are negatively correlated with the normalization factor; and performing inference based on the target fixed-point data features to obtain an inference result. By applying the scheme of this application, when inferring from the target floating-point data, the quantized attention weights are normalized again, reducing the error caused by the attention weights during inference. Furthermore, the normalization factor is used to adjust the output fixed-point data features to achieve feature correction, resulting in the target fixed-point data features. This makes the inference result obtained based on the target fixed-point data features more accurate, thus improving the accuracy of data inference. Furthermore, no custom hardware is required during the inference process, thereby reducing the cost of data inference and improving its efficiency.

[0102] Of course, implementing any product or method of this application does not necessarily require achieving all of the advantages described above at the same time. Attached Figure Description

[0103] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other embodiments can be obtained based on these drawings.

[0104] Figure 1 A schematic diagram of feature extraction provided in an embodiment of this application;

[0105] Figure 2 A first flowchart of the data reasoning method provided in the embodiments of this application;

[0106] Figure 3 A schematic diagram illustrating the target fixed-point data feature calculation method provided in the embodiments of this application;

[0107] Figure 4 A second flowchart of the data reasoning method provided in the embodiments of this application;

[0108] Figure 5 This is a schematic diagram of the structure of the data inference device provided in the embodiments of this application;

[0109] Figure 6 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation

[0110] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art based on this application are within the scope of protection of this application.

[0111] In current technologies, the execution of floating-point arithmetic is relatively complex for the current CPU architecture. This complexity directly depends on the CPU's instruction set. The CPU's instruction set dictates that floating-point operations must be divided into base and exponent calculations, resulting in a complex and computationally intensive process. Therefore, quantizing floating-point numbers before computation can reduce complexity and computational load, better adapt to the current CPU architecture, and improve the efficiency of CPUs in performing recognition tasks such as vehicle recognition, text recognition, and voiceprint recognition.

[0112] However, certain quantization errors can occur during the quantization process. Specifically, in recognition tasks such as vehicle recognition, text recognition, and voiceprint recognition, attention-based neural network models are typically used to extract features from the target floating-point data. Based on the extracted features, inference and recognition of the target floating-point data are then performed. The structure of attention-based neural network models typically includes a multi-head attention layer and a feedforward fully connected layer. The multi-head attention layer usually uses the Softmax function to calculate attention weights and then uses the MatMul matrix multiplication operator to converge features.

[0113] By quantizing floating-point parameters and input / output feature values ​​into fixed-bit values, such as 8 bits or 4 bits, the computational cost, data bandwidth, and storage space of neural network models can be reduced. This allows neural network models to be applied faster and better on hardware with limited memory and computing power to perform recognition tasks such as vehicle recognition, text recognition, and voiceprint recognition.

[0114] like Figure 1 As shown, Figure 1This is a schematic diagram illustrating feature extraction as provided in an embodiment of this application. Figure 1 In this model, after obtaining the attention weight vector and feature vector, the Softmax kernel processes them to obtain normalized attention weight values. Then, the normalized attention weight values ​​and feature vectors are quantized through a quantization node (Quant) and input into the MatMul kernel, which outputs the features. The normalized attention weight values ​​and feature vectors are quantized using a model quantization formula, as shown below:

[0115]

[0116] Where Δ is the quantization interval (scale), k is the number of bits quantized, round is the rounding function, and clamp is the range limiting function, which controls the output value range within [-2]. k-1 ,2 k-1 Between -1].

[0117] However, due to the unbalanced distribution of the output values ​​of the Softmax function, with a large number of values ​​close to 0 and a small number close to 1, using a large quantization interval during quantization will result in small values ​​being quantized to 0; while using a small quantization interval will result in large values ​​being truncated. Both will cause significant quantization errors, which will accumulate in the MatMul kernel, leading to a shift in the output features of the MatMul kernel.

[0118] In another quantization scheme, pairwise uniform quantization can be used, as shown below:

[0119]

[0120] The core idea is to divide the input data into two parts [0, R) and [R, 1] according to their size, and use different quantization intervals for different ranges of data. Although this scheme reduces quantization error, it suffers from complex implementation and requires specific hardware support.

[0121] Based on this, this application provides a data reasoning method, such as Figure 2 As shown, Figure 2 A first flowchart of the data reasoning method provided in the embodiments of this application includes:

[0122] S201, Obtain multiple sub-floating-point data contained in the target floating-point data to be inferred.

[0123] S202, obtain the floating-point data features of each sub-floating-point data and the floating-point attention weights corresponding to each sub-floating-point data.

[0124] S203 quantizes the floating-point data features to obtain fixed-point data features, and quantizes the floating-point attention weights to obtain fixed-point attention weights.

[0125] S204, based on fixed-point data features and fixed-point attention weights, yields the output fixed-point data features.

[0126] S205, the normalization factor is obtained by statistically analyzing the attention weights at each fixed point.

[0127] S206, based on the normalization factor, the output fixed-point data features are adjusted to obtain the target fixed-point data features, wherein the target fixed-point data features are negatively correlated with the normalization factor.

[0128] S207, inference is performed based on the characteristics of the target fixed-point data to obtain the inference result.

[0129] By applying the data inference method provided in this application, when inferring from target floating-point data, the quantized attention weights are normalized again, reducing the errors caused by the attention weights during inference. Furthermore, the normalization factor is used to adjust the output fixed-point data features to achieve feature correction, obtaining the target fixed-point data features. This makes the inference results based on the target fixed-point data features more accurate, improving the accuracy of data inference. Moreover, no custom hardware is required during the inference process, thereby reducing the cost and improving the efficiency of data inference.

[0130] The following will explain S201-S207 respectively:

[0131] In S201, each sub-floating-point data is part of the target floating-point data. Therefore, the sub-floating-point data can be regarded as a component of the target floating-point data, that is, each sub-floating-point data can be called a token of the target floating-point data.

[0132] In vehicle recognition scenarios, the target floating-point data to be inferred can be a vehicle image; in behavior recognition scenarios, it can be a behavior to be recognized; in text recognition scenarios, it can be text to be recognized; and in voiceprint recognition scenarios, it can be voiceprints to be recognized, and so on. The target floating-point data can be image data containing vehicle data, video image data containing behavior data, text data containing text data, audio data containing voiceprint data, and so on. Its corresponding sub-floating-point data can be image data blocks, video image frames, character segments, voiceprint fragments, and so on.

[0133] In S202, the floating-point data features and floating-point attention weights of each sub-floating-point data can be obtained by a neural network model based on an attention mechanism. In one possible embodiment, the attention weights are normalized by a Softmax kernel before quantization. In another possible embodiment, the attention weights can also be normalized by other kernels with normalization capabilities.

[0134] Data features are used to represent the characteristics of each sub-floating-point data. Attention weights are used to represent the importance of each sub-floating-point data to the output target fixed-point data features.

[0135] In S203, the floating-point data features and floating-point attention weights are quantized using the aforementioned formula (1) to obtain fixed-point data features and fixed-point attention weights.

[0136] In S204, the output fixed-point data features obtained based on the fixed-point data features and fixed-point attention weights can more accurately reflect the features of the data to be inferred.

[0137] In one possible implementation, the fixed-point data features of each sub-floating-point data can be multiplied by its corresponding fixed-point attention weight, and then all products are added together and divided by the sum of the total weights to obtain the output fixed-point data features of each sub-floating-point data. However, this method involves a large amount of computation, and the output fixed-point data features obtained cannot accurately reflect the features of the data to be inferred.

[0138] Therefore, in another possible embodiment, the fixed-point data features and fixed-point attention weights of each sub-floating-point data can be multiplied separately to obtain the output fixed-point data features. Specifically, the MatMul computing core can obtain the output fixed-point data features based on the fixed-point attention weights and fixed-point data features. Alternatively, other computing cores with the same functionality as the MatMul computing core can obtain the output fixed-point data features based on the fixed-point attention weights and fixed-point data features.

[0139] In S205, after quantizing the floating-point attention weights in the aforementioned step S203, the originally normalized attention weights will change. The normalization factor is obtained based on the statistics of each fixed-point attention weight, which means that the quantized attention weights are normalized again.

[0140] In one possible implementation, the normalization factor can be obtained by summing the attention weights at each fixed point.

[0141] In S206, after obtaining the normalization factor in step S205, the fixed-point data features are adjusted based on the normalization factor. The resulting target fixed-point data features are obtained by feature correction of the fixed-point data features. Compared with the fixed-point data features, the error brought about by the quantization process is reduced, and the true features of the data to be inferred are better reflected.

[0142] In S207, inference results can be derived based on the corrected target fixed-point data features. Target fixed-point data features more accurately reflect which features need attention during the inference process, thus enabling more accurate inference and avoiding the influence of background data, noisy data, etc., on the inference results. In vehicle recognition scenarios, the inference result can be the actual vehicle information of the vehicle to be identified; in behavior recognition scenarios, the inference result can be the actual behavior of the behavior to be identified; in text recognition scenarios, the inference result can be the specific meaning of the text to be identified; in voiceprint recognition scenarios, the inference result can be the quality of the product to be inspected corresponding to the voiceprint to be identified, and so on.

[0143] The specific implementation method for calculating the target fixed-point data features in this scheme can be as follows: Figure 3 As shown, Figure 3 The schematic diagram of the target fixed-point data feature calculation method provided in the embodiments of this application is shown below, and its complete process is as follows:

[0144] The first step is to process the input attention weight vectors on the CPU and GPU memory through the Softmax calculation kernels of the CPU and GPU to obtain normalized attention weights, which belong to the floating-point attention weights corresponding to each sub-floating-point data in the aforementioned step S202.

[0145] The second step is to quantize the normalized attention weight values ​​through a quantization node (Quant) to obtain the quantized attention weights, which is equivalent to quantizing the floating-point attention weights in the aforementioned step S203 to obtain the fixed-point attention weights.

[0146] The third step is to sum the quantified attention weights to obtain the normalization factor, which is equivalent to the aforementioned step S205.

[0147] The fourth step is to quantize the data features input from the CPU and GPU memory through quantization nodes to obtain quantized data features, which is equivalent to quantizing floating-point data features in the aforementioned step S203 to obtain fixed-point data features.

[0148] The fifth step is to process the quantized attention weights and quantized data features through the MatMul computing kernels of the CPU and GPU to obtain the output fixed-point data features, which is equivalent to the aforementioned step S204.

[0149] The sixth step is to divide the output fixed-point data features by the normalization factor to obtain the final target fixed-point data features, which is equivalent to the aforementioned step S206.

[0150] In one possible embodiment, the target floating-point data to be inferred is a vehicle image of the vehicle to be identified, such as... Figure 4 As shown, Figure 4 A second flowchart of the data reasoning method provided in this application embodiment, in which:

[0151] The above step S201 includes:

[0152] S2011, Obtain multiple image data blocks contained in the vehicle image of the vehicle to be identified.

[0153] Step S202 above includes:

[0154] S2021, Obtain the floating-point vehicle data features of each image data block.

[0155] S2022, based on the similarity between the features of each floating-point vehicle data, the floating-point vehicle attention weights of each image data block are obtained.

[0156] The above step S207 includes:

[0157] S2071, Vehicle identification is performed based on target fixed-point data features to obtain vehicle identification results.

[0158] For example, in an intelligent transportation system, the system includes monitoring equipment and a processor. When a user requests to pass through the gate, the monitoring equipment acquires a vehicle image containing the user's vehicle. The vehicle image contains multiple image data blocks, which are then sent to the processor. The processor uses this image data block as multiple sub-floating-point data within the target floating-point data to be inferred (equivalent to step S201). The target floating-point data includes vehicle data of the user's vehicle to be identified, environmental data of the surrounding environment, and other data unrelated to vehicle identification. The processor obtains the floating-point vehicle data features and floating-point vehicle attention weights of each image data block (equivalent to step S202), and then quantizes them to obtain fixed-point vehicle data features and fixed-point vehicle attention weights (equivalent to step S203). Based on the fixed-point vehicle data features and fixed-point vehicle attention weights, the output fixed-point data features are obtained (equivalent to step S204). The quantized vehicle attention weights are used to distinguish between data belonging to the background and data belonging to the vehicle to be identified within the acquired image data blocks. Then, based on the attention weights of each fixed-point vehicle, a normalization factor is statistically obtained (equivalent to step S205 above). By calculating the ratio of the output fixed-point data features to the normalization factor, feature correction is performed on the output fixed-point data features to obtain a target fixed-point data feature that closely approximates the true features of the vehicle to be identified (equivalent to step S206 above). The intelligent transportation system performs inference based on the target fixed-point data feature to obtain the inference result, that is, whether the current vehicle information is the vehicle information already stored in the system (equivalent to step S207 above). If yes, passage is allowed; otherwise, passage is denied.

[0159] By applying the scheme of this application embodiment, feature correction is performed on the output fixed-point data features, making the obtained target fixed-point data features closer to the real features of the vehicle to be identified. As a result, the reasoning results obtained based on the target fixed-point data features are more accurate, thus improving the accuracy of vehicle identification.

[0160] In one possible embodiment, the target floating-point data to be inferred is a video obtained from filming the target person. In this embodiment:

[0161] The above step S201 includes:

[0162] S2012, acquire multiple video image segments contained in the video obtained from the target person being filmed.

[0163] Step S202 above includes:

[0164] S2023, obtain the floating-point behavior data features of each video image segment.

[0165] S2024, based on the similarity between the features of each floating-point behavior data, obtain the floating-point behavior attention weights of each video image segment.

[0166] The above step S207 includes:

[0167] S2072, based on the target fixed-point data features, behavior recognition is performed to obtain the behavior recognition result.

[0168] For example, this can be applied to a smart home system to prevent users from getting electric shocks. The smart home system includes monitoring equipment and a processor. The monitoring equipment captures video in real time containing the behavior of the target person to be identified. The video contains multiple video image segments, which are transmitted to the processor. The processor uses the received video image segments as multiple sub-floating-point data contained in the target floating-point data to be inferred (equivalent to step S201 above). The target floating-point data also includes environmental image data of the surrounding environment, as well as video image data of other data unrelated to behavior recognition. For example, the target floating-point data includes video image data of user activity, video image data of curtains swaying, and video image data of pets sleeping. The processor in the smart home system obtains the floating-point behavior data features and floating-point behavior attention weights of each video image frame (equivalent to step S202 above), and then quantizes them to obtain fixed-point behavior data features and fixed-point behavior attention weights (equivalent to step S203 above). Based on the fixed-point behavior data features and fixed-point behavior attention weights, the output fixed-point data features are obtained (equivalent to step S204 above). The fixed-point behavior attention weights are used to distinguish between data belonging to non-identifiable behaviors and data belonging to the identified behaviors in multiple video image frames. Then, based on each fixed-point behavior attention weight, a normalization factor is calculated (equivalent to step S205 above). By calculating the ratio of the output fixed-point data features to the normalization factor, feature correction is performed on the output fixed-point data features to obtain a target fixed-point data feature that closely approximates the true features of the identified behavior (equivalent to step S206 above). The processor performs inference based on the target fixed-point data feature to obtain the inference result, i.e., whether the user's behavior is a preset behavior stored by the system (equivalent to step S207 above). If yes, the power is cut off; otherwise, the power is not cut off.

[0169] By applying the scheme of this application embodiment, feature correction is performed on the output fixed-point data features, making the obtained target fixed-point data features closer to the real features of the behavior to be identified. As a result, the reasoning results obtained based on the target fixed-point data features are more accurate, thus improving the accuracy of behavior recognition.

[0170] In one possible embodiment, the target floating-point data to be inferred is the text to be processed. In this embodiment:

[0171] The above step S201 includes:

[0172] S2013, Obtain multiple character segments contained in the text to be processed.

[0173] Step S202 above includes:

[0174] S2025, obtain the floating-point text data features of each character segment.

[0175] S2026, Based on the similarity between the features of each floating-point text data, the floating-point text attention weight of each character segment is obtained.

[0176] The above step S207 includes:

[0177] S2073, based on the target fixed-point data features, perform text recognition to obtain text recognition results.

[0178] For example, this is applied to a text recognition system to achieve intelligent question answering. The text recognition system includes a data acquisition unit and a processor. The data acquisition unit in the text recognition system acquires the user's input question, i.e., the text to be processed. The text to be processed contains multiple character segments and is sent to the processor. The processor uses the received character segments as multiple sub-floating-point data contained in the target floating-point data to be recognized (equivalent to the aforementioned step S201). The target floating-point data also contains other data unrelated to text recognition, such as punctuation marks and emoticons. The processor in the text recognition system obtains the floating-point text data features and floating-point text attention weights of each character segment (equivalent to the aforementioned step S202), and then quantizes them to obtain fixed-point text data features and fixed-point text attention weights (equivalent to the aforementioned step S203). Based on the fixed-point text data features and fixed-point text attention weights, the output fixed-point data features are obtained (equivalent to the aforementioned step S204). The fixed-point text attention weights are used to distinguish between data belonging to non-to-be-recognized text and data belonging to to-be-recognized text within the multiple character segments. Then, based on the attention weights of each fixed-point text, a normalization factor is calculated (equivalent to step S205 above). By calculating the ratio of the output fixed-point data features to the normalization factor, feature correction is performed on the output fixed-point data features to obtain a target fixed-point data feature that closely approximates the true features of the text to be recognized (equivalent to step S206 above). The text recognition system performs inference based on the target fixed-point data feature to obtain the inference result, that is, to infer the meaning of the current text to be recognized, i.e., the user's question (equivalent to step S207 above), and then answers the question.

[0179] By applying the scheme of this application embodiment, feature correction is performed on the output fixed-point data features, making the obtained target fixed-point data features closer to the real features of the text to be processed. As a result, the reasoning results obtained based on the target fixed-point data features are more accurate, thus improving the accuracy of text recognition.

[0180] In one possible embodiment, the target floating-point data to be inferred is the voiceprint data to be identified. In this embodiment:

[0181] The above step S201 includes:

[0182] S2014, Obtain multiple voiceprint segments contained in the voiceprint data to be identified.

[0183] Step S202 above includes:

[0184] S2027, obtain the floating-point voiceprint data features of each voiceprint segment.

[0185] S2028, based on the similarity between the features of each floating-point voiceprint data, obtains the floating-point voiceprint attention weights for each voiceprint segment.

[0186] The above step S207 includes:

[0187] S2074, Voiceprint recognition is performed based on the target fixed-point data features to obtain the voiceprint recognition result.

[0188] For example, in a quality inspection system applied to industrial motor quality inspection, the system includes a sound acquisition device and a voiceprint processor. When inspecting a motor, the sound acquisition device collects sound data of the motor's rotation to obtain voiceprint data to be identified. This voiceprint data contains multiple voiceprint segments, which are then sent to the voiceprint processor. The voiceprint processor treats these multiple voiceprint segments as multiple sub-floating-point data contained in the target floating-point data to be identified (equivalent to step S201). The target floating-point data also contains other sound data unrelated to voiceprint recognition, such as noise data from the current environment. The voiceprint processor in the quality inspection system obtains the floating-point voiceprint data features and floating-point voiceprint attention weights for each voiceprint segment (equivalent to step S202), and then quantizes them to obtain fixed-point voiceprint data features and fixed-point voiceprint attention weights (equivalent to step S203). Based on the fixed-point voiceprint data features and fixed-point voiceprint attention weights, the output fixed-point data features are obtained (equivalent to step S204). The fixed-point voiceprint attention weights are used to distinguish between data belonging to non-identifiable voiceprints and data belonging to the identified voiceprints within a voiceprint segment. Then, based on each fixed-point voiceprint attention weight, a normalization factor is calculated (equivalent to step S205 above). By calculating the ratio of the output fixed-point data features to the normalization factor, feature correction is performed on the output fixed-point data features to obtain a target fixed-point data feature that closely approximates the true features of the identified voiceprint (equivalent to step S206 above). The quality inspection system performs inference based on the target fixed-point data feature to obtain the inference result, i.e., whether the current identified voiceprint meets the enterprise's required standards (equivalent to step S207 above). If yes, the motor to be inspected is classified as a qualified product; otherwise, it is classified as an unqualified product.

[0189] By applying the scheme of this application embodiment, feature correction is performed on the output fixed-point data features, making the obtained target fixed-point data features closer to the real features of the voiceprint to be identified. As a result, the reasoning results obtained based on the target fixed-point data features are more accurate, thus improving the accuracy of voiceprint recognition.

[0190] Corresponding to the above method embodiments, this application provides a data inference apparatus, such as... Figure 5 As shown, Figure 5 This is a schematic diagram of the structure of a data inference device provided in an embodiment of this application. The device may include the following modules:

[0191] The data acquisition module 501 is used to acquire multiple sub-floating-point data contained in the target floating-point data to be inferred;

[0192] The vector acquisition module 502 is used to acquire the floating-point data features of each sub-floating-point data and the floating-point attention weights corresponding to each sub-floating-point data;

[0193] The vector quantization module 503 is used to quantize the floating-point data features to obtain fixed-point data features, and to quantize the floating-point attention weights to obtain fixed-point attention weights.

[0194] The feature output module 504 is used to obtain output fixed-point data features based on the fixed-point data features and the fixed-point attention weights;

[0195] The factor statistics module 505 is used to calculate the normalized factor by calculating the attention weights at each fixed point.

[0196] The feature adjustment module 506 is used to adjust the output fixed-point data features based on the normalization factor to obtain target fixed-point data features, wherein the target fixed-point data features are negatively correlated with the normalization factor;

[0197] The data reasoning module 507 is used to perform reasoning based on the target fixed-point data characteristics to obtain the reasoning result.

[0198] By applying the scheme of this application, when inferring from the target floating-point data, the quantized attention weights are normalized again, reducing the errors caused by the attention weights during inference. Furthermore, the normalization factor is used to adjust the output fixed-point data features to achieve feature correction, obtaining the target fixed-point data features. This makes the inference results based on the target fixed-point data features more accurate, improving the accuracy of data inference. Moreover, no custom hardware is required during inference, thus reducing the cost and improving the efficiency of data inference.

[0199] In one possible embodiment, the feature adjustment module includes:

[0200] The feature adjustment submodule is used to calculate the ratio of the output fixed-point data feature to the normalization factor, and use it as the target fixed-point data feature.

[0201] The factor statistics module includes:

[0202] The factor statistics submodule is used to sum the attention weights at each fixed point to obtain a normalized factor.

[0203] The feature output module includes:

[0204] The feature output submodule is used to multiply the fixed-point data features and the fixed-point attention weights of each of the sub-floating-point data to obtain the output fixed-point data features;

[0205] The target floating-point data to be inferred is a vehicle image of the vehicle to be identified, and the device includes:

[0206] The data acquisition module includes:

[0207] The first data acquisition submodule is used to acquire multiple image data blocks contained in the vehicle image of the vehicle to be identified;

[0208] The vector acquisition module includes:

[0209] The vector acquisition first submodule is used to acquire the floating-point vehicle data features of each image data block;

[0210] The second submodule for vector acquisition is used to obtain the floating-point vehicle attention weights of each image data block based on the similarity between the features of each floating-point vehicle data.

[0211] The data inference module includes:

[0212] The first data inference submodule is used to perform vehicle identification based on the target fixed-point data features and obtain the vehicle identification result.

[0213] The target floating-point data to be inferred is a video obtained by filming the target person, and the device includes:

[0214] The data acquisition module includes:

[0215] The second data acquisition submodule is used to acquire multiple video image segments contained in the video obtained from the target person being filmed;

[0216] The vector acquisition module includes:

[0217] The third submodule for vector acquisition is used to acquire the floating-point behavioral data features of each video image segment;

[0218] The fourth submodule for vector acquisition is used to obtain the floating-point behavior attention weights of each video image frame based on the similarity between the features of each floating-point behavior data.

[0219] The data inference module includes:

[0220] The second data reasoning submodule is used to perform behavior recognition based on the target fixed-point data features and obtain the behavior recognition result.

[0221] The target floating-point data to be reasoned is text to be processed, and the device includes:

[0222] The data acquisition module includes:

[0223] The third data acquisition submodule is used to acquire multiple character segments contained in the text to be processed;

[0224] The vector acquisition module includes:

[0225] The fifth submodule for vector acquisition is used to acquire the floating-point text data features of each character segment;

[0226] The sixth submodule for vector acquisition is used to obtain the floating-point text attention weights of each character segment based on the similarity between the features of each floating-point text data.

[0227] The data inference module includes:

[0228] The third data reasoning submodule is used to perform text recognition based on the target fixed-point data features to obtain text recognition results.

[0229] The target floating-point data to be reasoned is the voiceprint data to be identified, and the device includes:

[0230] The data acquisition module includes:

[0231] The fourth submodule for data acquisition is used to identify multiple voiceprint segments contained in the voiceprint data to be identified;

[0232] The vector acquisition module includes:

[0233] The seventh submodule for vector acquisition is used to acquire the floating-point voiceprint data features of each voiceprint segment;

[0234] The vector acquisition eighth submodule is used to obtain the floating-point voiceprint attention weight of each voiceprint segment based on the similarity between the features of each floating-point voiceprint data.

[0235] The data inference module includes:

[0236] The fourth submodule of data inference is used to perform voiceprint recognition based on the target fixed-point data features to obtain the voiceprint recognition result.

[0237] Corresponding to the above method embodiments, this application also provides an electronic device, such as... Figure 6 As shown, Figure 6 A schematic diagram of an electronic device provided in this application embodiment includes a memory 601 and a processor 602. The memory 601 is used to store computer programs; the processor 602 is used to execute the computer programs stored in the memory to implement the following steps:

[0238] Obtain multiple sub-floating-point data contained in the target floating-point data to be inferred;

[0239] Obtain the floating-point data features of each sub-floating-point data and the floating-point attention weights corresponding to each sub-floating-point data;

[0240] The floating-point data features are quantized to obtain fixed-point data features, and the floating-point attention weights are quantized to obtain fixed-point attention weights.

[0241] Based on the fixed-point data features and the fixed-point attention weights, the output fixed-point data features are obtained;

[0242] The normalization factor is obtained by statistically analyzing the attention weights at each fixed point;

[0243] The output fixed-point data features are adjusted based on the normalization factor to obtain target fixed-point data features, wherein the target fixed-point data features are negatively correlated with the normalization factor.

[0244] Inference is performed based on the target fixed-point data characteristics to obtain the inference result.

[0245] The aforementioned memory may include RAM (Random Access Memory) or NVM (Non-volatile Memory), such as at least one disk storage device. Optionally, the memory may also be at least one storage device located remotely from the aforementioned processor.

[0246] The processors mentioned above can be general-purpose processors, including CPUs (Central Processing Units), NPs (Network Processors), etc.; they can also be DSPs (Digital Signal Processors), ASICs (Application Specific Integrated Circuits), FPGAs (Field-Programmable Gate Arrays), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components.

[0247] In another embodiment provided in this application, a computer-readable storage medium is also provided, which stores a computer program that, when executed by a processor, implements the steps of any of the above-described data reasoning methods.

[0248] In another embodiment provided in this application, a computer program product containing instructions is also provided, which, when run on a computer, causes the computer to execute any of the data reasoning methods described in the above embodiments.

[0249] In the above embodiments, implementation can be achieved entirely or partially through software, hardware, firmware, or any combination thereof. When implemented using software, it can be implemented entirely or partially in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of this application are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that integrates one or more available media. The available medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a solid-state drive (SSD), etc.

[0250] It should be noted that, in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

[0251] The various embodiments in this specification are described in a related manner. Similar or identical parts between embodiments can be referred to mutually. Each embodiment focuses on describing the differences from other embodiments. In particular, the system embodiments are basically similar to the method embodiments, so the description is relatively simple; relevant parts can be referred to the descriptions of the method embodiments.

[0252] The above description is merely a preferred embodiment of this application and is not intended to limit the scope of protection of this application. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application are included within the scope of protection of this application.

Claims

1. A method for data reasoning, characterized in that, The method includes: Obtain multiple sub-floating-point data contained in the target floating-point data to be inferred; Obtain the floating-point data features of each sub-floating-point data and the floating-point attention weights corresponding to each sub-floating-point data; The floating-point data features are quantized to obtain fixed-point data features, and the floating-point attention weights are quantized to obtain fixed-point attention weights. Based on the fixed-point data features and the fixed-point attention weights, the output fixed-point data features are obtained; The normalization factor is obtained by statistically analyzing the attention weights at each fixed point; The output fixed-point data features are adjusted based on the normalization factor to obtain target fixed-point data features, wherein the target fixed-point data features are negatively correlated with the normalization factor. Based on the target fixed-point data characteristics, inference is performed to obtain the inference result; The normalization factor obtained from the statistical analysis of each fixed-point attention weight includes: The normalization factor is obtained by summing the attention weights at each fixed point; The target floating-point data to be inferred is a vehicle image of the vehicle to be identified, and the method includes: The acquisition of the target floating-point data to be inferred includes multiple sub-floating-point data, including: Obtain multiple image data blocks contained in the vehicle image of the vehicle to be identified; The process of acquiring the floating-point data features of each sub-floating-point data and the floating-point attention weights corresponding to each sub-floating-point data includes: Obtain the floating-point vehicle data features of each image data block; Based on the similarity between the features of each floating-point vehicle data, the floating-point vehicle attention weights of each image data block are obtained. The step of reasoning based on the target fixed-point data features to obtain the reasoning result includes: Vehicle identification is performed based on the target fixed-point data features to obtain vehicle identification results; or, The target floating-point data to be inferred is a video obtained by filming the target person, and the method includes: The acquisition of the target floating-point data to be inferred includes multiple sub-floating-point data, including: The video obtained from the target person contains multiple video image segments; The process of acquiring the floating-point data features of each sub-floating-point data and the floating-point attention weights corresponding to each sub-floating-point data includes: Obtain the floating-point behavior data features of each video image segment; Based on the similarity between the features of each floating-point behavior data, the floating-point behavior attention weights of each video image segment are obtained; The step of reasoning based on the target fixed-point data features to obtain the reasoning result includes: Behavior recognition is performed based on the target fixed-point data features to obtain behavior recognition results; or, The target floating-point data to be inferred is text to be processed, and the method includes: The acquisition of the target floating-point data to be inferred includes multiple sub-floating-point data, including: Obtain multiple character segments contained in the text to be processed; The process of acquiring the floating-point data features of each sub-floating-point data and the floating-point attention weights corresponding to each sub-floating-point data includes: Obtain the floating-point text data features of each character segment; Based on the similarity between the features of each floating-point text data, the floating-point text attention weights of each character segment are obtained; The step of reasoning based on the target fixed-point data features to obtain the reasoning result includes: Based on the target fixed-point data features, text recognition is performed to obtain the text recognition result; or, The target floating-point data to be inferred is the voiceprint data to be identified, and the method includes: The acquisition of the target floating-point data to be inferred includes multiple sub-floating-point data, including: Obtain multiple voiceprint segments contained in the voiceprint data to be identified; The process of acquiring the floating-point data features of each sub-floating-point data and the floating-point attention weights corresponding to each sub-floating-point data includes: Obtain the floating-point voiceprint data features of each voiceprint segment; Based on the similarity between the features of each floating-point voiceprint data, the floating-point voiceprint attention weights of each voiceprint segment are obtained. The step of reasoning based on the target fixed-point data features to obtain the reasoning result includes: Voiceprint recognition is performed based on the target fixed-point data features to obtain the voiceprint recognition result.

2. The method according to claim 1, characterized in that, The step of adjusting the output fixed-point data features based on the normalization factor to obtain the target fixed-point data features includes: The ratio of the output fixed-point data feature to the normalization factor is calculated and used as the target fixed-point data feature.

3. The method according to claim 1, characterized in that, The step of obtaining output fixed-point data features based on the fixed-point data features and the fixed-point attention weights includes: The fixed-point data features and the fixed-point attention weights of each of the sub-floating-point data are multiplied to obtain the output fixed-point data features.

4. A data reasoning apparatus, characterized in that, The device includes: The data acquisition module is used to acquire multiple sub-floating-point data contained in the target floating-point data to be inferred; The vector acquisition module is used to acquire the floating-point data features of each sub-floating-point data and the floating-point attention weights corresponding to each sub-floating-point data. The vector quantization module is used to quantize the floating-point data features to obtain fixed-point data features, and to quantize the floating-point attention weights to obtain fixed-point attention weights. The feature output module is used to obtain output fixed-point data features based on the fixed-point data features and the fixed-point attention weights; The factor statistics module is used to calculate the attention weights at each fixed point to obtain a normalized factor. The feature adjustment module is used to adjust the output fixed-point data features based on the normalization factor to obtain target fixed-point data features, wherein the target fixed-point data features are negatively correlated with the normalization factor; The data reasoning module is used to perform reasoning based on the characteristics of the target fixed-point data to obtain the reasoning result; The factor statistics module includes: The factor statistics submodule is used to sum the attention weights at each fixed point to obtain a normalized factor. The target floating-point data to be inferred is a vehicle image of the vehicle to be identified, and the device includes: The data acquisition module includes: The first data acquisition submodule is used to acquire multiple image data blocks contained in the vehicle image of the vehicle to be identified; The vector acquisition module includes: The vector acquisition first submodule is used to acquire the floating-point vehicle data features of each image data block; The second submodule for vector acquisition is used to obtain the floating-point vehicle attention weights of each image data block based on the similarity between the features of each floating-point vehicle data. The data inference module includes: The first data inference submodule is used to perform vehicle identification based on the target fixed-point data features and obtain the vehicle identification result. or, The target floating-point data to be inferred is a video obtained by filming the target person, and the device includes: The data acquisition module includes: The second data acquisition submodule is used to acquire multiple video image segments contained in the video obtained from the target person being filmed; The vector acquisition module includes: The third submodule for vector acquisition is used to acquire the floating-point behavioral data features of each video image segment; The fourth submodule for vector acquisition is used to obtain the floating-point behavior attention weights of each video image frame based on the similarity between the features of each floating-point behavior data. The data inference module includes: The second data reasoning submodule is used to perform behavior recognition based on the target fixed-point data features and obtain the behavior recognition result. or, The target floating-point data to be reasoned is text to be processed, and the device includes: The data acquisition module includes: The third data acquisition submodule is used to acquire multiple character segments contained in the text to be processed; The vector acquisition module includes: The fifth submodule for vector acquisition is used to obtain the floating-point text data features of each character segment; The sixth submodule for vector acquisition is used to obtain the floating-point text attention weights of each character segment based on the similarity between the features of each floating-point text data. The data inference module includes: The third data reasoning submodule is used to perform text recognition based on the target fixed-point data features to obtain text recognition results. or, The target floating-point data to be reasoned is the voiceprint data to be identified, and the device includes: The data acquisition module includes: The fourth submodule for data acquisition is used to acquire multiple voiceprint segments contained in the voiceprint data to be identified; The vector acquisition module includes: The seventh submodule for vector acquisition is used to acquire the floating-point voiceprint data features of each voiceprint segment; The vector acquisition eighth submodule is used to obtain the floating-point voiceprint attention weight of each voiceprint segment based on the similarity between the features of each floating-point voiceprint data. The data inference module includes: The fourth submodule of data inference is used to perform voiceprint recognition based on the target fixed-point data features to obtain the voiceprint recognition result.

5. The apparatus according to claim 4, characterized in that, The feature adjustment module includes: The feature adjustment submodule is used to calculate the ratio of the output fixed-point data feature to the normalization factor, and use it as the target fixed-point data feature. The feature output module includes: The feature output submodule is used to multiply the fixed-point data features and the fixed-point attention weights of each of the sub-floating-point data to obtain the output fixed-point data features.

6. An electronic device, characterized in that, include: Memory, used to store computer programs; A processor, when executing a program stored in memory, implements the method of any one of claims 1-3.

7. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the method described in any one of claims 1-3.

Citation Information

Patent Citations

  • Intention recognition method, device, readable medium and electronic equipment

    CN114090740A

  • Visual Transform compression method and system based on micro-quantization training

    CN114756517A

  • Action recognition method and device, storage medium and electronic equipment

    CN116524532A