Low-power-consumption text generation system based on memristor array

Through the text generation system based on memristor array, the combined structure of GRU unit and fully connected layer is used to solve the problem of high power consumption in the existing technology and achieve low power consumption and efficient text generation, which is suitable for mobile devices.

CN118569327APending Publication Date: 2024-08-30ANHUI UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410556640.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-05-07
Publication Date
2024-08-30

AI Technical Summary

Technical Problem

When the existing hardware system performs a large number of real-time data multiplication and addition operations and activation operations, it causes increased power consumption and heat dissipation problems, making it difficult to achieve efficient and low-power text generation.

Method used

A low-power text generation system based on memristor array is used, including an embedding layer, a bidirectional processing GRU unit, a unidirectional processing GRU unit and a fully connected layer. The memristor array is used to achieve parallel computing and storage, and simulates the learning and memory of neural networks. The process reduces power consumption by precisely controlling the resistance state of the memristor.

Benefits of technology

It realizes complex text generation tasks at extremely low power consumption, improves the speed and accuracy of text generation, is suitable for mobile devices, and the training and inference process is flexible and efficient.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118569327A
    Figure CN118569327A
Patent Text Reader

Abstract

The invention discloses a text generation system based on a memristor array, and belongs to the field of memristor hardware systems. The text generation system based on the memristor array comprises an embedded layer, a bidirectional processing GRU unit, a unidirectional processing GRU unit and a full connection layer, the embedded layer is used for preprocessing input text information and converting the text information into high-dimensional feature vectors; the bidirectional processing GRU unit respectively processes the high-dimensional feature vector in a forward mode and a backward mode so as to capture context information of the text; the one-way processing GRU unit further integrates the output of the two-way processing GRU unit; and the full connection layer generates a target text according to the output of the single processing to the GRU unit, and when the memristor array is designed, the system rapidly realizes a complex text generation task under extremely low power consumption, and is suitable for mobile equipment.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention belongs to the field of memristor hardware systems, and in particular relates to a low-power text generation system based on a memristor array. Background Art

[0002] In today's era of rapid technological development, the convenience and efficiency of human-computer interaction technology have become particularly important. Especially for people with speech disorders, Parkinson's disease or limited finger function, an efficient, low-power and easy-to-use text generation system can greatly improve their quality of life.

[0003] In existing hardware systems such as pure FPGA, it is still a huge challenge to deal with a large amount of real-time data and the large number of multiplication and addition operations and activation operations required. As the amount of data grows exponentially, these operations lead to an increase in system power consumption, which in turn leads to a series of derivative problems such as heat dissipation. Summary of the invention

[0004] In view of the deficiencies in the prior art, the purpose of the present invention is to provide a low-power text generation system based on a memristor array, which solves the problems in the prior art.

[0005] The purpose of the present invention can be achieved by the following technical solutions:

[0006] A low-power text generation system based on a memristor array, including: an embedding layer, a bidirectional processing GRU unit, a unidirectional processing GRU unit, and a fully connected layer;

[0007] The embedding layer preprocesses the input text information and converts it into a high-dimensional feature vector; the bidirectional processing GRU unit processes the high-dimensional feature vector in a forward and backward manner respectively to capture the context information of the text; the unidirectional processing GRU unit further integrates the output of the bidirectional processing GRU unit; and the fully connected layer generates the target text according to the output of the unidirectional processing GRU unit.

[0008] Furthermore, the bidirectional processing GRU unit includes two GRU units, which are responsible for processing the forward and reverse information of the input sequence respectively.

[0009] Furthermore, the GRU unit includes an update gate and a reset gate, which together determine how the unit integrates new input information and previous state information, and when to pass the information to the next layer of the network.

[0010] Furthermore, the fully connected layer includes 27 output nodes, corresponding to 26 English letters and spaces.

[0011] Furthermore, the fully connected layer is implemented by a 6×27 memristor array, and each output node of the fully connected layer is implemented by a different memristor group configuration to simulate the generation of different characters.

[0012] Furthermore, in the memristor array, each memristor unit can store a weight value, which represents the connection strength in the neural network; by precisely controlling the resistance state of each memristor, the text generation system can simulate the learning and memory process of the neural network, and the memristor array allows parallel calculation and storage.

