Embedded software identification method and device, terminal equipment and storage medium
By monitoring the real-time input volume at the circuit board's input terminal and setting a threshold, the identification code output by the circuit board is received, solving the problem of low efficiency in embedded software identification and achieving fast and low-cost embedded software identification.
Patent Information
- Application Number
- CN202510968534.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-15
- Publication Date
- 2025-10-17
AI Technical Summary
In the existing technology, when embedded software is pre-installed on the circuit board, it is impossible to efficiently identify different versions of embedded software, resulting in low testing efficiency and high cost.
By monitoring the real-time input volume at the circuit board's input terminal, setting a first threshold and a second threshold, and comparing them according to the working conditions, when the input volume is outside the threshold range, the identification code output by the circuit board is received to determine the embedded software version.
This technology enables rapid identification of embedded software installed on a circuit board without adding new hardware or interfering with normal functions, thus improving testing efficiency and reducing costs.
Smart Images

Figure CN120803833A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The application belongs to the technical field of circuit testing, and particularly relates to an embedded software identification method and device, a terminal device and a storage medium. BACKGROUND
[0002] A brushless fan is one of the core components of a fan of a sweeping robot. The brushless fan is generally controlled by embedded software loaded on a control circuit board. Different versions of the embedded software achieve different control effects. Due to cost considerations, the embedded software is preloaded by a circuit board manufacturer and shipped together with the control circuit board.
[0003] When there are multiple different embedded software in the same order, it means that the embedded software loaded on different control circuit boards may be different. In actual use, it is impossible to determine the control circuit board loaded with the required software.
[0004] In the prior art, the control circuit board is generally tested by flashing (flashing the required software into the control circuit board) or cross-testing the control circuit board and the fan after being loaded, which is time-consuming and costly. SUMMARY
[0005] The embodiments of the present application aim to provide an embedded software identification method and device, a terminal device and a storage medium, and solve the problem of low test efficiency of a circuit board preloaded with embedded software.
[0006] To achieve the above-mentioned purpose, the technical solution adopted by the present application is as follows: In a first aspect, the present application provides an embedded software identification method. The embedded software is loaded on a circuit board and outputs an identification code under predetermined conditions. The method comprises the following steps: Obtaining a real-time input quantity of an input end of the circuit board; Determining a first threshold value or a second threshold value based on the working conditions of the circuit board; Comparing the real-time input quantity with the first threshold value or the second threshold value; When the real-time input quantity is less than or equal to the first threshold value or when the real-time input quantity is greater than or equal to the second threshold value, receiving the identification code output by the output end of the circuit board; Determining the embedded software loaded on the circuit board based on the identification code.
[0007] In a second aspect, the present application provides an embedded software identification device, comprising: An obtaining module for obtaining a real-time input quantity of an input end of the circuit board; A threshold value determining module for determining a first threshold value or a second threshold value based on the working conditions of the circuit board; A comparison module for comparing the real-time input quantity with the first threshold value or the second threshold value; receiving module, configured to receive the identification code output by the output end of the circuit board when the real-time input quantity is less than or equal to the first threshold value or when the real-time input quantity is greater than or equal to the second threshold value; determining module, configured to determine the embedded software loaded on the circuit board based on the identification code.
[0008] In a third aspect, the present application provides a terminal device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, and the processor implements the method of the first aspect when executing the computer program.
[0009] In a fourth aspect, the present application provides a storage medium, which stores a computer program, and the computer program is executable on a processor to implement the method of the first aspect.
[0010] The embedded software identification method of the present application has the beneficial effects that: the embedded software identification method of the present application monitors the real-time input quantity of the input end of the circuit board, selects a corresponding threshold value according to the working condition, and when the real-time input quantity and the threshold value meet certain conditions, the identification code of the embedded software can be received from the output end of the circuit board, and the embedded software loaded on the circuit board can be confirmed through the identification code. Compared with the traditional method of re-flashing the program of the circuit board or cross-testing the circuit board, the embedded software can be quickly identified without adding hardware and without interfering with the normal function. BRIEF DESCRIPTION OF DRAWINGS
[0011] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the embodiments or exemplary technical descriptions will be briefly introduced. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative effort.
[0012] Figure 1 a flowchart of the embedded software identification method of the embodiments of the present application; Figure 2 a structural schematic diagram of the embedded software identification device of the embodiments of the present application; Figure 3 a structural schematic diagram of the terminal device provided by the embodiments of the present application. DETAILED DESCRIPTION
[0013] In order to make the purposes, technical solutions and advantages of the present application clearer, the present application will be further described in detail below with reference to the drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and do not limit the present application.
[0014] It is to be noted that when a component is referred to as being "fixed" or "set" on another component, it can be directly on the other component or indirectly on the other component. When a component is referred to as being "connected" to another component, it can be directly or indirectly connected to the other component. The terms "upper", "lower", "left", "right", and the like indicate the orientation or positional relationship based on the orientation or positional relationship shown in the drawings, and are only for the convenience of description, and do not indicate or imply that the device or element referred to must have a particular orientation, be constructed and operated in a particular orientation, and therefore cannot be understood as a limitation on the present application. For those skilled in the art, the specific meanings of the above terms can be understood according to the specific circumstances. The terms "first", "second" are only for the convenience of description, and cannot be understood as indicating or implying relative importance or implicitly indicating the number of technical features. The meaning of "a plurality of" is two or more, unless otherwise specifically limited.
[0015] Before describing the technical solutions of the present application, the background of the present application is described.
[0016] According to the background art, when a large number of circuit boards preloaded with different embedded software are received, the circuit boards cannot be classified by embedded software because their appearances are basically the same. Therefore, it is necessary to design an efficient identification method for preloading embedded software on circuit boards.
[0017] Taking the circuit board of the fan (brushless) of the sweeping robot as an example, the circuit board is preloaded with embedded software. The circuit board can have four hardware interfaces, which are VCC interface, FG interface, PWM interface (which can not be set) and GND interface. Among them, the VCC interface is used to connect to an external power supply; the FG interface can output under the control of the embedded software (for example, output a square wave representing the speed when the fan is working); the PWM interface can adjust the duty cycle under the control of the embedded software, so as to adjust the speed of the fan; the GND interface is used for grounding. It should be noted that the embedded software can output a square wave representing the information (such as version information) of the embedded software itself through the FG interface of the circuit board, and is not limited to the square wave representing the speed.
[0018] Referring to Figure 1 An embodiment of the present application provides an embedded software identification method. The embedded software is loaded on a circuit board and outputs an identification code under a predetermined condition. In one possible example, the predetermined condition refers to that when the fan is not working, the embedded software outputs the identification code through the FG interface.
[0019] The embedded software identification method of the embodiment can include the following steps: S1, obtaining the real-time input quantity of the input end of the circuit board.
[0020] In this step, the real-time input quantity can be a real-time input voltage, a real-time input current or a real-time input power. For example, the analog voltage at the input end can be monitored in real time through an ADC (analog-to-digital conversion), and the analog voltage is converted into a digital voltage for machine recognition. The following embodiments are described by taking the voltage as an example, and similar descriptions for other real-time input quantities are not repeated here.
[0021] S2, determining the first threshold value or the second threshold value based on the working condition of the circuit board.
[0022] In this step, the working condition of the circuit board can be confirmed in real time or be set in advance. For example, for the circuit board, the working condition can be an overvoltage condition, that is, working at the upper end of the specific working range of the fan, and the working condition can also be an undervoltage condition, that is, working at the lower end of the specific working range of the fan. For example, the working range of the fan is A1-A2 (voltage), where A2 is greater than A1, the overvoltage condition is greater than A2, and the undervoltage condition is less than A1.
[0023] S3, comparing the real-time input quantity with the first threshold value or the second threshold value.
[0024] S4, receiving the identification code output by the output end of the circuit board when the real-time input quantity is less than or equal to the first threshold value or when the real-time input quantity is greater than or equal to the second threshold value.
[0025] In this step, the threshold value is the first threshold value under the undervoltage condition, and the threshold value is the second threshold value under the overvoltage condition. It can be understood that the first threshold value and the second threshold value are both the limit range of the required input quantity for the normal working of the fan, so whether the real-time input quantity is less than the first threshold value or the real-time input quantity is greater than the first threshold value, the fan is in a non-working state under the control of the circuit board.
[0026] It should be noted that the traditional embedded software does not control the output of the FG interface (or outputs meaningless noise) at this time, and the interface has low utilization efficiency. Since the embedded software to be identified in the present application works outside the above-mentioned specific working range, the output end of the circuit board outputs the identification code of the software, and the embedded software identification method of the present application can determine whether the circuit board is in a normal working state through the relationship between the real-time input quantity and the threshold value; if the circuit board is in a non-normal working state, the identification code output by the output end of the circuit board is received.
[0027] It should be noted that if the circuit board is in a normal working state, the FG interface needs to normally output a square wave representing the operation of the fan at this time, and the FG interface is occupied at this time, and the output of the output end of the circuit board is not received.
[0028] S5, determining the embedded software loaded on the circuit board based on the identification code.
[0029] In this step, after receiving the identification code, the embedded software can be quickly confirmed, for example, the version information or name information of the embedded software is confirmed through the identification code, so that the circuit board can be quickly classified.
[0030] The embedded software identification method of the present application monitors the real-time input quantity of the input end of the circuit board, selects a corresponding threshold value according to the working condition, and when the real-time input quantity and the threshold value meet certain conditions, the identification code of the embedded software can be received from the output end of the circuit board. The identification code can be used to confirm the embedded software loaded on the circuit board. Compared with the traditional method of re-flashing the program of the circuit board or cross-testing the circuit board, the embedded software can be quickly identified without adding hardware and disturbing the normal function.
[0031] In one possible example, step S2 includes: When the working condition is an under-voltage condition, the first threshold value is the minimum value in the specific working interval of the circuit board. For example, the working interval of the fan is A1-A2 (voltage), where A2 is greater than A1, and the under-voltage condition is less than A1. When the working condition is an over-voltage condition, the second threshold value is the maximum value in the specific working interval of the circuit board. For example, the working interval of the fan is A1-A2 (voltage), where A2 is greater than A1, and the over-voltage condition is greater than A2.
[0032] In this embodiment, the specific working interval of the circuit board refers to the working interval in which the circuit board implements its function. For example, for a fan, the working interval of the fan is A1-A2, and the working interval of the circuit board is B1-B2. It can be understood that the working interval of the fan is a subset of the working interval of the circuit board, and the circuit board must be within the working interval of the fan to implement the fan operation function. Therefore, the working interval of the fan is the specific working interval of the circuit board.
[0033] It can be understood that setting the first threshold value as the minimum value of the specific working interval and the second threshold value as the maximum value in the specific working interval can perfectly filter the working interval in which the circuit board implements its function. When the real-time input quantity is a certain value within the specific working interval, the circuit board is in a normal working state, and the output content of the output end of the circuit board is not detected. When the real-time input quantity is less than the first threshold value or greater than the second threshold value, the circuit board is in an abnormal working state, and the circuit board cannot drive the fan to operate. At this time, the identification code output by the embedded software through the output end of the circuit board is received. The embedded software can be identified without disturbing the normal operation of the circuit board.
[0034] It should be noted that the first threshold value can also be greater than the minimum value of the specific working interval, and the second threshold value can also be less than the maximum value of the specific working interval, Optionally, the first threshold is a predetermined multiple of the minimum value, and the predetermined multiple is less than 1. It can be understood that, since the real-time input quantity can fluctuate, in order to reduce the influence of the fluctuation of the real-time input quantity, the first threshold can be set to 80% to 100% of the minimum value of the specific interval, and can be selected according to the real-time input quantity of the circuit board input end. When it is detected that the fluctuation of the real-time input quantity is large, the smaller multiple is selected as much as possible, for example, 0.8 times.
[0035] Optionally, the second threshold is a predetermined multiple of the maximum value, and the predetermined multiple is greater than 1. It can be understood that, since the real-time input quantity can fluctuate, in order to reduce the influence of the fluctuation of the real-time input quantity, the second threshold can be set to 100% to 102% of the minimum value of the specific interval, and can be selected according to the real-time input quantity of the circuit board input end. When it is detected that the fluctuation of the real-time input quantity is large, the larger multiple is selected as much as possible, for example, 1.2 times.
[0036] In a possible example, step S5 comprises: determining an encoding protocol of the identification code, and determining a decoding rule based on the encoding protocol; decoding the identification code according to the decoding rule to determine the information of the embedded software.
[0037] In this step, since the information output by the output end is generally a waveform, the waveform needs to be decoded according to a specific encoding protocol. Optionally, the output waveform adopts Manchester encoding, which is strong in anti-interference and does not need accurate clock synchronization.
[0038] In a possible example, taking an example of the identification code containing version information of the embedded software, the output identification code is 111001011010100000000, the starting bit is agreed to be 3 high pulses (that is, 111), the information bit is agreed to be 8 bits of binary (that is, 00101101 -> version V2.5 of the embedded software), the check bit is agreed to be 2 bits of parity (1 bit in the first 4 bits and 1 bit in the last 4 bits), and the stop bit is agreed to be 1s of low level (that is, 000).
[0039] It should be noted that the selection of the encoding protocol can be selected according to the actual situation, and the use of Manchester encoding is only a possible example, and those skilled in the art can flexibly select under the teaching of the present application.
[0040] In a possible example, the step after step S5 comprises: displaying the information of the embedded software.
[0041] For example, a display unit can be used to display the version number of the decoded embedded software. The display unit can include a display panel, which can be configured in the form of a Liquid Crystal Display (LCD), an Organic Light-Emitting Diode (OLED), or the like. It can be understood that the operator can identify the embedded software loaded on the circuit board through the information displayed on the display panel.
[0042] For example, a sound unit can be used to broadcast the version number of the decoded embedded software. After the identification code is decoded, it is converted into audio data, and then the audio data is converted into an electrical signal and transmitted to a loudspeaker. The loudspeaker converts the electrical signal into a sound signal and outputs it. The tester can determine the version of the embedded software through the sound without looking up, thereby further improving the testing efficiency.
[0043] For example, a printing unit can be used to print the version number of the embedded software. For example, after the identification code is decoded, the information corresponding to the embedded software is converted into a recognizable two-dimensional code or a bar code, which is printed by the printing unit. The printed two-dimensional code or bar code can be attached to the circuit board, and the two-dimensional code can be recognized by the code scanning procedure downstream of the flow line, thereby classifying a large number of circuit boards and improving the identification efficiency of the batch circuit boards.
[0044] The embedded software identification method corresponding to the above embodiment, Figure 2 A structure block diagram of the embedded software identification device provided by the embodiment of the present application is shown. For ease of illustration, only the parts related to the embodiment of the present application are shown.
[0045] Reference Figure 2 The embedded software identification device includes an acquisition module 1, a threshold determination module 2, a comparison module 3, a receiving module 4, and a determination module 5.
[0046] The acquisition module 1 is configured to acquire the real-time input quantity of the input end of the circuit board. The threshold determination module 2 is configured to determine the first threshold or the second threshold based on the working condition of the circuit board. The comparison module 3 is configured to compare the real-time input quantity with the first threshold or the second threshold. When the real-time input quantity is less than or equal to the first threshold or when the real-time input quantity is greater than or equal to the second threshold, the receiving module 4 is configured to receive the identification code output by the output end of the circuit board. The determination module 5 is configured to determine the embedded software loaded on the circuit board based on the identification code.
[0047] It should be noted that the wiring method of the embedded software identification device is that the input end of the embedded software identification device is connected to the input end of the circuit board, so that the real-time input quantity of the circuit board can be obtained, the ground end of the embedded software identification device is connected to the ground end of the circuit board, and the data transmission end of the embedded software identification device is connected to the output end of the circuit board.
[0048] It should be noted that the information interaction and execution process between the above devices / units are based on the same concept as the method embodiments of the present application, and the specific functions and technical effects brought by them can be referred to the method embodiments part. Therefore, no further description is given here.
[0049] Those skilled in the art can clearly understand that, for the convenience and brevity of description, only the above division of functional units and modules is exemplified, and in actual application, the above functions can be completed by different functional units and modules according to needs, that is, the internal structure of the device is divided into different functional units or modules to complete all or part of the above described functions. The functional units and modules in the embodiments can be integrated in one processing unit, or each unit can be physically present separately, or two or more units can be integrated in one unit. The integrated unit can be realized in the form of hardware or software. In addition, the specific names of each functional unit and module are only for easy distinction, and do not limit the protection scope of the present application. The specific working process of the units and modules in the system can refer to the corresponding process in the foregoing method embodiments, and will not be described here.
[0050] Figure 3 The structure schematic diagram of the terminal device provided by an embodiment of the present application is shown in FIG. 6. Figure 3 As shown in FIG. 6, the terminal device 6 of the embodiment includes at least one processor 60 (only one processor is shown in the figure), a memory 61, and a computer program 62 stored in the memory 61 and executable on the at least one processor 60, and the processor 60 implements the steps in any method embodiment described above when executing the computer program 62. Figure 3
[0051] The terminal device 6 can be a desktop computer, a notebook computer, a palm computer, a cloud server, and other computing devices. The terminal device can include, but is not limited to, the processor 60 and the memory 61. Those skilled in the art can understand that Figure 3 The terminal device 6 is only an example and does not constitute a limitation on the terminal device 6, and can include more or fewer components than shown, or combine certain components, or different components, for example, can also include input / output devices, network access devices, etc.
[0052] The processor 60 can be a central processing unit (CPU), and can also be other general-purpose processors, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic device, discrete gate or transistor logic, discrete hardware components, or the like. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor.
[0053] The memory 61 can be an internal storage unit of the terminal device 6, such as a hard disk or a memory of the terminal device 6 in some embodiments. The memory 61 can also be an external storage device of the terminal device 6, such as a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, or the like equipped on the terminal device 6 in other embodiments. Further, the memory 61 can include both an internal storage unit and an external storage device of the terminal device 6. The memory 61 is used to store an operating system, application programs, a boot loader, data, and other programs, such as program codes of computer programs, and the like. The memory 61 can also be used to temporarily store data that has been output or will be output.
[0054] The embodiments of the present application further provide a storage medium, which stores a computer program. The computer program is executed by a processor to implement the steps in the above various method embodiments.
[0055] The embodiments of the present application provide a computer program product. When the computer program product is run on a mobile terminal, the mobile terminal is caused to implement the steps in the above various method embodiments.
[0056] The integrated unit, if implemented in the form of a software function unit and sold or used as an independent product, can be stored in a computer readable storage medium. Based on such understanding, all or part of the processes in the above-mentioned embodiment methods can be completed by a computer program instructing related hardware, and the computer program can be stored in a storage medium. When the processor executes the computer program, the steps of the above-mentioned various method embodiments can be implemented. The computer program includes computer program code, which can be in the form of source code, object code, executable files or some intermediate forms. The computer readable medium at least includes any entity or device capable of carrying the computer program code to the terminal device, recording medium, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signal, telecommunication signal and software distribution medium. For example, U disk, mobile hard disk, magnetic disk or optical disk and the like. In some jurisdictions, according to legislation and patent practice, the computer readable medium can not be an electrical carrier signal and a telecommunication signal.
[0057] In the above embodiments, the description of each embodiment has its own focus, and the parts not described or recorded in detail in a certain embodiment can be referred to the related description of other embodiments.
[0058] Those skilled in the art can appreciate that the units and algorithm steps of the examples described in combination with the embodiments disclosed herein can be realized by electronic hardware or a combination of computer software and electronic hardware. Whether the functions are realized in hardware or software depends on the specific application and design constraints of the technical solution. Professional technicians can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of the present application.
[0059] In the embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the above-described device embodiments are only schematic, for example, the division of modules or units is only a logical function division, and actual implementation can have another division manner, for example, a plurality of units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the coupling or direct coupling or communication connection between the shown or discussed mutual units can be indirect coupling or communication connection through some interfaces, devices or units, and can be electrical, mechanical or other forms.
[0060] The units described as separate components may or may not be physically separate, and the components displayed as units may or may not be physical units, that is, may be located in one place, or may also be distributed to multiple network units. Part or all of the units can be selected to achieve the purpose of the embodiment of the present application according to actual needs.
[0061] The above is only an optional embodiment of the present application and is not used to limit the present application. The present application can have various changes and modifications for those skilled in the art. Any modification, equivalent replacement, improvement, etc. within the spirit and principle of the present application shall be included in the scope of claims of the present application.
Claims
1. A method for identifying embedded software, wherein the embedded software is loaded on a circuit board and outputs an identification code under predetermined conditions, characterized in that: The steps include: Acquiring real-time input quantity of the input end of the circuit board; determining a first threshold or a second threshold based on an operating condition of the circuit board; comparing the real-time input amount with the first threshold or the second threshold; When the real-time input amount is less than or equal to the first threshold or when the real-time input amount is greater than or equal to the second threshold, receiving an identification code outputted by the output terminal of the circuit board; The embedded software loaded on the circuit board is determined based on the identification code.
2. The method according to claim 1, wherein: Determining the first threshold or the second threshold based on the working condition of the circuit board includes: When the working condition is an undervoltage condition, the first threshold is a minimum value within a specific working range of the circuit board.
3. The method according to claim 1, wherein: Determining the first threshold or the second threshold based on the working condition of the circuit board includes: When the working condition is an overvoltage condition, the second threshold is a maximum value within a specific working range of the circuit board.
4. The method according to claim 2, wherein: The first threshold is a predetermined multiple of the minimum value, and the predetermined multiple is less than 1.
5. The method according to claim 3, wherein: The second threshold is a predetermined multiple of the maximum value, and the predetermined multiple is greater than 1.
6. The method according to any one of claims 1 to 5, characterized in that: Determining the embedded software loaded on the circuit board based on the identification code includes: Determining a coding protocol for the identification code, and determining a decoding rule based on the coding protocol; The identification code is decoded according to the decoding rule to determine the information of the embedded software.
7. The method according to claim 6, wherein: Determining the embedded software loaded on the circuit board based on the identification code, the subsequent steps include: Displays information about embedded software.
8. An embedded software recognition device, characterized in that: include: An acquisition module is used to obtain the real-time input quantity of the input terminal of the circuit board; a threshold determination module, configured to determine a first threshold or a second threshold based on a working condition of the circuit board; a comparison module, configured to compare the real-time input amount with the first threshold or the second threshold; a receiving module, configured to receive an identification code outputted from an output terminal of the circuit board when the real-time input amount is less than or equal to the first threshold or when the real-time input amount is greater than or equal to the second threshold; A determination module is used to determine the embedded software loaded on the circuit board based on the identification code.
9. A terminal 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 computer program, the method according to any one of claims 1 to 7 is implemented.
10. A storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.