Microkernel data transmission method, system, device and storage medium
By separating the inter-process communication module from the serial bus core module in the microkernel data transmission system, the problem of system unavailability caused by USB protocol stack errors was solved, thus achieving system stability and data transmission reliability.
Patent Information
- Application Number
- CN202211572331.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-08
- Publication Date
- 2025-12-16
- Estimated Expiration
- 2042-12-08
AI Technical Summary
In existing technologies, the USB protocol stack and driver are located in kernel mode, which makes the system unusable in case of errors.
By adopting a microkernel data transmission method, the inter-process communication module is separated from the serial bus core module. The inter-process communication module receives data read and write requests, and the serial bus core module reads the target data and sends it to the target device connected to the Universal Serial Bus, thereby realizing the separation of the USB protocol stack and the system kernel mode.
In the event of a USB protocol stack error, ensure system stability and prevent data transmission failure.
Smart Images

Figure CN115934607B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of communication, in particular to a microkernel data transmission method, system, device and storage medium. BACKGROUND
[0002] When communicating between devices, in addition to wired communication being an indispensable way, the current USB (Universal Serial Bus) transmission mode is a common transmission mode in wired transmission.
[0003] At present, the USB protocol stack and related drivers in the prior art are located in the kernel state, and the kernel state directly communicates with the USB controller. In the application process, the read and write requirements are entered into the kernel through a system call in the user state, and then the USB controller is communicated to perform data transmission.
[0004] However, the inventors have found that the prior art at least has the following technical problems: Since the USB protocol stack and the driver are located in the kernel, in the case of an error in the USB protocol stack or the driver, the system becomes unusable. SUMMARY
[0005] The present application provides a microkernel data transmission method, system, device and storage medium to solve the problem that the system becomes unusable in the case of an error in the USB protocol stack or the driver.
[0006] In a first aspect, the present application provides a microkernel data transmission method applied to a microkernel data transmission system, the microkernel data transmission system comprising an inter-process communication module and a serial bus core module; the method comprising: the inter-process communication module receiving a data read-write request sent by an application program, and sending the data read-write request to the serial bus core module; the serial bus core module reading corresponding target data according to the data read-write request, and sending the target data to a target device connected by a universal serial bus.
[0007] In a possible implementation, the microkernel data transmission system further comprises a host controller module; correspondingly, sending the target data to the target device connected by the universal serial bus comprises: sending the target data to the host controller module, so that the host controller module acquires an interface state in response to receiving the target data, and sends the target data to the target device connected by the universal serial bus when the interface state is idle.
[0008] In a possible implementation, the data read-write request comprises a data position and a data length; correspondingly, the serial bus core module reads corresponding target data according to the data read-write request comprises: the serial bus core module reads data of the data length stored in the data position to obtain the target data.
[0009] In a possible implementation, the microkernel data transmission system further includes a data conversion module; accordingly, the inter-process communication module receives the data read / write request sent by the application program and sends the data read / write request to the serial bus core module, including: the inter-process communication module receives the data read / write request sent by the application program and sends the data read / write request to the data conversion module; the data conversion module converts the data read / write request into a data read / write request in a preset format, and sends the data read / write request in the preset format to the serial bus core module.
[0010] In a possible implementation, the microkernel data transmission system further includes a device driver module; accordingly, the data read / write request in the preset format is sent to the serial bus core module, including: the data read / write request in the preset format is sent to the device driver module, so that the device driver module sends the data read / write request in the preset format to the serial bus core module.
[0011] In a possible implementation, after the serial bus core module reads the corresponding target data according to the data read / write request, the microkernel data transmission system further includes: writing the target data into a storage unit.
[0012] In a possible implementation, the microkernel data transmission system further includes a host controller module; the serial bus core module is configured to send the target data to the host controller module, so that the host controller module acquires an interface state in response to receiving the target data, and sends the target data to the target device connected by the universal serial bus when the interface state is idle.
[0013] In a possible implementation, the microkernel data transmission system further includes a host controller module; the serial bus core module is configured to send the target data to the host controller module, so that the host controller module acquires an interface state in response to receiving the target data, and sends the target data to the target device connected by the universal serial bus when the interface state is idle.
[0014] In a possible implementation, the microkernel data transmission system further includes a host controller module; the serial bus core module is configured to send the target data to the host controller module, so that the host controller module acquires an interface state in response to receiving the target data, and sends the target data to the target device connected by the universal serial bus when the interface state is idle.
[0015] In a possible implementation, the microkernel data transmission system further includes a host controller module; the serial bus core module is configured to send the target data to the host controller module, so that the host controller module acquires an interface state in response to receiving the target data, and sends the target data to the target device connected by the universal serial bus when the interface state is idle.
[0016] The microkernel data transmission method, system, device and storage medium provided by the application, by adopting an inter-process communication module to receive a data read-write request, and sending the data read-write request to a serial bus core module, the serial bus core module reads target data according to the data read-write request, and sends the target data to a target device connected by a universal serial bus, so as to realize data transmission by using a microkernel system, thereby separating the USB protocol stack from the system kernel state, and ensuring the stability of the system in the case of USB protocol stack error. BRIEF DESCRIPTION OF DRAWINGS
[0017] The accompanying drawings, which are incorporated herein and constitute part of the specification, illustrate embodiments consistent with the application and, together with the description, serve to explain the principles of the application.
[0018] Figure 1 The application scenario of the microkernel data transmission method provided by the embodiment of the application is shown in the figure.
[0019] Figure 2 The flowchart of the microkernel data transmission method provided by the embodiment of the application is shown in the figure.
[0020] Figure 3 The structure diagram of the microkernel data transmission system provided by the embodiment of the application is shown in the figure.
[0021] Figure 4 The structure diagram of the single-sub device provided by the embodiment of the application is shown in the figure.
[0022] The specific embodiments of the application have been shown and described in the above-described drawings, and will be described in more detail hereinafter. These drawings and the written description are not intended to limit the scope of the inventive concept in any way, but to illustrate the inventive concept to those skilled in the art by reference to specific embodiments. DETAILED DESCRIPTION
[0023] The exemplary embodiments will be described in detail herein with reference to the attached drawings. The same numbers are used in different drawings to represent the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all the implementations consistent with the application. Instead, they are merely examples of apparatus and methods consistent with some aspects of the application as detailed in the appended claims.
[0024] Figure 1 The application scenario of the microkernel data transmission method provided by the embodiment of the application is shown in the figure. Figure 1 In this scenario, it includes a first device 101, a second device 102, and a universal serial bus 103.
[0025] In the implementation process, the first device 101 and the second device 102 can be any one of a computer, a server, a tablet, a mobile phone, a personal digital assistant (PDA), a notebook computer, and the like, which can read and write data and transmit data through a USB line.
[0026] The second device can also be a USB flash disk, a mobile hard disk, or the like, which can transmit data through a USB line or a USB interface.
[0027] The first device 101 is configured to read data of the first device 101 and transmit the data to the second device 102 through the universal serial bus 103.
[0028] It can be understood that the structure shown in the embodiments of the present application does not constitute a specific limitation on the microkernel data transmission method. In other feasible embodiments of the present application, the above-mentioned architecture can include more or fewer components than the diagram, or combine certain components, or split certain components, or different component arrangement, which can be determined according to the actual application scene, and is not limited herein. Figure 1 The scenario shown can be implemented by hardware, software, or a combination of software and hardware.
[0029] The technical solutions of the present application and how the technical solutions of the present application solve the above-mentioned technical problems will be described in detail below with specific embodiments. The following specific embodiments can be combined with each other, and the same or similar concepts or processes can not be described in detail in some embodiments. The embodiments of the present application will be described below with reference to the accompanying drawings.
[0030] Figure 2 The flowchart of the microkernel data transmission method provided by the embodiments of the present application is shown. The execution subject of the embodiments of the present application can be a microkernel data transmission system in the first device in the first device, which includes an inter-process communication module and a serial bus core module. The microkernel data transmission system can also be located in the first device, and the embodiments of the present application do not make special limitations. As shown in Figure 1 The method includes the following steps. Figure 2
[0031] S201: The inter-process communication module receives a data read-write request sent by an application program, and sends the data read-write request to the serial bus core module.
[0032] In this step, the application program can be an application program installed in the first device, or a system program in the first device.
[0033] The inter-process communication module receives a data read-write request, which can be received through an I / O (Input / Output) interface or a bus or circuit in the first device. The system program can be, for example, a file system.
[0034] For example, the application A sends a data read-write request, such as reading a C file in a B folder of a F disk. The data read-write request can also be reading a D file in the C folder, and the embodiments of the present application do not limit the specific content of the data read request. The application can also be an operation of the system, such as a mouse trigger on a file, generating a data read-write request to read the file. The application can also be a keyboard input, generating a data write data read-write request. In the embodiments of the present application, the data read-write request can be a request to read data from the first device and write to the above-mentioned second device, or a request to read data from the second device and write to the first device.
[0035] S202: The serial bus core module reads the corresponding target data according to the data read-write request, and sends the target data to the target device connected by the universal serial bus.
[0036] In this step, the target data specified in the data read-write request can be read. The target data can be sent to the target device connected by the universal serial bus, or can be sent to a target storage location in the target device through the universal serial bus. The data read-write request can also include a target device or a destination address in the target device for data transmission.
[0037] For example, data A in the second device is read and transmitted to the first device through the USB line. For example, data B in the first device is read and transmitted to the storage address N of the second device through the USB line.
[0038] In a possible implementation, the data read-write request includes a data location and a data length.
[0039] Correspondingly, in the above step S202, the serial bus core module reads the corresponding target data according to the data read-write request, including:
[0040] S202A: The serial bus core module reads the data of the data length stored in the data location to obtain the target data.
[0041] In this step, the data of the data length stored in the above data location can be read to obtain the target data.
[0042] For example, the serial bus core module reads data stored at location A with a length of 512 bytes. For another example, the serial bus core module reads data stored at location B with a length of 75618 bytes. For yet another example, the serial bus core module reads data stored at location C with a length of 95739 bytes. Embodiments of the present application do not limit the specific location and length of the stored data.
[0043] As can be seen from the description of the above embodiments, the embodiments of the present application receive a data read-write request by using the inter-process communication module, and send the data read-write request to the serial bus core module. The serial bus core module reads target data according to the data read-write request, and sends the target data to a target device connected by the universal serial bus, so as to realize data transmission by using the microkernel system, thereby separating the USB protocol stack from the system kernel state, and ensuring the stability of the system in the case of error of the USB protocol stack.
[0044] In a possible implementation, the microkernel data transmission system further includes a host controller module.
[0045] The host controller module can include a host controller unit, and the host controller unit can be installed with a host controller driver, a root hub driver, and an OS (operating system) interface abstraction module.
[0046] Correspondingly, the step S202 of sending the target data to the target device connected by the universal serial bus includes:
[0047] S202B: sending the target data to the host controller module, so that the host controller module acquires an interface state in response to receiving the target data, and sends the target data to the target device connected by the universal serial bus when the interface state is idle.
[0048] In this step, the interface can include a register interface and / or a DMA (Direct Memory Access) interface. The interface state can be acquired by using a preset program or script. The host controller driver and the root hub driver can receive a disconnection instruction, and send the disconnection instruction to the serial bus core module after format conversion, so that the bus core module controls the disconnection of the USB connection.
[0049] As can be seen from the description of the above embodiments, the embodiments of the present application send the target data to the host controller module, so that the host controller module acquires an interface state, and sends the target data to the target device when the interface state is idle, thereby realizing data transmission according to the interface state, and avoiding data transmission failure.
[0050] In a possible implementation, the microkernel data transmission system further comprises a data conversion module.
[0051] Accordingly, in step S201, the inter-process communication module receives the data read / write request sent by the application program, and sends the data read / write request to the serial bus core module, including:
[0052] S2011: The inter-process communication module receives the data read / write request sent by the application program, and sends the data read / write request to the data conversion module.
[0053] This step is similar to step S201 described above, and will not be described here.
[0054] S2012: The data conversion module converts the data read / write request into a data read / write request in a preset format, and sends the data read / write request in the preset format to the serial bus core module.
[0055] In this step, the data read / write request in the preset format can be a structure body recognizable by the USB protocol, such as a USB request block (URB). The conversion mode can be to use a preset program for conversion, and the preset program can be input, edited or called by the staff.
[0056] In a possible implementation, the microkernel data transmission system further comprises a device driver module.
[0057] Accordingly, in step S2012, the data read / write request in the preset format is sent to the serial bus core module, including:
[0058] S2012A: The data read / write request in the preset format is sent to the device driver module, so that the device driver module sends the data read / write request in the preset format to the serial bus core module.
[0059] In this step, the device driver module can be a USB device driver program. In this step, the sending can be sent through software, hardware or a combination of software and hardware.
[0060] From the description of the above embodiments, it can be known that, by sending the data read / write request in the preset format to the device driver module, and sending the data read / write request in the preset format to the serial bus core module by the device driver module, the serial bus core module can recognize the data read / write request.
[0061] In a possible implementation, after the serial bus core module reads the corresponding target data according to the data read / write request in step S202, it further comprises:
[0062] S203: write the target data into the storage unit.
[0063] In this step, if the target device is the first device, the storage unit can be the storage unit of the first device. If the target device is the second device, the storage unit can be the storage unit of the second device.
[0064] From the description of the above embodiments, it can be seen that the embodiments of the application achieve the storage of the target data by writing the target data into the storage unit.
[0065] In a possible implementation, the host controller module receives the interrupt connection instruction of the second device, converts the interrupt connection instruction into a target instruction in a format readable by the serial bus core module, and sends the target instruction to the serial bus core module, so that the serial bus core module controls the first device and the second device to be disconnected.
[0066] The conversion of the interrupt connection instruction into the target instruction in the format readable by the serial bus core module can be, after receiving the interrupt service instruction, calling an interrupt service function to control the host control driver and the root hub driver to output the target instruction.
[0067] In a possible implementation, the host controller module can also read the state register of the USB through the host state information transmission channel to achieve the transmission of the control information.
[0068] For example, the instruction is used to read the state register in the host controller through the host state information transmission channel to obtain a control instruction, and the control instruction is transmitted to the second device or a module in the microkernel data transmission system.
[0069] Figure 3 A structure diagram of the microkernel data transmission system provided by the embodiments of the application is shown in FIG. 3. Figure 3 As shown in FIG. 3, the microkernel data transmission system 300 includes an inter-process communication module 301 and a serial bus core module 302.
[0070] The inter-process communication module 301 is configured to receive a data read / write request sent by an application program, and send the data read / write request to the serial bus core module 302.
[0071] The serial bus core module 302 is configured to read corresponding target data according to the data read / write request, and send the target data to a target device connected by the universal serial bus.
[0072] The system provided by the embodiments of the application can be used to execute the technical solutions of the above method embodiments, and has similar implementation principles and technical effects, which will not be described here again.
[0073] Continuing to refer to Figure 3In a possible implementation, the microkernel data transmission system 300 further comprises a host controller module 303.
[0074] The serial bus core module 302 is configured to send target data to the host controller module 303, so that the host controller module 303 acquires an interface state in response to receiving the target data, and sends the target data to a target device connected by the universal serial bus when the interface state is idle.
[0075] The system provided in the embodiment can be used to execute the technical solutions of the method embodiments, and has similar implementation principles and technical effects, which will not be repeated here.
[0076] In a possible implementation, the data read / write request comprises a data position and a data length.
[0077] Correspondingly, the serial bus core module 302 is configured to read the corresponding target data according to the data read / write request, including that the serial bus core module 302 reads data of the data length stored in the data position to obtain the target data.
[0078] The system provided in the embodiment can be used to execute the technical solutions of the method embodiments, and has similar implementation principles and technical effects, which will not be repeated here.
[0079] With reference back to Figure 3 In a possible implementation, the microkernel data transmission system 300 further comprises a data conversion module 304.
[0080] Correspondingly, the inter-process communication module receives the data read / write request sent by the application program, and sends the data read / write request to the serial bus core module, including:
[0081] The inter-process communication module 301 is configured to receive the data read / write request sent by the application program, and send the data read / write request to the data conversion module 304.
[0082] The data conversion module 304 is configured to convert the data read / write request into a data read / write request in a preset format, and send the data read / write request in the preset format to the serial bus core module 302.
[0083] The system provided in the embodiment can be used to execute the technical solutions of the method embodiments, and has similar implementation principles and technical effects, which will not be repeated here.
[0084] With reference back to Figure 3 In a possible implementation, the microkernel data transmission system 300 further comprises a device driver module 305.
[0085] Correspondingly, the data read-write request in the preset format is sent to the serial bus core module, including:
[0086] The data read-write request in the preset format is sent to the device driver module 305, so that the device driver module 305 sends the data read-write request in the preset format to the serial bus core module 302.
[0087] The system provided by the embodiment can be used to execute the technical solutions of the method embodiments, and has similar implementation principles and technical effects, which will not be described here again.
[0088] In a possible implementation, after the serial bus core module 302 reads the corresponding target data according to the data read-write request, the serial bus core module 302 is further configured to write the target data into a storage unit.
[0089] The system provided by the embodiment can be used to execute the technical solutions of the method embodiments, and has similar implementation principles and technical effects, which will not be described here again.
[0090] In a possible implementation, the data conversion module can be an interface abstraction module.
[0091] In order to implement the above-mentioned embodiments, the embodiment of the application further provides an electronic device. The microkernel data transmission system 300 can further include a universal serial bus service module 306. The serial bus service module 306 is configured to wait for a data read-write request sent by an application program through an inter-process communication module, and send the data read-write request to the data conversion module after receiving the data read-write request.
[0092] With reference to Figure 3 The microkernel data transmission system 300 provided by the embodiment of the application constitutes a USB user protocol stack, has an IPC (inter-process communication) architecture of an RTOS (Real Time Operating System, real-time operating system) microkernel and a USB host controller interface, and can have a register read-write interface of hardware in the USB host controller. When the USB service process is loaded in the system startup, the USB protocol stack is initialized in the user state.
[0093] With reference to Figure 4The diagram illustrates a structural schematic of an electronic device 400 suitable for implementing embodiments of this application. The electronic device 400 can be a terminal device or a server. The terminal device can include, but is not limited to, mobile terminals such as mobile phones, laptops, digital radio receivers, personal digital assistants (PDAs), portable Android devices (PADs), portable media players (PMPs), and in-vehicle terminals (e.g., in-vehicle navigation terminals), as well as fixed terminals such as digital TVs and desktop computers. Figure 4 The electronic device shown is merely an example and should not impose any limitation on the functionality and scope of use of the embodiments of this application.
[0094] like Figure 4 As shown, the electronic device 400 may include a processor (e.g., a central processing unit, a graphics processing unit, etc.) 401 and a memory 402 communicatively connected to the processor. The memory 402 may be a read-only memory (ROM). The processor 401 can perform various appropriate actions and processes according to programs stored in the memory 402, computer-executed instructions, or programs loaded from the storage device 408 into the random access memory (RAM) 403, thereby implementing the microkernel data transmission method in any of the above embodiments. The RAM 403 also stores various programs and data required for the operation of the electronic device 400. The processing device 401, the memory 402, and the RAM 403 are interconnected via a bus 404. An input / output (I / O) interface 405 is also connected to the bus 404.
[0095] Typically, the following devices can be connected to I / O interface 405: input devices 406 including, for example, touchscreens, touchpads, keyboards, mice, cameras, microphones, accelerometers, gyroscopes, etc.; output devices 407 including, for example, liquid crystal displays (LCDs), speakers, vibrators, etc.; storage devices 408 including, for example, magnetic tapes, hard disks, etc.; and communication devices 409. Communication device 409 allows electronic device 400 to communicate wirelessly or wiredly with other devices to exchange data. Although Figure 4 An electronic device 400 with various devices is shown; however, it should be understood that it is not required to implement or possess all of the devices shown. More or fewer devices may be implemented or possessed alternatively.
[0096] In particular, in accordance with an embodiment of the present application, the processes described above with reference to the flowcharts can be implemented as a computer software program. For example, an embodiment of the present application includes a computer program product comprising a computer program carried on a computer readable storage medium, the computer program comprising program code for performing the methods illustrated by the flowcharts. In such an embodiment, the computer program can be downloaded and installed from a network via the communication device 409, or installed from the storage device 408, or installed from the memory 402. When the computer program is executed by the processing device 401, the above-mentioned functions defined in the methods of the embodiments of the present application are performed.
[0097] It should be noted that the computer readable storage medium described above in the present application can be a computer readable signal medium or a computer storage medium or any combination thereof. The computer readable storage medium may, for example, be, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or apparatus, or any suitable combination thereof. More specific examples of the computer readable storage medium can include, but are not limited to, an electrical connection having one or more wires, a portable computer diskette, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof. In the present application, the computer readable storage medium can be any tangible medium that contains or stores a program that can be used by or in connection with an instruction execution system, apparatus or device. In the present application, the computer readable signal medium can include a data signal carried in a baseband or as a part of a carrier wave, which carries computer readable program code. Such a propagated data signal can take on many forms, including but not limited to an electromagnetic signal, an optical signal, or any suitable combination thereof. The computer readable signal medium can also be any computer readable medium that is not a computer readable storage medium and that can communicate, transmit or propagate program code for use by or in connection with an instruction execution system, apparatus or device. The program code contained on the computer readable storage medium can be transmitted or propagated using any suitable medium, including but not limited to wire, cable, fiber optic, RF (radio frequency), or any suitable combination thereof.
[0098] The computer readable storage medium described above can be included in the electronic device described above; or can exist separately from the electronic device and not be assembled into the electronic device.
[0099] The computer readable storage medium described above carries one or more programs, which, when executed by the electronic device, cause the electronic device to perform the methods shown in the embodiments described above.
[0100] Computer program code for carrying out operations of the present application can be written in any combination of one or more programming languages, including an object oriented programming language such as Java, Smalltalk, C++ or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code can execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the latter scenario, the remote computer can be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or the connection can be made to an external computer (for example, through the Internet using an Internet Service Provider).
[0101] The computer program instructions can also be loaded onto a computer or other programmable information processing apparatus to cause a series of operations to be performed on the computer or other programmable information processing apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable information processing apparatus implement the functions / acts specified in the flowchart and / or block diagram block or blocks.
[0102] The modules involved in the embodiments described in the present application can be implemented in software or hardware. Among them, the name of the unit does not constitute a limitation to the module itself in some cases, for example, the serial bus core module can also be described as a "core module".
[0103] The functions described above in the specification can be performed at least in part by one or more hardware logic components. For example, and without limitation, illustrative types of hardware logic components that can be used include Field-programmable Gate Arrays (FPGAs), Program-specific Integrated Circuits (ASICs), Program-specific Standard Products (ASSPs), System-on-a-chip systems (SOCs), Complex Programmable Logic Devices (CPLDs), etc.
[0104] The application further provides a computer readable storage medium, which stores computer execution instructions, and when a processor executes the computer execution instructions, the technical solution of the microkernel data transmission method in any of the above embodiments is realized, the implementation principle and beneficial effects of which are similar to those of the microkernel data transmission method, and can be referred to the implementation principle and beneficial effects of the microkernel data transmission method, which will not be described herein again.
[0105] In the context of the present application, the machine readable medium can be a tangible medium which can contain or store the program for use by or in connection with an instruction execution system, apparatus, or device. The machine readable medium can be a machine readable signal medium or a machine readable storage medium. The machine readable medium can include, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the above. More specific examples of the machine readable storage medium can include one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical storage devices, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the above.
[0106] The application further provides a computer program product, which includes a computer program, and when the computer program is executed by a processor, the technical solution of the microkernel data transmission method in any of the above embodiments is realized, the implementation principle and beneficial effects of which are similar to those of the microkernel data transmission method, and can be referred to the implementation principle and beneficial effects of the microkernel data transmission method, which will not be described herein again.
[0107] The above description is merely preferred embodiments of the present application and a description of the principles of the applied technology. It should be understood by those skilled in the art that the disclosed range of the present application is not limited to the technical solutions formed by the specific combinations of the above technical features, and also covers other technical solutions formed by any combinations of the above technical features or equivalent features without departing from the disclosed concept. For example, the above features can be replaced with the technical features disclosed in the present application (but not limited to) having similar functions to form technical solutions.
[0108] Other embodiments of the application will be apparent to those skilled in the art from consideration of the specification and practice of the application disclosed herein. It is intended that the specification and examples be considered as exemplary only, with the true scope and spirit of the application being indicated by the following claims.
[0109] It is to be understood that the application is not limited to the precise construction herein described and as shown in the attached drawings, and that various modifications and changes can be made by those skilled in the art without departing from the scope of the application. The scope of the application is to be indicated by the appended claims, rather than the description and examples.
Claims
1. A microkernel data transmission method, characterized in that, The method is applied to a microkernel data transmission system, which includes an inter-process communication module and a serial bus core module; the method includes: The inter-process communication module receives data read / write requests sent by the application and sends the data read / write requests to the serial bus core module; The serial bus core module reads the corresponding target data according to the data read / write request and sends the target data to the target device connected to the Universal Serial Bus; wherein, the inter-process communication module and the serial bus core module run in user mode and are used to separate the USB protocol stack from the system kernel mode.
2. The method according to claim 1, characterized in that, The microkernel data transmission system also includes a host controller module; Accordingly, sending the target data to the target device connected to the Universal Serial Bus includes: The target data is sent to the host controller module, so that the host controller module, in response to receiving the target data, obtains the interface status, and when the interface status is idle, sends the target data to the target device connected to the universal serial bus.
3. The method according to claim 1, characterized in that, The data read / write request includes the data location and data length; Accordingly, the serial bus core module reads the corresponding target data according to the data read / write request, including: The serial bus core module reads the data of the specified length stored in the data location to obtain the target data.
4. The method according to claim 1, characterized in that, The microkernel data transmission system also includes a data conversion module; Accordingly, the inter-process communication module receives data read / write requests sent by the application and sends the data read / write requests to the serial bus core module, including: The inter-process communication module receives data read / write requests sent by the application and sends the data read / write requests to the data conversion module; The data conversion module converts the data read / write request into a preset format data read / write request and sends the preset format data read / write request to the serial bus core module.
5. The method according to claim 4, characterized in that, The microkernel data transmission system also includes a device driver module; Accordingly, sending the data read / write request in the preset format to the serial bus core module includes: The preset format data read / write request is sent to the device driver module, so that the device driver module sends the preset format data read / write request to the serial bus core module.
6. The method according to claim 1, characterized in that, After the serial bus core module reads the corresponding target data according to the data read / write request, it further includes: The target data is written into the storage unit.
7. A microkernel data transmission system, characterized in that, include: Inter-process communication module and serial bus core module; The inter-process communication module is used to receive data read / write requests sent by the application and send the data read / write requests to the serial bus core module. The serial bus core module is used to read the corresponding target data according to the data read / write request and send the target data to the target device connected by the Universal Serial Bus; wherein, the inter-process communication module and the serial bus core module run in user mode and are used to separate the USB protocol stack from the system kernel mode.
8. The system according to claim 7, characterized in that, The microkernel data transmission system also includes a host controller module; The serial bus core module is used to send the target data to the host controller module, so that the host controller module, in response to receiving the target data, obtains the interface status, and when the interface status is idle, sends the target data to the target device connected to the universal serial bus.
9. An electronic device, characterized in that, include: A processor, and a memory communicatively connected to the processor; The memory stores computer-executed instructions; The processor executes computer execution instructions stored in the memory, causing the processor to perform the microkernel data transfer method as described in any one of claims 1 to 6.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-executable instructions, which, when executed by a processor, are used to implement the microkernel data transmission method as described in any one of claims 1 to 6.
Citation Information
Patent Citations
Method for conducting information flow exchange by two electronic device under USB structure and system for applying the same method
CN1707455A