Neural network-based intelligent search method, system, medium and equipment after computing power task quantification
By introducing the spiking neural network and Trino connector into the convolutional neural network, dynamically adjusting neuron participation and distributed queries solves the problem of low efficiency of convolutional neural networks in massive data operations, and achieves more efficient feature extraction and query process.
Patent Information
- Application Number
- CN202410684327.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-29
- Publication Date
- 2024-08-23
AI Technical Summary
Existing convolutional neural networks have low computing efficiency in massive data operations, and the backpropagation process has high requirements on regression functions, resulting in unsatisfactory computing results.
Use impulse neural network to extract keyword features through the convolution layer, determine whether to trigger neurons based on feature weights, allocate the number of neurons participating in the operation, and use the Trino connector to perform memory calculations and distributed queries, optimizing the pooling layer operation and query process.
It improves the layer-by-layer computing efficiency and query efficiency of CNN, and improves the computing efficiency of the data search space through dynamic neuron deployment and distributed query.
Smart Images

Figure CN118535680A
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of neural networks, and specifically relates to an intelligent search method, system, medium and equipment based on quantized computing tasks of neural networks. Background Art
[0002] Convolutional neural network (CNN) is a deep learning method inspired by biological visual perception mechanisms. CNN has the characteristics of local connection, weight sharing, pooling operation and multi-layer structure. Local connection enables CNN to effectively extract local features; weight sharing greatly reduces the number of network parameters and reduces the difficulty of network training; pooling operation makes the network invariant to translation, scaling and distortion of features while achieving data dimensionality reduction; and deep structure enables CNN to have strong learning ability and feature expression ability. The basic structure of CNN includes input layer, convolution layer, pooling layer, fully connected layer and output layer. Neurons in adjacent layers are connected in different ways to achieve layer-by-layer transmission of input sample information. CNN training belongs to supervised learning. Before starting training, the weights and biases of the network need to be randomly initialized. The training process can be divided into two stages: forward propagation and back propagation. Forward propagation is to input samples into the network, and after each layer of operation, the sample classification results are obtained through the output layer; back propagation refers to calculating the error between the network output and the sample label, and then propagating the error from the output layer to the input layer layer by layer, and using the residual of each layer to calculate the gradient of the training error to the parameters of this layer, which is used to update the parameter value and minimize the error. However, these two operation methods are still insufficient for massive data operations. The former has more operation levels and is too complicated to operate on massive data. The latter has higher requirements on the regression function, and uses various regression algorithms to calibrate the input and output layer errors, and the operation results are not ideal. Summary of the invention
[0003] In view of the deficiencies in the prior art, the present invention provides an intelligent search method, system, medium and device based on quantified computing tasks of neural networks.
[0004] To achieve the above object, the present invention adopts the following technical solutions:
[0005] An intelligent search method based on quantified computing tasks of a neural network, characterized by comprising:
[0006] The collected text data is input into the spiking neural network, and the convolutional layer of the spiking neural network performs keyword feature extraction;
[0007] Calculate the weight of the extracted keyword feature in the text data, and determine whether the keyword feature uses the neuron triggering method for data transmission based on whether the weight of the keyword feature reaches the set trigger threshold:
[0008] If the weight of the keyword feature reaches the set trigger threshold, the keyword feature is transmitted to the pooling layer of the spiking neural network in a neuron triggering manner for calculation, and the number of neurons involved in the calculation is allocated according to the weight of the keyword feature; if the weight of the keyword feature does not reach the set trigger threshold, the keyword feature is not transmitted to the pooling layer of the spiking neural network in a neuron triggering manner for calculation;
[0009] For the keyword secondary features output by the pooling layer operation, keyword query is performed according to the corresponding number of neurons allocated.
[0010] To optimize the above technical solutions, the specific measures taken also include:
[0011] Furthermore, the collected text data is first subjected to word embedding processing before being input into the pulse neural network, and each text is converted into a sequence composed of word vectors.
[0012] Furthermore, the weight of the keyword feature in the text data is calculated as follows:
[0013] An undirected graph is constructed with each keyword feature extracted from the text data as a node and the association between the keyword features as an edge. The similarity between each pair of keyword features in the undirected graph is calculated, and the sum of the similarities between each keyword feature and other keyword features is taken as the weight of the keyword feature.
[0014] Furthermore, the pooling operation adopts maximum pooling, mean pooling or random pooling.
[0015] Furthermore, the keyword query uses Trino connector to perform memory calculation, and allocates idle neurons allocated to the keyword features currently to be queried to a unified query interface API mapped by different underlying data sources.
[0016] Accordingly, the present invention provides an intelligent search system based on quantified computing tasks of a neural network, characterized in that it includes:
[0017] A feature extraction unit is used to input the collected text data into the spiking neural network, and the convolution layer of the spiking neural network performs feature extraction of keywords;
[0018] The judgment unit is used to calculate the weight of the keyword feature in the text data, and judge whether the keyword feature adopts the neuron triggering mode for data transmission according to whether the weight of the keyword feature reaches the set trigger threshold:
[0019] The operation unit, if the weight of the keyword feature reaches the set trigger threshold, transmits the keyword feature to the pooling layer of the pulse neural network by using the neuron triggering method for operation, and allocates the number of neurons involved in the operation according to the weight of the keyword feature; if the weight of the keyword feature does not reach the set trigger threshold, it does not transmit the keyword feature to the pooling layer of the pulse neural network by using the neuron triggering method for operation;
[0020] The query unit is used to perform keyword query on the keyword secondary features output by the pooling layer operation according to the corresponding number of neurons allocated.
[0021] Accordingly, the present invention provides a computer-readable storage medium storing a computer program, characterized in that the computer program enables a computer to execute the intelligent search method after quantification of computing tasks based on a neural network as described above.
[0022] Accordingly, the present invention provides an electronic device, characterized in that it includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, it implements the intelligent search method based on quantified computing tasks of the neural network as described above.
[0023] The beneficial effects of the present invention are:
[0024] 1) The present invention innovatively deploys neurons in adjacent layers of CNN based on pulse-triggered threshold program execution, which improves the efficiency of layer-by-layer operation of data with higher weights in CNN. Since the neural network is composed of N neurons, the more neurons involved in pulse-type operation, the higher the operation efficiency;
[0025] 2) The present invention determines the query range of data in the distributed CNN based on the keyword secondary features extracted by the pooling layer in the CNN, thereby improving the operation efficiency through the required search space, and performing the query based on the Trino connector in an orderly manner according to the number of idle neurons assigned to the keyword in the previous step during the query process. Using the Trino connector based on memory calculation, federated queries can be completed across different data sources, and the idle neurons assigned to the keyword currently to be queried can be assigned to the unified query interface API mapped to different underlying data sources. BRIEF DESCRIPTION OF THE DRAWINGS
[0026] Figure 1 It is a flow chart of the intelligent search method after quantification of computing tasks based on neural networks.
[0027] Figure 2 It is a schematic diagram of the spike neuron model in SNN.
[0028] Figure 3 This is a schematic diagram of the Trino architecture.
[0029] Figure 4 This is a diagram of the Trino connector architecture. DETAILED DESCRIPTION
[0030] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0031] In one embodiment, the present invention proposes an intelligent search method based on quantified computing tasks of a neural network, such as Figure 1 As shown, the process mainly includes the following steps.
[0032] Step 1: Build a convolutional neural network.
[0033] The basic structure of traditional CNN includes input layer, convolution layer, pooling layer, fully connected layer and output layer.
[0034] The neurons in the convolution layer are connected to the local area of the previous hidden layer through the convolution kernel. The convolution kernel is a weight matrix. When performing convolution operations, the convolution kernel slides through each area of the input matrix, flips, multiplies with the corresponding elements of the area, and then accumulates to extract features. Multiple convolution kernels are usually set in the convolution layer. Different convolution kernels obtain different weights through network training, so different features can be extracted from the input. After each convolution kernel is convolved with the convolution layer input, the convolution result is input into the nonlinear activation function to obtain a feature map. By extracting features from the previous hidden layer through multiple convolution kernels, a series of feature maps can be obtained. The combination of multiple convolution layers enables CNN to gradually extract more complex features.
[0035] The pooling layer usually follows the convolutional layer. The feature map in the pooling layer is similar to the feature map in the convolutional layer. Figure 1 One-to-one correspondence, the neurons in the pooling layer are also connected to the local area of the previous hidden layer, and a statistical value of the area is obtained through a certain mathematical method, which realizes dimensionality reduction and secondary feature extraction, and makes the network obtain a certain invariance to the feature changes of the input samples. Common pooling methods include maximum pooling, mean pooling, and random pooling. Maximum pooling calculates the maximum value of the local area connected by the pooling kernel to achieve the downsampling function, mean pooling calculates the average value of the local area connected by the pooling kernel to achieve the downsampling function, and random pooling determines the probability matrix according to the element values in the local area, and randomly selects the output according to the probability matrix.
[0036] In CNN, fully connected layers usually appear after multiple convolutional layers and pooling layers. Each neuron in the fully connected layer is connected to all neurons in the previous layer. The fully connected layer can integrate the features extracted by the convolutional layer and the pooling layer, output the high-level features of the data, and pass them to the output layer as the basis for judging the sample category.
[0037] This embodiment adopts a spiking neural network SNN. The spiking neuron model in the SNN is as follows: Figure 2 As shown. The collected text data is input into the pulse neural network, and the convolution layer of the pulse neural network performs keyword feature extraction. The weight of the extracted keyword feature in the text data is calculated, and whether the keyword feature uses the neuron triggering method for data transmission is determined based on whether the weight of the keyword feature reaches the set trigger threshold: if the weight of the keyword feature reaches the set trigger threshold, the keyword feature is transferred to the pooling layer of the pulse neural network using the neuron triggering method for calculation, and the number of neurons involved in the calculation is allocated based on the weight of the keyword feature; if the weight of the keyword feature does not reach the set trigger threshold, it is not transferred to the pooling layer of the pulse neural network using the neuron triggering method for calculation. This embodiment determines whether the keyword uses the pulse neuron triggering method for data transmission and accelerated calculation by whether the weight of the input keyword in the phrase reaches the trigger threshold.
[0038] Step 2: Keyword search.
[0039] The keywords of the secondary feature extraction of the input samples in the pooling layer of the CNN are used to determine the data query range in the distributed CNN, thereby improving the operation efficiency through the required search space. During the query process, the Trino connector query is performed in order according to the number of idle neurons assigned to the keywords in the previous step. Using the Trino connector for memory computing, the characteristics of federated query can be completed across different data sources, and the idle neurons assigned to the keywords currently to be queried are allocated to the unified query interface API mapped to different underlying data sources.
[0040] like Figure 3 As shown in the figure, Trino is an analysis engine designed for OLAP for efficient distributed query of large amounts of data. It has the following advantages: shielding the underlying data source and providing a unified query interface; based on memory computing, it can complete federated queries across different data sources; data governance, through Trino, heterogeneous data extraction, integration and analysis, breaking data silos and improving data governance capabilities.
[0041] In Trino, the core of the separation of storage and computing is based on the connector-based architecture. The connector provides Trino with an interface to access any data source. Figure 4As shown in the figure, each connector provides a table-based abstraction of the underlying data source. As long as you use the data types available in Trino to represent data in tables, columns, and rows, you can create a connector and the query engine can use the data for query processing. Currently supported connectors include: Hive, Iceberg, MySQL, PostgreSQL, Oracle, SQL Server, ClickHouse, MongoDB, etc.
[0042] In another embodiment, the present invention proposes an intelligent search system based on quantized computing tasks of a neural network, which corresponds to the intelligent search method based on quantized computing tasks of a neural network proposed in the first embodiment, including:
[0043] A feature extraction unit is used to input the collected text data into the spiking neural network, and the convolution layer of the spiking neural network performs feature extraction of keywords;
[0044] The judgment unit is used to calculate the weight of the keyword feature in the text data, and judge whether the keyword feature adopts the neuron triggering mode for data transmission according to whether the weight of the keyword feature reaches the set trigger threshold:
[0045] The operation unit, if the weight of the keyword feature reaches the set trigger threshold, transmits the keyword feature to the pooling layer of the pulse neural network by using the neuron triggering method for operation, and allocates the number of neurons involved in the operation according to the weight of the keyword feature; if the weight of the keyword feature does not reach the set trigger threshold, it does not transmit the keyword feature to the pooling layer of the pulse neural network by using the neuron triggering method for operation;
[0046] The query unit is used to perform keyword query on the keyword secondary features output by the pooling layer operation according to the corresponding number of neurons allocated.
[0047] In this embodiment, the specific functions and execution processes of each unit are the same as those of the method in the first embodiment, and thus will not be described in detail here.
[0048] In another embodiment, the present invention proposes a computer-readable storage medium storing a computer program, wherein the computer program enables a computer to execute the intelligent search method based on quantified computing tasks of a neural network as described in the first embodiment.
[0049] In another embodiment, the present invention proposes an electronic device, comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements the intelligent search method based on quantized computing tasks based on a neural network as described in Example 1.
[0050] In the embodiments disclosed in the present application, the computer storage medium can be a tangible medium that can contain or store a program for use by or in conjunction with an instruction execution system, device or equipment. The computer storage medium can include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices or equipment, or any suitable combination of the above. More specific examples of computer storage media can include electrical connections based on one or more lines, portable computer disks, hard disks, random access memories (RAM), read-only memories (ROM), erasable programmable read-only memories (EPROM or flash memory), optical fibers, portable compact disk read-only memories (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the above.
[0051] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed in this application can be implemented in electronic hardware or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0052] The above are only preferred embodiments of the present invention, and the protection scope of the present invention is not limited to the above embodiments. All technical solutions under the concept of the present invention belong to the protection scope of the present invention. It should be pointed out that for ordinary technicians in this technical field, some improvements and modifications without departing from the principle of the present invention should be regarded as the protection scope of the present invention.
Claims
1. An intelligent search method based on quantified computing tasks based on neural networks, characterized in that: include: The collected text data is input into the spiking neural network, and the convolutional layer of the spiking neural network performs keyword feature extraction; Calculate the weight of the extracted keyword feature in the text data, and determine whether the keyword feature uses the neuron triggering method for data transmission based on whether the weight of the keyword feature reaches the set trigger threshold: If the weight of the keyword feature reaches the set trigger threshold, the keyword feature is transmitted to the pooling layer of the spiking neural network in a neuron triggering manner for calculation, and the number of neurons involved in the calculation is allocated according to the weight of the keyword feature; if the weight of the keyword feature does not reach the set trigger threshold, the keyword feature is not transmitted to the pooling layer of the spiking neural network in a neuron triggering manner for calculation; For the keyword secondary features output by the pooling layer operation, keyword query is performed according to the corresponding number of neurons allocated.
2. The intelligent search method based on quantified computing tasks of a neural network as claimed in claim 1, characterized in that: The collected text data is first subjected to word embedding processing before being input into the pulse neural network, and each text is converted into a sequence consisting of word vectors.
3. The intelligent search method after quantification of computing tasks based on neural network as claimed in claim 1, characterized in that: The weight of the keyword feature in the text data is calculated as follows: An undirected graph is constructed with each keyword feature extracted from the text data as a node and the association between the keyword features as an edge. The similarity between each pair of keyword features in the undirected graph is calculated, and the sum of the similarities between each keyword feature and other keyword features is taken as the weight of the keyword feature.
4. The intelligent search method after quantification of computing tasks based on neural network as claimed in claim 1, characterized in that: The pooling operation adopts maximum pooling, mean pooling or random pooling.
5. The intelligent search method based on quantified computing tasks of a neural network as claimed in claim 1, characterized in that: The keyword query uses Trino connector to perform memory calculation, and allocates idle neurons allocated to the keyword features currently to be queried to a unified query interface API mapped by different underlying data sources.
6. An intelligent search system based on quantified computing tasks of neural networks, characterized in that: include: A feature extraction unit is used to input the collected text data into the spiking neural network, and the convolution layer of the spiking neural network performs feature extraction of keywords; The judgment unit is used to calculate the weight of the keyword feature in the text data, and judge whether the keyword feature adopts the neuron triggering mode for data transmission according to whether the weight of the keyword feature reaches the set trigger threshold: The operation unit, if the weight of the keyword feature reaches the set trigger threshold, transmits the keyword feature to the pooling layer of the pulse neural network by using the neuron triggering method for operation, and allocates the number of neurons involved in the operation according to the weight of the keyword feature; if the weight of the keyword feature does not reach the set trigger threshold, it does not transmit the keyword feature to the pooling layer of the pulse neural network by using the neuron triggering method for operation; The query unit is used to perform keyword query on the keyword secondary features output by the pooling layer operation according to the corresponding number of neurons allocated.
7. A computer-readable storage medium storing a computer program, characterized in that: The computer program enables the computer to execute the intelligent search method based on quantified computing tasks of a neural network as described in any one of claims 1-5.
8. An electronic device, characterized in that: include: A memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the intelligent search method based on quantized computing tasks of a neural network as described in any one of claims 1 to 5 is implemented.
