Data processing method and device

By automating the training and adjustment of machine learning models according to their specifications in oil and gas pipeline intrusion detection systems using fiber optic sensing, the problem of difficult false alarm data labeling has been solved, achieving efficient false alarm handling and system transparency.

CN121745334APending Publication Date: 2026-03-27HUAWEI TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-26
Publication Date
2026-03-27

AI Technical Summary

Technical Problem

In oil and gas pipeline intrusion detection systems using fiber optic sensing, labeling false alarm data is difficult and time-consuming, resulting in low efficiency in resolving false alarm issues.

Method used

By acquiring the specifications of machine learning models, model training and parameter tuning are performed based on false positive rate and processing speed. Data is only relabeled when robustness is insufficient, reducing manual intervention and improving processing efficiency.

Benefits of technology

It reduced false alarm levels and processing time, improved system automation and transparency, and reduced the time spent on manual intervention.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121745334A_ABST
    Figure CN121745334A_ABST
Patent Text Reader

Abstract

The invention discloses a data processing method. The method comprises the following steps: acquiring a first specification index of a machine learning model; the first specification index comprises a processing rate or a false alarm rate; when the first specification index does not meet a first preset condition, according to first data, performing model training on the machine learning model, the first data being data that the machine learning model has a false alarm; obtaining a second specification index of the trained machine learning model; the second specification index indicates the robustness of the model; and when the second specification index does not meet a second preset condition, according to second data, performing model training on the trained machine learning model, the second data being data obtained by re-labeling the second data having a false alarm in the machine learning model. According to the invention, the overall processing time can be reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of artificial intelligence, and more particularly to a data processing method and apparatus thereof. Background Technology

[0002] In artificial intelligence (AI) detection systems, false alarms are often difficult to handle because each false alarm requires human verification and feedback to the system. To reduce the false alarm rate, AI detection systems typically employ a continuous learning approach, allowing the AI ​​to constantly learn from the false alarm data generated by the system in specific environments. This enables the AI ​​detection system to achieve a satisfactory false alarm rate or even zero false alarms when encountering similar situations in the future.

[0003] In the field of fiber optic sensing, the problem of false alarms is even more challenging. Take, for example, the application of fiber optic sensing in oil and gas pipeline intrusion detection systems. When the detection system generates an alarm, patrol personnel along the pipeline immediately rush to the location to check for signs of actual intrusion. Because there is a time lag between the intrusion and the patrol personnel's arrival, and because some areas are obscured by vegetation or crops, making traces extremely difficult to find, most false alarms are delayed and uncertain. This presents difficulties for labeling false alarm data. In traditional image detection, for instance, manual judgment of whether a false alarm is a false alarm simply involves checking for matching features in the image, such as scratches, gaps, or protrusions. However, in the field of fiber optic sensing, the data is in the form of fiber optic signals. Patrol personnel cannot simply see the signal and must transmit this "incomprehensible" data to R&D personnel, who then analyze the data using a series of technical methods to determine whether it is a false alarm. As shown in Figure 1, false alarm data is first sent to the R&D and maintenance system, where R&D personnel analyze the data, then review and label the false alarm data; then the labeled data is sent to the false alarm handling system, where R&D personnel either manually adjust the AI ​​model parameters based on experience or trigger AI model training, thus closing the loop on the false alarm problem.

[0004] However, since each false alarm requires R&D personnel to analyze and re-label the data, which is time-consuming, the efficiency of resolving the false alarm problem is low. Summary of the Invention

[0005] In a first aspect, this application provides a data processing method, the method comprising: obtaining a first specification metric of a machine learning model; the first specification metric including processing speed or false alarm rate; when the first specification metric does not meet a first preset condition, training the machine learning model based on first data, wherein the first data is data in which the machine learning model has false alarms; obtaining a second specification metric of the trained machine learning model; the second specification metric indicating the robustness of the model; when the second specification metric does not meet a second preset condition, training the trained machine learning model based on second data, wherein the second data is data obtained by re-labeling the second data in which the machine learning model has false alarms.

[0006] In this embodiment of the application, when a false alarm occurs in the machine learning model, the data is not re-labeled every time (data labeling often requires the participation of R&D personnel and takes a long time). Instead, model training is prioritized when the false recognition rate is high or the processing speed is low, and the data is re-labeled only when the robustness is insufficient, thereby reducing the overall processing time.

[0007] In one possible implementation, when the first specification metric meets the first preset condition, the parameters of the machine learning model are adjusted based on the first data without training the machine learning model, so that the adjusted machine learning model can correctly process the first data.

[0008] When the first specification indicator is qualified, the step of adjusting the parameters of the machine learning model can be completed automatically by the system without the need for manual implementation.

[0009] In one possible implementation, the adjusted machine learning model has a lower false positive rate than the standard machine learning model; the adjusted machine learning model also has a lower processing speed than the standard machine learning model. This approach sacrifices a small amount of detection speed in exchange for a reduction in the false positive rate.

[0010] In one possible implementation, when the second specification metric meets the second preset condition, model calibration is performed based on the trained machine learning model.

[0011] In one possible implementation, obtaining the second specification metric of the trained machine learning model includes: obtaining the second specification metric of the trained machine learning model using a model robustness detection algorithm based on the trained machine learning model.

[0012] In one possible implementation, the method further includes: when training the machine learning model based on the first data, sending first indication information to the client so that the client presents the first indication information, the first indication information being used to indicate that the model is in a training state.

[0013] In one possible implementation, the method further includes: when adjusting the parameters of the machine learning model, sending a second indication message to the client so that the client can present the second indication message, the second indication message being used to indicate that the first specification metric of the model is in an adjustment state; or, after adjusting the parameters of the machine learning model, sending a third indication message to the client so that the client can present the third indication message, the third indication message being used to indicate that the first specification metric of the model has been adjusted.

[0014] In one possible implementation, the method further includes: after obtaining the second specification metric of the trained machine learning model, sending a fourth indication message to the client so that the client can present the fourth indication message, the fourth indication message being used to indicate that the second specification metric of the model has been updated; or, when training the trained machine learning model based on the second data, sending a fifth indication message to the client so that the client can present the fifth indication message, the fifth indication message being used to indicate the relabeling of false positive data.

[0015] In one possible implementation, the method further includes: when performing model calibration based on the trained machine learning model, sending a sixth indication message to the client so that the client presents the sixth indication message, the sixth indication message being used to indicate that the model is in a calibration state.

[0016] This application provides system visualization capabilities, making key indicators transparent and allowing users to perceive the model's status. Compared to existing technologies, it enables customers to see the system's health status, making live network operations and maintenance more transparent and controllable.

[0017] In one possible implementation, the machine learning model is used for intrusion detection based on fiber optic sensing data.

[0018] The embodiments of this application can be applied to any fiber optic sensing and early warning system based on AI technology, and the application scenarios include, but are not limited to, oil and gas pipelines, perimeter security, power cables, earthquake early warning, etc.

[0019] Secondly, this application provides a data processing apparatus, the apparatus comprising:

[0020] The metric determination module is used to obtain a first specification metric of the machine learning model; the first specification metric includes processing rate or false alarm rate; and to obtain a second specification metric of the trained machine learning model; the second specification metric indicates the robustness of the model.

[0021] The model adjustment module is used to train the machine learning model based on first data when the first specification indicator does not meet the first preset condition, wherein the first data is data in which the machine learning model has false positives; and to train the trained machine learning model based on second data when the second specification indicator does not meet the second preset condition, wherein the second data is data obtained by re-labeling the second data in which the machine learning model has false positives.

[0022] In one possible implementation, when the first specification metric meets the first preset condition, the parameters of the machine learning model are adjusted based on the first data without training the machine learning model, so that the adjusted machine learning model can correctly process the first data.

[0023] In one possible implementation, the adjusted machine learning model has a lower false positive rate than the machine learning model itself; and the adjusted machine learning model has a lower processing speed than the machine learning model itself.

[0024] In one possible implementation, when the second specification metric meets the second preset condition, model calibration is performed based on the trained machine learning model.

