Data processing method, apparatus, aircraft, and medium

By working collaboratively between the master and slave cores of the microcontroller unit, and utilizing serialized scripts and a circular buffer, the problems of debugging interruptions affecting real-time performance and low data transmission efficiency in traditional embedded systems are solved, enabling continuous, high-speed data acquisition and real-time monitoring.

CN122111705APending Publication Date: 2026-05-29GUANGDONG GAOYU TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202512018946.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-12-29
Publication Date
2026-05-29

AI Technical Summary

Technical Problem

In traditional embedded system debugging methods, setting breakpoints will stop the processor from running, which will disrupt the real-time performance of the device. Furthermore, outputting debugging information via serial port or network is inefficient, and frequent I/O operations introduce unpredictable delays.

Method used

In the main core of the microcontroller unit, a serialization function is generated through a serialization script to serialize the target structure instance, generate byte stream data, and write it into a circular buffer. The slave core reads and processes the data from the buffer to achieve continuous and high-speed data acquisition and transmission.

Benefits of technology

This avoids the need to set breakpoints to stop execution, reduces main core memory overhead, achieves efficient and fast data transmission and effective acquisition of target data, and ensures continuous capture and real-time monitoring of the embedded system's status.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122111705A_ABST
    Figure CN122111705A_ABST
Patent Text Reader

Abstract

The application relates to the technical field of data processing, and discloses a data processing method and device, an aircraft and a medium, which comprise the following steps: when an application program in a main core of a micro control unit normally executes, a serialization function is determined according to a serialization script fetched from a configuration file; target structure body instances corresponding to the same to-be-observed point are subjected to serialization processing through the serialization function to obtain byte stream data; all the byte stream data are written into annular buffer zones in a shared memory area through the main core; and the byte stream data are read from the annular buffer zones through a slave core, all the byte stream data are subjected to data processing, and target data is obtained. In the application, the serialization script is used to continuously and rapidly collect data of the application program. Through the annular buffer zones, the characteristics of directly sharing data by the shared memory are fully utilized, efficient and rapid data transmission is realized, and performance overhead in the data transmission process is avoided.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of data processing technology, and more particularly to a data processing method, apparatus, aircraft, and medium. Background Technology

[0002] With the rapid development of information technology, the complexity and importance of embedded systems, from automotive electronics to aerospace equipment, are constantly increasing, making real-time debugging and system status monitoring crucial. Traditional debugging methods fall into two categories: one involves setting breakpoints, which interrupts processor operation, disrupting the device's real-time performance and failing to capture continuous system states; the other involves outputting debugging information via serial port or network, but this is inefficient, lacks structured formatting, and introduces unpredictable latency due to frequent I / O operations. Therefore, a data processing method is urgently needed to address these issues. Summary of the Invention

[0003] This invention provides a data processing method, apparatus, aircraft, and medium to improve the real-time performance of the breakpoint breaking device in the debugging of embedded systems in the prior art, as well as the low debugging efficiency of outputting via serial port or network.

[0004] A data processing method, comprising: When the application in the main core of the microcontroller is executing normally, the serialization function corresponding to each observation point in the application is determined according to the serialization script retrieved from the configuration file. The serialization function is used to serialize the target structure instance corresponding to the same observation point to obtain byte stream data corresponding to each observation point. Through the main core of the microcontroller, all the byte stream data are written into the circular buffer in the shared memory area corresponding to the same observation point; The microcontroller's slave core reads the byte stream data from each of the circular buffers and processes all the byte stream data to obtain the target data.

[0005] A data processing apparatus, comprising: The function determination module is used to determine the serialization function corresponding to each observation point in the application based on the serialization script retrieved from the configuration file when the application in the main core of the microcontroller is executing normally. The instance serialization module is used to serialize the target structure instance corresponding to the same observation point through the serialization function to obtain byte stream data corresponding to each observation point. The data writing module is used to write all the byte stream data into the circular buffer in the shared memory area corresponding to the same observation point through the main core of the microcontroller. The read processing module is used to read the byte stream data from each of the circular buffers through the slave core of the microcontroller unit, and to process all the byte stream data to obtain the target data.

[0006] An aircraft includes a controller and a memory, wherein, Memory, used to store computer programs; The controller is used to execute the program stored in the memory to implement the above data processing method.

[0007] A computer-readable storage medium storing a computer program that, when executed by a processor, implements the above-described data processing method.

[0008] The aforementioned data processing method, apparatus, aircraft, and medium, in the data processing method of this invention, utilizes a serialization script to generate a serialization function for each observation point, thereby achieving serialization processing of the target structure instance and determination of byte stream data, thus enabling continuous and high-speed data acquisition from the application. By writing all byte stream data into a circular buffer via the main core, the overhead of main core memory is reduced, avoiding the need to set breakpoints to stop execution or insert code that could affect program execution efficiency. Reading byte stream data from each circular buffer from the core enables data reading within the circular buffers, fully utilizing the characteristics of shared memory for direct data sharing, achieving efficient and fast data transmission, and avoiding performance overhead during data transmission. Data processing of all byte stream data ensures the acquisition of the target data and guarantees its validity. Attached Figure Description

[0009] To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the description of the embodiments of the present invention will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0010] Figure 1 This is a flowchart of a data processing method in one embodiment of the present invention; Figure 2 This is a schematic block diagram of a data processing device according to an embodiment of the present invention; Figure 3 This is a flowchart of a data processing method in another embodiment of the present invention. Detailed Implementation

[0011] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0012] It should be understood that, when used in this specification and the appended claims, the term "comprising" indicates the presence of the described features, integrals, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, integrals, steps, operations, elements, components and / or collections thereof.

[0013] It should also be understood that the term "and / or" as used in this specification and the appended claims refers to any combination of one or more of the associated listed items and all possible combinations, and includes such combinations.

[0014] As used in this specification and the appended claims, the term "if" may be interpreted, depending on the context, as "when," "once," "in response to determination," or "in response to detection." Similarly, the phrase "if determined" or "if [described condition or event] is detected" may be interpreted, depending on the context, as meaning "once determined," "in response to determination," "once [described condition or event] is detected," or "in response to detection of [described condition or event]."

[0015] Furthermore, in the description of this invention and the appended claims, the terms "first," "second," "third," etc., are used only for distinguishing descriptions and should not be construed as indicating or implying relative importance.

[0016] References to "one embodiment" or "some embodiments" as described in this specification mean that one or more embodiments of the invention include a specific feature, structure, or characteristic described in connection with that embodiment. Therefore, phrases such as "in one embodiment," "in some embodiments," "in other embodiments," "in still other embodiments," etc., appearing in different parts of this specification do not necessarily refer to the same embodiment, but rather mean "one or more, but not all, embodiments," unless otherwise specifically emphasized. The terms "comprising," "including," "having," and variations thereof mean "including but not limited to," unless otherwise specifically emphasized.

[0017] In one embodiment, such as Figure 1 and Figure 3As shown, a data processing method is provided, including the following steps: S10, when the application in the main core of the microcontroller is executing normally, the serialization function corresponding to each observation point in the application is determined according to the serialization script retrieved from the configuration file.

[0018] Understandably, a Microcontroller Unit (MCU) is a highly integrated microcomputer chip; in this embodiment, the MCU refers to a multi-core MCU. The main core refers to the processor core responsible for the core control and management of the system. A configuration file is a pre-defined file containing information including, but not limited to, the size and number of buffers, memory layout, etc.; this file also serves as input for the automated code generation script. A serialization script is a pre-defined script used to process the observed points. A script is pre-written code used to guide specific operations or execution flows. A serialization function is a function that converts a data structure or object into a storable or transmittable format. In one embodiment, the serialization function converts a complex data structure into a byte stream or character stream while preserving the integrity and structure of the data structure.

[0019] Specifically, after the embedded system is initialized, the main core of the microcontroller unit runs the application program. Then, at the observation point in the application, the serialization script in the configuration file is called, and a serialization function is automatically generated based on the serialization script to convert the data at the observation point into transmittable data.

[0020] S20, the serialization function is used to serialize the target structure instance corresponding to the same observation point to obtain byte stream data corresponding to each observation point.

[0021] In essence, a byte stream refers to a continuous stream of data transmitted in which the most basic unit of data is a byte; it is a stream without boundary data. Byte stream data refers to data transmitted sequentially without structured format, using consecutive bytes as the basic unit. A target structure instance refers to a specific object of a structure type, that is, an entity defined by a structure type that can directly store data.

[0022] Specifically, by using a serialization function corresponding to the same observation point, the target structure instance of that observation point is converted into a byte stream, thereby obtaining byte stream data corresponding to each target structure instance. Specifically, the target structure instance of the observation point is converted into byte stream data in a storable or transmittable format using a serialization function. In another embodiment, it is first verified whether the target structure instance is serializable. If the target structure instance is serializable, then the serializable target structure instances of the observation point are traversed, and the serializable target structure instances are encoded to convert the serializable target structure instances into data in the target format, thus obtaining the byte stream data corresponding to that observation point.

[0023] S30, through the main core of the microcontroller, writes all the byte stream data into the circular buffer in the shared memory area corresponding to the same observation point.

[0024] In essence, a shared memory region refers to a storage mechanism that allows multiple processes or devices to share the same physical memory area, enabling efficient data exchange and communication. A circular buffer is a fixed-size circular data structure that achieves efficient data flow processing through linear storage with its head and tail connected. In this embodiment, the buffer size needs to be calculated based on the update frequency of the data structure and the expected depth of historical data to ensure that unprocessed data is not overwritten before being read from the core.

[0025] Specifically, the system queries the circular buffer in the shared memory area corresponding to the same observation point. Then, through the microcontroller's main core, each byte stream of data is written to the circular buffer corresponding to the same observation point. This writing is done in a non-blocking, interrupt-safe manner. The byte stream data is written to the circular buffer in the shared memory area using atomic operations to ensure that the data read from the core is complete.

[0026] In another embodiment, by adding data tags to distinguish byte stream data at different observation points, the byte stream data at different observation points can be distinguished in the shared memory area. When reading, it is possible to detect whether the timestamp of the data tag has been updated, thereby determining whether the data has been updated, and then reading the updated data.

[0027] S40: The microcontroller reads the byte stream data from each of the circular buffers through the slave core of the microcontroller and processes all the byte stream data to obtain the target data.

[0028] Understandably, a slave core refers to an independent processor core other than the main core that performs auxiliary, dedicated, or parallel computing tasks. Target data refers to data that meets the requirements after processing byte stream data.

[0029] Specifically, after the microcontroller's slave core reaches a read cycle (milliseconds) or the master core triggers an interrupt, it checks whether newly written data exists in all circular buffers of the shared memory area. If newly written data exists in at least one circular buffer, the slave core controls the microcontroller to read the newly written byte stream data from that circular buffer. Then, all byte stream data is processed to filter out invalid data, and all remaining byte stream data is timestamped. Finally, all timestamped byte stream data is packaged to obtain the target data.

[0030] In this embodiment, the data processing method, through a serialization script, generates a serialization function for each observation point, thereby achieving serialization processing of the target structure instance and determination of the byte stream data, thus enabling continuous and high-speed data acquisition from the application. By writing all byte stream data into a circular buffer via the main core, the overhead of the main core memory is reduced, avoiding the need to set breakpoints to stop execution or insert code that could affect program execution efficiency. Reading byte stream data from each circular buffer from the core fully utilizes the direct data sharing feature of shared memory, achieving efficient and fast data transmission and avoiding performance overhead during data transmission. Data processing of all byte stream data ensures the acquisition of the target data and guarantees its validity.

[0031] In one embodiment, such as Figure 3 As shown, after step S40, that is, after processing all the byte stream data to obtain the target data, the process further includes: S50, the target data is sent from the slave core of the microcontroller to the host computer, so that the host computer restores the target data into a data object through a deserialization function and displays the data object in a preset form on the screen interface.

[0032] Understandably, a host computer refers to a device that directly issues control commands; in this embodiment, it is used to receive, parse, and visualize target data. A data object refers to directly operable data corresponding to an instance of the target structure. A screen interface refers to the interface in the host computer that presents all visual elements that the user can directly see and interact with. A preset format refers to a pre-defined data format, such as waveform graphs, numerical tables, dashboards, etc. A deserialization function is a function used to restore serialized byte stream data back to a data structure or entity that the application can directly manipulate.

[0033] Specifically, in the host computer, a deserialization function is generated using the same serialization script. Then, after the target data is sent from the microcontroller's slave core to the host computer, the host computer uses the deserialization function to restore the target data into a data object. The slave core efficiently sends the target data to the host computer via Ethernet using UDP (User Datagram Protocol) or a lightweight custom protocol, with the network stack processing burden entirely borne by the slave core, isolated from the master core. Next, all data objects are input into the real-time display engine and converted into a preset format, which is then displayed on the host computer's screen interface in the preset format. The information on the screen interface is updated after each read cycle or after an interrupt triggered by the master core. Furthermore, the host computer simultaneously supports data storage, playback, and advanced analysis functions.

[0034] In this embodiment, the deserialization function is used to restore the target data into a data object, thereby enabling the processing of the data object. The host computer then displays the operational status of each observation point, achieving real-time monitoring of these points and continuous capture of the embedded system's state.

[0035] In one embodiment, such as Figure 3 As shown, before step S10, that is, before determining the serialization function corresponding to each observation point in the application based on the serialization script retrieved from the configuration file, the process further includes: S60, after the embedded system is powered on, associates and maps the master core and slave core in the microcontroller unit with the circular buffer in the shared memory area.

[0036] Specifically, the shared memory area is first divided into different circular buffers according to the update frequency and historical data of the data structure of all observation points. Then, after the embedded system is powered on, the master core and slave core of the microcontroller are associated with all the circular buffers in the shared memory area. That is, each observation point in the master core is associated with the corresponding circular buffer in the shared memory area, so that the master core writes the data of each observation point into the corresponding circular buffer; and the slave core is associated with all the circular buffers in the shared memory area to facilitate the slave core reading the data in the circular buffer.

[0037] In this embodiment, by associating the master core and slave core with the same circular buffer, the characteristic of direct data sharing in shared memory is fully utilized, achieving efficient and fast data transmission and avoiding performance overhead during data transmission.

[0038] In one embodiment, step S30, namely, writing all the byte stream data into a circular buffer in the shared memory area corresponding to the same observation point through the main core of the microcontroller, includes: S301, through pointer management and memory barrier instructions, writes each byte stream data from the main core of the microcontroller to a circular buffer in the shared memory area corresponding to the same observation point.

[0039] In essence, pointer management refers to a series of operations that regulate and control the lifecycle, validity, and access security of memory addresses. Memory barrier instructions are used to enforce the execution order of memory accesses (read / write). Pointer management and memory barrier instructions are specific means of performing write operations in a non-blocking, interrupt-safe manner.

[0040] Specifically, after being converted into byte stream data, pointer management and memory barrier instructions are used to write the byte stream data of each observation point from the microcontroller's main core into a circular buffer in the shared memory area corresponding to the same observation point. In one embodiment, multiple pointers manage the circular buffer, such as a write pointer for writing data and a read pointer for reading data, to determine the next write position in the circular buffer corresponding to the same observation point, and write the byte stream data from that position. Memory barrier instructions are used to ensure that the write pointer is updated after the byte stream data is written, thus confirming that all byte stream data has been written to the corresponding circular buffer.

[0041] In this embodiment, pointer management and memory barrier instructions are used to write byte stream data into a circular buffer, thereby reducing the overhead of the main core memory and avoiding the need to set breakpoints to stop execution or insert code that affects program execution efficiency.

[0042] In one embodiment, step S30, namely, writing all the byte stream data into a circular buffer in the shared memory area corresponding to the same observation point through the main core of the microcontroller, includes: S302, using the producer pattern, uses the microcontroller's main core to atomically write all the byte stream data into a circular buffer in the shared memory area corresponding to the same observation point.

[0043] The process of reading the byte stream data from each of the circular buffers via the slave core of the microcontroller includes: S303, using consumer mode, obtains the byte stream data from each of the circular buffers through the slave core of the microcontroller.

[0044] Understandably, the producer-consumer pattern addresses the strong coupling between producers and consumers through a buffer. In this pattern, producers and consumers do not communicate directly; producers write data to the buffer, and consumers read data from the buffer, not from the producer.

[0045] Specifically, when writing data, the producer pattern is used. The microcontroller's main core performs atomic operations to write the byte stream data corresponding to the same observation point into the corresponding circular buffer, thus completing the main core's data transfer work. When reading data, the consumer pattern is used. If newly written data exists in the circular buffer, the microcontroller's slave core retrieves the byte stream data from the circular buffer. When there is no byte stream data, the producer will not write data to the circular buffer; when the circular buffer is full, the producer will not write data until a writable position becomes available. Similarly, when there is no newly written byte stream data in the circular buffer, the consumer will not continue reading data until new byte stream data becomes available for reading.

[0046] In this embodiment, the writing and reading of byte stream data are realized through the producer and consumer patterns, thereby ensuring data integrity, reducing unnecessary blocking, and improving the concurrency of the shared memory area.

[0047] In one embodiment, step S40, namely reading the byte stream data from each of the circular buffers via the slave core of the microcontroller, includes: S401, when it is detected that the write pointer position in the circular buffer exceeds the read pointer position, it is determined that there is newly written byte stream data in the circular buffer, and the slave core of the microcontroller unit is controlled to read the byte stream data from each of the circular buffers.

[0048] Understandably, the write pointer is used to track the progress of data writing, avoiding write conflicts or data overwriting. The read pointer is used to track the progress of data reading, ensuring accurate reading in the order of writing and avoiding duplicate or missed reads.

[0049] Specifically, after byte stream data is written to the circular buffers, the positions of the write pointer and read pointer in each circular buffer are compared to detect whether newly written byte stream data exists in the circular buffers. If the write pointer position does not exceed the read pointer position, it is determined that no newly written byte stream data exists in the circular buffer. If the write pointer position exceeds the read pointer position, it is determined that newly written byte stream data exists in the circular buffer. Then, the slave core of the microcontroller reads the byte stream data from each circular buffer; that is, the slave core of the microcontroller reads the byte stream data for the observed point from the circular buffer containing newly written data according to the read cycle or after an interrupt is triggered by the master core.

[0050] In this embodiment, by determining that the circular buffer contains newly written byte stream data by the write pointer position exceeding the read pointer position, the reading of the byte stream data from the core is controlled, making full use of the characteristics of direct data sharing in shared memory to achieve efficient and fast data transmission.

[0051] In one embodiment, step S40, namely, processing all the byte stream data to obtain the target data, includes: S402, perform data filtering on all the byte stream data to obtain valid data corresponding to each of the byte stream data.

[0052] S403, timestamp each of the valid data to obtain labeled data corresponding to each of the valid data.

[0053] S404, Package all the labeled data to obtain the target data.

[0054] In essence, valid data refers to data that conforms to preset rules and accurately reflects the information of the observed points. Labeled data refers to valid data with timestamps. Data packaging refers to the operation of integrating multiple scattered labeled data into a single or group of structured files using a specific method.

[0055] Specifically, all byte stream data is filtered, meaning invalid data in each byte stream is removed according to preset rules to obtain valid data corresponding to each byte stream. Then, each valid data item is timestamped, resulting in labeled data. Next, all labeled data is packaged into a single data packet, which is then designated as the target data.

