CN117407033A - Method, system and storage medium for switching product types based on resistor - Google Patents

Method, system and storage medium for switching product types based on resistor Download PDF

Info

Publication number
CN117407033A
CN117407033A CN202311728581.6A CN202311728581A CN117407033A CN 117407033 A CN117407033 A CN 117407033A CN 202311728581 A CN202311728581 A CN 202311728581A CN 117407033 A CN117407033 A CN 117407033A
Authority
CN
China
Prior art keywords
information
voltage
preset
switching
program
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202311728581.6A
Other languages
Chinese (zh)
Other versions
CN117407033B (en
Inventor
张冠峰
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Tianlong Century Technology Development Co ltd
Original Assignee
Shenzhen Tianlong Century Technology Development Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Tianlong Century Technology Development Co ltd filed Critical Shenzhen Tianlong Century Technology Development Co ltd
Priority to CN202311728581.6A priority Critical patent/CN117407033B/en
Publication of CN117407033A publication Critical patent/CN117407033A/en
Application granted granted Critical
Publication of CN117407033B publication Critical patent/CN117407033B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/71Version control; Configuration management
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44505Configuring for program initiating, e.g. using registry, configuration files

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Security & Cryptography (AREA)
  • Stored Programmes (AREA)

Abstract

The invention provides a switching method, a switching system and a storage medium of product types based on resistors, wherein first, first resistance information is obtained through calculation according to first voltage information and is used for inquiring first coding information; then, selecting and jumping to a first application program according to the first coding information for switching to the product model; and finally, verifying the correctness of the product model according to the second voltage information. The invention reduces the storage quantity of software files of the same series of electronic products by setting and modifying the electrical parameters of the electronic circuit, thereby reducing the management cost and the labor cost in the production and storage links.

Description

Method, system and storage medium for switching product types based on resistor
Technical Field
The present invention relates to the field of electronic control, and more particularly, to a method, system, and storage medium for switching product models based on resistors.
Background
Along with the continuous development of electronic technology, manufacturers of electronic products also update and iterate hardware or software of the products, and belong to the same series of products. Common hardware upgrades include normal battery upgrades to explosion-proof batteries, screen replacement, common software upgrades include software drivers to adapt to different hardware accessories, additional functions, etc. In practical production applications, identification of hardware accessories and initialization configuration of software are generally realized by providing different software for products in the same series. However, as the models of the same series of products are increased, the corresponding software files are also increased, which tends to increase the management cost and the labor cost in the production and storage links.
Disclosure of Invention
In view of the above problems, an object of the present invention is to provide a method, a system and a storage medium for switching product models based on resistors, which are capable of looking up a table according to first resistance information to obtain a corresponding product model, jumping to a software application corresponding to the corresponding product model, and verifying the product model to ensure the correctness of software matching. The invention reduces the storage quantity of software files of the same series of electronic products by setting and modifying the electrical parameters of the electronic circuit, thereby reducing the management cost and the labor cost in the production and storage links.
The first aspect of the present invention provides a method for switching product models based on resistors, the method comprising:
entering a starting program;
acquiring first voltage information, and acquiring first resistance information according to the first voltage information;
searching a preset coding table according to the first resistance information to obtain first coding information;
according to the first coding information, the program jumps to a first application program;
entering the first application program;
acquiring second voltage information;
judging whether a preset voltage threshold requirement is met or not according to the second voltage information;
if not, re-entering the starting program.
In this solution, the obtaining the first resistance information according to the first voltage information specifically includes:
acquiring third voltage information;
obtaining partial pressure ratio information according to the ratio of the first voltage information to the third voltage information;
and obtaining the first resistance information according to the partial pressure ratio information and preset partial pressure resistance information.
In this scheme, whether the second voltage information meets the preset voltage threshold requirement is specifically:
judging whether the second voltage information is in a preset stable state or not;
if yes, calculating the difference value between the second voltage information and a preset voltage threshold value to obtain first voltage difference value information;
judging whether the first voltage difference information is in a preset first difference range or not;
if not, re-entering the starting program.
In this scheme, whether the judgement second voltage information is in preset steady state, specifically:
acquiring the second voltage information in a preset time period;
extracting at least two pieces of nearest second voltage information and calculating average voltage to obtain voltage average information;
calculating the difference value between the extracted second voltage information and the voltage average value information to obtain second voltage difference value information;
judging whether the second voltage difference information is lower than a preset difference threshold value or not;
if so, the state is in a stable state.
In this scheme, still include:
the first digital rheostat is used for adjusting the first resistance information;
and adjusting the resistance information of the first digital rheostat through a preset communication instruction to switch the product model.
In this scheme, still include:
acquiring first abnormal information in the running process of a first application program;
judging whether the first abnormal information is a preset abnormal code or not;
if yes, entering a self-checking program, and processing an abnormal state by switching the product model.
A second aspect of the present invention provides a system for switching a product model of a resistor, comprising a switching method program of a product model of a resistor, which when executed by the processor, implements the steps of:
entering a starting program;
acquiring first voltage information, and acquiring first resistance information according to the first voltage information;
searching a preset coding table according to the first resistance information to obtain first coding information;
according to the first coding information, the program jumps to a first application program;
entering the first application program;
acquiring second voltage information;
judging whether a preset voltage threshold requirement is met or not according to the second voltage information;
if not, re-entering the starting program.
In this solution, the obtaining the first resistance information according to the first voltage information specifically includes:
acquiring third voltage information;
obtaining partial pressure ratio information according to the ratio of the first voltage information to the third voltage information;
and obtaining the first resistance information according to the partial pressure ratio information and preset partial pressure resistance information.
In this scheme, whether the second voltage information meets the preset voltage threshold requirement is specifically:
judging whether the second voltage information is in a preset stable state or not;
if yes, calculating the difference value between the second voltage information and a preset voltage threshold value to obtain first voltage difference value information;
judging whether the first voltage difference information is in a preset first difference range or not;
if not, re-entering the starting program.
A third aspect of the present invention provides a computer-readable storage medium having embodied therein a resistor-based product model switching method program which, when executed by a processor, implements the steps of the resistor-based product model switching method as described in any one of the above.
The invention provides a switching method, a switching system and a storage medium of product types based on resistors, wherein first, first resistance information is obtained through calculation according to first voltage information and is used for inquiring first coding information; then, selecting and jumping to a first application program according to the first coding information for switching to the product model; and finally, verifying the correctness of the product model according to the second voltage information. The invention reduces the storage quantity of software files of the same series of electronic products by setting and modifying the electrical parameters of the electronic circuit, thereby reducing the management cost and the labor cost in the production and storage links.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings that are needed in the embodiments will be briefly described below, it being understood that the following drawings only illustrate certain embodiments of the present invention and therefore should not be considered as limiting the scope.
FIG. 1 illustrates a flow chart of a method of switching product models based on resistors of the present invention;
FIG. 2 shows a flowchart for obtaining first resistance information according to an embodiment of the present invention;
FIG. 3 shows a flow chart of a product model verification provided by an embodiment of the invention;
fig. 4 shows a block diagram of a resistor-based product model switching system of the present invention.
Detailed Description
The following description of the embodiments of the present invention will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present invention, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
Unless otherwise defined, all terms (including technical and scientific terms) used in the embodiments of the invention have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs. It will be further understood that terms, such as those defined in commonly used dictionaries, should be interpreted as having a meaning that is consistent with their meaning in the context of the relevant art and will not be interpreted in an idealized or overly formal sense unless expressly so defined herein.
The terms "first," "second," and the like, as used in embodiments of the present invention, do not denote any order, quantity, or importance, but rather are used to distinguish one element from another. Nor does the terms "a," "an," or "the" or similar terms mean a limitation of quantity, but rather that at least one is present. Likewise, the word "comprising" or "comprises", and the like, means that elements or items preceding the word are included in the element or item listed after the word and equivalents thereof, but does not exclude other elements or items. The terms "connected" or "connected," and the like, are not limited to physical or mechanical connections, but may include electrical connections, whether direct or indirect. The steps preceding or following the methods of embodiments of the present invention are not necessarily performed in a sequential order. Rather, the various steps may be processed in reverse order or simultaneously. Also, other operations may be added to or removed from these processes.
In addition, functional modules in the embodiments of the present invention may be integrated together to form a single part, or each module may exist alone, or two or more modules may be integrated to form a single part.
Fig. 1 shows a flow chart of a method of switching product models based on resistors of the present invention.
As shown in fig. 1, the invention discloses a method for switching product models based on resistors, which comprises the following steps:
s102, entering a starting program;
s104, acquiring first voltage information, and acquiring first resistance information according to the first voltage information;
s106, searching a preset coding table according to the first resistance information to obtain first coding information;
s108, according to the first coding information, the program jumps to a first application program;
s110, entering the first application program;
s112, acquiring second voltage information;
s114, judging whether a preset voltage threshold requirement is met according to the second voltage information;
s116, if not, re-entering the starting program.
It should be noted that the same software burning file is used by the serial products, the product firstly enters the starting program after being started, and the corresponding application program is selected according to the electrical characteristics of the electronic circuit, namely, the corresponding product model is selected, so that one software burning file corresponds to a plurality of product models in the same series.
After entering a starting program, first voltage information is acquired, wherein the first voltage information is the voltage information of two ends of a first resistor in the starting program stage; and setting a preset first power supply voltage in the starting program to supply power for a circuit where the first resistor is positioned. And secondly, calculating according to a resistor voltage division theorem to obtain first resistance information, wherein the first resistance information is the resistance value of the first resistor. And then searching a coding table preset in the memory according to the first resistance information of the first resistor to obtain first coding information. The first code information is unique code information set by the manufacturer for the same series of products, which means that one piece of code information corresponds to a unique product model. Finally, according to the first coding information, obtaining the jump address information of the first application program, starting the program to jump to the jump address of the first application program, and realizing the program jump. In practical application, a table look-up method is generally adopted to obtain a jump address of the first application program; in the encoding table in the memory, the jump address information of the first application program is also stored as additional information while the first encoding information is stored; that is, when the first encoded information is queried, the jump address information of the first application program can also be obtained.
After entering the first application program, it is checked whether the current first application program is suitable for the electrical characteristics of the electronic circuit through the second voltage information, that is, whether the product model is selected correctly is checked through the second voltage information. Firstly, acquiring second voltage information, wherein the second voltage information is the voltage information of two ends of a first resistor in a first application program stage; the first application program supplies power to the circuit where the first resistor is located through the second power supply voltage. Then, the first application program stores a corresponding check voltage threshold range; for example, the application program of model A stores a verification voltage of 0.5V to 0.8V; the verification voltage stored by the application program of the type B is 0.9V to 1.1V. When the voltage value corresponding to the second voltage information is within the verification voltage threshold range, the application software and the electronic hardware are in a matching state, and the model selection is correct. When the voltage value corresponding to the second voltage information exceeds the verification voltage threshold range, the application software is not matched with the electronic hardware, the model selection error is determined, the starting program is restarted, and the new first application program is judged and jumped to.
Fig. 2 shows a flowchart for obtaining first resistance information according to an embodiment of the present invention.
According to an embodiment of the present invention, as shown in fig. 2, the obtaining the first resistance information according to the first voltage information specifically includes:
s202, obtaining third voltage information;
s204, obtaining partial pressure ratio information according to the ratio of the first voltage information to the third voltage information;
s206, obtaining the first resistance information according to the partial pressure ratio information and preset partial pressure resistance information.
The third voltage information is a voltage value for supplying power to the circuit in which the first resistor is located when the program is started, and is usually generated by an external low dropout linear regulator or a low dropout linear regulator output integrated in the processor. Meanwhile, the third voltage information is also used as the reference voltage of the analog-to-digital converter for collecting the first voltage information, so that the consistency of the voltage reference standard in the process of collecting and converting is ensured. And obtaining a voltage division ratio according to the ratio of the first voltage information and the third voltage information, wherein the voltage division ratio is used for representing the voltage ratio condition of the first resistor in the circuit. According to the partial pressure ratio information and preset partial pressure resistance information, first resistance information can be obtained according to a partial pressure theorem; the voltage division resistance information is a resistance value superposed by one or more resistors preset by the following electronic circuit.
Fig. 3 shows a flowchart of a product model verification provided by an embodiment of the present invention.
According to an embodiment of the present invention, as shown in fig. 3, the determining whether a preset voltage threshold requirement is met according to the second voltage information is specifically:
s302, judging whether the second voltage information is in a preset stable state or not;
s304, if yes, calculating the difference value between the second voltage information and a preset voltage threshold value to obtain first voltage difference value information;
s306, judging whether the first voltage difference information is in a preset first difference range or not;
s308, if not, re-entering the starting program.
It should be noted that, the present invention also checks whether the current first application program is adapted to the electrical characteristics of the electronic circuit through the second voltage information, so as to determine whether the product model is selected correctly; that is, when the second voltage information reaches the preset voltage threshold, the product model is selected correctly. Firstly, judging whether the second voltage information is in a preset stable state or not; the preset stable state indicates whether the floating condition of the second voltage information meets the requirement of the first application program operation. When the second voltage information is in a stable state, calculating a difference value between the second voltage information and a preset voltage threshold value to obtain first voltage difference value information; the preset voltage threshold is a reference standard of the second voltage information when the first application program runs. For the preset voltage threshold, a corresponding first difference range is also set, and in practical application, the first difference range is usually set as a percentage floating value of a reference standard, for example, when the voltage threshold of 1V is used as the reference standard, the floating value of 10% is calculated, and the floating difference is 0.1V, that is, the first difference range is-0.1V to 0.1V. When the first voltage difference information is within the first difference range, the second voltage information obtained by the measurement electronic circuit is in accordance with the voltage threshold requirement set by the first application program, that is, the application software is matched with the electronic hardware, and the model selection can be determined to be correct. When the first voltage difference information exceeds the first difference range, the second voltage information obtained by the measurement electronic circuit does not meet the voltage threshold requirement set by the first application program, namely, the application software is not matched with the electronic hardware, the model selection error can be determined, the user needs to jump to the starting program again, and the selection operation of the first application program, namely, the model selection operation, is executed. The invention improves the accuracy of model selection in a verification mode.
According to an embodiment of the present invention, the determining whether the second voltage information is in a preset stable state specifically includes:
acquiring the second voltage information in a preset time period;
extracting at least two pieces of nearest second voltage information and calculating average voltage to obtain voltage average information;
calculating the difference value between the extracted second voltage information and the voltage average value information to obtain second voltage difference value information;
judging whether the second voltage difference information is lower than a preset difference threshold value or not;
if so, the state is in a stable state.
It should be noted that, with a preset sampling period, the second voltage information is continuously collected through the analog-to-digital converter. At least two newly acquired second voltage information are extracted for calculating an average voltage. Calculating the difference value of the extracted second voltage information and the voltage average value one by one, and recording the difference value as second voltage difference value information; if each second voltage difference value information is lower than a preset difference value threshold value, the second voltage is in a stable state; if any one of the second voltage difference information is higher than the difference threshold value, the state is in an unstable state. When the first application program is operated, the voltage for supplying power to the circuit where the first resistor is positioned is usually the voltage for supplying power to the processing of the electronic product; if the second voltage information is in a stable state, the second voltage information indicates that the power supply voltage is in a stable state. That is, when the second voltage information is in a stable state, the stability of the power supply voltage meets the operation requirement of the processor.
According to an embodiment of the present invention, further comprising:
the first digital rheostat is used for adjusting the first resistance information;
and adjusting the resistance information of the first digital rheostat through a preset communication instruction to switch the product model.
It should be noted that the first resistor may be formed by one or more resistors connected in series or in parallel, where at least one resistor is a first digital varistor; among them, a digital varistor is also called a digital programmable resistor, which is a resistor capable of digitally adjusting a resistance value. By means of the first digital varistor, it is possible to realize a software-regulated first resistance information of the first resistor. The processor is communicatively coupled to the first digital varistor via a predetermined communication protocol including, but not limited to, reading a resistance value of the first digital varistor via a predetermined read command in real-time communication, and adjusting the resistance value of the first digital varistor via a predetermined modify command. And adjusting the first resistance information through the first digital rheostat, so that the function of modifying the product model through software is realized.
According to an embodiment of the present invention, further comprising:
acquiring first abnormal information in the running process of a first application program;
judging whether the first abnormal information is a preset abnormal code or not;
if yes, entering a self-checking program, and processing an abnormal state by switching the product model.
When the processor runs the first application program, when an abnormal state occurs, the processor records the abnormal program and has a unique abnormal code corresponding to the abnormal program. For example, the screen communication abnormality corresponding to the abnormality code is 0x0011, and the battery information acquisition abnormality corresponding to the abnormality code is 0x0023. The first abnormal information refers to the condition that the software driver is abnormal in communication with the hardware accessory, and a preset abnormal code is reported. For example, when the communication mode of the first application software to the screen is IIC and the communication mode of the screen hardware is SPI, the first anomaly information recorded by the first application software belongs to a preset anomaly code. When the first anomaly information is a preset anomaly code, the possibility of selection errors of the product model is indicated, and a self-checking program is needed. The self-checking program is the same as the process of detecting the product model by starting.
It is worth mentioning that the method further comprises:
acquiring a first remote instruction;
and adjusting the resistance information of the first digital rheostat according to the first remote instruction so as to switch the product model.
It should be noted that, when the serial products include the remote communication function, the remote switching of the product model may be implemented by a network, bluetooth, or the like. After receiving the first remote instruction, checking and analyzing the requirement of the remote instruction for switching the model of the product, and reversely inquiring the first resistance information of the corresponding first resistor according to the coding table when the model switching information is confirmed to be correct, and then calculating the resistance information of the digital rheostat according to the combination condition of the first resistance information; wherein the combination is typically at least one resistor of fixed value in series with at least one digital varistor. Finally, the resistance value of the digital rheostat is adjusted through a preset communication instruction, and the purpose of remotely switching the product model is finally achieved. In practical application, certain series products are divided into high-configuration, medium-configuration and low-configuration versions according to different software functions, but hardware accessories are always the same, when a user has the function configuration upgrading requirement, replacement or factory staff to upgrade on site is not needed, and the switching of product types is directly realized in a remote mode, so that the labor cost is saved, and the user experience is also improved.
It is worth mentioning that the method further comprises:
searching a preset coding table according to the first resistance information, and when no corresponding coding information exists;
acquiring resistance information of a first digital rheostat;
the resistance value is adjusted upwards or downwards according to the resistance value information;
if the obtained first resistance information is found, and the corresponding code cannot be found from the code table, it indicates that there is a setup error in the production process. In order not to influence the use of a user, the first resistance information is adjusted by adjusting the resistance information of the first digital rheostat upwards or downwards while recording the mark information, so that the model is searched in an adaptive mode. Because the product has model verification in operation, and when the hardware fittings are not matched, the self-checking mode is also entered, and model inquiry and switching are carried out according to the mark information.
Fig. 4 shows a block diagram of a resistor-based product model switching system of the present invention.
As shown in fig. 4, the present invention discloses a switching system 4 of a product model based on a resistor, which comprises a memory 41 and a processor 42, wherein the memory comprises a switching method program of the product model based on the resistor, and the switching method program of the product model based on the resistor realizes the following steps when being executed by the processor:
entering a starting program;
acquiring first voltage information, and acquiring first resistance information according to the first voltage information;
searching a preset coding table according to the first resistance information to obtain first coding information;
according to the first coding information, the program jumps to a first application program;
entering the first application program;
acquiring second voltage information;
judging whether a preset voltage threshold requirement is met or not according to the second voltage information;
if not, re-entering the starting program.
It should be noted that the same software burning file is used by the serial products, the product firstly enters the starting program after being started, and the corresponding application program is selected according to the electrical characteristics of the electronic circuit, namely, the corresponding product model is selected, so that one software burning file corresponds to a plurality of product models in the same series.
After entering a starting program, first voltage information is acquired, wherein the first voltage information is the voltage information of two ends of a first resistor in the starting program stage; and setting a preset first power supply voltage in the starting program to supply power for a circuit where the first resistor is positioned. And secondly, calculating according to a resistor voltage division theorem to obtain first resistance information, wherein the first resistance information is the resistance value of the first resistor. And then searching a coding table preset in the memory according to the first resistance information of the first resistor to obtain first coding information. The first code information is unique code information set by the manufacturer for the same series of products, which means that one piece of code information corresponds to a unique product model. Finally, according to the first coding information, obtaining the jump address information of the first application program, starting the program to jump to the jump address of the first application program, and realizing the program jump. In practical application, a table look-up method is generally adopted to obtain a jump address of the first application program; in the encoding table in the memory, the jump address information of the first application program is also stored as additional information while the first encoding information is stored; that is, when the first encoded information is queried, the jump address information of the first application program can also be obtained.
After entering the first application program, it is checked whether the current first application program is suitable for the electrical characteristics of the electronic circuit through the second voltage information, that is, whether the product model is selected correctly is checked through the second voltage information. Firstly, acquiring second voltage information, wherein the second voltage information is the voltage information of two ends of a first resistor in a first application program stage; the first application program supplies power to the circuit where the first resistor is located through the second power supply voltage. Then, the first application program stores a corresponding check voltage threshold range; for example, the application program of model A stores a verification voltage of 0.5V to 0.8V; the verification voltage stored by the application program of the type B is 0.9V to 1.1V. When the voltage value corresponding to the second voltage information is within the verification voltage threshold range, the application software and the electronic hardware are in a matching state, and the model selection is correct. When the voltage value corresponding to the second voltage information exceeds the verification voltage threshold range, the application software is not matched with the electronic hardware, the model selection error is determined, the starting program is restarted, and the new first application program is judged and jumped to.
According to an embodiment of the present invention, the obtaining the first resistance information according to the first voltage information specifically includes:
acquiring third voltage information;
obtaining partial pressure ratio information according to the ratio of the first voltage information to the third voltage information;
and obtaining the first resistance information according to the partial pressure ratio information and preset partial pressure resistance information.
The third voltage information is a voltage value for supplying power to the circuit in which the first resistor is located when the program is started, and is usually generated by an external low dropout linear regulator or a low dropout linear regulator output integrated in the processor. Meanwhile, the third voltage information is also used as the reference voltage of the analog-to-digital converter for collecting the first voltage information, so that the consistency of the voltage reference standard in the process of collecting and converting is ensured. And obtaining a voltage division ratio according to the ratio of the first voltage information and the third voltage information, wherein the voltage division ratio is used for representing the voltage ratio condition of the first resistor in the circuit. According to the partial pressure ratio information and preset partial pressure resistance information, first resistance information can be obtained according to a partial pressure theorem; the voltage division resistance information is a resistance value superposed by one or more resistors preset by the following electronic circuit.
According to an embodiment of the present invention, the determining whether the preset voltage threshold requirement is met according to the second voltage information specifically includes:
judging whether the second voltage information is in a preset stable state or not;
if yes, calculating the difference value between the second voltage information and a preset voltage threshold value to obtain first voltage difference value information;
judging whether the first voltage difference information is in a preset first difference range or not;
if not, re-entering the starting program.
It should be noted that, the present invention also checks whether the current first application program is adapted to the electrical characteristics of the electronic circuit through the second voltage information, so as to determine whether the product model is selected correctly; that is, when the second voltage information reaches the preset voltage threshold, the product model is selected correctly. Firstly, judging whether the second voltage information is in a preset stable state or not; the preset stable state indicates whether the floating condition of the second voltage information meets the requirement of the first application program operation. When the second voltage information is in a stable state, calculating a difference value between the second voltage information and a preset voltage threshold value to obtain first voltage difference value information; the preset voltage threshold is a reference standard of the second voltage information when the first application program runs. For the preset voltage threshold, a corresponding first difference range is also set, and in practical application, the first difference range is usually set as a percentage floating value of a reference standard, for example, when the voltage threshold of 1V is used as the reference standard, the floating value of 10% is calculated, and the floating difference is 0.1V, that is, the first difference range is-0.1V to 0.1V. When the first voltage difference information is within the first difference range, the second voltage information obtained by the measurement electronic circuit is in accordance with the voltage threshold requirement set by the first application program, that is, the application software is matched with the electronic hardware, and the model selection can be determined to be correct. When the first voltage difference information exceeds the first difference range, the second voltage information obtained by the measurement electronic circuit does not meet the voltage threshold requirement set by the first application program, namely, the application software is not matched with the electronic hardware, the model selection error can be determined, the user needs to jump to the starting program again, and the selection operation of the first application program, namely, the model selection operation, is executed. The invention improves the accuracy of model selection in a verification mode.
According to an embodiment of the present invention, the determining whether the second voltage information is in a preset stable state specifically includes:
acquiring the second voltage information in a preset time period;
extracting at least two pieces of nearest second voltage information and calculating average voltage to obtain voltage average information;
calculating the difference value between the extracted second voltage information and the voltage average value information to obtain second voltage difference value information;
judging whether the second voltage difference information is lower than a preset difference threshold value or not;
if so, the state is in a stable state.
It should be noted that, with a preset sampling period, the second voltage information is continuously collected through the analog-to-digital converter. At least two newly acquired second voltage information are extracted for calculating an average voltage. Calculating the difference value of the extracted second voltage information and the voltage average value one by one, and recording the difference value as second voltage difference value information; if each second voltage difference value information is lower than a preset difference value threshold value, the second voltage is in a stable state; if any one of the second voltage difference information is higher than the difference threshold value, the state is in an unstable state. When the first application program is operated, the voltage for supplying power to the circuit where the first resistor is positioned is usually the voltage for supplying power to the processing of the electronic product; if the second voltage information is in a stable state, the second voltage information indicates that the power supply voltage is in a stable state. That is, when the second voltage information is in a stable state, the stability of the power supply voltage meets the operation requirement of the processor.
According to an embodiment of the present invention, further comprising:
the first digital rheostat is used for adjusting the first resistance information;
and adjusting the resistance information of the first digital rheostat through a preset communication instruction to switch the product model.
It should be noted that the first resistor may be formed by one or more resistors connected in series or in parallel, where at least one resistor is a first digital varistor; among them, a digital varistor is also called a digital programmable resistor, which is a resistor capable of digitally adjusting a resistance value. By means of the first digital varistor, it is possible to realize a software-regulated first resistance information of the first resistor. The processor is communicatively coupled to the first digital varistor via a predetermined communication protocol including, but not limited to, reading a resistance value of the first digital varistor via a predetermined read command in real-time communication, and adjusting the resistance value of the first digital varistor via a predetermined modify command. And adjusting the first resistance information through the first digital rheostat, so that the function of modifying the product model through software is realized.
According to an embodiment of the present invention, further comprising:
acquiring first abnormal information in the running process of a first application program;
judging whether the first abnormal information is a preset abnormal code or not;
if yes, entering a self-checking program, and processing an abnormal state by switching the product model.
When the processor runs the first application program, when an abnormal state occurs, the processor records the abnormal program and has a unique abnormal code corresponding to the abnormal program. For example, the screen communication abnormality corresponding to the abnormality code is 0x0011, and the battery information acquisition abnormality corresponding to the abnormality code is 0x0023. The first abnormal information refers to the condition that the software driver is abnormal in communication with the hardware accessory, and a preset abnormal code is reported. For example, when the communication mode of the first application software to the screen is IIC and the communication mode of the screen hardware is SPI, the first anomaly information recorded by the first application software belongs to a preset anomaly code. When the first anomaly information is a preset anomaly code, the possibility of selection errors of the product model is indicated, and a self-checking program is needed. The self-checking program is the same as the process of detecting the product model by starting.
It is worth mentioning that the method further comprises:
acquiring a first remote instruction;
and adjusting the resistance information of the first digital rheostat according to the first remote instruction so as to switch the product model.
It should be noted that, when the serial products include the remote communication function, the remote switching of the product model may be implemented by a network, bluetooth, or the like. After receiving the first remote instruction, checking and analyzing the requirement of the remote instruction for switching the model of the product, and reversely inquiring the first resistance information of the corresponding first resistor according to the coding table when the model switching information is confirmed to be correct, and then calculating the resistance information of the digital rheostat according to the combination condition of the first resistance information; wherein the combination is typically at least one resistor of fixed value in series with at least one digital varistor. Finally, the resistance value of the digital rheostat is adjusted through a preset communication instruction, and the purpose of remotely switching the product model is finally achieved. In practical application, certain series products are divided into high-configuration, medium-configuration and low-configuration versions according to different software functions, but hardware accessories are always the same, when a user has the function configuration upgrading requirement, replacement or factory staff to upgrade on site is not needed, and the switching of product types is directly realized in a remote mode, so that the labor cost is saved, and the user experience is also improved.
It is worth mentioning that the method further comprises:
searching a preset coding table according to the first resistance information, and when no corresponding coding information exists;
acquiring resistance information of a first digital rheostat;
the resistance value is adjusted upwards or downwards according to the resistance value information;
if the obtained first resistance information is found, and the corresponding code cannot be found from the code table, it indicates that there is a setup error in the production process. In order not to influence the use of a user, the first resistance information is adjusted by adjusting the resistance information of the first digital rheostat upwards or downwards while recording the mark information, so that the model is searched in an adaptive mode. Because the product has model verification in operation, and when the hardware fittings are not matched, the self-checking mode is also entered, and model inquiry and switching are carried out according to the mark information.
A third aspect of the present invention provides a computer-readable storage medium having embodied therein a resistor-based product model switching method program which, when executed by a processor, implements the steps of the resistor-based product model switching method as described in any one of the above.
The invention provides a switching method, a switching system and a storage medium of product types based on resistors, wherein first, first resistance information is obtained through calculation according to first voltage information and is used for inquiring first coding information; then, selecting and jumping to a first application program according to the first coding information for switching to the product model; and finally, verifying the correctness of the product model according to the second voltage information. The invention reduces the storage quantity of software files of the same series of electronic products by setting and modifying the electrical parameters of the electronic circuit, thereby reducing the management cost and the labor cost in the production and storage links.
The functions, if implemented in the form of software functional modules and sold or used as a stand-alone product, may be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention may be embodied essentially or in a part contributing to the prior art or in a part of the technical solution, in the form of a software product stored in a storage medium, comprising several instructions for causing a computer device (which may be a personal computer, a server, a network device, etc.) to perform all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a random access Memory (RAM, random Access Memory), a magnetic disk, or an optical disk, or other various media capable of storing program codes.
The above description is only of the preferred embodiments of the present invention and is not intended to limit the present invention, but various modifications and variations can be made to the present invention by those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims (10)

1. A method of switching product models based on resistors, the method comprising:
entering a starting program;
acquiring first voltage information, and acquiring first resistance information according to the first voltage information;
searching a preset coding table according to the first resistance information to obtain first coding information;
according to the first coding information, the program jumps to a first application program;
entering the first application program;
acquiring second voltage information;
judging whether a preset voltage threshold requirement is met or not according to the second voltage information;
if not, re-entering the starting program.
2. The method for switching product models based on resistors according to claim 1, wherein the obtaining the first resistance information according to the first voltage information is specifically:
acquiring third voltage information;
obtaining partial pressure ratio information according to the ratio of the first voltage information to the third voltage information;
and obtaining the first resistance information according to the partial pressure ratio information and preset partial pressure resistance information.
3. The method for switching product types based on resistors according to claim 1, wherein the determining whether the preset voltage threshold requirement is met according to the second voltage information is specifically:
judging whether the second voltage information is in a preset stable state or not;
if yes, calculating the difference value between the second voltage information and a preset voltage threshold value to obtain first voltage difference value information;
judging whether the first voltage difference information is in a preset first difference range or not;
if not, re-entering the starting program.
4. A method for switching a product model based on a resistor according to claim 3, wherein the determining whether the second voltage information is in a preset steady state is specifically:
acquiring the second voltage information in a preset time period;
extracting at least two pieces of nearest second voltage information and calculating average voltage to obtain voltage average information;
calculating the difference value between the extracted second voltage information and the voltage average value information to obtain second voltage difference value information;
judging whether the second voltage difference information is lower than a preset difference threshold value or not;
if so, the state is in a stable state.
5. The method for switching a product model based on a resistor as claimed in claim 1, further comprising:
the first digital rheostat is used for adjusting the first resistance information;
and adjusting the resistance information of the first digital rheostat through a preset communication instruction to switch the product model.
6. The method for switching a product model based on a resistor as claimed in claim 1, further comprising:
acquiring first abnormal information in the running process of a first application program;
judging whether the first abnormal information is a preset abnormal code or not;
if yes, entering a self-checking program, and processing an abnormal state by switching the product model.
7. A system for switching a resistor-based product model, the system comprising a memory and a processor, the memory including a resistor-based product model switching method program therein, the resistor-based product model switching method program when executed by the processor performing the steps of:
entering a starting program;
acquiring first voltage information, and acquiring first resistance information according to the first voltage information;
searching a preset coding table according to the first resistance information to obtain first coding information;
according to the first coding information, the program jumps to a first application program;
entering the first application program;
acquiring second voltage information;
judging whether a preset voltage threshold requirement is met or not according to the second voltage information;
if not, re-entering the starting program.
8. The system for switching a product model of a resistor according to claim 7, wherein the first resistance information is obtained according to the first voltage information, specifically:
acquiring third voltage information;
obtaining partial pressure ratio information according to the ratio of the first voltage information to the third voltage information;
and obtaining the first resistance information according to the partial pressure ratio information and preset partial pressure resistance information.
9. The system for switching a product model based on a resistor according to claim 7, wherein the determining whether the preset voltage threshold requirement is met according to the second voltage information is specifically:
judging whether the second voltage information is in a preset stable state or not;
if yes, calculating the difference value between the second voltage information and a preset voltage threshold value to obtain first voltage difference value information;
judging whether the first voltage difference information is in a preset first difference range or not;
if not, re-entering the starting program.
10. A computer readable storage medium, on which a computer program is stored, characterized in that the computer readable storage medium comprises a switching method program of a resistor-based product model, which, when being executed by a processor, implements the steps of the switching method of a resistor-based product model according to any one of claims 1 to 6.
CN202311728581.6A 2023-12-15 2023-12-15 Method, system and storage medium for switching product types based on resistor Active CN117407033B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311728581.6A CN117407033B (en) 2023-12-15 2023-12-15 Method, system and storage medium for switching product types based on resistor

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311728581.6A CN117407033B (en) 2023-12-15 2023-12-15 Method, system and storage medium for switching product types based on resistor

Publications (2)

Publication Number Publication Date
CN117407033A true CN117407033A (en) 2024-01-16
CN117407033B CN117407033B (en) 2024-03-22

Family

ID=89487531

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311728581.6A Active CN117407033B (en) 2023-12-15 2023-12-15 Method, system and storage medium for switching product types based on resistor

Country Status (1)

Country Link
CN (1) CN117407033B (en)

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20070060241A (en) * 2005-12-08 2007-06-13 엘지전자 주식회사 Method of setting up software option by hardware option
CN103838610A (en) * 2014-03-21 2014-06-04 福建联迪商用设备有限公司 Method for automatically recognizing configuration information of mainboards in product software
CN104407842A (en) * 2014-10-21 2015-03-11 深圳市新国都技术股份有限公司 A method and system for achieving hardware version identification of POS machine
CN109537178A (en) * 2018-11-29 2019-03-29 浙江众邦机电科技有限公司 A kind of control function automatic switchover system, sewing machine control and sewing machine
CN112068885A (en) * 2019-06-10 2020-12-11 广东美的制冷设备有限公司 Screen self-adaptive driving method and device
CN114692704A (en) * 2020-12-25 2022-07-01 郑州宇通客车股份有限公司 Load motor parameter identification method and program curing method of integrated controller
CN115454512A (en) * 2022-08-16 2022-12-09 苏州浪潮智能科技有限公司 Chip drive loading configuration method, device, equipment and storage medium
CN115981613A (en) * 2022-12-23 2023-04-18 深圳创维数字技术有限公司 Multi-hardware device software adaptation method, electronic device and readable storage medium
CN116185528A (en) * 2023-04-27 2023-05-30 深圳艾为电气技术有限公司 Flexible configuration method and device for driver software of electric compressor

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20070060241A (en) * 2005-12-08 2007-06-13 엘지전자 주식회사 Method of setting up software option by hardware option
CN103838610A (en) * 2014-03-21 2014-06-04 福建联迪商用设备有限公司 Method for automatically recognizing configuration information of mainboards in product software
CN104407842A (en) * 2014-10-21 2015-03-11 深圳市新国都技术股份有限公司 A method and system for achieving hardware version identification of POS machine
CN109537178A (en) * 2018-11-29 2019-03-29 浙江众邦机电科技有限公司 A kind of control function automatic switchover system, sewing machine control and sewing machine
CN112068885A (en) * 2019-06-10 2020-12-11 广东美的制冷设备有限公司 Screen self-adaptive driving method and device
CN114692704A (en) * 2020-12-25 2022-07-01 郑州宇通客车股份有限公司 Load motor parameter identification method and program curing method of integrated controller
CN115454512A (en) * 2022-08-16 2022-12-09 苏州浪潮智能科技有限公司 Chip drive loading configuration method, device, equipment and storage medium
CN115981613A (en) * 2022-12-23 2023-04-18 深圳创维数字技术有限公司 Multi-hardware device software adaptation method, electronic device and readable storage medium
CN116185528A (en) * 2023-04-27 2023-05-30 深圳艾为电气技术有限公司 Flexible configuration method and device for driver software of electric compressor

Also Published As

Publication number Publication date
CN117407033B (en) 2024-03-22

Similar Documents

Publication Publication Date Title
US20140284390A1 (en) Networked monitor for heating ventilation and air conditioning systems
KR102522688B1 (en) Battery Residual Value Determination System
CN108338420B (en) Heating wire recognition device and method, electronic cigarette and computer storage medium
CN103995191A (en) Method and device for identifying model of air conditioner
CN111143278A (en) Electronic assembly-based bill of material processing method, device, equipment and readable medium
CN117407033B (en) Method, system and storage medium for switching product types based on resistor
CN105159809A (en) State machine based fault positioning method and apparatus
CN111651358B (en) Method for generating test case, software test method, device and server
US20130117739A1 (en) Electronic Tool for Automatically Programming a Plurality of Control Modules in a Vehicle On-Board Computer System
CN113779328B (en) Power supply monitoring data integration processing method, system, terminal and storage medium
CN112559417A (en) Control method and device for air conditioner communication, communication system and readable storage medium
CN115963766A (en) Method and system for rapidly switching multiple partial discharge sensors and storage medium
CN111258608A (en) Software upgrading method and device for terminal equipment and electronic system
KR20100079236A (en) A input switch circuit with voltage divide resisters in automobile which has reference voltage, and method thereof
US20040130325A1 (en) Method of diagnosing a motor vehicle battery
CN112162880B (en) Method and device for acquiring module correction coefficient applied to LED screen
CN109255450B (en) Method and system for online intelligent fixed value management of power fault recorder and computer readable storage medium
CN109388217B (en) Method, device and system for determining duration of unpowered hard disk
CN112598041A (en) Power distribution network cloud platform data verification method based on K-MEANS algorithm
CN113139158A (en) Method and system for monitoring and correcting COMTRADE abnormal wave recording data based on Gaussian process regression
CN114519050A (en) Vehicle part configuration logic constraint relation generation method, device, equipment and medium
US20210303495A1 (en) Setting assistance device, setting assistance method, and program
CN112747413A (en) Air conditioning system load prediction method and device
CN117826965B (en) Method, device, equipment and storage medium for protecting voltage of main board
CN117056750B (en) Intelligent torque wrench control method, device, equipment and medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant