Low-resource language field text classification method for uploading quantum recurrent neural network in batches

By uploading the quantum recurrent neural network in batches, the word embedding vector is divided into multiple batches and connected through variable component quantum circuits, and fused into classic neural networks, solving the problems of low accuracy and insufficient efficiency in vehicle professional language text classification, and improving the accuracy and efficiency of text classification.

CN120492631APending Publication Date: 2025-08-15ARMOR ACADEMY OF CHINESE PEOPLES LIBERATION ARMY
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510626567.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-15
Publication Date
2025-08-15

AI Technical Summary

Technical Problem

The existing neural network text classification methods are low in accuracy and insufficient in efficiency when processing vehicle professional language, especially in text processing with high-dimensional sparseness and strong context dependence.

Method used

The batch upload quantum recurrent neural network (BUQNN) is used to divide the input word embedding vector into multiple batches according to the number of qubits, and is connected through variable component quantum circuits to form a hybrid model of encoding-variable layering, which is fused into a classic neural network for text classification.

Benefits of technology

It improves the model's ability to understand complex language expressions, improves the accuracy and efficiency of text classification, solves the problems of insufficient data volume or poor quality in traditional methods, and enhances the generalization ability of the model.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120492631A_ABST
    Figure CN120492631A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of neural networks and vehicle professional language processing, in particular to a vehicle professional language text classification method and system based on a quantum recurrent neural network, and the method comprises the steps: enabling a word to be embedded into a pre-trained hybrid calculation model with a vector as an input feature, the hybrid calculation model comprises a quantum recurrent neural network uploaded in batches and a classical neural network, and the quantum recurrent neural network uploaded in batches is fused into the classical neural network; the quantum neural network uploaded in batches is characterized in that an input word embedding vector is divided into a plurality of batches according to a predefined quantum bit number, and the batches are connected through a variable component sub-circuit, so that a coding-variable layering hybrid model is formed; and running the hybrid calculation model, and outputting the text classification corresponding to the to-be-processed corpus data. According to the method, limited data resources are better utilized to carry out classification tasks, and meanwhile, the understanding ability of the model for complex vehicle professional language expression is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of neural networks and natural language processing, and in particular to a vehicle professional language text classification method based on quantum recurrent neural networks. Background Art

[0002] Text classification is a fundamental and important task in natural language processing. Its goal is to classify a given text into predefined categories or labels. These categories are typically defined based on the text's subject matter, content, or other characteristics. In the case of vehicle-related text classification, the task is to categorize vehicle-related text. These documents may include vehicle maintenance records, fault diagnosis reports, and vehicle instruction manuals. The purpose of classification may be to identify key information within the text, such as fault type and repair steps, or to assign the text to specific categories for easier retrieval and analysis. To achieve vehicle-related text classification, machine learning or deep learning algorithms are typically used to train classification models. These models extract features from the text and learn how to map the text to predefined categories. During the training process, a large amount of labeled data is required to guide the model's learning. Once trained, the classification model can be used to classify new vehicle-related text. This helps users quickly identify and understand the text's content, improving processing efficiency.

[0003] A quantum computer is a physical device that follows the laws of quantum mechanics to perform high-speed mathematical and logical operations, and to store and process quantum information. When a device processes and calculates quantum information and runs quantum algorithms, it is considered a quantum computer. Quantum computers are a key technology under research because of their ability to process mathematical problems more efficiently than conventional computers.

[0004] How to combine the relevant neural network model of text classification with quantum computer related technologies to improve the model's ability to understand complex language expressions, that is, to improve the accuracy, is a problem that needs to be considered.

[0005] In the military, efficient processing of specialized vehicle language text is crucial for combined brigade equipment maintenance, combat command, and logistics support. Traditional text classification methods suffer from low efficiency and inaccuracy when processing high-dimensional, sparse, and context-dependent vehicle-specific text. This paper aims to leverage the parallelism and quantum superposition properties of quantum computing to improve text classification performance. Summary of the Invention

[0006] Purpose of the invention: To address the problem of low accuracy in neural network text classification in the existing technology, the present invention provides a method for classifying text in the vehicle professional language field by uploading quantum recurrent neural networks in batches. The present invention also discloses a vehicle professional language field text classification system and related devices based on uploading quantum recurrent neural networks in batches.

[0007] Technical solution: In the first aspect, the present invention provides a method for uploading text classification in the vehicle professional language field of a quantum recurrent neural network in batches, the method comprising:

[0008] After preprocessing the corpus data, the corresponding word embedding vector is obtained through the pre-trained language model;

[0009] A hybrid computing model pre-trained using the word embedding vector as an input feature, the hybrid computing model including batch-uploading quantum neural networks and classical neural networks, and fusing the batch-uploaded quantum neural networks into the classical neural networks, the hybrid computing model being trained using historical corpus data and corresponding text classification; the batch-uploaded quantum neural network divides the input word embedding vector into several batches according to a pre-defined number of quantum bits, and connects the batches through a variational quantum circuit, thereby forming an encoding-variational layered hybrid model;

[0010] Run the hybrid computing model and output the text classification corresponding to the corpus data to be processed.

[0011] Further, including:

[0012] The batch uploading quantum neural network includes multiple groups of alternating coding layers and variation layers. The input port of the coding layer is determined according to the number of quantum bits. The dimensions of the input word vector features in the input features are divided into batches according to the number of quantum bits. The feature vector groups contained in each batch are encoded and embedded in the circuit. The variation layer is then used to perform entanglement evolution on the encoded quantum state to ensure that all feature vectors are embedded in the circuit. Finally, the output result is obtained. The initial quantum of the quantum bit is |0>, and the encoded quantum state contains information corresponding to the vector features contained in each batch.

[0013] Further, including:

[0014] The batch-dividing the dimensions of the input word vector features in the input features according to the number of quantum bits includes:

[0015] According to the number of qubits at the input port, the dimension of the input word vector feature is divided into multiple batches, that is, the ratio of the dimension of the input word vector feature to the number of qubits. If its value is an integer, the total number of corresponding batches is the corresponding ratio. Otherwise,

[0016] If its value is a non-integer, the total number of batches needs to be increased by one based on the ratio, and the remaining space of the last batch is filled with zero elements. Therefore, the input features after segmentation include multiple feature vector groups, each of which contains feature vectors corresponding to the number of quantum bits.