[0025] In one possible implementation, the indicator determination module is specifically used for:

[0026] Based on the trained machine learning model, a second specification metric of the trained machine learning model is obtained through a model robustness detection algorithm.

[0027] In one possible implementation, the device further includes:

[0028] The transceiver module is used to send a first instruction message to the client when the machine learning model is trained based on the first data, so that the client can present the first instruction message, which is used to indicate that the model is in training state.

[0029] In one possible implementation, the device further includes:

[0030] The transceiver module is configured to send a second indication message to the client when the parameters of the machine learning model are adjusted, so that the client can display the second indication message, which indicates that the first specification metric of the model is in an adjustment state; or...

[0031] After the parameters of the machine learning model are adjusted, a third instruction is sent to the client so that the client can display the third instruction, which indicates that the first specification metric of the model has been adjusted.

[0032] In one possible implementation, the device further includes:

[0033] The transceiver module is configured to, after acquiring the second specification metric of the trained machine learning model, send a fourth indication message to the client, so that the client can display the fourth indication message, which indicates that the second specification metric of the model has been updated; or...

[0034] When training the machine learning model based on the second data, a fifth instruction message is sent to the client so that the client can present the fifth instruction message, which is used to instruct the relabeling of false positive data.

[0035] In one possible implementation, the device further includes:

[0036] The transceiver module is used to send a sixth indication message to the client when performing model calibration based on the trained machine learning model, so that the client can present the sixth indication message, which is used to indicate that the model is in a calibration state.

[0037] In one possible implementation, the machine learning model is used for intrusion detection based on fiber optic sensing data.

[0038] Thirdly, embodiments of this application provide a data processing apparatus, which may include a memory, a processor, and a bus system, wherein the memory is used to store a program, and the processor is used to execute the program in the memory to perform the methods described in the first aspect above and any of its optional methods.

[0039] Fourthly, embodiments of this application provide a computer-readable storage medium storing a computer program that, when run on a computer, causes the computer to perform the methods described in the first aspect and any of its optional methods.

[0040] Fifthly, embodiments of this application provide a computer program that, when run on a computer, causes the computer to perform the first aspect and any of its optional methods described above.

[0041] Sixthly, this application provides a chip system including a processor for supporting an execution device or training device in implementing the functions involved in the foregoing aspects, such as transmitting or processing data involved in the foregoing methods; or, information. In one possible design, the chip system further includes a memory for storing program instructions and data necessary for the execution device or training device. This chip system may be composed of chips or may include chips and other discrete devices. Attached Figure Description

[0042] Figure 1A A structural diagram illustrating the main framework of artificial intelligence;

[0043] Figure 1B Hezhi Figure 2 This is a schematic diagram of the application system framework of the present invention;

[0044] Figure 3 This is a schematic diagram of an optional hardware structure for a terminal.

[0045] Figure 4 This is a schematic diagram of the structure of a server;

[0046] Figure 5 This is a schematic diagram of a system architecture according to this application;

[0047] Figure 6 A process for providing a cloud service;

[0048] Figure 7 A flowchart illustrating a data processing method provided in an embodiment of this application;

[0049] Figure 8 A flowchart illustrating a data processing method provided in an embodiment of this application;

[0050] Figure 9 This is a schematic diagram of an application architecture according to an embodiment of this application;

[0051] Figure 10 A schematic diagram of the structure of a data processing apparatus provided in an embodiment of this application;

[0052] Figure 11 A schematic diagram of the structure of a terminal device provided in an embodiment of this application;

[0053] Figure 12 A schematic diagram of the structure of a server provided in an embodiment of this application;

[0054] Figure 13 This is a schematic diagram of a chip structure provided in an embodiment of this application. Detailed Implementation

[0055] The embodiments of the present invention will now be described with reference to the accompanying drawings. The terminology used in the embodiments section is for illustrative purposes only and is not intended to limit the scope of the invention.

[0056] The embodiments of this application will now be described with reference to the accompanying drawings. Those skilled in the art will recognize that, with technological advancements and the emergence of new scenarios, the technical solutions provided in the embodiments of this application are equally applicable to similar technical problems.

[0057] The terms "first," "second," etc., used in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such terms are interchangeable where appropriate; this is merely a way of distinguishing objects with the same attributes in the embodiments of this application. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion, so that a process, method, system, product, or apparatus that comprises a series of elements is not necessarily limited to those elements, but may include other elements not explicitly listed or inherent to those processes, methods, products, or apparatuses.

[0058] The terms “substantially,” “about,” and similar terms used herein are used as approximations rather than as terms of degree, and are intended to take into account the inherent biases of measurements or calculations known to those skilled in the art. Furthermore, the use of “may” in describing embodiments of the invention refers to “one or more possible embodiments.” The terms “use,” “using,” and “used” used herein are to be considered synonymous with the terms “utilize,” “utilizing,” and “utilized,” respectively. Additionally, the term “exemplary” is intended to refer to an instance or illustration.

[0059] First, the overall workflow of the artificial intelligence system is described; please refer to [link / reference]. Figure 1A , Figure 1AThe diagram illustrates a structural framework for artificial intelligence (AI). The framework is further elaborated below along two dimensions: the "Intelligent Information Chain" (horizontal axis) and the "IT Value Chain" (vertical axis). The "Intelligent Information Chain" reflects a series of processes 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. In this process, data undergoes a condensation process of "data—information—knowledge—wisdom." The "IT Value Chain" reflects the value that AI brings to the information technology industry, from the underlying infrastructure of human intelligence and information (provided and processed through technological means) to the industrial ecosystem of the system.

[0060] (1) Infrastructure

[0061] Infrastructure provides computing power to support artificial intelligence systems, enabling communication with the external world and providing support through a basic platform. This communication occurs through sensors; computing power is provided by intelligent chips (hardware acceleration chips such as CPUs, NPUs, GPUs, ASICs, and FPGAs); and the basic platform includes distributed computing frameworks and related platform guarantees and support, which may include cloud storage and computing, interconnected networks, etc. For example, sensors communicate with the outside world to acquire data, and this data is provided to intelligent chips in the distributed computing system provided by the basic platform for computation.

[0062] (2) Data

[0063] The data at the next layer of infrastructure is used to represent the data sources in the field of artificial intelligence. The data involves graphics, images, voice, text, and IoT data from traditional devices, including business data from existing systems and sensor data such as force, displacement, liquid level, temperature, and humidity.

[0064] (3) Data processing

[0065] Data processing typically includes methods such as data training, machine learning, deep learning, search, reasoning, and decision-making.

[0066] Among them, machine learning and deep learning can perform intelligent information modeling, extraction, preprocessing, and training on data, including symbolization and formalization.

[0067] Reasoning refers to the process in which, in a computer or intelligent system, the machine thinks and solves problems by simulating human intelligent reasoning, based on reasoning control strategies and using formalized information. Typical functions include search and matching.

[0068] Decision-making refers to the process of making decisions based on intelligent information after reasoning, and it typically provides functions such as classification, sorting, and prediction.

[0069] (4) General ability

[0070] After the data processing mentioned above, the results of the data processing can be used to form some general capabilities, such as algorithms or a general system, for example, translation, text analysis, computer vision processing, speech recognition, image recognition, etc.

[0071] (5) Smart Products and Industry Applications

[0072] Intelligent products and industry applications refer to products and applications of artificial intelligence systems in various fields. They are the encapsulation of overall artificial intelligence solutions, productizing intelligent information decision-making and realizing practical applications. Their application areas mainly include: intelligent terminals, intelligent transportation, intelligent healthcare, autonomous driving, smart cities, etc.

[0073] First, we will introduce the application scenarios of this application. This application can be used, but is not limited to, applications with generative artificial intelligence (AIGC) functionality (hereinafter referred to as detection and early warning applications) or cloud services provided by cloud-side servers, etc., which will be introduced separately below:

[0074] I. Detection and Early Warning Applications

