Gun lock control method, charging pile, gun lock, computer equipment and chip
By dynamically adjusting the pulse width by monitoring the feedback signal of the charging gun lock, the problem of compatibility between different charging gun locks in charging pile equipment has been solved, reducing hardware costs and improving the success rate of operation and equipment reliability.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-11
- Publication Date
- 2026-03-13
AI Technical Summary
Charging station equipment manufacturers face difficulties in ensuring compatibility with gun locks produced by different manufacturers, and existing technologies pose risks of compatibility issues and increased hardware costs.
By monitoring the gun lock feedback signal, the pulse width of the control signal is dynamically adjusted, and the pulse width is optimized using an iterative method to ensure that the gun lock operates under a suitable pulse width, thereby reducing hardware costs.
It improves the success rate of gun lock operation, reduces the probability of gun lock damage, simplifies the hardware cost of compatibility with various gun locks, and improves the versatility and reliability of charging piles.
Smart Images

Figure CN121663259A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the technical field of charging piles, and in particular to a control method for a charging gun lock, a charging pile, a charging gun lock, computer equipment, and a chip. Background Technology
[0002] In charging pile technology, the gun lock, as a locking device for the charging gun connector, can be locked and unlocked by a pulse signal. Gun locks from different manufacturers may have different requirements for pulse width, posing a challenge for charging pile equipment manufacturers to achieve compatibility with various gun locks.
[0003] Based on this, this application provides a control method for a gun lock, a charging station, a gun lock, a computer device, and a chip to improve related technologies. Summary of the Invention
[0004] The purpose of this application is to provide a control method for gun locks, a charging station, a gun lock, computer equipment and chips, thereby reducing the hardware cost of compatibility with various gun locks.
[0005] The objective of this application is achieved through the following technical solution:
[0006] Firstly, this application provides a method for controlling a gun lock, the method comprising:
[0007] A control signal is output to the gun lock; the control signal is a pulse signal, and the control signal is used to control the gun lock to lock or unlock.
[0008] If a feedback signal is received from the gun lock within the target time period, the output of the control signal is stopped; the feedback signal is used to indicate that the gun lock was successfully locked or unlocked.
[0009] In some embodiments, the method further includes:
[0010] The target pulse width of the control signal is obtained and used to control the output pulse width of the gun lock to adopt the target pulse width; wherein, the target pulse width is related to the sending time of the control signal and the receiving time of the feedback signal.
[0011] In some embodiments, outputting a control signal to the gun lock includes: outputting the control signal to the gun lock and recording the first moment when the control signal is started to be output;
[0012] The step of stopping the output of the control signal when a feedback signal from the gun lock is received within the target duration includes: stopping the output of the control signal when a feedback signal from the gun lock is received within the target duration, and recording the second moment when the output of the control signal is stopped;
[0013] The difference between the second time point and the first time point is used as the target pulse width.
[0014] In some embodiments, the method further includes:
[0015] The steps of repeatedly decreasing the target pulse width and outputting the control signal of the target pulse width to the gun lock are repeated until no feedback signal is received from the gun lock within the target duration. The output pulse width of the gun lock is controlled by the target pulse width of the previous iteration.
[0016] In some embodiments, the step size for reducing the target pulse width is the target step size.
[0017] In some embodiments, the target step size is determined based on one or more of the following: feedback method, hardware parameters, historical data, and empirical data. The feedback method includes interruption or real-time detection.
[0018] In some embodiments, when the feedback method is real-time detection, the minimum value of the real-time detection period is used as the target step size.
[0019] In some embodiments, the control signals include lock signals and unlock signals of different control types.
[0020] In some embodiments, the locking signal is a positive voltage pulse signal, and the unlocking signal is a negative voltage pulse signal.
[0021] Secondly, this application provides a charging pile, which includes a control module and a gun lock, wherein the control module is used to execute any of the above methods.
[0022] Thirdly, this application provides a gun lock for use in a charging station, the charging station including a control module and the gun lock, the gun lock being used for:
[0023] The system receives a control signal from the control module; the control signal is a pulse signal and is used to control the locking or unlocking of the gun lock.
[0024] A feedback signal is output to the control module so that the control module stops outputting the control signal when it receives a feedback signal from the gun lock within a target time period; the feedback signal is used to indicate that the gun lock has been successfully locked or unlocked.
[0025] Fourthly, this application provides a computer device, the computer device including a memory and a processor, the memory storing a computer program, and the processor executing the computer program to implement any of the above methods.
[0026] Fifthly, this application provides a chip for performing any of the above methods.
[0027] This application provides a control method for a charging gun lock, a charging station, a charging gun lock, a computer device, and a chip. First, an initial control signal is output to the charging gun lock. During the output of this control signal, it is monitored whether a feedback signal is received from the charging gun lock within a target duration. If a feedback signal is received within the target duration, the output of the control signal is stopped. This embodiment ensures that the charging gun lock operates with an appropriate pulse width by monitoring the feedback signal in real time and stopping the output of the control signal promptly and automatically. It is applicable to various charging gun locks, thereby reducing the complexity and hardware cost of making the charging station compatible with various charging gun locks. Attached Figure Description
[0028] This application will be further described below with reference to the accompanying drawings and specific embodiments.
[0029] Figure 1 This is a flowchart illustrating a gun lock control method provided in an embodiment of this application.
[0030] Figure 2 This is a schematic diagram of communication between an MCU and a gun lock provided in an embodiment of this application.
[0031] Figure 3 This is a flowchart illustrating another gun lock control method provided in an embodiment of this application.
[0032] Figure 4 This is a structural block diagram of a charging pile provided in an embodiment of this application.
[0033] Figure 5 This is a structural block diagram of a computer device provided in an embodiment of this application. Detailed Implementation
[0034] The technical solutions in the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of them. Based on the embodiments in this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0035] In the description of the embodiments of this application, it should be understood that the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of indicated technical features. Therefore, features defined with "first" and "second" may explicitly or implicitly include one or more of the stated features. In the description of the embodiments of this application, "multiple" means two or more, unless otherwise explicitly specified.
[0036] In charging pile technology, the gun lock, as a locking device for the charging gun connector, is driven by pulse signals for locking and unlocking operations. For example, a positive 12V pulse signal is used to lock the gun lock, and a negative 12V pulse signal is used to unlock it. The pulse width can be in the millisecond (ms) range. However, gun locks from different manufacturers may have different requirements for pulse width. A pulse width that is too short may prevent the gun lock from locking or unlocking successfully, while a pulse width that is too long and used for extended periods may damage the gun lock. Furthermore, charging pile equipment manufacturers face difficulties in ensuring compatibility with various gun locks.
[0037] To address the aforementioned issues, the relevant technologies employ the following two approaches. The first approach involves some charging stations adjusting software parameters to ensure compatibility with different charging gun locks. However, this method carries the risk of incorrect parameter settings, potentially damaging the charging gun lock. The second approach involves each charging gun manufacturer providing a matching charging gun lock control board, where the MCU (Microcontroller Unit) only needs to provide lock and unlock signals. While this method solves the compatibility problem, it increases the hardware cost of the charging station.
[0038] To improve related technologies, this application embodiment uses software methods, taking the gun lock feedback signal as the basis for pulse width adjustment, and iteratively optimizes the pulse width. Specifically, by monitoring the gun lock feedback signal, the pulse width of the control signal is dynamically adjusted; in each iteration, the minimum effective pulse width is determined by subtracting the feedback time from the feedback signal. This not only ensures successful control of the gun lock's pulse width but also reduces the risk of gun lock damage. This method eliminates the need for a dedicated control board for each gun lock, reducing the hardware cost of compatibility with various gun locks. Through the above improvements, not only is the success rate of gun lock control increased and the probability of gun lock damage reduced, but the hardware cost of compatibility with various gun locks is also effectively reduced, providing charging pile equipment manufacturers with a more economical and reliable solution.
[0039] The implementation methods of this application will be described in detail below.
[0040] See Figure 1 , Figure 1 This is a flowchart illustrating a gun lock control method provided in an embodiment of this application.
[0041] In order to improve the relevant technology, this application provides a gun lock control method, the method including steps S101 to S104.
[0042] Step S101: Output a control signal to the gun lock; the control signal is a pulse signal, and the control signal is used to control the gun lock to lock or unlock.
[0043] Step S102: If a feedback signal is received from the gun lock within the target duration, stop outputting the control signal.
[0044] Understandably, the target duration can be preset, for example, set to 1 second. Since the feedback time of the gun lock is usually in the millisecond range, if no feedback signal is received within 1 second, it can be assumed that the gun lock cannot provide feedback.
[0045] See Figure 2 , Figure 2 This is a schematic diagram of communication between an MCU and a gun lock provided in an embodiment of this application.
[0046] In some embodiments, the method can be executed on the control module of the charging station. The control module may include, for example, an MCU, on which the method can be executed. In some embodiments, the MCU and the charging gun lock can be communicatively connected.
[0047] In some embodiments, the control signal may include lock signals and unlock signals of different control types.
[0048] In some embodiments, the locking signal can be a positive voltage pulse signal, and the unlocking signal can be a negative voltage pulse signal.
[0049] For example, such as Figure 2 As shown, the MCU's P1 pin is the control signal output terminal, connected to the gun lock's control signal receiver via the gun lock control line; the MCU's P2 pin is the feedback signal receiver, connected to the gun lock's feedback signal output terminal via the gun lock feedback line. When the P1 pin outputs the gun lock's control signal, it detects the gun lock's feedback signal in real time. For example, when the P1 pin outputs a 12V lock signal, a successful lock feedback signal is detected, the output 12V signal is changed to 0V, and the lock signal output stops; when the P1 pin outputs a -12V unlock signal, a successful unlock feedback signal is detected, the output -12V signal is changed to 0V, and the unlock signal output stops.
[0050] In some embodiments, the method may further include: obtaining the target pulse width of the control signal, for controlling the output pulse width of the gun lock to adopt the target pulse width; wherein the target pulse width is related to the transmission time of the control signal and the reception time of the feedback signal.
[0051] In some embodiments, outputting a control signal to the gun lock may include: outputting the control signal to the gun lock and recording a first moment when the output of the control signal begins. This first moment is the time the control signal is sent. Stopping the output of the control signal upon receiving a feedback signal from the gun lock within a target duration includes: stopping the output of the control signal upon receiving a feedback signal from the gun lock within the target duration and recording a second moment when the output of the control signal stops. This second moment is the time the feedback signal is received. The difference between the second moment and the first moment is used as the target pulse width.
[0052] In the above embodiment, a first moment is recorded when the control signal is first output to the gun lock, serving as the starting point for outputting the control signal. If a feedback signal is received within the target duration, a second moment is recorded when the control signal output stops, serving as the stopping point for outputting the control signal. The time interval from the start to the stop of outputting the control signal is used as the initial target pulse width, and subsequent iterative steps are then performed. This embodiment can automatically record the first and second moments and determine the initial target pulse width, eliminating the need for tedious manual adjustments for different types of gun locks, reducing the need for manual intervention, and lowering the risk of errors and gun lock damage caused by incorrect parameter settings.
[0053] In some embodiments, the method may further include: repeatedly decreasing the target pulse width and outputting a control signal of the target pulse width to the gun lock until no feedback signal is received from the gun lock within the target duration, thereby controlling the output pulse width of the gun lock to adopt the target pulse width of the previous iteration.
[0054] In the above embodiments, the control signal output to the gun lock refers to the electrical control signal used to control the gun lock, which may include a locking signal and an unlocking signal. The locking signal is, for example, a positive voltage pulse signal, and the unlocking signal is, for example, a negative voltage pulse signal. The purpose of the control signal is to perform a locking or unlocking operation on the gun lock. The target duration refers to a set time window, which can be selected and pre-set according to the needs of actual applications. Within this time window, it is necessary to detect whether the gun lock correctly responds to the control signal, to determine whether the gun lock has successfully provided feedback within the target duration. As an example, the target duration can be determined based on the pulse width range of various gun locks on the market, for example, greater than the maximum value of the pulse width range of these gun locks. The feedback signal is the signal emitted by the gun lock after receiving the control signal, indicating the result of the locking or unlocking operation. The feedback signal is used to confirm whether the gun lock has successfully executed the control command, so that the pulse width of the control signal can be adjusted accordingly.
[0055] Pulse width refers to the duration of a pulse signal used as a control signal. The duration of the transmitted control signal can be determined by the timing of its transmission and the reception of the feedback signal, which is then used for subsequent iterative steps. In this paper, "target" and "output" in "target pulse width" and "output pulse width" are used as prefixes to distinguish between the pulse width during the iterative process and the final pulse width used to control the gun lock.
[0056] The charging gun lock sends a feedback signal to the charging station, but there is a transmission time between the signal being sent and the station actually receiving it. This can cause the charging station to stop outputting the pulse signal later than intended. For example, suppose the pulse width range for controlling the charging gun lock is [300, 500] ms. The pulse signal output to the lock is a 600 ms pulse width control signal. The charging gun lock responds successfully after 300 ms and provides a feedback signal. Assuming the transmission time (also called feedback duration or feedback latency) of this feedback signal is 10 ms, the charging station will immediately stop outputting the control signal upon receiving it, and the output control signal will have a pulse width of 310 ms instead of 300 ms. The goal of the above embodiment is to make the pulse width output by the charging station as close to 300 ms as possible, i.e., to achieve the minimum pulse width needed to control the charging gun lock. In practical applications, the feedback duration is generally relatively short. Therefore, in some embodiments, adjusting the target pulse width for the feedback duration is not necessary; that is, the current target pulse width of 310 ms is used as the pulse width for subsequent control operations. As can be seen, 310ms is also within the pulse width range that can be used to control the gun lock. Furthermore, in some embodiments, an iterative approach can be used to adjust the target pulse width to determine an output pulse width. This is because, assuming the pulse width range of some gun locks is relatively small, for example [300, 305], using 310ms as the pulse width for controlling the gun lock would result in a pulse width larger than the overall pulse width range of the gun lock, still causing impact to the lock and leading to a higher damage rate. Therefore, it is necessary to adjust the target pulse width according to the feedback duration.
[0057] As an example, using an interrupt as the feedback method, two channels of an oscilloscope are used to monitor two signals: one is the gun lock feedback signal, and the other is the pulse signal shut-off signal that will be executed when the feedback signal is detected. Assuming the gun lock unlocking feedback signal is low and the gun lock locking feedback signal is high, then when the gun lock is locked, the oscilloscope records the time Ta when the gun lock feedback signal changes from low to high, and the start time Tb of the pulse signal shut-off signal. The feedback duration is then Tb-Ta.
[0058] The step of repeatedly reducing the target pulse width and outputting the control signal with the target pulse width to the gun lock refers to gradually shortening the pulse width of the control signal in each iteration and outputting the control signal with the reduced pulse width to the gun lock. By gradually reducing the pulse width, the smallest possible pulse width suitable for gun lock operation can be found. This continues until no feedback signal is received from the gun lock within the target duration, where no feedback signal is received means that the gun lock does not return any feedback signal within the set target duration, indicating that the control signal has failed to successfully trigger the operation of the gun lock. This condition is used to determine whether the iterative adjustment of the pulse width needs to be stopped, thus using the target pulse width of the last iteration as the final output pulse width. The target pulse width of the last iteration was able to successfully control the gun lock, so it is used as the output pulse width. This means that after all iteration steps are completed, the last successful target pulse width is used as the final pulse width of the control signal. This ensures that the pulse width adjustment is based on the actual response of the gun lock, thereby improving the reliability and effectiveness of the operation. As an example, if the iteration ends after 10 iterations, the target pulse width output to the gun lock in the 9th iteration is used as the output pulse width.
[0059] The above embodiment provides a gun lock control method that optimizes pulse width through the following steps: First, an initial control signal is output to the gun lock. During the output of this control signal, it is monitored whether a feedback signal is received from the gun lock within a target duration. If a feedback signal is received within the target duration, the output of the control signal is stopped, and the pulse width of the current control signal is calculated as the target pulse width. Next, the target pulse width is reduced, and a control signal with the current target pulse width is output to the gun lock. If a feedback signal is received within the target duration, the target pulse width is reduced again, and the control signal with the current target pulse width is continued to be output to the gun lock, ... until no feedback signal is received within the target duration. Finally, the target pulse width that was effective in the last iteration is used as the output pulse width to stably control the locking or unlocking operation of the gun lock. Here, "effective" refers to the situation where a feedback signal can be received within the target duration, which means that successful control of the gun lock has been achieved.
[0060] The above embodiments optimize the output pulse width of the control gun lock by automatically adjusting the pulse width. By monitoring feedback signals in real time and dynamically adjusting the pulse width, the control gun lock operates under an appropriate pulse width, thereby improving the success rate of control, reducing potential damage to the control gun lock caused by excessively long pulse widths, lowering the probability of damage, and extending the service life of the control gun lock. Manual parameter adjustments or additional control boards for different control gun locks are no longer required. The automated pulse width adjustment mechanism allows the charging station to adapt to various types of control gun locks, thereby improving the charging station's versatility and adaptability, reducing the complexity and hardware cost of compatibility with various control gun locks, and improving the charging station's compatibility, economy, and reliability.
[0061] In some embodiments, the control types of two adjacent control signals output to the gun lock may be different.
[0062] The lock signal is the control signal that controls the charging gun lock to engage. For example, a positive voltage pulse signal is used to activate the locking mechanism, firmly locking the charging gun to the charging station. The unlock signal is the control signal that controls the unlocking of the charging gun lock. For example, a negative voltage pulse signal is used to release the lock, allowing the charging gun to be removed from the charging station. The lock and unlock signals have different control types. Adjacent control signals must have different control types; that is, the control types of two consecutive control signals should be different. For example, if the current signal is a lock signal, the next signal should be an unlock signal, and the next signal after that should be a lock signal; conversely, if the current signal is an unlock signal, the next signal should be a lock signal, and so on. This method avoids signal repetition and conflicts in the locking state, reducing the risk of damage to the charging gun lock and charging gun.
[0063] In charging pile technology, precise control of the locking and unlocking process of the charging gun lock is crucial. However, if two adjacent control signals are of the same type, the charging gun lock may conflict or fail to respond correctly during locking or unlocking, thus affecting the success rate of the operation. The above embodiment optimizes the control process of the charging gun lock by changing the type of adjacent control signals. When outputting control signals to the charging gun lock, it is ensured that the control types of two adjacent control signals are different, and the locking and unlocking signals are output alternately. For example, assuming that the control signal output at the Kth time is a locking signal, then the control signal output at the K+1th time is an unlocking signal, the control signal output at the K+2th time is a locking signal, and so on, and vice versa, where K is a positive integer. By alternately outputting locking and unlocking signals, the problem of control signals of the same type can be avoided, thereby reducing the risk of signal conflict and response failure, and improving the success rate and reliability of the charging gun lock operation. Through automated alternating output, the control process of the charging pile is simplified, and the complexity of manual intervention and parameter setting is reduced.
[0064] In some embodiments, the step size for reducing the target pulse width can be a target step size. The target step size refers to the fixed value by which the target pulse width decreases each time during the iteration process. The target step size determines the amount of pulse width reduction each time, thus affecting the fineness of the iterative adjustment, and can be selected as needed.
[0065] In some embodiments, the target step size can be determined based on one or more of the following: feedback method, hardware parameters, historical data, and empirical data. The feedback method may include interruption or real-time detection. Feedback method refers to the technical means of acquiring the feedback signal of the gun lock. Interruption method refers to acquiring the feedback signal through hardware interruption. Real-time detection refers to acquiring the feedback signal through continuous polling or timed detection; the periodicity of real-time detection determines the timeliness of the feedback signal acquisition. Hardware parameters include, for example, the parameters of the relevant hardware modules executing the method. Historical data includes, for example, relevant data related to past control of the gun lock. Empirical data includes, for example, relevant data specified manually based on experience.
[0066] In some embodiments, when the feedback method is real-time detection, the minimum value of the real-time detection period can be used as the target step size. The minimum value of the real-time detection period refers to the minimum time interval for detecting the feedback signal in real-time detection, and is used to determine the target step size. For example, if the minimum detection period is 1ms, then 1ms is used as the target step size for iterative calculation.
[0067] In some embodiments, the target step size can be 5 milliseconds. That is, during the iteration process, the pulse width decreases by a fixed value of 5 milliseconds each time.
[0068] In related technologies, controlling the pulse width of a gun lock requires considering the timeliness and accuracy of the gun lock feedback signal. Due to different processing methods for the gun lock feedback signal (such as interrupt or real-time detection), the required pulse width step size may vary. If the impact of the feedback method is not fully considered when determining the reduction step size of the target pulse width, the step size setting may not be suitable for all types of feedback methods, affecting the accuracy and stability of control. In the above embodiment, a fixed target step size is set to reduce the target pulse width to optimize the gun lock control signal. The size of the target step size can be determined based on the feedback method. For example, when using a real-time detection method, the target step size can be set according to the minimum value of the real-time detection period to ensure the timeliness of detection. As an example, when the minimum value of the real-time detection period is 5 milliseconds, the target step size can also be set to 5 milliseconds. In each iteration, the target pulse width is reduced according to the target step size, and then the control signal is output and the feedback signal is monitored. Through this iterative method, a suitable pulse width for the gun lock can be gradually found, thereby achieving optimized control. By adjusting the target step size to adapt to different feedback methods, the flexibility of pulse width adjustment and control accuracy are improved. Choosing an appropriate target step size based on the feedback method can effectively reduce errors in feedback signal processing and improve the reliability and stability of the charging pile. Adapting to different feedback methods ensures compatibility with various types of charging locks, reducing the complexity of maintenance and adaptation to multiple lock types. Furthermore, iterative adjustments using a fixed target step size reduce the complexity of parameter tuning, simplify the pulse width optimization process, and improve adjustment efficiency.
[0069] See Figure 3 , Figure 3 This is a flowchart illustrating another gun lock control method provided in an embodiment of this application.
[0070] like Figure 3 As shown, in a specific application scenario, this application embodiment also provides a gun lock control method, including the following steps.
[0071] Step S1: Upon receiving the lock request, the MCU starts outputting a lock signal to control the gun lock, and records the first moment T1 (e.g., 0ms). If a feedback signal is received within the target duration (e.g., 500ms), the MCU stops outputting the lock signal and records the second moment T2 (e.g., 300ms). The initial target pulse width is then M1 = T2 - T1 = 300ms. The target pulse width is decreased by a target step size of N (e.g., 5ms) (in this case, M1 = 300ms), resulting in a new target pulse width M2 = M1 - N = 295ms.
[0072] Step S2: The MCU uses an unlock signal with a pulse width of M2 to unlock the gun lock. If no feedback signal is received within the target duration, the unlocking is considered to have failed. M2+N can be regarded as the minimum pulse width for controlling the gun lock, and M2+N is used as the output pulse width. If a feedback signal is received within the target duration, the unlocking is considered to have succeeded. The target pulse width (which is now M2) is reduced by N as the target step size to obtain a new target pulse width M3 = M2-N.
[0073] Step S3: The MCU uses a locking signal with a pulse width of M3 to lock the gun lock. If no feedback signal is received within the target duration, the locking is considered to have failed. M2 can be considered as the minimum pulse width controlling the gun lock, and M2 is used as the output pulse width. If a feedback signal is received within the target duration, the locking is considered to have succeeded. The target pulse width (now M3) is reduced by a target step size of N, and a new target pulse width M2 = M3 - N is specified. Step S2 is executed. This process is iterated until either locking or unlocking fails. The target pulse width of the last successful gun lock operation is used as the output pulse width.
[0074] See Figure 4 , Figure 4 This is a structural block diagram of a charging pile provided in an embodiment of this application.
[0075] This application embodiment also provides a charging pile, which includes a control module and a gun lock, the control module being used to execute any of the above methods.
[0076] This application also provides a gun lock for use in a charging station. The charging station includes a control module and the gun lock. The gun lock is used to: receive a control signal from the control module; the control signal is a pulse signal, and the control signal is used to control the gun lock to lock or unlock; output a feedback signal to the control module so that the control module stops outputting the control signal when it receives the feedback signal from the gun lock within a target time period; the feedback signal is used to indicate that the gun lock has been successfully locked or unlocked.
[0077] This application also provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements any of the above methods.
[0078] This application also provides a computer program product, which includes a computer program that, when executed by a processor, implements any of the methods described above.
[0079] The computer program product may be in the form of a portable compact disc read-only memory (CD-ROM) and include program code, and may run on a terminal device, such as a personal computer. However, the computer program product of this application is not limited thereto, and the computer program product may be in any combination of one or more computer-readable media.
[0080] This application also provides a computer device, which includes a memory and a processor. The memory stores a computer program, and the processor executes the computer program to implement any of the methods described above.
[0081] This application also provides a chip for performing any of the above methods.
[0082] See Figure 5 , Figure 5 This is a structural block diagram of a computer device provided in an embodiment of this application.
[0083] The embodiments of this application do not limit the computer device, which may be, for example, a local computer device, a cloud computer device, a distributed computer device, etc.
[0084] The computer device may include: a memory 110, a processor 120, and a communication interface 130. The memory 110, the processor 120, and the communication interface 130 are connected through internal connection paths.
[0085] The memory 110 is used to store computer programs, which in some implementations may include code for implementing the methods of the embodiments of this application.
[0086] The processor 120 executes the computer program stored in the memory 110 to control the communication interface 130 to receive input data and information, and output operation results and other data. In some implementations, when the solutions of the embodiments of this application are implemented by software or firmware, the computer program used to implement the solutions of the embodiments of this application can be stored in the processor 120 and executed by the processor 120.
[0087] The memory 110 may be volatile memory or non-volatile memory, or may include both volatile and non-volatile memory. The non-volatile memory may be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory. The volatile memory may be random access memory (RAM). It should be noted that the memory 110 described herein is intended to include, but is not limited to, any memory of these and other suitable types. As an example, the memory 110 includes random access memory (RAM), cache memory, and read-only memory (ROM). The memory 110 stores a computer program that can be executed by processor 120, causing processor 120 to implement the steps of any of the methods described above.
[0088] The processor 120 can be a central processing unit (CPU), or it can be other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor can be a microprocessor, or the processor 120 can be any conventional processor.
[0089] In implementation, each step of the above method can be completed by the integrated logic circuitry of the hardware in the processor 120 or by instructions in software form. The method disclosed in the embodiments of this application can be directly implemented by the hardware processor, or by a combination of hardware and software modules in the processor 120. The software modules can be located in mature storage media in the art, such as random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, or registers. This storage medium is located in the memory 110, and the processor 120 reads the information in the memory 110 and, in conjunction with its hardware, completes the steps of the above method. To avoid repetition, detailed descriptions are not provided here.
[0090] In some implementations, in addition to the hardware units described above, computer devices may also include software modules, such as operating systems, basic input / output systems (BIOS), and application software.
[0091] An operating system is used to manage the hardware and / or software resources of a computer device; it is the kernel and foundation of the computer. The operating system handles fundamental tasks such as managing and configuring memory, determining the priority of system resource allocation, controlling input and output devices, operating the network, and managing the file system. To facilitate user operation, most operating systems provide a user interface for interaction with the system.
[0092] The BIOS is used to perform hardware initialization during the power-on boot phase and to provide runtime services for the operating system and applications. In some implementations, the BIOS can also monitor and display processor temperature and execute temperature protection strategies.
[0093] Application software, also known as an application program, can be understood as software written for a specific user application purpose, and is one of the main categories of computer software. For example, application software can be a program used to achieve purposes such as power control and temperature management.
[0094] It is understood that the specific examples in this specification are only intended to help those skilled in the art better understand the implementation of this application, and are not intended to limit the scope of protection of this application.
[0095] It is understood that in the various embodiments of this specification, the sequence number of each process does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of this application.
[0096] It is understood that the various implementation methods described in this specification can be implemented individually or in combination, and this application does not limit them.
[0097] Unless otherwise stated, all technical and scientific terms used in this specification have the same meaning as commonly understood by one of ordinary skill in the art. The terminology used in this specification is for the purpose of describing particular embodiments only and is not intended to limit the scope of this specification. The term "and / or" as used in this specification includes any and all combinations of one or more of the associated listed items. The singular forms "a," "the," and "the" as used in this specification and the appended claims are also intended to include the plural forms unless the context clearly indicates otherwise.
[0098] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this specification.
[0099] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the embodiments described above can be referred to the corresponding processes in other embodiments, and will not be repeated here.
[0100] In the several embodiments provided in this specification, it should be understood that the disclosed systems, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between apparatuses or units may be electrical, mechanical, or other forms.
[0101] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of the technical solution in this application, depending on actual needs.
[0102] In addition, the functional units in the various embodiments of this specification can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.
[0103] If a function is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this specification, or the part that contributes to the prior art, or part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this specification. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0104] The above are merely specific embodiments described in this specification, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in this specification should be included within the scope of protection of this specification. Therefore, the scope of protection of this application should be determined by the scope of the claims.
Claims
1. A method for controlling a gun lock, characterized in that, The method includes: A control signal is output to the gun lock; the control signal is a pulse signal, and the control signal is used to control the gun lock to lock or unlock. If a feedback signal is received from the gun lock within the target time period, the output of the control signal is stopped; the feedback signal is used to indicate that the gun lock was successfully locked or unlocked.
2. The gun lock control method according to claim 1, characterized in that, The method further includes: The target pulse width of the control signal is obtained and used to control the output pulse width of the gun lock to adopt the target pulse width; wherein, the target pulse width is related to the sending time of the control signal and the receiving time of the feedback signal.
3. The gun lock control method according to claim 2, characterized in that, The step of outputting a control signal to the gun lock includes: outputting the control signal to the gun lock and recording the first moment when the control signal is started to be output; The step of stopping the output of the control signal when a feedback signal from the gun lock is received within the target duration includes: stopping the output of the control signal when a feedback signal from the gun lock is received within the target duration, and recording the second moment when the output of the control signal is stopped; The difference between the second time point and the first time point is used as the target pulse width.
4. The gun lock control method according to claim 2, characterized in that, The method further includes: The steps of repeatedly decreasing the target pulse width and outputting the control signal of the target pulse width to the gun lock are repeated until no feedback signal is received from the gun lock within the target duration. The output pulse width of the gun lock is controlled by the target pulse width of the previous iteration.
5. The gun lock control method according to claim 4, characterized in that, The step size for reducing the target pulse width is the target step size.
6. The gun lock control method according to claim 5, characterized in that, The target step size is determined based on one or more of the following: feedback method, hardware parameters, historical data, and empirical data. The feedback method includes interruption or real-time detection.
7. The gun lock control method according to claim 6, characterized in that, When the feedback method is real-time detection, the minimum value of the real-time detection period is used as the target step size.
8. The gun lock control method according to any one of claims 1-7, characterized in that, The control signals include lock signals and unlock signals of different control types.
9. The gun lock control method according to claim 8, characterized in that, The locking signal is a positive voltage pulse signal, and the unlocking signal is a negative voltage pulse signal.
10. A charging pile, characterized in that, The charging pile includes a control module and a gun lock, the control module being used to execute the method according to any one of claims 1 to 9.
11. A gun lock, characterized in that, Applied to charging piles, the charging pile includes a control module and the gun lock, the gun lock being used for: The system receives a control signal from the control module; the control signal is a pulse signal and is used to control the locking or unlocking of the gun lock. A feedback signal is output to the control module so that the control module stops outputting the control signal when it receives a feedback signal from the gun lock within a target time period; the feedback signal is used to indicate that the gun lock has been successfully locked or unlocked.
12. A computer device, characterized in that, The computer device includes a memory and a processor, the memory storing a computer program, and the processor executing the computer program to implement the method of any one of claims 1 to 9.
13. A chip, characterized in that, The chip is used to perform the method according to any one of claims 1 to 9.