[0017] Further, including:

[0018] The encoding of the feature vector groups contained in each batch and embedding the encoded feature vectors into a circuit comprises:

[0019] Perform the following steps on all batches of feature vectors one by one:

[0020] The feature vectors in the current batch of feature vectors are passed through the corresponding single bit R y The gate generates the first angle, and the corresponding single bit R z The door generates a corresponding second angle; the first angle is obtained by rotating R around the y axis. y The gate is applied to the quantum state, and the second angle is obtained by rotating R around the z axis. z Gates are applied to quantum states.

[0021] Further, including:

[0022] The variation layer is then used to perform entanglement evolution on the quantum state obtained by encoding to ensure that all eigenvectors are embedded in the circuit, and finally the output result is obtained, including:

[0023] Applying an additional single-bit operation V(θ) to the quantum state after the coding layer to generate a new quantum state, wherein V(θ) is a variation layer controlled by a parameter θ, which is the rotation angle of the single-bit rotation gate;

[0024] Encoding all other eigenvector groups into corresponding quantum states, and performing the corresponding single-bit operation after each encoding, thereby generating a series of quantum states and their variational states after applying the single-bit operation;

[0025] Perform measurement operations on the variational state and obtain the expected value of the measurement result.

[0026] Further, including:

[0027] The fusing of the quantum neural network uploaded in batches into the classical neural network includes fusing four quantum neural networks uploaded in batches into a long short-term memory model, wherein the four quantum neural networks uploaded in batches are respectively recorded as: a first quantum neural network uploaded in batches, a second quantum neural network uploaded in batches, a third quantum neural network uploaded in batches, and a fourth quantum neural network uploaded in batches, specifically including:

[0028] Improvement of the forget gate: using the first activation function to process the expected value obtained by uploading the quantum neural network in the first batch to obtain the output vector of the forget gate;

[0029] Memory gate improvement: The second batch upload quantum neural network processes the input features and outputs a set of values through the second activation function. This set of values is used to determine the information added to the current cell state.

[0030] At the same time, the third batch-uploaded quantum neural network also processes the same input features and generates a new cell state candidate through a third activation function;

[0031] Multiply the output of the improved forget gate by the previous cell information, and accumulate the cell information of the new memory gate to obtain new cell information;

[0032] Output gate improvement: After obtaining the expected value from the fourth batch of uploaded quantum neural network, the output is obtained through the fourth activation function, the output is multiplied element by element with the new cell information to generate a new hidden state vector, and then the vector is passed to the next time step for calculation.

[0033] Further, including:

[0034] The step of fusing the quantum neural network uploaded in batches into the classical neural network further includes fusing three quantum neural networks uploaded in batches into a gated recurrent unit model, wherein the three quantum neural networks uploaded in batches are respectively recorded as: a first quantum neural network uploaded in batches, a second quantum neural network uploaded in batches, and a third quantum neural network uploaded in batches, specifically including:

[0035] Reset gate improvement: The output features of the pre-trained language model are fed into the model together with the hidden state at the previous moment. After obtaining the expected value from the first batch of quantum neural network uploads, the first output is obtained through the first activation function. The first output is used to determine how much hidden state information at the previous moment should be used when calculating the current candidate hidden state;

[0036] Update gate improvement: After obtaining the expected value from the second batch of quantum neural network uploads, a second output is obtained through a second activation function. The second output is used to update the state information.

[0037] After multiplying the first output by the hidden state output of the previous time step, the result is connected to the output feature of the trained language model and used as the input of the third batch uploading quantum neural network. After obtaining the corresponding expected value, a third output is obtained through a third activation function. The third output is used to calculate the candidate hidden state, and then the vector is passed to the next time step for calculation.

[0038] In a second aspect, the present invention further provides a vehicle professional language text classification system based on a quantum recurrent neural network, the system comprising:

[0039] The preprocessing module is used to preprocess the corpus data to be processed and obtain the corresponding word embedding vector through the pre-trained language model;

[0040] An input module is configured to use the word embedding vector as an input feature in a pre-trained hybrid computing model, wherein the hybrid computing model includes batch-uploading quantum neural networks and classical neural networks, and fusing the batch-uploaded quantum neural networks into the classical neural network. The hybrid computing model is trained using historical corpus data and corresponding text classification. The batch-uploaded quantum neural network divides the input word embedding vector into several batches according to a pre-defined number of quantum bits, and connects the batches through a variational quantum circuit, thereby forming an encoding-variational layered hybrid model.

[0041] The prediction module is used to run the hybrid computing model and output the text classification corresponding to the corpus data to be processed.

[0042] In a third aspect, the present invention provides a storage medium storing a computer program, wherein the computer program is configured to execute the method described above when running.

[0043] In a fourth aspect, the present invention provides an electronic device comprising a memory and a processor, wherein the memory stores a computer program, and the processor is configured to run the computer program to execute the method described above.

[0044] Beneficial effects: Compared with the prior art, the present invention has the following advantages:

[0045] The present invention processes the preprocessed corpus data in batches according to the number of quantum bits. This method allows processing sequence data without reducing the dimension of the feature vector and does not require a large number of quantum bits to process the data, thereby ensuring processing efficiency and controlling the scale of the model.

[0046] The batch uploading quantum neural network of the present invention includes multiple groups of alternating coding layers and variational layers. The input port of the coding layer is determined according to the number of quantum bits. The dimensions of the input word vector features in the input features are divided into batches according to the number of quantum bits. The feature vector group contained in each batch is encoded and embedded in the circuit. The variational layer is then used to perform entanglement evolution on the encoded quantum state to ensure that all feature vectors are embedded in the circuit, and finally the output result is obtained. Therefore, the essence of the batch uploading quantum neural network is to use a batch uploaded variational quantum circuit structure, which can directly embed feature vectors into the circuit without the need for additional linear layers, thereby simplifying the model structure, thereby improving computational efficiency, and avoiding overfitting to a certain extent. The reduction of linear layers can reduce the model's excessive dependence on training data, improve the model's generalization ability, and make it perform better on unseen data. Finally, the model's generalization ability is also enhanced.