[0075] The product form of this application embodiment can be a detection and early warning application. Detection and early warning applications can run on terminal devices or cloud-based servers.

[0076] In one possible implementation, a detection and alert application can perform a detection and alert task based on input data, wherein the detection and alert application can perform the detection and alert task in response to input data (e.g., light sensor data) and obtain a detection and alert result (e.g., intrusion detection result).

[0077] In one possible implementation, a user can open a detection and warning application installed on a terminal device and input data (such as light sensor data). The detection and warning application can detect and issue warnings on the input data using the methods provided in the embodiments of this application, and present the detection and warning results to the user (the presentation method may include, but is not limited to, displaying, saving, uploading to the cloud, etc.).

[0078] In one possible implementation, a user can open a detection and warning application installed on a terminal device and input data. The detection and warning application can send the input data to a cloud-based server. The cloud-based server uses the method provided in this application embodiment to detect and issue warnings on the input data and sends the detection and warning results back to the terminal device. The terminal device can then present the detection and warning results to the user (the presentation method may include, but is not limited to, displaying, saving, or uploading to the cloud).

[0079] The following sections will introduce the detection and early warning application in this application embodiment from the perspectives of functional architecture and product architecture that implements the functions.

[0080] Reference Figure 1B , Figure 1B This is a schematic diagram of the functional architecture of the detection and early warning application in the embodiments of this application:

[0081] In one possible implementation, such as Figure 1B As shown, the detection and warning application 102 can receive input parameters 101 (e.g., containing input data) and generate a detection and warning result 103. The detection and warning application 102 can be executed on at least one computer system (for example) and includes computer code that, when executed by one or more computers, causes the computers to execute a natural language model trained by the method provided in the embodiments of this application.

[0082] Reference Figure 2 , Figure 2 This is a schematic diagram of the entity architecture for running the detection and early warning application in this embodiment of the application:

[0083] See Figure 2 , Figure 2 A schematic diagram of a system architecture is shown. The system may include a terminal 100 and a server 200. The server 200 may include one or more servers (…). Figure 2 (The example includes a server). Server 200 can provide detection and early warning services for one or more terminals.

[0084] The terminal 100 may have a detection and early warning application installed, or a webpage related to detection and early warning opened. The application and webpage can provide an interface. The terminal 100 can receive relevant parameters input by the user on the detection and early warning interface and send the parameters to the server 200. The server 200 can obtain the processing result based on the received parameters and return the processing result to the terminal 100.

[0085] 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 on its own, without the need for the server to cooperate. This application embodiment is not limited to this.

[0086] The following description Figure 2 The product form of the mid-terminal 100;

[0087] The terminal 100 in this application embodiment can be a mobile phone, tablet computer, wearable device, vehicle device, augmented reality (AR) / virtual reality (VR) device, laptop computer, ultra-mobile personal computer (UMPC), netbook, personal digital assistant (PDA), etc., and this application embodiment does not impose any restrictions on it.

[0088] Figure 3 A schematic diagram of an optional hardware structure for terminal 100 is shown.

[0089] refer to Figure 3 As shown, the terminal 100 may include 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, a power supply 190, and other components. Those skilled in the art will understand that... Figure 3 These are merely examples of terminals or multi-functional devices and do not constitute a limitation on terminals or multi-functional devices. They may include more or fewer components than shown in the illustration, or combine certain components, or use different components.

[0090] The input unit 130 can be used to receive input numerical or character information, and to generate key signal inputs related to user settings and function control of the portable multi-functional device. Specifically, the input unit 130 may include a touchscreen 131 (optional) and / or other input devices 132. The touchscreen 131 can collect touch operations performed by the user on or near it (such as operations performed by the user using fingers, knuckles, styluses, or any suitable object on or near the touchscreen), and drive the corresponding connection devices according to a pre-set program. The touchscreen can detect the user's touch actions, convert the touch actions into touch signals and send them to the processor 170, and can receive and execute commands sent by the processor 170; the touch signal includes at least touch point coordinate information. The touchscreen 131 can provide an input interface and an output interface between the terminal 100 and the user. In addition, various types of touchscreens, such as resistive, capacitive, infrared, and surface acoustic wave, can be used to implement the touchscreen. Besides the touchscreen 131, the input unit 130 may also include other input devices. Specifically, other input devices 132 may include, but are not limited to, one or more of the following: physical keyboard, function keys (such as volume control buttons, power buttons, etc.), trackball, mouse, joystick, etc.

[0091] Other input devices 132 can receive input data, etc.

[0092] The display unit 140 can be used to display information input by the user or information provided to the user, various menus of the terminal 100, interactive interfaces, file display, and / or playback of any multimedia file. In this embodiment, the display unit 140 can be used to display the interface of a detection and warning application, generated detection and warning results, etc.

[0093] The memory 120 can be used to store instructions and data. The memory 120 may primarily include an instruction storage area and a data storage area. The data storage area can store various types of data, such as multimedia files and text. The instruction storage area can store software units such as operating systems, applications, and instructions required for at least one function, or subsets or extended sets thereof. It may also include non-volatile random access memory. It provides the processor 170 with hardware, software, and data resources for managing the computing device, supporting control software and applications. It is also used for storing multimedia files, as well as storing running programs and applications.

[0094] The processor 170 is the control center of the terminal 100. It connects various parts of the terminal 100 via various interfaces and lines. By running or executing instructions stored in the memory 120 and calling data stored in the memory 120, it performs various functions and processes data of the terminal 100, thereby controlling the terminal device as a whole. Optionally, the processor 170 may include one or more processing units; preferably, the processor 170 may integrate an application processor and a modem processor, wherein the application processor mainly handles the operating system, user interface, and applications, and the modem processor mainly handles wireless communication. It is understood that the modem processor may not be integrated into the processor 170. In some embodiments, the processor and memory can be implemented on a single chip; in some embodiments, they can also be implemented separately on independent chips. The processor 170 can also be used to generate corresponding operation control signals, send them to the corresponding components of the computing processing device, read and process data in the software, especially read and process data and programs in the memory 120, so that the various functional modules therein perform corresponding functions, thereby controlling the corresponding components to act according to the instructions.

[0095] The memory 120 can be used to store software code related to the data processing method, and 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 the corresponding functions.

[0096] The radio frequency unit 110 (optional) can be used for receiving and transmitting signals during information transmission or calls. For example, it can receive downlink information from the base station and process it for the processor 170; additionally, it can transmit uplink data to the base station. Typically, 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. Furthermore, the radio frequency unit 110 can also communicate wirelessly with network devices and other devices. This wireless communication can use any communication standard or protocol, including but not limited to Global System for 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.

[0097] In this embodiment of the application, the radio frequency unit 110 can send input data to the server 200 and receive detection warning results sent by the server 200.

[0098] It should be understood that the radio frequency unit 110 is optional and can be replaced with other communication interfaces, such as a network port.

[0099] The terminal 100 also includes a power supply 190 (such as a battery) that supplies power to various components. Preferably, the power supply can be logically connected to the processor 170 through a power management system, thereby enabling functions such as charging, discharging, and power consumption management through the power management system.

[0100] Terminal 100 also includes an external interface 180, which can be a standard Micro USB interface or a multi-pin connector, which can be used to connect terminal 100 to other devices for communication or to connect a charger to charge terminal 100.

[0101] Although not shown, terminal 100 may also include a flash, a wireless fidelity (WiFi) module, a Bluetooth module, sensors with various functions, etc., which will not be described in detail here. Some or all of the methods described below can be applied to, for example... Figure 3 In the terminal 100 shown.

[0102] The following description Figure 2 The product form of the mid-range server 200;

[0103] Figure 4 A structural diagram of a server 200 is provided, as follows: Figure 4 As shown, server 200 includes bus 201, processor 202, communication interface 203, and memory 204. Processor 202, memory 204, and communication interface 203 communicate with each other via bus 201.

[0104] Bus 201 can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. Buses can be categorized as address buses, data buses, control buses, etc. For ease of representation, Figure 4 The bus is represented by a single thick line, but this does not mean that there is only one bus or one type of bus.

