Self-adaptive power supply method and device
By adopting an adaptive power supply method in the online board connector, the non-volatile memory is used to store the lamp board parameters and adjust the current through the power control unit, the current mismatch problem caused by plug-in errors is solved, and the safety and reliability of the connection are improved.
Patent Information
- Application Number
- CN202510059089.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-15
- Publication Date
- 2025-05-13
- Estimated Expiration
- 2045-01-15
AI Technical Summary
The plugs and sockets of existing wire-to-board connectors are prone to plug-in errors, which poses safety risks. Especially in high-precision and high-reliability electronic devices, plug-in errors may cause equipment performance to decline or fail to work properly.
Adaptive power supply method is adopted, by obtaining the number and rated current of each illuminated lamp in the lamp plate connected to the plug from the nonvolatile memory when the plug is connected to any socket, the operating current of the lamp plate is determined based on these parameters, and the operating current is provided to the lamp plate through the power control unit to ensure the current matching.
It effectively solves the current mismatch problem caused by plug-in errors, avoids safety hazards such as circuit short circuits and component damage, and improves the safety and reliability of the plug and socket connection of wire-to-board connectors.
Smart Images

Figure CN119994566A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of wire-to-board connectors, and in particular to an adaptive power supply method and device. Background Art
[0002] As a key component for connecting wire harnesses to printed circuit boards in electronic devices, wire-to-board connectors have evolved from simple to complex, and from low performance to high performance. Early wire-to-board connectors had a relatively simple structure, primarily connecting through plug-in / plug-out methods. However, these connectors suffered from poor contact and looseness. With the continuous advancement of electronic technology, the performance requirements for connectors have become increasingly stringent, prompting the continuous optimization of wire-to-board connectors in terms of structural design, material selection, and manufacturing processes. For example, wire-to-board connectors with anti-pull mechanisms have emerged. By incorporating structures such as spring detachers within the connector, they enhance connection stability and effectively prevent connection failure caused by pulling. At the same time, to meet the needs of diverse application scenarios, the variety of wire-to-board connectors has also increased, including products of various sizes, pin counts, and plug-in methods, providing more options for the design and manufacture of electronic devices.
[0003] In existing wire-to-board connector designs, sockets and plugs can usually only be connected in a fixed way, that is, plug one can only be connected to socket one, and plug two can only be connected to socket two. Although this design ensures the accuracy of the connection to a certain extent, it also has certain risks. When socket one is incorrectly connected to socket two, due to the different electrical parameters and circuit designs between the two, it may cause circuit short circuits, component damage, and even cause serious consequences such as fire. For example, in some complex electronic devices, the circuits connected to different sockets and plugs may carry different voltages and currents. Once the connection is incorrect, high voltage or high current may instantly impact the mismatched circuit, burning the corresponding electronic components, causing equipment failure, and even endangering the safety of the user.
[0004] The connection between the plug and socket of a wire-to-board connector is relatively fixed, a feature that makes it easy for misconnections to occur in actual applications. During the assembly process of electronic equipment, the plug and socket may be incorrectly connected due to operator negligence, interference from the working environment, or unclear markings. Once this happens, not only does it require disassembly and reassembly, increasing production costs and time, but it may also cause potential damage to the already connected circuits. In addition, for some high-precision, high-reliability electronic equipment, such as aerospace equipment and medical equipment, incorrect plug and socket connections may cause equipment performance to degrade or even malfunction, seriously affecting the reliability and safety of the equipment. Therefore, how to improve the accuracy of the plug and socket connections of wire-to-board connectors and reduce the risks caused by misconnections is an urgent problem that needs to be solved. Summary of the Invention
[0005] The embodiments of the present invention provide an adaptive power supply method and device, which at least solve the problem in the related art that the plug and socket of the wire-to-board connector are prone to plugging errors and pose a safety hazard.
[0006] According to one embodiment of the present invention, an adaptive power supply method is provided, comprising: when a plug is connected to any one socket, obtaining a first quantity and a rated current of each illumination lamp in a lamp board connected to the plug from a non-volatile memory, and determining an operating current of the lamp board based on the first quantity and the rated current; wherein the non-volatile memory is arranged in the lamp board to store the first quantity and the rated current of each illumination lamp in the light board; and switching a power control unit for the socket based on the operating current, so that the power control unit provides the operating current to the lamp board through the plug and the socket.
[0007] According to another embodiment of the present invention, an adaptive power supply system is also provided, including: at least one plug, one plug connected to a lamp board; at least one socket; at least one non-volatile memory, arranged in the lamp board, for storing a first quantity and a rated current of the illumination lamps in the lamp board; at least one power control unit, for powering the socket; a micro control unit, for obtaining the first quantity and the rated current from the non-volatile memory when the plug is connected to any one of the sockets, and determining the operating current of the lamp board based on the first quantity and the rated current; and, switching the power control unit for the socket based on the operating current, so that the power control unit provides the operating current to the light board through the plug and the socket.
[0008] According to yet another embodiment of the present invention, a computer-readable storage medium is provided, in which a computer program is stored. The computer program is configured to execute the steps of any one of the above method embodiments when run.
[0009] According to yet another embodiment of the present invention, a computer program product is provided, comprising computer instructions, which implement the steps of any of the above method embodiments when executed by a processor.
[0010] Through one embodiment of the present invention, the adaptive power supply method of the embodiment of the present invention can obtain the first number and rated current of each illumination lamp in the light board connected to the plug from a non-volatile memory when the plug is connected to any socket, determine the operating current of the light board based on the first number and rated current of the illumination lamps, and switch the power control unit for the socket based on the operating current so that the power control unit provides the operating current to the light board through the plug and socket. Therefore, it can solve the problem of the plug and socket of the wire-to-board connector in the related art that is prone to mis-connection and poses a safety hazard, thereby achieving the effect of improving the safety of the plug and socket connection of the wire-to-board connector. Because the method stores the parameter information of each light board in a non-volatile memory, no matter which socket the plug is inserted into, the output current of the power control unit can be automatically adjusted according to the parameters of the actually connected light board, avoiding the safety hazards such as circuit short circuit and component damage caused by current mismatch due to mis-connection, thereby ensuring the safety and reliability of the connection. BRIEF DESCRIPTION OF THE DRAWINGS
[0011] Figure 1 is a flow chart of an adaptive power supply method according to an embodiment of the present invention; Figure 2 is a flow chart of a method for switching a power supply control unit for a socket based on an operating current according to an embodiment of the present invention; Figure 3 is a flow chart of a method for triggering an early warning operation based on a first number and a second number of illumination lamps in a light panel according to an embodiment of the present invention; Figure 4 is a flow chart of a method for triggering an early warning operation based on real-time operating parameters and historical operating parameters of a light panel according to an embodiment of the present invention; Figure 5 is a flowchart of a method for determining the working status of each light panel based on a final prediction result according to an embodiment of the present invention; Figure 6 4 is a schematic structural diagram of an adaptive power supply system according to an embodiment of the present invention. DETAILED DESCRIPTION
[0012] In order to make the purpose, technical solutions and advantages of the present invention more clearly understood, the present invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention.
[0013] Hereinafter, embodiments of the present invention will be described in detail with reference to the accompanying drawings and in combination with embodiments.
[0014] It should be noted that the terms "first", "second", etc. in the description and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence.
[0015] In this embodiment, an adaptive power supply method is provided, which is applied to a microcontroller unit (MCU). Figure 1 is a flow chart of an adaptive power supply method according to an embodiment of the present invention. Figure 1 As shown, the process includes the following steps: Step S101: When a plug is connected to any socket, a first number and a rated current of each illumination lamp in the light board connected to the plug are obtained from a non-volatile memory, and an operating current of the light board is determined based on the first number and the rated current; wherein the non-volatile memory is provided in the light board to store the first number and the rated current of each illumination lamp in the light board; In an exemplary embodiment, each light board is equipped with a non-volatile memory, which is used to store relevant parameters of each lamp in the light board, such as the first number and rated current of each lamp. For example, the first number of lamps in light boards 1 to 5 is 40, 50, 60, 70, and 80 respectively, and the rated current of each lamp is 3mA. Then it can be determined that: the operating current of light board 1 is =40*3=120mA; working current of light board 2 =50*3=150mA; working current of light board 3 =60*3=180mA; working current of light board 4 =70*3=210mA; the operating current of light board five is I5=80*3=240mA. In light board one, 40 illumination lamps are connected in parallel; in light board two, 50 illumination lamps are connected in parallel; in light board three, 60 illumination lamps are connected in parallel; in light board four, 70 illumination lamps are connected in parallel; and in light board five, 80 illumination lamps are connected in parallel.
[0016] Step S102: switching the power control unit for the socket based on the working current, so that the power control unit provides the working current to the light panel through the plug and the socket.
[0017] In an exemplary embodiment, for example, when the plug 1 corresponding to the light board 1 is plugged into the socket 1, it is detected that the socket 1 supplies power to the light board 1, and the working current corresponding to the light board 1 is =120mA, the power supply unit supplying power to socket 1 is switched to power control unit (PCU) 1, where the output current of power control unit 1 is =120mA. Therefore, the power control unit 1 is used to power the light board 1. Similarly, when the plug 1 corresponding to the light board 1 is plugged into the socket 2, it is detected that the socket 2 is powering the light board 1, and the working current corresponding to the light board 1 is =120mA, the power supply unit for socket 2 is switched to power control unit 1, where the output current of power control unit 1 is =120mA. Similarly, when the plug 2 corresponding to the light board 2 is plugged into the socket 1, it is detected that the socket 1 supplies power to the light board 2, and the working current corresponding to the light board 2 is =150mA, the power supply unit supplying power to socket 1 is switched to power control unit 3, where the output current of power control unit 3 is = 150mA. Then, the power control unit 3 can be used to power the light board 2. Therefore, the appropriate power control unit can be flexibly and automatically selected to power each light board.
[0018] In an exemplary embodiment, each socket is connected to an initial power supply (such as a power adapter or battery). This power input can be a direct current (DC) or alternating current (AC) power supply and can be set based on actual conditions. The initial power supply includes a voltage stabilizing chip (such as an LDO or DC-DC converter) and a current stabilizing circuit to ensure stable voltage and current. These circuits ensure that non-volatile memory, microcontroller units, other electronic components, etc. obtain stable power when the plug is connected to the socket. At the moment the plug is connected to the socket, the initial power supply distributes power to the various components on the light board (such as non-volatile memory, illumination lamps, and other control circuits). The socket can be connected to the initial power supply in the following way: one initial power supply can be connected to each socket, or the same initial power supply can be connected to multiple sockets.
[0019] The power control unit is responsible for regulating the output current according to the instructions of the microcontroller unit to ensure that the light board receives the required operating current. Specifically, the power control unit may include a current sensor and a regulation circuit to accurately control the output current. It may also be responsible for regulating the output voltage to ensure that the lamps on the light board operate at the rated voltage. This can be achieved through a feedback control circuit to ensure voltage stability. It may also include circuits such as overcurrent protection, overvoltage protection, and short-circuit protection to ensure that the light board and power circuit are protected from damage in abnormal situations. The current sensor, regulation circuit, feedback control circuit, overcurrent protection, overvoltage protection, short-circuit protection, and other circuits can be configured based on actual conditions. The power control unit may include: Power Control Unit 1, Power Control Unit 2, Power Control Unit 3, Power Control Unit 4, and Power Control Unit 5. The output current of Power Control Unit 1 is 120mA, the output current of Power Control Unit 2 is 150mA, the output current of Power Control Unit 3 is 180mA, the output current of Power Control Unit 4 is 210mA, and the output current of Power Control Unit 5 is 240mA.
[0020] The non-volatile memory (e.g., EEPROM, FeRAM, etc.) has its own power pin connected to the light board's power circuit. Ensure that the power circuit is properly powered when the plug is connected to the socket. For example, a voltage regulator chip (such as an LDO) can be used to provide a stable power supply to the non-volatile memory.
[0021] In an exemplary embodiment, the non-volatile memory of each light board can be connected to a microcontroller unit (MCU) via a communication interface (such as I2C or SPI). These communication interfaces can be physically connected via a plug and socket connection. The non-volatile memory of each light board can be connected to the microcontroller unit (MCU) via a communication interface (such as I2C or SPI). These communication interfaces can be physically connected via a plug and socket connection. After the plug and socket are connected, the microcontroller unit (MCU) initializes communication with the non-volatile memory and sets communication protocol parameters, such as clock frequency and number of data bits.
[0022] The following is an example method for a microcontroller to read data from a non-volatile memory: Detect connection: The microcontroller first detects whether the plug is connected to the socket. This can be achieved by detecting the status of the signal line of the communication interface.
[0023] Send a read command: The MCU sends a read command, specifying the data address to be read. For EEPROM, the device address and memory address need to be sent.
[0024] Reading data: The non-volatile memory responds to the read command and sends the stored data back to the microcontroller unit. The microcontroller unit receives and analyzes the data to obtain the first quantity and rated current of each irradiation lamp.
[0025] Data verification: The microcontroller unit can perform data verification to ensure that the read data is correct. For example, a CRC checksum can be used to verify data integrity.
[0026] Through the above steps S101 to S102, since the adaptive power supply method in the embodiment of the present invention can obtain the first number and rated current of each illumination lamp in the light board connected to the plug from the non-volatile memory when the plug is connected to any socket, determine the operating current of the light board based on the first number and rated current of the illumination lamps, and switch the power control unit for the socket based on the operating current so that the power control unit provides the operating current to the light board through the plug and socket, it can solve the problem in the related art that the plug and socket of the wire-to-board connector are prone to plugging errors and pose a safety hazard, thereby achieving the effect of improving the safety of the connection between the plug and socket of the wire-to-board connector. Because this method stores the parameter information of each light board in the non-volatile memory, no matter which socket the plug is inserted into, the output current of the power control unit can be automatically adjusted according to the parameters of the actually connected light board, avoiding safety hazards such as circuit short circuits and component damage caused by current mismatch due to plugging errors, and ensuring the safety and reliability of the connection.
[0027] In one embodiment, Figure 2 FIG. 1 is a flow chart of a method for switching a power supply control unit for a socket based on a working current according to an embodiment of the present invention. Figure 2 As shown, when the working current is obtained, the method further includes: Step S201: obtaining first parameters of the light board based on the operating current, the first parameters including: sub-current of each lamp in the light board when in operation, sub-power of each lamp in the light board when in operation, and total power of the light board when in operation; In an exemplary embodiment, for example, if the number of illumination lamps connected in parallel in the lamp board and the operating current of the lamp board are obtained, parameters such as the sub-current of each illumination lamp in the lamp board when working, the sub-power of each illumination lamp in the lamp board when working, and the total power of the lamp board when working can be calculated.
[0028] The calculation steps are as follows: 1. Calculate the working sub-current of each lamp: Since the lamps are connected in parallel, the working sub-current of each lamp is equal to the working current of the lamp board divided by the number of lamps. Assume that the number of lamps connected in parallel in the lamp board is , the working current of the light board is , then the working current of each lamp is for: ; 2. Calculate the working power of each lamp: The working power of each lamp can be calculated from its working current and rated voltage. Assume that the rated voltage of each lamp is , then the working power of each lamp is for: ; 3. Total power of the light panel when working: The total power of the light panel when working is the sum of the working power of all the lamps. for: .
[0029] The following examples illustrate this: Assume that 40 illumination lamps are connected in parallel in the light board, the operating current of the light board is 120mA (0.12A), and the rated voltage of each illumination lamp is 5V.
[0030] 1. Working current of each lamp: ; 2. Working power of each irradiation lamp: ; 3. Total power of the light panel when working: .
[0031] Therefore, based on the number of parallel-connected lamps within the light panel and the panel's operating current, we can calculate each lamp's operating sub-current, each lamp's operating sub-power, and the total operating power of the light panel. In this example, each lamp's operating sub-current is 3mA, each lamp's operating sub-power is 0.015W, and the total operating power of the light panel is 0.6W.
[0032] Step S202: obtaining second parameters of the light board based on the first quantity and the rated current, the second parameters including: a rated sub-current of each illumination lamp in the light board, a rated sub-power of each illumination lamp in the light board, and a rated total power of the light board; In an exemplary embodiment, for example, when the number of lamps connected in parallel in the lamp board and the rated current of each lamp are obtained, parameters such as the rated sub-current of each lamp in the lamp board, the rated sub-power of each lamp in the lamp board, and the rated total power of the lamp board can be calculated.
[0033] The calculation steps are as follows: 1. Rated sub-current of each lamp: Since the lamps are connected in parallel, the rated sub-current of each lamp is its rated current. Assume that the rated sub-current of each lamp is .
[0034] 2. Rated power of each lamp: The rated power of each lamp can be calculated from its rated voltage and rated current. Assume that the rated voltage of each lamp is , then the rated power of each lamp is for: .
[0035] Rated total power of the light board: The rated total power of the light board is the sum of the rated sub-powers of all the lamps. Assume that the number of lamps connected in parallel in the light board is , then the rated total power of the light board for: .
[0036] The following examples illustrate this: Assume that 40 illumination lamps are connected in parallel in the light board, and the rated current of each illumination lamp is 3mA (0.003A) and the rated voltage is 5V.
[0037] 1. Rated sub-current of each irradiation lamp: ; 2. Rated power of each lamp: ; 3. Rated total power of the light panel: .
[0038] Therefore, based on the number of parallel-connected lamps in the light panel and the rated current of each lamp, the rated sub-current of each lamp, the rated sub-power of each lamp, and the rated total power of the light panel can be calculated. In this example, the rated sub-current of each lamp is 0.003A, the rated sub-power of each lamp is 0.015W, and the rated total power of the light panel is 0.6W.
[0039] In step S203 , when the difference between the first parameter and the second parameter is greater than a preset threshold, the power control unit is switched for the socket based on the working current, so that the power control unit provides the working current to the light board through the plug and the socket.
[0040] In an exemplary embodiment, for example, the initial power supply provides a measured current of 0.10 A to socket 1. When plug 1 is plugged into socket 1, that is, light board 1 connected to plug 1 is connected to socket 1, the first parameter is as follows: 1. Current of each lamp: Since the sum of the currents of each branch in the parallel circuit is equal to the total current, assuming that the resistance of each lamp remains unchanged, the current of each lamp will be Reduce to .
[0041] 2. The power of each lamp: , the voltage of each lamp remains unchanged, the current decreases, so the power of each lamp will decrease. The rated power of each lamp is , the power of each lamp is Therefore, the power of each lamp is reduced .
[0042] 3. Total power: The total power is equal to the sum of the power of each lamp, so the total power will also be reduced by 16.67%.
[0043] For another example, the initial power supply provides a measured current of 0.15A to socket 1. When plug 1 is plugged into socket 1, that is, light board 1 connected to plug 1 is connected to socket 1, the first parameter is as follows: 1. Current of each lamp: Since the sum of the currents of each branch in the parallel circuit is equal to the total current, assuming that the resistance of each lamp remains unchanged, the current of each lamp will be Increase to .
[0044] 2. The power of each lamp: , the voltage of each lamp remains unchanged, the current increases, so the power of each lamp will increase. The rated power of each lamp is , the power of each lamp is Therefore, the power of each lamp increases .
[0045] 3. Total power: The total power is equal to the sum of the power of each lamp, so the total power will also increase by 25%.
[0046] In summary, based on the comparison of the first parameter and the second parameter, a power control unit corresponding to an appropriate operating current (eg, 120 mA (0.12 A)) can be provided for the light board 1.
[0047] Alternatively, the above method can also be used to detect whether there is a fault in the lamp in each lamp panel. The specific detection method is as follows: Assume that there are 40 illumination lamps in the light board 1, and the current of each illumination lamp is 3mA. =40*3mA=120mA, then the working current of the lamp board 1 is =40*3mA=120mA. If, at this time, 10 lamps in Light Board 1 are damaged, only 30 lamps can work normally. The operating current provided to Light Board 1 is still I1=40*3=120mA. The following parameters of Light Board 1 will change as follows: 1. Total power: Since only 30 lamps are working normally, the total power will be reduced. The original total power is ), the total power is now Therefore, the total power is reduced by .
[0048] 2. The current of each normally working lamp: Since the total current remains unchanged and the number of normally working lamps decreases, the current of each normally working lamp will increase. The original current of each lamp was 3mA, and the current of each lamp is now .
[0049] 3. The power of each normally working lamp: As the current of each normally working lamp increases, the power of each lamp will also increase. The original power of each lamp is , the power of each lamp is Therefore, the power of each lamp increases .
[0050] 4. Total resistance of lamp board 1: As the number of parallel lamps decreases, the total resistance of lamp board 1 will increase. The original total resistance is , the total resistance is now .
[0051] To sum up, based on the fact that the total power of lamp board 1, the current of each normally working lamp, the power of each normally working lamp and the total resistance of lamp board 1 will all change, it is possible to determine whether there is a damaged lamp in lamp board 1 based on the change.
[0052] In one embodiment, Figure 3 is a flow chart of a method for triggering an early warning operation based on a first number and a second number of illumination lamps in a light panel according to an embodiment of the present invention. Figure 3 As shown, after switching the power supply control unit for the socket based on the working current, the method further includes: Step S301, calculating a second number of illumination lamps in the lamp panel based on the operating current and the rated current; Step S302, comparing the second quantity with the first quantity; Step S303: When the second number is not equal to the first number, generate warning information to trigger a warning operation.
[0053] In an exemplary embodiment, when the rated current of each illumination lamp connected in parallel in the lamp board and the input current of the lamp board are obtained, the number of illumination lamps in the parallel circuit can be calculated.
[0054] The calculation steps are as follows: 1. Determine the rated current of each lamp: Assume that the rated current of each lamp is .
[0055] 2. Determine the input current of the light board: Assume that the input current of the light board is .
[0056] 3. Calculate the number of lamps: Since the total current in a parallel circuit is equal to the sum of the currents in each branch, the number of lamps n can be calculated using the following formula: .
[0057] The following example illustrates this: Assume that the rated current of each illumination lamp is 3mA (0.003A) and the input current of the lamp board (calculated working current) is 120mA (0.12A).
[0058] 1. Rated current of each lamp: .
[0059] 2. Input current of the light board: .
[0060] 3. Calculate the number of irradiation lamps: .
[0061] Therefore, the number of lamps in the parallel circuit can be inferred from the rated current of each lamp connected in parallel in the lamp board and the input current of the lamp board. In this example, the number of lamps is 40.
[0062] However, when the power control unit 1 is used to continuously power the light board 1, for example, the output current of the power control unit 1 is (the calculated working current) 90 mA (0.09 A).
[0063] 1. Rated current of each lamp: .
[0064] 2. Input current of the light board: .
[0065] 3. Calculate the number of irradiation lamps: .
[0066] Therefore, the number of lamps in the parallel circuit can be inferred from the rated current of each lamp connected in parallel in the lamp board and the input current of the lamp board. In this example, the number of lamps is 30.
[0067] In summary, if the first number (40) is not equal to the second number (30), it is possible that 10 lamps in lamp panel 1 are not functioning properly. Based on this, the microcontroller can generate a warning message to trigger a warning operation. The warning operation can include lighting a fault lamp, flashing a fault lamp, or sounding a buzzer alarm.
[0068] In one embodiment, in one embodiment, Figure 4 is a flow chart of a method for triggering an early warning operation based on the real-time working parameters and historical working parameters of a light panel according to an embodiment of the present invention. Figure 4 As shown, the method further includes: Step S401, obtaining the real-time operating parameters of each lamp panel, the real-time operating parameters including: real-time current, real-time voltage, real-time temperature, and real-time input resistance; Step S402: Obtain historical operating parameters of each light panel, including historical current, historical voltage, historical temperature, and historical input resistance; Step S403: using a machine learning model to compare the real-time operating parameters with the historical operating parameters one by one; Step S404: When the difference between the real-time working parameter and one of the historical working parameters exceeds a preset threshold, it is determined that an abnormality exists, and an early warning message is generated to trigger an early warning operation.
[0069] In one exemplary embodiment, a machine learning model is implemented within the microcontroller unit. This model continuously records and learns the historical and real-time operating parameters of each light panel, comparing each panel's real-time operating parameters with the historical parameters in real time. The operating status of each panel is determined based on the comparison results. For example, if the difference between a real-time and historical operating parameter exceeds a preset threshold, this indicates a data anomaly for that panel, generating an alert and triggering a warning action to alert personnel to inspect the panel.
[0070] In one embodiment, Figure 5 is a flow chart of a method for determining the working status of each light panel based on the final prediction result according to an embodiment of the present invention. Figure 5 As shown, the method further includes: Step S501: construct a first feature matrix and a label vector based on real-time working parameters and historical working parameters; wherein the label vector includes: normal, lamp board failure, poor contact between the plug and the socket, and reverse insertion of the plug and the socket; Step S502: predicting a first prediction result for each light board using the first feature matrix and the label vector based on a random forest algorithm to determine the state of each light board; In an exemplary embodiment, during the training phase, the random forest uses historical operating parameters as the feature matrix : ; label vector Contains the label for each example: .
[0071] The random forest model RF is trained using the following algorithm: .
[0072] In the prediction phase, random forest uses the real-time working parameters as the feature matrix : ; Use the random forest model RF to predict the test data: ,in, It is the prediction result of the random forest model RF.
[0073] Step S503: constructing a second feature matrix based on the first prediction result; Step S504: predicting a final prediction result of each light board using the second feature matrix based on the support vector machine, so as to determine the working state of each light board based on the final prediction result.
[0074] In an exemplary embodiment, during the training phase, a support vector machine is used to train the output of the random forest: ,in, is the trained support vector machine model.
[0075] In the prediction stage, the trained support vector machine model is used to predict new samples:
[0076] in, is the prediction result of the support vector machine.
[0077] In one embodiment, the random forest algorithm includes: ; in, The first characteristic matrix includes the historical current, historical voltage, historical temperature, and historical input resistance when training and validating the random forest algorithm. When using the random forest algorithm for prediction, the first characteristic matrix includes the real-time current, real-time voltage, real-time temperature, and real-time input resistance. is the label vector; is the random selection of features when building the tree; The process of training the model; is a single tree in a random forest.
[0078] In one embodiment, the algorithm used by the support vector machine includes: .
[0079] In one exemplary implementation, the output of a random forest (RF) algorithm can be used as input features for a support vector machine (SVM). The following is a detailed description and example of how to use the output of a random forest algorithm to train a support vector machine model: The Support Vector Machine (SVM) algorithm is described as follows: A support vector machine is a supervised learning algorithm that distinguishes different categories by finding a hyperplane that maximizes the margin. For nonlinearly separable data, SVM can map the data to a higher-dimensional space using the kernel technique.
[0080] The input data includes: 1. Feature Matrix : It is composed of the predicted probability of the random forest, that is, the output of the random forest becomes the input feature of the support vector machine.
[0081] 2. Label vector Y: This is the same label vector used by random forest, including the status of the light board (normal, light board fault, poor contact between the plug and the socket, plug and socket inserted incorrectly).
[0082] The algorithm steps include: 1. Training random forest: Use historical operating parameters (historical current, historical voltage, historical temperature, historical resistance) as the feature matrix X, and (normal, light board failure, poor contact between plug and socket, plug and socket inserted reversely) as the label vector Y to train the random forest model and obtain the predicted probability of each category. .
[0083] 2. Generate a new feature matrix: transform the predicted probability of random forest and as the new feature matrix , used for training support vector machines.
[0084] 3. Training support vector machine: using new feature matrix And the original label vector Y is used to train the support vector machine model.
[0085] 4. Prediction: Use the trained support vector machine model to predict the new real-time operating parameters (real-time current, real-time voltage, real-time temperature, real-time resistance) to obtain the final prediction results.
[0086] The following example explains the above process: For example, there is the following training dataset: Historical current (mA) Historical voltage (V) Historical temperature (℃) Historical resistance (Ω) Label (normal / faulty / poor contact between plug and socket / inverted plug and socket) 120 5.0 30 100 normal 150 5.0 30 100 normal 120 4.8 32 110 Poor contact 1. Random Forest Training: The random forest model is trained based on historical working parameters and outputs the predicted probability for each category.
[0087] 2. Generate a new feature matrix: Assume that the predicted probability of the random forest for the above data set is as follows (simplified example): Normal probability Failure probability Probability of poor contact between plug and socket Probability of plug and socket being inserted in reverse 0.7 0.1 0.1 0.1 These probability values constitute the new feature matrix of the support vector machine .
[0088] 3. Support Vector Machine Training: Using New Feature Matrix And the original label vector Y is used to train the support vector machine model.
[0089] 4. Predicting a new sample: Assume the real-time operating parameters of the new sample are: [120mA, 4.8V, 32°C, 110Ω]. The random forest model predicts the probabilities for the new sample as: [0.6, 0.2, 0.15, 0.05]. These probabilities are input as new features into the support vector machine model to obtain the final prediction result.
[0090] By using the above method, the output of the random forest can be used as the input features of the support vector machine, thereby combining the advantages of both models to improve the accuracy of prediction. This method is particularly suitable for processing complex, nonlinearly separable data.
[0091] Through the description of the above embodiments, those skilled in the art will clearly understand that the methods according to the above embodiments can be implemented by adding the necessary general hardware platform to software. Of course, hardware can also be used, but in many cases the former is the more preferred implementation method. Based on this understanding, the technical solution of the present invention, or the portion that contributes to the existing technology, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, or optical disk) and includes a number of instructions for enabling a terminal device (which can be a mobile phone, computer, server, or network device, etc.) to execute the methods described in various embodiments of the present invention.
[0092] An adaptive power supply system is also provided in an embodiment of the present invention, which is used to implement the above-mentioned embodiments and preferred embodiments, and will not be repeated here. As used below, the term "module" can be a combination of software and / or hardware that implements a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, implementation in hardware, or a combination of software and hardware, is also possible and contemplated.
[0093] Figure 6 FIG. 1 is a schematic diagram of a structure of an adaptive power supply system according to an embodiment of the present invention. Figure 6As shown, the system includes: At least one plug 61, one plug 61 is connected to one light board 63; at least one socket 62; at least one non-volatile memory 64 , disposed in the lamp board 63 , for storing a first number and a rated current of the irradiation lamps in the lamp board 63 ; at least one power control unit 65 for supplying power to the socket 62; The micro control unit 66 is used to obtain the first quantity and the rated current from the non-volatile memory 64 when the plug 61 is connected to any one of the sockets 62, and determine the operating current of the lamp board 63 based on the first quantity and the rated current; and switch the power control unit 65 for the socket 62 based on the operating current, so that the power control unit 65 provides the operating current to the lamp board 63 through the plug 61 and the socket 62.
[0094] By adopting the above technical solution, the adaptive power supply system in the embodiment of the present invention can, when a plug 61 is connected to any socket 62, retrieve the first number and rated current of the illumination lamps in the lamp board 63 connected to the plug 61 from the non-volatile memory 64, determine the operating current of the lamp board 63 based on the first number and the rated current, and switch the power supply control unit 65 for the socket 62 based on the operating current so that the power supply control unit 65 provides the operating current to the lamp board 63 through the plug 61 and the socket 62. Therefore, the problem of the related art that the plug 61 and the socket 62 of the wire-to-board connector are prone to mis-connection and thus pose a safety hazard, thereby achieving the effect of improving the safety of the connection between the plug 61 and the socket 62 of the wire-to-board connector. This is because the system stores the parameter information of each lamp board 63 in the non-volatile memory 64, so that no matter which socket 62 the plug 61 is inserted into, the output current of the power supply control unit 65 can be automatically adjusted according to the parameters of the actually connected lamp board 63, avoiding the safety hazards such as circuit short circuit and component damage caused by current mismatch caused by mis-connection, thereby ensuring the safety and reliability of the connection.
[0095] In one embodiment, the micro control unit 66 is further configured to: Based on the working current, the first parameters of the lamp board 63 are obtained. The first parameters include: the sub-current of each lamp in the lamp board 63 when working, the sub-power of each lamp in the lamp board 63 when working, and the total power of the lamp board 63 when working; Obtaining second parameters of the lamp board 63 based on the first quantity and the rated current, the second parameters including: a rated sub-current of each irradiation lamp in the lamp board 63, a rated sub-power of each irradiation lamp in the lamp board 63, and a rated total power of the lamp board 63; When the difference between the first parameter and the second parameter is greater than a preset threshold, the power control unit 65 is switched for the socket 62 based on the working current, so that the power control unit 65 provides the working current to the light board 63 through the plug 61 and the socket 62.
[0096] In one embodiment, the micro control unit 66 is further configured to: Calculating a second number of illumination lamps in the lamp board 63 based on the operating current and the rated current; comparing the second quantity to the first quantity; In the case that the second quantity is not equal to the first quantity, an early warning message is generated to trigger an early warning operation.
[0097] In one embodiment, the micro control unit 66 is further configured to: Obtaining real-time operating parameters of each lamp board 63, including real-time current, real-time voltage, real-time temperature, and real-time input resistance; Obtaining historical operating parameters of each lamp board 63, the historical operating parameters including: historical current, historical voltage, historical temperature, and historical input resistance; Use machine learning models to compare real-time operating parameters with historical operating parameters one by one; When the difference between a real-time working parameter and a certain item of the historical working parameter exceeds a preset threshold, it is determined that an abnormality exists and an early warning message is generated to trigger an early warning operation.
[0098] In one embodiment, the micro control unit 66 is further configured to: A first feature matrix and a label vector are constructed based on real-time working parameters and historical working parameters; wherein the label vector includes: normal, lamp board 63 fault, poor contact between plug 61 and socket 62, and plug 61 and socket 62 are inserted reversely; Predicting a first prediction result of each light board 63 using the first feature matrix and the label vector based on a random forest algorithm to determine the state of each light board 63; Constructing a second feature matrix based on the first prediction result; The final prediction result of each light board 63 is predicted using the second feature matrix based on the support vector machine, so as to determine the working state of each light board 63 based on the final prediction result.
[0099] In one embodiment, the random forest algorithm includes: ; in, The first characteristic matrix includes the historical current, historical voltage, historical temperature, and historical input resistance when training and validating the random forest algorithm. When using the random forest algorithm for prediction, the first characteristic matrix includes the real-time current, real-time voltage, real-time temperature, and real-time input resistance. is the label vector; is the random selection of features when building the tree; The process of training the model; is a single tree in a random forest.
[0100] In one embodiment, the algorithm used by the support vector machine includes: .
[0101] In an exemplary embodiment, the above-mentioned adaptive power supply system can be applied to male therapeutic instruments. For example, the male therapeutic instrument can have four lamp boards and one backboard, a total of five boards. Each board corresponds to a 4-phase output socket. In the daily design and production process, the socket will adopt an anti-foolproof function to ensure that each lamp board corresponds to the corresponding drive circuit for precise positioning and control management. At the same time, when the connector is plugged in reverse, the current is too large and the corresponding circuit will be burned. However, plugs and sockets with anti-foolproof functions are not necessarily suitable for plugs and sockets of male therapeutic instruments, resulting in poor adaptability.
[0102] In an exemplary embodiment, for a 4-phase output socket, the 4 phases are: OUT1, OUT2, ground, TEMP; respectively referring to output 1, output 2, ground, and temperature sensor input.
[0103] In an exemplary embodiment, at the moment the plug and the socket are plugged in, the microcontroller unit can also be used to detect the temperature value of the TEMP phase. If the temperature value is not the default temperature value before power-on, it indicates that there is an error in the connection between the plug and the socket. If there is an error in the connection between the plug and the socket, the microcontroller unit can be used to output an alarm signal and stop the output of OUT1 and OUT2 at the same time.
[0104] It should be noted that each of the above modules can be implemented through software or hardware. For the latter, implementation can be achieved through, but not limited to, the following methods: all of the above modules are located in the same processor; or the above modules are located in different processors in any combination. The above preset thresholds can be set according to actual circumstances and are not limited in the embodiments of the present invention.
[0105] An embodiment of the present invention further provides a computer-readable storage medium, in which a computer program is stored. The computer program is configured to execute the steps of any one of the above method embodiments when run.
[0106] In an exemplary embodiment, the computer-readable storage medium may include, but is not limited to, various media that can store computer programs, such as a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk, or an optical disk.
[0107] An embodiment of the present invention further provides an electronic device, comprising a memory and a processor, wherein the memory stores a computer program, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.
[0108] In an exemplary embodiment, the electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor, and the input / output device is connected to the processor.
[0109] An embodiment of the present invention further provides a computer program product, comprising computer instructions, which, when executed by a processor, implement the steps of the method described in various embodiments of the present invention.
[0110] For specific examples in this embodiment, reference may be made to the examples described in the above embodiments and exemplary implementation modes, and this embodiment will not be described in detail here.
[0111] Obviously, those skilled in the art will appreciate that the various modules or steps of the present invention described above can be implemented using a general-purpose computing device, can be centralized on a single computing device, or can be distributed across a network of multiple computing devices. They can be implemented using program code executable by the computing device, and thus, can be stored in a storage device and executed by the computing device. In some cases, the steps shown or described herein can be performed in a different order than that shown, or can be fabricated as separate integrated circuit modules, or multiple modules or steps can be fabricated as a single integrated circuit module. Thus, the present invention is not limited to any particular combination of hardware and software.
[0112] The foregoing description is merely a preferred embodiment of the present invention and is not intended to limit the present invention. Those skilled in the art will readily appreciate that various modifications and variations of the present invention are possible. Any modifications, equivalent substitutions, or improvements made within the principles of the present invention are intended to be within the scope of protection of the present invention.
Claims
1. An adaptive power supply method, characterized in that: The method is applied to a micro control unit, comprising: When the plug is connected to any one of the sockets, a first quantity and a rated current of each irradiation lamp in the lamp board connected to the plug are obtained from a non-volatile memory, and an operating current of the lamp board is determined based on the first quantity and the rated current; wherein the non-volatile memory is arranged in the lamp board to store the first quantity and the rated current of each irradiation lamp in the lamp board; A power control unit is switched for the socket based on the operating current, so that the power control unit provides the operating current to the light board through the plug and the socket.
2. The method according to claim 1, characterized in that When the working current is obtained, the method further includes: Based on the working current, a first parameter of the light board is obtained, wherein the first parameter includes: a sub-current of each irradiation lamp in the light board when working, a sub-power of each irradiation lamp in the light board when working, and a total power of the light board when working; Based on the first quantity and the rated current, a second parameter of the lamp board is obtained, wherein the second parameter includes: a rated sub-current of each irradiation lamp in the lamp board, a rated sub-power of each irradiation lamp in the lamp board, and a rated total power of the lamp board; When the difference between the first parameter and the second parameter is greater than a preset threshold, the power control unit is switched for the socket based on the working current so that the power control unit provides the working current to the light board through the plug and the socket.
3. The method according to claim 2, characterized in that After switching the power control unit for the socket based on the working current, the method further includes: Calculate a second number of the illumination lamps in the lamp panel based on the operating current and the rated current; comparing the second amount to the first amount; When the second number is not equal to the first number, warning information is generated to trigger a warning operation.
4. The method according to claim 2, characterized in that: The method further comprises: Acquire the real-time operating parameters of each of the lamp panels, the real-time operating parameters including: real-time current, real-time voltage, real-time temperature, and real-time input resistance; Acquire historical operating parameters of each of the lamp panels, the historical operating parameters including: historical current, historical voltage, historical temperature, and historical input resistance; Using a machine learning model to compare the real-time operating parameters with the historical operating parameters one by one; When the difference between the real-time working parameter and one of the historical working parameters exceeds a preset threshold, it is determined that an abnormality exists, and warning information is generated to trigger a warning operation.
5. The method according to claim 4, characterized in that The method further comprises: A first feature matrix and a label vector are constructed based on the real-time working parameters and the historical working parameters; wherein the label vector includes: normal, lamp board failure, poor contact between the plug and the socket, and reverse insertion of the plug and the socket; Predicting a first prediction result of each of the light boards using the first feature matrix and the label vector based on a random forest algorithm to determine a state of each of the light boards; Constructing a second feature matrix based on the first prediction result; The second feature matrix is used to predict the final prediction result of each of the light panels based on the support vector machine, so as to determine the working state of each of the light panels based on the final prediction result.
6. The method according to claim 5, characterized in that The random forest algorithm includes: ; in, is the first characteristic matrix. When the random forest algorithm is trained and verified, the first characteristic matrix includes: historical current, historical voltage, historical temperature, and historical input resistance; when the random forest algorithm is used for prediction, the first characteristic matrix includes: real-time current, real-time voltage, real-time temperature, and real-time input resistance; is the label vector; is the random selection of features when building the tree; The process of training the model; is a single tree in a random forest.
7. The method according to claim 6, characterized in that The algorithm adopted by the support vector machine includes: 。 8. An adaptive power supply system, characterized in that: include: at least one plug, one plug connected to one light board; At least one socket; at least one non-volatile memory, disposed in the lamp board, for storing a first number and a rated current of the irradiation lamps in the lamp board; at least one power control unit, configured to supply power to the socket; a micro control unit, configured to obtain the first quantity and the rated current from the non-volatile memory when the plug is connected to any one of the sockets, and determine the operating current of the lamp board based on the first quantity and the rated current; And, based on the working current, a power control unit is switched for the socket, so that the power control unit provides the working current to the light board through the plug and the socket.
9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, wherein the computer program implements the steps of the method described in any one of claims 1 to 7 when executed by a processor.
10. A computer program product comprising computer instructions, characterized in that When the computer instructions are executed by a processor, the steps of the method described in any one of claims 1 to 7 are implemented.
Citation Information
Patent Citations
Identifiable plug and combination thereof
CN102403626A
Extension line device and controller thereof
CN110556672A
Intelligent household electrical appliance system
CN112804126A
Electric vehicle charging system, equipment and charging method
CN115303093A
LED lamp body, lighting system and control method
CN116321577A