[0047] The present invention integrates batch-uploaded quantum neural networks into classical neural networks, enabling the corresponding models to better utilize limited data resources for text classification tasks while improving the model's ability to understand complex language expressions. It also addresses the problem that traditional text classification models may be limited by insufficient data volume or poor data quality in these regions. In other words, the present invention is also applicable to text classification in the field of vehicle professional language, thereby improving the accuracy of text classification. BRIEF DESCRIPTION OF THE DRAWINGS

[0048] Figure 1 This is an overall flow chart of the low-resource language domain text classification method using batch uploading of quantum recurrent neural networks as described in Example 1 of the present invention;

[0049] Figure 2 This is a simplified flowchart of the low-resource language domain text classification method using batch uploading of quantum recurrent neural networks as described in Example 1 of the present invention;

[0050] Figure 3 Schematic diagram of the structure of a BUQNN according to an embodiment of the present invention;

[0051] Figure 4 for Figure 3 Schematic diagram of the coding layer circuit and variational layer structure used in the BUQNN structure;

[0052] Figure 5 Schematic diagram of the structure of BUQLSTM according to an embodiment of the present invention;

[0053] Figure 6 Schematic diagram of the structure of BUQGRU according to an embodiment of the present invention;

[0054] Figure 7This is a schematic diagram of the structure of the vehicle professional language text classification system based on quantum recurrent neural network according to Example 3 of the present invention;

[0055] Figure 8 This is a hardware structure block diagram of a computer terminal for the low-resource language domain text classification method using a quantum recurrent neural network for batch uploading according to an embodiment of the present invention. DETAILED DESCRIPTION

[0056] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention and not all of the embodiments. All other embodiments obtained by ordinary technicians in this field based on the embodiments of the present invention without making any creative efforts shall fall within the scope of protection of the present invention.

[0057] It's important to note that in classical computing, the most fundamental unit is the bit, and the most basic control mode is the logic gate. Circuit control can be achieved through combinations of logic gates. Similarly, quantum logic gates are used to manipulate qubits. Quantum logic gates enable quantum states to evolve. Quantum logic gates are the foundation of quantum circuits. Quantum logic gates include single-bit quantum logic gates such as the Hadamard gate (H gate), Pauli-X gate (X gate), Pauli-Y gate (Y gate), Pauli-Z gate (Z gate), RX gate (RX rotation gate), RY gate (RY rotation gate), and RZ gate (RZ rotation gate); and multi-bit quantum logic gates such as the CNOT gate, CR gate, iSWAP gate, and Toffoli gate.

[0058] Quantum logic gates are typically represented using unitary matrices. Unitary matrices are not only a matrix form, but also a type of operation and transformation. A typical quantum logic gate operates on a quantum state by multiplying the unitary matrix on the left by the vector corresponding to the quantum state's right vector.

[0059] Example 1

[0060] like Figure 1As shown, the present invention provides a low-resource language field text classification method for batch uploading quantum recurrent neural network, the method comprising: preprocessing the corpus data to be processed, and obtaining the corresponding word embedding vector through a pre-trained language model; using the word embedding vector as an input feature in a pre-trained hybrid computing model, the hybrid computing model comprising a batch-uploaded quantum neural network and a classical neural network, and fusing the batch-uploaded quantum neural network into the classical neural network, the hybrid computing model being obtained by training historical corpus data and corresponding text classification; the batch-uploaded quantum neural network divides the input word embedding vector into several batches according to a predefined number of quantum bits, and connects each batch through a variational quantum circuit, thereby forming an encoding-variation layered hybrid model; running the hybrid computing model, and outputting the text classification corresponding to the corpus data to be processed.

[0061] In an optional and specific implementation method of this embodiment, after the corpus is pre-processed, the word embedding vector is first obtained through MBERT (Multilingual BERT), and the word embedding vector is sent to a hybrid computing model, which is composed of a batch upload network and a classical neural network. Subsequently, the parameters of the model are updated in reverse by calculating the gradient and loss until the model converges. The trained model is finally used to predict text classification. A preferred solution of this embodiment is to process text classification of vehicle professional language more effectively. For example, this embodiment can further extract semantic features from word embedding features. Figure 2 As shown, the specific steps include:

[0062] S1 preprocesses the vehicle professional language corpus data to be processed and obtains the corresponding word embedding vector through the pre-trained language model.

[0063] This embodiment does not limit the pre-trained language models therein. For example, the MBERT model, NLP model, and GPT model can all be used as pre-trained models of this application and obtain corresponding word embedding vectors.

[0064] In this embodiment, the preprocessing of data mainly but not limitedly includes: noise removal: applying a text cleaning algorithm to remove irrelevant characters and noise data; format standardization: performing unified format processing on the text, including case conversion, punctuation normalization and word standardization; duplicate content elimination: using a hash algorithm to deduplicate the text, and by calculating the hash value of the text, identifying and removing duplicate content and other preprocessing methods.

[0065] S2 uses the word embedding vector as an input feature in a pre-trained hybrid computing model, wherein the hybrid computing model includes a quantum neural network and a classical neural network uploaded in batches, and the batch uploaded quantum neural network is integrated into the classical neural network. The hybrid computing model is obtained by training historical vehicle professional language corpus data to be processed and corresponding text classification. The batch uploaded quantum neural network divides the input word embedding vector into several batches according to a pre-defined number of quantum bits, and connects each batch through a variational quantum circuit, thereby forming a coding-variational layered hybrid model.

[0066] This step in this embodiment also includes at least the following steps:

[0067] Step S21 builds the quantum neural network BUQNN for batch uploading:

[0068] The BUQNN proposed in this application divides the input features into batches based on a predefined number of qubits and connects them through variational quantum circuits to form a hybrid encoding-variational layered architecture. This approach allows processing sequential data without reducing the dimensionality of the feature vectors and does not require a large number of qubits to process the data.

[0069] Specifically, since quantum neural networks are a type of recurrent neural network based on VQC (variational quantum circuit architecture), they enable further optimization and extension of recurrent neural networks within the framework of quantum computing. This type of classical hybrid quantum neural network combines the advantages of both classical and quantum approaches. Quantum neural networks have demonstrated remarkable potential in text classification for vehicle-specific language. Traditional text classification models may be limited by insufficient data or poor data quality. Quantum neural networks, however, leverage the advantages of quantum computing to better utilize limited data resources for text classification tasks while improving the model's understanding of complex text classification. However, due to the influence of current NISQ devices, or noisy intermediate-scale quantum devices, in current quantum neural networks, input features are compressed through a linear layer to match the dimensionality of the qubit. This dimensionality reduction through a linear layer results in a certain loss of relevant semantic information, which is wasteful for vehicle-specific language.

[0070] In a quantum neural network (QNN), the encoding, decoding, and variational gates are further divided into the encoding layer, decoding layer, and variational layer. The selection of the encoding gate is based on the selected encoding method and the number of input features. The optimal selection of the encoding method is crucial for learning the QNN model. The present invention implements the BUQNN using a multi-layer encoding-variational architecture.

[0071] It needs to convert the input features into Divide into n / N=p batches, where N is the number of qubits and n is the dimension of the input word vector features. Output e by the current MBERT model t and the previous hidden layer feature h t-1 , t is the current time. Therefore, after segmentation, it is expressed as:

[0072]

[0073] in, arrive are both vectors containing N features.

[0074] The above assumes that the partition is evenly separable. If it is not evenly separable, the number of batches p needs to be increased by 1 and the remaining space is filled with zero elements. The partitioned representation is:

[0075]

[0076] For demonstration purposes, Figure 3 As shown, in the embodiment of the present invention, four quantum bits are used and a 12-dimensional vector is taken, that is, n=12, that is, p=3 at this time, and there is a variation layer between any two coding layers.

[0077] It should be noted that the relationship between the coding layer and the variation layer is only a design choice, and alternative designs can also be selected. Figure 3 For the structure shown, the eigenvector is represented as:

[0078]

[0079] That is to say like Figure 3 The variation layers shown include three V(θ1), V(θ2) and V(θ3).

[0080] Therefore, in this embodiment, each feature batch is embedded in the circuit through angle encoding and then passed through the variational layer. Only one feature batch needs to be uploaded to the circuit each time. After loading p times, all feature vectors can be embedded in the circuit.

[0081] In this embodiment, it is worth noting that the essence of BUQNN is to use batch uploaded VQC, that is, a variational quantum circuit structure, which is different from the VQC structure contained in the traditional QLSTM network, that is, the quaternion long short-term memory network. This application can directly embed the feature vector into the circuit without the need for an additional linear layer.

[0082] Typically, the coding layer consists of single-bit H, R on each quantum circuit. y 、R zGate. In the field of quantum gates, single-bit H gates usually refer to HADAMARD gates. y The gate usually refers to the Pauli Y gate, a single-bit R x In the field of quantum gates, a gate usually refers to a Pauli Z gate.

[0083] In the first quantum circuit, the single-bit Ry gate is based on R y (arctan(x1)) as an example to illustrate the revolving door and single-bit R z The door is R z (arctan(x1 2 )) is used as an example to illustrate the rotation gate, which is the quantum gate layout of the encoding layer on the first quantum circuit. In the second quantum circuit, the single-bit Ry gate is based on R y (arctan(x2)) as an example to illustrate the revolving door and single-bit R z The door is R z (arctan(x2 2 )) is used as an example to illustrate the rotation gate, which is the quantum gate layout of the encoding layer on the second quantum circuit. The parameters x1~x 2 1 and is the rotation angle. For the sake of brevity, more quantum circuits are not described one by one. For example, the parameters and are the parameters of the third and fourth quantum circuits. The quantum gate layout used in the coding layer is designed on demand and is not limited to a fixed specific example. y 、R z The gate is one of the optional implementation examples of the preset encoding method, but it is not the only implementation example.

[0084] like Figure 4 As shown, it shows the Figure 3 The coding layer circuit and variable layer structure used in the BUQNN structure diagram. In conjunction with the language sentiment classification of this embodiment, in a simulation containing n quantum bits, consider a batch vector Among them, 1≤i≤N, 1≤j≤p. For each Through the corresponding single-bit R y Door generation angle and through the corresponding single-bit R z Door generation angle A total of 2i rotation angles. θ i,1 By rotating R around the y-axis y (θ i,1 ) gate is applied to the quantum state, and θ i,2 By rotating R around the z axis z (θ i,2 ) gates are applied to quantum states.

[0085] Then, based on the above content, this implementation also applies an additional single-bit operation V(θ) to the quantum state after passing through the encoding layer, thereby generating a new quantum state, where V(θ) is a variational layer controlled by parameter θ, and parameter θ is the rotation angle of the single-bit rotation gate; and all other eigenvector groups are encoded into the corresponding quantum states, and the corresponding single-bit operation is performed after each encoding, thereby generating a series of quantum states and their variational states after applying the single-bit operation; performing a measurement operation on the variational state to obtain the expected value of the measurement result.

[0086] In a specific implementation of this embodiment, as Figure 4 As shown, the encoded data is in a quantum state and undergoes a series of unitary operations, including at least but not limited to multiple CNOT gates and single-bit rotation gates.

[0087] That is, the variational layer or variational circuit includes a series of CNOT gates on each quantum circuit. A pair of quantum bits are entangled through the CNOT gates, and the CNOT gate of one quantum bit is controlled by the other quantum bit.

[0088] See also Figure 4 In an alternative embodiment, qubits q1 and q2 are entangled via CNOT gates, and qubit q2's CNOT gate is controlled by qubit q1. This means the CNOT gate on the second quantum circuit is controlled by the first quantum circuit. In this case, the second quantum circuit is the target circuit, while the first quantum circuit is the control circuit. The control circuit controls the target circuit, incorporating information from the control circuit into the target circuit without affecting the control circuit.

[0089] The CNOT gates between qubits q2 and q3 create entanglement, and qubit q3's CNOT gate is controlled by qubit q2. This means the CNOT gate on the third quantum circuit is controlled by the second quantum circuit. In this case, the third quantum circuit is the target circuit, while the second quantum circuit is the control circuit.

[0090] Quantum bits q3 and q4 are entangled through the CNOT gate, and the CNOT gate of quantum bit q4 is controlled by quantum bit q3. That is, the CNOT gate on the fourth quantum circuit is controlled by the third quantum circuit. At this time, the fourth quantum circuit is the target circuit and the third quantum circuit is the control circuit.

[0091] The qubits q4 and q1 are entangled through the CNOT gate, and the CNOT gate of qubit q1 is controlled by qubit q4. That is, the CNOT gate on the first quantum circuit is controlled by the fourth quantum circuit. At this time, the first quantum circuit is the target circuit and the fourth quantum circuit is the control circuit.

