Handwriting identification method fusing Mamba2 and mixed experts, intelligent terminal and storage medium
By integrating Mamba2 and hybrid experts, an efficient electronic handwriting identification model was constructed, which solved the shortcomings of the existing model in time sequence data processing, achieved higher feature representation ability and computing efficiency, and was suitable for complex and changeable handwriting data.
Patent Information
- Application Number
- CN202411969739.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-30
- Publication Date
- 2025-04-22
AI Technical Summary
The existing electronic handwriting identification model based on convolutional neural network and Transformer architecture has shortcomings in the long-distance dependency modeling of time series data, resulting in limited identification accuracy and high computation and memory overhead when processing long sequences, making it difficult to meet the growing demand for electronic handwriting identification.
Using the handwriting identification method of Fusion Mamba2 and Hybrid Experts, a model including embedded unit and serial fusion unit is constructed. Each fusion unit consists of Mamba2 module and hybrid expert module. The training set is constructed through multiple electronic handwriting data of multiple writers, and each data is preprocessed and trained to achieve efficient handwriting identification.
It significantly improves the feature characterization ability of electronic handwriting data, optimizes computing efficiency and resource utilization, enhances the adaptability and robustness of the model, and makes it more efficient, reliable and flexible in practical applications.
Smart Images

Figure CN119863844A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the field of information technology, and in particular to a handwriting identification method integrating Mamba2 and a mixed expert, an intelligent terminal and a storage medium. Background Art
[0002] Electronic handwriting identification, as an important branch of biometrics, is gradually deepening its application in the fields of electronic document signing and security authentication. This technology accurately identifies the writer's identity by analyzing the writer's handwriting characteristics, such as subtle differences in stroke pressure, speed, direction, etc. With the vigorous development of deep learning technology, models based on convolutional neural networks (CNN) and Transformer architectures have become the mainstream choice for electronic handwriting identification tasks.
[0003] However, the convolution-based handwriting identification model is not capable of modeling the long-distance dependencies of time series data, resulting in limited identification accuracy. Although the Transformer-based model can capture the global features of time series data, it is easy to introduce high computational and memory overhead when processing long sequences, especially when faced with a large number of features and multi-dimensional time series data. In addition, a single CNN or Transformer architecture also has limitations when processing time series features of different complexity and diversity, making it difficult to meet the growing needs of electronic handwriting identification.
[0004] Therefore, it is necessary to develop a new handwriting identification method, intelligent terminal and storage medium that integrates Mamba2 and hybrid experts. Summary of the invention
[0005] The purpose of the present invention is to provide a handwriting identification method, intelligent terminal and storage medium integrating Mamba2 and hybrid experts, which can effectively capture the global characteristics of electronic handwriting data and have the electronic handwriting identification capability with efficient computing and memory management characteristics.
[0006] In a first aspect, a handwriting identification method integrating Mamba2 and a mixed expert according to the present invention comprises the following steps:
[0007] Obtaining electronic handwriting verification data to be authenticated;
[0008] Input the electronic handwriting verification data to be identified and the corresponding electronic handwriting sample data into a pre-trained fusion model, wherein the fusion model includes an embedding unit and a plurality of fusion units with the same structure and in series, each fusion unit includes a Mamba2 module and a hybrid expert module; the fusion model is obtained by collecting multiple electronic handwriting data of multiple writers to construct positive sample pairs and negative sample pairs of a training set, and performing feature preprocessing on each electronic handwriting data before training;
[0009] The fusion model receives electronic handwriting verification data and electronic handwriting sample data as input, and outputs an identification result of the electronic handwriting verification data, wherein the identification result is used to indicate whether the electronic handwriting verification data to be identified and the electronic handwriting sample data are from the same writer.
[0010] Optionally, the electronic handwriting verification data includes writing point position, writing pressure, writing speed and pen raising and lowering status information collected by the signing device.
[0011] Optionally, the method of constructing positive sample pairs and negative sample pairs of the training set includes:
[0012] Match multiple electronic handwriting data with the same content by the same writer in pairs to form positive sample pairs of the training set;
[0013] The electronic handwriting data of the same content from different writers are matched in pairs to form negative sample pairs for the training set.
[0014] Optionally, the feature preprocessing includes calculating manual features and padding the manual features to a fixed sequence length;
[0015] The manual features include abscissa, ordinate, horizontal speed, vertical speed, path tangent angle, path tangent angle cosine value, path tangent angle sine value, stroke pressure and pen up and down status.
[0016] Optionally, the Mamba2 module includes a first linear module, a convolution module, a nonlinear activation layer, a selective state space module, a normalization layer and a second linear module; the hybrid expert module includes an expert module and a gating module;
[0017] The training process of the fusion model includes:
[0018] Input the preprocessed manual features into the embedding unit to obtain feature embedding;
[0019] The feature embedding is input into the serial fusion unit for two-way operation: the first way operation embeds the feature into the first input linear module to obtain the deep feature of the extended dimension, splits the deep feature of the extended dimension, and splits it through the convolution module and the nonlinear activation layer to obtain the state transfer matrix, the input-to-state mapping matrix, the state-to-output mapping matrix and the deep feature, and inputs them into the selective state space module to calculate the output feature tensor; the second way operation embeds the feature into the gating module to calculate the weight matrix of each expert module, selects the expert module corresponding to the weight matrix to operate on the feature tensor, and inputs the normalization layer and the second linear module to obtain the output deep feature representation with the same embedding dimension as the input feature;
[0020] Input the deep feature representation output by the fusion unit into the adaptive average pooling layer to average pool the feature dimension and perform dimensional operation to obtain the initial deep representation of the electronic handwriting data, and input the initial deep representation into the representation projection module to obtain the final deep representation of the electronic handwriting data;
[0021] The deep representation is used to calculate the similarity score of the constructed sample pairs, and the classification loss is calculated based on the similarity score and the true label to train the model until the model converges.
[0022] Optionally, the first path operation is specifically:
[0023] The feature embedding E is input into the first linear module to obtain the deep feature F1 of the extended dimension, and the deep feature F1 of the extended dimension is split into the state transfer matrix A and the feature tensor F2BC, wherein the state transfer matrix A is directly input into the selective state space module, and the feature tensor F2BC is sequentially input into the convolution module and the non-linear activation layer, and after being processed by the convolution module and the non-linear activation layer, it is split into the deep feature F2, the mapping matrix B from input to state, and the mapping matrix C from state to output, and the feature tensor F2, the mapping matrix B from input to state, and the mapping matrix C from state to output are input into the selective state space module, and the selective state space module calculates the feature tensor F3 based on the state transfer matrix A, the deep feature F2, the mapping matrix B from input to state, and the mapping matrix C from state to output.
[0024] Optionally, the second path operation is specifically:
[0025] The feature embedding E is input into the gating module, and the gating module calculates the weight matrix Weight of each expert module. The weight matrix Weight and the feature tensor F3 outputted from the first path are input into the expert module, and one or more expert modules are selected to operate on the feature tensor F3, and the feature tensor F4 is obtained by adding the operation results with the weight Weight. The feature tensor F4 is input into the normalization layer and the second linear module to obtain the output feature tensor F5 with the same dimension as the feature embedding E.
[0026] Optionally, the expert module in the fusion model is a neural network.
[0027] Optionally, the similarity score is measured by cosine similarity, Euclidean distance or Mahatma distance.
[0028] In a second aspect, an intelligent terminal according to the present invention comprises a processor and a memory, wherein the memory stores a computer program, and when the computer program is executed by the processor, the handwriting identification method integrating Mamba2 and mixed experts according to the present invention is implemented.
[0029] In a third aspect, a storage medium according to the present invention comprises a computer program, and when the computer program is executed by a processor, the handwriting identification method integrating Mamba2 and mixed experts according to the present invention is implemented.
[0030] Beneficial effects of the present invention:
[0031] (1) Significantly improve the feature representation capability: The present invention constructs an efficient handwriting identification model by integrating the Mamba2 module and the hybrid expert module. The model can make full use of the temporal characteristics in the electronic handwriting data and effectively capture long-distance dependencies, thereby significantly improving the model's feature representation capability for the electronic handwriting data. This enhanced representation capability makes the model more accurate and reliable in identifying the authenticity of handwriting.
[0032] (2) Optimizing computing efficiency and resource utilization: The fusion model of the present invention adopts advanced network structure and algorithm, which effectively reduces computing and memory overhead. Through reasonable model design and parameter tuning, the model can reduce resource consumption and improve computing efficiency while ensuring performance. This makes the model more efficient when processing a large number of features and multi-dimensional time series data, and can better adapt to the needs of actual application scenarios.
[0033] (3) Enhanced model adaptability and robustness: In view of the limitations of a single handwriting identification model architecture in processing time series features of different complexity and diversity, the present invention proposes an innovative solution. By introducing a hybrid expert module, the model can adaptively select experts to perform operations based on the importance of different features, thereby enhancing the adaptability and robustness of the model. This design enables the model to maintain stable performance when facing complex and changeable handwriting data, and demonstrates higher versatility and practicality.
[0034] In summary, the present invention not only improves the feature representation capability of the electronic handwriting identification model and reduces the resource consumption required for calculation, but also significantly enhances the adaptability and robustness of the model, making it more efficient, reliable and flexible in practical applications. BRIEF DESCRIPTION OF THE DRAWINGS
[0035] Figure 1 This is a flow chart of the handwriting identification method integrating Mamba2 and mixed experts described in the embodiments of this application;
[0036] Figure 2 This is a flowchart of the fusion model training steps in the embodiment of the present application;
[0037] Figure 3 This is a schematic diagram of the fusion model in the embodiment of the present application;
[0038] Figure 4 This is a principle block diagram of the smart terminal in the embodiment of the present application. DETAILED DESCRIPTION
[0039] The following will refer to the accompanying drawings and preferred embodiments to illustrate the implementation of the technical solution of the present invention. Those skilled in the art can easily understand other advantages and effects of the present invention from the contents disclosed in this specification. The present invention can also be implemented or applied through other different specific implementations, and the details in this specification can also be modified or changed in various ways based on different viewpoints and applications without departing from the spirit of the present invention. It should be understood that the preferred embodiments are only for illustrating the present invention, not for limiting the scope of protection of the present invention.
[0040] like Figure 1 As shown, in the embodiment of the present application, a handwriting identification method integrating Mamba2 and mixed experts comprises the following steps:
[0041] The electronic handwriting verification data to be authenticated is obtained, wherein the electronic handwriting verification data includes the writing point, writing pressure, writing speed and pen raising and lowering status information collected by the signing device.
[0042] The electronic handwriting verification data to be identified and the corresponding electronic handwriting sample data are input into a pre-trained fusion model, wherein the fusion model includes an embedding unit and a plurality of fusion units with the same structure and connected in series, and each fusion unit includes a Mamba2 module and a hybrid expert module. The fusion model is obtained by collecting multiple electronic handwriting data of multiple writers to construct positive sample pairs and negative sample pairs of a training set, and performing feature preprocessing on each electronic handwriting data before training. Among them, feature preprocessing includes calculating manual features and filling these manual features to a fixed sequence length. The manual features include abscissa, ordinate, horizontal speed, vertical speed, path tangent angle, path tangent angle cosine value, path tangent angle sine value, stroke pressure, and pen up and down state.
[0043] The fusion model receives the electronic handwriting verification data and the electronic handwriting sample data as input, and outputs the identification result of the electronic handwriting verification data, wherein the identification result is used to indicate whether the electronic handwriting verification data to be identified and the electronic handwriting sample data are from the same writer.
[0044] like Figure 3 As shown, in a possible embodiment, the Mamba2 module includes a first linear module, a convolution module, a nonlinear activation layer, a selective state space module, a normalization layer, and a second linear module; the hybrid expert module includes an expert module and a gating module. The relationship between the above modules is as follows:
[0045] The first linear module is connected to the embedding unit, the convolution module and the selective state space module respectively. The convolution module is connected to the nonlinear activation layer. The nonlinear activation layer is connected to the selective state space module. The gating module is connected to the embedding unit and the expert module respectively. The expert module is connected to the selective state space module and the normalization layer respectively. The normalization layer is connected to the second linear module.
[0046] In a possible embodiment, the method for constructing the positive sample pairs and negative sample pairs of the training set is:
[0047] Multiple electronic handwriting data with the same content from the same writer are matched in pairs to form positive sample pairs of the training set. Electronic handwriting data with the same content from different writers are matched in pairs to form negative sample pairs of the training set.
[0048] In one example, a single piece of electronic handwriting data T includes a writing point (x i ,y i ), writing pressure p i , writing speed v i , Pen up and down status t i The data is as follows, where i represents the i-th sampling point in the sequence.
[0049] For a single electronic handwriting data T, the writing point position (x i ,y i ), writing pressure p i , writing speed v i , Pen up and down status t i Calculate the horizontal coordinate X, vertical coordinate Y, horizontal speed V from the original data x , vertical speed V y 、Path tangent angle θ=arctan(V y / V x ), path tangent angle cosine value cos(θ), path tangent angle sine value sin(θ), stroke pressure P, pen up and down state T and other 9-dimensional manual features, and this set of manual features is abbreviated as Z is a manual feature, is a set of the above 9 manual features, where L is the sequence length.
[0050] For each sample pair of manual features (Z1, Z2) of two electronic handwriting data, the dynamic time planning (DTW) method is used for alignment:
[0051]
[0052] Padding is a zero-filling operation to make the feature lengths of each training sample the same. Manual feature pairs representing aligned and filled electronic handwriting data. is a fixed padding length.
[0053] like Figure 2 As shown, in a possible embodiment, the training steps for the fusion model include:
[0054] Step 1: Input the preprocessed manual features into the embedding unit to obtain feature embedding.
[0055] Step 2: embed the features into the serial fusion unit for two-way operation: the first way operation embeds the features into the first input linear module to obtain the deep features of the extended dimension, splits the deep features of the extended dimension, and splits them through the convolution module and the nonlinear activation layer to obtain the state transfer matrix, the input-to-state mapping matrix, the state-to-output mapping matrix and the deep features, and inputs them into the selective state space module to calculate the output feature tensor; the second way operation embeds the features into the gating module to calculate the weight matrix of each expert module, selects the expert module corresponding to the weight matrix to operate on the feature tensor, and inputs the normalization layer and the second linear module to obtain the output deep feature representation with the same embedding dimension as the input feature.
[0056] Step 3: Input the deep feature representation output by the fusion unit into the adaptive average pooling layer to perform average pooling on the feature dimension and perform dimensional operation to obtain the initial deep representation of the electronic handwriting data, and input the initial depth representation into the representation projection module to obtain the final depth representation of the electronic handwriting data.
[0057] Step 4: Use the deep representation to calculate the similarity score of the constructed sample pairs, and calculate the classification loss based on the similarity score and the true label to train the model until the model converges.
[0058] In one example, the fusion model consists of an embedding unit (Embedding), a series of fusion units with the same structure ( Figure 3 Only one fusion unit is given in the figure), each fusion unit is composed of a fusion of a Mamba2 module and a hybrid expert module.
[0059] During the training process, the input data I is a pre-processed manual feature pair of batch size batchsize. j represents a sequence number, for example, j = 0, represents the 0th sample in the batch size, j = 10 represents the 10th sample in the batch size, and the dimension of the input data I is transposed to And input it into the embedding unit to get the feature embedding E∈ D is the feature dimension of the deep feature:
[0060] E=BN(Embedding(I)),
[0061] Among them, BN is a batch normalization operation.
[0062] The feature embedding E is input into the serial fusion unit. For the ath fusion unit, the feature embedding E is operated in two ways. In the first operation, the feature embedding E is input into the first linear module to obtain the deep feature F1 of the expanded dimension:
[0063] F1=W1(E)+b1,
[0064] Among them, W1 is the weight matrix of the first linear module, and b1 is the bias tensor of the first linear module.
[0065] In the second operation, the feature embedding E is input into the gate module (Gate) to calculate the weight matrix (Weight) of each expert module:
[0066] Weight=Gate(E).
[0067] The gating module is not limited to hard gating, soft gating, hybrid gating, etc. The calculated weight matrix is used to subsequently select one or more expert modules to process deep features and assign importance, so that each expert module processes what it is good at and improves the feature representation ability of the fusion model.
[0068] The deep feature F1 is split into two feature tensors A and F2BC, and the F2BC feature tensor is input into the one-dimensional convolution module and the nonlinear activation layer to split into three feature tensors F2, B, and C:
[0069] A,F2BC=Split(F1),
[0070] F2,B,C=Split(σ(Conv1d(F2BC))),
[0071] Among them, Split is a tensor splitting operation, which splits the tensor according to the feature dimension; A is the state transfer matrix, B is the input-to-state mapping matrix, and C is the state-to-output mapping matrix, which is used to obtain the mapping matrix through efficient and parallel calculation through block decomposition matrix multiplication in the selective state space module (SSM).
[0072] Input A, F2, B, and C into the selective state space module to calculate the feature tensor F3:
[0073] F3 = SSM (A, B, C) (F2).
[0074] Input the feature tensor F3 and the weight matrix Weight into the expert module, select one or more expert modules to operate on the feature tensor F3, and add the weight Weitht to obtain the feature tensor F4:
[0075] F4=∑Weighti·Expert i (F3),
[0076] Expert is an expert module, which can be any neural network such as a small multi-layer perceptron or a complex large language model. Due to the sparsity of the gated module, the computational consumption of the expert module is effectively controlled, and the computational efficiency and performance are effectively improved.
[0077] The feature tensor F4 is input into the normalization layer and the second linear module to obtain an output feature tensor F5 with the same dimension as the input feature embedding E:
[0078] F5=W2(Nrom(F4))+b2
[0079] Where W2 is the weight matrix of the second linear module, b2 is the bias tensor of the second linear module; Norm is the normalization layer, and any mainstream normalization method can be applied, with layer normalization method or root mean square normalization method being the best.
[0080] The input is calculated by each fusion unit in the fusion model in turn to obtain the output deep feature F out .
[0081] By calculating the deep representation of sample pairs (including positive sample pairs and negative sample pairs) The cosine similarity of and the true label Y calculates the loss to train the fusion model, specifically:
[0082] The deep feature representation F output by the fusion unit out Input the adaptive average pooling layer (AdaptiveAvgPool) to average pool the feature dimensions and perform dimensional operations to obtain the initial depth representation of the electronic handwriting data
[0083] R = AdaptiveAvgPool(F out ).
[0084] The initial depth representation is input into the representation projection MLP to obtain the final depth representation of the electronic handwriting data.
[0085]
[0086] in, is the feature dimension of the final deep representation.
[0087] Using Deep Representation Calculate the similarity or distance of the constructed sample pair. In this embodiment, cosine similarity is used to measure the matching degree of two feature vectors, but it is not limited to cosine similarity. Any method for measuring feature distance can be used as a comparison strategy, such as Euclidean distance, Mahatma distance, etc.:
[0088]
[0089] Among them, Sim is the matching degree of two feature vectors, They respectively represent the representation of the retained sample and the representation of the sample to be verified in the sample pair.
[0090] The classification loss is calculated using the similarity score of the sample pair and the true label to train the model until the model converges. In this embodiment, binary cross entropy (BCE) is used as the loss for binary classification:
[0091]
[0092] Finally, save the definition of the fusion model and the trained parameters to perform the task of identifying electronic handwriting signature data.
[0093] like Figure 4 As shown, in an embodiment of the present application, an intelligent terminal includes a processor and a memory, wherein the memory stores a computer program. When the computer program is executed by the processor, the handwriting identification method integrating Mamba2 and a mixed expert as described in the embodiment of the present application is implemented.
[0094] In an embodiment of the present application, a storage medium includes a computer program, and when the computer program is executed by a processor, the method for handwriting identification by integrating Mamba2 and a mixed expert as described in the embodiment of the present application is implemented.
[0095] The program code for implementing the method of the present application can be written in any combination of one or more programming languages. These program codes can be provided to a processor or controller of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that the program code, when executed by the processor or controller, implements the functions / operations specified in the flow chart and / or block diagram. The program code can be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.
[0096] In the context of the present application embodiment, the storage medium can be a tangible storage medium, which can contain or store a program for use by an instruction execution system, device or equipment or used in combination with an instruction execution system, device or equipment. The storage medium can be a machine-readable signal storage medium or a machine-readable storage medium. The storage medium can include but is not limited to electronic, magnetic, optical, electromagnetic, infrared or semiconductor systems, devices or equipment, or any suitable combination of the above. A more specific example of the storage medium can include an electrical connection based on one or more lines, 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), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.
[0097] The above-mentioned embodiments are preferred implementation modes of the present invention, but the implementation modes of the present invention are not limited to the above-mentioned embodiments. Any other changes, modifications, substitutions, combinations and simplifications made without departing from the spirit and principle of the present invention shall be equivalent replacement modes and shall be included in the protection scope of the present invention.
Claims
1. A handwriting identification method integrating Mamba2 and mixed experts, characterized in that: The following steps are involved: Obtaining electronic handwriting verification data to be authenticated; Input the electronic handwriting verification data to be identified and the corresponding electronic handwriting sample data into a pre-trained fusion model, wherein the fusion model includes an embedding unit and a plurality of fusion units with the same structure and connected in series, and each fusion unit includes a Mamba2 module and a hybrid expert module; The fusion model is obtained by collecting multiple electronic handwriting data of multiple writers to construct positive sample pairs and negative sample pairs of the training set, and performing feature preprocessing on each electronic handwriting data before training; The fusion model receives electronic handwriting verification data and electronic handwriting sample data as input, and outputs an identification result of the electronic handwriting verification data, wherein the identification result is used to indicate whether the electronic handwriting verification data to be identified and the electronic handwriting sample data are from the same writer.
2. The handwriting identification method integrating Mamba2 and mixed experts according to claim 1 is characterized in that: The electronic handwriting verification data includes the writing point, writing pressure, writing speed and pen raising and lowering status information collected by the signing device.
3. The handwriting identification method integrating Mamba2 and mixed experts according to claim 1, characterized in that: Methods for constructing positive sample pairs and negative sample pairs for training sets include: Match multiple electronic handwriting data with the same content by the same writer in pairs to form positive sample pairs of the training set; The electronic handwriting data of the same content from different writers are matched in pairs to form negative sample pairs for the training set.
4. The handwriting identification method integrating Mamba2 and mixed experts according to claim 1, characterized in that: The feature preprocessing includes calculating manual features and padding these manual features to a fixed sequence length; The manual features include abscissa, ordinate, horizontal speed, vertical speed, path tangent angle, path tangent angle cosine value, path tangent angle sine value, stroke pressure and pen up and down status.
5. The handwriting identification method integrating Mamba2 and mixed experts according to claim 4 is characterized in that: The Mamba2 module includes a first linear module, a convolution module, a nonlinear activation layer, a selective state space module, a normalization layer and a second linear module; the hybrid expert module includes an expert module and a gating module; The training process of the fusion model includes: Input the preprocessed manual features into the embedding unit to obtain feature embedding; The feature embedding is input into the serial fusion unit for two-way operation: the first way operation embeds the feature into the first input linear module to obtain the deep feature of the extended dimension, splits the deep feature of the extended dimension, and splits it through the convolution module and the nonlinear activation layer to obtain the state transfer matrix, the input-to-state mapping matrix, the state-to-output mapping matrix and the deep feature, and inputs them into the selective state space module to calculate the output feature tensor; the second way operation embeds the feature into the gating module to calculate the weight matrix of each expert module, selects the expert module corresponding to the weight matrix to operate on the feature tensor, and inputs the normalization layer and the second linear module to obtain the output deep feature representation with the same embedding dimension of the input feature; Input the deep feature representation output by the fusion unit into the adaptive average pooling layer to average pool the feature dimension and perform dimensional operation to obtain the initial deep representation of the electronic handwriting data, and input the initial deep representation into the representation projection module to obtain the final deep representation of the electronic handwriting data; The deep representation is used to calculate the similarity score of the constructed sample pairs, and the classification loss is calculated based on the similarity score and the true label to train the model until the model converges.
6. The handwriting identification method integrating Mamba2 and mixed experts according to claim 5 is characterized in that: The first path operation is specifically: The feature embedding F is input into the first linear module to obtain the deep feature F1 of the extended dimension, and the deep feature F1 of the extended dimension is split into the state transfer matrix A and the feature tensor F2BC, wherein the state transfer matrix A is directly input into the selective state space module, and the feature tensor F2BC is sequentially input into the convolution module and the non-linear activation layer, and after being processed by the convolution module and the non-linear activation layer, it is split into the deep feature F2, the mapping matrix B from input to state, and the mapping matrix C from state to output, and the feature tensor F2, the mapping matrix B from input to state, and the mapping matrix C from state to output are input into the selective state space module, and the selective state space module calculates the feature tensor F3 based on the state transfer matrix A, the deep feature F2, the mapping matrix B from input to state, and the mapping matrix C from state to output.
7. The handwriting identification method integrating Mamba2 and mixed experts according to claim 6 is characterized in that: The second path operation is specifically: The feature embedding E is input into the gating module, and the gating module calculates the weight matrix Weight of each expert module. The weight matrix Weight and the feature tensor F3 outputted from the first path are input into the expert module, and one or more expert modules are selected to operate on the feature tensor F3, and the feature tensor F4 is obtained by adding the operation results with the weight Weight. The feature tensor F4 is input into the normalization layer and the second linear module to obtain the output feature tensor F5 with the same dimension as the feature embedding E.
8. The handwriting identification method integrating Mamba2 and mixed experts according to claim 5 is characterized in that: The expert module in the fusion model is a neural network.
9. The handwriting identification method integrating Mamba2 and hybrid experts according to claim 5 is characterized in that: The similarity score is measured by cosine similarity, Euclidean distance or Mahatma distance.
10. An intelligent terminal, comprising a processor and a memory, wherein the memory stores a computer program, and when the computer program is executed by the processor, the handwriting identification method integrating Mamba2 and mixed experts as claimed in any one of claims 1 to 9 is implemented.
11. A storage medium comprising a computer program, wherein when the computer program is executed by a processor, the method for handwriting identification by integrating Mamba2 and mixed experts as claimed in any one of claims 1 to 9 is implemented.
Citation Information
Cited By
FPGA superposition processor acceleration system and method based on state space duality
CN120179608A
Signature verification method and system based on structure dynamic time warping and handwriting reconstruction
CN120877312A