[0105] The processor 202 can be any one or more of the following processors: central processing unit (CPU), graphics processing unit (GPU), microprocessor (MP), or digital signal processor (DSP).

[0106] Memory 204 may include volatile memory, such as random access memory (RAM). Memory 204 may also include non-volatile memory, such as read-only memory (ROM), flash memory, hard disk drive (HDD), or solid state drive (SSD).

[0107] The memory 204 can be used to store software code related to the data processing method, and the processor 202 can execute the steps of the chip's data processing method, and can also schedule other units to achieve corresponding functions.

[0108] It should be understood that the aforementioned terminal 100 and server 200 can be centralized or distributed devices. The processors (e.g., processor 170 and processor 202) in the aforementioned terminal 100 and server 200 can be hardware circuits (such as application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), general-purpose processors, digital signal processors (DSPs), microprocessors or microcontrollers, etc.) or combinations of these hardware circuits. For example, the processor can be a hardware system with instruction execution capabilities, such as a CPU or DSP, or a hardware system without instruction execution capabilities, such as an ASIC or FPGA, or a combination of the aforementioned hardware systems without instruction execution capabilities and hardware systems with instruction execution capabilities.

[0109] It should be understood that the steps related to the model inference 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 following section will further explain... Figure 5 The system architecture provided in the embodiments of this application will be described in detail.

[0110] Figure 5 This is a schematic diagram of the system architecture provided for an embodiment of this application. Figure 5 As shown, 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.

[0111] The execution device 510 includes a calculation module 511, an I / O interface 512, a preprocessing module 513, and a preprocessing module 514. The calculation module 511 may include a target model / rule 501, while the preprocessing modules 513 and 514 are optional.

[0112] Among them, the execution device 510 can be a terminal device or server that runs the aforementioned detection and early warning application.

[0113] The data acquisition device 560 is used to collect training samples. Training samples can be program files (including program code and program input data), etc. After collecting the training samples, the data acquisition device 560 stores these training samples in the database 530.

[0114] The training device 520 can maintain training samples in the database 530 to obtain the target model / rule 501 from the neural network to be trained.

[0115] It should be noted that in practical applications, the training samples maintained in database 530 may not all come from the data acquisition device 560; they may also be received from other devices. Furthermore, it should be noted that training device 520 may not necessarily train the target model / rule 501 entirely based on the training samples maintained in database 530; it may also obtain training samples from the cloud or other sources for model training. The above description should not be construed as limiting the embodiments of this application.

[0116] The target model / rule 501 trained using training device 520 can be applied to different systems or devices, such as... Figure 5 The execution device 510 shown can be a terminal, such as a mobile phone terminal, tablet computer, laptop computer, augmented reality (AR) / virtual reality (VR) device, vehicle terminal, etc., or it can be a server, etc.

[0117] Specifically, the training device 520 can transfer the trained model to the execution device 510.

[0118] exist Figure 5 In the execution device 510, an input / output (I / O) interface 512 is configured for data interaction with external devices. Users can input data to the I / O interface 512 through the client device 540 (e.g., input data in the embodiment of this application).

[0119] Preprocessing modules 513 and 514 are used to preprocess the input data received from the I / O interface 512. It should be understood that preprocessing modules 513 and 514 may be absent, or only one preprocessing module may be used. When preprocessing modules 513 and 514 are absent, the calculation module 511 can be used directly to process the input data.

[0120] During the preprocessing of input data by the execution device 510, or during the calculation module 511 of the execution device 510 performing calculations and other related processes, the execution device 510 can call data, code, etc. in the data storage system 550 for corresponding processing, or store the data, instructions, etc. obtained from the corresponding processing into the data storage system 550.

[0121] Finally, the I / O interface 512 provides the processing results (such as detection and warning results) to the client device 540, thereby providing them to the user.

[0122] exist Figure 5In the illustrated scenario, the user can manually provide input data, which can be done through the interface provided by I / O interface 512. Alternatively, the client device 540 can automatically send input data to I / O interface 512. If user authorization is required for the client device 540 to automatically send input data, the user can set the corresponding permissions in the client device 540. The user can view the output results of the execution device 510 on the client device 540, which can be presented in various forms such as display, sound, or animation. The client device 540 can also act as a data acquisition terminal, collecting the input data and output results of the input I / O interface 512 as shown in the figure, and storing them as new sample data in database 530. Alternatively, data can be collected directly from the I / O interface 512 without going through the client device 540, using the input data and output results of the input I / O interface 512 as shown in the figure, and storing them as new sample data in database 530.

[0123] It is worth noting that, Figure 5 This is merely a schematic diagram of a system architecture provided in an embodiment of this application. The positional relationships between the devices, components, modules, etc., shown in the diagram do not constitute any limitation. For example, in Figure 5 In this context, the data storage system 550 is an external storage device relative to the execution device 510. However, in other cases, the data storage system 550 may also be placed within the execution device 510. It should be understood that the aforementioned execution device 510 may be deployed within the client device 540.

[0124] From the inference side of the model:

[0125] In this embodiment, the computing module 511 of the 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 this embodiment.

[0126] In this embodiment of the application, the computing module 511 of the execution device 510 may include hardware circuits (such as application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), general-purpose processors, digital signal processors (DSPs), microprocessors or microcontrollers, etc.) or combinations of these hardware circuits. For example, the training device 520 may be a hardware system with instruction execution capabilities, such as a CPU or DSP, or a hardware system without instruction execution capabilities, such as an ASIC or FPGA, or a combination of the aforementioned hardware systems without instruction execution capabilities and hardware systems with instruction execution capabilities.

[0127] Specifically, the computing module 511 of the execution device 510 can be a hardware system with the function of executing instructions. The steps related to the model inference process provided in this application embodiment can be software code 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 inference process provided in this application embodiment.

[0128] It should be understood that the computing module 511 of the execution device 510 can be a combination of a hardware system without the function of executing instructions and a hardware system with the function of executing instructions. Some steps related to the model reasoning process provided in the embodiments of this application can also be implemented by the hardware system in the computing module 511 of the execution device 510 without the function of executing instructions, which is not limited here.

[0129] From the training side of the model:

[0130] In this embodiment of the application, the training device 520 can access the memory ( Figure 5 (Not shown in the diagram, but can be integrated into the training device 520 or deployed separately from the training device 520) The code stored in the diagram can be used to implement the steps related to model training in the embodiments of this application.

[0131] In this embodiment of the application, the training device 520 may include hardware circuits (such as application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), general-purpose processors, digital signal processors (DSPs), microprocessors or microcontrollers, etc.) or combinations of these hardware circuits. For example, the training device 520 may be a hardware system with instruction execution capabilities, such as a CPU or DSP, or a hardware system without instruction execution capabilities, such as an ASIC or FPGA, or a combination of the aforementioned hardware systems without instruction execution capabilities and hardware systems with instruction execution capabilities.

[0132] It should be understood that the training device 520 can be a combination of a hardware system without the function of executing instructions and a hardware system with the function of executing instructions. Some steps related to the training of the neutralization model provided in the embodiments of this application can also be implemented by the hardware system in the training device 520 without the function of executing instructions, which is not limited here.

[0133] II. Cloud services for detection and early warning provided by the server:

[0134] In one possible implementation, the server can provide detection and early warning services to the client side through an application programming interface (API).

[0135] In this process, the terminal device can send relevant parameters (such as input data) to the server through the API provided by the cloud. The server can obtain the processing result (such as detection and warning results) based on the received parameters and return the processing result to the terminal.

[0136] The descriptions of the terminal and server are the same as those in the above embodiments, and will not be repeated here.

[0137] like Figure 6 The process of using a cloud service for detection and early warning provided by a cloud platform is shown.

[0138] 1. Activate and purchase detection and early warning services.

[0139] 2. Users can download the software development kit (SDK) corresponding to the detection and early warning service. Cloud platforms usually provide multiple development versions of the SDK for users to choose from according to their development environment needs, such as JAVA version SDK, Python version SDK, PHP version SDK, Android version SDK, etc.

[0140] 3. After downloading the corresponding version of the SDK to their local machine according to their needs, users can import the SDK project into their local development environment, configure and debug it in the local development environment, and develop other functions in the local development environment to form an application that integrates detection and early warning capabilities.

[0141] 4. When a detection and alerting application is in use, it can trigger an API call for detection and alerting when needed. When an application triggers a detection and alert, it initiates an API request to the running instance of the detection and alerting service in the cloud environment. The API request carries input data, which is processed by the running instance in the cloud environment to obtain the processing result (such as the detection and alert result).

[0142] 5. The cloud environment returns the processing results to the application, thus completing a detection and early warning service call.

[0143] In addition to applications and cloud services, the implementation of this application can also be in a large-scale application SDK.

[0144] Since the embodiments of this application involve a large number of neural network applications, for ease of understanding, the relevant terms and concepts such as neural networks involved in the embodiments of this application will be introduced below.

[0145] (1) Neural Network

[0146] A neural network can be composed of neural units, which can be defined as a computational unit that takes xs (i.e., input data) and an intercept of 1 as input. The output of this computational unit can be:

[0147]

[0148] Where s = 1, 2, ..., n, where 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, used to introduce nonlinear characteristics into the neural network to convert the input signal in the neural unit into an output signal. The output signal of this activation function can be used as the input of the next convolutional layer, and the activation function can be the sigmoid function. A neural network is a network formed by connecting multiple of the above-mentioned individual neural units together, 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, which can be a region composed of several neural units.

[0149] (2) Backpropagation algorithm

[0150] Convolutional neural networks can employ backpropagation (BP) to correct the parameters in the initial super-resolution model during training, thereby reducing the reconstruction error loss. Specifically, forward propagation of the input signal to the output generates an error loss; this error loss information is then propagated back to update the parameters in the initial super-resolution model, leading to convergence of the error loss. The backpropagation algorithm is an error-loss-driven backpropagation process aimed at obtaining the optimal parameters of the super-resolution model, such as the weight matrix.

[0151] (3) Loss Function

[0152] In training a deep neural network, to ensure the output closely approximates the desired predicted value, we compare the network's prediction with the target value. Based on the difference, we update the weight vector of each layer (usually pre-configuring parameters before the initial update). For example, if the prediction is too high, the weight vector is adjusted to predict a lower value. This adjustment continues until the deep neural network predicts the target value or a value very close to it. Therefore, we need to predefine "how to compare the difference between the predicted and target values," which is the loss function or objective function. These are important equations used to measure the difference between the predicted and target values. Taking the loss function as an example, a higher output value (loss) indicates a greater difference, and training the deep neural network becomes a process of minimizing this loss.

[0153] (4) False alarm: In a detection and early warning system with AI capabilities, when the AI ​​gives a positive prediction result, the system generates an alarm. However, after manual confirmation, it is found that the detected object has not performed the behavior or trace corresponding to the alarm. This phenomenon is called false alarm.

[0154] (5) Product specifications: In a detection and early warning system with AI capabilities, there are generally two product specifications. One is detection speed, which refers to the time from when the detected object takes action or has characteristics to when the system generates an alarm; the other is false alarm level, which refers to the number of false alarms generated by the system within a specified time.

[0155] (6) Model robustness: also known as model anti-interference ability, refers to the ability of AI model to maintain the stability of prediction results when the environment in which the system is located changes or when the data labels used for training are biased.

[0156] (7) Data poisoning: When AI models learn training data, there are often cases of incorrect labeling. As the proportion of data with incorrect labels learned by the model increases, the model's detection ability will decrease accordingly, eventually deteriorating to the point of being unusable.

[0157] In AI detection systems, false alarms are often difficult to handle because each false alarm requires manual confirmation and feedback to the system. To reduce the false alarm rate, AI detection systems typically employ a continuous learning approach, allowing the AI ​​to constantly learn from the false alarm data generated by the system in specific environments. This enables the AI ​​detection system to achieve a false alarm rate that satisfies users or even zero false alarms when encountering similar situations in the future.

[0158] In the field of fiber optic sensing, the problem of false alarms is even more challenging. Take, for example, the application of fiber optic sensing in oil and gas pipeline intrusion detection systems. When the detection system generates an alarm, patrol personnel along the pipeline immediately rush to the location to check for signs of actual intrusion. Because there is a time lag between the intrusion and the patrol personnel's arrival, and because some areas are obscured by vegetation or crops, making traces extremely difficult to find, most false alarms are delayed and uncertain. This presents difficulties for labeling false alarm data. In traditional image detection, for instance, manual judgment of whether a false alarm is a false alarm simply involves checking for matching features in the image, such as scratches, gaps, or protrusions. However, in the field of fiber optic sensing, the data is in the form of fiber optic signals. Patrol personnel cannot simply see the signal and must transmit this "incomprehensible" data to R&D personnel, who then analyze the data using a series of technical methods to determine whether it is a false alarm. As shown in Figure 1, false alarm data is first sent to the R&D and maintenance system, where R&D personnel analyze the data, then review and label the false alarm data; then the labeled data is sent to the false alarm handling system, where R&D personnel either manually adjust the AI ​​model parameters based on experience or trigger AI model training, thus closing the loop on the false alarm problem.

[0159] However, because each false alarm requires developers to analyze and relabel the data, which is time-consuming, the efficiency of resolving false alarm issues is low. Furthermore, the operations and maintenance system lacks monitoring of key metrics, making it impossible for users to perceive the current status of the model.

[0160] To address the aforementioned problems, embodiments of this application provide a data processing method. The model training method of this application embodiment will be described in detail below with reference to the accompanying drawings.

[0161] Reference Figure 7 , Figure 7 This is a flowchart illustrating a data processing method provided in an embodiment of this application, such as... Figure 7 As shown in the figure, the data processing method provided in this application embodiment may include steps 701 to 704, which are described in detail below.

[0162] 701. Obtain the first specification metric of the machine learning model; the first specification metric includes processing speed or false positive rate;

[0163] In one possible implementation, the machine learning model is used for intrusion detection based on fiber optic sensing data.

[0164] The embodiments of this application can be applied to any fiber optic sensing and early warning system based on AI technology, and the application scenarios include, but are not limited to, oil and gas pipelines, perimeter security, power cables, earthquake early warning, etc.

[0165] 702. When the first specification indicator does not meet the first preset condition, the machine learning model is trained based on the first data, wherein the first data is the data in which the machine learning model has false alarms;

[0166] In one possible implementation, when the first specification metric meets the first preset condition, the parameters of the machine learning model are adjusted based on the first data without training the machine learning model, so that the adjusted machine learning model can correctly process the first data.

[0167] In one possible implementation, the adjusted machine learning model has a lower false positive rate than the machine learning model itself; and the adjusted machine learning model has a lower processing speed than the machine learning model itself.

[0168] In one possible implementation, when the machine learning model is trained based on the first data, a first instruction message may be sent to the client so that the client can present the first instruction message, which is used to indicate that the model is in training state.

[0169] In one possible implementation, when the parameters of the machine learning model are adjusted, a second instruction message may be sent to the client so that the client can present the second instruction message, which indicates that the first specification metric of the model is in an adjustment state.

[0170] In one possible implementation, after the parameters of the machine learning model are adjusted, a third instruction message may be sent to the client so that the client can present the third instruction message, which indicates that the first specification metric of the model has been adjusted.

[0171] The client can use a visualization module to present the content indicated by the instruction information.

[0172] Taking intrusion detection as an example, when the product specification indicators in the system visualization module are normal (normal means that the detection speed and false alarm level meet the product specification indicators given in the product manual; otherwise, it is abnormal), false alarm data such as those from agricultural machinery and cross-traffic vehicles will be input into the automatic specification adjustment module (at this time, the visualization module will display "Product specifications are being automatically adjusted..."). This module will compare the false alarm data with historical data from oil and gas pipelines, automatically adjust the product specifications, sacrifice a little detection speed to reduce the false alarm level, and synchronously update the product specifications in the system visualization module (at this time, the visualization module will display "Product specifications have been updated"). In this way, the short-term false alarm problem in the live network can be closed in a highly efficient and fully automated manner.

[0173] 703. Obtain the second specification metric of the trained machine learning model; the second specification metric indicates the robustness of the model;

[0174] In one possible implementation, a second specification metric of the trained machine learning model can also be obtained based on the trained machine learning model using a model robustness detection algorithm.

[0175] In one possible implementation, after obtaining the second specification metric of the trained machine learning model, a fourth indication message may be sent to the client so that the client can present the fourth indication message, which indicates that the second specification metric of the model has been updated.

[0176] 704. When the second specification indicator does not meet the second preset condition, the trained machine learning model is trained according to the second data, wherein the second data is the data obtained by re-labeling the second data in which the machine learning model has false alarms.

[0177] Take intrusion detection as an example. After the system has been running for a period of time (e.g., about 3-6 months), the number of automatic specification adjustments increases, and the product specification indicators in the system visualization module will gradually change from normal to abnormal. At this time, the system will automatically trigger the model upgrade process (the visualization module will display "AI model training in progress..."). The accumulated false alarm data such as farm machinery and cross-traffic jamming, the non-false alarm data collected from the current network, and the historical data of oil and gas pipelines are all input into the automatic anti-interference model upgrade module. The new model obtained by the AI ​​model after training will be input into the model robustness detection algorithm. The model robustness index output by the algorithm will be updated to the system visualization module in sync (the visualization module will display "Model robustness updated"). Because the inspection results of false alarms in oil and gas pipelines have lag and uncertainty, and the labeling results of false alarm data such as farm machinery and cross-traffic jamming are unreliable, the anti-interference model upgrade module will provide certain anti-interference strategies to prevent data poisoning. Therefore, the robustness of the AI ​​model trained at this stage is generally qualified (qualified means that the model robustness index can be higher than the preset percentage threshold).

[0178] In one possible implementation, when the second specification metric meets the second preset condition, model calibration is performed based on the trained machine learning model.

[0179] In this embodiment of the application, when a false alarm occurs in the machine learning model, the data is not re-labeled every time (data labeling often requires the participation of R&D personnel and takes a long time). Instead, model training is prioritized when the false recognition rate is high or the processing speed is low, and the data is re-labeled only when the robustness is insufficient, thereby reducing the overall processing time.

[0180] In one possible implementation, a sixth indication message may be sent to the client during the model calibration process based on the trained machine learning model, so that the client can present the sixth indication message, which is used to indicate that the model is in a calibration state.

[0181] Taking intrusion detection as an example, when the robustness index of the model in the system visualization module is qualified, the new model obtained by the anti-interference model upgrade module will be input into the model parameter calibration module (at this time, the visualization module will display "Model parameter calibration in progress..."). Based on the historical data of oil and gas pipelines, the parameters of the new model are recalibrated and the product specifications are updated synchronously (at this time, the visualization module will display "Product specifications have been updated"). At this time, the false alarm problem in the live network in the medium term can also be closed in a fully automated manner.

[0182] In one possible implementation, when training the trained machine learning model based on the second data, a fifth instruction message may be sent to the client so that the client can present the fifth instruction message, which is used to instruct the relabeling of false positive data.

[0183] After the system has been running for a long time (e.g., about 6+ months), as the impact of data poisoning becomes more severe, the robustness of the new model trained by the anti-interference model upgrade module will decrease. The robustness index in the system visualization module will gradually change from qualified to unqualified. At this time, the system will trigger the data labeling process (at this time, the visualization module will display "False alarm data relabeling..."). The R&D personnel will relabel the false alarm data, and then repeat the anti-interference model upgrade and model parameter calibration. After eliminating the impact of data poisoning, the high robustness of the AI ​​model is guaranteed. At this time, the long-term false alarm problem in the live network can also be closed efficiently and semi-automatically.

[0184] Reference Figure 8 , Figure 8 This is a flowchart illustrating an embodiment of this application.

[0185] Furthermore, this application provides system visualization capabilities, making key indicators transparent and allowing users to perceive the model's status. Compared to existing technologies, this enables customers to see the system's health status, making live network operations and maintenance more transparent and controllable.

[0186] The following section uses a fiber optic sensing operation and maintenance system as an example to illustrate a schematic representation of an embodiment of this application, combined with its software architecture. (Refer to...) Figure 9 ,include:

[0187] System visualization module: This module calculates and visualizes two key system indicators based on historical data: product specifications and model robustness. By monitoring key indicators in real time, it automatically triggers the subsequent three modules to achieve system self-upgrade and visualizes the entire operation and maintenance process (e.g., "Product specifications are being automatically adjusted...").

[0188] Automatic Specification Adjustment Module: This module automatically adjusts product specifications within the acceptable range by comparing false alarm data with historical data. It sacrifices a little detection speed to reduce the false alarm level, achieving the goal of efficiently and automatically solving the false alarm problem in the current network. The adjusted product specifications will be updated to the visual interface simultaneously.

[0189] Anti-interference model upgrade module: This module allows the AI ​​model to learn from the injected false alarm data and provides certain anti-interference strategies to prevent data poisoning, making the new model after training highly robust, and triggering synchronous updates of model robustness.

[0190] Model parameter calibration module: This module will recalibrate the parameters of the newly trained model based on historical data, and at the same time trigger the synchronous update of product specifications.

[0191] Reference Figure 10 , Figure 10 This is a schematic diagram of the structure of a data processing apparatus provided in an embodiment of this application, such as... Figure 13 As shown in the figure, an embodiment of this application provides a data processing apparatus 1000, comprising:

[0192] The metric determination module 1001 is used to obtain a first specification metric of the machine learning model; the first specification metric includes processing rate or false alarm rate; and to obtain a second specification metric of the trained machine learning model; the second specification metric indicates the robustness of the model.

[0193] The specific description of the indicator determination module 1001 can be found in the description of steps 701 and 703 in the above embodiments, and the similarities will not be repeated here.

[0194] The model adjustment module 1002 is used to train the machine learning model based on first data when the first specification indicator does not meet the first preset condition, wherein the first data is data in which the machine learning model has false alarms; and to train the trained machine learning model based on second data when the second specification indicator does not meet the second preset condition, wherein the second data is data obtained by re-labeling the second data in which the machine learning model has false alarms.

[0195] The specific description of the model adjustment module 1002 can be found in the descriptions of steps 702 and 704 in the above embodiments, and the similarities will not be repeated here.

[0196] In one possible implementation, when the first specification metric meets the first preset condition, the parameters of the machine learning model are adjusted based on the first data without training the machine learning model, so that the adjusted machine learning model can correctly process the first data.

[0197] In one possible implementation, the adjusted machine learning model has a lower false positive rate than the machine learning model itself; and the adjusted machine learning model has a lower processing speed than the machine learning model itself.

[0198] In one possible implementation, when the second specification metric meets the second preset condition, model calibration is performed based on the trained machine learning model.

[0199] In one possible implementation, the indicator determination module is specifically used for:

[0200] Based on the trained machine learning model, a second specification metric of the trained machine learning model is obtained through a model robustness detection algorithm.

[0201] In one possible implementation, the device further includes:

[0202] The transceiver module is used to send a first instruction message to the client when the machine learning model is trained based on the first data, so that the client can present the first instruction message, which is used to indicate that the model is in training state.

[0203] In one possible implementation, the device further includes:

[0204] The transceiver module is configured to send a second indication message to the client when the parameters of the machine learning model are adjusted, so that the client can display the second indication message, which indicates that the first specification metric of the model is in an adjustment state; or...

[0205] After the parameters of the machine learning model are adjusted, a third instruction is sent to the client so that the client can display the third instruction, which indicates that the first specification metric of the model has been adjusted.

[0206] In one possible implementation, the device further includes:

[0207] The transceiver module is configured to, after acquiring the second specification metric of the trained machine learning model, send a fourth indication message to the client, so that the client can display the fourth indication message, which indicates that the second specification metric of the model has been updated; or...

[0208] When training the machine learning model based on the second data, a fifth instruction message is sent to the client so that the client can present the fifth instruction message, which is used to instruct the relabeling of false positive data.

[0209] In one possible implementation, the device further includes:

[0210] The transceiver module is used to send a sixth indication message to the client when performing model calibration based on the trained machine learning model, so that the client can present the sixth indication message, which is used to indicate that the model is in a calibration state.

[0211] In one possible implementation, the machine learning model is used for intrusion detection based on fiber optic sensing data.

[0212] The following describes an execution device provided in an embodiment of this application. Please refer to [link / reference]. Figure 11 , Figure 11 This is a schematic diagram of an execution device provided in an embodiment of this application. Specifically, the execution device 1100 includes: a receiver 1101, a transmitter 1102, a processor 1103, and a memory 1104 (wherein the execution device 1100 may have one or more processors 1103). Figure 11 (Taking a processor as an example), processor 1103 may include application processor 11031 and communication processor 11032. In some embodiments of this application, receiver 1101, transmitter 1102, processor 1103 and memory 1104 may be connected via bus or other means.

[0213] Memory 1104 may include read-only memory and random access memory, and provides instructions and data to processor 1103. A portion of memory 1104 may also include non-volatile random access memory (NVRAM). Memory 1104 stores processor and operation instructions, executable modules, or data structures, or subsets thereof, or extended sets thereof, wherein the operation instructions may include various operation instructions for implementing various operations.

[0214] Processor 1103 controls the operation of the execution device. In specific applications, the various components of the execution device are coupled together through a bus system, which may include not only the data bus, but also power buses, control buses, and status signal buses. However, for clarity, all buses are referred to as the bus system in the diagram.

[0215] The methods disclosed in the embodiments of this application can be applied to or implemented by the processor 1103. The processor 1103 can be an integrated circuit chip with signal processing capabilities. During implementation, each step of the above method can be completed by the integrated logic circuits in the hardware of the processor 1103 or by instructions in software form. The processor 1103 can be a general-purpose processor, a digital signal processor (DSP), a microprocessor, or a microcontroller, and may 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 1103 can implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of this application. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the methods disclosed in the embodiments of this application can be directly embodied in the execution of a hardware decoding processor, or executed by a combination of hardware and software modules in the decoding processor. The software module can reside in a mature storage medium in the field, 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 1104. Processor 1103 reads the information from memory 1104 and, in conjunction with its hardware, completes the steps involved in the model inference process described above.

[0216] Receiver 1101 can be used to receive input digital or character information, and to generate signal inputs related to the settings and function control of the execution device. Transmitter 1102 can be used to output digital or character information through the first interface; transmitter 1102 can also be used to send instructions to the disk group through the first interface to modify the data in the disk group; transmitter 1102 may also include a display device such as a display screen.

[0217] This application also provides a server; please refer to [link / reference]. Figure 12 , Figure 12This is a schematic diagram of a server structure provided in an embodiment of this application. Specifically, server 1200 is implemented by one or more servers. Server 1200 can vary significantly due to different configurations or performance. It may include one or more central processing units (CPUs) 1212 (e.g., one or more processors) and memory 1232, and one or more storage media 1230 (e.g., one or more mass storage devices) for storing application programs 1242 or data 1244. The memory 1232 and storage media 1230 can be temporary or persistent storage. The program stored in storage media 1230 may include one or more modules (not shown in the diagram), each module may include a series of instruction operations on the server. Furthermore, the CPU 1212 may be configured to communicate with storage media 1230 and execute the series of instruction operations in storage media 1230 on server 1200.

[0218] Server 1200 may also include one or more power supplies 1226, one or more wired or wireless network interfaces 1250, one or more input / output interfaces 1258; or, one or more operating systems 1241, such as Windows Server™, Mac OS X™, Unix™, Linux™, FreeBSD™, etc.

[0219] In this embodiment, the central processing unit 1212 is used to execute the data processing method described in the above embodiment.

[0220] This application also provides a computer program product that, when run on a computer, causes the computer to perform steps as performed by the aforementioned execution device, or causes the computer to perform steps as performed by the aforementioned training device.

[0221] This application also provides a computer-readable storage medium storing a program for signal processing, which, when run on a computer, causes the computer to perform steps as performed by the aforementioned execution device, or causes the computer to perform steps as performed by the aforementioned training device.

[0222] The execution device, training device, or terminal device provided in this application embodiment can specifically be a chip. 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, pins, or circuits. The processing unit can execute computer execution instructions stored in the storage unit to cause the chip within the execution device to execute the data processing method described in the above embodiments, or to cause the chip within the training device to execute the data processing method described in the above embodiments. Optionally, the storage unit can be a storage unit within the chip, such as a register or cache. Alternatively, the storage unit can be a storage unit located outside the chip within the wireless access device, such as a read-only memory (ROM) or other types of static storage devices capable of storing static information and instructions, such as random access memory (RAM).

[0223] For details, please refer to Figure 13 , Figure 13 This is a schematic diagram of a chip provided in an embodiment of this application. The chip can be represented as a neural network processor (NPU) 1300. The NPU 1300 is mounted as a coprocessor on the host CPU, and tasks are assigned by the host CPU. The core part of the NPU is the arithmetic circuit 1303, which is controlled by the controller 1304 to extract matrix data from the memory and perform multiplication operations.

[0224] In some implementations, the arithmetic circuit 1303 internally includes multiple processing engines (PEs). In some implementations, the arithmetic circuit 1303 is a two-dimensional pulsating array. The arithmetic circuit 1303 can also be a one-dimensional pulsating array or other electronic circuits capable of performing mathematical operations such as multiplication and addition. In some implementations, the arithmetic circuit 1303 is a general-purpose matrix processor.

[0225] For example, suppose we have an input matrix A, a weight matrix B, and an output matrix C. The arithmetic circuit retrieves the corresponding data of matrix B from the weight memory 1302 and caches it in each PE of the arithmetic circuit. The arithmetic circuit retrieves the data of matrix A from the input memory 1301 and performs matrix operations with matrix B. The partial result or the final result of the obtained matrix is ​​stored in the accumulator 1308.

[0226] Unified memory 1306 is used to store input and output data. Weight data is directly transferred to weight memory 1302 via Direct Memory Access Controller (DMAC) 1305. Input data is also transferred to unified memory 1306 via DMAC.

[0227] BIU stands for Bus Interface Unit, which is used for interaction between the AXI bus and the DMAC and the Instruction Fetch Buffer (IFB) 1309.

[0228] The Bus Interface Unit (BIU) 1310 is used by the instruction fetch memory 1309 to fetch instructions from external memory, and also by the memory access controller 1305 to fetch the original data of the input matrix A or the weight matrix B from external memory.

[0229] The DMAC is mainly used to move input data from external memory DDR to unified memory 1306, or to weight data to weight memory 1302, or to input data to input memory 1301.

[0230] The vector computation unit 1307 includes multiple processing units that further process the output of the computation circuit 1303 when needed, such as vector multiplication, vector addition, exponential operations, logarithmic operations, size comparisons, etc. It is mainly used for computation in non-convolutional / fully connected layers of neural networks, such as Batch Normalization, pixel-level summation, and upsampling of feature planes.

[0231] In some implementations, the vector computation unit 1307 can store the processed output vector in the unified memory 1306. For example, the vector computation unit 1307 can apply a linear function, or a nonlinear function, to the output of the computation circuit 1303, such as performing linear interpolation on the feature planes extracted by the convolutional layer, or, for example, accumulating a vector of values ​​to generate activation values. In some implementations, the vector computation unit 1307 generates normalized values, pixel-level summed values, or both. In some implementations, the processed output vector can be used as an activation input to the computation circuit 1303, for example, for use in subsequent layers of the neural network.

[0232] The instruction fetch buffer 1309 connected to the controller 1304 is used to store the instructions used by the controller 1304;