[0092] The control methods of other quantum circuits between q1~q3, q2~q4, etc. are similar to the above and will not be repeated here.

[0093] But it should be noted that Figure 4 The CNOT gate ring structure is not the only control method. In fact, the CNOT gate ring mode is diverse and can be changed according to actual needs.

[0094] See also Figure 4 , the variational layer or variational circuit also includes a single-bit quantum rotation gate on each quantum circuit. The single-bit quantum rotation gate includes a single-bit R y (α), R z (β), R x (γ) gate. For example, each of the first to fourth quantum circuits includes a single-bit quantum rotation R y (α), R z (β), R x (γ) gate. It is usually considered that R y (θ), R z (θ), R x (θ) doors are revolving doors that rotate along the X, Y, and Z axes respectively, and the parameter θ is the rotation angle.

[0095] In this embodiment, if Figure 4 As shown, different rotation angle parameters α, β and γ are selected, and R y (α), R z (β), R x (γ) gates construct arbitrary single-bit unitary transformation gates. The position of any point on the Bloch sphere can be determined by R y (α), R z (β), R x The variational layer constructs any expected entangled state through the CNOT ring structure and the single-bit rotation gate.

[0096] In this embodiment, the single-bit revolving gate R(α, β, γ) is based on R x (α1),R z (β1), R x The (γ1) gate is used as an example of a rotation gate in the first quantum circuit, where the parameters a1, β1, and γ1 are the rotation angles. It should be noted that the quantum gate layout used in the variational layer is designed on demand and is not limited to the specific example shown in the figure.

[0097] In this embodiment, the single-bit revolving gate R(α, β, γ) is based on R x (α2), R z (β2), R xThe (γ2) gate is explained as an example of a rotation gate used in the second quantum circuit, where the parameters α2, β2, and γ2 are the rotation angles.

[0098] In this embodiment, the single-bit revolving gate R(α, β, γ) is based on R x (α3), R z (β3), R x The (γ3) gate is explained as an example of the rotation gate used in the third quantum circuit, where the parameters α3, β3, and γ3 are the rotation angles.

[0099] In this embodiment, the single-bit revolving gate R(α, β, γ) is based on R x (α4), R z (β4), R x The (γ4) gate is explained as an example of the rotation gate used in the fourth quantum circuit, where the parameters a4, β4, and γ4 are the rotation angles.

[0100] It should be noted that this embodiment only uses four quantum circuits, and it is meaningless to expand to more quantum circuits. In this embodiment, more quantum circuits will not be described separately one by one.

[0101] Based on the above introduction, when applying the above quantum circuit to the corresponding vehicle professional language text classification, here R(θ,α,γ) represents a universal parameterized single-bit rotation gate. Therefore, combined with the batch p=3 above, it can be expressed here as:

[0102]

[0103] Specifically, a quantum circuit consisting of 4 quantum bits.

[0104] Therefore, the process of the above-mentioned quantum state change in this embodiment can be summarized as follows:

[0105] Step 1: Initialize the quantum state. First, the initial state of the four qubits in the quantum circuit is represented as |ψ0>, which is usually a pure state where all qubits are in the ground state |0>, that is, |ψ0> = |0000>.

[0106] Step 2: Encode the feature vector. is encoded into |ψ0>, forming a new quantum state |ψ1>. The encoding operation uses R y and R z The door, whose rotation angle is determined by The elements in are determined. This operation is expressed as So the quantum state becomes

[0107] Step 3: Add unitary transformation. In this process, additional quantum operations V(θ1) are applied to |ψ1>, introducing more complex quantum correlations and generating new quantum states. Here, V(θ1) is the variation layer controlled by parameter θ1.

[0108] Step 4. Repeat steps 2 and 3 to Encode into the corresponding quantum state and perform a single-bit operation V(θ i ), where i∈1,2,...,p.

[0109] The resulting series of quantum states |ψ2>,...,|ψ p > and their variational states after applying unitary operations |ψ2°>,...,|ψ p °>. For example, for The encoded state is:

[0110]

[0111] Then, applying the unitary operation V(θ2) yields the variational state:

[0112]

[0113] In this embodiment, the unitary operation such as the unitary transformation described above can be implemented using implementation methods such as a universal gate set and a single-bit rotation gate, and this embodiment does not impose any specific limitations thereto.

[0114] Step 5. Quantum state measurement. Finally, in the quantum state Perform a measurement operation M on the y and calculate the expected value of the measurement result, which is usually obtained by random sampling on the Pauli basis. The expected value obtained can be used for subsequent calculations.

[0115] Step S22 parameter optimization:

[0116] Similar to classical neural networks, the parameters of BUQNN can be optimized by gradient-based methods. Given the quantum parameters θ and input features v t The output f(v t ,θ), the gradient of BUQNN can be calculated by the parameter shift rule as follows:

[0117]

[0118] The above relationship is about the gradient of θ, and the angle θ includes parameters α, β, and γ. All parameters appear as the rotation angles of a single-bit revolving gate. The symbol of the inverted triangle is the gradient operator. When measuring the derivative of the expected value of a certain mechanical quantity with respect to the parameter θ, methods such as the parameter shift rule can be used. This embodiment does not limit the specific calculation method of the gradient calculation. The input state is closely related to the input data or input information and allows the expression of the function f to be set as needed.

[0119] Therefore, the loss function can be minimized by backpropagating the gradient between the VQC and the classical neural network, and the entire hybrid quantum computing model can be optimized iteratively.

[0120] Step S23 integrates the four batch-uploaded quantum neural networks into the long short-term memory model:

[0121] Specifically, the four batches of quantum neural networks uploaded are respectively recorded as: the first batch of quantum neural network uploaded, the second batch of quantum neural network uploaded, the third batch of quantum neural network uploaded and the fourth batch of quantum neural network uploaded, specifically including:

[0122] Improvement of the forget gate: using the first activation function to process the expected value obtained by uploading the quantum neural network in the first batch to obtain the output vector of the forget gate;

[0123] Memory gate improvement: The second batch upload quantum neural network processes the input features and outputs a set of values through the second activation function. This set of values is used to determine the information added to the current cell state.

[0124] At the same time, the third batch-uploaded quantum neural network also processes the same input features and generates a new cell state candidate through a third activation function;