[0056] In this embodiment, invalid data is removed through data filtering, thereby enabling the screening of valid data. This allows for the annotation of timestamps on valid data, the acquisition of annotated data, and the packaging of all annotated data, facilitating subsequent data transmission.

[0057] It should be understood that the sequence number of each step in the above embodiments does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present invention.

[0058] In one embodiment, a data processing apparatus is provided, which corresponds one-to-one with the data processing methods described in the above embodiments. For example... Figure 2As shown, the data processing device includes a function determination module 10, an instance serialization module 20, a data writing module 30, and a read processing module 40. Detailed descriptions of each functional module are as follows: The function determination module 10 is used to determine the serialization function corresponding to each observation point in the application based on the serialization script retrieved from the configuration file when the application in the main core of the microcontroller is executing normally. The instance serialization module 20 is used to serialize the target structure instance corresponding to the same observation point through the serialization function to obtain byte stream data corresponding to each observation point. The data writing module 30 is used to write all the byte stream data into the circular buffer in the shared memory area corresponding to the same observation point through the main core of the microcontroller. The read processing module 40 is used to read the byte stream data from each of the circular buffers through the slave core of the microcontroller unit, and to process all the byte stream data to obtain the target data.

[0059] In one embodiment, the device further includes: The data display module is used to send the target data from the slave core of the microcontroller to the host computer, so that the host computer can restore the target data into a data object through a deserialization function and display the data object in a preset form on the screen interface.

[0060] In one embodiment, the device further includes: The association mapping module is used to associate and map the master core and slave core in the microcontroller unit with the circular buffer in the shared memory area after the embedded system is powered on.

[0061] In one embodiment, the data writing module 30 includes: The main core write data unit is used to write each byte stream data from the main core of the microcontroller unit to a circular buffer in the shared memory area corresponding to the same observation point, through pointer management and memory barrier instructions.

[0062] In one embodiment, the data writing module 30 further includes: The producer mode unit is used to write all the byte stream data into a circular buffer in the shared memory area corresponding to the same observation point using the producer mode and atomic operations through the main core of the microcontroller. The read processing module 40 further includes: The consumer mode unit is used to obtain the byte stream data from each of the circular buffers through the slave core of the microcontroller in consumer mode.

[0063] In one embodiment, the read processing module 40 includes: The slave core reads data unit, which determines that there is newly written byte stream data in the circular buffer when the write pointer position in the circular buffer exceeds the read pointer position, and controls the slave core of the microcontroller to read the byte stream data from each of the circular buffers.

[0064] In one embodiment, the read processing module 40 further includes: A data filtering unit is used to filter all the byte stream data to obtain valid data corresponding to each of the byte stream data. The timestamp annotation unit is used to timestamp each of the valid data to obtain annotation data corresponding to each of the valid data. The data packaging unit is used to package all the labeled data to obtain the target data.

[0065] An aircraft includes a controller and a memory, wherein, Memory, used to store computer programs; The controller is used to execute the program stored in the memory to implement the above data processing method.

[0066] Specific limitations regarding the aircraft, processor, and their various units and modules can be found in the limitations of the data processing method described above, and will not be repeated here. Each module in the aforementioned processor can be implemented entirely or partially through software, hardware, or a combination thereof. Understandably, the processor includes a processor, memory, network interface, and database connected via a device bus. Each module of the processor can be embedded in hardware or independent of the processor, or stored in memory as software, so that the processor can call and execute the operations corresponding to each module. The processor provides computational and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores operating devices, computer programs, and a database. The internal memory provides an environment for the operation of the operating devices and computer programs in the non-volatile storage media. The database stores the data used by the data processing method in the above embodiments. The network interface is used for communication with external terminals via a network connection. When the computer program is executed by the processor, it implements a data processing method.

[0067] In one embodiment, a computer-readable storage medium is provided, the computer-readable storage medium storing a computer program that, when executed by a processor, implements the above-described data processing method.

[0068] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium. When executed, the computer program can include the processes of the embodiments of the above methods. Any references to memory, storage, databases, or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), RAMbus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.

[0069] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the above-described division of functional units and modules is used as an example. In practical applications, the above functions can be assigned to different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above.

[0070] The above-described embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit it. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention, and should all be included within the protection scope of the present invention.

Claims

1. A data processing method, characterized in that, include: When the application in the main core of the microcontroller is executing normally, the serialization function corresponding to each observation point in the application is determined according to the serialization script retrieved from the configuration file. The serialization function is used to serialize the target structure instance corresponding to the same observation point to obtain byte stream data corresponding to each observation point. Through the main core of the microcontroller, all the byte stream data are written into the circular buffer in the shared memory area corresponding to the same observation point; The microcontroller's slave core reads the byte stream data from each of the circular buffers and processes all the byte stream data to obtain the target data.

2. The data processing method as described in claim 1, characterized in that, After processing all the byte stream data to obtain the target data, the process further includes: The target data is sent from the slave core of the microcontroller to the host computer, so that the host computer can restore the target data into a data object through a deserialization function and display the data object in a preset form on the screen interface.

3. The data processing method as described in claim 1, characterized in that, Before determining the serialization function corresponding to each observation point in the application based on the serialization script retrieved from the configuration file, the method further includes: After the embedded system is powered on, the master core and slave core in the microcontroller are associated and mapped with the circular buffer in the shared memory area, respectively.

4. The data processing method as described in claim 1, characterized in that, The process of writing all the byte stream data into a circular buffer in the shared memory area corresponding to the same observation point, via the main core of the microcontroller, includes: By using pointer management and memory barrier instructions, each byte stream data is written from the main core of the microcontroller to a circular buffer in the shared memory area corresponding to the same observation point.

5. The data processing method as described in claim 1, characterized in that, The process of reading the byte stream data from each of the circular buffers via the slave core of the microcontroller includes: When the write pointer position in the circular buffer exceeds the read pointer position, it is determined that there is newly written byte stream data in the circular buffer, and the slave core of the microcontroller is controlled to read the byte stream data from each of the circular buffers.

6. The data processing method as described in claim 1, characterized in that, The step of processing all the byte stream data to obtain the target data includes: Data filtering is performed on all the byte stream data to obtain valid data corresponding to each of the byte stream data; Each of the valid data is timestamped to obtain labeled data corresponding to each of the valid data. All the labeled data are packaged to obtain the target data.

7. The data processing method as described in claim 1, characterized in that, The process of writing all the byte stream data into a circular buffer in the shared memory area corresponding to the same observation point, via the main core of the microcontroller, includes: Using the producer pattern, the main core of the microcontroller unit atomically writes all the byte stream data into a circular buffer in the shared memory area corresponding to the same observation point; The process of reading the byte stream data from each of the circular buffers via the slave core of the microcontroller includes: Using consumer mode, the byte stream data is obtained from each of the circular buffers through the slave core of the microcontroller.

8. A data processing apparatus, characterized in that, include: The function determination module is used to determine the serialization function corresponding to each observation point in the application based on the serialization script retrieved from the configuration file when the application in the main core of the microcontroller is executing normally. The instance serialization module is used to serialize the target structure instance corresponding to the same observation point through the serialization function to obtain byte stream data corresponding to each observation point. The data writing module is used to write all the byte stream data into the circular buffer in the shared memory area corresponding to the same observation point through the main core of the microcontroller. The read processing module is used to read the byte stream data from each of the circular buffers through the slave core of the microcontroller unit, and to process all the byte stream data to obtain the target data.

9. An aircraft, characterized in that, Includes controller and memory, among which, Memory, used to store computer programs; A controller for executing a program stored in a memory to implement the surge suppression method according to any one of claims 1 to 7.

10. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by a processor, it implements the data processing method as described in any one of claims 1 to 7.