Data processing method and apparatus
By converting time series information to the frequency domain, selecting the frequency domain features of some frequency bands for feature extraction and conversion back to the time domain, the problem of limited time series data processing performance in the prior art is solved, and more efficient data processing and lower computational complexity are achieved.
Patent Information
- Application Number
- PCT/CN2024/121011
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-09-28
- Filing Date
- 2024-09-25
- Publication Date
- 2025-04-03
AI Technical Summary
When processing time series data in the prior art, the effective receptive field of the time series convolution network is small, resulting in limited performance; while TimesNet increases the network parameter quantity and calculation quantity through multi-period conversion, ignores information outside the frequency domain, resulting in poor processing capabilities.
The time series information is converted to the frequency domain through the encoder, and the frequency domain features of some frequency bands are selected for feature extraction, and the processing results are obtained and converted back to the time domain, which are used to input into the task network as encoding results for processing.
It improves the network's processing performance on time series data, reduces the amount of calculation, captures long-term and short-term dependencies and different periodic information on time series characteristics, and also has low computational complexity.
Smart Images

Figure CN2024121011_03042025_PF_FP_ABST
Abstract
Description
A data processing method and device thereof
[0001] This application claims priority to the Chinese patent application filed with the State Intellectual Property Office on September 28, 2023, with application number 202311284077.1 and invention name “A data processing method and device thereof”, the entire contents of which are incorporated by reference into this application. Technical Field
[0002] The present application relates to the field of artificial intelligence, and in particular to a data processing method and device thereof. Background Art
[0003] Artificial Intelligence (AI) is the theory, methods, techniques, and application systems that use digital computers or machines controlled by digital computers to simulate, extend, and expand human intelligence, to perceive the environment, acquire knowledge, and use that knowledge to achieve optimal results. In other words, AI is a branch of computer science that seeks to understand the essence of intelligence and develop new intelligent machines that can respond in a manner similar to human intelligence. AI also studies the design principles and implementation methods of various intelligent machines, enabling them to possess the capabilities of perception, reasoning, and decision-making.
[0004] Sequence information, also known as time series or dynamic series, refers to a numerical sequence of indicators of a phenomenon arranged in chronological order. It can reflect the development and changes of a phenomenon. By analyzing time series, we can reveal the trends and patterns of the phenomenon's development and changes. By measuring the various factors that influence time series, we can further explain the underlying causes of the phenomenon's changes, providing reliable data support for prediction and decision-making.
[0005] In the existing technology, sequence information is processed through the temporal convolutional network (TCN) method. Specifically, temporal features can be captured by convolution kernels sliding along the time dimension. However, the small effective receptive field limits their performance. Recently, TimesNet proposed converting one-dimensional time series into a two-dimensional tensor based on multi-periodic components and modeling it through a 2D kernel, thereby modeling the periodicity and long-distance dependencies of the time series. However, multi-periodic conversion is a parameter-redundant operation, which increases the number of parameters and computational complexity of the network and ignores valuable information in domains other than the time domain. This results in poor processing power of the network.
[0006] Summary of the Invention
[0007] In a first aspect, the present application provides a data processing method, the method comprising: obtaining time series information; processing the time series information through an encoder to obtain an encoding result; wherein the encoder includes a target network layer; the target network layer is used to convert the characteristics of the time series information into the frequency domain to obtain spectrum information; the spectrum information includes multiple frequency bands and frequency domain features corresponding to the frequency bands, and according to the frequency domain features, some frequency bands among the multiple frequency bands are selected, and feature extraction is performed on the frequency domain features of the some frequency bands to obtain a processing result, and the processing result is converted to the time domain to obtain a time domain representation, and the time domain representation is used as the encoding result or to obtain the encoding result through feature extraction; according to the encoding result, a task processing result is obtained through a task network.
[0008] This application improves the encoder's processing performance for sequence information by modeling frequency domain features.
[0009] In one possible implementation, the spectrum information includes multiple frequency bands and frequency domain features corresponding to the frequency bands. The target network layer can select some frequency bands from the multiple frequency bands based on the frequency domain features, and perform feature extraction on the frequency domain features of the some frequency bands to obtain processing results (since feature extraction is performed on the features of some frequency bands, the kernel can be called a sparse kernel).
[0010] Among them, the time domain representation can be input into the next adjacent network layer to continue feature extraction, or connected to the output layer to obtain the encoding result, or directly output as the encoding result.
[0011] Extracting features from only a subset of frequency bands, known as sparse modeling, can improve network performance while reducing computational complexity. Specifically, because large sparse kernels cover all important frequencies, they can capture both long-term and short-term dependencies and information from different periods while maintaining low computational complexity. This process allows the model to achieve similar or even higher performance, even when sparsifying only significant frequencies, while using fewer parameters.
[0012] In one possible implementation, feature extraction is performed by performing a dot product operation on the frequency domain features of the partial frequency band using a kernel. This differs from convolution in that (1) the kernel and the feature dot product are not averaged but the original scale is retained, and (2) there is no sliding window operation. Therefore, feature extraction is performed by simply multiplying the feature dot product with the sparse kernel.
[0013] In a possible implementation, the frequency domain features include features of multiple dimensions, and the feature extraction of the frequency domain features of the partial frequency band includes: feature extraction of features of some dimensions of the multiple dimensions in the frequency domain features of the partial frequency band.
[0014] That is to say, in the frequency-domain feature extraction part, our feature extraction method also includes dimensional sparsification. For example, after obtaining the frequency-domain features where L is the time-domain length, is the frequency-domain length, and C is the number of dimensions. Our kernel scale can be set to where K < C. At this time, the kernel sparsifies the feature extraction operation of dot-multiplying X ,
[0022] , ,
[0021] , ,
[0020] Only K dimensions are selected in the dimension direction for the dot-multiplying feature extraction operation, and the features of other dimensions remain unchanged. The selection of these K dimensions can be done in a fixed or random manner, or the network can adaptively select them in a learnable way.
[0015] In one possible implementation, the conversion of the features of the time series information to the frequency domain includes: transforming the features of the time series information in the time domain direction and / or the data dimension direction to convert to the frequency domain.
[0016] For example, the above operation of converting time-domain features to the frequency domain can be performed using the Fourier transform along the time direction. In addition, the Fourier transform in the dimension direction can be further introduced to obtain the frequency-domain features in the dimension direction, or the two-dimensional Fourier transform can be used to simultaneously model the frequency-domain features in both the time and dimension directions. Through the above methods, various types of rich frequency-domain features can be learned.
[0017] In one possible implementation, the conversion of the features of the time series information to the frequency domain includes: converting the features of the time series information to the frequency domain through the Fourier transform or the wavelet transform.
[0018] In one possible implementation, the selection of some of the multiple frequency bands according to the frequency-domain features includes: determining the amplitude corresponding to each frequency band according to the frequency-domain features, and selecting the N frequency bands with the largest or smallest amplitudes among the multiple frequency bands.
[0019] In one possible implementation, the conversion of the processing result to the time domain includes: converting the processing result and the frequency-domain features corresponding to the other frequency bands except the partial frequency bands among the multiple frequency bands to the time domain.
[0020] In one possible implementation, the encoder further includes an embedding layer; the embedding layer includes multiple convolutional kernels and a SE attention layer.
[0021] Using more convolutional layers and SE attention layers to aggregate local information and increase the feature signal-to-noise ratio at the same time, through this module, the performance of the model in various tasks can be effectively improved.
[0022] In a possible implementation, the task processing result is a long-term or short-term prediction result of the time series information, an editing result of the time series information, an anomaly detection result of the time series information, or a classification result of the time series information.
[0023] In a second aspect, the present application provides a data processing method, the method comprising:
[0024] Get time series information;
[0025] The time series information is processed by an encoder to obtain an encoding result; wherein,
[0026] The encoder includes a target network layer; the target network layer is used to convert the features of the time series information into the frequency domain to obtain spectrum information; the spectrum information includes multiple frequency bands and frequency domain features corresponding to the frequency bands, the frequency domain features are processed by a multi-layer perceptron (MLP) to obtain a processing result, and the processing result is converted into the time domain to obtain a time domain representation, and the time domain representation is used as the encoding result or the encoding result is obtained by feature extraction;
[0027] According to the encoding result, a task processing result is obtained through the task network.
[0028] In a possible implementation, the processing the frequency domain features by using a multi-layer perceptron MLP includes: processing the frequency domain features in a frequency band direction and / or a data dimension direction by using a multi-layer perceptron MLP.
[0029] In a possible implementation, the frequency domain features include features of multiple dimensions, and processing the frequency domain features by using a multi-layer perceptron (MLP) includes:
[0030] The features of some dimensions in the multiple dimensions in the frequency domain features of the partial frequency band are processed by a multi-layer perceptron MLP.
[0031] In a possible implementation, the task processing result is a long-term or short-term prediction result of the time series information, an editing result of the time series information, an anomaly detection result of the time series information, or a classification result of the time series information.
[0032] In a third aspect, the present application provides a data processing device, comprising:
[0033] Acquisition module, used to obtain time series information;
[0034] A processing module is used to process the time series information through an encoder to obtain an encoding result; wherein,
[0035] The encoder includes a target network layer; the target network layer is used to convert the features of the time series information into the frequency domain to obtain spectrum information; the spectrum information includes multiple frequency bands and frequency domain features corresponding to the frequency bands, and according to the frequency domain features, select some frequency bands from the multiple frequency bands, and perform feature extraction on the frequency domain features of the some frequency bands to obtain a processing result, and convert the processing result into the time domain to obtain a time domain representation, and the time domain representation is used as the encoding result or the encoding result is obtained through feature extraction;
[0036] According to the encoding result, a task processing result is obtained through the task network.
[0037] In a possible implementation, the feature extraction is a dot product operation performed on the frequency domain features of the partial frequency band through a kernel.
[0038] In a possible implementation, the frequency domain features include features of multiple dimensions, and the processing module is specifically configured to extract features of some dimensions of the multiple dimensions in the frequency domain features of the partial frequency band.
[0039] In a possible implementation, converting the features of the time series information into the frequency domain includes: transforming the features of the time series information in the time domain direction and / or the data dimension direction to convert them into the frequency domain.
[0040] In a possible implementation, the processing module is specifically configured to:
[0041] The features of the time series information are converted into the frequency domain through Fourier transform or wavelet transform.
[0042] In a possible implementation, the processing module is specifically configured to:
[0043] According to the frequency domain characteristics, the amplitude corresponding to each frequency band is determined, and the N frequency bands with the largest amplitudes or the N frequency bands with the smallest amplitudes among the multiple frequency bands are selected.
[0044] In a possible implementation, the processing module is specifically configured to:
[0045] The processing result and corresponding frequency domain features of the other frequency bands in the multiple frequency bands except the partial frequency bands are converted into the time domain.
[0046] In one possible implementation, the encoder further includes an embedding layer;
[0047] The embedding layer includes multiple convolution kernels and SE attention layer.
[0048] In a possible implementation, the task processing result is a long-term or short-term prediction result of the time series information, an editing result of the time series information, an anomaly detection result of the time series information, or a classification result of the time series information.
[0049] In a fourth aspect, the present application provides a data processing device, comprising:
[0050] Acquisition module, used to obtain time series information;
[0051] A processing module is used to process the time series information through an encoder to obtain an encoding result; wherein,
[0052] The encoder includes a target network layer; the target network layer is used to convert the features of the time series information into the frequency domain to obtain spectrum information; the spectrum information includes multiple frequency bands and frequency domain features corresponding to the frequency bands, the frequency domain features are processed by a multi-layer perceptron (MLP) to obtain a processing result, and the processing result is converted into the time domain to obtain a time domain representation, and the time domain representation is used as the encoding result or the encoding result is obtained by feature extraction;
[0053] According to the encoding result, a task processing result is obtained through the task network.
[0054] In a possible implementation, the processing the frequency domain features by using a multi-layer perceptron MLP includes: processing the frequency domain features in a frequency band direction and / or a data dimension direction by using a multi-layer perceptron MLP.
[0055] In a possible implementation, the frequency domain features include features of multiple dimensions, and the processing module is specifically configured to extract features of some dimensions of the multiple dimensions in the frequency domain features of the partial frequency band.
[0056] In a possible implementation, the task processing result is a long-term or short-term prediction result of the time series information, an editing result of the time series information, an anomaly detection result of the time series information, or a classification result of the time series information.
[0057] In the fifth aspect, an embodiment of the present application provides a data processing device, which may include a memory, a processor, and a bus system, wherein the memory is used to store programs, and the processor is used to execute the programs in the memory to perform the above-mentioned first aspect and any optional method thereof, as well as the above-mentioned second aspect and any optional method thereof.
[0058] In a sixth aspect, an embodiment of the present application provides a computer-readable storage medium, in which a computer program is stored. When the computer-readable storage medium is run on a computer, the computer executes the above-mentioned first aspect and any optional method thereof, as well as the above-mentioned second aspect and any optional method thereof.
[0059] In a seventh aspect, an embodiment of the present application provides a computer program which, when run on a computer, enables the computer to execute the above-mentioned first aspect and any optional method thereof, as well as the above-mentioned second aspect and any optional method thereof.
[0060] In an eighth aspect, the present application provides a chip system comprising a processor configured to support the execution of a data processing device to implement the functions described in the aforementioned aspects, such as transmitting or processing the data or information described in the aforementioned methods. In one possible design, the chip system further comprises a memory configured to store program instructions and data necessary for executing the device or training the device. The chip system may consist of a single chip or may include a chip and other discrete components. BRIEF DESCRIPTION OF THE DRAWINGS
[0061] FIG1A is a schematic diagram of a structure of an artificial intelligence main framework;
[0062] Figures 1B and 1C are schematic diagrams of the application system framework of this application;
[0063] FIG1D is a schematic diagram of an optional hardware structure of a terminal;
[0064] FIG2 is a schematic diagram of the structure of a server;
[0065] FIG3 is a schematic diagram of a system architecture of the present application;
[0066] Figure 4 shows a process of cloud services;
[0067] 5A and 5B are schematic diagrams of a network structure;
[0068] FIG6A is a flowchart of a data processing method provided in an embodiment of the present application;
[0069] FIG6B is a schematic diagram of a network structure of the present application;
[0070] FIG7 is a flowchart of a data processing method provided in an embodiment of the present application;
[0071] FIG8 is a schematic structural diagram of a data processing device provided in an embodiment of the present application;
[0072] FIG9 is a schematic diagram of a structure of an execution device provided in an embodiment of the present application;
[0073] FIG10 is a schematic diagram of a structure of a training device provided in an embodiment of the present application;
[0074] FIG11 is a schematic diagram of the structure of a chip provided in an embodiment of the present application. DETAILED DESCRIPTION
[0075] The following describes the embodiments of the present application in conjunction with the accompanying drawings. The terms used in the implementation methods of the present application are only used to explain the specific embodiments of the present application and are not intended to limit the present application.
[0076] The embodiments of the present application are described below in conjunction with the accompanying drawings. Those skilled in the art will appreciate that, with the development of technology and the emergence of new scenarios, the technical solutions provided in the embodiments of the present application are also applicable to similar technical problems.
[0077] The terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequential order. It should be understood that the terms used in this way can be interchangeable under appropriate circumstances, and this is merely a way of distinguishing the objects of the same attributes when describing them in the embodiments of the present application. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, so that the process, method, system, product or equipment comprising a series of units need not be limited to those units, but may include other units that are not clearly listed or inherent to these processes, methods, products or equipment.
[0078] As used herein, the terms "substantially," "about," and similar terms are used as terms of approximation, not as terms of degree, and are intended to take into account the inherent deviations in measurements or calculations that one of ordinary skill in the art would recognize. Furthermore, the use of "may" when describing embodiments of the present application refers to "one or more possible embodiments." As used herein, the terms "use," "using," and "used" may be considered synonymous with the terms "utilize," "utilizing," and "utilized," respectively. Additionally, the term "exemplary" is intended to refer to an example or illustration.
[0079] First, let's describe the overall workflow of an AI system. See Figure 1A, which shows a schematic diagram of the main AI framework. This AI framework will be explained from two perspectives: the "intelligent information chain" (horizontal axis) and the "IT value chain" (vertical axis). The "intelligent information chain" reflects the entire process from data acquisition to processing. For example, it could be the general process of intelligent information perception, intelligent information representation and formation, intelligent reasoning, intelligent decision-making, and intelligent execution and output. Throughout this process, data undergoes a condensed journey from "data-information-knowledge-wisdom." The "IT value chain," spanning the underlying infrastructure of human intelligence, information (provided and processed by technology), and the system's industrial ecosystem, reflects the value that AI brings to the information technology industry.
[0080] (1) Infrastructure
[0081] Infrastructure provides computing power for AI systems, enabling communication with the outside world and supporting this through a foundational platform. External communication occurs through sensors; computing power is provided by intelligent chips (CPUs, NPUs, GPUs, ASICs, FPGAs, and other hardware accelerators). The foundational platform includes a distributed computing framework and network-related platform guarantees and support, including cloud storage and computing, and interconnected networks. For example, sensors communicate with the outside world to acquire data, which is then fed into the intelligent chips within the distributed computing system provided by the foundational platform for computation.
[0082] (2) Data
[0083] Data above the infrastructure layer represents data sources for AI. This data includes graphics, images, voice, and text, as well as IoT data from traditional devices. This includes business data from existing systems and sensor data such as force, displacement, liquid level, temperature, and humidity.
[0084] (3) Data processing
[0085] Data processing generally includes data training, machine learning, deep learning, search, reasoning, decision-making, etc.
[0086] Among them, machine learning and deep learning can symbolize and formalize data for intelligent information modeling, extraction, preprocessing, and training.
[0087] Reasoning refers to the process of simulating human intelligent reasoning in computers or intelligent systems, using formalized information to perform machine thinking and solve problems based on reasoning control strategies. Typical functions are search and matching.
[0088] Decision-making refers to the process of making decisions after intelligent information is reasoned, and usually provides functions such as classification, sorting, and prediction.
[0089] (4) General ability
[0090] After the data has undergone the data processing mentioned above, some general capabilities can be further formed based on the results of the data processing, such as algorithms or a general system, for example, translation, text analysis, computer vision processing, speech recognition, image recognition, etc.
[0091] (5) Smart products and industry applications
[0092] Smart products and industry applications refer to the products and applications of artificial intelligence systems in various fields. They are the encapsulation of the overall artificial intelligence solution, which productizes intelligent information decision-making and realizes practical application. Its application areas mainly include: smart terminals, smart transportation, smart medical care, autonomous driving, smart cities, etc.
[0093] This application can be applied to the field of image processing in the field of artificial intelligence. Taking image processing as an example, the following will introduce multiple application scenarios that have been implemented in products.
[0094] First, the application scenario of this application is introduced.
[0095] This application can be applied to, but is not limited to, applications with sequence information processing capabilities (hereinafter referred to as sequence information processing applications) or cloud services provided by cloud-side servers, which are described below:
[0096] 1. Sequence Information Processing Applications
[0097] The product form of the embodiment of the present application can be a sequence information processing application, in particular, an application with sequence information processing function. The sequence information processing application can be run on a terminal device or a cloud-side server.
[0098] Sequence information, which can be referred to as time series or dynamic series, refers to a numerical sequence of indicators of a phenomenon arranged in chronological order, reflecting the development and change of the phenomenon. By analyzing time series, we can reveal the trends and patterns of the phenomenon's development and change. By measuring the various factors that influence the time series, we can further explain the underlying causes of the phenomenon's changes, providing reliable data support for prediction and decision-making. Specifically, time series analysis encompasses a range of time series tasks, including long-term or short-term time series forecasting, interpolation, anomaly detection, and classification. It is widely used in practical applications such as power load forecasting, intelligent system monitoring, traffic flow forecasting, and energy consumption prediction.
[0099] In a possible implementation, the sequence information processing application may perform sequence information processing based on input sequence information to obtain a processing result.
[0100] In one possible implementation, a user can open a sequence information processing application installed on a terminal device and input an image. The sequence information processing application can process the sequence information using the method provided in the embodiment of the present application and present the processing results to the user (the presentation method may be, but is not limited to, display, saving, uploading to the cloud, etc.).
[0101] In one possible implementation, a user can open a sequence information processing application installed on a terminal device and input sequence information. The sequence information processing application can send the sequence information to a cloud-side server. The cloud-side server processes the sequence information using the method provided in an embodiment of the present application and transmits the processing results back to the terminal device. The terminal device can present the processing results to the user (the presentation method may be, but is not limited to, display, saving, uploading to the cloud side, etc.).
[0102] Next, the sequence information processing application in the embodiment of this application is introduced from the perspective of functional architecture and product architecture that implements the functions.
[0103] Referring to FIG. 1B , FIG. 1B is a schematic diagram of the functional architecture of a sequence information processing application in an embodiment of the present application:
[0104] In one possible implementation, as shown in FIG1B , a sequence information processing application 102 may receive input parameters 101 (e.g., including sequence information) and generate processing results 103. The sequence information processing application 102 may be executed on, for example, at least one computer system and may include computer code that, when executed by one or more computers, causes the computers to execute the methods provided in the embodiments of the present application.
[0105] Referring to FIG. 1C , FIG. 1C is a schematic diagram of the physical architecture of a sequence information processing application program according to an embodiment of the present application:
[0106] Referring to FIG1C , FIG1C shows a schematic diagram of a system architecture. The system may include a terminal 100 and a server 200. The server 200 may include one or more servers (FIG1C illustrates one server as an example), and the server 200 may provide the method provided in the embodiments of the present application to one or more terminals.
[0107] Among them, a sequence information processing application can be installed on the terminal 100. The above application and web page can provide an interface. The terminal 100 can receive relevant parameters entered by the user on the sequence information processing interface and send the above parameters to the server 200. The server 200 can obtain processing results based on the received parameters and return the processing results to the terminal 100.
[0108] It should be understood that in some optional implementations, the terminal 100 can also complete the action of obtaining the processing result based on the received parameters by itself without the need for the cooperation of the server, and the embodiments of the present application are not limited to this.
[0109] Next, the product form of the terminal 100 in FIG1C is described;
[0110] The terminal 100 in the embodiment of the present application can be a mobile phone, a tablet computer, a wearable device, an in-vehicle device, an augmented reality (AR) / virtual reality (VR) device, a laptop computer, an ultra-mobile personal computer (UMPC), a netbook, a personal digital assistant (PDA), etc., and the embodiment of the present application does not impose any restrictions on this.
[0111] FIG1D shows a schematic diagram of an optional hardware structure of the terminal 100 .
[0112] 1D , the terminal 100 may include components such as a radio frequency unit 110, a memory 120, an input unit 130, a display unit 140, a camera 150 (optional), an audio circuit 160 (optional), a speaker 161 (optional), a microphone 162 (optional), a processor 170, an external interface 180, and a power supply 190. Those skilled in the art will appreciate that FIG1D is merely an example of a terminal or multi-function device and does not limit the terminal or multi-function device. The terminal or multi-function device may include more or fewer components than shown, or may combine certain components or have different components.
[0113] The input unit 130 can be used to receive input digital or character information and generate key signal input related to user settings and function control of the portable multifunction device. Specifically, the input unit 130 may include a touch screen 131 (optional) and / or other input devices 132. The touch screen 131 can detect user touch operations on or near it (for example, operations performed on or near the touch screen using a finger, joint, stylus, or any other suitable object) and drive corresponding connected devices according to pre-set programs. The touch screen can detect user touch actions on the touch screen, convert the touch actions into touch signals and transmit them to the processor 170. It can also receive and execute commands sent by the processor 170; the touch signals include at least touch point coordinate information. The touch screen 131 provides an input interface and an output interface between the terminal 100 and the user. Touch screens can be implemented using various types, including resistive, capacitive, infrared, and surface acoustic wave. In addition to the touch screen 131, the input unit 130 may also include other input devices. Specifically, the other input devices 132 may include, but are not limited to, one or more of a physical keyboard, function keys (such as a volume control key, a switch key, etc.), a trackball, a mouse, a joystick, and the like.
[0114] The input device 132 may receive input sequence information and the like.
[0115] The display unit 140 may be used to display information input by or provided to the user, various menus of the terminal 100, interactive interfaces, file display, and / or playback of any multimedia file. In an embodiment of the present application, the display unit 140 may be used to display the interface and processing results of a sequence information processing application.
[0116] Memory 120 can be used to store instructions and data. It primarily includes an instruction storage area and a data storage area. The data storage area can store various data, such as multimedia files and text. The instruction storage area can store software units such as the operating system, applications, and instructions required for at least one function, or subsets or extensions thereof. It may also include non-volatile random access memory (RAM). It provides processor 170 with management functions for the hardware, software, and data resources within the computing and processing device, supporting control software and applications. It is also used to store multimedia files and running programs and applications.
[0117] The processor 170 is the control center of the terminal 100. It connects all components of the terminal 100 using various interfaces and circuits. By executing instructions stored in the memory 120 and accessing data stored therein, it executes various functions of the terminal 100 and processes data, thereby providing overall control of the terminal device. Optionally, the processor 170 may include one or more processing units. Preferably, the processor 170 may integrate an application processor and a modem processor, with the application processor primarily processing the operating system, user interface, and application programs, while the modem processor primarily handles wireless communications. It is understood that the modem processor may not be integrated into the processor 170. In some embodiments, the processor and memory may be implemented on a single chip; in other embodiments, they may be implemented on separate chips. The processor 170 may also generate corresponding operational control signals and send them to the corresponding components of the computing and processing device. It may also read and process data in the software, particularly the data and programs in the memory 120, to enable the various functional modules therein to perform their corresponding functions, thereby controlling the corresponding components to operate as instructed.
[0118] Among them, the memory 120 can be used to store software codes related to the data processing method, the processor 170 can execute the steps of the chip's data processing method, and can also schedule other units (such as the above-mentioned input unit 130 and display unit 140) to achieve corresponding functions.
[0119] The RF unit 110 (optional) can be used to send and receive information or receive and send signals during a call. For example, after receiving downlink information from the base station, it is passed to the processor 170 for processing; in addition, it sends the designed uplink data to the base station. Generally, the RF circuit includes but is not limited to an antenna, at least one amplifier, a transceiver, a coupler, a low noise amplifier (LNA), a duplexer, etc. In addition, the RF unit 110 can also communicate with network devices and other devices via wireless communication. This wireless communication can use any communication standard or protocol, including but not limited to Global System of Mobile communication (GSM), General Packet Radio Service (GPRS), Code Division Multiple Access (CDMA), Wideband Code Division Multiple Access (WCDMA), Long Term Evolution (LTE), email, Short Messaging Service (SMS), etc.
[0120] In this embodiment of the present application, the radio frequency unit 110 may send sequence information to the server 200 and receive a processing result sent by the server 200.
[0121] It should be understood that the radio frequency unit 110 is optional and can be replaced by other communication interfaces, such as a network port.
[0122] The terminal 100 also includes a power supply 190 (such as a battery) for supplying power to various components. Preferably, the power supply can be logically connected to the processor 170 through a power management system, thereby managing functions such as charging, discharging, and power consumption through the power management system.
[0123] The terminal 100 further includes an external interface 180 , which may be a standard Micro USB interface or a multi-pin connector, and may be used to connect the terminal 100 to other devices for communication, or to connect a charger to charge the terminal 100 .
[0124] Although not shown, the terminal 100 may also include a flash, a wireless fidelity (WiFi) module, a Bluetooth module, sensors with different functions, etc., which are not described in detail here. Some or all of the methods described below may be applied to the terminal 100 shown in FIG1D .
[0125] Next, the product form of the server 200 in FIG1C is described;
[0126] FIG2 provides a schematic diagram of the structure of a server 200. As shown in FIG2, the server 200 includes a bus 201, a processor 202, a communication interface 203, and a memory 204. The processor 202, the memory 204, and the communication interface 203 communicate with each other via the bus 201.
[0127] Bus 201 may be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus. Buses can be categorized as address buses, data buses, and control buses. For ease of illustration, FIG2 shows only one thick line, but this does not imply that there is only one bus or only one type of bus.
[0128] The processor 202 may be any one or more of a central processing unit (CPU), a graphics processing unit (GPU), a microprocessor (MP), or a digital signal processor (DSP).
[0129] The memory 204 may include volatile memory, such as random access memory (RAM). The memory 204 may also include non-volatile memory, such as read-only memory (ROM), flash memory, hard drive (HDD), or solid state drive (SSD).
[0130] The memory 204 may be used to store software codes related to the data processing method, and the processor 202 may execute the steps of the data processing method of the chip, and may also schedule other units to implement corresponding functions.
[0131] It should be understood that the above-mentioned terminal 100 and server 200 can be centralized or distributed devices, and the processors in the above-mentioned terminal 100 and server 200 (such as processor 170 and processor 202) can be hardware circuits (such as application specific integrated circuit (ASIC), field-programmable gate array (FPGA), general-purpose processor, digital signal processor (DSP), microprocessor or microcontroller, etc.), or a combination of these hardware circuits. For example, the processor can be a hardware system with an instruction execution function, such as a CPU, DSP, etc., or a hardware system without an instruction execution function, such as an ASIC, FPGA, etc., or a combination of the above-mentioned hardware systems without an instruction execution function and hardware systems with an instruction execution function.
[0132] It should be understood that the steps related to the model reasoning process in the embodiments of this application involve AI-related operations. When performing AI operations, the instruction execution architecture of the terminal device and server is not limited to the processor-memory architecture described above. The system architecture provided in the embodiments of this application is described in detail below with reference to Figure 3.
[0133] FIG3 is a schematic diagram of the system architecture provided by an embodiment of the present application. As shown in FIG3 , the system architecture 500 includes an execution device 510 , a training device 520 , a database 530 , a client device 540 , a data storage system 550 , and a data acquisition system 560 .
[0134] The execution device 510 includes a calculation module 511, an I / O interface 512, a pre-processing module 513, and a post-processing module 514. The calculation module 511 may include the target model / rule 501, and the pre-processing module 513 and the post-processing module 514 are optional.
[0135] The execution device 510 may be a terminal device or a server that runs the aforementioned sequence information processing application.
[0136] The data collection device 560 is used to collect training samples. The training samples can be sequence information, text included, and the location of the text. After collecting the training samples, the data collection device 560 stores these training samples in the database 530.
[0137] The training device 520 can train the neural network to be trained (such as the sequence information recognition network and sequence information detection network in the embodiment of the present application) based on the training samples maintained in the database 530 to obtain the target model / rule 501.
[0138] It should be understood that the training device 520 can perform a pre-training process on the neural network to be trained based on the training samples maintained in the database 530, or fine-tune the model based on the pre-training.
[0139] It should be noted that, in actual applications, the training samples maintained in the database 530 may not all be collected by the data acquisition device 560, but may also be received from other devices. It should also be noted that the training device 520 may not train the target model / rule 501 entirely based on the training samples maintained in the database 530, but may also obtain training samples from the cloud or other places for model training. The above description should not be used as a limitation on the embodiments of the present application.
[0140] The target model / rule 501 obtained through training with the training device 520 can be applied to different systems or devices, such as the execution device 510 shown in FIG3 . The execution device 510 can be a terminal, such as a mobile phone terminal, a tablet computer, a laptop computer, an augmented reality (AR) / virtual reality (VR) device, an in-vehicle terminal, etc., or a server, etc.
[0141] Specifically, the training device 520 may transfer the trained model to the execution device 510 .
[0142] In Figure 3, the execution device 510 is configured with an input / output (I / O) interface 512 for data interaction with external devices. The user can input data (such as sequence information in the embodiment of the present application) into the I / O interface 512 through the client device 540.
[0143] Preprocessing module 513 and preprocessing module 514 are used to preprocess the input data received by I / O interface 512. It should be understood that preprocessing module 513 and preprocessing module 514 may be absent or only one preprocessing module may be present. If preprocessing module 513 and preprocessing module 514 are absent, computing module 511 may be used directly to process the input data.
[0144] When the execution device 510 preprocesses the input data, or when the computing module 511 of the execution device 510 performs calculations and other related processing, the execution device 510 can call the data, code, etc. in the data storage system 550 for corresponding processing, and can also store the data, instructions, etc. obtained from the corresponding processing in the data storage system 550.
[0145] Finally, the I / O interface 512 provides the processed results to the client device 540 and thus to the user.
[0146] In the scenario shown in FIG3 , the user can manually input data, and this "manual input data" can be operated through the interface provided by I / O interface 512. In another scenario, client device 540 can automatically send input data to I / O interface 512. If user authorization is required for client device 540 to automatically send input data, the user can set the corresponding permissions in client device 540. The user can view the results output by execution device 510 on client device 540, and the specific presentation form can be a display, sound, action, or other specific method. Client device 540 can also serve as a data acquisition terminal, collecting input data input into I / O interface 512 and output results output from I / O interface 512 as new sample data, and storing them in database 530. Of course, collection can also be performed without client device 540, and instead the I / O interface 512 directly stores the input data input into I / O interface 512 and output results output from I / O interface 512 as new sample data in database 530.
[0147] It is worth noting that FIG3 is merely a schematic diagram of a system architecture provided by an embodiment of the present application, and the positional relationships between the devices, components, modules, etc. shown in the figure do not constitute any limitation. For example, in FIG3 , the data storage system 550 is an external memory relative to the execution device 510. In other cases, the data storage system 550 can also be placed in the execution device 510. It should be understood that the execution device 510 can be deployed in the client device 540.
[0148] From the inference side of the model:
[0149] In the embodiment of the present application, the computing module 511 of the above-mentioned execution device 510 can obtain the code stored in the data storage system 550 to implement the steps related to the model reasoning process in the embodiment of the present application.
[0150] In an embodiment of the present application, the computing module 511 of the execution device 510 may include a hardware circuit (such as an application specific integrated circuit (ASIC), a field-programmable gate array (FPGA), a general-purpose processor, a digital signal processor (DSP), a microprocessor or a microcontroller, etc.), or a combination of these hardware circuits. For example, the training device 520 may be a hardware system with an instruction execution function, such as a CPU, DSP, etc., or a hardware system without an instruction execution function, such as an ASIC, FPGA, etc., or a combination of the above-mentioned hardware systems without an instruction execution function and hardware systems with an instruction execution function.
[0151] Specifically, the computing module 511 of the execution device 510 can be a hardware system with an execution instruction function, and the steps related to the model reasoning process provided in the embodiment of the present application can be software codes stored in the memory. The computing module 511 of the execution device 510 can obtain the software code from the memory and execute the obtained software code to implement the steps related to the model reasoning process provided in the embodiment of the present application.
[0152] It should be understood that the computing module 511 of the execution device 510 can be a combination of a hardware system that does not have the function of executing instructions and a hardware system that has the function of executing instructions. Some of the steps related to the model reasoning process provided in the embodiment of the present application can also be implemented by the hardware system that does not have the function of executing instructions in the computing module 511 of the execution device 510, which is not limited here.
[0153] From the training side of the model:
[0154] In an embodiment of the present application, the above-mentioned training device 520 can obtain the code stored in the memory (not shown in Figure 3, which can be integrated into the training device 520 or deployed separately from the training device 520) to implement the steps related to model training in the embodiment of the present application.
[0155] In an embodiment of the present application, the training device 520 may include a hardware circuit (such as an application specific integrated circuit (ASIC), a field-programmable gate array (FPGA), a general-purpose processor, a digital signal processor (DSP), a microprocessor or a microcontroller, etc.), or a combination of these hardware circuits. For example, the training device 520 may be a hardware system with an instruction execution function, such as a CPU, DSP, etc., or a hardware system without an instruction execution function, such as an ASIC, FPGA, etc., or a combination of the above-mentioned hardware systems without an instruction execution function and hardware systems with an instruction execution function.
[0156] It should be understood that the training device 520 can be a combination of a hardware system that does not have the function of executing instructions and a hardware system that has the function of executing instructions. Some of the steps related to model training provided in the embodiments of the present application can also be implemented by the hardware system in the training device 520 that does not have the function of executing instructions, which is not limited here.
[0157] 2. Sequence information processing cloud services provided by the server:
[0158] In a possible implementation, the server may provide sequence information processing services to the terminal side through an application programming interface (API).
[0159] Among them, the terminal device can send relevant parameters (such as sequence information) to the server through the API provided by the cloud. The server can obtain processing results based on the received parameters, etc., and return the processing results to the terminal.
[0160] The description of the terminal and the server can be the same as that of the above embodiments, and will not be repeated here.
[0161] FIG4 shows a process of using a sequence information processing cloud service provided by a cloud platform.
[0162] 1. Activate and purchase content review services.
[0163] 2. Users can download the software development kit (SDK) corresponding to the content review service. Usually, the cloud platform provides multiple development versions of the SDK for users to choose according to the requirements of the development environment, such as JAVA version SDK, Python version SDK, PHP version SDK, Android version SDK, etc.
[0164] 3. After the user downloads the corresponding version of the SDK to the local computer as needed, the SDK project is imported into the local development environment for configuration and debugging. The local development environment can also be used to develop other functions, forming an application that integrates sequence information processing capabilities.
[0165] 4. When sequence information processing applications are used and sequence information processing is required, they can trigger a sequence information processing API call. When the application triggers the sequence information processing function, it initiates an API request to the running instance of the sequence information processing service in the cloud environment. The API request contains sequence information, and the running instance in the cloud environment processes the sequence information and obtains the processing result.
[0166] 5. The cloud environment returns the processing results to the application, thereby completing a method call provided in an embodiment of the present application.
[0167] Since the embodiments of the present application involve the application of a large number of neural networks, in order to facilitate understanding, the relevant terms and related concepts such as neural networks involved in the embodiments of the present application are first introduced below.
[0168] (1) Neural Network
[0169] A neural network can be composed of neural units. A neural unit can refer to an operation unit that takes xs (i.e., input data) and intercept 1 as input. The output of the operation unit can be:
[0170] Where s = 1, 2, ... n, n is a natural number greater than 1, Ws is the weight of xs, and b is the bias of the neural unit. f is the activation function of the neural unit, which is used to introduce nonlinear characteristics into the neural network to convert the input signal of the neural unit into the output signal. The output signal of the activation function can be used as the input of the next convolutional layer, and the activation function can be a sigmoid function. A neural network is a network formed by connecting multiple single neural units mentioned above, that is, the output of one neural unit can be the input of another neural unit. The input of each neural unit can be connected to the local receptive field of the previous layer to extract the features of the local receptive field. The local receptive field can be an area composed of several neural units.
[0171] (2) Convolutional neural network (CNN) is a deep neural network with a convolutional structure. Convolutional neural network contains a feature extractor consisting of a convolution layer and a subsampling layer, which can be regarded as a filter. The convolution layer refers to the neuron layer in the convolutional neural network that performs convolution processing on the input signal. In the convolution layer of the convolutional neural network, a neuron can only be connected to some neurons in the adjacent layer. A convolution layer usually contains several feature planes, and each feature plane can be composed of some rectangularly arranged neural units. The neural units in the same feature plane share weights, and the shared weights here are convolution kernels. Shared weights can be understood as the way of extracting features is independent of position. The convolution kernel can be formalized as a matrix of random size, and the convolution kernel can obtain reasonable weights through learning during the training process of the convolutional neural network. In addition, the direct benefit of shared weights is to reduce the connections between the layers of the convolutional neural network, while reducing the risk of overfitting.
[0172] CNN is a very common neural network. The following will focus on the structure of CNN in detail with reference to Figure 5A. As mentioned in the previous basic concepts, a convolutional neural network is a deep neural network with a convolutional structure and a deep learning architecture. A deep learning architecture refers to multiple levels of learning at different levels of abstraction through machine learning algorithms. As a deep learning architecture, CNN is a feed-forward artificial neural network in which each neuron can respond to the sequence information input into it.
[0173] As shown in FIG5A , a convolutional neural network (CNN) 200 may include an input layer 210 , a convolutional layer / pooling layer 220 (wherein the pooling layer is optional), and a fully connected layer 230 .
[0174] Convolutional layer / pooling layer 220:
[0175] Convolutional layer:
[0176] As shown in FIG5A , the convolutional layer / pooling layer 220 may include layers 221-226. For example, in one implementation, layer 221 is a convolutional layer, layer 222 is a pooling layer, layer 223 is a convolutional layer, layer 224 is a pooling layer, layer 225 is a convolutional layer, and layer 226 is a pooling layer. In another implementation, layers 221 and 222 are convolutional layers, layer 223 is a pooling layer, layers 224 and 225 are convolutional layers, and layer 226 is a pooling layer. That is, the output of a convolutional layer can serve as the input of a subsequent pooling layer, or as the input of another convolutional layer to continue the convolution operation.
[0177] The following will take convolutional layer 221 as an example to introduce the internal working principle of a convolutional layer.
[0178] Convolutional layer 221 may include multiple convolution operators, also known as kernels. In sequence processing, a convolution operator acts as a filter that extracts specific information from the input sequence matrix. A convolution operator is essentially a weight matrix, which is typically predefined. During the convolution operation on the sequence information, the weight matrix is typically applied horizontally, pixel by pixel (or two pixels by two pixels, depending on the stride), to the input sequence information, thereby extracting specific features from the sequence information. The size of the weight matrix should be related to the size of the sequence information. It is important to note that the depth dimension of the weight matrix is the same as the depth dimension of the input sequence information. During the convolution operation, the weight matrix extends to the entire depth of the input sequence information. Therefore, convolution with a single weight matrix produces a convolution output with a single depth dimension. However, in most cases, a single weight matrix is not used, and instead multiple weight matrices of the same size (row × column) are applied, i.e., multiple homogeneous matrices. The output of each weight matrix is stacked to form the depth dimension of the convolution sequence information. The dimension here can be understood as being determined by the "multiple" mentioned above. Different weight matrices can be used to extract different features in the sequence information. For example, one weight matrix is used to extract edge information of the sequence information, another weight matrix is used to extract specific colors of the sequence information, and another weight matrix is used to blur unnecessary noise in the sequence information. The multiple weight matrices have the same size (rows × columns), and the feature maps extracted by the multiple weight matrices of the same size are also the same size. The multiple feature maps of the same size extracted are then merged to form the output of the convolution operation.
[0179] The weight values in these weight matrices need to be obtained through a lot of training in practical applications. The weight matrices formed by the weight values obtained through training can be used to extract information from the input sequence information, so that the convolutional neural network 200 can make correct predictions.
[0180] When the convolutional neural network 200 has multiple convolutional layers, the initial convolutional layer (for example, 221) often extracts more general features, which can also be called low-level features. As the depth of the convolutional neural network 200 increases, the features extracted by the later convolutional layers (for example, 226) become more and more complex, such as high-level semantic features. Features with higher semantics are more suitable for the problem to be solved.
[0181] Pooling layer:
[0182] Because it's often necessary to reduce the number of training parameters, pooling layers are often periodically introduced after convolutional layers. For example, in layers 221-226, as shown in the example of 220 in Figure 5A, a convolutional layer can be followed by a pooling layer, or multiple convolutional layers can be followed by one or more pooling layers. In sequence information processing, the sole purpose of the pooling layer is to reduce the spatial size of the sequence information. The pooling layer can include an average pooling operator and / or a maximum pooling operator to sample the input sequence information to obtain smaller-sized sequence information. The average pooling operator calculates the pixel values in the sequence information within a specific range and produces an average value as the result of average pooling. The maximum pooling operator takes the pixel with the largest value within a specific range as the result of maximum pooling. Furthermore, just as the size of the weight matrix used in the convolutional layer should be related to the size of the sequence information, the operators in the pooling layer should also be related to the size of the sequence information. The size of the sequence information output after processing by the pooling layer can be smaller than the size of the sequence information input to the pooling layer. Each pixel in the sequence information output by the pooling layer represents the average value or maximum value of the corresponding sub-region of the sequence information input to the pooling layer.
[0183] Fully connected layer 230:
[0184] After being processed by the convolution layer / pooling layer 220, the convolution neural network 200 is still insufficient to output the required output information. Because as mentioned above, the convolution layer / pooling layer 220 only extracts features and reduces the parameters brought by the input sequence information. However, in order to generate the final output information (the required class information or other relevant information), the convolution neural network 200 needs to use the fully connected layer 230 to generate one or a group of outputs of the required number of classes. Therefore, the fully connected layer 230 may include multiple hidden layers (231, 232 to 23n as shown in Figure 5A), and the parameters contained in the multiple hidden layers can be pre-trained based on the relevant training data of the specific task type. For example, the task type may include sequence information recognition, sequence information classification, sequence information super-resolution reconstruction, etc. ...
[0185] After the multiple hidden layers in the fully connected layer 230, that is, the last layer of the entire convolutional neural network 200 is the output layer 240. The output layer 240 has a loss function similar to the classification cross entropy, which is specifically used to calculate the prediction error. Once the forward propagation of the entire convolutional neural network 200 (such as the propagation from 210 to 240 in Figure 5A is forward propagation) is completed, the back propagation (such as the propagation from 240 to 210 in Figure 5A is back propagation) will begin to update the weight values and biases of the aforementioned layers to reduce the loss of the convolutional neural network 200 and the error between the result output by the convolutional neural network 200 through the output layer and the ideal result.
[0186] It should be noted that the convolutional neural network 200 shown in Figure 5A is only an example of a convolutional neural network. In specific applications, the convolutional neural network can also exist in the form of other network models, for example, including only a part of the network structure shown in Figure 5A. For example, the convolutional neural network used in the embodiment of the present application can only include an input layer 210, a convolution layer / pooling layer 220 and an output layer 240.
[0187] It should be noted that the convolutional neural network 100 shown in Figure 5A is only an example of a convolutional neural network. In specific applications, the convolutional neural network can also exist in the form of other network models. For example, as shown in Figure 5B, multiple convolutional layers / pooling layers are run in parallel, and the extracted features are input into the fully connected layer 230 for processing.
[0188] (3) Deep Neural Networks
[0189] Deep Neural Network (DNN), also known as multi-layer neural network, can be understood as a neural network with many hidden layers. There is no special metric for "many" here. Based on the position of different layers in DNN, the neural network inside DNN can be divided into three categories: input layer, hidden layer, and output layer. Generally speaking, the first layer is the input layer, the last layer is the output layer, and the layers in between are all hidden layers. The layers are fully connected, that is, any neuron in the i-th layer must be connected to any neuron in the i+1-th layer. Although DNN looks complicated, the work of each layer is actually not complicated. Simply put, it is the following linear relationship expression: in, is the input vector, is the output vector, is the offset vector, W is the weight matrix (also called coefficient), and α() is the activation function. Each layer is just an input vector After such a simple operation, the output vector Since there are many DNN layers, the coefficient W and the offset vector The definition of these parameters in DNN is as follows: Take the coefficient W as an example: Assume that in a three-layer DNN, the linear coefficient from the 4th neuron in the second layer to the 2nd neuron in the third layer is defined as The superscript 3 represents the layer number of the coefficient W, while the subscript corresponds to the output of the third layer index 2 and the input of the second layer index 4. In summary, the coefficient from the kth neuron in the L-1th layer to the jth neuron in the Lth layer is defined as It's important to note that the input layer has no W parameter. In deep neural networks, more hidden layers allow the network to better capture complex real-world situations. Theoretically, a model with more parameters has higher complexity and greater "capacity," meaning it can handle more complex learning tasks. Training a deep neural network is essentially the process of learning the weight matrix, with the ultimate goal of obtaining the weight matrices for all layers of a trained deep neural network (a weight matrix formed by the vectors W across many layers).
[0190] (4) Loss function
[0191] During the training of a deep neural network, because we want the output of the deep neural network to be as close as possible to the desired predicted value, we can compare the current network's predicted value with the desired target value and then update the weight vector of each layer of the neural network based on the difference between the two. (Of course, before the first update, there is usually an initialization process, which pre-configures the parameters for each layer in the deep neural network.) For example, if the network's predicted value is too high, the weight vector is adjusted to make it predict a lower value. This adjustment is continued until the deep neural network can predict the desired target value or a value very close to the desired target value. Therefore, it is necessary to predefine "how to compare the difference between the predicted value and the target value." This is the loss function (or objective function), which is an important equation used to measure the difference between the predicted value and the target value. For example, the loss function output value (loss) indicates a greater difference, so training a deep neural network becomes a process of minimizing this loss.
[0192] (5) Backpropagation algorithm
[0193] Convolutional neural networks can use the back propagation (BP) algorithm to correct the size of the parameters in the initial super-resolution model during training, reducing the reconstruction error loss of the super-resolution model. Specifically, the forward propagation of the input signal to the output generates an error loss. This error loss information is then backpropagated to update the parameters of the initial super-resolution model, thereby converging the error loss. The BP algorithm is a backward propagation movement dominated by the error loss, aiming to obtain the optimal super-resolution model parameters, such as the weight matrix.
[0194] Sequence information, also known as time series or dynamic series, refers to a numerical sequence of indicators of a phenomenon arranged in chronological order. It can reflect the development and changes of a phenomenon. By analyzing time series, we can reveal the trends and patterns of the phenomenon's development and changes. By measuring the various factors that influence time series, we can further explain the underlying causes of the phenomenon's changes, providing reliable data support for prediction and decision-making.
[0195] In existing technologies, sequence information is processed through temporal convolutional networks (TCNs). Specifically, temporal features can be captured by convolution kernels sliding along the time dimension. However, their small effective receptive field limits their performance. Recently, TimesNet proposed converting one-dimensional time series into two-dimensional tensors based on multi-periodic components and modeling them using 2D kernels, thereby modeling the periodicity and long-range dependencies of the time series. However, multi-periodic conversion is a parameter-redundant operation that increases the number of network parameters and computational complexity, while also ignoring much valuable information in the frequency domain. This results in low network processing power.
[0196] In order to solve the above problems, the present invention provides a data processing method. The data processing method of the present invention is described in detail below with reference to the accompanying drawings.
[0197] Refer to Figure 6A, which is a flow chart of a data processing method provided in an embodiment of the present application. As shown in Figure 6A, a data processing method provided in an embodiment of the present application may include steps 601 to 603, and these steps are described in detail below.
[0198] 601. Obtain time series information.
[0199] Among them, time series information can be called time series, dynamic series, etc., which refers to a numerical sequence in which the indicator values of a certain phenomenon are arranged in chronological order, which can reflect the development and change status of a certain phenomenon.
[0200] 602. Process the time series information through an encoder to obtain an encoding result; wherein the encoder includes a target network layer; the target network layer is used to convert the characteristics of the time series information into the frequency domain to obtain spectrum information; the spectrum information includes multiple frequency bands and frequency domain characteristics corresponding to the frequency bands, and according to the frequency domain characteristics, select some frequency bands from the multiple frequency bands, and perform feature extraction on the frequency domain characteristics of the some frequency bands to obtain a processing result, and convert the processing result to the time domain to obtain a time domain representation, and the time domain representation is used as the encoding result or to obtain the encoding result through feature extraction.
[0201] The encoder may include multiple network layers, and the structures of different network layers may be the same or different. The network layer may perform a feature extraction process for time series information. For example, a network layer may receive a feature representation obtained by an adjacent previous network layer and continue to perform a feature extraction process.
[0202] In the embodiment of the present application, the multiple network layers may include a target network layer, and the target network layer may convert the characteristics of the time series information into the frequency domain to obtain spectrum information.
[0203] In a possible implementation, the features of the time series information may be transformed in the time domain or data dimension direction to be converted into the frequency domain.
[0204] For example, the above-mentioned operation of converting time-domain features into the frequency domain can be performed along the time direction. Furthermore, frequency-domain features can be obtained along the data dimension direction, or by simultaneously modeling frequency-domain features in both the time and dimension directions. Through these methods, a variety of rich frequency-domain features can be learned.
[0205] In a possible implementation, the features of the time series information may be converted into the frequency domain by, but not limited to, Fourier transform, wavelet transform, or inverse wavelet transform.
[0206] For example, the aforementioned operation of converting time-domain features into the frequency domain can be performed along the time direction using the Fourier transform. Furthermore, the Fourier transform can be further introduced along the dimension direction to obtain the frequency-domain features in the dimension direction, or the two-dimensional Fourier transform can be used to simultaneously model the frequency-domain features in both the time and dimension directions. Through these methods, a variety of rich frequency-domain features can be learned.
[0207] In one possible implementation, the spectrum information includes multiple frequency bands and frequency domain features corresponding to the frequency bands. The target network layer can select some frequency bands from the multiple frequency bands based on the frequency domain features, and perform feature extraction on the frequency domain features of the some frequency bands to obtain processing results (for example, in one possible implementation, the feature extraction is a point multiplication operation performed on the frequency domain features of the some frequency bands through the kernel. The difference from convolution is that (1) the kernel and the feature are multiplied by points, and the results are not averaged but the original scale is retained, and (2) there is no sliding window operation here. Therefore, only the sparse kernel performs feature extraction on the feature point multiplication. Since feature extraction is performed on the features of some frequency bands, the kernel can be called a sparse kernel).
[0208] Among them, only extracting the frequency domain features of some frequency bands, that is, performing sparse modeling, can improve the network performance while reducing the computational complexity. Specifically, since large sparse kernels can cover all important frequencies, they can capture long-term and short-term dependencies and different periodic information in features, and at the same time have low computational complexity. In this process, even if only sparse operations are performed on the significant frequency parts, the model will obtain similar or even higher performance while using fewer parameters.
[0209] In a possible implementation, the frequency domain features include features in multiple dimensions, and the extracting the frequency domain features of the part of the frequency bands includes: extracting the features of some dimensions among the multiple dimensions of the frequency domain features of the part of the frequency bands.
[0210] That is to say, the feature extraction method in our frequency domain feature extraction part also includes dimensional sparsification. For example, after obtaining the frequency domain features where L is the time domain length, is the frequency domain length, and C is the number of dimensions. Our kernel Kernel scale can be set to where K < C. At this time, Kernel sparsifies the feature extraction operation of the dot product of X F and only selects K dimensions in the dimension direction for extraction, and the features of other dimensions remain unchanged. The selection of these K dimensions can be done in a fixed selection or random selection manner, or the network can be made to adaptively select through a learnable method.
[0211] In a possible implementation, according to the frequency domain features, the amplitude corresponding to each frequency band can be determined, and N frequency bands with the largest or smallest amplitudes among the multiple frequency bands can be selected. It should be understood that selecting multiple frequency bands with the largest or smallest amplitudes is only an illustration, and other rules can also be used to select some frequency bands, which is not limited in this application.
[0212] Among them, the amplitude corresponding to each frequency band can but is not limited to be obtained by averaging the eigenvalue of different dimensions corresponding to the frequency band.
[0213] In a possible implementation, the frequency domain features of other frequency bands except the selected part of the frequency bands can be left unprocessed.
[0214] In a possible implementation, the target network layer can convert the processing result into the time domain.
[0215] In a possible implementation, the target network layer can convert the processing result and the frequency domain features corresponding to other frequency bands except the part of the frequency bands among the multiple frequency bands into the time domain.
[0216] In the embodiment of the present application, in order to model the periodic and global information, the fast discrete Fourier transform algorithm is first used to convert the features into the frequency domain. In the frequency domain, time series features are not translation invariant, so the frequency features can be globally modeled.
[0217] For example, given the acquired time domain feature X T First, it is transformed into the frequency domain by fast Fourier transform (FFT) to obtain the frequency domain feature X F : X F =FFT(X T );
[0218] Next, the importance of each frequency band is determined by the value assigned to each frequency band in the spectrum: A=Avg(Amp(X F ));
[0219] Where Amp(·) represents the amplitude of each frequency band in different dimensions, and A represents the amplitude of each frequency band (obtained by averaging the values of the different dimensions of the frequency band). The most important frequency bands can be selected based on their importance: randomly, or using other rules (for example, the lowest K).
[0220] Among them, f * Represents the specific frequency value of the selected frequency band. After that, only the most important selected frequency bands are subjected to feature extraction:
[0221] Finally, the features can be converted back to the time domain through inverse Fourier transform:
[0222] Note the frequency domain characteristics here All frequency bands are included.
[0223] In addition, the encoder in the embodiment of the present application may also include an embedding layer (which may be referred to as a semantically aware data embedding module (SAEmbed) in the embodiment of the present application) for processing high-noise raw data, using more convolutional layers and SE attention layers to aggregate local information while increasing the feature signal-to-noise ratio, as shown in Figure 6B. This module can effectively improve the performance of the model on various tasks.
[0224] 603. Obtain a task processing result through a task network according to the encoding result.
[0225] In a possible implementation, the task processing result is a long-term or short-term prediction result of the time series information, an editing result of the time series information, an anomaly detection result of the time series information, or a classification result of the time series information.
[0226] In addition to using a large sparse kernel, the above-mentioned processing of the frequency domain can also be completed through a multilayer perceptron (MLP). Referring to Figure 7, Figure 7 is a flow chart of a data processing method provided in an embodiment of the present application. As shown in Figure 7, a data processing method provided in an embodiment of the present application may include steps 701 to 703, and these steps are described in detail below.
[0227] 701. Obtain time series information;
[0228] For the introduction of step 701 , reference may be made to the introduction of step 601 in the above embodiment, which will not be repeated here.
[0229] 702. Process the time series information through an encoder to obtain an encoding result; wherein the encoder includes a target network layer; the target network layer is used to convert the features of the time series information into the frequency domain to obtain spectrum information; the spectrum information includes multiple frequency bands and frequency domain features corresponding to the frequency bands, the frequency domain features are processed by a multi-layer perceptron MLP to obtain a processing result, and the processing result is converted into the time domain to obtain a time domain representation, and the time domain representation is used as the encoding result or to obtain the encoding result through feature extraction.
[0230] In addition to using large sparse kernels, the above frequency domain processing can also be completed through MLP. When using MLP to process frequency domain features, it can be performed along two directions: the frequency band and the dimension direction.
[0231] In a possible implementation, the frequency domain features may be processed in the frequency band direction and / or data dimension direction by a multi-layer perceptron (MLP).
[0232] In a possible implementation, the features of some dimensions of the multiple dimensions in the frequency domain features of the partial frequency band may be processed by a multi-layer perceptron (MLP).
[0233] 703. Obtain a task processing result through a task network according to the encoding result.
[0234] In a possible implementation, the task processing result is a long-term or short-term prediction result of the time series information, an editing result of the time series information, an anomaly detection result of the time series information, or a classification result of the time series information.
[0235] Next, the beneficial effects of the embodiments of the present application are described in conjunction with experiments:
[0236] Table 1 compares the performance of the method of the embodiment of the present application on long sequence prediction tasks on various public dataset benchmarks. The results show that the algorithm of the embodiment of the present application has a greater advantage in long sequence tasks than other solutions.
[0237] In the specific implementation, the input sequence x∈R L×C Fill x∈R with zero values (L+n)×C , where n is the length of the sequence to be predicted, and then processed according to the structure of Figure 6B. The final Linear layer maps the dimension C to k, where k is the number of predictor variables.
[0238] Table 1
[0239] Table 2 shows that the method of the embodiment of the present application also has high performance on the M4 short sequence prediction benchmark.
[0240] The specific implementation is the same as long sequence prediction.
[0241] Table 2
[0242] Table 3 lists the performance comparison of the algorithms of the embodiments of the present application on the benchmark of the public dataset of the interpolation task. The method of the embodiments of the present application achieved the best results on all datasets.
[0243] In specific implementation, the last Linear layer maps the feature dimension to k, where k is the number of variables.
[0244] Table 3
[0245] Table 4 lists the performance comparison of the algorithms of the embodiments of the present application on the public dataset benchmark of the classification task. The method of the embodiments of the present application achieved leading performance.
[0246] In specific implementation, the output dimension of the last Linear layer in Figure 6B is directly set to the number of categories, which is the model of this embodiment.
[0247] Table 4
[0248] Table 5 lists the performance comparison of the algorithms of the embodiments of the present application on the public dataset benchmark of the anomaly detection task. The method of the embodiments of the present application also achieved leading performance.
[0249] In specific implementation, the last Linear layer maps the feature dimension to k, where k is the number of variables.
[0250] Table 5
[0251] Table 6 shows the efficiency comparison of the FL model of the embodiment of the present application with other models in terms of parameters, inference time, and FLOPs. The FL proposed in the embodiment of the present application achieves optimal performance while maintaining very high efficiency. It is also worth noting that the model parameters of the embodiment of the present application grow slowly relative to the sequence length, while still having much fewer parameters than other models. In addition, when the sequence length is very long (such as 3072), the model of the embodiment of the present application achieves the best efficiency in terms of parameters, inference time, and FLOPs.
[0252] Table 6
[0253] 8 , which is a schematic diagram of the structure of a data processing device provided in an embodiment of the present application. As shown in FIG8 , a data processing device 800 provided in an embodiment of the present application includes:
[0254] Acquisition module 801, used to acquire sequence information;
[0255] The specific description of the acquisition module 801 can refer to the description of step 601 in the above embodiment, which will not be repeated here.
[0256] The processing module 802 is used to process the time series information through an encoder to obtain an encoding result; wherein,
[0257] The encoder includes a target network layer; the target network layer is used to convert the features of the time series information into the frequency domain to obtain spectrum information; the spectrum information includes multiple frequency bands and frequency domain features corresponding to the frequency bands, and according to the frequency domain features, select some frequency bands from the multiple frequency bands, and perform feature extraction on the frequency domain features of the some frequency bands to obtain a processing result, and convert the processing result into the time domain to obtain a time domain representation, and the time domain representation is used as the encoding result or the encoding result is obtained through feature extraction;
[0258] According to the encoding result, a task processing result is obtained through the task network.
[0259] The specific description of the processing module 802 can refer to the description of steps 601 to 603 in the above embodiment, which will not be repeated here.
[0260] In a possible implementation, the feature extraction is a dot product operation performed on the frequency domain features of the partial frequency band through a kernel.
[0261] In a possible implementation, the frequency domain features include features of multiple dimensions, and the processing module is specifically configured to extract features of some dimensions of the multiple dimensions in the frequency domain features of the partial frequency band.
[0262] In a possible implementation, converting the features of the time series information into the frequency domain includes: transforming the features of the time series information in the time domain direction and / or the data dimension direction to convert them into the frequency domain.
[0263] In a possible implementation, the processing module is specifically configured to:
[0264] The features of the time series information are converted into the frequency domain through Fourier transform or wavelet transform.
[0265] In a possible implementation, the processing module is specifically configured to:
[0266] According to the frequency domain characteristics, the amplitude corresponding to each frequency band is determined, and the N frequency bands with the largest amplitudes or the N frequency bands with the smallest amplitudes among the multiple frequency bands are selected.
[0267] In a possible implementation, the processing module is specifically configured to:
[0268] The processing result and corresponding frequency domain features of the other frequency bands in the multiple frequency bands except the partial frequency bands are converted into the time domain.
[0269] In one possible implementation, the encoder further includes an embedding layer;
[0270] The embedding layer includes multiple convolution kernels and SE attention layer.
[0271] In a possible implementation, the task processing result is a long-term or short-term prediction result of the time series information, an editing result of the time series information, an anomaly detection result of the time series information, or a classification result of the time series information.
[0272] The present application also provides a data processing device, comprising:
[0273] Acquisition module, used to obtain time series information;
[0274] A processing module is used to process the time series information through an encoder to obtain an encoding result; wherein,
[0275] The encoder includes a target network layer; the target network layer is used to convert the features of the time series information into the frequency domain to obtain spectrum information; the spectrum information includes multiple frequency bands and frequency domain features corresponding to the frequency bands, the frequency domain features are processed by a multi-layer perceptron (MLP) to obtain a processing result, and the processing result is converted into the time domain to obtain a time domain representation, and the time domain representation is used as the encoding result or the encoding result is obtained by feature extraction;
[0276] According to the encoding result, a task processing result is obtained through the task network.
[0277] In a possible implementation, the processing the frequency domain features by using a multi-layer perceptron MLP includes: processing the frequency domain features in a frequency band direction and / or a data dimension direction by using a multi-layer perceptron MLP.
[0278] In a possible implementation, the frequency domain features include features of multiple dimensions, and the processing module is specifically configured to extract features of some dimensions of the multiple dimensions in the frequency domain features of the partial frequency band.
[0279] In a possible implementation, the task processing result is a long-term or short-term prediction result of the time series information, an editing result of the time series information, an anomaly detection result of the time series information, or a classification result of the time series information.
[0280] Next, an execution device provided in an embodiment of the present application is introduced. Please refer to Figure 9. Figure 9 is a structural diagram of an execution device provided in an embodiment of the present application. The execution device 900 can be specifically manifested as a virtual reality VR device, a mobile phone, a tablet, a laptop computer, a smart wearable device, a monitoring data processing device or a server, etc., which is not limited here. Specifically, the execution device 900 includes: a receiver 901, a transmitter 902, a processor 903 and a memory 904 (wherein the number of processors 903 in the execution device 900 can be one or more, and Figure 9 takes one processor as an example), wherein the processor 903 may include an application processor 9031 and a communication processor 9032. In some embodiments of the present application, the receiver 901, the transmitter 902, the processor 903 and the memory 904 may be connected via a bus or other means.
[0281] The memory 904 may include a read-only memory and a random access memory, and provides instructions and data to the processor 903. A portion of the memory 904 may also include non-volatile random access memory (NVRAM). The memory 904 stores processor and operation instructions, executable modules, or data structures, or subsets or extended sets thereof. The operation instructions may include various operation instructions for implementing various operations.
[0282] Processor 903 controls the operation of the execution device. In specific applications, the various components of the execution device are coupled together via a bus system. In addition to a data bus, the bus system may also include a power bus, a control bus, and a status signal bus. However, for clarity, all bus systems are referred to as a bus system in the figure.
[0283] The methods disclosed in the above embodiments of the present application can be applied to or implemented by the processor 903. The processor 903 can be an integrated circuit chip with signal processing capabilities. During implementation, each step of the above method can be completed by hardware integrated logic circuits in the processor 903 or by software instructions. The above processor 903 can be a general-purpose processor, a digital signal processor (DSP), a microprocessor, or a microcontroller, and can further include an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. The processor 903 can implement or execute the various methods, steps, and logic block diagrams disclosed in the embodiments of the present application. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the methods disclosed in the embodiments of the present application can be directly implemented as being executed by a hardware decoding processor, or can be executed by a combination of hardware and software modules in the decoding processor. The software module can be located in a storage medium well-known in the art, such as random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, or registers. This storage medium is located in memory 904. Processor 903 reads information from memory 904 and, in conjunction with its hardware, completes the steps involved in the model inference process in the above method.
[0284] Receiver 901 can be used to receive input digital or character information and generate signal input related to executing device-related settings and function control. Transmitter 902 can be used to output digital or character information through the first interface. Transmitter 902 can also be used to send instructions to the disk pack through the first interface to modify data in the disk pack. Transmitter 902 can also include a display device such as a display screen.
[0285] The present application also provides a training device. Please refer to FIG. 10 , which is a schematic diagram of the structure of a training device provided by an embodiment of the present application. Specifically, the training device 1000 is implemented by one or more servers. The training device 1000 may vary significantly due to different configurations or performance. It may include one or more central processing units (CPUs) 1010 (e.g., one or more processors), a memory 1032, and one or more storage media 1030 (e.g., one or more mass storage devices) storing application programs 1042 or data 1044. The memory 1032 and storage medium 1030 may be either ephemeral or persistent storage. The program stored in the storage medium 1030 may include one or more modules (not shown), each of which may include a series of instruction operations on the training device. Furthermore, the CPU 1010 may be configured to communicate with the storage medium 1030, executing the series of instruction operations in the storage medium 1030 on the training device 1000.
[0286] The training device 1000 may also include one or more power supplies 1026, one or more wired or wireless network interfaces 1050, one or more input and output interfaces 1058; or, one or more operating systems 1041, such as Windows Server™, Mac OS X™, Unix™, Linux™, FreeBSD™, etc.
[0287] In the embodiment of the present application, the central processing unit 1010 is used to execute actions related to model training in the above embodiment.
[0288] An embodiment of the present application also provides a computer program product, which, when running on a computer, enables the computer to execute the steps executed by the aforementioned execution device, or enables the computer to execute the steps executed by the aforementioned training device.
[0289] A computer-readable storage medium is also provided in an embodiment of the present application, which stores a program for signal processing. When the computer-readable storage medium is run on a computer, it enables the computer to execute the steps executed by the aforementioned execution device, or enables the computer to execute the steps executed by the aforementioned training device.
[0290] The execution device, training device or terminal device provided in the embodiments of the present application can specifically be a chip, and the chip includes: a processing unit and a communication unit, the processing unit can be, for example, a processor, and the communication unit can be, for example, an input / output interface, a pin or a circuit, etc. The processing unit can execute the computer execution instructions stored in the storage unit, so that the chip in the execution device executes the data processing method described in the above embodiment, or so that the chip in the training device executes the data processing method described in the above embodiment. Optionally, the storage unit is a storage unit in the chip, such as a register, a cache, etc. The storage unit can also be a storage unit located outside the chip in the wireless access device, such as a read-only memory (ROM) or other types of static storage devices that can store static information and instructions, a random access memory (RAM), etc.
[0291] Specifically, see Figure 11, which is a schematic diagram of the structure of a chip provided in an embodiment of the present application. The chip can be represented as a neural network processor NPU 1100. NPU 1100 is mounted on the host CPU (host CPU) as a coprocessor and is assigned tasks by the host CPU. The core of the NPU is arithmetic circuit 1103, which is controlled by controller 1104 to extract matrix data from memory and perform multiplication operations.
[0292] In some implementations, the arithmetic circuit 1103 includes multiple processing units (PEs). In some implementations, the arithmetic circuit 1103 is a two-dimensional systolic array. The arithmetic circuit 1103 may also be a one-dimensional systolic array or other electronic circuitry capable of performing mathematical operations such as multiplication and addition. In some implementations, the arithmetic circuit 1103 is a general-purpose matrix processor.
[0293] For example, assume there are input matrix A, weight matrix B, and output matrix C. The arithmetic circuit retrieves the corresponding data of matrix B from weight memory 1102 and caches it on each PE in the arithmetic circuit. The arithmetic circuit retrieves the data of matrix A from input memory 1101 and performs a matrix operation on matrix B. The partial or final matrix result is stored in accumulator 1108.
[0294] Unified memory 1106 is used to store input and output data. Weight data is directly transferred to weight memory 1102 through the Direct Memory Access Controller (DMAC) 1105. Input data is also transferred to unified memory 1106 through the DMAC.
[0295] BIU stands for Bus Interface Unit, i.e., bus interface unit 1110 , which is used for interaction between the AXI bus, DMAC, and instruction fetch buffer (IFB) 1109 .
[0296] The bus interface unit 1110 (BIU) is used for the instruction fetch memory 1109 to obtain instructions from the external memory, and is also used for the storage unit access controller 1105 to obtain the original data of the input matrix A or the weight matrix B from the external memory.
[0297] DMAC is mainly used to move input data in the external memory DDR to the unified memory 1106 or to move weight data to the weight memory 1102 or to move input data to the input memory 1101.
[0298] The vector calculation unit 1107 includes multiple operation processing units. When necessary, it further processes the output of the operation circuit 1103, such as vector multiplication, vector addition, exponential operation, logarithmic operation, size comparison, etc. It is mainly used for non-convolutional / fully connected layer network calculations in neural networks, such as batch normalization, pixel-level summation, and upsampling of feature planes.
[0299] In some implementations, the vector calculation unit 1107 can store the processed output vector in the unified memory 1106. For example, the vector calculation unit 1107 can apply a linear function or a nonlinear function to the output of the operation circuit 1103, such as linear interpolation of the feature plane extracted by the convolution layer, or accumulate a vector of values to generate an activation value. In some implementations, the vector calculation unit 1107 generates a normalized value, a pixel-level summed value, or both. In some implementations, the processed output vector can be used as an activation input to the operation circuit 1103, for example, for use in subsequent layers in a neural network.
[0300] An instruction fetch buffer 1109 connected to the controller 1104 is used to store instructions used by the controller 1104;
[0301] Unified memory 1106, input memory 1101, weight memory 1102, and instruction fetch memory 1109 are all on-chip memories. External memories are private to the NPU hardware architecture.
[0302] The processor mentioned in any of the above places can be a general-purpose central processing unit, a microprocessor, an ASIC, or one or more integrated circuits for controlling the execution of the above program.
[0303] It should also be noted that the device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separate, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed across multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the present embodiment. In addition, in the drawings of the device embodiments provided in this application, the connection relationship between the modules indicates that there is a communication connection between them, which can be specifically implemented as one or more communication buses or signal lines.
[0304] Through the description of the above embodiments, those skilled in the art can clearly understand that the present application can be implemented by means of software plus necessary general hardware, and of course can also be implemented by special hardware including application-specific integrated circuits, special CPUs, special memories, special components, etc. In general, all functions performed by computer programs can be easily implemented with corresponding hardware, and the specific hardware structures used to implement the same function can also be diverse, such as analog circuits, digital circuits or special circuits, etc. However, for the present application, software program implementation is a better implementation method in most cases. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art can be embodied in the form of a software product, which is stored in a readable storage medium, such as a computer's floppy disk, USB flash drive, mobile hard disk, ROM, RAM, magnetic disk or optical disk, etc., and includes a number of instructions to enable a computer device (which can be a personal computer, training equipment, or network equipment, etc.) to execute the methods described in each embodiment of the present application.
[0305] In the above embodiments, all or part of the embodiments may be implemented by software, hardware, firmware, or any combination thereof. When implemented by software, all or part of the embodiments may be implemented in the form of a computer program product.
[0306] The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from a website, a computer, a training device or a data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode to another website, a computer, a training device or a data center. The computer-readable storage medium can be any available medium that a computer can store or a data storage device such as a training device, a data center, etc. that includes one or more available media integrations. The available medium can be a magnetic medium, (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state drive (SSD)).
Claims
1. A data processing method, characterized in that: The method comprises: Get time series information; The time series information is processed by an encoder to obtain an encoding result; wherein, The encoder includes a target network layer; the target network layer is used to convert the features of the time series information into the frequency domain to obtain spectrum information; the spectrum information includes multiple frequency bands and frequency domain features corresponding to the frequency bands, and according to the frequency domain features, some frequency bands among the multiple frequency bands are selected, and feature extraction is performed on the frequency domain features of the some frequency bands to obtain a processing result, and the processing result is converted to the time domain to obtain a time domain representation, and the time domain representation is used as the encoding result or the encoding result is obtained by feature extraction; According to the encoding result, a task processing result is obtained through the task network.
2. The method according to claim 1, characterized in that The feature extraction is a dot multiplication operation performed on the frequency domain features of the partial frequency band through a kernel.
3. The method according to claim 1 or 2, characterized in that: The frequency domain features include features of multiple dimensions, and extracting features from the frequency domain features of the partial frequency band includes: extracting features from some dimensions of the multiple dimensions in the frequency domain features of the partial frequency band.
4. The method according to any one of claims 1 to 3, characterized in that: The converting the features of the time series information into the frequency domain includes: transforming the features of the time series information in the time domain direction and / or the data dimension direction to convert them into the frequency domain.
5. The method according to any one of claims 1 to 4, characterized in that: The selecting, according to the frequency domain characteristics, some frequency bands among the multiple frequency bands comprises: According to the frequency domain characteristics, the amplitude corresponding to each frequency band is determined, and the N frequency bands with the largest amplitudes or the N frequency bands with the smallest amplitudes among the multiple frequency bands are selected.
6. The method according to any one of claims 1 to 5, characterized in that: The converting the processing result into the time domain comprises: The processing result and corresponding frequency domain features of other frequency bands among the multiple frequency bands except the partial frequency bands are converted into the time domain.
7. The method according to any one of claims 1 to 6, characterized in that: The encoder also includes an embedding layer; The embedding layer includes multiple convolution kernels and a SE attention layer.
8. The method according to any one of claims 1 to 7, characterized in that: The task processing result is a long-term or short-term prediction result of the time series information, an editing result of the time series information, an anomaly detection result of the time series information, or a classification result of the time series information.
9. A data processing method, characterized in that: The method comprises: Get time series information; The time series information is processed by an encoder to obtain an encoding result; wherein, The encoder includes a target network layer; the target network layer is used to convert the features of the time series information into the frequency domain to obtain spectrum information; the spectrum information includes multiple frequency bands and frequency domain features corresponding to the frequency bands, the frequency domain features are processed by a multi-layer perceptron MLP to obtain a processing result, and the processing result is converted to the time domain to obtain a time domain representation, and the time domain representation is used as the encoding result or the encoding result is obtained by feature extraction; According to the encoding result, a task processing result is obtained through the task network.
10. The method according to claim 9, characterized in that The processing of the frequency domain features by a multi-layer perceptron MLP includes: processing the frequency domain features in a frequency band direction and / or a data dimension direction by a multi-layer perceptron MLP.
11. A data processing device, characterized in that: The device comprises: Acquisition module, used to obtain time series information; A processing module is used to process the time series information through an encoder to obtain an encoding result; wherein, The encoder includes a target network layer; the target network layer is used to convert the features of the time series information into the frequency domain to obtain spectrum information; the spectrum information includes multiple frequency bands and frequency domain features corresponding to the frequency bands, and according to the frequency domain features, some frequency bands among the multiple frequency bands are selected, and feature extraction is performed on the frequency domain features of the some frequency bands to obtain a processing result, and the processing result is converted to the time domain to obtain a time domain representation, and the time domain representation is used as the encoding result or the encoding result is obtained by feature extraction; According to the encoding result, a task processing result is obtained through the task network.
12. A data processing device, characterized in that: The device comprises: Acquisition module, used to obtain time series information; A processing module is used to process the time series information through an encoder to obtain an encoding result; wherein, The encoder includes a target network layer; the target network layer is used to convert the features of the time series information into the frequency domain to obtain spectrum information; the spectrum information includes multiple frequency bands and frequency domain features corresponding to the frequency bands, the frequency domain features are processed by a multi-layer perceptron MLP to obtain a processing result, and the processing result is converted to the time domain to obtain a time domain representation, and the time domain representation is used as the encoding result or the encoding result is obtained by feature extraction; According to the encoding result, a task processing result is obtained through the task network.
13. A computer storage medium, characterized in that: The computer storage medium stores one or more instructions which, when executed by one or more computers, cause the one or more computers to perform the operations of the method of any one of claims 1 to 10.
14. A computer program product, characterized in that The method comprises computer-readable instructions, and when the computer-readable instructions are executed on a computer device, the computer device is caused to execute the method according to any one of claims 1 to 10.
15. A system comprising at least one processor and at least one memory; the processor and the memory are connected via a communication bus and communicate with each other; The at least one memory is used to store code; The at least one processor is configured to execute the code to perform the method according to any one of claims 1 to 10.
Citation Information
Patent Citations
Noise suppression method and device and mobile terminal
CN113113039A
Time series data prediction method and device
CN113360848A
Frequency analysis method and system for time sequence prediction
CN116451051A
Data processing method and device
CN117391138A
Computer implemented pre-processing method and system for facilitating machine learning signal classes separability, and, non-transitory computer readable storage medium
US20230214643A1
Cited By
Data distribution method and device, equipment, storage medium and product
CN120891983A
Machine tool operation state prediction method based on edge calculation
CN120949700A