[0125] Multiply the output of the improved forget gate by the previous cell information, and accumulate the cell information of the new memory gate to obtain new cell information;

[0126] Output gate improvement: After obtaining the expected value from the fourth batch of uploaded quantum neural network, the output is obtained through the fourth activation function, the output is multiplied element by element with the new cell information to generate a new hidden state vector, and then the vector is passed to the next time step for calculation.

[0127] In a preferred embodiment of this invention, similar to the traditional QLSTM network, the present invention replaces the classic neural network in LSTM with the above-mentioned BUQNN. Figure 5The proposed BUQLSTM network is shown, which consists of four BUQNN structures. The expected value of the BUQNN output is used for subsequent calculations through nonlinear activation functions (such as tanh and sigmoid) to update the values of various gate units. The calculation process of the four BUQNN units is as follows:

[0128]

[0129]

[0130] The BUQLSTM proposed in this embodiment uses four BUQNN networks, denoted as BUQNN n (n∈f,i,c,o) Through the above calculation, the LSTM network can obtain the hidden state h at time step t t and cell state c t .

[0131] The explanation of the four BUQNN modules used in BUQLSTM is as follows:

[0132] BUQNN f :BUQNN f Vector BUQNN is obtained by combining Sigmoid functions f , and maps the expected value to the interval [0,1]. BUQNN f It is the key component of the BUQLSTM network, and its output is shown in Formula 5. The forget gate is based on f t *c t-1 C t-1 This means deciding whether to proceed from the previous cell state c t-1 For example, a value of 1 or 0 means that the corresponding element will be completely retained (forgotten). t The value of the vector applied to the cell state is between 0 and 1, which means that only part of the information is retained. The function of the forget gate is very important for learning and modeling temporal dependencies.

[0133] BUQNN i and BUQNN c :First, BUQNN i Module processes input data v t , and outputs a set of values through the Sigmoid function, which are between 0 and 1 and are used to determine what information can be added to the current cell state. c The module also processes the same input data and generates a new cell state candidate through the tanh function, as shown in Formula 7. Formula 8 combines the output of the input gate with the forget gate f t, the cell state c at the previous moment t-1 and new cell candidate states Combined, the resulting vector is used to update the current cell state. In other words, the output of the input gate (a real number between 0 and 1) determines the new information is added to the current cell state c t This mechanism enables LSTM to better remember long-term dependencies and avoids the gradient disappearance problem of ordinary RNN.

[0134] BUQNN o :BUQNN o The goal is to generate the output of the cell. In formula 9, o t From BUQNN o After obtaining the expected value, the output is obtained through the Sigmoid function. In formula 10, the output o t With update gate c t The output of (processed by the tanh activation function) is multiplied element by element to generate a new hidden state vector h t , and then this vector will be passed to the next time step for calculation.

[0135] The following algorithmic steps outline the numerical computation process of BUQLSTM. First, within each gate unit, the input vector is divided into batches of vectors. These vectors are then sequentially embedded into the quantum circuit according to the encoding-variational order. The weight parameters are updated as part of the subsequent optimization process. Finally, the expected value of the PauliZ operator on the relevant qubits is calculated and the result is returned in the following table format for further calculations.

[0136]

[0137]

[0138] S3 runs the hybrid computing model and outputs the text classification corresponding to the vehicle professional language corpus data to be processed.

[0139] In this embodiment, the model parameters are updated in reverse by calculating the gradient and loss until the model converges. The trained model is finally used to predict text classification. Specifically, in this embodiment, the output vector e of the last layer is t As a text feature representation; and in this embodiment, the preferred method of using the classification function to obtain the final text classification result is: using the softmax classification function to calculate the obtained text classification feature representations one by one, and obtaining the classification category prediction value of the corresponding text representation according to the set threshold.

[0140] Example 2

[0141] Based on Example 1, the present application also provides another solution, which is to replace step S23 in Example 1, specifically including: fusing the three batch-uploaded quantum neural networks into the gated recurrent unit model.

[0142] The three batches of quantum neural networks uploaded are respectively recorded as: the first batch of quantum neural network uploaded, the second batch of quantum neural network uploaded and the third batch of quantum neural network uploaded, specifically including:

[0143] Reset gate improvement: The output features of the pre-trained language model are fed into the model together with the hidden state at the previous moment. After obtaining the expected value from the first batch of quantum neural network uploads, the first output is obtained through the first activation function. The first output is used to determine how much hidden state information at the previous moment should be used when calculating the current candidate hidden state;

[0144] Update gate improvement: After obtaining the expected value from the second batch of quantum neural network uploads, a second output is obtained through a second activation function. The second output is used to update the state information.

[0145] After multiplying the first output by the hidden state output of the previous time step, the result is connected to the output feature of the trained language model and used as the input of the third batch uploading quantum neural network. After obtaining the corresponding expected value, a third output is obtained through a third activation function. The third output is used to calculate the candidate hidden state, and then the vector is passed to the next time step for calculation.

[0146] like Figure 6 As shown, the structure of BUQLSTM is discussed in detail in Example 1 of the present invention. Similar to the principle of BUQLSTM, this embodiment will briefly introduce the proposed batch-upload-based quantum gated recurrent unit (BUQGRU) network.

[0147] Figure 6 The proposed BUQGRU network is shown. BUQNN replaces the classic neural network in the GRU model. Compared with BUQLSTM, it only requires three BUQNNs. The current MBERT input and the hidden state h at the previous moment t-1 are fed into the network together. The reset gate is provided by BUQNN r and sigmoid activation function, which is used to determine how much of the previous hidden state information should be used when calculating the current candidate hidden state. The update gate is composed of BUQNN z and sigmoid function to update the state information. Next, BUQNN z Used in conjunction with the tanh activation function to compute candidate hidden states

[0148] The following formula 14 determines the new hidden state h t Whether to fully accept the candidate hidden state and decide whether to keep the hidden state of the previous moment.

[0149] The information flow of BUQGRU is as follows:

[0150] r t =σ(BUQNN r )#(11)

[0151] z t =σ(BUQNN z )#(12)

[0152]

