An adaptive power supply method and apparatus
By using an adaptive power supply method, non-volatile memory and microcontroller units are used to obtain lamp board parameters and automatically adjust the output current of the power control unit. This solves the safety hazard of incorrect plug and socket insertion of wire-to-board connectors and improves the safety and reliability of the connection.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-15
- Publication Date
- 2026-03-31
AI Technical Summary
The plugs and sockets of existing wire-to-board connectors are prone to incorrect insertion, posing safety hazards that may lead to short circuits, component damage, or even fires. This is especially problematic in high-precision, high-reliability electronic devices, affecting the reliability and safety of the equipment.
An adaptive power supply method is adopted, which stores the number and rated current of each illumination lamp in the lamp board through non-volatile memory. The microcontroller obtains these parameters when the plug and socket are connected, and switches the power control unit for the socket based on the operating current to ensure that the appropriate operating current is provided and avoid current mismatch caused by incorrect plugging.
This improves the safety and reliability of the plug and socket connections of the wire-to-board connector, avoids short circuits and component damage caused by incorrect insertion, and ensures the stability and safety of the connection.
Smart Images

Figure CN119994566B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the technical field of wire-to-board connectors, and in particular to an adaptive power supply method and device. Background Technology
[0002] Wire-to-board connectors, as key components in electronic devices that connect wire harnesses to printed circuit boards, have evolved from simple to complex and from low-performance to high-performance. Early wire-to-board connectors had relatively simple structures, primarily achieving connections through mating, but suffered from poor contact and easy loosening. With the continuous development of electronic technology, the performance requirements for connectors have become increasingly stringent, prompting continuous optimization in structural design, material selection, and manufacturing processes. For example, wire-to-board connectors with tensile strength mechanisms have emerged, enhancing connection stability and effectively preventing connection failure due to pulling by incorporating internal spring release mechanisms. Simultaneously, to meet the needs of different application scenarios, the variety of wire-to-board connectors has also increased, including products with various sizes, pin counts, and mating methods, providing more choices for the design and manufacture of electronic devices.
[0003] In existing wire-to-board connector designs, sockets and plugs typically have only fixed mating methods: plug one can only be plugged into socket one, and plug two can only be plugged into socket two. While this design ensures connection accuracy to a certain extent, it also carries certain risks. When socket one is incorrectly plugged into socket two, the differences in electrical parameters and circuit design between the two may lead to short circuits, component damage, or even serious consequences such as fires. For example, in some complex electronic devices, the circuits connected to different sockets and plugs may carry different voltages and currents. If incorrectly plugged in, high voltage or high current may instantly overwhelm the mismatched circuits, burning out the corresponding electronic components, causing equipment malfunctions, and even endangering user safety.
[0004] The connection between the plug and socket of a wire-to-board connector is relatively fixed, a characteristic that makes it prone to incorrect connection in practical applications. During the assembly of electronic equipment, operator negligence, environmental interference, or unclear labeling can lead to incorrect plug and socket connections. Once this occurs, not only does it require disassembly and reassembly, increasing production costs and time, but it can also potentially damage already connected circuits. Furthermore, for some high-precision, high-reliability electronic devices, such as aerospace and medical equipment, incorrect plug and socket connections can lead to performance degradation or even malfunction, severely impacting the reliability and safety of the equipment. Therefore, improving the accuracy of plug and socket connections in wire-to-board connectors and reducing the risks associated with incorrect connections is a pressing issue that needs to be addressed. Summary of the Invention
[0005] This invention provides an adaptive power supply method and device, which at least solves the problem in related technologies where the plugs and sockets of wire-to-board connectors are prone to misconnection, thus posing safety hazards.
[0006] According to one embodiment of the present invention, an adaptive power supply method is provided, comprising: when a plug is connected to any socket, obtaining from a non-volatile memory a first number and rated current of each illumination lamp in a lamp panel connected to the plug, and determining an operating current of the lamp panel based on the first number and the rated current; wherein the non-volatile memory is disposed in the lamp panel to store the first number and the rated current of each illumination lamp in the lamp panel; 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 panel through the plug and the socket.
[0007] According to another embodiment of the present invention, an adaptive power supply system is also provided, comprising: at least one plug connected to a lamp panel; at least one socket; at least one non-volatile memory disposed within the lamp panel for storing a first number and rated current of illumination lamps within the lamp panel; at least one power control unit for supplying power to the socket; a microcontroller unit for, when the plug is connected to any one of the sockets, retrieving the first number and the rated current from the non-volatile memory, determining the operating current of the lamp panel based on the first number 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 lamp panel through the plug and the socket.
[0008] According to yet another embodiment of the present invention, a computer-readable storage medium is also provided, wherein a computer program is stored therein, wherein the computer program is configured to perform the steps in any of the above method embodiments when executed.
[0009] According to yet another embodiment of the present invention, a computer program product is also provided, including computer instructions that, when executed by a processor, implement the steps in any of the above method embodiments.
[0010] Through one embodiment of the present invention, the adaptive power supply method can, when the plug is connected to any socket, retrieve the first number and rated current of each illumination lamp in the lamp board connected to the plug from a non-volatile memory, determine the operating current of the lamp 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 operating current to the lamp board through the plug and socket. Therefore, it can solve the problem of safety hazards caused by incorrect plug and socket connection of wire-to-board connectors in related technologies, thereby improving the safety of plug and socket connection of wire-to-board connectors. Because this method stores the parameter information of each lamp board in a non-volatile memory, it can automatically adjust the output current of the power control unit according to the actual lamp board parameters regardless of which socket the plug is inserted into, avoiding safety hazards such as short circuits and component damage that may be caused by current mismatch due to incorrect plug connection, and ensuring the safety and reliability of the connection. Attached Figure Description
[0011] Figure 1 This is a flowchart of an adaptive power supply method according to an embodiment of the present invention;
[0012] Figure 2 This is a flowchart of a method for switching power control units based on the operating current of a socket according to an embodiment of the present invention;
[0013] Figure 3 This is a flowchart of a method for triggering an early warning operation based on a first and second number of illumination lamps in a lamp panel, according to an embodiment of the present invention.
[0014] Figure 4 This is a flowchart of a method for triggering an early warning operation based on real-time and historical operating parameters of a light panel, according to an embodiment of the present invention.
[0015] Figure 5 This is a flowchart of a method for determining the working state of each lamp panel based on the final prediction result according to an embodiment of the present invention;
[0016] Figure 6 This is a schematic diagram of an adaptive power supply system according to an embodiment of the present invention. Detailed Implementation
[0017] To make the objectives, technical solutions, and advantages of this invention clearer, the 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 merely illustrative and not intended to limit the invention.
[0018] The embodiments of the present invention will be described in detail below with reference to the accompanying drawings and examples.
[0019] It should be noted that the terms "first," "second," etc., in the specification, claims, and drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence.
[0020] This embodiment provides an adaptive power supply method applied to a microcontroller unit (MCU). Figure 1 This is a flowchart of an adaptive power supply method according to an embodiment of the present invention, such as... Figure 1 As shown, the process includes the following steps:
[0021] Step S101: When the plug is connected to any socket, the first number and rated current of each lamp in the lamp board connected to the plug are obtained from the non-volatile memory, and the operating current of the lamp board is determined based on the first number and rated current; wherein, the non-volatile memory is provided in the lamp board to store the first number and rated current of each lamp in the lamp board.
[0022] In one exemplary embodiment, each lamp panel is equipped with a non-volatile memory for storing relevant parameters of each lamp within the lamp panel, such as the first number and rated current of each lamp. For example, the first number of lamps in lamp panels one through five are 40, 50, 60, 70, and 80, respectively, and the rated current of each lamp is 3mA. Therefore, the operating current of lamp panel one can be determined. =40*3=120mA; Operating current of lamp board two =50*3=150mA; Operating current of lamp board three =60*3=180mA; Operating current of lamp board four =70*3=210mA; the operating current of lamp board five is I5=80*3=240mA. Among them, in lamp board one, 40 illumination lamps are connected in parallel; in lamp board two, 50 illumination lamps are connected in parallel; in lamp board three, 60 illumination lamps are connected in parallel; in lamp board four, 70 illumination lamps are connected in parallel; and in lamp board five, 80 illumination lamps are connected in parallel.
[0023] Step S102: Based on the operating current, switch the power control unit for the socket so that the power control unit provides operating current to the lamp board through the plug and socket.
[0024] In one exemplary implementation, for example, when the plug corresponding to lamp board one is plugged into socket one, it is detected that socket one supplies power to lamp board one, and the operating current corresponding to lamp board one is... =120mA, then the power supply unit supplying power to socket one will be switched to power control unit (PCU) one, wherein the output current of power control unit one is =120mA. Therefore, power supply control unit one supplies power to lamp board one. Similarly, when plug one corresponding to lamp board one is plugged into socket two, it is detected that socket two supplies power to lamp board one, and the operating current corresponding to lamp board one is... =120mA, then the power supply unit supplying power to socket two will be switched to power control unit one, wherein the output current of power control unit one is =120mA. Similarly, when plug two corresponding to lamp board two is plugged into socket one, it is detected that socket one supplies power to lamp board two, and the operating current corresponding to lamp board two is... =150mA, then the power supply unit supplying power to socket one will be switched to power control unit three, where the output current of power control unit three is =150mA. Therefore, power control unit three can be used to power lamp board two. Thus, a suitable power control unit can be flexibly and automatically selected to power each lamp board.
[0025] In one exemplary implementation, each socket is connected to an initial power supply (e.g., a power adapter or battery). This power input can be direct current (DC) or alternating current (AC), and can be configured based on actual conditions. The initial power supply includes a voltage regulator chip (such as an LDO or DC-DC converter) and a current regulating circuit to ensure a stable voltage and current supply. These circuits ensure that non-volatile memory, microcontrollers, and other electronic components receive a stable power supply when the plug and socket are connected. At the moment of plug-in / socket connection, the initial power supply distributes power to the various components on the lamp board (e.g., non-volatile memory, illumination lamps, and other control circuits). The connection method between the sockets and the initial power supply can be either one for each socket or multiple sockets connected to the same initial power supply.
[0026] The power control unit is responsible for adjusting the output current according to the instructions of the microcontroller unit to ensure that the lamp board receives the required operating current. Specifically, the power control unit may include a current sensor and an adjustment circuit to precisely control the output current. It can also regulate the output voltage to ensure that the illumination lamps on the lamp board operate at their rated voltage. This can be achieved through a feedback control circuit to ensure voltage stability. It may also include overcurrent protection, overvoltage protection, and short-circuit protection circuits to ensure that the lamp board and power supply circuit are protected from damage in abnormal conditions. The current sensor, adjustment circuit, feedback control circuit, overcurrent protection, overvoltage protection, and short-circuit protection 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.
[0027] The non-volatile memory (e.g., EEPROM, FeRAM, etc.) has its own power supply pins, which are connected to the power supply circuit of the lamp board. When connecting the plug and socket, ensure the power supply circuit is functioning correctly. For example, a voltage regulator chip (such as an LDO) can be used to provide a stable power supply to the non-volatile memory.
[0028] In one exemplary embodiment, the non-volatile memory of each lamp board can be connected to a microcontroller unit (MCU) via a communication interface (such as I2C or SPI). These communication interfaces are physically connected via a plug-and-socket connection. After the plug-and-socket connection is established, the microcontroller unit (MCU) initializes communication with the non-volatile memory and sets parameters of the communication protocol, such as clock frequency and data bit width.
[0029] The following is an exemplary method for a microcontroller to read data from non-volatile memory:
[0030] Connection detection: The microcontroller first detects whether the plug is connected to the socket. This can be achieved by detecting the status of the signal lines of the communication interface.
[0031] Sending a read command: The microcontroller sends a read command, specifying the address of the data to be read. For EEPROM, both the device address and the memory address need to be sent.
[0032] Data Reading: In response to a read command, the non-volatile memory sends the stored data back to the microcontroller unit. The microcontroller unit receives and parses this data to obtain the initial quantity and rated current of each illumination lamp.
[0033] 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 the integrity of the data.
[0034] Through steps S101 to S102, the adaptive power supply method in this embodiment of the invention can obtain the first number and rated current of each illumination lamp in the lamp board connected to the plug from the non-volatile memory when the plug is connected to any socket. Based on the first number and rated current of the illumination lamps, the operating current of the lamp board is determined, and the power control unit is switched for the socket based on the operating current. This allows the power control unit to provide operating current to the lamp board through the plug and socket. Therefore, it can solve the problem of safety hazards caused by incorrect plug-in connections in wire-to-board connectors in related technologies, thereby improving the safety of plug-to-socket connections. Because this method stores the parameter information of each lamp board in the non-volatile memory, it can automatically adjust the output current of the power control unit according to the actual connected lamp board parameters, regardless of which socket the plug is inserted into. This avoids safety hazards such as short circuits and component damage that may be caused by current mismatch due to incorrect plugging, ensuring the safety and reliability of the connection.
[0035] In one implementation, Figure 2 This is a flowchart of a method for switching power control units for sockets based on operating current according to an embodiment of the present invention, as shown below. Figure 2 As shown, when the operating current is obtained, the method further includes:
[0036] Step S201: Obtain the first parameters of the lamp board based on the operating current. The first parameters include: the sub-current of each lamp in the lamp board when it is working, the sub-power of each lamp in the lamp board when it is working, and the total power of the lamp board when it is working.
[0037] In one exemplary embodiment, for example, if the number of illumination lamps connected in parallel within the lamp panel and the operating current of the lamp panel are obtained, parameters such as the sub-current of each illumination lamp within the lamp panel when it is working, the sub-power of each illumination lamp within the lamp panel when it is working, and the total power of the lamp panel when it is working can be calculated.
[0038] The calculation steps are as follows:
[0039] 1. Calculate the operating sub-current of each illumination lamp: Since the illumination lamps are connected in parallel, the operating sub-current of each illumination lamp is equal to the operating current of the lamp panel divided by the number of illumination lamps. Assume the number of illumination lamps connected in parallel within the lamp panel is... The operating current of the lamp board is Then the operating sub-current of each illumination lamp for: ;
[0040] 2. Calculate the operating power of each lamp: The operating power of each lamp can be calculated using its operating current and rated voltage. Assume the rated voltage of each lamp is... Then the operating sub-power of each illumination lamp for: ;
[0041] 3. Total power of the lamp panel during operation: The total power of the lamp panel during operation is the sum of the operating sub-powers of all the illumination lamps. Therefore, the total power of the lamp panel is... for: .
[0042] The following examples illustrate this point:
[0043] Assume that 40 illumination lamps are connected in parallel within the lamp panel, the operating current of the lamp panel is 120mA (0.12A), and the rated voltage of each illumination lamp is 5V.
[0044] 1. Operating sub-current of each illumination lamp: ;
[0045] 2. Operating power of each illumination lamp: ;
[0046] 3. Total power of the lamp panel during operation: .
[0047] Therefore, by calculating the number of lamps connected in parallel within the lamp panel and the operating current of the lamp panel, the sub-current of each lamp, the sub-power of each lamp, and the total power of the lamp panel during operation can be determined. In this example, the operating sub-current of each lamp is 3mA, the operating sub-power of each lamp is 0.015W, and the total power of the lamp panel during operation is 0.6W.
[0048] Step S202: Based on the first quantity and rated current, the second parameters of the lamp panel are obtained. The second parameters include: the rated sub-current of each lamp in the lamp panel, the rated sub-power of each lamp in the lamp panel, and the rated total power of the lamp panel.
[0049] In one exemplary embodiment, for example, given the number of illumination lamps connected in parallel within the lamp panel and the rated current of each illumination lamp, parameters such as the rated sub-current of each illumination lamp within the lamp panel, the rated sub-power of each illumination lamp within the lamp panel, and the rated total power of the lamp panel can be calculated.
[0050] The calculation steps are as follows:
[0051] 1. Rated sub-current of each illumination lamp: Since the illumination lamps are connected in parallel, the rated sub-current of each illumination lamp is its rated current. Let's assume the rated sub-current of each illumination lamp is... .
[0052] 2. Rated sub-power of each lamp: The rated sub-power of each lamp can be calculated from its rated voltage and rated current. Assume the rated voltage of each lamp is... Then the rated sub-power of each illumination lamp for: .
[0053] Rated total power of the lamp panel: The rated total power of the lamp panel is the sum of the rated sub-powers of all the illumination lamps. Assume the number of illumination lamps connected in parallel within the lamp panel is... The rated total power of the lamp panel is... for: .
[0054] The following examples illustrate this point:
[0055] Assume that 40 illumination lamps are connected in parallel inside the lamp panel, each illumination lamp has a rated current of 3mA (0.003A) and a rated voltage of 5V.
[0056] 1. Rated sub-current of each illumination lamp: ;
[0057] 2. Rated sub-power of each illumination lamp: ;
[0058] 3. Rated total power of the lamp panel: .
[0059] Therefore, based on the number of lamps connected in parallel within the lamp 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 lamp 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 lamp panel is 0.6W.
[0060] In step S203, if the difference between the first parameter and the second parameter is greater than a preset threshold, the power control unit of the socket is switched based on the working current so that the power control unit provides working current to the lamp board through the plug and the socket.
[0061] In one exemplary implementation, for example, the initial power supply provides a measuring current of 0.10A to socket one. When plug one is plugged into socket one, that is, when lamp board one connected to plug one is connected to socket one, the first parameter is as follows:
[0062] 1. Current of each lamp: Since the sum of the currents in each branch of a parallel circuit equals the total current, assuming the resistance of each lamp remains constant, the current of each lamp will start from the rated current. Reduce to .
[0063] 2. Power of each lamp: Due to power... With the voltage of each lamp remaining constant and the current decreasing, the power of each lamp will decrease. The rated power of each lamp is... The current power of each spotlight is Therefore, the power of each lamp was reduced. .
[0064] 3. Total power: The total power is equal to the sum of the power of each lamp, therefore the total power will also be reduced by 16.67%.
[0065] For example, if the initial power supply provides a measuring current of 0.15A to socket one, and plug one is plugged into socket one (i.e., lamp board one connected to plug one is connected to socket one), then the first parameter is as follows:
[0066] 1. Current of each lamp: Since the sum of the currents in each branch of a parallel circuit equals the total current, assuming the resistance of each lamp remains constant, the current of each lamp will start from the rated current. Increase to .
[0067] 2. Power of each lamp: Due to power... With the voltage of each lamp remaining constant and the current increasing, the power of each lamp will increase. The rated power of each lamp is... The current power of each spotlight is Therefore, the power of each lamp increased. .
[0068] 3. Total power: Total power is equal to the sum of the power of each lamp, therefore the total power will also increase by 25%.
[0069] In summary, based on the comparison of the first parameter and the second parameter, a power control unit corresponding to the appropriate operating current (e.g., 120mA (0.12A)) can be provided for the lamp board.
[0070] Alternatively, the above method can also be used to detect whether there is a fault in the illumination lamps within each lamp panel. The specific detection method is as follows:
[0071] Assuming there are 40 illumination lamps in lamp panel one, and each illumination lamp draws 3mA, then the current in lamp panel one is... =40*3mA=120mA, then the operating current of lamp board one is =40 * 3mA = 120mA. If 10 illumination lamps in lamp board one are damaged at this time, and only 30 illumination lamps can work normally, the operating current supplied to lamp board one will still be I1 = 40 * 3 = 120mA. The following parameters of lamp board one will change as follows:
[0072] 1. Total Power: Since only 30 illumination lamps are operating normally, the total power will decrease. The original total power was... The current total power is Therefore, the total power decreased. .
[0073] 2. Current of each normally operating lamp: Since the total current remains constant, but the number of normally operating lamps decreases, the current of each normally operating lamp will increase. Originally, the current of each lamp was 3mA; now, the current of each lamp is... .
[0074] 3. Power of each normally operating lamp: As the current of each normally operating lamp increases, the power of each lamp will also increase. The original power of each lamp was... The current power of each spotlight is Therefore, the power of each lamp increased. .
[0075] 4. Total resistance of lamp panel one: Due to the decrease in the number of parallel illumination lamps, the total resistance of lamp panel one will increase. The original total resistance was... The current total resistance is .
[0076] In summary, since the total power of lamp panel one, the current of each normally functioning lamp, the power of each normally functioning lamp, and the total resistance of lamp panel one will all change, it is possible to determine whether there are any damaged lamps in lamp panel one based on these changes.
[0077] In one implementation, Figure 3This is a flowchart of a method for triggering an early warning operation based on a first and second number of illumination lamps within a light panel, according to an embodiment of the present invention. Figure 3 As shown, after the socket switching power control unit is used based on the operating current, the method further includes:
[0078] Step S301: Calculate the second number of illumination lamps in the lamp panel based on the operating current and rated current;
[0079] Step S302: Compare the second quantity with the first quantity;
[0080] In step S303, if the second quantity is not equal to the first quantity, an early warning message is generated to trigger an early warning operation.
[0081] In one exemplary embodiment, given the rated current of each illumination lamp connected in parallel within the lamp panel and the input current of the lamp panel, the number of illumination lamps in the parallel circuit can be calculated.
[0082] The calculation steps are as follows:
[0083] 1. Determine the rated current of each illumination lamp: Assume the rated current of each illumination lamp is... .
[0084] 2. Determine the input current of the lamp board: Assume the input current of the lamp board is... .
[0085] 3. Calculate the number of spotlights: Since the total current in a parallel circuit is equal to the sum of the currents in each branch, the number of spotlights, n, can be calculated using the following formula: .
[0086] The following example illustrates this: Assume that the rated current of each lamp is 3mA (0.003A) and the input current of the lamp panel (the calculated operating current) is 120mA (0.12A).
[0087] 1. Rated current of each lamp: .
[0088] 2. Input current of the lamp board: .
[0089] 3. Calculate the number of illumination lamps: .
[0090] Therefore, the number of lamps in the parallel circuit can be deduced from the rated current of each lamp connected in parallel within the lamp panel and the input current of the lamp panel. In this example, the number of lamps is 40.
[0091] However, when using power control unit one to continuously power lamp board one, for example, the output current of power control unit one is 90mA (0.09A) (calculated operating current).
[0092] 1. Rated current of each lamp: .
[0093] 2. Input current of the lamp board: .
[0094] 3. Calculate the number of illumination lamps: .
[0095] Therefore, the number of lamps in the parallel circuit can be deduced from the rated current of each lamp connected in parallel within the lamp panel and the input current of the lamp panel. In this example, the number of lamps is 30.
[0096] In summary, if the first quantity (40) and the second quantity (30) are not equal, it may indicate that 10 illumination lamps on the lamp panel are malfunctioning. Based on this situation, the microcontroller unit can generate a warning message to trigger an alarm operation. This alarm operation can include illuminating the fault lamp, flashing the fault lamp, or emitting an alarm sound.
[0097] In one implementation, in one implementation... Figure 4 This is a flowchart of a method for triggering an early warning operation based on real-time and historical operating parameters of a light panel, according to an embodiment of the present invention. Figure 4 As shown, the method also includes:
[0098] Step S401: Obtain the real-time operating parameters of each lamp board. The real-time operating parameters include: real-time current, real-time voltage, real-time temperature, and real-time input resistance.
[0099] Step S402: Obtain the historical operating parameters of each lamp board. The historical operating parameters include: historical current, historical voltage, historical temperature, and historical input resistance.
[0100] Step S403: Use a machine learning model to compare the real-time working parameters with the historical working parameters one by one;
[0101] Step S404: If the difference between a certain item of the real-time working parameter and the historical working parameter exceeds a preset threshold, an anomaly is determined, and an early warning message is generated to trigger an early warning operation.
[0102] In one exemplary embodiment, a machine learning model is incorporated within the microcontroller unit. This model continuously records and learns the historical and real-time operating parameters of each light panel, comparing the real-time parameters with the historical parameters one by one in real time. Based on the comparison results, the operating status of each light panel is determined. For example, if the difference between any of the real-time and historical operating parameters exceeds a preset threshold, it indicates an anomaly in the light panel's data, generating an early warning message to trigger an alert operation. This serves to remind staff to inspect the light panel.
[0103] In one implementation, Figure 5 This is a flowchart of a method for determining the working state of each lamp panel based on the final prediction result according to an embodiment of the present invention, as shown below. Figure 5 As shown, the method also includes:
[0104] 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, light board fault, poor contact between plug and socket, and plug and socket reversed.
[0105] Step S502: Based on the random forest algorithm, the first prediction result of each light panel is predicted using the first feature matrix and label vector to determine the state of each light panel;
[0106] In one exemplary implementation, during the training phase, the random forest uses historical working parameters as a feature matrix. : ; tag vector Labels for each sample:
[0107] .
[0108] The Random Forest (RF) model is trained using the following algorithm:
[0109] .
[0110] In the prediction phase, random forests use real-time working parameters as feature matrices. : The Random Forest (RF) model was used to make predictions on the test data. ,in, These are the prediction results from the Random Forest (RF) model.
[0111] Step S503: Construct a second feature matrix based on the first prediction result;
[0112] Step S504: Based on the support vector machine, the second feature matrix is used to predict the final prediction result of each light panel, so as to determine the working state of each light panel based on the final prediction result.
[0113] In one exemplary implementation, during the training phase, the output of the random forest is trained using a support vector machine: ,in, It is a pre-trained support vector machine model.
[0114] In the prediction phase, the trained support vector machine model is used to predict new samples:
[0115] in, It is the prediction result of the support vector machine.
[0116] In one implementation, the random forest algorithm includes:
[0117] ;
[0118] in, The first feature matrix includes: historical current, historical voltage, historical temperature, and historical input resistance when training and validating the random forest algorithm; and when using the random forest algorithm for prediction, the first feature matrix includes: real-time current, real-time voltage, real-time temperature, and real-time input resistance. The label vector; This refers to the random selection of features when constructing the tree; The process of training a model; A single tree in a random forest.
[0119] In one implementation, the support vector machine employs an algorithm including: .
[0120] 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 explanation and example of how to use the output of a Random Forest algorithm to train an SVM model:
[0121] The Support Vector Machine (SVM) algorithm is a supervised learning algorithm that distinguishes different categories by finding a hyperplane that maximizes the boundary. For non-linearly separable cases, SVM can map the data to a higher-dimensional space using kernel tricks.
[0122] Input data includes:
[0123] 1. Feature matrix It consists of the predicted probabilities of the random forest, meaning that the output of the random forest becomes the input features of the support vector machine.
[0124] 2. Label vector Y: The same as the label vector used in random forest, including the status of the light panel (normal, light panel fault, poor contact between plug and socket, plug and socket reversed).
[0125] The algorithm steps include:
[0126] 1. Training a Random Forest: Using historical operating parameters (historical current, historical voltage, historical temperature, historical resistance) as the feature matrix X, and (normal, light panel fault, poor contact between plug and socket, reversed plug and socket) as the label vector Y, a random forest model is trained to obtain the predicted probability for each category. .
[0127] 2. Generate a new feature matrix: This involves adjusting the predicted probabilities of the random forest. and as a new feature matrix It is used for training support vector machines.
[0128] 3. Train the support vector machine: using a new feature matrix Train a support vector machine model using the original label vector Y.
[0129] 4. Prediction: The trained support vector machine model is used to predict the new real-time operating parameters (real-time current, real-time voltage, real-time temperature, and real-time resistance) to obtain the final prediction results.
[0130] The above process will be explained with examples below:
[0131] For example, consider the following training dataset:
[0132] Historical current (mA) Historical voltage (V) Historical temperature (°C) Historical resistance (Ω) Labels (Normal / Faulty / Poor contact between plug and socket / Plug and socket reversed) 120 5.0 30 100 normal 150 5.0 30 100 normal 120 4.8 32 110 Poor contact
[0133] 1. Random Forest Training: The random forest model is trained based on historical working parameters and outputs the predicted probability for each category.
[0134] 2. Generate a new feature matrix: Assume the random forest predicts the following probabilities for the above dataset (simplified example):
[0135] 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
[0136] These probability values constitute the new feature matrix of the support vector machine. .
[0137] 3. Support Vector Machine Training: Using a New Feature Matrix Train a support vector machine model using the original label vector Y.
[0138] 4. Predicting New Samples: Assume the real-time operating parameters of the new sample are: [120mA, 4.8V, 32°C, 110Ω]. The random forest model predicts the probability of the new sample as: [0.6, 0.2, 0.15, 0.05]. These probability values are used as new features and input into the support vector machine model to obtain the final prediction result.
[0139] By using the above method, the output of a random forest can be used as the input feature of a support vector machine, thus combining the advantages of both models to improve prediction accuracy. This method is particularly suitable for processing complex, non-linearly separable data.
[0140] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods according to the above embodiments can be implemented by adding necessary general-purpose hardware platforms with the aid of software. Of course, they can also be implemented using hardware, but in many cases, the former is a better implementation method. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, 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, optical disk) and includes several instructions to cause a terminal device (which may be a mobile phone, computer, server, or network device, etc.) to execute the methods described in the various embodiments of the present invention.
[0141] An adaptive power supply system is also provided in the embodiments of the present invention. This system is used to implement the above embodiments and preferred embodiments, and details already described will not be repeated. The term "module" as used below can refer to a combination of software and / or hardware that performs a predetermined function. Although the apparatus described in the following embodiments is preferably implemented in software, hardware implementation, or a combination of software and hardware, is also possible and contemplated.
[0142] Figure 6 This is a schematic diagram of an adaptive power supply system according to an embodiment of the present invention, as shown below. Figure 6 As shown, the system includes:
[0143] At least one plug 61 is connected to a light panel 63;
[0144] At least one socket 62;
[0145] At least one non-volatile memory 64 is disposed within the lamp panel 63 for storing a first number and rated current of the illumination lamps within the lamp panel 63;
[0146] At least one power control unit 65 is provided for supplying power to the socket 62;
[0147] The microcontroller unit 66 is configured to, when the plug 61 is connected to any one of the sockets 62, retrieve the first quantity and the rated current from the non-volatile memory 64, 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 to 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.
[0148] By adopting the above technical solution, the adaptive power supply system in this embodiment of the invention can obtain 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 when the plug 61 is connected to any socket 62. Based on the first number and the rated current, it determines the operating current of the lamp board 63 and switches 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. Therefore, it can solve the problem of safety hazards caused by incorrect plug-in of the plug 61 and socket 62 in the related art, thereby improving the safety of the connection between the plug 61 and 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, it can automatically adjust the output current of the power control unit 65 according to the parameters of the actually connected lamp board 63, avoiding safety hazards such as short circuits and component damage caused by current mismatch due to incorrect plug-in, and ensuring the safety and reliability of the connection.
[0149] In one embodiment, the microcontroller unit 66 is further configured to:
[0150] The first parameters of the lamp board 63 are obtained based on the operating current. The first parameters include: the sub-current of each lamp in the lamp board 63 when it is working, the sub-power of each lamp in the lamp board 63 when it is working, and the total power of the lamp board 63 when it is working.
[0151] The second parameters of the lamp panel 63 are obtained based on the first quantity and the rated current. The second parameters include: the rated sub-current of each lamp in the lamp panel 63, the rated sub-power of each lamp in the lamp panel 63, and the rated total power of the lamp panel 63.
[0152] If the difference between the first parameter and the second parameter is greater than a preset threshold, the power control unit 65 is switched for socket 62 based on the operating current, so that the power control unit 65 provides operating current to lamp board 63 through plug 61 and socket 62.
[0153] In one embodiment, the microcontroller unit 66 is further configured to:
[0154] The second number of illumination lamps in the lamp panel 63 is calculated based on the operating current and the rated current.
[0155] Compare the second quantity with the first quantity;
[0156] If the second quantity is not equal to the first quantity, an early warning message is generated to trigger an early warning action.
[0157] In one embodiment, the microcontroller unit 66 is further configured to:
[0158] Obtain the real-time operating parameters of each lamp board 63, including: real-time current, real-time voltage, real-time temperature, and real-time input resistance;
[0159] Obtain the historical operating parameters of each lamp board 63, including historical current, historical voltage, historical temperature, and historical input resistance;
[0160] The machine learning model is used to compare the real-time working parameters with the historical working parameters one by one.
[0161] If the difference between a real-time operating parameter and a historical operating parameter exceeds a preset threshold, an anomaly is identified, an early warning message is generated, and an early warning operation is triggered.
[0162] In one embodiment, the microcontroller unit 66 is further configured to:
[0163] The first feature matrix and label vector are constructed based on real-time operating parameters and historical operating parameters; the label vector includes: normal, lamp board 63 fault, poor contact between plug 61 and socket 62, and plug 61 and socket 62 reversed.
[0164] Based on the random forest algorithm, the first prediction result of each light panel 63 is predicted using the first feature matrix and label vector to determine the state of each light panel 63;
[0165] Construct a second feature matrix based on the first prediction result;
[0166] The second feature matrix is used to predict the final prediction result of each light panel 63 based on the support vector machine, so as to determine the working state of each light panel 63 based on the final prediction result.
[0167] In one implementation, the random forest algorithm includes:
[0168] ;
[0169] in, The first feature matrix includes: historical current, historical voltage, historical temperature, and historical input resistance when training and validating the random forest algorithm; and when using the random forest algorithm for prediction, the first feature matrix includes: real-time current, real-time voltage, real-time temperature, and real-time input resistance. The label vector; This refers to the random selection of features when constructing the tree; The process of training a model; A single tree in a random forest.
[0170] In one implementation, the support vector machine employs an algorithm including: .
[0171] In one exemplary embodiment, the aforementioned adaptive power supply system can be applied to a urological treatment device. For example, the urological treatment device may have four light boards and one backplate, for a total of five boards. Each board corresponds to a 4-phase output socket. In daily design and production, the sockets are designed with a foolproof function to ensure that each light board corresponds to its corresponding drive circuit for precise positioning and control. Furthermore, if the connector is inserted incorrectly, the excessive current will burn out the corresponding circuit. However, plugs and sockets with foolproof functions may not be compatible with the plugs and sockets of the urological treatment device, resulting in poor adaptability.
[0172] In one exemplary embodiment, for a 4-phase output socket, the 4 phases are: OUT1, OUT2, ground, and TEMP; which respectively refer to output 1, output 2, ground, and temperature sensor input.
[0173] In one exemplary embodiment, the microcontroller unit can detect the temperature value of the TEMP phase at the moment the plug and socket are connected. 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 socket. In the case of an error in the connection between the plug and socket, the microcontroller unit can output an alarm signal and stop the output of OUT1 and OUT2.
[0174] It should be noted that the above modules can be implemented by software or hardware. For the latter, they can be implemented in the following ways, but are not limited to: all 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 conditions, and this embodiment of the invention does not limit them.
[0175] Embodiments of the present invention also provide a computer-readable storage medium storing a computer program, wherein the computer program is configured to perform the steps in any of the above method embodiments when executed.
[0176] In one exemplary embodiment, the aforementioned computer-readable storage medium may include, but is not limited to, various media capable of storing computer programs, such as a USB flash drive, read-only memory (ROM), random access memory (RAM), portable hard disk, magnetic disk, or optical disk.
[0177] Embodiments of the present invention also provide an electronic device including a memory and a processor, the memory storing a computer program and the processor being configured to run the computer program to perform the steps in any of the above method embodiments.
[0178] In one 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.
[0179] Embodiments of the present invention also provide a computer program product, including computer instructions that, when executed by a processor, implement the steps of the methods described in various embodiments of the present invention.
[0180] Specific examples in this embodiment can be found in the examples described in the above embodiments and exemplary implementations, and will not be repeated here.
[0181] It is obvious to those skilled in the art that the modules or steps of the present invention described above can be implemented using general-purpose computing devices. They can be centralized on a single computing device or distributed across a network of multiple computing devices. They can be implemented using computer-executable program code, and thus can be stored in a storage device for execution by a computing device. In some cases, the steps shown or described can be performed in a different order than those described herein, or they 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.
[0182] The above description is merely a preferred embodiment of the present invention and is not intended to limit the invention. Various modifications and variations can be made to the present invention by those skilled in the art. Any modifications, equivalent substitutions, or improvements made within the principles of the present invention should be included within the scope of protection of the present invention.
Claims
1. An adaptive power supply method, characterized by, The method is applied to a micro control unit, and comprises: In the case that the plug is connected with any one of the sockets, the first number and the rated current of each irradiation lamp in the lamp panel connected with the plug are obtained from a non-volatile memory, the working current of the lamp panel is determined based on the first number and the rated current, and the non-volatile memory is arranged in the lamp panel to store the first number and the rated current of each irradiation lamp in the lamp panel; A first parameter of the lamp panel is obtained based on the working current, and the first parameter comprises a sub-current of each irradiation lamp in the lamp panel when working, a sub-power of each irradiation lamp in the lamp panel when working, and a total power of the lamp panel when working; A second parameter of the lamp panel is obtained based on the first number and the rated current, and the second parameter comprises a rated sub-current of each irradiation lamp in the lamp panel, a rated sub-power of each irradiation lamp in the lamp panel, and a rated total power of the lamp panel; In the case that the difference between the first parameter and the second parameter is greater than a preset threshold, a power control unit of the socket is switched based on the working current, so that the power control unit provides the working current for the lamp panel through the plug and the socket.
2. The method of claim 1, wherein, After the power control unit of the socket is switched based on the working current, the method further comprises: A second number of irradiation lamps in the lamp panel is calculated based on the working current and the rated current; The second number and the first number are compared; In the case that the second number is not equal to the first number, a warning information is generated to trigger a warning operation.
3. The method of claim 1, wherein, The method further comprises: Real-time working parameters of each lamp panel are obtained, and the real-time working parameters comprise real-time current, real-time voltage, real-time temperature, and real-time input resistance; Historical working parameters of each lamp panel are obtained, and the historical working parameters comprise historical current, historical voltage, historical temperature, and historical input resistance; The real-time working parameters and the historical working parameters are compared one by one using a machine learning model; In the case that the difference of a certain item between the real-time working parameters and the historical working parameters exceeds a preset threshold, it is determined that there is an abnormality, a warning information is generated to trigger a warning operation.
4. The method of claim 3, wherein, 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, and the label vector comprises normal, lamp panel failure, poor contact between the plug and the socket, and plug and socket insertion in reverse; A first prediction result of each lamp panel is predicted based on the first feature matrix and the label vector using a random forest algorithm, so as to determine the state of each lamp panel; A second feature matrix is constructed based on the first prediction result; A final prediction result of each lamp panel is predicted based on the second feature matrix using a support vector machine, so as to determine the working state of each lamp panel based on the final prediction result.
5. The method of claim 4, wherein, The random forest algorithm comprises: ; wherein, is a first feature matrix, the first feature matrix comprising: historical current, historical voltage, historical temperature, historical input resistance when training and verifying the random forest algorithm; the first feature matrix comprising: real-time current, real-time voltage, real-time temperature, real-time input resistance when using the random forest algorithm for prediction; is a label vector; is a random selection of features when building a tree; is a process of training a model; is a single tree in the random forest.
6. The method of claim 5, wherein, The algorithm used by the support vector machine comprises: 。 7. An adaptive power supply system characterized by, The method comprises: At least one plug, one plug is connected with one lamp panel; At least one socket; at least one non-volatile memory disposed in the lamp panel, configured to store a first number and a rated current of the illuminating lamps in the lamp panel; at least one power supply control unit configured to supply power to the socket; a micro control unit configured to, when the plug is connected to any one of the socket, acquire the first number and the rated current from the non-volatile memory, determine an operating current of the lamp panel based on the first number and the rated current, and obtain a first parameter of the lamp panel based on the operating current, the first parameter comprising a sub-current of each illuminating lamp in the lamp panel when operating, a sub-power of each illuminating lamp in the lamp panel when operating, and a total power of the lamp panel when operating; obtain a second parameter of the lamp panel based on the first number and the rated current, the second parameter comprising a rated sub-current of each illuminating lamp in the lamp panel, a rated sub-power of each illuminating lamp in the lamp panel, and a rated total power of the lamp panel; and switch the power supply control unit for the socket based on the operating current when a difference between the first parameter and the second parameter is greater than a preset threshold, so that the power supply control unit provides the operating current for the lamp panel through the plug and the socket. The computer readable storage medium stores a computer program, and the computer program is executed by the processor to implement the steps of the method in any one of claims 1 to 6.
8. A computer-readable storage medium, characterized in that, The computer instructions are executed by the processor to implement the steps of the method in any one of claims 1 to 6.
9. A computer program product comprising computer instructions, characterized in that,
Citation Information
Patent Citations
Identifiable plug and combination thereof
CN102403626A
Extension line device and controller thereof
CN110556672A
Intelligent household electrical appliance system
CN112804126A
LED lighting system
CN219459346U