A data processing method, a data processing device, a device and a storage medium

By analyzing and processing data of different communication protocol types at the kernel layer, the problems of high development costs and long production cycles of multiple communication protocol types in electronic devices are solved, and compatibility and debugging efficiency are improved.

CN112579508BActive Publication Date: 2024-11-26SHENZHEN SUNDRAY NETWORK SCI TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202011455360.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-12-10
Publication Date
2024-11-26
Estimated Expiration
2040-12-10

AI Technical Summary

Technical Problem

In electronic devices, chips that support multiple communication protocol types require the development of different device adapters and core drivers, resulting in high labor development costs and long production cycles, hindering project progress and mass production of equipment.

Method used

By constructing data at the user layer and sending it to the kernel layer, the kernel layer parses the communication protocol type and calls the target bus driver for processing, supporting at least two communication protocol types to realize compatible data processing for chips of different communication protocol types.

Benefits of technology

It reduces the labor development cost of electronic equipment, reduces the production cycle, improves the speed of project progress, and simplifies chip compatibility and debugging process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112579508B_ABST
    Figure CN112579508B_ABST
Patent Text Reader

Abstract

The embodiment of the present application discloses a data processing method, the method comprising: constructing data through the user layer and sending the data to the kernel layer; parsing the communication protocol type of the data through the kernel layer to obtain the target communication protocol type, and calling the target bus driver corresponding to the target communication protocol type to process the data; the target bus driver processes the data with the processing logic corresponding to the target communication protocol type; the kernel layer supports at least two communication protocol types; and sending the processed data to the target chip in the physical layer through the kernel layer. In addition, the embodiment of the present application also discloses a data processing device, equipment and storage medium.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to the field of computer technology, and relate to but are not limited to a data processing method, a data processing apparatus, a device, and a storage medium. Background Art

[0002] In the related art, an electronic device supports multiple different devices, i.e., chips. When the application layer of the electronic device reads and writes data to the device, the read and write operations are performed on the device through the following path: an application layer interface located in the device adaptation layer of the application layer, a device node provided by the kernel layer, and a kernel driver located in the device driver layer of the kernel layer, wherein the application layer interface is provided by the device adapter corresponding to the device, and the device node is provided by the kernel driver corresponding to the device.

[0003] In the above scheme, devices of different communication protocol types correspond to different device adapters and kernel drivers. Therefore, when an electronic device supports multiple chips of different communication protocol types, it is necessary to develop device adapters and kernel drivers specifically for different chips of different communication protocol types, which increases the manpower development cost of the electronic device, extends the production cycle of the electronic device, and hinders the project progress and mass production of equipment. Summary of the invention

[0004] In view of this, the embodiments of the present application provide a data processing method, apparatus, device and storage medium to solve at least one problem existing in the related art, which can be compatible with data processing of chips of different communication protocol types, reduce the manpower development cost of electronic equipment, and shorten the production cycle of electronic equipment.

[0005] The technical solution of the embodiment of the present application is implemented as follows:

[0006] In a first aspect, an embodiment of the present application provides a data processing method, the method comprising:

[0007] Constructing data through the user layer and sending the data to the kernel layer;

[0008] The communication protocol type of the data is parsed by the kernel layer to obtain a target communication protocol type, and a target bus driver corresponding to the target communication protocol type is called to process the data; the target bus driver processes the data with a processing logic corresponding to the target communication protocol type; the kernel layer supports at least two communication protocol types;

[0009] The processed data is sent to a target chip in a physical layer through the kernel layer.

[0010] In a second aspect, an embodiment of the present application provides a data processing device, the device comprising: a user layer and a kernel layer; wherein:

[0011] The user layer is used to construct data and send the data to the kernel layer;

[0012] The kernel layer is used to parse the communication protocol type of the data, obtain the target communication protocol type, and call the target bus driver corresponding to the target communication protocol type to process the data; the target bus driver processes the data with the processing logic corresponding to the target communication protocol type; the kernel layer supports at least two communication protocol types;

[0013] The kernel layer is also used to send the processed data to the target chip in the physical layer.

[0014] In a third aspect, an embodiment of the present application provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps in the above-mentioned data processing method when executing the computer program.

[0015] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium having a computer program stored thereon, which implements the steps in the above-mentioned data processing method when executed by a processor.

[0016] In an embodiment of the present application, a data processing method is provided, which constructs data through a user layer and sends the data to a kernel layer; the kernel layer parses the communication protocol type of the data to obtain a target communication protocol type, and calls a target bus driver corresponding to the target communication protocol type to process the data; the target bus driver processes the data with a processing logic corresponding to the target communication protocol type; the kernel layer supports at least two communication protocol types; the processed data is sent to a target chip in a physical layer through the kernel layer, which is compatible with data processing of chips with different communication protocols and quickly completes data processing, thereby saving time for R&D personnel, reducing the R&D cycle of electronic equipment, and promoting project progress. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] Figure 1A A schematic diagram of the architecture of an electronic device provided in an embodiment of the present application;

[0018] Figure 1B Schematic diagram 1 of the implementation flow of the data processing method provided in the embodiment of the present application;

[0019] Figure 2 A schematic diagram of a device architecture in a related technology provided in an embodiment of the present application;

[0020] Figure 3 Schematic diagram of the implementation process of the data processing method provided in the embodiment of the present application Figure 2 ;

[0021] Figure 4 Schematic diagram of electronic device architecture provided in the embodiment of the present application Figure 2 ;

[0022] Figure 5 A schematic diagram of the software driver architecture provided in the embodiment of the present application;

[0023] Figure 6 A schematic diagram of the structure of a data processing device provided in an embodiment of the present application;

[0024] Figure 7 A hardware entity schematic diagram of a computer device according to an embodiment of the present application. DETAILED DESCRIPTION

[0025] In order to make the purpose, technical solution and advantages of the embodiments of the present application clearer, the specific technical solution of the application will be further described in detail below in conjunction with the drawings in the embodiments of the present application. The following embodiments are used to illustrate the present application, but are not used to limit the scope of the present application.

[0026] The embodiments of the present application may be provided as a data processing method and apparatus, device and storage medium. In practical applications, the data processing method may be implemented by a data processing apparatus, and each functional entity in the data processing apparatus may be collaboratively implemented by hardware resources of computer equipment (such as terminal equipment, server), such as computing resources such as processors, and communication resources (such as for supporting various communication methods such as optical cables and cellular).

[0027] The data processing method of the embodiment of the present application can be applied to electronic devices. The architecture of the electronic device includes: a user layer, a kernel layer and a physical layer. The data processing method provided by the embodiment of the present application includes: constructing data through the user layer and sending the data to the kernel layer; parsing the communication protocol type of the data through the kernel layer to obtain the target communication protocol type, and calling the target bus driver corresponding to the target communication protocol type to process the data; the target bus driver processes the data with the processing logic corresponding to the target communication protocol type; the kernel layer supports at least two communication protocol types; and sending the processed data to the target chip in the physical layer through the kernel layer.

[0028] The data processing method provided in the embodiment of the present application can be applied to scenarios where chip reading or writing operations are performed on the chip, such as chip testing, chip debugging, and chip use. In the embodiment of the present application, the scenario in which the data processing method is used is not limited in any way.

[0029] The following describes various embodiments of the data processing method, apparatus, device, and storage medium provided in the embodiments of the present application.

[0030] like Figure 1A As shown, the architecture of the electronic device implemented by the data processing method provided in the embodiment of the present application includes: a user layer 11, a kernel layer 12 and a physical layer 13; the user layer 11 is used to communicate with the user; the kernel layer 12 is used to process the data obtained through the user layer; the physical layer 13 refers to all hardware resources on the device, usually a basic circuit composed of various chips and CPUs.

[0031] This embodiment provides a data processing method, which is applied to a device, wherein the device may be a computer device. The function implemented by the method can be implemented by a processor in the computer device calling a program code, and of course the program code can be stored in a computer storage medium. It can be seen that the computer device at least includes a processor and a storage medium.

[0032] Figure 1B A schematic diagram of the implementation flow of a data processing method according to an embodiment of the present application is shown in FIG. Figure 1B As shown, the method may include the following steps:

[0033] S101, constructing data through the user layer and sending the data to the kernel layer;

[0034] Here, the device constructs data through the user layer, wherein the constructed data is data written to or read from the target chip. After constructing the data through the user layer, the device sends the acquired data to the kernel layer.

[0035] When the user layer writes data to the target chip, the user layer constructs the data based on the following information: chip protocol, chip address, write instruction, and internal address of the chip to be written. The user layer sends the constructed data to the kernel layer, and the kernel layer writes the data to the CPU's bus controller, which sends the data to the target chip. The target chip receives the data through the communication protocol, and parses out that the operation corresponding to the data is a write operation, and updates the data at the internal address.

[0036] When the user layer reads data from the target chip, the user layer constructs data based on the following information: chip protocol, chip address, read instruction, and internal address of the chip to be read. The user layer sends the constructed data to the kernel layer, and the kernel layer writes the data to the CPU's bus controller, which sends the data to the target chip. The target chip receives the data through the communication protocol, and parses the operation corresponding to the data as a read operation, and further feeds back the data stored in the internal address, that is, the read result, to the CPU's bus controller, which reports it to the user layer layer by layer along the original route.

[0037] S102, parsing the communication protocol type of the data through the kernel layer to obtain a target communication protocol type, and calling a target bus driver corresponding to the target communication protocol type to process the data;

[0038] The communication protocol type of the data is obtained through the kernel layer, and a target bus driver corresponding to the communication protocol type is called; and the data is sent to the physical layer by calling the bus through the kernel layer.

[0039] Here, when the kernel layer receives multiple pieces of data, each piece of data is classified according to the communication protocol type of each piece of data, and each piece of data is processed by the corresponding communication protocol type.

[0040] The target bus driver is used to provide a target bus corresponding to a communication protocol type; and the kernel layer supports at least two communication protocol types.

[0041] Here, the data sent by the user layer is received through the kernel layer, and the functions of the kernel layer include: 1. determining the communication protocol type of the received data; 2. providing a bus driver corresponding to the communication protocol type corresponding to the data.

[0042] Here, the kernel layer supports at least two types of communication protocols, which may include: Serial Peripheral Interface (SPI) protocol type, Joint Test Action Group (JTAG) protocol type, Inter-Integrated Circuit (IIC) protocol type, Media Independent Interface (MII) protocol type, Universal Serial Bus (USB) protocol type and other protocol types.

[0043] Here, when the kernel layer receives the data, the device classifies the data through the kernel layer to obtain the communication protocol type of the data. When classifying the data, the data may be classified according to the summary information of the data to obtain the communication protocol type of the data.

[0044] For example: after the kernel layer receives the data, it classifies and processes the data, and obtains that the communication protocol type of data 1 is the SPI protocol type; the communication protocol type of data 2 is the MII protocol type; the communication protocol type of data 3 is the USB protocol type; among them, data 1, data 2 and data 3 constitute data.

[0045] Here, the kernel layer also calls the target bus driver corresponding to the communication protocol type, and the target bus driver is used to provide the target bus corresponding to the communication protocol type.

[0046] For example: the kernel layer provides target bus driver 1 corresponding to the SPI protocol, and target bus driver 1 is used to provide target bus 1 corresponding to the SPI protocol; the kernel layer provides target bus driver 2 corresponding to the MII protocol, and target bus driver 2 is used to provide target bus 2 corresponding to the MII protocol; the kernel layer provides target bus driver 3 corresponding to the USB protocol, and target bus driver 3 is used to provide target bus 3 corresponding to the MII protocol.

[0047] S103: Send the processed data to a target chip in the physical layer through the kernel layer.

[0048] Here, data is sent to the physical layer through a bus corresponding to the communication protocol type.

[0049] For example: the communication protocol type of data 1 is the SPI protocol type, and the data is sent to the physical layer through bus 1 corresponding to the SPI protocol type; the communication protocol type of data 2 is the MII protocol type, and the data is sent to the physical layer through bus 2 corresponding to the MII protocol type; the communication protocol type of data 3 is the USB protocol type, and the data is sent to the physical layer through bus 3 corresponding to the USB protocol type.

[0050] In an embodiment of the present application, data is constructed through the user layer and sent to the kernel layer; the data is classified through the kernel layer to obtain the communication protocol type of the data, and the target bus driver corresponding to the communication protocol type is called; the target bus driver is used to provide a target bus corresponding to the communication protocol type; the kernel layer supports at least two communication protocol types; the kernel layer calls the bus to send the data to the physical layer, which can quickly complete the reading and writing of data, save the time of R&D personnel, and promote the progress of the project.

[0051] In the implementation example of the present application, taking the chip debugging scenario as an example, when the communication protocol of the newly added chip in the device is a communication protocol type supported by the kernel layer, the target chip can be debugged directly. When the communication protocol type of the newly added chip in the device is a communication protocol type not supported by the kernel layer, the kernel layer is modified so that the kernel layer supports the communication protocol type. There is no need to develop a device adaptation layer and a device driver layer, which simplifies data processing and improves the device's compatibility with chips.

[0052] In one embodiment, the kernel layer includes: a virtual device driver layer and a bus driver layer; the virtual device driver layer supports at least two communication protocol types; the bus driver layer provides a bus driver corresponding to each of the at least two communication protocol types; in this case, the implementation of S102 includes:

[0053] Classifying the data through the virtual device driver layer to obtain the communication protocol type of the data, and calling the target bus driver corresponding to the communication protocol type;

[0054] The data is processed by the target bus driver in the bus driver layer using processing logic corresponding to the target communication protocol type.

[0055] Here, the bus driver provided by the bus driver layer includes a target driver bus.

[0056] Here, the kernel layer includes: a virtual device driver layer and a bus driver layer. The virtual device driver layer supports at least two communication protocol types, and the communication protocol types may include: SPI protocol type, JTAG protocol type, IIC protocol type, MII protocol type, USB protocol type, etc.

[0057] Here, the data is classified through the virtual device driver layer to obtain the communication protocol type of the data. Wherein, when the data is classified through the virtual device driver layer, the data can be classified according to the summary information of the data to obtain the communication protocol type of the data.

[0058] For example: through the virtual device driver layer, the data is classified according to the summary information of the data, and the communication protocol type of data 4 is SPI protocol type; through the virtual device driver layer, the data is classified according to the summary information of the data, and the communication protocol type of data 5 is USB protocol type.

[0059] Here, a target bus driver corresponding to the communication protocol type is provided through the bus driver layer, and the target bus driver is used to provide a target bus corresponding to the communication protocol type. Data is sent to the physical layer through the target bus corresponding to the target bus driver.

[0060] For example: the bus driver layer provides target bus driver 1 corresponding to the SPI protocol, and target bus driver 1 is used to provide target bus 1 corresponding to the SPI protocol; the bus driver layer provides target bus driver 2 corresponding to the MII protocol, and target bus driver 2 is used to provide target bus 2 corresponding to the MII protocol; the bus driver layer provides target bus driver 3 corresponding to the USB protocol, and target bus driver 3 is used to provide target bus 3 corresponding to the MII protocol.

[0061] In an embodiment of the present application, the kernel layer includes: a virtual device driver layer and a bus driver layer; through the virtual device driver layer, the data is classified to obtain the communication protocol type of the data; and the data is sent to the physical layer through the target bus corresponding to the target bus driver.

[0062] In one embodiment, the communication protocol type of the data is parsed by the virtual device driver layer to obtain the target communication protocol type, including: receiving summary information sent by the user layer through the virtual device driver layer; and parsing the summary information of the data through the virtual device driver layer to obtain the target communication protocol type.

[0063] Here, when the data is classified through the virtual device driver layer, the communication protocol type of the data may be obtained after analyzing the summary information of the data. The summary information may include: the communication protocol type, the accessed device address, the communication bus number, and the accessed register. Here, the accessed device is the target chip, and the accessed register is the internal address of the target chip.

[0064] For example: through the virtual device driver layer, the communication protocol type in the summary information of data 1 is analyzed, and the communication protocol type of data 1 is obtained as the SPI protocol type; through the virtual device driver layer, the communication protocol type in the summary information of data 2 is analyzed, and the communication protocol type of data 2 is obtained as the MII protocol type; through the virtual device driver layer, the communication protocol type in the summary information of data 3 is analyzed, and the communication protocol type of data 3 is obtained as the USB protocol type; through the virtual device driver layer, the communication protocol type in the summary information of data 4 is analyzed, and the communication protocol type of data 4 is obtained as the JTAG protocol type.

[0065] In the embodiment of the present application, when data is classified through the virtual device driver layer, the communication protocol type of the data is obtained after analyzing the summary information of the data.

[0066] In one embodiment, the user layer includes: a single-board driver sublayer, a single-board adapter sublayer, a device driver sublayer and a bus driver sublayer; wherein, through the single-board driver sublayer, a functional interface corresponding to the data is provided to call the interface of the target chip; through the single-board adapter sublayer, an interface of the target chip is provided to call the chip information of the target chip; through the device driver sublayer, the driver interface of the target chip is called to determine the internal address of the target chip according to the chip information, and call the communication interface corresponding to the target communication protocol type in the bus driver sublayer; through the bus driver sublayer, a communication interface corresponding to the target communication protocol type is provided.

[0067] Here, the user layer includes: a single board driver sublayer, a single board adapter sublayer, a device driver sublayer and a bus driver sublayer.

[0068] Here, the single board driver sublayer provides the functional interface supported by the single board. For example, if the single board can support the function of obtaining temperature, the single board driver sublayer provides the interface of obtaining temperature function; for another example, if the single board can support the function of obtaining voltage, the single board driver sublayer provides the interface of obtaining voltage function.

[0069] Here, a single board may include multiple chips, such as chip 1, chip 2, chip 3, chip 4, etc. The functions of the chips on the single board may be the same or different. For example, the function of chip 1 is to obtain temperature, the function of chip 2 is to obtain voltage, the function of chip 3 is to obtain temperature, and the function of chip 4 is to obtain system time.

[0070] Here, the single board adapter layer provides a functional interface for the functions of each chip on the single board. For example: through the single board adapter layer, an interface for obtaining temperature is provided for chip 1; through the single board adapter layer, an interface for obtaining voltage is provided for chip 2; through the single board adapter layer, an interface for obtaining temperature is provided for chip 3; through the single board adapter layer, an interface for obtaining system time is provided for chip 4. The functional interface of each chip's function will distinguish different chips, and find the corresponding chip information according to the chip: bus protocol, bus ID, chip address. Here, the user layer can call down the driver interface of the device driver sublayer through the functional interface of each chip provided by the single board adapter layer.

[0071] Here, the chip driver interface is provided through the device driver sublayer. The driver interface specifies the register address of the read data, i.e., the chip internal address, according to the chip information of the single board adapter sublayer, and calls the communication interface of the bus driver sublayer according to the communication protocol type in the chip information.

[0072] In the embodiment of the present application, when the user layer calls the functional interface of the single board driver sublayer, the device driver sublayer calls the target bus that sends data to the target chip through the bus information in the chip information. Here, the connection between each chip and the CPU complies with a certain communication bus. For example, when the temperature needs to be read, the user calls the single board driver sublayer to obtain the temperature interface, calls the temperature acquisition interface provided by the single board adapter sublayer downward (different single boards may have different temperature chip types), provides the temperature acquisition interface of different chips to the device driver sublayer downward, and provides the communication interface used by different chips to the bus driver downward.

[0073] Here, a bus driver corresponding to each communication protocol type is provided through the bus driver sublayer, and the bus driver is used to provide a communication interface corresponding to the communication protocol type and send data to the virtual device driver layer of the kernel layer.

[0074] For example: through the bus driver sublayer, a bus driver corresponding to the SPI protocol type is provided; through the bus driver sublayer, a bus driver corresponding to the MII protocol type is provided; the bus driver sublayer provides a bus driver corresponding to the USB protocol type; the bus driver sublayer provides a bus driver corresponding to the IIC protocol type; the bus driver sublayer provides a bus driver corresponding to the JTAG protocol type.

[0075] In an embodiment of the present application, the user layer includes: a single board driver sublayer, a single board adaptation sublayer, a device driver sublayer and a bus driver sublayer; the single board driver sublayer, the single board adaptation sublayer, the device driver sublayer and the bus driver sublayer have different functions, which can improve the adaptation efficiency and data transmission efficiency.

[0076] In one example, in the user layer, if the user wants to obtain the current temperature, he needs to call the temperature acquisition interface of the single-board driver sublayer, and then call the temperature acquisition interface of the single-board adapter sublayer downward (different boards may use different temperature sensors here. This layer will distinguish different chips when providing functional interfaces, and find the corresponding device information according to the chip: communication protocol type, bus ID, chip address), and then call the driver interface of the device driver sublayer downward. The driver interface will specify the register address for reading the temperature according to the device information of the single-board adapter sublayer, encapsulate the temperature acquisition interface, and call the read communication interface of the bus driver layer according to the bus protocol in the device information to send the data to the virtual device driver of the kernel layer.

[0077] At this time, in the kernel layer, the virtual device driver layer parses the communication protocol type in the data and forwards the data to the bus driver of the corresponding communication protocol type. The bus driver sends the data to the bus controller and marks the bus controller as a read operation. After the bus controller sends the data, it will receive the data returned by the chip temperature register address. The bus driver gets the data from the bus controller and feeds it back to the virtual device driver. The virtual device driver sends the data back to the bus driver of the user layer along the original route until it reaches the single board driver sublayer, so that the user can get the temperature data.

[0078] It should be noted that the bus driver layer of the kernel layer in the embodiment of the present application is based on the bus driver interface provided by different CPU bus controllers, and it is necessary to pay attention to the CPU model. For the same communication protocol type, different CPUs have different corresponding bus drivers. The bus driver sublayer of the user layer is the bottom layer that interacts with the kernel layer. It is based on the virtual device driver to separate different communication interfaces at the user layer to ensure that each communication interface is independent of each other, easy to maintain and safe. It does not pay attention to the CPU model. For the same communication protocol type, the communication interfaces of different CPUs are universal, and the corresponding bus drivers are the same bus drivers.

[0079] In one embodiment, the physical layer includes a central processing unit (CPU) bus controller and at least two chips, and the communication protocol types of different chips are different; the method also includes: receiving the processed data through the CPU bus controller, and sending it to a target chip among the at least two chips based on the processed data.

[0080] Here, the physical layer includes a CPU bus controller and at least two chips. Different chips have different communication protocol types, and the communication protocol types may include: SPI protocol type, MII protocol type, JTAG protocol type, IIC protocol type, USB protocol type and other protocol types.

[0081] For example: the physical layer includes chip 1, chip 2, chip 3, and chip 4; the communication protocol type of chip 1 is the SPI protocol type, the communication protocol type of chip 2 is the MII protocol type, the communication protocol type of chip 3 is the USB protocol type, and the communication protocol type of chip 4 is the JTAG protocol type.

[0082] Here, after sending the data to the physical layer through the bus, the data sent by the target bus is received through the CPU bus controller, and the data is sent to the target chip corresponding to the communication protocol type through the CPU bus controller; when sending the data to the target chip corresponding to the communication protocol type through the CPU bus controller, the data is sent to the corresponding target chip according to the communication protocol type corresponding to the data.

[0083] For example: the communication protocol type of data 1 is SPI protocol type, the communication protocol type of data 2 is MII protocol type, the communication protocol type of data 3 is USB protocol type, and the communication protocol type of data 4 is JTAG protocol type; the communication protocol type of chip 1 is USB protocol type, the communication protocol type of chip 2 is MII protocol type, the communication protocol type of chip 3 is SPI protocol type, and the communication protocol type of chip 4 is JTAG protocol type; according to the SPI protocol type corresponding to data 1, data 1 is sent to the corresponding target chip 3; according to the MII protocol type corresponding to data 2, data 2 is sent to the corresponding target chip 2; according to the USB protocol type corresponding to data 3, data 3 is sent to the corresponding target chip 1; according to the JTAG protocol type corresponding to data 4, data 4 is sent to the corresponding target chip 4.

[0084] In an embodiment of the present application, the physical layer includes a CPU bus controller and at least two chips; the bus controller through the CPU receives the data sent by the target bus, and sends the data to the target chip corresponding to the communication protocol type according to the communication protocol type corresponding to the data.

[0085] In one embodiment, the method further includes: processing the data through the physical layer to obtain response data of the data, and calling the target bus to send the response data to the kernel layer; transmitting the response data to the user layer through the kernel layer.

[0086] Here, after sending the data to the physical layer through the bus, if it is a read operation, the physical layer processes the received data to obtain the response data of the data, and the transmission route of the response data is: physical layer, kernel layer, user layer. After the physical layer obtains the response data of the data, first, it calls the target bus to send the response data to the kernel layer, and the kernel layer receives the response data; transmits the response data to the user layer through the kernel layer, and the user layer receives the response data.

[0087] The target bus driver in the bus driver layer of the kernel layer sends data to the bus controller of the physical layer. The physical layer marks the bus controller as a read operation. After the bus controller sends the data, it will receive the response data returned by the temperature register address of the target chip. It should be noted here that when the bus controller sends data, it actually controls the timing of the bus pins sending high and low levels. The data is composed of these high and low levels, low is 0, and high is 1. When the target chip receives the data, it passes through the internal integrated logic gate circuit and then feeds back the response data to the bus controller through the bus output pin. The bus driver reads the corresponding address value of the bus controller through the CPU, which gets the response data from the target chip.

[0088] In an embodiment of the present application, if it is a read operation, the physical layer processes the data, obtains response data, and transmits the response data to the user layer through the kernel layer, so that the user obtains the response data of the data through the user layer, thereby improving the user experience.

[0089] In one embodiment, the kernel layer includes: a virtual device driver layer and a bus driver layer; the virtual device driver layer supports at least two communication protocol types; the bus driver layer provides a bus driver corresponding to each of the at least two communication protocol types; the transmitting the response data to the user layer through the kernel layer includes:

[0090] Sending the response data to the virtual device driver layer via the target bus driven by the target bus driver;

[0091] The response data is transmitted to the user layer through the virtual device driver layer.

[0092] Here, the kernel layer includes: a virtual device driver layer and a bus driver layer; the virtual device driver layer supports at least two communication protocol types. Among them, the communication protocol type may include: SPI protocol type, MII protocol type, USB protocol type, JTAG protocol type, IIC protocol type and other protocol types. For example: the virtual device driver layer supports the SPI protocol type and the USB protocol type; for another example: the virtual device driver layer supports the SPI protocol type, the USB protocol type and the JTAG protocol type.

[0093] Here, when the response data is transmitted to the user layer through the kernel layer, the target bus driver layer corresponding to the communication protocol type for transmitting the response data is determined according to the communication protocol type of the data corresponding to the response data, and the target bus driver layer is used to provide a target bus corresponding to the communication protocol type; the response data is sent to the virtual device driver layer through the target bus corresponding to the target bus driver.

[0094] For example: the response data of data 1 of the SPI protocol type is response data 1, and the target bus driver layer corresponding to the SPI protocol type sends response data 1 to the virtual device driver layer through the target bus corresponding to the target bus driver; the response data of data 2 of the USB protocol type is response data 2, and the target bus driver layer corresponding to the USB protocol type sends response data 2 to the virtual device driver layer through the target bus corresponding to the target bus driver.

[0095] Here, after the virtual device driver layer receives response data of different communication protocol types, the response data is transmitted to the user layer through the virtual device driver layer; wherein, when the response data is transmitted to the user layer through the virtual device driver layer, the response data of different communication protocol types may be integrated through the virtual device driver layer, and then the integrated response data is transmitted to the user layer.

[0096] For example: the communication protocol type of response data 1 is SPI protocol type, the communication protocol type of response data 2 is MII protocol type, the communication protocol type of response data 3 is USB protocol type, and the communication protocol type of response data 4 is JTAG protocol type; response data 1 of SPI protocol type, response data 2 of MII protocol type, response data 3 of USB protocol type, and response data 4 of JTAG protocol type are integrated through the virtual device driver layer and transmitted to the user layer.

[0097] In the embodiment of the present application, the response data is sent to the virtual device driver layer through the target bus driven by the target bus driver; and the response data is transmitted to the user layer through the virtual device driver layer.

[0098] Below, the data processing method provided in the embodiment of the present application is further explained by taking the chip debugging scenario as an example.

[0099] In the related art, the steps of device debugging include: based on the developed application layer interface (device adaptation layer), calling the device node provided by the kernel driver to debug the kernel driver and each device function, wherein the application layer interface is provided by the device adapter in the device adaptation layer, and the device node is provided by the kernel driver of the device driver layer.

[0100] Currently, the architecture of electronic devices such as Figure 2 As shown, it includes: a user layer 20-1, a kernel layer 20-2 and a physical layer 20-3. Among them, the user layer 20-1 includes: a user interface layer 21, a device application layer 22, and a device adaptation layer 23. The user interface layer 21 provides a user application programming interface (Application Programming Interface, Api), the device application layer 22 provides a chip Api of each chip, and the device adaptation layer 23 provides a chip adapter (Apt) of each chip; the kernel layer 20-2 includes: a device driver layer 24 and a bus driver layer 25. The device driver layer 24 provides a chip driver (Drv) of each chip, that is, a kernel driver, and the bus driver layer provides a bus driver corresponding to each communication protocol type, wherein the communication protocol type may include: SPI, JTAG, MII, PCIE, Serial Advanced Technology Attachment (SATA), USB, Serial Management Interface (SMI), Universal Asynchronous Receiver / Transmitter (UART), IIC, etc. The physical layer 20-3 includes a device physical layer 26. The device physical layer 26 is provided with a CPU controller, that is, a bus controller of the CPU and each chip.

[0101] Based on the above architecture, when there are too many types of chips and communication protocols on a single board, developing drivers for different chips with different communication protocols becomes a particularly heavy workload, for example: Figure 2 The device driver layer, device adaptation layer, and device application layer must all be developed before debugging can be carried out, and the debugging cycle is too long, which may even hinder the project progress and mass production of equipment.

[0102] The embodiment of the present application proposes a design scheme for fast debugging of a single board, which abstracts the communication bus between all chips on the device and the CPU into a kernel-state virtual device, wherein the virtual device is a non-real device, an abstract device without actual hardware simulated by software or other technical means.

[0103] During communication, the debugging system sends the communication protocol of each chip, the device address to be accessed, the communication bus ID, the register to be accessed, and the data required by the register to the virtual device. The virtual device processes the corresponding logic according to different communication protocols, and then sends the data to the bus controller of the CPU, thereby achieving the purpose of communication between the CPU and each device. Based on the virtual device, the embodiment of the present application also proposes a new driver design architecture, which describes the device function by layering the application layer according to attributes. The layers are single-board driver layer, single-board adaptation layer, device driver layer, and bus driver layer, and each layer has its own function. In actual applications, the adaptation and debugging of the device can be completed with minimal development workload.

[0104] In the embodiment of the present application, developers only need to simply adapt the debugging system to complete the rapid debugging of the entire board, and the debugging is extremely flexible and can support the debugging of multiple identical or different buses, thereby solving the following problems:

[0105] 1. Solve the time-consuming problem of early chip driver development;

[0106] 2. Solve the difficulty of early debugging of single board;

[0107] 3. Solve the inconvenience of chip driver debugging and maintenance;

[0108] 4. Solve the Linux kernel stability and security issues caused by too many non-native drivers;

[0109] 5. Different drivers need to be developed for different chips, that is, to solve the problem of poor scalability and compatibility of chip drivers.

[0110] The data processing method of the embodiment of the present application can be applied to all devices based on the Linux system, so that developers only need to simply adapt the debugging subsystem to complete the rapid debugging of the entire board, thereby realizing rapid debugging of a single board.

[0111] The data processing method of the embodiment of the present application includes: abstracting the communication bus between all chips on the device and the CPU into a kernel-state virtual device, the user layer can develop a device driver based on the virtual device, and then develop a debugging system based on the driver to debug the chip function; during communication, the debugging system sends the communication protocol of each chip, the device address to be accessed, the communication bus ID, the register to be accessed, and the data required by the register to the virtual device through the device driver layer, and the virtual device processes the corresponding logic according to different communication protocols, and then sends the data to the bus controller of the CPU, thereby achieving the purpose of communication between the CPU and each device.

[0112] The data processing method of the embodiment of the present application is as follows: Figure 3 As shown, including:

[0113] The debugging system 31 sends data to the device driver layer 32. The device driver layer 32 passes the data to the virtual device driver layer 33 in the kernel state through a system call. The virtual device driver layer 33 processes different protocol logics according to different communication protocols and sends the data to the CPU communication bus controllers 34. The CPU communication bus controllers 34 distribute the data to the chip 35. The chip 35 returns the data to the CPU communication bus controllers 34 after receiving the data, and then returns the data to the debugging system 31 through the virtual device driver layer 33 and the device driver layer 32, thereby completing the interaction process between the user and the device.

[0114] The electronic device architecture provided by the embodiments of the present application is as follows: Figure 4 As shown, it includes: user layer 40-1, kernel layer 40-2 and physical layer 40-3. Among them, user layer 40-1 includes: user interface layer 41, device application layer 42, device adaptation layer 43, user interface layer 41 provides user API, device application layer 42 provides chip API of each chip, and device adaptation layer 43 provides chip driver of each chip; kernel layer 40-2 includes: virtual device driver layer 44, bus driver layer 45, device driver layer 44 provides virtual device driver (Drv), bus driver layer 45 provides bus driver corresponding to each communication protocol type, wherein communication protocol type may include: SPI, JTAG, MII, PCIE, SATA, USB, SMI, UART, IIC, etc. Physical layer 40-3 includes device physical layer 46. Device physical layer 46 provides CPU controller, i.e., CPU bus controller and each chip.

[0115] The communication process between the application layer and the chip is as follows: the user interface layer 41 (User Api) sends communication data to the device application layer 42 (Device Api), the device application layer 42 sends the data to the device driver layer 43 (Device Drv), the device driver layer 43 sends the data to the virtual device driver layer 44 (Vm Device Drv) in the kernel state through a system call, the virtual device driver layer 44 parses the communication protocol in the user-transmitted data and sends it to the corresponding bus driver layer 45 (Bus Drv), the bus driver layer 45 transmits the data to each device (Device) in the physical layer 46 through the CPU bus controller of the read-write physical layer, thereby completing the communication work. If the user data is a read operation, each device in the device physical layer 46 (Device) will send the response data back layer by layer until the user interface layer 41.

[0116] In order to better achieve the purpose of fast debugging and adaptation of single boards, the embodiment of the present application also proposes a new driver design architecture, the core of which is to layer according to the functional features that users and developers are concerned about. For example, for a temperature sensor, users only need to pay attention to whether they can obtain the correct temperature, and do not need to care about the chip used in the hardware design. However, the underlying driver needs to pay attention to the chip used and the communication protocol, and make corresponding adaptation work. In order to prevent the device from being affected by too many changes to the entire software due to differences in components, the embodiment of the present application proposes a layered design scheme, and its structure Figure 5 As shown:

[0117] From top to bottom: user layer 51 -> kernel layer 52 -> physical layer 53.

[0118] The user layer 51 refers to various users who use the system and can communicate with the system through a wired or wireless network to complete the required work.

[0119] Kernel layer 52: refers to the operating system on which the device drivers and all resources based on the Linux kernel depend, and is usually the middle layer for the interaction between hardware and users.

[0120] Physical layer 53: refers to all hardware resources on the device, usually the basic circuit composed of various chips and CPU.

[0121] Here, the software framework of the user layer 51 is divided into four layers: single board driver sublayer 511->single board adapter sublayer 512->device driver sublayer 513->bus driver sublayer 514.

[0122] The board driver sublayer 511: namely, BDD (Board Device Driver), provides all functional interfaces supported on the board; provides functional interfaces for all devices on the board, namely, chips, provides user layer calls upward, and focuses on the functions of each device.

[0123] The board adapter layer 512 is BDA (Board Device Adapter), which provides functional interfaces for various devices on the board; it provides functional interfaces for chips, where the focus is on which chip provides the function, as well as chip information such as chip address, communication protocol type, and bus ID.

[0124] Device driver sublayer 513: DDI (Device Driver Interface), provides a basic interface for devices on the device to communicate; provides a driver interface for this device, only focusing on the driver of this device and driving all communication interfaces.

[0125] Bus driver sublayer 514: BDI (Bus Driver Interface), provides the bus driver required for device communication on the device, provides a communication protocol driver interface, only pays attention to the communication protocol type of the bus, provides a communication interface to the upper layer, and does not care what CPU provides it.

[0126] Here, the software framework of the kernel layer 52 is divided into two layers: virtual device layer 521 -> bus driver layer 522 .

[0127] Virtual device layer 521: provides all protocol drivers to user mode, which is abstracted as a virtual device.

[0128] Bus driver layer 522: provides communication protocol driver and pays attention to the type of CPU provided.

[0129] Here, the physical layer 53: the CPU controller and chip are determined by the hardware device and will not be elaborated here.

[0130] Through the above layering, developers can debug the entire board function based on the single-board driver layer, debug the chip function based on the single-board adaptation layer, and debug the chip driver based on the device driver layer; when encountering differences in different device designs, such as replacing the temperature sensor, you only need to add a new driver to the device driver layer in the user layer and add support for the new device to the single-board adaptation layer. The changes are very small and the user layer cannot perceive them or worry about them, which greatly improves the adaptation efficiency and debugging work.

[0131] The beneficial effects of the embodiments of the present application include the following:

[0132] The embodiments of the present application greatly improve the efficiency of single board debugging, save manpower and debugging development costs; can discover equipment design problems early, correct board defects in time, and avoid unnecessary costs; each device driver is completed in user mode, and debugging and maintenance are convenient and flexible;

[0133] It effectively guarantees the stability and security of the Linux kernel. Different chips with the same protocol can be debugged directly without additional development work, and have strong scalability and compatibility. The improvement of single-board debugging efficiency can speed up the project progress and buy more time for the project.

[0134] Based on the foregoing embodiments, an embodiment of the present application provides a data processing device, which includes the various layers included and can be implemented by a processor in a computer device; of course, it can also be implemented by a specific logic circuit; in the implementation process, the processor can be a central processing unit (CPU), a microprocessor (MPU), a digital signal processor (DSP) or a field programmable gate array (FPGA), etc.

[0135] Figure 6A schematic diagram of the structure of a data processing device according to an embodiment of the present application is shown in FIG. Figure 6 As shown, the device 10 includes: a user layer 11, a kernel layer 12 and a physical layer 13; wherein,

[0136] The user layer 11 is used to construct data and send the data to the kernel layer;

[0137] The kernel layer 12 is used to parse the communication protocol type of the data, obtain the target communication protocol type, and call the target bus driver corresponding to the target communication protocol type to process the data; the target bus driver processes the data with the processing logic corresponding to the target communication protocol type; the kernel layer supports at least two communication protocol types;

[0138] The kernel layer is also used to send the processed data to the target chip in the physical layer.

[0139] In one embodiment, the kernel layer 12 includes: a virtual device driver layer 121 and a bus driver layer 122; the virtual device driver layer supports at least two communication protocol types; the bus driver layer 122 provides a bus driver corresponding to each of the at least two communication protocol types;

[0140] The virtual device driver layer 121 is used to parse the communication protocol type of the data, obtain the communication protocol type of the data, and call the target bus driver corresponding to the communication protocol type;

[0141] The bus driver layer 122 is used to process the data using the processing logic corresponding to the target communication protocol type.

[0142] In one embodiment, the virtual device driver layer 12 is further used to receive summary information sent by the user layer 11; analyze the summary information of the data to obtain the communication protocol type of the data.

[0143] In one embodiment, if Figure 6 As shown, the user layer 11 includes: a single board driver sublayer 111, a single board adapter sublayer 112, a device driver sublayer 113 and a bus driver sublayer 114; wherein:

[0144] Providing a functional interface corresponding to the data through the single board driver sublayer 111 to call the interface of the target chip;

[0145] Providing an interface of the target chip through the single board adapter layer 112 to call chip information of the target chip;

[0146] The device driver sublayer 113 is used to call the driver interface of the target chip to determine the internal address of the target chip according to the chip information, and the communication interface corresponding to the target communication protocol type in the bus driver sublayer is called;

[0147] The bus driver sublayer 114 provides a bus driver corresponding to the target communication protocol type.

[0148] In one embodiment, if Figure 6 As shown, the physical layer 13 includes a central processing unit CPU bus controller 131 and at least two chips 132, and different chips have different communication protocol types;

[0149] The CPU bus controller 131 is configured to receive the processed data and send the processed data to a target chip in the at least two chips 132 .

[0150] In one embodiment, the physical layer 13 is used to process the data, obtain response data of the data, and call the target bus to send the response data to the kernel layer;

[0151] The kernel layer is used to transmit the response data to the user layer.

[0152] In one embodiment, if Figure 6 As shown, the kernel layer 12 includes: a virtual device driver layer 121 and a bus driver layer 122; the virtual device driver layer 121 supports at least two communication protocol types; the bus driver layer 122 provides bus drivers corresponding to each of the at least two communication protocol types;

[0153] The bus driver layer 122 is further used to send the response data to the virtual device driver layer via the bus corresponding to the bus driver;

[0154] The virtual device driver layer 121 is also used to integrate response data of different communication protocol types and transmit them to the user layer.

[0155] The description of the above device embodiment is similar to the description of the above method embodiment, and has similar beneficial effects as the method embodiment. For technical details not disclosed in the device embodiment of the present application, please refer to the description of the method embodiment of the present application for understanding.

[0156] It should be noted that in the embodiment of the present application, if the above-mentioned data processing method is implemented in the form of a software function module and sold or used as an independent product, it can also be stored in a computer-readable storage medium. Based on such an understanding, the technical solution of the embodiment of the present application is essentially or the part that contributes to the relevant technology can be embodied in the form of a software product, which is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the methods described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a U disk, a mobile hard disk, a read-only memory (ROM), a disk or an optical disk. In this way, the embodiment of the present application is not limited to any specific combination of hardware and software.

[0157] Correspondingly, an embodiment of the present application provides an electronic device, that is, a computer device, including a memory and a processor, wherein the memory stores a computer program that can be run on the processor, and when the processor executes the program, the steps in the data processing method provided in the above embodiment are implemented.

[0158] Correspondingly, an embodiment of the present application provides a storage medium, that is, a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps in the data processing method provided in the above embodiment are implemented.

[0159] It should be noted here that the description of the above storage medium and device embodiments is similar to the description of the above method embodiments, and has similar beneficial effects as the method embodiments. For technical details not disclosed in the storage medium and device embodiments of this application, please refer to the description of the method embodiments of this application for understanding.

[0160] It should be noted that Figure 7 A schematic diagram of a hardware entity of a computer device according to an embodiment of the present application is shown in FIG. Figure 7 As shown, the computer device 700 includes: a processor 701, at least one communication bus 702, a user interface 703, at least one external communication interface 704 and a memory 705. The communication bus 702 is configured to achieve connection and communication between these components. The user interface 703 may include a display screen, and the external communication interface 704 may include a standard wired interface and a wireless interface.

[0161] The memory 705 is configured to store instructions and applications executable by the processor 701, and can also cache data to be processed or processed by the processor 701 and various modules in the computer device (for example, image data, audio data, voice communication data, and video communication data), which can be implemented through flash memory (FLASH) or random access memory (Random Access Memory, RAM).

[0162] It should be understood that "one embodiment" or "an embodiment" mentioned throughout the specification means that specific features, structures or characteristics related to the embodiment are included in at least one embodiment of the present application. Therefore, "in one embodiment" or "in an embodiment" appearing throughout the specification does not necessarily refer to the same embodiment. In addition, these specific features, structures or characteristics can be combined in one or more embodiments in any suitable manner. It should be understood that in various embodiments of the present application, the size of the sequence number of the above-mentioned processes does not mean the order of execution, and 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 application. The above-mentioned sequence numbers of the embodiments of the present application are only for description and do not represent the advantages and disadvantages of the embodiments.

[0163] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or device including the element.

[0164] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. The device embodiments described above are only schematic. For example, the division of the unit is only a logical function division. There may be other division methods in actual implementation, such as: multiple units or components can be combined, or can be integrated into another system, or some features can be ignored, or not executed. In addition, the coupling, direct coupling, or communication connection between the components shown or discussed can be through some interfaces, and the indirect coupling or communication connection of the device or unit can be electrical, mechanical or other forms.

[0165] The units described above as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units; they may be located in one place or distributed on multiple network units; some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.

[0166] In addition, all functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may be a separate unit, or two or more units may be integrated into one unit; the above-mentioned integrated units may be implemented in the form of hardware or in the form of hardware plus software functional units.

[0167] A person skilled in the art can understand that all or part of the steps of implementing the above method embodiment can be completed by hardware related to program instructions, and the aforementioned program can be stored in a computer-readable storage medium. When the program is executed, it executes the steps of the above method embodiment; and the aforementioned storage medium includes: mobile storage devices, read-only memories (ROM), magnetic disks or optical disks, etc., various media that can store program codes.

[0168] Alternatively, if the above-mentioned integrated unit of the present application is implemented in the form of a software function module and sold or used as an independent product, it can also be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the embodiment of the present application can be essentially or partly embodied in the form of a software product that contributes to the relevant technology. The computer software product is stored in a storage medium, including several instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the methods described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as mobile storage devices, ROMs, magnetic disks, or optical disks.

[0169] The above is only an implementation method of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

Claims

1. A data processing method, characterized in that: The method comprises: Constructing data through the user layer and sending the data to the kernel layer; wherein the user layer includes: a single board driver sublayer, a single board adapter sublayer, a device driver sublayer and a bus driver sublayer, and the constructed data is to write or read data to the target chip; The communication protocol type of the data is parsed by the kernel layer to obtain a target communication protocol type, and a target bus driver corresponding to the target communication protocol type is called to process the data; the target bus driver processes the data with a processing logic corresponding to the target communication protocol type; the kernel layer supports at least two communication protocol types; Sending the processed data to the target chip in the physical layer through the kernel layer; Among them, the single board driver sublayer, the single board adaptation sublayer, the device driver sublayer and the bus driver sublayer provide different data interfaces, the single board driver sublayer can be used to debug the whole board function, the single board adaptation sublayer can be used to debug the chip function, and the device driver sublayer can be used to debug the chip driver.

2. The method according to claim 1, characterized in that The kernel layer includes: a virtual device driver layer and a bus driver layer; the virtual device driver layer supports at least two communication protocol types; the bus driver layer provides a bus driver corresponding to each of the at least two communication protocol types; the communication protocol type of the data is parsed by the kernel layer to obtain a target communication protocol type, and a target bus driver corresponding to the target communication protocol type is called to process the data, including: Parsing the communication protocol type of the data through the virtual device driver layer to obtain a target communication protocol type, and calling a target bus driver corresponding to the target communication protocol type; The data is processed by the target bus driver in the bus driver layer using processing logic corresponding to the target communication protocol type.

3. The method according to claim 2, characterized in that The step of parsing the communication protocol type of the data through the virtual device driver layer to obtain the target communication protocol type includes: Receiving summary information sent by the user layer through the virtual device driver layer; The summary information of the data is parsed through the virtual device driver layer to obtain the target communication protocol type.

4. The method according to claim 1, characterized in that: Providing a functional interface corresponding to the data through the single board driver sublayer to call the interface of the target chip; Providing an interface of the target chip through the single board adapter layer to call chip information of the target chip; The driver interface of the target chip is called through the device driver sublayer to determine the internal address of the target chip according to the chip information, and the corresponding communication interface in the bus driver sublayer is called according to the communication protocol type in the chip information; The corresponding communication interface is provided to the device driver sublayer through the bus driver sublayer.

5. The method according to claim 1, characterized in that: The physical layer includes a central processing unit (CPU) bus controller and at least two chips, and different chips have different communication protocol types; the method also includes: The processed data is received through the CPU bus controller, and the processed data is sent to a target chip among the at least two chips.

6. The method according to claim 1, characterized in that The method further comprises: Processing the data through the physical layer to obtain response data of the data, and sending the response data to the kernel layer; The response data is transmitted to the user layer through the kernel layer.

7. The method according to claim 6, characterized in that The kernel layer includes: a virtual device driver layer and a bus driver layer; the virtual device driver layer supports at least two communication protocol types; the bus driver layer provides a bus driver corresponding to each of the at least two communication protocol types; the transmitting the response data to the user layer through the kernel layer includes: Sending the response data to the virtual device driver layer via the target bus driven by the target bus driver; The response data is transmitted to the user layer through the virtual device driver layer.

8. A data processing device, characterized in that: include: User layer and kernel layer; among them, The user layer is used to construct data and send the data to the kernel layer; wherein the user layer includes: a single board driver sublayer, a single board adapter sublayer, a device driver sublayer and a bus driver sublayer; the constructed data is to write or read data to the target chip; The kernel layer is used to parse the communication protocol type of the data, obtain the target communication protocol type, and call the target bus driver corresponding to the target communication protocol type to process the data; the target bus driver processes the data with the processing logic corresponding to the target communication protocol type; the kernel layer supports at least two communication protocol types; The kernel layer is also used to send the processed data to the target chip in the physical layer; Among them, the single board driver sublayer, the single board adaptation sublayer, the device driver sublayer and the bus driver sublayer provide different data interfaces, the single board driver sublayer can be used to debug the whole board function, the single board adaptation sublayer can be used to debug the chip function, and the device driver sublayer can be used to debug the chip driver.

9. A computer device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the data processing method according to any one of claims 1 to 7 are implemented.

10. A storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps in the data processing method according to any one of claims 1 to 7 are implemented.