[0153] Here, BUQNN i (i∈r,z,h) represents the reset gate circuit, update gate circuit and candidate hidden state circuit respectively. It is worth noting that due to the characteristics of GRU network, BUQNN h The input of is different from other BUQNN. In the calculation of formula 13, the output r of the reset gate is t and the hidden state output h of the previous time step t-1 This product determines how much information from the previous time step can be used. Concatenate and pass as input to BUQNN h After the tanh activation function, a new candidate hidden state is obtained.

[0154] Similarly, in this embodiment, the output vector e of the last layer is t As the text sentiment feature representation; and in this embodiment, the preferred method of using the classification function to obtain the final sentiment classification result is: using the softmax classification function to calculate the obtained text sentiment feature representation one by one, and obtaining the classification prediction value of the corresponding text representation according to the set threshold, and the specific classification is set according to actual needs.

[0155] Example 3

[0156] The present invention also provides a low-resource language field text classification system that uploads quantum recurrent neural networks in batches, such as Figure 7 As shown, the system includes:

[0157] The preprocessing module is used to preprocess the corpus data to be processed and obtain the corresponding word embedding vector through the pre-trained language model;

[0158] An input module is configured to use the word embedding vector as an input feature in a pre-trained hybrid computing model, wherein the hybrid computing model includes batch-uploading quantum neural networks and classical neural networks, and fusing the batch-uploaded quantum neural networks into the classical neural network. The hybrid computing model is trained using historical corpus data and corresponding text classification. The batch-uploaded quantum neural network divides the input word embedding vector into several batches according to a pre-defined number of quantum bits, and connects the batches through a variational quantum circuit, thereby forming an encoding-variational layered hybrid model.

[0159] The prediction module is used to run the hybrid computing model and output the text classification corresponding to the corpus data to be processed.

[0160] The other technical features of the vehicle professional language text classification system based on quantum recurrent neural network described in this example are similar to the low-resource language field text classification method of uploading quantum recurrent neural network in batches corresponding to Examples 1 and 2, and will not be repeated here.

[0161] According to the contents described in Examples 1 and 2, the embodiment of the present invention first provides a method for text classification in the vehicle professional language field by uploading quantum recurrent neural networks in batches. This method can be applied to electronic devices such as computer terminals, specifically ordinary computers, quantum computers, etc.

[0162] The following describes it in detail by taking running on a computer terminal as an example. Figure 8 This is a hardware block diagram of a computer terminal for a method of text classification in the vehicle professional language field using a quantum recurrent neural network for batch uploading according to an exemplary embodiment. Figure 8 As shown, the computer terminal may include one or more ( Figure 8 Only one is shown) a processor 102 (the processor 102 may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA) and a memory 104 for storing a method for classifying text in the vehicle professional language field based on quantum circuit-based batch uploading quantum recurrent neural networks. Optionally, the above-mentioned computer terminal may also include a transmission device 106 for communication functions and an input and output device 108.

[0163] It can be understood by those skilled in the art that Figure 8 The structure shown is only for illustration and does not limit the structure of the above-mentioned computer terminal. For example, the computer terminal may also include: Figure 8 More or fewer components than shown, or with Figure 8 Different configurations shown.

[0164] The memory 104 can be used to store software programs and modules of application software, such as the program instructions / modules corresponding to the vehicle professional language field text classification method of uploading quantum recurrent neural networks in batches in the embodiment of the present application. The processor 102 executes various functional applications and data processing by running the software programs and modules stored in the memory 104, thereby implementing the above-mentioned method.

[0165] The memory 104 may include a high-speed random access memory and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory.

[0166] In some examples, memory 104 may further include memory remotely located relative to processor 102. Such remote memory may be connected to a computer terminal via a network. Examples of such networks include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0167] The transmission device 106 is used to receive or send data via a network. Specific examples of the aforementioned network may include a wireless network provided by a communications provider of a computer terminal. In one embodiment, the transmission device 106 includes a network interface controller (NIC), which can be connected to other network devices via a base station to enable communication with the Internet. In another embodiment, the transmission device 106 may be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.

[0168] It's important to note that a true quantum computer has a hybrid architecture, consisting of two main components: a classical computer, responsible for performing classical computations and control, and a quantum device, responsible for running quantum programs and thus achieving quantum computations. A quantum program is a sequence of instructions written in a quantum language, such as QRunes, that can be executed on a quantum computer. This supports quantum logic gate operations and ultimately enables quantum computations. Specifically, a quantum program is a sequence of instructions that operates quantum logic gates in a specific time sequence.

[0169] In practical applications, due to the limitations of the development of quantum device hardware, quantum computing simulations are usually required to verify quantum algorithms, quantum applications, and the like. Quantum computing simulation is the process of simulating the operation of quantum programs corresponding to specific problems using a virtual architecture (i.e., a quantum virtual machine) built with the resources of an ordinary computer. Generally, it is necessary to construct a quantum program corresponding to a specific problem. The quantum program referred to in the embodiments of the present invention is a program written in a classical language to characterize quantum bits and their evolution, in which quantum bits, quantum logic gates, and the like related to quantum computing are represented by corresponding classical codes.

[0170] It will be understood by those skilled in the art that embodiments of the present invention may be provided as methods, systems, or computer program products. Thus, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware. Furthermore, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to magnetic disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0171] Although the preferred embodiments of the present invention have been described, those skilled in the art may make additional changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the present invention.

[0172] Obviously, those skilled in the art may make various changes and modifications to the embodiments of the present invention without departing from the spirit and scope of the embodiments of the present invention. Thus, if such changes and modifications of the embodiments of the present invention fall within the scope of the claims and their equivalents, the present invention is intended to include such changes and modifications.

Claims

1. A low-resource language domain text classification method using batch upload of quantum recurrent neural networks, characterized by: The method comprises: After preprocessing the corpus data, the corresponding word embedding vector is obtained through the pre-trained language model; A hybrid computing model pre-trained using the word embedding vector as an input feature, the hybrid computing model including batch-uploaded quantum recurrent neural networks and classical neural networks, and fusing the batch-uploaded quantum neural networks into the classical neural networks, the hybrid computing model being trained using historical corpus data and corresponding text classification; the batch-uploaded quantum neural network divides the input word embedding vector into several batches according to a pre-defined number of quantum bits, and connects the batches through a variational quantum circuit, thereby forming an encoding-variational layered hybrid model; Run the hybrid computing model and output the text classification corresponding to the corpus data to be processed.