[0013] Furthermore, the embedded layer includes: a control module composed of three memristor arrays and an FPGA, the memristor array is used for matrix multiplication and addition, and the control module is used for data integration.

[0014] The low-power text generation method based on a memristor array uses the low-power text generation system based on a memristor array, and includes the following steps:

[0015] The input text information is converted into a high-dimensional feature vector through the embedding layer;

[0016] The high-dimensional feature vector is fed into a bidirectional GRU structure for preliminary processing to capture the sequence characteristics and contextual information of the text;

[0017] The information processed by the bidirectional GRU is further integrated by the unidirectional GRU unit and performs deep semantic analysis;

[0018] The fully connected layer generates the final text based on the output of the GRU unit.

[0019] A mobile communication device equipped with the above-mentioned low-power text generation system based on memristor array.

[0020] An intelligent communication auxiliary device equipped with the above-mentioned low-power text generation system based on memristor array.

[0021] Beneficial effects of the present invention:

[0022] 1. The present invention sets 27 output nodes in the fully connected layer and implements it through a 6×27 memristor array. This design enables the system to achieve complex text generation tasks with extremely low power consumption; it is suitable for mobile devices.

[0023] 2. The neural network hardware acceleration implemented by the present invention through the memristor array greatly improves the speed of text generation.

[0024] 3. The present invention adopts a network structure combining bidirectional and unidirectional GRU units, which can effectively capture the contextual information of the text and improve the accuracy and coherence of the generated text.

[0025] 4. The system of the present invention adopts an efficient training and inference mechanism. In the training stage, the system completes the initialization and update of weights on the computer through simulation, and then maps the updated weights to the memristor array. In the inference stage, the system directly uses the weights stored in the memristor array to complete the forward calculation and generate text output. This mechanism not only ensures the flexibility and accuracy of the training process, but also makes the inference process efficient and low-power. BRIEF DESCRIPTION OF THE DRAWINGS

[0026] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0027] Figure 1 This is the overall architecture diagram of the text generation system of the present invention;

[0028] Figure 2 is a schematic diagram of the structure of the memristor array of the present invention;

[0029] Figure 3 It is a schematic diagram of the unidirectional GRU unit structure of the present invention;

[0030] Figure 4 It is a schematic diagram of the working mechanism of the bidirectional GRU unit of the present invention;

[0031] Figure 5 It is a schematic diagram of the system language processing of the present invention. DETAILED DESCRIPTION

[0032] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0033] Example 1

[0034] like Figure 1As shown in the figure, the low-power text generation system based on memristor array includes: embedding layer, bidirectional processing GRU unit, unidirectional processing GRU unit and fully connected layer; the system first pre-processes the input text information through the embedding layer and converts it into a high-dimensional feature vector suitable for neural network processing; then, the bidirectional processing GRU unit is used to process these feature vectors in a forward and backward manner to capture the contextual information of the text and improve the accuracy and coherence of text generation; then, the unidirectional processing GRU unit further integrates the output of the bidirectional processing GRU unit. Finally, the fully connected layer generates the target text according to the output of the unidirectional processing GRU unit.

[0035] Among them, the embedded layer includes three memristor arrays and a control module composed of FPGA. The memristor array is used for matrix multiplication and addition, and the control module is used for data integration.

[0036] The embedding layer preprocesses text information as follows: first use the Jieba word segmenter to segment words, then convert them into analog voltages and substitute them into the system for calculation.

[0037] like Figure 4 As shown in the figure, the bidirectional processing GRU unit includes: two GRU units, which are responsible for processing the forward and reverse information of the input sequence respectively. This structure enables the network to consider the previous and subsequent text information at the same time, greatly enhancing the model's ability to capture text context information; the output of the bidirectional GRU structure is the combination of the outputs of the two GRU units, which will then be used for the next step of the text generation system.

[0038] like Figure 3 As shown in the figure, the GRU unit is one of the main neural network models of this system. The GRU unit can effectively process time series data and is particularly important for capturing long-term dependencies in text. Each GRU unit contains an update gate and a reset gate, which together determine how the unit integrates new input information and previous state information, and when to pass the information to the next layer of the network.