[0233] Unified memory 1306, input memory 1301, weighted memory 1302, and instruction fetch memory 1309 are all on-chip memories. External memory is proprietary to this NPU hardware architecture.

[0234] The processor mentioned above can be a general-purpose central processing unit, a microprocessor, an ASIC, or one or more integrated circuits used to control the execution of the above program.

[0235] It should also be noted that the device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. In addition, in the device embodiment drawings provided in this application, the connection relationship between modules indicates that they have a communication connection, which can be implemented as one or more communication buses or signal lines.

[0236] Through the above description of the embodiments, those skilled in the art can clearly understand that this application can be implemented by means of software plus necessary general-purpose hardware, or it can be implemented by special-purpose hardware including application-specific integrated circuits, special-purpose CPUs, special-purpose memory, special-purpose components, etc. Generally, any function performed by a computer program can be easily implemented by corresponding hardware, and the specific hardware structure used to implement the same function can also be diverse, such as analog circuits, digital circuits, or special-purpose circuits. However, for this application, software program implementation is more often the preferred implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a readable storage medium, such as a computer floppy disk, USB flash drive, mobile hard disk, ROM, RAM, magnetic disk, or optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, training equipment, or network device, etc.) to execute the methods described in the various embodiments of this application.

[0237] In the above embodiments, implementation can be achieved, in whole or in part, through software, hardware, firmware, or any combination thereof. When implemented in software, it can be implemented, in whole or in part, as a computer program product.

[0238] The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of this application are generated. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions may be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions may be transmitted from one website, computer, training device, or data center to another website, computer, training device, or data center via wired (e.g., coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium may be any available medium that a computer can store or a data storage device such as a training device or data center that integrates one or more available media. The available media may be magnetic media (e.g., floppy disks, hard disks, magnetic tapes), optical media (e.g., DVDs), or semiconductor media (e.g., solid-state drives (SSDs)).

Claims

1. A data processing method, characterized in that, The method includes: Obtain the first specification metric of the machine learning model; the first specification metric includes either processing speed or false alarm rate. When the first specification indicator does not meet the first preset condition, the machine learning model is trained based on the first data, wherein the first data is the data in which the machine learning model has false alarms. Obtain a second specification metric for the trained machine learning model; the second specification metric indicates the robustness of the model. When the second specification indicator does not meet the second preset condition, the trained machine learning model is trained according to the second data, which is the data obtained by re-labeling the second data in which the machine learning model has false alarms.

2. The method according to claim 1, characterized in that, When the first specification indicator meets the first preset condition, the parameters of the machine learning model are adjusted based on the first data without training the machine learning model, so that the adjusted machine learning model can correctly process the first data.

3. The method according to claim 1 or 2, characterized in that, The adjusted machine learning model has a lower false positive rate than the machine learning model itself; the adjusted machine learning model also has a lower processing speed than the machine learning model itself.

4. The method according to any one of claims 1 to 3, characterized in that, When the second specification indicator meets the second preset condition, the model is calibrated according to the trained machine learning model.

5. The method according to any one of claims 1 to 4, characterized in that, The process of obtaining the second specification metric of the trained machine learning model includes: Based on the trained machine learning model, a second specification metric of the trained machine learning model is obtained through a model robustness detection algorithm.

6. The method according to any one of claims 1 to 5, characterized in that, The method further includes: When training the machine learning model based on the first data, a first instruction message is sent to the client so that the client can display the first instruction message, which is used to indicate that the model is in training state.

7. The method according to any one of claims 2 to 6, characterized in that, The method further includes: When adjusting the parameters of the machine learning model, a second instruction is sent to the client so that the client can display the second instruction, which indicates that the first specification metric of the model is in an adjustment state; or... After the parameters of the machine learning model are adjusted, a third instruction is sent to the client so that the client can display the third instruction, which indicates that the first specification metric of the model has been adjusted.

8. The method according to any one of claims 1 to 7, characterized in that, The method further includes: After obtaining the second specification metric of the trained machine learning model, a fourth indication message is sent to the client so that the client can display the fourth indication message, which indicates that the second specification metric of the model has been updated; or... When training the machine learning model based on the second data, a fifth instruction message is sent to the client so that the client can present the fifth instruction message, which is used to instruct the relabeling of false positive data.

9. The method according to any one of claims 4 to 8, characterized in that, The method further includes: When performing model calibration based on the trained machine learning model, a sixth instruction message is sent to the client so that the client can present the sixth instruction message, which is used to indicate that the model is in a calibration state.

10. The method according to any one of claims 1 to 9, characterized in that, The machine learning model is used for intrusion detection based on fiber optic sensing data.

11. A data processing apparatus, characterized in that, The device includes: The metric determination module is used to obtain a first specification metric of the machine learning model; the first specification metric includes processing rate or false alarm rate; and to obtain a second specification metric of the trained machine learning model; the second specification metric indicates the robustness of the model. The model adjustment module is used to train the machine learning model based on first data when the first specification indicator does not meet the first preset condition, wherein the first data is data in which the machine learning model has false positives; and to train the trained machine learning model based on second data when the second specification indicator does not meet the second preset condition, wherein the second data is data obtained by re-labeling the second data in which the machine learning model has false positives.

12. The apparatus according to claim 11, characterized in that, When the first specification indicator meets the first preset condition, the parameters of the machine learning model are adjusted based on the first data without training the machine learning model, so that the adjusted machine learning model can correctly process the first data.

13. The apparatus according to claim 11 or 12, characterized in that, The adjusted machine learning model has a lower false positive rate than the machine learning model itself; the adjusted machine learning model also has a lower processing speed than the machine learning model itself.

14. The apparatus according to any one of claims 11 to 13, characterized in that, When the second specification indicator meets the second preset condition, the model is calibrated according to the trained machine learning model.

15. The apparatus according to any one of claims 11 to 14, characterized in that, The indicator determination module is specifically used for: Based on the trained machine learning model, a second specification metric of the trained machine learning model is obtained through a model robustness detection algorithm.

16. The apparatus according to any one of claims 11 to 15, characterized in that, The device further includes: The transceiver module is used to send a first instruction message to the client when the machine learning model is trained based on the first data, so that the client can present the first instruction message, which is used to indicate that the model is in training state.

17. The apparatus according to any one of claims 12 to 16, characterized in that, The device further includes: The transceiver module is configured to send a second indication message to the client when the parameters of the machine learning model are adjusted, so that the client can display the second indication message, which indicates that the first specification metric of the model is in an adjustment state; or... After the parameters of the machine learning model are adjusted, a third instruction is sent to the client so that the client can display the third instruction, which indicates that the first specification metric of the model has been adjusted.

18. The apparatus according to any one of claims 11 to 17, characterized in that, The device further includes: The transceiver module is configured to, after acquiring the second specification metric of the trained machine learning model, send a fourth indication message to the client, so that the client can display the fourth indication message, which indicates that the second specification metric of the model has been updated; or... When training the machine learning model based on the second data, a fifth instruction message is sent to the client so that the client can present the fifth instruction message, which is used to instruct the relabeling of false positive data.

19. The apparatus according to any one of claims 14 to 18, characterized in that, The device further includes: The transceiver module is used to send a sixth indication message to the client when performing model calibration based on the trained machine learning model, so that the client can present the sixth indication message, which is used to indicate that the model is in a calibration state.

20. The apparatus according to any one of claims 11 to 19, characterized in that, The machine learning model is used for intrusion detection based on fiber optic sensing data.

21. 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 operation of the method according to any one of claims 1 to 10.

22. A computer program product, characterized in that, Includes computer-readable instructions that, when executed on a computer device, cause the computer device to perform the method as described in any one of claims 1 to 10.

23. 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 used to execute the code to perform the method as described in any one of claims 1 to 10.

24. A chip, characterized in that, It includes at least one processing unit and an interface circuit, the interface circuit being used to provide program instructions or data to the at least one processing unit, the at least one processing unit being used to execute the program instructions to implement the method of any one of claims 1 to 10.