2. The low-resource language domain text classification method of batch uploading quantum recurrent neural network according to claim 1 is characterized by: The batch uploading quantum neural network includes multiple groups of alternating coding layers and variation layers. The input port of the coding layer is determined according to the number of quantum bits. The dimensions of the input word vector features in the input features are divided into batches according to the number of quantum bits. The feature vector groups contained in each batch are encoded and embedded in the circuit. The variation layer is then used to perform entanglement evolution on the encoded quantum state to ensure that all feature vectors are embedded in the circuit. Finally, the output result is obtained. The initial quantum of the quantum bit is |0>, and the encoded quantum state contains information corresponding to the vector features contained in each batch.

3. The low-resource language domain text classification method of batch uploading quantum recurrent neural network according to claim 2 is characterized by: The batch-dividing the dimensions of the input word vector features in the input features according to the number of quantum bits includes: According to the number of qubits at the input port, the dimension of the input word vector feature is divided into multiple batches, that is, the ratio of the dimension of the input word vector feature to the number of qubits. If its value is an integer, the total number of corresponding batches is the corresponding ratio. Otherwise, If its value is a non-integer, the total number of batches needs to be increased by one based on the ratio, and the remaining space of the last batch is filled with zero elements. Therefore, the input features after segmentation include multiple feature vector groups, each of which contains feature vectors corresponding to the number of quantum bits.

4. The low-resource language domain text classification method of batch uploading quantum recurrent neural network according to claim 3 is characterized by: The encoding of the feature vector groups contained in each batch and embedding the encoded feature vectors into a circuit comprises: Perform the following steps on all batches of feature vectors one by one: The feature vectors in the current batch of feature vectors are passed through the corresponding single bit R y The gate generates the first angle, and the corresponding single bit R z The door generates a corresponding second angle; the first angle is obtained by rotating R around the y axis. y The gate is applied to the quantum state, and the second angle is obtained by rotating R around the z axis. z Gates are applied to quantum states.

5. The low-resource language domain text classification method of batch uploading quantum recurrent neural network according to claim 4 is characterized by: The variation layer is then used to perform entanglement evolution on the quantum state obtained by encoding to ensure that all eigenvectors are embedded in the circuit, and finally the output result is obtained, including: Applying an additional single-bit operation V(θ) to the quantum state after the coding layer to generate a new quantum state, wherein V(θ) is a variation layer controlled by a parameter θ, which is the rotation angle of the single-bit rotation gate; Encoding all other eigenvector groups into corresponding quantum states, and performing the corresponding single-bit operation after each encoding, thereby generating a series of quantum states and their variational states after applying the single-bit operation; Perform measurement operations on the variational state and obtain the expected value of the measurement result.

6. The low-resource language domain text classification method using batch upload quantum recurrent neural networks according to any one of claims 1 to 5, characterized in that: The fusing of the quantum neural network uploaded in batches into the classical neural network includes fusing four quantum neural networks uploaded in batches into a long short-term memory model, wherein the four quantum neural networks uploaded in batches are respectively recorded as: a first quantum neural network uploaded in batches, a second quantum neural network uploaded in batches, a third quantum neural network uploaded in batches, and a fourth quantum neural network uploaded in batches, specifically including: Improvement of the forget gate: using the first activation function to process the expected value obtained by uploading the quantum neural network in the first batch to obtain the output vector of the forget gate; Memory gate improvement: The second batch upload quantum neural network processes the input features and outputs a set of values through the second activation function. This set of values is used to determine the information added to the current cell state. At the same time, the third batch-uploaded quantum neural network also processes the same input features and generates a new cell state candidate through a third activation function; Multiply the output of the improved forget gate by the previous cell information, and accumulate the cell information of the new memory gate to obtain new cell information; Output gate improvement: After obtaining the expected value from the fourth batch of uploaded quantum neural network, the output is obtained through the fourth activation function, the output is multiplied element by element with the new cell information to generate a new hidden state vector, and then the vector is passed to the next time step for calculation.

7. The low-resource language domain text classification method using batch upload of quantum recurrent neural networks according to any one of claims 1 to 5, characterized in that: The step of fusing the quantum neural network uploaded in batches into the classical neural network further includes fusing three quantum neural networks uploaded in batches into a gated recurrent unit model, wherein the three quantum neural networks uploaded in batches are respectively recorded as: a first quantum neural network uploaded in batches, a second quantum neural network uploaded in batches, and a third quantum neural network uploaded in batches, specifically including: Reset gate improvement: The output features of the pre-trained language model are fed into the model together with the hidden state at the previous moment. After obtaining the expected value from the first batch of quantum neural network uploads, the first output is obtained through the first activation function. The first output is used to determine how much hidden state information at the previous moment should be used when calculating the current candidate hidden state; Update gate improvement: After obtaining the expected value from the second batch of quantum neural network uploads, a second output is obtained through a second activation function. The second output is used to update the state information. After multiplying the first output by the hidden state output of the previous time step, the result is connected to the output feature of the trained language model and used as the input of the third batch uploading quantum neural network. After obtaining the corresponding expected value, a third output is obtained through a third activation function. The third output is used to calculate the candidate hidden state, and then the vector is passed to the next time step for calculation.

8. A low-resource language domain text classification system that uploads quantum recurrent neural networks in batches, characterized by: The system includes: The preprocessing module is used to preprocess the corpus data to be processed and obtain the corresponding word embedding vector through the pre-trained language model; An input module is configured to use the word embedding vector as an input feature in a pre-trained hybrid computing model, wherein the hybrid computing model includes batch-uploading quantum neural networks and classical neural networks, and fusing the batch-uploaded quantum neural networks into the classical neural network. The hybrid computing model is trained using historical corpus data and corresponding text classification. The batch-uploaded quantum neural network divides the input word embedding vector into several batches according to a pre-defined number of quantum bits, and connects the batches through a variational quantum circuit, thereby forming an encoding-variational layered hybrid model. The prediction module is used to run the hybrid computing model and output the text classification corresponding to the corpus data to be processed.

9. A storage medium, characterized in that: The storage medium stores a computer program, wherein the computer program is configured to execute the method according to any one of claims 1 to 7 when executed.

10. An electronic device comprising a memory and a processor, characterized in that: A computer program is stored in the memory, and the processor is configured to run the computer program to perform the method according to any one of claims 1 to 7.