[0039] Among them, the process of processing the preprocessed high-dimensional feature vector through the bidirectional processing GRU unit is:

[0040] Bidirectional GRU (Gated Recurrent Unit) is a recurrent neural network structure commonly used to process sequence data. Its main advantage is that it can consider both past and future information at the same time, and capture the time dependency in the sequence through forward and backward processing units. The following will describe in detail how the preprocessed high-dimensional feature vector is processed by the bidirectional GRU, and give the corresponding mathematical formula:

[0041] The bidirectional GRU consists of two GRU units: a forward GRU and a reverse GRU. The forward GRU processes the information from the beginning to the end of the sequence, while the reverse GRU processes the information from the end to the beginning. For a given time series {x_1, x_2, ..., x_T}, each x_t is a feature vector at time t.

[0042] Forward GRU:

[0043] 1. Update Gate:

[0044] \[

[0045] z_t=\sigma(W_z x_t+U_z h_{t-1}+b_z)

[0046] \]

[0047] 2. Reset Gate:

[0048] \[

[0049] r_t=\sigma(W_rx_t+U_rh_{t-1}+b_r)

[0050] \]

[0051] 3. Candidate Hidden State:

[0052] \[

[0053] \tilde{h}_t=\tanh(W_h x_t+U_h(r_t\odot h_{t-1})+b_h)

[0054] \]

[0055] 4. Final Hidden State:

[0056] \[

[0057] h_t=(1-z_t)\odot h_{t-1}+z_t\odot\tilde{h}_t

[0058] \]

[0059] Correspondingly, the processing of the reverse GRU is similar to the forward process, except that the sequence is processed in the opposite direction:

[0060] In a bidirectional GRU network, the output of each time step is generated by two independent GRU units, one processing information from the beginning to the end of the time series (forward GRU), and the other processing information from the end to the beginning (reverse GRU). Integrating information from these two directions is usually to obtain a more comprehensive contextual understanding, which is very important for many sequence processing tasks (such as text understanding, speech recognition, etc.).

[0061] The integration process usually occurs at the output stage of each time step. Specifically, for each time step t, the outputs of the forward GRU h_t and the backward GRU h_t' are merged to form a unified output. This merging can be achieved in different ways, the most common methods include

[0062] 1. Concatenation: This is the most direct method, which directly concatenates the forward and reverse output vectors together to form a longer feature vector. This method can retain all the information captured by the GRU in both directions.

[0063] 2. Summation: Add the corresponding elements of the forward and reverse output vectors. This method simplifies the output by fusing information from both directions, but may lose some details.

[0064] 3. Averaging: Calculate the element-wise average of the forward and reverse output vectors. This is similar to summing, but balances the contributions from both directions, reducing the dominant influence of one direction on the final output.

[0065] 4. Maximization: Take the maximum value of the forward and reverse outputs for each element, which helps capture the most significant features but may ignore weaker signals.

[0066] The choice of which method depends on the needs and nature of the specific application. The combined output vector h_t is usually used in subsequent processing layers or as the final feature representation for further analysis or prediction tasks.

[0067] The fully connected layer uses 27 output nodes (corresponding to 26 English letters and spaces) and is implemented through a 6×27 memristor array; Figure 2 As shown, the basic structure of the memristor array of the present invention is shown, which is the core of the entire text generation system. In the memristor array, each memristor unit can store a weight value, which represents the connection strength in the neural network; by precisely controlling the resistance state of each memristor, the system can simulate the learning and memory process of the neural network; the design of the memristor array allows parallel computing and storage, which significantly improves processing speed and efficiency while reducing energy consumption.

[0068] In the structure using a bidirectional GRU network, the output of the unidirectional processing GRU unit integration is usually passed to one or more fully connected layers (also called dense layers) to generate the target text. The role of these fully connected layers is to convert the high-dimensional feature vector obtained from the GRU unit into the final output format, such as words or characters in a text sequence.

