Software and hardware version matching management system, method and device and medium
By adding a voltage divider circuit to the target hardware board and dividing the power supply voltage, the problem of difficulty in managing multiple chips of the same type in the prior art is solved, and a low-cost and scalable matching of hardware and software versions is achieved.
Patent Information
- Application Number
- CN202510512027.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-23
- Publication Date
- 2025-05-27
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The prior art is difficult to effectively manage multiple chips of the same type in the same system, resulting in the problem of mismatch between hardware and software versions, increasing costs and complexity.
By adding a voltage divider circuit on the target hardware board, using the analog-to-digital sampling function to divide the power supply voltage, obtain the target voltage, and compare it with the preset software matching voltage to determine the consistency between the hardware and software versions.
It realizes simple, low-cost and scalable matching of hardware and software versions, avoids errors caused by version mismatch, and does not occupy additional hardware resources.
Smart Images

Figure CN120045225A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of electronics, and particularly to a software and hardware version matching management system, method, device, and medium. Background Art
[0002] At present, when designers apply various programmable chips, they generally do not perform special designs on the chips to ensure the correctness of program burning. After the program is downloaded and run, if the hardware facilities do not match the software functions, a series of incorrect operations may occur, which may damage the chip, and in severe cases, even damage the device. Under the current actual situation, mainly through methods such as later training of production personnel, users, maintenance personnel, and program burning personnel, the correctness of program burning is ensured and the probability of errors is reduced, but it cannot be completely avoided. For the actual situation of multiple projects, multiple products, and multiple versions, such errors are more likely to occur.
[0003] In the prior art, there is a method in which the electronic control unit is powered on, the bootloader is executed and written, a variable representing the hardware version information is stored in the common random access memory space in the electronic control unit, and then the application program is executed. The application program can read the variable in the common random access memory space to determine whether the hardware version information matches the information supported by the application program, ensuring the compatibility of the software and hardware versions in the electronic control unit and avoiding damage to the engine or the vehicle system caused by software and hardware version incompatibility.
[0004] There is also a method in the prior art that utilizes the one-way conductivity of a diode to add a dual-CPU anti-error circuit in a product with dual CPUs, and respectively add a different I / O control code in the programs burned into the dual CPUs. The I / O control code controls one I / O port of each of the two CPUs. One I / O port of one CPU is at a high level, and one I / O port of the other CPU is at a low level. The high and low levels are used to prevent incorrect program burning.
[0005] In addition, in the prior art, hardware can also be distinguished by the high and low levels of one or several pins. The main problem with this method is that it requires a large number of pins, resulting in a complex system. For distinguishing multiple systems or versions, this method is difficult to handle.
[0006] In the above prior art, there is a common problem: it is difficult to solve the problem that when there are multiple chips of the same type in the same system, such problems cannot be completely avoided. Or rather, to solve this problem, the above methods require more costs or more complex hardware circuits, such as adding more memories, or adding more mutually controlled and restricted circuits, or adding more hardware characterization circuits, etc. Summary of the Invention
[0007] The present invention aims to solve at least one of the technical problems existing in the prior art. For this purpose, the present invention provides a software and hardware version matching management system, which has a simple circuit structure, low cost, strong scalability, and does not occupy other resources on the hardware board.
[0008] The present invention also provides a software and hardware version matching management method, a control device for executing the above software and hardware version matching management method, and a computer-readable storage medium.
[0009] According to an embodiment of the first aspect of the present invention, the software and hardware version matching management system includes: A target hardware board with analog-to-digital sampling function, having a power supply voltage terminal, a ground terminal, and at least one voltage acquisition terminal; At least one voltage dividing circuit, having a first connection terminal connected to the power supply voltage terminal, a second connection terminal connected to the ground terminal, and a voltage dividing output terminal connected to the voltage acquisition terminal. The voltage dividing circuit is used to divide the power supply voltage to obtain a target voltage and output it through the voltage dividing output terminal; A host computer, storing at least one target version software. The host computer is used to obtain the target voltage and a preset software matching voltage corresponding to the target version software, and when the target voltage is consistent with the preset software matching voltage, it is determined that the version of the target hardware board is consistent with the target version software.
[0010] According to the embodiment of the present invention, the software and hardware version matching management system has at least the following beneficial effects: In the hardware part of the software and hardware version matching management system according to the embodiment of the present invention, it is realized through the analog-to-digital sampling function of the target hardware board. A voltage dividing circuit is connected to the voltage acquisition terminal of the target hardware board. The voltage dividing circuit divides the power supply voltage to obtain a target voltage, and uses the target voltage as the hardware part characteristic value of the target hardware board; in the software part, by presetting a preset software matching voltage as the software part characteristic value of the target version software, by comparing the target voltage collected from the target hardware board with the preset software matching voltage, when the target voltage is consistent with the preset software matching voltage, it is determined that the version of the target hardware board is consistent with the target version software. Only a voltage dividing circuit needs to be added to the original circuit structure of the target hardware board, with a simple circuit structure, low cost, strong scalability, and no other resource occupation on the hardware board.
[0011] According to some embodiments of the present invention, the voltage dividing circuit includes: A first voltage dividing resistor, one end of which is connected to the power supply voltage terminal and the other end is connected to the voltage acquisition terminal; The second voltage dividing resistor, one end of which is connected to the grounding end, and the other end is respectively connected to the other end of the first voltage dividing resistor and the voltage acquisition end.
[0012] According to some embodiments of the present invention, there are multiple voltage acquisition ends, there are multiple voltage dividing circuits, and the multiple voltage acquisition ends correspond to the multiple voltage dividing circuits one by one.
[0013] According to some embodiments of the present invention, the voltage variable range of the target voltage is half of the power supply voltage.
[0014] According to some embodiments of the present invention, the power supply voltage is 3.3V, and the voltage variable range of the target voltage is 0.82V - 2.48V.
[0015] According to some embodiments of the present invention, the target voltage is obtained by changing the power supply voltage in steps of 0.05V.
[0016] According to the software and hardware version matching management method of the second aspect embodiments of the present invention, which is applied to the software and hardware version matching management system as described in the first aspect embodiments above, the method includes: Obtain the target voltage and the preset software matching voltage corresponding to the target version software; If the target voltage is consistent with the preset software matching voltage, determine that the target hardware board is consistent with the target version software in version.
[0017] The software and hardware version matching management method according to the embodiments of the present invention has at least the following beneficial effects: The software and hardware version matching management method of the embodiments of the present invention is realized in the hardware part through the analog-to-digital sampling function of the target hardware board. A voltage dividing circuit is connected to the voltage acquisition end of the target hardware board. The voltage dividing circuit divides the power supply voltage to obtain the target voltage, and takes the target voltage as the hardware part characteristic value of the target hardware board; in the software part, by presetting the preset software matching voltage in advance as the software part characteristic value of the target version software, and comparing the target voltage collected from the target hardware board with the preset software matching voltage. When the target voltage is consistent with the preset software matching voltage, it is determined that the target hardware board is consistent with the target version software in version. Only a voltage dividing circuit needs to be added to the original circuit structure of the target hardware board, the circuit structure is simple, the cost is low, the scalability is strong, and no other resources of the hardware board are occupied.
[0018] According to some embodiments of the present invention, there are multiple voltage acquisition ends, there are multiple voltage dividing circuits, and the multiple voltage acquisition ends correspond to the multiple voltage dividing circuits one by one; The method further includes: Obtain multiple target voltages and multiple preset software supporting voltages corresponding to the target version software, where the multiple preset software supporting voltages correspond one-to-one with the multiple target voltages; If the multiple target voltages and the multiple preset software supporting voltages all correspond and match one-to-one, determine that the version of the target hardware board is consistent with the target version software.
[0019] The control device according to the third aspect embodiment of the present invention includes a memory, a processor, and a computer program stored on the memory and executable on the processor. When the processor executes the computer program, it implements the software and hardware version matching management method as described in the second aspect embodiment above. Since the control device adopts all the technical solutions of the software and hardware version matching management method of the above embodiment, it at least has all the beneficial effects brought by the technical solutions of the above embodiment.
[0020] The computer-readable storage medium according to the fourth aspect embodiment of the present invention stores computer-executable instructions, and the computer-executable instructions are used to execute the software and hardware version matching management method as described in the second aspect embodiment above. Since the computer-readable storage medium adopts all the technical solutions of the software and hardware version matching management method of the above embodiment, it at least has all the beneficial effects brought by the technical solutions of the above embodiment.
[0021] Other features and advantages of the present invention will be described in the following specification, and, in part, will be obvious from the specification, or will be understood by implementing the present invention. Brief Description of the Drawings
[0022] The above and / or additional aspects and advantages of the present invention will become obvious and easy to understand from the description of the embodiments in conjunction with the following drawings, where: Figure 1 is a schematic diagram of a software and hardware version matching management system according to an embodiment of the present invention; Figure 2 is a schematic diagram of a voltage dividing circuit according to an embodiment of the present invention; Figure 3 is a flowchart of a software and hardware version matching management method according to an embodiment of the present invention. Detailed Description of the Embodiments
[0023] The embodiments of the present invention will be described in detail below. The examples of the embodiments are shown in the drawings, where the same or similar reference numerals represent the same or similar elements or elements with the same or similar functions throughout. The embodiments described below with reference to the drawings are exemplary and are only used to explain the present invention and should not be construed as a limitation of the present invention.
[0024] In the description of the present invention, if the first, second, etc. are described, they are only for the purpose of distinguishing technical features, and cannot be understood as indicating or implying relative importance or implicitly indicating the quantity of the indicated technical features or implicitly indicating the sequence relationship of the indicated technical features.
[0025] In the description of the present invention, it should be understood that for the orientation description, such as up, down, etc., the indicated orientation or positional relationship is based on the orientation or positional relationship shown in the drawings. It is only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the indicated device or element must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as a limitation to the present invention.
[0026] In the description of the present invention, it should be noted that unless otherwise clearly defined, words such as setting, installing, connecting, etc. should be understood in a broad sense, and those skilled in the art can reasonably determine the specific meaning of the above words in the present invention in combination with the specific content of the technical solution.
[0027] Next, Figures 1 to 3 A clear and complete description of the software and hardware version matching management system of the embodiments of the present invention will be given. Obviously, the following described embodiments are some embodiments of the present invention, not all embodiments.
[0028] Refer to Figures 1 to 3 , Figure 1 which is a schematic diagram of the software and hardware version matching management system according to an embodiment of the present invention; Figure 2 which is a schematic diagram of a voltage dividing circuit according to an embodiment of the present invention; Figure 3 which is a flowchart of the software and hardware version matching management method according to an embodiment of the present invention.
[0029] According to the software and hardware version matching management system of the first aspect embodiment of the present invention, the system includes a target hardware board with analog-to-digital sampling function, at least one voltage dividing circuit, and a host computer.
[0030] The target hardware board with analog-to-digital sampling function has a power supply voltage terminal, a ground terminal, and at least one voltage acquisition terminal; At least one voltage dividing circuit has a first connection terminal connected to the power supply voltage terminal, a second connection terminal connected to the ground terminal, and a voltage dividing output terminal connected to the voltage acquisition terminal. The voltage dividing circuit is used to divide the power supply voltage to obtain a target voltage and output it through the voltage dividing output terminal; The host computer stores at least one target version software. The host computer is used to obtain the target voltage and the preset software matching voltage corresponding to the target version software, and determine that the version of the target hardware board is consistent with the target version software when the target voltage is consistent with the preset software matching voltage.
[0031] In the hardware part of the software and hardware version matching management system according to the embodiments of the present invention, it is implemented through the analog-to-digital sampling function of the target hardware board. The target voltage is obtained by dividing the supply voltage through a voltage dividing circuit, which can be used as the characteristic value of the hardware part of the target hardware board. After voltage division, various voltages can be obtained at a certain pin (i.e., the voltage acquisition terminal) of the target hardware board. In theory, countless analog voltages can be obtained. However, considering the accuracy of the power supply voltage and the performance of the analog-to-digital converter, the voltage accuracy can generally reach 0.01V. Considering other surrounding environmental factors or other uncontrollable factors, in actual situations, the voltage is distinguished in steps of 0.05V. When the step is 0.05V, various different but distinguishable voltage values can be obtained, that is, various different hardware signals are obtained.
[0032] In some embodiments, taking 32 different hardware signals as an example, it is equivalent to a 5-bit binary code. When the voltage is more stable or the voltage division is more accurate, 64 or more hardware signals can be achieved.
[0033] In the software part, when writing the program, the information of this target hardware board is written into the program. For example, if the preset software matching voltage of the voltage acquisition terminal is set to 1.2V in the software, then when sampling the voltage acquisition terminal in the software, when it is found that the target voltage of the voltage acquisition terminal is 1.2V, it is confirmed that the software and hardware versions are consistent. If the target voltage of the voltage acquisition terminal is not 1.2V, it indicates that the software and hardware versions do not match. When they do not match, the program enters an error reporting state, thus avoiding the possibility of more serious errors.
[0034] Each hardware signal, that is, the target voltage of different pins, can generally be represented as a 5-bit binary data code, and this data code can be used to manage different applications of programmable chips. Within the same project, it can be used to distinguish applications between chips; within the same platform, it can be used for applications between projects; within the same company, it can be applied to applications between platforms. Therefore, this method can be used not only for ordinary programming error prevention but also for software and hardware management of company-level projects.
[0035] The software and hardware version matching management system according to the embodiments of the present invention has a very low cost. Each pin only needs to be externally connected with a voltage dividing circuit to produce an effect, and the cost can be almost negligible.
[0036] The hardware structure of the software and hardware version matching management system according to the embodiments of the present invention is simple and intuitive, easy to identify and adjust, and the hardware attributes can be judged by a simple method (such as a multimeter).
[0037] The software and hardware version matching management system of the embodiment of the present invention is also equipped with the function of detecting the power supply voltage or other voltage sources, and only needs to meet the pin voltage of the programmable chip.
[0038] The software and hardware version matching management system of the embodiment of the present invention does not cause other resource occupation to the programmable device (i.e., the target hardware board). Only during the power-on initialization process, calling its internal analog-to-digital conversion function can achieve the purpose. During the detection process, if the software and hardware versions are inconsistent, it will enter the error reporting state and will not proceed further, thus achieving the purpose of protection; if it is determined that the software and hardware versions are consistent, it will immediately return to the normal working mode and start normal operation. After that, the program can stop sampling the voltage values on these pins, enabling these pins to be fully used for the logical programming of the programmable device. When the resistance value of the voltage dividing circuit is large enough, its pull-up and pull-down currents are very weak and do not affect the normal input and output functions of the pins at all. It should be noted that if there are enough programmable resources, this consistency judgment can also be applied periodically in the subsequent program.
[0039] The software and hardware version matching management system of the embodiment of the present invention is very flexible. Users can change the pin positions, the number of pins, etc. used for voltage detection according to requirements, as long as corresponding programming is performed inside the software.
[0040] According to the software and hardware version matching management system of the embodiment of the present invention, in the hardware part of the software and hardware version matching management system of the embodiment of the present invention, it is implemented through the analog sampling function of the target hardware board. A voltage dividing circuit is connected to the voltage acquisition end of the target hardware board. The voltage dividing circuit divides the power supply voltage to obtain the target voltage, and uses the target voltage as the hardware part characteristic value of the target hardware board; in the software part, by presetting the preset software matching voltage as the software part characteristic value of the target version software, by comparing the target voltage collected from the target hardware board with the preset software matching voltage, when the target voltage is consistent with the preset software matching voltage, it is determined that the version of the target hardware board and the target version software is consistent. Only a voltage dividing circuit needs to be added to the original circuit structure of the target hardware board. The circuit structure is simple, the cost is low, the scalability is strong, and it does not cause other resource occupation to the hardware board.
[0041] In some embodiments of the present invention, referring to Figure 1 , the voltage dividing circuit includes a first voltage dividing resistor and a second voltage dividing resistor.
[0042] The first voltage dividing resistor, one end of which is connected to the power supply voltage terminal and the other end is connected to the voltage acquisition terminal; The second voltage dividing resistor, one end of which is connected to the ground terminal and the other end is respectively connected to the other end of the first voltage dividing resistor and the voltage acquisition terminal.
[0043] By selecting different resistance values for the first voltage-dividing resistor and the second voltage-dividing resistor, the voltage value at the voltage acquisition terminal (i.e., Figure 1 Pin18 in
[0044] ) when powering on can be changed, so as to obtain different target voltages.
[0045] It should be noted that the number of voltage-dividing resistors can be more, which cannot be regarded as a limitation to the present invention. In the embodiments of the present invention, sampling two voltage-dividing resistors will result in lower cost and simpler circuit structure. Figure 2 In some embodiments of the present invention, referring to
[0046] , there are multiple voltage acquisition terminals and multiple voltage-dividing circuits, and the multiple voltage acquisition terminals correspond to the multiple voltage-dividing circuits one by one.
[0047] Through voltage division, multiple voltages can be obtained on a certain pin (i.e., the voltage acquisition terminal) of the target hardware board. If there are more voltage acquisition terminals, more voltage combinations can be obtained, so as to adapt to more and more complex software and hardware version matching.
[0048] Taking a specific embodiment as an example, there are 4 voltage acquisition terminals on the target hardware board, that is, 4 pins. The preset software-matched voltages of these 4 pins are set in the software to be 1.2V, 1.3V, 1.4V, and 1.5V respectively. Then, sample these 4 pins in the software respectively. When it is found that the target voltages of these 4 pins are 1.2V, 1.3V, 1.4V, and 1.5V respectively, it is confirmed that the software and hardware versions are consistent. When any one of the sampling values is incorrect, it indicates that the software and hardware versions do not match. When they do not match, the program enters an error reporting state, thus avoiding the possibility of more serious errors.
[0049] In some embodiments of the present invention, the variable range of the target voltage is half of the supply voltage. Considering not affecting other normal uses of this pin (i.e., the voltage acquisition terminal), the range of the target voltage is only half of the input voltage (i.e., the supply voltage).
[0050] It should be noted that according to the actual situation and usage scenarios, the full voltage range of the input voltage or other ranges can also be used, which cannot be regarded as a limitation to the present invention.
[0051] In some embodiments of the present invention, referring to Figure 1 , the supply voltage is 3.3V, and the voltage variable range of the target voltage is 0.82V to 2.48V.
[0052] It should be noted that the above examples are only for illustration, and other voltage ranges are also possible. It cannot be regarded as a limitation of the present invention. In addition, considering the error variation, the voltage variable range is not necessarily equal to half of the supply voltage.
[0053] In some embodiments of the present invention, the target voltage is obtained by changing the supply voltage in steps of 0.05V. It can be understood that the supply voltage of the target hardware board is 3.3V or above. After voltage division, various target voltages can be obtained at a certain pin (i.e., the voltage acquisition terminal) of the target hardware board. In theory, countless analog voltages can be obtained. However, considering the accuracy of the power supply voltage and the performance of the analog-to-digital converter, the voltage accuracy can generally reach 0.01V. Considering other surrounding environmental factors or other uncontrollable factors, the actual situation is distinguished in steps of 0.05V. When using 0.05V as the step, various different but distinguishable target voltages can be obtained, that is, various different hardware signals can be obtained as the hardware part characteristic values.
[0054] According to the software and hardware version matching management method of the second aspect embodiment of the present invention, which is applied to the software and hardware version matching management system of the first aspect embodiment as described above, the method includes: Obtain the target voltage and the preset software matching voltage corresponding to the target version software; If the target voltage is consistent with the preset software matching voltage, determine that the version of the target hardware board is consistent with the target version software.
[0055] In the hardware part of the software and hardware version matching management method of the embodiment of the present invention, it is implemented through the analog-to-digital sampling function of the target hardware board. The target voltage is obtained by voltage-dividing the supply voltage through a voltage-dividing circuit, which can be used as the hardware part characteristic value of the target hardware board. After voltage division, various voltages can be obtained at a certain pin (i.e., the voltage acquisition terminal) of the target hardware board. In theory, countless analog voltages can be obtained. However, considering the accuracy of the power supply voltage and the performance of the analog-to-digital converter, the voltage accuracy can generally reach 0.01V. Considering other surrounding environmental factors or other uncontrollable factors, the actual situation is distinguished in steps of 0.05V. When using 0.05V as the step, various different but distinguishable voltage values can be obtained, that is, various different hardware signals can be obtained.
[0056] In some embodiments, 32 different hardware signals are exemplified, which is equivalent to a 5-bit binary code. When the voltage is more stable or the voltage division is more accurate, 64 or more hardware signals can be achieved.
[0057] In the software part, when writing the program, the information of this target hardware board is written into the program. For example, if the software sets the preset software-matched voltage of the voltage acquisition terminal to 1.2V, then sample the voltage acquisition terminal in the software. When it is found that the target voltage of the voltage acquisition terminal is 1.2V, it is confirmed that the software and hardware versions are consistent. If the target voltage of the voltage acquisition terminal is not 1.2V, it means that the software and hardware versions do not match. When they do not match, the program enters an error state, thus avoiding the possibility of more serious errors.
[0058] Each hardware signal, that is, the target voltage of different pins, can be generally represented as a 5-bit binary data code, and this data code can be used to manage different applications of programmable chips. Within the same project, it can be used to distinguish applications between chips; within the same platform, it can be used for applications between projects; within the same company, it can be applied to applications between platforms. Therefore, this method can be used not only for ordinary programming error prevention but also for project software and hardware management at the company level.
[0059] The software and hardware version matching management method of the embodiments of the present invention has a very low cost. Each pin only needs to be externally connected with a voltage division circuit to produce an effect, and the cost can be almost ignored.
[0060] The hardware structure of the software and hardware version matching management method of the embodiments of the present invention is simple and intuitive, easy to identify and adjust, and the hardware attributes can be judged by a simple method (such as a multimeter).
[0061] The software and hardware version matching management method of the embodiments of the present invention also has the function of detecting the power supply voltage or other voltage sources, and only needs to meet the pin voltage of the programmable chip.
[0062] The software and hardware version matching management method of the embodiments of the present invention does not cause other resource occupation to the programmable device (i.e., the target hardware board). During the power-on initialization process, only by invoking its internal analog-to-digital conversion function can the purpose be achieved. During the detection process, if the software and hardware versions are inconsistent, it will enter the error reporting state and will not proceed further, thus achieving the purpose of protection; if it is determined that the software and hardware versions are consistent, it will immediately return to the normal working mode and start normal operation. After that, the program can stop sampling the voltage values on these pins, enabling these pins to be fully used for the logical programming of the programmable device. When the resistance value of the voltage dividing circuit is large enough, its pull-up and pull-down currents are very weak and do not affect the normal input and output functions of the pins at all. It should be noted that if the programmable resources are sufficient, this consistency judgment can also be applied periodically in the subsequent program.
[0063] The software and hardware version matching management method of the embodiments of the present invention is very flexible. Users can change the pin positions, the number of pins, etc. used for voltage detection according to requirements, as long as corresponding programming is performed inside the software.
[0064] According to the software and hardware version matching management method of the embodiments of the present invention, in the hardware part, it is implemented through the analog sampling function of the target hardware board. A voltage dividing circuit is connected to the voltage acquisition end of the target hardware board. The voltage dividing circuit divides the supply voltage to obtain the target voltage, and the target voltage is used as the hardware part characteristic value of the target hardware board; in the software part, by presetting a preset software matching voltage in advance as the software part characteristic value of the target version software, by comparing the target voltage collected from the target hardware board with the preset software matching voltage, when the target voltage is consistent with the preset software matching voltage, it is determined that the version of the target hardware board and the target version software is consistent. Only a voltage dividing circuit needs to be added to the original circuit structure of the target hardware board. The circuit structure is simple, the cost is low, the scalability is strong, and it does not cause other resource occupation to the hardware board.
[0065] In some embodiments of the present invention, referring to Figure 2 , there are multiple voltage acquisition ends, there are multiple voltage dividing circuits, and the multiple voltage acquisition ends correspond to the multiple voltage dividing circuits one by one; The method further includes: Obtaining a plurality of target voltages and a plurality of preset software matching voltages corresponding to the target version software, and the plurality of preset software matching voltages correspond to the plurality of target voltages one by one; If the plurality of target voltages and the plurality of preset software matching voltages are all corresponding and consistent one by one, it is determined that the version of the target hardware board and the target version software is consistent.
[0066] Multiple voltages can be obtained at a certain pin (i.e., the voltage acquisition terminal) of the target hardware board through voltage division. If there are more voltage acquisition terminals, more voltage combinations can be obtained, so as to adapt to more and more complex software and hardware version matching.
[0067] In some embodiments, if 3 to 4 pins are used for the above detection, a variety of voltage combinations can be easily obtained. When the total number of voltage differentiations at each pin is 32, when the number of pins is 1, 32 characterization values can be obtained, which is equivalent to a 5-bit binary code; when the number of pins is 2, 1024 characterization values can be obtained, which is equivalent to a 10-bit binary code; when the number of pins is 3, 32768 characterization values can be obtained, which is equivalent to a 15-bit binary code; when the number of pins is 4, 1048576 characterization values can be obtained, which is equivalent to a 20-bit binary code.
[0068] Taking a specific embodiment as an example, there are 4 voltage acquisition terminals on the target hardware board, that is, 4 pins. The preset software-matched voltages of these 4 pins are set in the software to be 1.2V, 1.3V, 1.4V, and 1.5V respectively. Then, these 4 pins are sampled separately in the software. When it is found that the target voltages of these 4 pins are 1.2V, 1.3V, 1.4V, and 1.5V respectively, it is confirmed that the software and hardware versions are consistent. When any one of the sampling values is incorrect, it means that the software and hardware versions do not match. When they do not match, the program enters an error reporting state, thus avoiding the possibility of more serious errors.
[0069] In addition, an embodiment of the present invention further provides a control device, which includes: a memory, a processor, and a computer program stored on the memory and executable on the processor. The processor and the memory can be connected through a bus or other means.
[0070] The memory, as a non-transitory computer-readable storage medium, can be used to store non-transitory software programs and non-transitory computer-executable programs. In addition, the memory can include high-speed random access memory, and can also include non-transitory memory, such as at least one disk storage device, a flash memory device, or other non-transitory solid-state storage devices. In some embodiments, the memory can optionally include a memory remotely set relative to the processor, and these remote memories can be connected to the processor through a network. Examples of the above networks include but are not limited to the Internet, enterprise intranets, local area networks, mobile communication networks, and their combinations.
[0071] The non-transitory software programs and instructions required to implement the software and hardware version matching management method of the above embodiments are stored in the memory, and when executed by the processor, they execute the software and hardware version matching management method in the above embodiments.
[0072] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separated, that is, they may be located in one place or distributed to multiple network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0073] In addition, an embodiment of the present invention further provides a computer-readable storage medium storing computer-executable instructions, which are executed by a processor or a controller, for example, executed by the processor in the above embodiment, so that the processor can execute the software and hardware version matching management method in the above embodiment.
[0074] Those of ordinary skill in the art can understand that all or some of the steps and systems in the methods disclosed above can be implemented as software, firmware, hardware, and their appropriate combinations. Some physical components or all physical components can be implemented as software executed by a processor, such as a central processing unit, a digital signal processor, or a microprocessor, or implemented as hardware, or implemented as an integrated circuit, such as an application-specific integrated circuit. Such software can be distributed on a computer-readable medium, which can include a computer storage medium (or a non-transitory medium) and a communication medium (or a transitory medium). As is well known to those of ordinary skill in the art, the term computer storage medium includes volatile and non-volatile, removable and non-removable media implemented in any method or technology for storing information, such as computer-readable instructions, data structures, program modules, or other data. Computer storage media include, but are not limited to, RAM, ROM, EEPROM, flash memory, or other memory technologies, CD-ROM, digital versatile disc (DVD), or other optical disc storage, magnetic cassette, tape, magnetic disk storage, or other magnetic storage devices, or any other medium that can be used to store the desired information and can be accessed by a computer. In addition, as is well known to those of ordinary skill in the art, a communication medium generally includes computer-readable instructions, data structures, program modules, or other data in a modulated data signal such as a carrier wave or other transmission mechanism, and can include any information delivery medium.
[0075] The embodiments of the present invention have been described in detail above in conjunction with the accompanying drawings, but the present invention is not limited to the above embodiments. Various changes can be made without departing from the spirit of the present invention within the scope of knowledge possessed by those of ordinary skill in the art.
Claims
1. A software and hardware version matching management system, characterized in that: The system comprises: A target hardware board with analog-to-digital sampling function, having a power supply voltage terminal, a ground terminal and at least one voltage acquisition terminal; at least one voltage divider circuit, having a first connection terminal connected to the power supply voltage terminal, a second connection terminal connected to the ground terminal, and a voltage divider output terminal connected to the voltage acquisition terminal, the voltage divider circuit being used to divide the power supply voltage to obtain a target voltage, and outputting the target voltage through the voltage divider output terminal; The host computer stores at least one target version software, and is used to obtain the target voltage and the preset software matching voltage corresponding to the target version software. When the target voltage is consistent with the preset software matching voltage, it is determined that the target hardware board is consistent with the version of the target version software.
2. The software and hardware version matching management system according to claim 1 is characterized in that: The voltage divider circuit comprises: A first voltage-dividing resistor, one end of which is connected to the power supply voltage terminal, and the other end of which is connected to the voltage collection terminal; A second voltage-dividing resistor has one end connected to the ground end, and the other end connected to the other end of the first voltage-dividing resistor and the voltage collection end respectively.
3. The software and hardware version matching management system according to claim 1, characterized in that: There are multiple voltage collection terminals and multiple voltage divider circuits, and the multiple voltage collection terminals correspond one to one with the multiple voltage divider circuits.
4. The software and hardware version matching management system according to claim 1, characterized in that: The voltage variable range of the target voltage is half of the supply voltage.
5. The software and hardware version matching management system according to claim 4, characterized in that: The supply voltage is 3.3V, and the target voltage has a variable voltage range of 0.82V to 2.48V.
6. The software and hardware version matching management system according to claim 1, characterized in that: The target voltage is obtained by changing the supply voltage in steps of 0.05V.
7. A method for managing software and hardware versions, characterized in that: Applied to the software and hardware version matching management system according to any one of claims 1 to 6, the method comprises: Obtaining the target voltage and the preset software matching voltage corresponding to the target version software; If the target voltage is consistent with the preset software matching voltage, it is determined that the target hardware board is consistent with the target version software.
8. The software and hardware version matching management method according to claim 7 is characterized in that: There are multiple voltage collection terminals, there are multiple voltage divider circuits, and the multiple voltage collection terminals correspond to the multiple voltage divider circuits one by one; The method further comprises: Acquire a plurality of the target voltages and a plurality of preset software matching voltages corresponding to the target version software, wherein the plurality of preset software matching voltages correspond one-to-one to the plurality of the target voltages; If the plurality of target voltages and the plurality of preset software matching voltages are all in one-to-one correspondence, it is determined that the target hardware board is consistent with the target version software.
9. A control device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the software and hardware version matching management method as described in claim 7 or 8 is implemented.
10. A computer-readable storage medium storing computer-executable instructions, characterized in that: The computer executable instructions are used to execute the software and hardware version matching management method as described in claim 7 or 8.
Citation Information
Patent Citations
Terminal equipment software and hardware self-adaptive matching method and terminal equipment using same
CN101841590A
Automobile part software version management method and device, equipment and storage medium
CN110806894A
Hardware equipment and hardware version distinguishing device and method thereof
CN111611005A