A software execution method, device, equipment and storage medium
By reading the encoding information of the port extender and selecting the target software, the problems of complex installation of GPIO port extender and software classification download in the existing technology are solved, and the use of unified software packages for different motherboards is realized, which simplifies the installation process and reduces the installation process. Waste of motherboard.
Patent Information
- Application Number
- CN202111299203.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-11-04
- Publication Date
- 2024-11-05
- Estimated Expiration
- 2041-11-04
AI Technical Summary
In the prior art, the installation process of the GPIO port extender is complicated and requires different software installation for different motherboards, resulting in strict qualification requirements for software installers. Installation errors lead to waste of the motherboard and lack of a unified software download process.
By reading the encoding information of the encoding pins of at least two port extenders, selecting the target software, and selecting the appropriate software installation package from the software library, realizing the use of unified software installation packages for different motherboards, eliminating the classification download process.
The software installation process is simplified, the qualification requirements for installers are reduced, the motherboard waste is reduced, the unified software package use of different motherboards is realized, and the production efficiency is improved.
Smart Images

Figure CN114064156B_ABST
Abstract
Description
Technical Field
[0001] Embodiments of the present invention relate to the field of computer technology, and in particular to a software execution method, apparatus, device and storage medium. Background Art
[0002] GPIO (General Purpose Input Output, port expander) has the advantages of low power consumption, small package, low cost and simple wiring.
[0003] Advantages of GPIO: Low power consumption: GPIO has lower power consumption (about 1μA, while the operating current of μC is 100μA). Integrated IIC slave interface: GPIO has built-in IIC slave interface, which can work at full speed even in standby mode. Small package: GPIO devices provide the smallest package size. Low cost: You don’t have to pay for functions that you don’t use. Fast time to market: No need to write additional code, documentation, or any maintenance work. Flexible lighting control: Built-in multiple high-resolution PWM outputs. Predeterminable response time: Shorten or determine the response time between external events and interrupts.
[0004] The prior art has only one GPIO, which is connected high or low through a pull-up resistor to perform function judgment and distinguish multiple versions of software. In addition, different software is installed for different motherboards in the prior art, and there are strict requirements on the qualifications of software installers. If the installation is wrong, it cannot be used, resulting in a waste of the motherboard. Summary of the invention
[0005] The embodiments of the present invention provide a software execution method, apparatus, device and storage medium, so as to realize the use of the same software installation package for different motherboards, select the software based on the coding information of the coding pins corresponding to at least two port expanders, and omit the process of classified downloading.
[0006] In a first aspect, an embodiment of the present invention provides a software execution method, which is applied to at least one mainboard, the mainboard comprising: at least two port expanders, the software execution method comprising:
[0007] When a power-on request is obtained, reading coding information of coding pins corresponding to the at least two port expanders;
[0008] Selecting target software from a software library according to the encoding information;
[0009] The target software is executed.
[0010] Furthermore, if applied to at least two mainboards, the chip models of the at least two mainboards are the same.
[0011] Furthermore, when a power-on request is obtained, before reading the coding information of the coding pins corresponding to the at least two port expanders, the method further includes:
[0012] Get at least two software installation packages;
[0013] A software library is generated according to the at least two software installation packages.
[0014] Further, when a power-on request is obtained, reading the coding information of the coding pins corresponding to the at least two port expanders includes:
[0015] When a power-on request is obtained, if the first port expander is grounded and the second port expander is connected to a power source, the coding information is determined to be 01;
[0016] If the second port expander is grounded and the first port expander is connected to a power source, the coding information is determined to be 10;
[0017] If the second port expander is connected to a power source and the first port expander is connected to a power source, the coding information is determined to be 11;
[0018] If the second port expander is grounded and the first port expander is grounded, the coded information is determined to be 00.
[0019] Further, when a power-on request is obtained, reading the coding information of the coding pins corresponding to the at least two port expanders includes:
[0020] When a power-on request is obtained, if the first port expander is grounded, the second port expander is connected to a power source, and the third port expander is connected to a power source, the coding information is determined to be 011;
[0021] If the second port expander is grounded, the first port expander is connected to a power source, and the third port expander is connected to a power source, it is determined that the coding information is 101;
[0022] If the second port expander is connected to a power source, the first port expander is connected to a power source, and the third port expander is connected to a power source, it is determined that the coding information is 111;
[0023] If the second port expander is grounded, the first port expander is grounded, and the third port expander is connected to the power supply, the coding information is determined to be 001;
[0024] If the first port expander is grounded, the second port expander is grounded, and the third port expander is grounded, it is determined that the coded information is 000;
[0025] If the first port expander is connected to a power source, the second port expander is connected to a power source, and the third port expander is grounded, it is determined that the coding information is 110;
[0026] If the first port expander is grounded, the second port expander is connected to the power supply, and the third port expander is grounded, the coding information is determined to be 010;
[0027] If the first port expander is connected to the power supply, the second port expander is connected to the ground, and the third port expander is connected to the ground, then the encoding information is determined to be 100.
[0028] In a second aspect, an embodiment of the present invention further provides a software execution device, which is arranged on at least one mainboard, the mainboard comprising: at least two port expanders, the software execution device comprising:
[0029] A reading module, configured to read the coding information of the coding pins corresponding to the at least two port expanders when a power-on request is obtained;
[0030] A selection module, used for selecting target software from a software library according to the encoding information;
[0031] An execution module is used to execute the target software.
[0032] Furthermore, if applied to at least two mainboards, the chip models of the at least two mainboards are the same.
[0033] Furthermore, it also includes:
[0034] An acquisition module, configured to acquire at least two software installation packages before reading the encoding information of the encoding pins corresponding to the at least two port expanders when a power-on request is acquired;
[0035] A generating module is used to generate a software library according to the at least two software installation packages.
[0036] Furthermore, the reading module is specifically used for:
[0037] When a power-on request is obtained, if the first port expander is grounded and the second port expander is connected to a power source, the coding information is determined to be 01;
[0038] If the second port expander is grounded and the first port expander is connected to a power source, the coding information is determined to be 10;
[0039] If the second port expander is connected to a power source and the first port expander is connected to a power source, the coding information is determined to be 11;
[0040] If the second port expander is grounded and the first port expander is grounded, the coded information is determined to be 00.
[0041] Furthermore, the reading module is specifically used for:
[0042] When a power-on request is obtained, if the first port expander is grounded, the second port expander is connected to a power source, and the third port expander is connected to a power source, it is determined that the coding information is 011;
[0043] If the second port expander is grounded, the first port expander is connected to a power source, and the third port expander is connected to a power source, it is determined that the coding information is 101;
[0044] If the second port expander is connected to a power source, the first port expander is connected to a power source, and the third port expander is connected to a power source, it is determined that the coding information is 111;
[0045] If the second port expander is grounded, the first port expander is grounded, and the third port expander is connected to the power supply, the coding information is determined to be 001;
[0046] If the first port expander is grounded, the second port expander is grounded, and the third port expander is grounded, it is determined that the coded information is 000;
[0047] If the first port expander is connected to a power source, the second port expander is connected to a power source, and the third port expander is grounded, it is determined that the coding information is 110;
[0048] If the first port expander is grounded, the second port expander is connected to the power supply, and the third port expander is grounded, the coding information is determined to be 010;
[0049] If the first port expander is connected to the power supply, the second port expander is connected to the ground, and the third port expander is connected to the ground, then the encoding information is determined to be 100.
[0050] In a third aspect, an embodiment of the present invention further provides a computer device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the software execution method as described in any one of the embodiments of the present invention is implemented.
[0051] In a fourth aspect, an embodiment of the present invention further provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the software execution method as described in any one of the embodiments of the present invention.
[0052] The embodiment of the present invention reads the coding information of the coding pins corresponding to the at least two port expanders when a power-on request is obtained; selects the target software from the software library according to the coding information; and executes the target software, so as to use the same software installation package for different motherboards, select the software based on the coding information of the coding pins corresponding to the at least two port expanders, and saves the process of classified downloading. BRIEF DESCRIPTION OF THE DRAWINGS
[0053] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for use in the embodiments are briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present invention and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without creative work.
[0054] Figure 1 is a flowchart of a software execution method in Embodiment 1 of the present invention;
[0055] Figure 1a It is a flow chart of two GPIO coding designs in Embodiment 1 of the present invention;
[0056] Figure 1b This is the first circuit diagram in the first embodiment of the present invention;
[0057] Figure 1c is the second circuit diagram in the first embodiment of the present invention;
[0058] Figure 1d This is the third circuit diagram in the first embodiment of the present invention;
[0059] Figure 2 It is a structural diagram of a software execution device in Embodiment 2 of the present invention;
[0060] Figure 3 It is a structural diagram of a computer device in Embodiment 3 of the present invention. DETAILED DESCRIPTION
[0061] The present invention will be further described in detail below in conjunction with the accompanying drawings and embodiments. It is to be understood that the specific embodiments described herein are only used to explain the present invention, rather than to limit the present invention. It should also be noted that, for ease of description, only parts related to the present invention, rather than all structures, are shown in the accompanying drawings.
[0062] It should be noted that similar reference numerals and letters represent similar items in the following drawings, so once an item is defined in one drawing, it does not need to be further defined and explained in the subsequent drawings. At the same time, in the description of the present invention, the terms "first", "second", etc. are only used to distinguish the description and cannot be understood as indicating or implying relative importance.
[0063] Embodiment 1
[0064] Figure 1A flowchart of a software execution method provided in the first embodiment of the present invention is applied to at least one mainboard, wherein the mainboard includes: at least two port expanders. This embodiment is applicable to the case of software execution. The software execution method can be executed by the software execution device in the embodiment of the present invention. The software execution device can be implemented in software and / or hardware, such as Figure 1 As shown, the software execution method specifically includes the following steps:
[0065] S110, when a power-on request is obtained, reading coding information of coding pins corresponding to the at least two port expanders.
[0066] S120: Select target software from a software library according to the encoding information.
[0067] S130, executing the target software.
[0068] The software execution method provided by the embodiment of the present invention is applied to at least one mainboard, and the mainboard includes: at least two port expanders.
[0069] The at least one main board may be a main board corresponding to headphones or a main board corresponding to speakers, and this is not limited in the embodiment of the present invention.
[0070] Optionally, if applied to at least two mainboards, the chip models of the at least two mainboards are the same.
[0071] Optionally, when a power-on request is obtained, before reading the coding information of the coding pins corresponding to the at least two port expanders, the method further includes:
[0072] Get at least two software installation packages;
[0073] A software library is generated according to the at least two software installation packages.
[0074] Optionally, when a power-on request is obtained, reading the coding information of the coding pins corresponding to the at least two port expanders includes:
[0075] When a power-on request is obtained, if the first port expander is grounded and the second port expander is connected to a power source, the coding information is determined to be 01;
[0076] If the second port expander is grounded and the first port expander is connected to a power source, the coding information is determined to be 10;
[0077] If the second port expander is connected to a power source and the first port expander is connected to a power source, the coding information is determined to be 11;
[0078] If the second port expander is grounded and the first port expander is grounded, the coded information is determined to be 00.
[0079] Optionally, when a power-on request is obtained, reading the coding information of the coding pins corresponding to the at least two port expanders includes:
[0080] When a power-on request is obtained, if the first port expander is grounded, the second port expander is connected to a power source, and the third port expander is connected to a power source, it is determined that the coding information is 011;
[0081] If the second port expander is grounded, the first port expander is connected to a power source, and the third port expander is connected to a power source, it is determined that the coding information is 101;
[0082] If the second port expander is connected to a power source, the first port expander is connected to a power source, and the third port expander is connected to a power source, it is determined that the coding information is 111;
[0083] If the second port expander is grounded, the first port expander is grounded, and the third port expander is connected to the power supply, the coding information is determined to be 001;
[0084] If the first port expander is grounded, the second port expander is grounded, and the third port expander is grounded, it is determined that the coded information is 000;
[0085] If the first port expander is connected to a power source, the second port expander is connected to a power source, and the third port expander is grounded, it is determined that the coding information is 110;
[0086] If the first port expander is grounded, the second port expander is connected to the power supply, and the third port expander is grounded, the coding information is determined to be 010;
[0087] If the first port expander is connected to the power supply, the second port expander is connected to the ground, and the third port expander is connected to the ground, then the encoding information is determined to be 100.
[0088] In a specific example, the same software needs to be used for different versions of hardware. The same type of main control IC on different versions of motherboards can burn the same software, and the software loads different software branches by identifying the hardware code to achieve the purpose of common software. The software execution method provided in the embodiment of the present invention is applicable to multiple models of headphones with different board frames and different button values, but it is necessary to download common software to the same main control chip to reduce production links. On the hardware board, two GPIO encoding methods are used to determine which set of software branches to execute. It can be applied to all hardware boards with the same main control chip, or the same hardware is only used to distinguish software. Through multiple GPIOs, encoding is achieved by directly connecting to the ground or directly connecting to the power supply, where grounding is "0" and connecting to the power supply is "1". Two GPIOs can achieve 4 different encodings, 00, 01, 10, and 11. Similarly, N GPIOs can achieve 2^N encodings.
[0089] like Figure 1a As shown, Figure 1a For designing through two GPIO codes, such as Figure 1b As shown, Figure 1b GPIO14 is connected to the power supply, and GPIO19 is connected to the power supply. Figure 1c As shown, Figure 1c This is the case where GPIO14 is grounded and GPIO19 is connected to the power supply. Figure 1d As shown, Figure 1d This is the case where GPIO14 and GPIO19 are grounded.
[0090] For the main control chip that needs to download the software in advance, do not pre-categorize and download different hardware. You can directly download the same software package for all, eliminating the process of categorized downloading.
[0091] The technical solution of this embodiment is to read the coding information of the coding pins corresponding to the at least two port expanders when a power-on request is obtained; select the target software from the software library according to the coding information; and execute the target software to achieve the use of the same software installation package for different motherboards, and select the software based on the coding information of the coding pins corresponding to the at least two port expanders, thereby eliminating the process of classified downloading.
[0092] Embodiment 2
[0093] Figure 2 This is a structural diagram of a software execution device provided in Embodiment 2 of the present invention. The software execution device is arranged on at least one mainboard, and the mainboard includes: at least two port expanders. This embodiment is applicable to the case of software execution. The software execution device can be implemented in software and / or hardware. The software execution device can be integrated in any device that provides software execution function, such as Figure 2 As shown, the software execution device specifically includes: a reading module 210, a selection module 220 and an execution module 230.
[0094] The reading module 210 is used to read the coding information of the coding pins corresponding to the at least two port expanders when a power-on request is obtained;
[0095] A selection module 220, configured to select target software from a software library according to the encoding information;
[0096] The execution module 230 is used to execute the target software.
[0097] Optionally, if applied to at least two mainboards, the chip models of the at least two mainboards are the same.
[0098] Optionally, also include:
[0099] An acquisition module, configured to acquire at least two software installation packages before reading the encoding information of the encoding pins corresponding to the at least two port expanders when a power-on request is acquired;
[0100] A generating module is used to generate a software library according to the at least two software installation packages.
[0101] Optionally, the reading module is specifically used for:
[0102] When a power-on request is obtained, if the first port expander is grounded and the second port expander is connected to a power source, the coding information is determined to be 01;
[0103] If the second port expander is grounded and the first port expander is connected to a power source, the coding information is determined to be 10;
[0104] If the second port expander is connected to a power source and the first port expander is connected to a power source, the coding information is determined to be 11;
[0105] If the second port expander is grounded and the first port expander is grounded, the coded information is determined to be 00.
[0106] Optionally, the reading module is specifically used for:
[0107] When a power-on request is obtained, if the first port expander is grounded, the second port expander is connected to a power source, and the third port expander is connected to a power source, it is determined that the coding information is 011;
[0108] If the second port expander is grounded, the first port expander is connected to a power source, and the third port expander is connected to a power source, it is determined that the coding information is 101;
[0109] If the second port expander is connected to a power source, the first port expander is connected to a power source, and the third port expander is connected to a power source, it is determined that the coding information is 111;
[0110] If the second port expander is grounded, the first port expander is grounded, and the third port expander is connected to the power supply, the coding information is determined to be 001;
[0111] If the first port expander is grounded, the second port expander is grounded, and the third port expander is grounded, it is determined that the coded information is 000;
[0112] If the first port expander is connected to a power source, the second port expander is connected to a power source, and the third port expander is grounded, it is determined that the coding information is 110;
[0113] If the first port expander is grounded, the second port expander is connected to the power supply, and the third port expander is grounded, the coding information is determined to be 010;
[0114] If the first port expander is connected to the power supply, the second port expander is connected to the ground, and the third port expander is connected to the ground, then the encoding information is determined to be 100.
[0115] The above-mentioned product can execute the software execution method provided by any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.
[0116] The technical solution of this embodiment is to read the coding information of the coding pins corresponding to the at least two port expanders when a power-on request is obtained; select the target software from the software library according to the coding information; and execute the target software to achieve the use of the same software installation package for different motherboards, and select the software based on the coding information of the coding pins corresponding to the at least two port expanders, thereby eliminating the process of classified downloading.
[0117] Embodiment 3
[0118] Figure 3 This is a schematic diagram of the structure of a computer device in Embodiment 3 of the present invention. Figure 3 A block diagram of an exemplary computer device 12 suitable for use in implementing embodiments of the present invention is shown. Figure 3 The computer device 12 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.
[0119] like Figure 3 As shown, the computer device 12 is in the form of a general-purpose computing device. The components of the computer device 12 may include, but are not limited to: one or more processors or processing units 16, a system memory 28, and a bus 18 that connects various system components (including the system memory 28 and the processing unit 16).
[0120] Bus 18 represents one or more of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, a processor, or a local bus using any of a variety of bus structures. For example, these architectures include but are not limited to Industry Standard Architecture (ISA) bus, Micro Channel Architecture (MCA) bus, Enhanced ISA bus, Video Electronics Standards Association (VESA) local bus, and Peripheral Component Interconnect (PCI) bus.
[0121] The computer device 12 typically includes a variety of computer system readable media. These media can be any available media that can be accessed by the computer device 12, including volatile and non-volatile media, removable and non-removable media.
[0122] The system memory 28 may include computer system readable media in the form of volatile memory, such as random access memory (RAM) 30 and / or cache memory 32. The computer device 12 may further include other removable / non-removable, volatile / non-volatile computer system storage media. By way of example only, the storage system 34 may be used to read and write non-removable, non-volatile magnetic media ( Figure 3 not shown, usually called a "hard drive"). Although Figure 3 Not shown in the figure, a disk drive for reading and writing a removable non-volatile disk (such as a "floppy disk"), and an optical disk drive for reading and writing a removable non-volatile optical disk (Compact Disc-Read Only Memory, CD-ROM, Digital Video Disc-Read Only Memory, DVD-ROM or other optical media) may be provided. In these cases, each drive may be connected to the bus 18 via one or more data medium interfaces. The system memory 28 may include at least one program product having a set (e.g., at least one) of program modules that are configured to perform the functions of various embodiments of the present invention.
[0123] A program / utility 40 having a set (at least one) of program modules 42 may be stored, for example, in system memory 28, such program modules 42 including, but not limited to, an operating system, one or more application programs, other program modules, and program data, each of which or some combination may include an implementation of a network environment. Program modules 42 generally perform the functions and / or methods of the embodiments described herein.
[0124] The computer device 12 may also communicate with one or more external devices 14 (e.g., keyboard, pointing device, display 24, etc.), and may also communicate with one or more devices that enable a user to interact with the computer device 12, and / or communicate with any device that enables the computer device 12 to communicate with one or more other computing devices (e.g., network card, modem, etc.). Such communication may be performed through an input / output (I / O) interface 22. In addition, in the computer device 12 in this embodiment, the display 24 does not exist as an independent individual, but is embedded in the mirror surface. When the display surface of the display 24 is not displayed, the display surface of the display 24 and the mirror surface are visually integrated. In addition, the computer device 12 may also communicate with one or more networks (e.g., a local area network (LAN), a wide area network (WAN) and / or a public network, such as the Internet) through a network adapter 20. As shown in the figure, the network adapter 20 communicates with other modules of the computer device 12 through a bus 18. It should be understood that although not shown in the figure, other hardware and / or software modules can be used in conjunction with the computer device 12, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, disk arrays (Redundant Arrays of Independent Disks, RAID) systems, tape drives, and data backup storage systems.
[0125] The processing unit 16 executes various functional applications and data processing by running the programs stored in the system memory 28, for example, implementing the software execution method provided in the embodiment of the present invention:
[0126] When a power-on request is obtained, reading coding information of coding pins corresponding to the at least two port expanders;
[0127] Selecting target software from a software library according to the encoding information;
[0128] The target software is executed.
[0129] Furthermore, if applied to at least two mainboards, the chip models of the at least two mainboards are the same.
[0130] Furthermore, when a power-on request is obtained, before reading the coding information of the coding pins corresponding to the at least two port expanders, the method further includes:
[0131] Get at least two software installation packages;
[0132] A software library is generated according to the at least two software installation packages.
[0133] Further, when a power-on request is obtained, reading the coding information of the coding pins corresponding to the at least two port expanders includes:
[0134] When a power-on request is obtained, if the first port expander is grounded and the second port expander is connected to a power source, the coding information is determined to be 01;
[0135] If the second port expander is grounded and the first port expander is connected to a power source, the coding information is determined to be 10;
[0136] If the second port expander is connected to a power source and the first port expander is connected to a power source, the coding information is determined to be 11;
[0137] If the second port expander is grounded and the first port expander is grounded, the coded information is determined to be 00.
[0138] Further, when a power-on request is obtained, reading the coding information of the coding pins corresponding to the at least two port expanders includes:
[0139] When a power-on request is obtained, if the first port expander is grounded, the second port expander is connected to a power source, and the third port expander is connected to a power source, it is determined that the coding information is 011;
[0140] If the second port expander is grounded, the first port expander is connected to a power source, and the third port expander is connected to a power source, it is determined that the coding information is 101;
[0141] If the second port expander is connected to a power source, the first port expander is connected to a power source, and the third port expander is connected to a power source, it is determined that the coding information is 111;
[0142] If the second port expander is grounded, the first port expander is grounded, and the third port expander is connected to the power supply, the coding information is determined to be 001;
[0143] If the first port expander is grounded, the second port expander is grounded, and the third port expander is grounded, it is determined that the coded information is 000;
[0144] If the first port expander is connected to a power source, the second port expander is connected to a power source, and the third port expander is grounded, it is determined that the coding information is 110;
[0145] If the first port expander is grounded, the second port expander is connected to the power supply, and the third port expander is grounded, the coding information is determined to be 010;
[0146] If the first port expander is connected to the power supply, the second port expander is connected to the ground, and the third port expander is connected to the ground, then the encoding information is determined to be 100.
[0147] Embodiment 4
[0148] Embodiment 4 of the present invention provides a computer-readable storage medium on which a computer program is stored. When the program is executed by a processor, the software execution method provided in all the embodiments of the present invention is implemented:
[0149] When a power-on request is obtained, reading coding information of coding pins corresponding to the at least two port expanders;
[0150] Selecting target software from a software library according to the encoding information;
[0151] The target software is executed.
[0152] Furthermore, if applied to at least two mainboards, the chip models of the at least two mainboards are the same.
[0153] Furthermore, when a power-on request is obtained, before reading the coding information of the coding pins corresponding to the at least two port expanders, the method further includes:
[0154] Get at least two software installation packages;
[0155] A software library is generated according to the at least two software installation packages.
[0156] Further, when a power-on request is obtained, reading the coding information of the coding pins corresponding to the at least two port expanders includes:
[0157] When a power-on request is obtained, if the first port expander is grounded and the second port expander is connected to a power source, the coding information is determined to be 01;
[0158] If the second port expander is grounded and the first port expander is connected to a power source, the coding information is determined to be 10;
[0159] If the second port expander is connected to a power source and the first port expander is connected to a power source, the coding information is determined to be 11;
[0160] If the second port expander is grounded and the first port expander is grounded, the coded information is determined to be 00.
[0161] Further, when a power-on request is obtained, reading the coding information of the coding pins corresponding to the at least two port expanders includes:
[0162] When a power-on request is obtained, if the first port expander is grounded, the second port expander is connected to a power source, and the third port expander is connected to a power source, it is determined that the coding information is 011;
[0163] If the second port expander is grounded, the first port expander is connected to a power source, and the third port expander is connected to a power source, it is determined that the coding information is 101;
[0164] If the second port expander is connected to a power source, the first port expander is connected to a power source, and the third port expander is connected to a power source, it is determined that the coding information is 111;
[0165] If the second port expander is grounded, the first port expander is grounded, and the third port expander is connected to the power supply, the coding information is determined to be 001;
[0166] If the first port expander is grounded, the second port expander is grounded, and the third port expander is grounded, it is determined that the coded information is 000;
[0167] If the first port expander is connected to a power source, the second port expander is connected to a power source, and the third port expander is grounded, it is determined that the coding information is 110;
[0168] If the first port expander is grounded, the second port expander is connected to the power supply, and the third port expander is grounded, the coding information is determined to be 010;
[0169] If the first port expander is connected to the power supply, the second port expander is connected to the ground, and the third port expander is connected to the ground, then the encoding information is determined to be 100.
[0170] Any combination of one or more computer-readable media can be used. Computer-readable media can be computer-readable signal media or computer-readable storage media or any combination of the above two. Computer-readable storage media can be, for example, but not limited to, electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices or devices, or any combination of the above. More specific examples (non-exhaustive list) of computer-readable storage media include: electrical connections with one or more wires, portable computer disks, hard disks, random access memories (RAM), read-only memories (ROM), erasable programmable read-only memories (EPROM or flash memory), optical fibers, portable compact disk read-only memories (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the above. In this document, computer-readable storage media can be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, device or device.
[0171] Computer-readable signal media may include data signals propagated in baseband or as part of a carrier wave, which carry computer-readable program code. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Computer-readable signal media may also be any computer-readable medium other than a computer-readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device.
[0172] The program code embodied on the computer readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
[0173] In some embodiments, the client and the server may communicate using any currently known or future developed network protocol such as HTTP (Hyper Text Transfer Protocol), and may be interconnected with any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), an internet (e.g., the Internet), and a peer-to-peer network (e.g., an ad hoc peer-to-peer network), as well as any currently known or future developed network.
[0174] The computer-readable medium may be included in the electronic device, or may exist independently without being incorporated into the electronic device.
[0175] Computer program code for performing the operation of the present invention may be written in one or more programming languages or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, C++, and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0176] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present disclosure. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some implementations as replacements, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0177] The units involved in the embodiments described in the present disclosure may be implemented by software or hardware, wherein the name of a unit does not, in some cases, limit the unit itself.
[0178] The functions described above herein may be performed at least in part by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), and the like.
[0179] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or device, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, 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 disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0180] Note that the above are only preferred embodiments of the present invention and the technical principles used. Those skilled in the art will understand that the present invention is not limited to the specific embodiments described herein, and that various obvious changes, readjustments and substitutions can be made by those skilled in the art without departing from the scope of protection of the present invention. Therefore, although the present invention has been described in more detail through the above embodiments, the present invention is not limited to the above embodiments, and may include more other equivalent embodiments without departing from the concept of the present invention, and the scope of the present invention is determined by the scope of the appended claims.
Claims
1. A software execution method, characterized in that: Applied to at least one mainboard, the mainboard including: at least two port expanders, the software execution method including: When a power-on request is obtained, reading coding information of coding pins corresponding to the at least two port expanders; selecting target software from a software library according to the encoding information; executing the target software; When a power-on request is obtained, reading the coding information of the coding pins corresponding to the at least two port expanders includes: When a power-on request is obtained, if the first port expander is grounded and the second port expander is connected to a power source, the coding information is determined to be 01; If the second port expander is grounded and the first port expander is connected to a power source, the coding information is determined to be 10; If the second port expander is connected to the power supply and the first port expander is connected to the power supply, the coding information is determined to be 11; If the second port expander is grounded and the first port expander is grounded, the coded information is determined to be 00; Alternatively, when a power-on request is obtained, reading the coding information of the coding pins corresponding to the at least two port expanders includes: When a power-on request is obtained, if the first port expander is grounded, the second port expander is connected to a power source, and the third port expander is connected to a power source, the coding information is determined to be 011; If the second port expander is grounded, the first port expander is connected to a power source, and the third port expander is connected to a power source, the coding information is determined to be 101; If the second port expander is connected to a power source, the first port expander is connected to a power source, and the third port expander is connected to a power source, the coding information is determined to be 111; If the second port expander is grounded, the first port expander is grounded, and the third port expander is connected to the power supply, the coding information is determined to be 001; If the first port expander is grounded, the second port expander is grounded, and the third port expander is grounded, the coded information is determined to be 000; If the first port expander is connected to the power supply, the second port expander is connected to the power supply, and the third port expander is grounded, the coding information is determined to be 110; If the first port expander is grounded, the second port expander is connected to the power supply, and the third port expander is grounded, the coding information is determined to be 010; If the first port expander is connected to the power supply, the second port expander is connected to the ground, and the third port expander is connected to the ground, the coding information is determined to be 100.
2. The method according to claim 1, characterized in that If applied to at least two mainboards, the chip models of the at least two mainboards are the same.
3. The method according to claim 1, characterized in that Before reading the coding information of the coding pins corresponding to the at least two port expanders when a power-on request is obtained, the method further includes: Obtain at least two software installation packages; A software library is generated according to the at least two software installation packages.
4. A software execution device, characterized in that: The software execution device is provided on at least one mainboard, the mainboard including at least two port expanders, and the software execution device includes: a reading module, configured to read coding information of coding pins corresponding to the at least two port expanders when a power-on request is obtained; A selection module, configured to select target software from a software library according to the encoding information; An execution module, configured to execute the target software; The reading module is specifically used for: When a power-on request is obtained, if the first port expander is grounded and the second port expander is connected to a power source, the coding information is determined to be 01; If the second port expander is grounded and the first port expander is connected to a power source, the coding information is determined to be 10; If the second port expander is connected to the power supply and the first port expander is connected to the power supply, the coding information is determined to be 11; If the second port expander is grounded and the first port expander is grounded, the coded information is determined to be 00; or, When a power-on request is obtained, if the first port expander is grounded, the second port expander is connected to a power source, and the third port expander is connected to a power source, the coding information is determined to be 011; If the second port expander is grounded, the first port expander is connected to a power source, and the third port expander is connected to a power source, the coding information is determined to be 101; If the second port expander is connected to a power source, the first port expander is connected to a power source, and the third port expander is connected to a power source, the coding information is determined to be 111; If the second port expander is grounded, the first port expander is grounded, and the third port expander is connected to the power supply, the coding information is determined to be 001; If the first port expander is grounded, the second port expander is grounded, and the third port expander is grounded, the coded information is determined to be 000; If the first port expander is connected to the power supply, the second port expander is connected to the power supply, and the third port expander is grounded, the coding information is determined to be 110; If the first port expander is grounded, the second port expander is connected to the power supply, and the third port expander is grounded, the coding information is determined to be 010; If the first port expander is connected to the power supply, the second port expander is connected to the ground, and the third port expander is connected to the ground, the coding information is determined to be 100.
5. The device according to claim 4, characterized in that If applied to at least two mainboards, the chip models of the at least two mainboards are the same.
6. The device according to claim 4, characterized in that Also includes: an acquisition module, configured to acquire at least two software installation packages before reading the coding information of the coding pins corresponding to the at least two port expanders when a power-on request is obtained; A generating module is used to generate a software library according to the at least two software installation packages.
7. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the program, the software execution method according to any one of claims 1 to 3 is implemented.
8. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the software execution method according to any one of claims 1 to 3 is implemented.