[0069] The fully connected layer processes the input vector by weighted summing plus bias, and then usually processes it through an activation function such as softmax to output a probability distribution for each possible target word. In text generation tasks, the output at each time step usually corresponds to a word in the vocabulary, and the output of the fully connected layer represents the conditional probability of each word in the vocabulary. Based on these probabilities, the most likely word can be selected to generate text, or a sampling strategy can be used to extract words from the probability distribution to gradually build up the final text output. This process is a core step in applications such as machine translation, text summarization, or automatic text generation.

[0070] Example 2

[0071] like Figure 5 As shown, the overall process of the text generation system described in Example 1 when processing language information is as follows:

[0072] S1, the input text information is converted into a high-dimensional feature vector through the embedding layer;

[0073] The high-dimensional feature vectors in S2 and S1 are fed into the bidirectional GRU structure for preliminary processing to capture the sequential characteristics and contextual information of the text;

[0074] S3, the information processed by the bidirectional GRU is further integrated and subjected to deep semantic analysis by the unidirectional GRU unit;

[0075] S4, the fully connected layer generates the final text based on the output of the GRU unit.

[0076] In the description of this specification, the description with reference to the terms "one embodiment", "example", "specific example", etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representation of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described can be combined in any one or more embodiments or examples in a suitable manner.

[0077] The above shows and describes the basic principles, main features and advantages of the present invention. Those skilled in the art should understand that the present invention is not limited to the above embodiments, and the above embodiments and descriptions are only for explaining the principles of the present invention. Without departing from the spirit and scope of the present invention, the present invention may have various changes and improvements, and these changes and improvements all fall within the scope of the present invention to be protected.

Claims

1. A low-power text generation system based on a memristor array, characterized in that: include: Embedding layer, bidirectional processing GRU unit, unidirectional processing GRU unit and fully connected layer; The embedding layer preprocesses the input text information and converts it into a high-dimensional feature vector; the bidirectional processing GRU unit processes the high-dimensional feature vector in a forward and backward manner respectively to capture the context information of the text; the unidirectional processing GRU unit further integrates the output of the bidirectional processing GRU unit; and the fully connected layer generates the target text according to the output of the unidirectional processing GRU unit.

2. The low-power text generation system based on memristor array according to claim 1, characterized in that: The bidirectional processing GRU unit includes two GRU units, which are responsible for processing the forward and reverse information of the input sequence respectively.

3. The low-power text generation system based on memristor array according to claim 2 is characterized in that: The GRU unit contains an update gate and a reset gate, which together determine how the unit integrates new input information and previous state information, and when to pass information to the next layer of the network.

4. The low-power text generation system based on memristor array according to claim 1, characterized in that: The fully connected layer includes 27 output nodes, corresponding to 26 English letters and spaces.

5. The low-power text generation system based on memristor array according to claim 4, characterized in that: The fully connected layer is implemented by a 6×27 memristor array, and each output node of the fully connected layer is implemented by a different memristor group configuration to simulate the generation of different characters.

6. The low-power text generation system based on memristor array according to claim 5, characterized in that: In the memristor array, each memristor unit can store a weight value, which represents the connection strength in the neural network; by precisely controlling the resistance state of each memristor, the text generation system can simulate the learning and memory process of the neural network, and the memristor array allows parallel calculation and storage.

7. The low-power text generation system based on memristor array according to claim 1, characterized in that: The embedded layer includes: a control module composed of three memristor arrays and an FPGA, the memristor array is used for matrix multiplication and addition, and the control module is used for data integration.

8. A low-power text generation method based on a memristor array, using the low-power text generation system based on a memristor array according to any one of claims 1 to 7, characterized in that: The following steps are involved: The input text information is converted into a high-dimensional feature vector through the embedding layer; The high-dimensional feature vector is fed into a bidirectional GRU structure for preliminary processing to capture the sequence characteristics and contextual information of the text; The information processed by the bidirectional GRU is further integrated by the unidirectional GRU unit and performs deep semantic analysis; The fully connected layer generates the final text based on the output of the GRU unit.

9. A mobile communication device, characterized in that: A low-power text generation system based on a memristor array is provided, comprising:

10. An intelligent communication auxiliary device, characterized in that: A low-power text generation system based on a memristor array is provided, comprising: