Access method, computer readable storage medium, computing board card and all-in-one machine
By mapping the interface of the expansion board to the computing board and mounting it as a virtual device, the complexity problem of the computing board accessing the expansion board interface in the all-in-one machine is solved, and unified control of the expansion board interface is achieved and access.
Patent Information
- Application Number
- CN202411310100.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-19
- Publication Date
- 2025-02-07
AI Technical Summary
In an all-in-one computer, when the computing board accesses the expansion bus/IO board, it needs to be connected through a custom network, which results in the same functional board using different communication protocols, making it difficult for the application layer to access the expansion board interface uniformly.
A method of access is proposed to map the interface of the expansion board to the computing board card. The expansion board card is mounted to the computing board system in the form of a virtual device. By accessing the virtual device, a virtual device and the expansion board is established. The interface access channel realizes control of the expansion board interface.
It realizes unified control of the expansion board interface, and users can access virtual devices like local devices, solving the problem of application layer access difficulties caused by different communication protocols.
Smart Images

Figure CN119402536A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of all-in-one machines, and in particular to an access method, a computer-readable storage medium, a computing board, and an all-in-one machine. Background Art
[0002] When the computing board in the all-in-one machine accesses the expansion bus / IO board, it usually needs to use the network to connect to the expansion bus / IO board, and then use the connected link to access the external interface of the expansion board. The protocol used for the connection is usually customized. When the boards with the same function use different communication protocols, it is not convenient for the application layer to access the interface of the expansion board. Summary of the invention
[0003] The present invention aims to solve one of the technical problems in the related art at least to a certain extent. To this end, one purpose of the present invention is to propose an access method, mapping the interface of the expansion board to the computing board, and mounting the expansion board to the system of the computing board in the form of a virtual device, so that the virtual device can be accessed like a local device.
[0004] A second object of the present invention is to provide a computer-readable storage medium.
[0005] The third objective of the present invention is to provide a computing board.
[0006] A fourth objective of the present invention is to provide an all-in-one machine.
[0007] To achieve the above-mentioned purpose, the first aspect of the present invention proposes an access method for a computing board, wherein the computing board is communicatively connected to an expansion board, and the method comprises: sending a connection request to the expansion board according to a broadcast message sent by the expansion board; receiving interface attribute information fed back by the expansion board based on the connection request, and registering a virtual device corresponding to the interface according to the interface attribute information, so as to establish an interface access channel between the virtual device and the expansion board by accessing the virtual device, thereby realizing control of the expansion board interface.
[0008] According to the access method of an embodiment of the present invention, the interface of the expansion board is mapped to the computing board, and the expansion board is mounted to the system of the computing board as a virtual device. The virtual device can be accessed like a local device, thereby controlling the external interface of the expansion board.
[0009] In addition, the access method proposed in the above embodiment of the present invention may also have the following additional technical features:
[0010] According to one embodiment of the present invention, the broadcast message includes the basic interface information of the expansion board, and the sending of a connection request to the expansion board according to the broadcast message sent by the expansion board includes: when receiving the broadcast message sent by the expansion board, sending a connection request to the expansion board based on the basic interface information in the broadcast message to query the interface attribute information of the interface supported by the expansion board, wherein the basic interface information includes the interface type, the quantity of each interface type, and the basic service port number.
[0011] According to one embodiment of the present invention, the computing board includes a virtual device driver layer, and the registering of the virtual device corresponding to the interface according to the interface attribute information includes: sending a registration request to the virtual device driver layer based on the interface attribute information, and using the virtual device driver layer to register the virtual device corresponding to the interface.
[0012] According to one embodiment of the present invention, the establishment of the interface access channel between the virtual device and the expansion board includes: determining the target virtual device based on a request for accessing the virtual device issued by a user; establishing the interface access channel between the target virtual device and the expansion board based on the interface attribute information of the target virtual device, and connecting the expansion board; when the expansion board accepts the connection, the establishment of the interface access channel is completed.
[0013] According to an embodiment of the present invention, the method further comprises: after the interface access channel is established, according to a virtual device operation request sent by a user, the expansion board responds to the virtual device operation request.
[0014] According to one embodiment of the present invention, the expansion board includes an expansion bus board, and the interface type includes at least one of I2C, RS485, RS232, CAN, and UART.
[0015] According to an embodiment of the present invention, the expansion board includes an expansion IO board, and the interface type includes at least one of DI, DO, AI, and AO.
[0016] To achieve the above objectives, a second aspect of the present invention provides a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the access method provided in the first aspect of the present invention is implemented.
[0017] To achieve the above-mentioned purpose, the third aspect of the present invention proposes a computing board, including a memory and a processor, wherein a computer program is stored in the memory, and when the computer program is executed by the processor, the access method proposed in the first aspect of the present invention is implemented.
[0018] To achieve the above objectives, the fourth aspect of the present invention proposes an all-in-one machine, comprising an expansion board and a computing board as proposed in the third aspect of the present invention, wherein the expansion board is connected to the computing board via a network.
[0019] Additional aspects and advantages of the present invention will be given in part in the following description and in part will be obvious from the following description, or will be learned through practice of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] Figure 1 It is an overall framework diagram of an all-in-one machine according to an embodiment of the present invention;
[0021] Figure 2 is a flow chart of an access method according to an embodiment of the present invention;
[0022] Figure 3 It is a schematic diagram of the connection between a computing board and an expansion board according to a specific embodiment of the present invention;
[0023] Figure 4 is a schematic diagram of a computing board and an expansion board according to an embodiment of the present invention;
[0024] Figure 5 is a data flow diagram of a computing board and an expansion board according to an embodiment of the present invention;
[0025] Figure 6 is a structural block diagram of a computing board according to an embodiment of the present invention;
[0026] Figure 7 Schematic diagram of an all-in-one machine according to an embodiment of the present invention. DETAILED DESCRIPTION
[0027] Embodiments of the present invention are described in detail below, examples of which are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are intended to be used to explain the present invention, and should not be construed as limiting the present invention.
[0028] Before describing the embodiments of the present application in detail, for ease of understanding, the modular all-in-one machine is first introduced:
[0029] The modular all-in-one machine adopts various types of functional modules + chassis, and is a hardware platform that supports edge computing, storage, networking, AI, and expanded access capabilities. The modular approach allows modular configuration according to user needs to enhance certain capabilities or tailor certain configurations. Modularity means that the system is built with interchangeable and independent components. These components (modules) can be combined or replaced as needed, providing a high degree of flexibility and scalability.
[0030] Functional modules may include computing modules, storage modules, expansion modules, and network modules. The computing module has logic and business processing capabilities. Storage and expansion modules are both subsidiary resources of the computing module and are provided to the computing module for invocation. The network module provides a network environment for the business in a corresponding scenario.
[0031] The all-in-one machine is composed of multiple boards. Users can configure multiple boards for the all-in-one machine according to the applicable scenario. Figure 1 As shown, the all-in-one machine is equipped with a switch board, a power board, an expansion bus board, an expansion IO board, a BMC board, a computing board, an AI board, a storage board, and a fan board. Among them, the switch board and the power board are indispensable parts. The function of the switch board is to provide network capabilities for the boards in the entire cage, so that the boards can be interconnected through the network. The function of the expansion bus board is to expand the external serial port, I2C, and CAN bus communication capabilities for the cage. The function of the expansion IO board is to expand the external DI (digital switch input), DO (digital switch output), AI (analog input), and AO (analog output) capabilities for the cage. The BMC board can provide REDFISH, IPMI protocol interfaces, and a WEB management platform. The function of the computing board is to expand the computing power for the cage. The AI board provides the cage with the ability to perform AI processing locally. The storage board expands the disk space for the computing board. The fan board provides heat dissipation for the cage.
[0032] like Figure 1 The all-in-one machine shown in the figure can be configured with multiple boards, and the same board can be configured with multiple. When the all-in-one machine is configured with multiple boards, and the same board is configured with multiple, if the boards with the same function use different communication protocols, it is not convenient for the application layer to access the interface of the expansion board.
[0033] To solve the above problems, the present invention provides an access method and a computer-readable storage medium, a computing board, and an all-in-one machine. Figure 1-7 And specific implementation methods are described in detail for the access method, computer-readable storage medium, computing board, and all-in-one machine of the embodiments of the present invention.
[0034] The access method of the embodiment of the present invention is used for a computing board, and the computing board is communicatively connected with an expansion board.
[0035] In an embodiment of the present invention, the computing board and the expansion board are connected via ETH (Ethereum) communication.
[0036] In an embodiment of the present invention, the expansion board is an expansion bus board, and may also be an expansion IO board.
[0037] Figure 2 FIG. 1 is a flow chart of an access method according to an embodiment of the present invention. Figure 2 As shown, the access method may include:
[0038] S101, sending a connection request to the expansion card according to the broadcast message sent by the expansion card;
[0039] S102, receiving interface attribute information fed back by the expansion board based on the connection request, and registering a virtual device corresponding to the interface according to the interface attribute information, so as to establish an interface access channel between the virtual device and the expansion board by accessing the virtual device, thereby realizing control of the expansion board interface.
[0040] Specifically, after the expansion board connected to the computing board is powered on, it periodically sends a broadcast message to the local area network. The broadcast message carries the basic information of the external interface supported by the expansion board. After the computing board receives the broadcast message sent by the expansion board, it sends a connection request to the expansion board based on the basic information of the external interface supported by the expansion board carried in the broadcast message, so as to query the specific attribute information of the external interface supported by the expansion board.
[0041] Receive the interface attribute information fed back by the expansion board based on the connection request, register the virtual device corresponding to the interface according to the interface attribute information, and the registered virtual device has the attribute information of the corresponding interface. When accessing the virtual device, the interface access channel between the virtual device and the expansion board can be established by accessing the virtual device to realize the control of the expansion board interface.
[0042] The access method of the embodiment of the present invention maps the interface of the expansion board to the computing board, and the expansion board is mounted to the system of the computing board as a virtual device, so that the user can access the virtual device as if accessing a local device, thereby controlling the external interface of the expansion board.
[0043] In one embodiment of the present invention, the broadcast message may include basic information of the interface of the expansion board, and sending a connection request to the expansion board according to the broadcast message sent by the expansion board may include:
[0044] When a broadcast message sent by an expansion board is received, a connection request is sent to the expansion board based on the interface basic information in the broadcast message to query the interface attribute information of the interface supported by the expansion board, wherein the interface basic information may include the interface type, the number of each interface type, and the basic service port number.
[0045] Specifically, when the computing board receives a broadcast message sent by the expansion board, it sends a connection request to the expansion board based on the basic information of the external interfaces supported by the expansion board carried in the broadcast message, that is, based on the interface types of the external interfaces supported by the expansion board, the number of each interface type, and the basic service port number, so as to query the specific attribute information of the external interfaces supported by the expansion board.
[0046] As a specific example, Figure 3 As shown, when the expansion board is an expansion bus board, and the external interfaces supported by the expansion bus board include I2C interface, RS485 interface, RS232 interface, CAN interface, and UART interface, after the expansion bus board is powered on, a broadcast message is periodically sent to the local area network, and the broadcast message carries the basic information of the external interfaces supported by the expansion board: the interface types are: I2C interface, RS485 interface, RS232 interface, CAN interface, and UART interface, the number of each interface type is: 1, 1, 1, 1, and the basic service port number is: 8458, 8459, 8460, 8561, and 8462. After the computing board receives the broadcast message sent by the expansion bus board, it sends a connection request to the expansion board based on the basic information of the external interfaces supported by the expansion board carried in the broadcast message, so as to query the specific attribute information (interface attribute information) of each external interface supported by the expansion board. For example, query the specific attribute information of the I2C interface: master-slave mode; slave address (existing in slave mode); data rate (settable in host mode). For example, query the specific attribute information of the UART interface: full-duplex mode / receive-only mode / send-only mode; baud rate; data bit (5 / 6 / 7 / 8bit); stop bit (1 / 1.5 / 2bit); parity bit (no check / odd check / even check / flag bit / space bit); flow control (no flow control / software flow control / hardware flow control). The specific attribute information of the RS485 interface, RS232 interface, and CAN interface will not be introduced in detail here. Receive the specific attribute information of the interface fed back by the expansion board based on the connection request, register the virtual device of the corresponding interface according to the specific attribute information of each interface, and the registered virtual device has the attribute information of the corresponding interface.
[0047] As a specific example, Figure 3As shown, when the expansion board is an expansion IO board, and the external interfaces supported by the expansion bus board include DI interface, DO interface, AI interface, and AO interface. After the expansion IO board is powered on, a broadcast message is periodically sent to the local area network, and the broadcast message carries the basic information of the external interface supported by the expansion board: the interface type is: DI interface, DO interface, AI interface, AO interface, the number of each interface type: 1,1,1,1, and the basic service port number is: 8463, 8464, 8465, 8466. After the computing board receives the broadcast message sent by the expansion IO board, it sends a connection request to the expansion board based on the basic information of the external interface supported by the expansion board carried in the broadcast message, so as to query the specific attribute information (interface attribute information) of each external interface supported by the expansion board. Exemplary, such as querying the specific attribute information of the DI interface: pull-up mode (pull-up / pull-down); IO speed (very low / low / medium / high / very high). For example, query the specific attribute information of the DO interface: output mode (open drain / push-pull); pull-up mode (open drain only) (pull-up / pull-down); IO speed (very low / low / medium / high / very high). The specific attribute information of the AI interface and AO interface will not be introduced in detail here. Receive the specific attribute information of the interface fed back by the expansion board based on the connection request, register the virtual device of the corresponding interface according to the specific attribute information of each interface, and the registered virtual device has the attribute information of the corresponding interface.
[0048] The access method of the embodiment of the present invention can be implemented based on four layers. Figure 4 As shown, the computing board includes a virtual device driver layer and an interface access layer. The interface access layer includes an interface discovery service and an interface access service. The interface control layer and the device driver layer in the expansion board include an interface broadcast service and an interface control service.
[0049] The computing board virtual device driver layer is responsible for registering virtual devices with the computing board. The interface discovery service in the interface access layer is responsible for discovering the expansion board and the external interface under the expansion board. When the expansion board is scanned (i.e., the broadcast message sent by the expansion board is received, a connection request is sent to the expansion board according to the broadcast message sent by the expansion board, and the interface attribute information feedback based on the connection request from the expansion board is received), the interface discovery service will notify the virtual device driver layer, and then the virtual device driver layer will register the virtual device with the computing board system. When accessing the virtual device, the operation of the virtual device will call the interface access service in the interface access layer, and the interface access service and the expansion board will establish an independent interface access channel.
[0050] After the expansion board is powered on, the interface broadcast service in the expansion board interface control layer broadcasts the basic interface information of some external interfaces supported by the expansion board to the local area network, waiting for the interface discovery service in the computing board interface access layer to make more detailed inquiries about some external interfaces supported by the expansion board. The interface control service in the interface control layer is used to establish a communication channel upward and call the device driver layer downward to control the physical interface. Among them, the interface access layer and the interface control layer use a unified communication protocol according to the interface type.
[0051] In the embodiment of the present invention, the communication protocol can be divided into three layers: interface layer, type layer and data layer. The interface layer is the outermost layer of data: controls the order of data packets and ensures that data is continuously connected. Type layer: indicates which type of data the subsequent data belongs to. Data layer: Each type has its own data format, and different types of data formats are different. The data format specifies the opening / closing; read and write interface properties; how the read and write data should be sent / reported.
[0052] In one embodiment of the present invention, the computing board includes a virtual device driver layer, and registers a virtual device corresponding to an interface according to interface attribute information, including:
[0053] A registration request is sent to the virtual device driver layer based on the interface attribute information, and the virtual device driver layer is used to register the virtual device corresponding to the interface.
[0054] The computing board in the embodiment of the present invention includes a virtual device driver layer. When registering a virtual device corresponding to an interface, the interface discovery service of the computing board sends a registration request to the virtual device driver layer after receiving the interface attribute information. The virtual device driver layer registers the virtual device corresponding to the interface based on the interface attribute information, and the registered virtual device has the attribute value of the corresponding interface.
[0055] It should be noted that the number of registered virtual devices is the same as the number of external interfaces of the expansion board, that is, each interface corresponds to a virtual device.
[0056] In one embodiment of the present invention, Figure 5 As shown, establishing an interface access channel between a virtual device and an expansion board may include:
[0057] Determine the target virtual device according to the virtual device access request issued by the user;
[0058] Based on the interface attribute information of the target virtual device, an interface access channel between the target virtual device and the expansion board is established, and the expansion board is connected;
[0059] When the expansion board accepts the connection, the interface access channel is established.
[0060] Specifically, when a user accesses a corresponding virtual device, the target virtual device is determined according to the virtual device access request issued by the user. The interface access service establishes an access channel between the target virtual device and the target expansion board based on the interface attribute information of the target virtual device. Specifically, the interface access service uses the corresponding attribute information and the communication protocol of the corresponding interface to connect to the interface control service. The interface control service accepts the connection, and the interface control service calls the device driver to open the physical interface of the target expansion device, and the establishment of the interface access channel is completed.
[0061] As a specific embodiment, when the all-in-one machine is configured with computing boards A and B, expansion boards C and D, and expansion boards C and D both have two UART external interfaces (C-UART-1, C-UART-2, D-UART-1, D-UART-2), computing boards A and B both find C-UART-1, C-UART-2, D-UART-1, D-UART-2 through the interface discovery service, and computing boards A and B will establish VC-UART-1, VC-UART-2, VD-UART-1, VD-UART-2 virtual devices on the local machine. When computing board A opens the VC-UART-1 virtual device first, computing board A will send an open message through the interface access service, and this message is the above communication protocol; after expansion board C receives the open message from computing board A, it will reply to allow computing board A to open C-UART-1, thus establishing an access channel.
[0062] It should be noted that if computing board B opens the VC-UART-1 virtual device at this time, after the message reaches expansion board C, since the C-UART-1 external interface of expansion board C has been opened, expansion board C refuses computing board B's access control to C-UART-1. As a result, computing board B loses access and control rights to the VC-UART-1 virtual device established on the local computer. However, the VC-UART-1 virtual device will not disappear on computing board B, and computing board B can continue to request until computing board A releases its exclusive control over C-UART-1.
[0063] In one embodiment of the present invention, Figure 5 As shown, the access method also includes:
[0064] After the interface access channel is established, the expansion board responds to the virtual device operation request sent by the user.
[0065] Specifically, after the interface access channel is established, the user can control the expansion board to respond to the operation virtual device request through the issued operation virtual device request, thereby realizing the control of the expansion board interface.
[0066] A specific embodiment is used to describe accessing a virtual device and controlling the external interface of an expansion board:
[0067] After the expansion board is powered on, the interface broadcast service periodically sends broadcast messages to the local area network. After the interface discovery service of the computing board receives the broadcast message, it sends a connection request to the expansion board based on the basic information of the external interface supported by the expansion board carried in the broadcast message (interface type, number of each interface type, basic service port number), in order to connect to the basic service port number of the interface supported by the expansion board. After receiving the request to connect to the basic attribute service, the expansion board sends the specific attribute information of the supported interface to the computing board (the list and details of the external interface of the expansion board). After receiving the external interface attribute information of the expansion board, the computing board requests the virtual device driver layer to register the virtual device.
[0068] When the user starts to open the virtual device, that is, when accessing the virtual device, the target virtual device is determined according to the virtual device opened by the user. The interface access service starts to establish a unique channel between the target extension device and the virtual device according to the interface attribute information of the target virtual device. The interface access service starts to connect to the interface control service based on the interface attribute information of the target virtual device, that is, the interface access service uses the corresponding attribute information and the communication protocol of the corresponding interface to connect to the interface control service. The interface control service accepts the connection, and the interface control service calls the device driver to open the physical interface of the target extension device.
[0069] The user starts to operate the virtual device. The operation information is sent to the interface control service through the established channel. The interface control service starts to call the device driver to respond to the operation.
[0070] When implementing the access method described above, the communication between the computing board and the expansion board is divided into three levels, namely, broadcast, discovery, and interface level communication protocol formats.
[0071] When the expansion board is started (powered on), it periodically sends broadcast messages, which carry the supported interface types, the number of each interface type, and the basic service port number. When the computing board receives the broadcast message, it saves the basic interface information carried in the broadcast message, and then starts the discovery service to connect to the basic service port number in the basic interface information. After the connection is successful, it starts to send messages to the expansion board to query the specific attributes of each interface. After receiving the attribute description (interface attribute information), it requests the virtual device driver layer to register the virtual device. It should be noted that the registered virtual device has the attribute value of the corresponding interface.
[0072] When accessing the target virtual device, the interface access service can be called through the attribute value corresponding to the target virtual device. The interface access service uses the corresponding attribute and the communication protocol of the corresponding interface to connect to the interface control service. The expansion card interface control service can allow or deny access requests based on the interface design and the current existing connection. After the access channel is established, the user has the access and control authority to the external interface of the virtual device, that is, the expansion card.
[0073] By adopting the access method of the embodiment of the present invention, the user can access the external interface of the expansion board without feeling through the computing board. Regardless of how many computing boards and expansion boards are inserted into the all-in-one machine, each computing board can scan all external interfaces of all expansion boards in the all-in-one machine, and when the computing board accesses the interface, the expansion board itself can achieve mutually exclusive access of multiple computing boards to the resources of the same external interface.
[0074] In one embodiment of the present invention, the expansion board includes an expansion bus board, and the interface type includes at least one of I2C, RS485, RS232, CAN, and UART.
[0075] It should be noted that the embodiment of the present invention does not limit the types of interfaces of the expansion bus board, nor does it limit the number of interfaces of each type.
[0076] In one embodiment of the present invention, the expansion board includes an expansion IO board, and the interface type includes at least one of DI, DO, AI, and AO.
[0077] It should be noted that the embodiment of the present invention does not limit the type of interfaces of the expansion IO board, nor does it limit the number of interfaces of each type.
[0078] The embodiment of the present invention provides a framework and implementation method for self-discovery and self-registration of virtual devices, and provides a mechanism for a modular integrated machine to access the external interface of an expansion board in the same way as accessing a local device interface.
[0079] The access method of the embodiment of the present invention maps the bus and IO interface of the expansion bus board and the expansion IO board to the computing board. The mapped expansion bus board and the expansion IO board will be mounted to the system of the computing board in the form of virtual bus / IO devices, so that the user can access the virtual device as if accessing a local device, thereby controlling the external interface of the expansion bus board / expansion IO board.
[0080] The present invention provides a computer-readable storage medium.
[0081] In this embodiment, a computer program is stored on a computer-readable storage medium, and when the computer program is executed by a processor, the access method described above is implemented.
[0082] The invention provides a computing board.
[0083] In this embodiment, the computing board may include a memory and a processor, and a computer program is stored in the memory. The computer program is characterized in that when the computer program is executed by the processor, the access method as described above is implemented.
[0084] Figure 6 It is a structural block diagram of a computing board according to an embodiment of the present invention.
[0085] like Figure 6 As shown, the computing board 500 includes: a processor 501 and a memory 503. The processor 501 and the memory 503 are connected, such as through a bus 502. Optionally, the computing board 500 may also include a transceiver 504. It should be noted that in actual applications, the transceiver 504 is not limited to one, and the structure of the computing board 500 does not constitute a limitation on the embodiments of the present invention.
[0086] Processor 501 may be a CPU (Central Processing Unit), a general purpose processor, a DSP (Digital Signal Processor), an ASIC (Application Specific Integrated Circuit), an FPGA (Field Programmable Gate Array) or other programmable logic devices, transistor logic devices, hardware components or any combination thereof. It may implement or execute various exemplary logic blocks, modules and circuits described in conjunction with the disclosure of the present invention. Processor 501 may also be a combination that implements computing functions, such as a combination of one or more microprocessors, a combination of a DSP and a microprocessor, etc.
[0087] The bus 502 may include a path to transmit information between the above components. The bus 502 may be a PCI (Peripheral Component Interconnect) bus or an EISA (Extended Industry Standard Architecture) bus. The bus 502 may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 6 Only one thick line is used in the diagram, but this does not mean that there is only one bus or only one type of bus.
[0088] The memory 503 is used to store a computer program corresponding to the access method of the above embodiment of the present invention, and the computer program is controlled and executed by the processor 501. The processor 501 is used to execute the computer program stored in the memory 503 to implement the content shown in the above method embodiment. Figure 6 The computing board 500 shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present invention.
[0089] The computer-readable storage medium and computing board in the embodiments of the present invention adopt the above-mentioned access method. No matter how many computing boards and expansion boards are inserted into the all-in-one machine, each computing board can scan all external interfaces of all expansion boards in the all-in-one machine. When the computing board accesses the interface, the expansion board itself can achieve mutually exclusive access of multiple computing boards to the resources of the same external interface.
[0090] The invention provides an all-in-one machine.
[0091] Figure 7 FIG. 1 is a schematic diagram of an integrated machine according to an embodiment of the present invention. Figure 7 As shown, the all-in-one machine 1000 may include an expansion board 100 and a computing board 500 as described above, wherein the expansion board 100 and the computing board 500 are connected via a network.
[0092] The all-in-one machine of the embodiment of the present invention, no matter how many computing boards and expansion boards are inserted into it, each computing board can scan all external interfaces of all expansion boards in the all-in-one machine, and when the computing board accesses the interface, the expansion board itself can achieve mutually exclusive access of multiple computing boards to the resources of the same external interface.
[0093] It should be noted that the logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as a sequenced list of executable instructions for implementing logical functions, and can be specifically implemented in any computer-readable medium for use by an instruction execution system, device or apparatus (such as a computer-based system, a system including a processor, or other system that can fetch instructions from an instruction execution system, device or apparatus and execute instructions), or in combination with these instruction execution systems, devices or apparatuses. For the purposes of this specification, "computer-readable medium" can be any device that can contain, store, communicate, propagate or transmit a program for use by an instruction execution system, device or apparatus, or in combination with these instruction execution systems, devices or apparatuses. More specific examples of computer-readable media (a non-exhaustive list) include the following: an electrical connection portion with one or more wirings (electronic device), a portable computer disk box (magnetic device), a random access memory (RAM), a read-only memory (ROM), an erasable and programmable read-only memory (EPROM or flash memory), an optical fiber device, and a portable compact disk read-only memory (CDROM). In addition, the computer-readable medium may even be paper or other suitable medium on which the program is printed, since the program may be obtained electronically, for example, by optically scanning the paper or other medium and then editing, interpreting or processing in other suitable ways if necessary, and then stored in a computer memory.
[0094] It should be understood that the various parts of the present invention can be implemented by hardware, software, firmware or a combination thereof. In the above-mentioned embodiments, a plurality of steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented by hardware, as in another embodiment, it can be implemented by any one of the following technologies known in the art or their combination: a discrete logic circuit having a logic gate circuit for implementing a logic function for a data signal, a dedicated integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.
[0095] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "examples", "specific examples", or "some examples" means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representation of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner.
[0096] In the description of the present invention, it is to be understood that the terms “center”, “longitudinal”, “lateral”, “length”, “width”, “thickness”, “up”, “down”, “front”, “back”, “left”, “right”, “vertical”, “horizontal”, “top”, “bottom”, “inside”, “outside”, “clockwise”, “counterclockwise”, “axial”, “radial”, “circumferential”, etc., indicating orientations or positional relationships based on the orientations or positional relationships shown in the accompanying drawings, are only for the convenience of describing the present invention and simplifying the description, and do not indicate or imply that the referred device or element must have a specific orientation, be constructed and operated in a specific orientation, and therefore should not be understood as limiting the present invention.
[0097] In addition, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Therefore, the features defined as "first" and "second" may explicitly or implicitly include at least one of the features. In the description of the present invention, the meaning of "plurality" is at least two, such as two, three, etc., unless otherwise clearly and specifically defined.
[0098] In the present invention, unless otherwise clearly specified and limited, the terms "installed", "connected", "connected", "fixed" and the like should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection or an indirect connection through an intermediate medium, it can be the internal connection of two elements or the interaction relationship between two elements, unless otherwise clearly defined. For ordinary technicians in this field, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.
[0099] In the present invention, unless otherwise clearly specified and limited, a first feature being "above" or "below" a second feature may mean that the first and second features are in direct contact, or the first and second features are in indirect contact through an intermediate medium. Moreover, a first feature being "above", "above" or "above" a second feature may mean that the first feature is directly above or obliquely above the second feature, or simply means that the first feature is higher in level than the second feature. A first feature being "below", "below" or "below" a second feature may mean that the first feature is directly below or obliquely below the second feature, or simply means that the first feature is lower in level than the second feature.
[0100] Although the embodiments of the present invention have been shown and described above, it is to be understood that the above embodiments are exemplary and are not to be construed as limitations of the present invention. A person skilled in the art may change, modify, replace and vary the above embodiments within the scope of the present invention.
Claims
1. An access method, characterized in that: For a computing board, the computing board is communicatively connected with an expansion board, the method comprising: Sending a connection request to the expansion board according to the broadcast message sent by the expansion board; Receive the interface attribute information fed back by the expansion board based on the connection request, and register a virtual device corresponding to the interface according to the interface attribute information, so as to establish an interface access channel between the virtual device and the expansion board by accessing the virtual device, thereby realizing control of the expansion board interface.
2. The access method according to claim 1, characterized in that: The broadcast message includes basic information of the interface of the expansion board, and the sending of a connection request to the expansion board according to the broadcast message sent by the expansion board includes: When receiving the broadcast message sent by the expansion board, a connection request is sent to the expansion board based on the interface basic information in the broadcast message to query the interface attribute information of the interface supported by the expansion board, wherein the interface basic information includes the interface type, the number of each interface type, and the basic service port number.
3. The access method according to claim 1, characterized in that: The computing board includes a virtual device driver layer, and the registering of a virtual device corresponding to the interface according to the interface attribute information includes: A registration request is sent to the virtual device driver layer based on the interface attribute information, and the virtual device driver layer is used to register a virtual device corresponding to the interface.
4. The access method according to claim 1, characterized in that: The step of establishing an interface access channel between the virtual device and the expansion board includes: Determine the target virtual device according to the virtual device access request issued by the user; Based on the interface attribute information of the target virtual device, establish an interface access channel between the target virtual device and the expansion board, and connect the expansion board; When the expansion board accepts the connection, the establishment of the interface access channel is completed.
5. The access method according to claim 4, characterized in that: The method further comprises: After the interface access channel is established, the expansion board responds to the virtual device operation request sent by the user.
6. The access method according to claim 2, characterized in that: The expansion board includes an expansion bus board, and the interface type includes at least one of I2C, RS485, RS232, CAN, and UART.
7. The access method according to claim 2, characterized in that: The expansion board includes an expansion IO board, and the interface type includes at least one of DI, DO, AI, and AO.
8. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the access method according to any one of claims 1 to 7 is implemented.
9. A computing board, comprising a memory and a processor, wherein a computer program is stored in the memory, wherein: When the computer program is executed by the processor, the access method according to any one of claims 1 to 7 is implemented.
10. An all-in-one machine, characterized in that: It comprises an expansion board and a computing board as claimed in claim 9, wherein the expansion board is connected to the computing board via a network.