Gun lock control method and device, charging pile, electronic equipment and storage medium

Through self-learning, the target pulse width of the gun lock is determined, and the parameter error problem when compatible with different gun lines is solved, the control success rate and efficiency are improved, the cost and damage risk is reduced, and the service life of the gun lock is extended.

CN119154039APending Publication Date: 2024-12-17SUNGROW CHARGING TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411147895.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-20
Publication Date
2024-12-17

AI Technical Summary

Technical Problem

The prior art has the risk of parameter error when compatible with different gun lines, which may damage the gun lock, or require increased costs to provide a matching control board, which increases manual intervention and costs.

Method used

By sending a series of pulse signals, self-learning determines the target pulse width of the gun lock response, improves the control success rate, reduces the probability of damage, and adjusts the pulse width when the gun lock is replaced to extend the service life.

Benefits of technology

It improves the success rate and efficiency of gun lock control, reduces the hardware cost of compatible with different types of gun lines, reduces the matching time for identifying pulse widths, and extends the service life of gun locks.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119154039A_ABST
    Figure CN119154039A_ABST
Patent Text Reader

Abstract

The invention discloses a gun lock control method and device, a charging pile, electronic equipment and a storage medium, and belongs to the technical field of charging guns. The method comprises the steps that under the condition that a first signal is received, a pulse signal of a first pulse width is sent to a gun lock, and under the condition that a feedback signal of the pulse signal of the first pulse width is received, the first pulse width is sent to the gun lock; determining the first pulse width as a target pulse width; or under the condition that the feedback signal of the pulse signal of the first pulse width is not received, continuously sending the pulse signal for N times until the gun lock responds, determining the pulse width of the corresponding pulse signal in the gun lock response as the target pulse width, and sending the pulse width until the gun lock responds, the pulse width corresponding to the gun lock response is used as the target pulse width for driving the gun lock, so that the success rate of gun lock control can be improved, the probability of gun lock damage is reduced, and the hardware cost of different types of gun lines is compatible.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application belongs to the technical field of charging guns, and in particular relates to a gun lock control method, device, charging pile, electronic device and storage medium. Background Art

[0002] At present, due to the differences in pulse widths used by gun lock manufacturers, charging pile equipment manufacturers are compatible with various gun lines mainly through parameter control based on different gun lines, which brings the risk of parameter input errors and may damage the gun lock; or, charging gun manufacturers provide control panels that match the gun lock, which increases costs. The above two methods require manual intervention in hardware devices or software programs other than the gun lock, which increases labor costs. Summary of the invention

[0003] The present application proposes a gun lock control method, device, charging pile, electronic device and storage medium to solve the problem of compatibility with various gun lines in the related art.

[0004] In a first aspect, the present application provides a gun lock control method, the method comprising:

[0005] When a first signal is received, a pulse signal with a first pulse width is sent to the gun lock, wherein the first signal is used to instruct the gun lock to be locked or unlocked;

[0006] In case of receiving a feedback signal of the pulse signal of the first pulse width, determining the first pulse width as a target pulse width;

[0007] Alternatively, in the case where no feedback signal is received for the pulse signal of the first pulse width, the pulse signal is continuously sent N times until the gun lock responds, and the pulse width of the pulse signal corresponding to the gun lock response is determined as the target pulse width, wherein the width of the pulse signal sent first among the N pulse signals is greater than the first pulse width, and the width of the pulse signal sent later among the N pulse signals is greater than the width of the pulse signal sent previously, and N is a positive integer;

[0008] Sending a pulse signal of the target pulse width;

[0009] The pulse signal of the target pulse width is a pulse signal to which the gun lock can respond.

[0010] The gun lock control method provided in the embodiment of the present application sends a pulse signal of a first pulse width to the gun lock, and when receiving a feedback signal from the gun lock to the pulse signal, uses the first pulse width as the target pulse width for subsequently driving the gun lock, and when no feedback signal from the gun lock to the pulse signal is received, continues to send the pulse signal N times until the gun lock responds, and determines the pulse width of the pulse signal corresponding to the response of the gun lock as the target pulse width. This self-learning method improves the success rate of controlling the gun lock and reduces the probability of damage to the gun lock, while reducing the hardware cost of being compatible with different types of gun lines, reducing the matching time for identifying the gun lock pulse width, improving the efficiency of controlling the gun lock, and facilitating timely replacement of gun lines from different manufacturers.

[0011] According to one embodiment of the present application, after sending the pulse signal of the target pulse width, the method further includes:

[0012] When a feedback signal of a pulse signal of the target pulse width is received, the pulse signal continues to be sent M times until the gun lock does not respond, and the width of the pulse signal sent last time corresponding to the pulse width when the gun lock does not respond is updated to the target pulse width, wherein the width of the pulse signal sent first among the M pulse signals is smaller than the target pulse width, and the width of the pulse signal sent last among the M pulse signals is smaller than the width of the pulse signal sent last time, and M is a positive integer.

[0013] In the above technical solution, when a feedback signal of a pulse signal of a target pulse width is received, the pulse signal continues to be sent M times until the gun lock does not respond, and the width of the pulse signal sent last time corresponding to the pulse width when the gun lock does not respond is updated to the target pulse width. The minimum pulse width can be used to control the gun lock, thereby reducing the probability of damage to the gun lock and extending the service life of the gun lock.

[0014] According to one embodiment of the present application, the continuing to send the pulse signal M times includes:

[0015] Periodically sending M pulse signals;

[0016] Alternatively, when receiving an indication signal for changing the gun lock, continue to send M pulse signals.

[0017] In the above technical solution, by periodically generating M pulse signals or continuing to send M pulse signals when receiving an indication signal for replacing the gun lock, the corresponding target pulse width can be adjusted in time according to the replacement of the gun lock, thereby extending the service life of the gun lock, reducing the probability of damage to the gun lock, and having better flexibility and practicality.

[0018] According to one embodiment of the present application, after sending the pulse signal of the target pulse width, the method further includes:

[0019] In the case where no feedback signal of the pulse signal of the target pulse width is received, the pulse signal continues to be sent K times until the gun lock responds, and the pulse width corresponding to the gun lock response is updated to the target pulse width, wherein the width of the pulse signal sent for the first time among the K pulse signals is greater than the target pulse width, and the width of the pulse signal sent for the latter time among the K pulse signals is greater than the width of the pulse signal sent for the previous time, and K is a positive integer.

[0020] In the above technical solution, when no feedback signal of the pulse signal of the target pulse width is received, the pulse signal continues to be sent K times until the gun lock responds, and the pulse width corresponding to the gun lock response is updated to the target pulse width. The new pulse width can be matched in time when the gun lock is replaced, which improves the success rate of controlling the gun lock, reduces the probability of damage to the gun lock and the hardware cost of compatibility with different types of gun lines, reduces the matching time for identifying the gun lock pulse width, and is conducive to timely replacement of gun lines from different manufacturers.

[0021] According to one embodiment of the present application, the method further includes:

[0022] After sending the N pulse signals, if the gun lock does not respond, a fault alarm message is output;

[0023] Alternatively, after traversing the preset pulse width set, if the gun lock does not respond, a fault alarm message is output.

[0024] In the above technical solution, if the gun lock does not respond after sending N pulse signals or traversing the preset pulse width set, a fault alarm message is output, so that the gun lock fault can be discovered in time and corresponding measures can be taken, thereby improving the reliability and practicality of the gun lock.

[0025] According to an embodiment of the present application, the first pulse width belongs to a first interval, the pulse widths of the N pulse signals respectively correspond to an interval, and the interval is determined according to the preset pulse width set.

[0026] In the above technical solution, by obtaining the maximum value of the pulse width of the gun lock that needs to be compatible, the pulse width corresponding to the maximum value is divided into multiple intervals according to the preset interval width, and in each interval, multiple pulse widths are determined according to the preset pulse width interval, which can cover the possible values ​​of the pulse width of the compatible gun lock and improve the success rate of controlling the gun lock.

[0027] In a second aspect, the present application provides a gun lock control device, the device comprising:

[0028] A processing unit, configured to send a pulse signal with a first pulse width to the gun lock when receiving a first signal, wherein the first signal is used to instruct to control the gun lock to be locked or unlocked;

[0029] The processing unit is further configured to determine the first pulse width as a target pulse width when receiving a feedback signal of the pulse signal of the first pulse width;

[0030] The processing unit is further configured to, in the case of not receiving a feedback signal for the pulse signal of the first pulse width, continue to send N pulse signals until the gun lock responds, and determine the pulse width of the pulse signal corresponding to the response of the gun lock as the target pulse width, wherein the width of the pulse signal sent first among the N pulse signals is greater than the first pulse width, the width of the pulse signal sent later among the N pulse signals is greater than the width of the pulse signal sent previously, and N is a positive integer;

[0031] A sending unit, sending a pulse signal of the target pulse width;

[0032] The pulse signal of the target pulse width is a pulse signal to which the gun lock can respond.

[0033] In the above technical solution, a pulse signal of a first pulse width is sent to the gun lock, and when a feedback signal of the gun lock to the pulse signal is received, the first pulse width is used as the target pulse width for subsequently driving the gun lock. When no feedback signal of the gun lock to the pulse signal is received, the pulse signal is continued to be sent N times until the gun lock responds, and the pulse width of the pulse signal corresponding to the response of the gun lock is determined as the target pulse width. This self-learning method improves the success rate of controlling the gun lock and reduces the probability of damage to the gun lock. At the same time, it reduces the hardware cost of compatibility with different types of gun lines, reduces the matching time for identifying the gun lock pulse width, improves the efficiency of controlling the gun lock, and is conducive to timely replacement of gun lines from different manufacturers.

[0034] In a third aspect, the present application provides a charging pile, comprising: a gun lock control device, the gun lock control device comprising a first control pin and a second control pin, the first control pin being connected to a gun lock control line, the second control pin being connected to a gun lock feedback line, the first control pin being used to output a pulse signal to the gun lock through the gun lock control line, the second control pin being used to receive a feedback signal from the gun lock through the gun lock feedback line, the gun lock control device being used to execute the gun lock control method as described in the first aspect above.

[0035] In the above technical solution, the charging pile sends a pulse signal of a first pulse width to the gun lock through the gun lock control device. When receiving a feedback signal from the gun lock to the pulse signal, the first pulse width is used as the target pulse width for subsequently driving the gun lock. When no feedback signal from the gun lock to the pulse signal is received, the pulse signal is continued to be sent N times until the gun lock responds, and the pulse width of the pulse signal corresponding to the response of the gun lock is determined as the target pulse width. This self-learning method improves the success rate of controlling the gun lock and reduces the probability of damage to the gun lock. At the same time, it reduces the hardware cost of compatibility with different types of gun lines, reduces the matching time for identifying the gun lock pulse width, improves the efficiency of controlling the gun lock, and is conducive to timely replacement of gun lines from different manufacturers.

[0036] In a fourth aspect, the present application provides an electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the gun lock control method as described in the first aspect above is implemented.

[0037] In a fifth aspect, the present application provides a non-transitory computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the gun lock control method as described in the first aspect above is implemented.

[0038] In a sixth aspect, the present application provides a chip, comprising a processor and a communication interface, wherein the communication interface is coupled to the processor, and the processor is used to run a program or instruction to implement the gun lock control method as described in the first aspect above.

[0039] In a seventh aspect, the present application provides a computer program product, comprising a computer program, which, when executed by a processor, implements the gun lock control method as described in the first aspect above.

[0040] Additional aspects and advantages of the present application will be given in part in the description below, and in part will become apparent from the description below, or will be learned through the practice of the present application. BRIEF DESCRIPTION OF THE DRAWINGS

[0041] The above and / or additional aspects and advantages of the present application will become apparent and easily understood from the description of the embodiments in conjunction with the following drawings, in which:

[0042] Figure 1 is a flow chart of a gun lock control method provided by an embodiment of the present application;

[0043] Figure 2 is a schematic diagram of a preset pulse width set provided in an embodiment of the present application;

[0044] Figure 3 is a schematic diagram of a flow chart of obtaining a preset pulse width set provided in an embodiment of the present application;

[0045] Figure 4 is a schematic diagram of a gun lock control device provided by the present application;

[0046] Figure 5 It is a schematic diagram of the structure of the charging pile provided in the embodiment of the present application;

[0047] Figure 6 It is a schematic diagram of the process of the charging pile gun lock matching the pulse width for the first time provided in the embodiment of the present application;

[0048] Figure 7 It is a schematic diagram of the process of the charging pile gun lock matching the pulse width again provided in the embodiment of the present application;

[0049] Figure 8 It is a schematic diagram of an electronic device provided in an embodiment of the present application.

[0050] Description of reference numerals:

[0051] 40: gun lock control device; 401: first processing unit; 402: second processing unit;

[0052] 403: third processing unit; 50: charging station; 501: gun lock;

[0053] 502: first control pin; 503: second control pin; 800: electronic device;

[0054] 801: processor; 802: memory. DETAILED DESCRIPTION

[0055] The following will be combined with the drawings in the embodiments of the present application to clearly describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, rather than all the embodiments. All other embodiments obtained by ordinary technicians in this field based on the embodiments in the present application belong to the scope of protection of this application.

[0056] The terms "first", "second", etc. in the specification and claims of the present application are used to distinguish similar objects, and are not used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable under appropriate circumstances, so that the embodiments of the present application can be implemented in an order other than those illustrated or described here, and the objects distinguished by "first", "second", etc. are generally of one type, and the number of objects is not limited. For example, the first object can be one or more. In addition, "and / or" in the specification and claims represents at least one of the connected objects, and the character " / " generally indicates that the objects associated with each other are in an "or" relationship.

[0057] Reference to "embodiments" in this application means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present application. The appearance of the phrase in various locations in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described in this application may be combined with other embodiments.

[0058] The gun lock control method provided in the embodiment of the present application may be executed by an electronic device or a functional module or functional entity in the electronic device that can implement the gun lock control method. The electronic devices mentioned in the embodiment of the present application include but are not limited to a gun lock control device, a controller in a charging pile, a processor in a charging pile, an edge server, a background server, a cloud server, a mobile phone, a tablet computer, a computer, a camera, and a wearable device. The gun lock control method provided in the embodiment of the present application is described below using a gun lock control device as an example of the execution subject.

[0059] Gun locks are widely used as locking devices for charging gun connectors of charging piles. Currently, gun locks used on the market are all driven by pulses, such as using a positive 12V pulse signal to lock and a negative 12V pulse signal to unlock. The pulse width used by gun locks is generally in the millisecond range.

[0060] Since the pulse widths used by gun lock manufacturers vary, it has caused trouble for charging pile equipment manufacturers to be compatible with various gun lines. There are two main existing compatibility methods: the first is to use software to control compatibility through parameters according to different gun lines. This method has the risk of incorrect parameter input, which will cause damage to the gun lock; the second is that each charging gun manufacturer provides an additional control board that matches the gun lock, and the main controller only needs to provide locking and unlocking signals. This method has the problem of high cost.

[0061] When the gun lines of different manufacturers need to be replaced, the above two compatibility methods both require manual intervention on the hardware or software except the gun lock, which increases the labor cost.

[0062] In order to solve the above problems, the embodiments of the present application provide a gun lock control method. The gun lock control method, device, charging pile, electronic device and storage medium provided in the embodiments of the present application are described in detail below with reference to the accompanying drawings through specific embodiments and their application scenarios.

[0063] Figure 1 : is a flow chart of the gun lock control method provided in the embodiment of the present application. Figure 1 As shown, the gun lock control method includes: step 110, step 120, step 130 and step 140.

[0064] Step 110: When a first signal is received, a pulse signal with a first pulse width is sent to the gun lock, wherein the first signal is used to instruct to control the gun lock to be locked or unlocked.

[0065] In this step, upon receiving the first signal, the gun lock control device sends a pulse signal with a first pulse width to the gun lock, and the first signal is used to indicate whether to lock or unlock the gun lock, that is, the first signal is a signal for controlling the locking or unlocking of the gun lock.

[0066] Optionally, the first signal may be a positive 12V pulse signal. After receiving the positive 12V pulse signal, the gun lock control device sends a pulse signal with a first pulse width to the gun lock. The first signal is a signal for controlling the gun lock to lock.

[0067] Optionally, the first signal may be a negative 12 volt pulse signal. After receiving the negative 12 volt pulse signal, the gun lock control device sends a pulse signal with a first pulse width to the gun lock. The first signal is a signal for controlling the unlocking of the gun lock.

[0068] It should be noted that the gun lock control device can be any device that can meet the needs of data transmission and data processing. For example, it can be a microcontroller / processor of a charging pile, or a functional module or entity on the microcontroller / processor of a charging pile, or a terminal device, server, or other hardware device that can communicate with the microcontroller / processor of a charging pile.

[0069] Step 120 : upon receiving a feedback signal of the pulse signal of the first pulse width, determining the first pulse width as a target pulse width.

[0070] It is easy to understand that the gun lock control device receives a feedback signal from the gun lock to a pulse signal, indicating that the gun lock can respond to the pulse signal, and then records the pulse width corresponding to the pulse signal (i.e., the first pulse width), and uses the first pulse width as the target pulse width for subsequently driving the gun lock.

[0071] For example, when the gun lock control device receives a feedback signal from the gun lock to a pulse signal, if the first pulse width is 50 ms, 50 ms will be used as the target pulse width for subsequently driving the gun lock.

[0072] Step 130: In the case where no feedback signal is received for the pulse signal of the first pulse width, continue to send pulse signals N times until the gun lock responds, and determine the pulse width of the pulse signal corresponding to the gun lock response as the target pulse width, wherein the width of the pulse signal sent for the first time among the N pulse signals is greater than the first pulse width, and the width of the pulse signal sent after the N pulse signals is greater than the width of the pulse signal sent before, and N is a positive integer.

[0073] In this step, the gun lock control device does not receive the feedback signal of the gun lock to the pulse signal, which means that the pulse signal cannot drive the gun lock, that is, the pulse width of the pulse signal is not appropriate. At this time, the pulse signal continues to be sent N times until the gun lock responds, and the pulse width of the pulse signal corresponding to the response of the gun lock is determined as the target pulse width.

[0074] It is worth noting that, since the response mechanism of the gun lock is: if the pulse width is smaller than the response pulse width of the gun lock, it will not respond, so the pulse width of the subsequently sent pulse signal needs to be wider. That is, the width of the first pulse signal sent in N pulse signals is greater than the first pulse width, and the width of the latter pulse signal sent in N pulse signals is greater than the width of the previously sent pulse signal, and N is a positive integer.

[0075] For example, when the first pulse width is 50ms, the gun lock control device sends a 50ms pulse signal to the gun lock upon receiving the first signal. If the gun lock control device does not receive a feedback signal from the gun lock to the pulse signal, it sends a pulse signal with a pulse width greater than the first pulse width to the gun lock, for example, continuing to send pulse signals with intervals of 50ms, 100ms, 150ms, etc. from the first pulse width to the gun lock (i.e., sending pulse signals with pulse widths of 100ms, 150ms, 200ms, etc.), until the gun lock responds. It can be understood that after sending the pulse signal to the gun lock for three times, a feedback signal from the gun lock to the pulse signal is received, and the pulse width corresponding to the response of the gun lock is recorded as 200ms, and 200ms is used as the target pulse width for subsequent driving of the gun lock, i.e., at this time, N is 3.

[0076] It is worth noting that if no feedback signal is received from the gun lock to the pulse signal after traversing all the pulse width signals, it means that the gun lock is damaged or there is a fault in the gun lock feedback circuit and it cannot be charged normally. At this time, a fault message can be sent to the background to prompt relevant personnel to take repair measures.

[0077] Step 140: Send a pulse signal with the target pulse width.

[0078] It should be noted that when the gun lock control device receives the feedback signal of the gun lock to the pulse signal for the first time, it records the first pulse width and uses the first pulse width as the target pulse width for subsequently driving the gun lock. The pulse signal of the target pulse width is a pulse signal that the gun lock can respond to.

[0079] When the gun lock control device receives the first signal again, it can directly send a pulse signal with a target pulse width to the gun lock.

[0080] The gun lock control method provided in the embodiment of the present application sends a pulse signal of a first pulse width to the gun lock, and when receiving a feedback signal from the gun lock to the pulse signal, uses the first pulse width as the target pulse width for subsequently driving the gun lock, and when no feedback signal from the gun lock to the pulse signal is received, continues to send the pulse signal N times until the gun lock responds, and determines the pulse width of the pulse signal corresponding to the response of the gun lock as the target pulse width. This self-learning method improves the success rate of controlling the gun lock and reduces the probability of damage to the gun lock, while reducing the hardware cost of being compatible with different types of gun lines, reducing the matching time for identifying the gun lock pulse width, improving the efficiency of controlling the gun lock, and facilitating timely replacement of gun lines from different manufacturers.

[0081] In one embodiment of the present application, after sending the pulse signal of the target pulse width, the method further includes:

[0082] When a feedback signal of a pulse signal of the target pulse width is received, the pulse signal continues to be sent M times until the gun lock does not respond, and the width of the pulse signal sent last time corresponding to the pulse width when the gun lock does not respond is updated to the target pulse width, wherein the width of the pulse signal sent first among the M pulse signals is smaller than the target pulse width, and the width of the pulse signal sent last among the M pulse signals is smaller than the width of the pulse signal sent last time, and M is a positive integer.

[0083] It is worth noting that if the gun lock is replaced, and the response width of the replaced gun lock is smaller than the response width of the previous gun lock, then the original target pulse width is too wide for the replaced gun lock. Since the response mechanism of the gun lock is: if the pulse width is greater than the response pulse width of the gun lock, it can respond, but if the width is too large for a long time, it will cause problems such as burning the gun and affect the life of the gun lock. Therefore, although the replaced gun lock can still respond to the pulse signal of the target pulse width, and the charging pile can still receive the feedback signal of the pulse signal of the original target pulse width, the long-term use of the original target pulse width may burn out the replaced gun lock, so the pulse width needs to be adjusted.

[0084] Therefore, start from the target pulse width and traverse in the direction of decreasing pulse width. If it can respond using a smaller pulse width, it means that the gun lock has been replaced, and the pulse width matched by the replaced gun lock is smaller than the pulse width matched by the previous gun lock. You need to continue trying until the gun lock does not respond, at which time it means that the critical pulse width value has been found.

[0085] When receiving the feedback signal of the pulse signal of the target pulse width from the gun lock, continue to send the pulse signal M times until the gun lock does not respond, and update the width of the pulse signal sent last time corresponding to the pulse width when the gun lock does not respond to the target pulse width.

[0086] It should be noted that the width of the first pulse signal sent among the M pulse signals is smaller than the target pulse width, the width of the last pulse signal sent among the M pulse signals is smaller than the width of the previously sent pulse signal, and M is a positive integer.

[0087] For example, when the target pulse width is 350ms, in the case of receiving the feedback signal of the gun lock for the pulse signal of 350ms, the pulse signal is continuously sent with a pulse width of 50ms intervals, and the pulse width is traversed from 350ms to the direction of decreasing pulse width. If the gun lock can also respond with a pulse width of 300ms, it means that the gun lock has been replaced, and the pulse width matched by the replaced gun lock is smaller than the pulse width matched by the previous gun lock. The traversal is continued. When the pulse signal of 100ms is traversed, the gun lock does not respond. The width of the pulse signal sent last time of 100ms, 150ms, is used as the target pulse width for subsequent driving of the gun lock. It can be seen that M is 5 at this time. In the above technical solution, in the case of receiving the feedback signal of the pulse signal of the target pulse width, the pulse signal is continuously sent M times until the gun lock does not respond, and the width of the pulse signal sent last time corresponding to the pulse width when the gun lock does not respond is updated to the target pulse width. The gun lock can be controlled with the minimum pulse width, thereby reducing the probability of damage to the gun lock and extending the service life of the gun lock.

[0088] In one embodiment of the present application, the continuing to send the pulse signal M times includes:

[0089] Periodically sending M pulse signals;

[0090] Alternatively, when receiving an indication signal for changing the gun lock, continue to send M pulse signals.

[0091] Optionally, when a feedback signal of a pulse signal with a target pulse width is received, M pulse signals can be sent periodically. For example, when a feedback signal is received every month, a pulse signal with a smaller pulse width can still be sent to detect whether the gun lock has been replaced.

[0092] Optionally, when a feedback signal of a pulse signal with a target pulse width is received, when an indication signal for replacing the gun lock is received, the pulse signal may continue to be sent M times until the gun lock does not respond, and the width of the pulse signal sent the previous time corresponding to the pulse width when the gun lock does not respond is updated to the target pulse width. For example, when an indication signal for replacing the gun lock is received, a pulse signal with a width less than the target pulse width is sent, and the gun lock no longer responds when the third pulse signal is sent, the pulse signal sent for the second time is updated to the target pulse width.

[0093] In the above technical solution, by periodically generating M pulse signals or continuing to send M pulse signals when receiving an indication signal for replacing the gun lock, the corresponding target pulse width can be adjusted in time according to the replacement of the gun lock, thereby extending the service life of the gun lock, reducing the probability of damage to the gun lock, and having better flexibility and practicality.

[0094] In one embodiment of the present application, after sending the pulse signal of the target pulse width, the method further includes:

[0095] In the case where no feedback signal of the pulse signal of the target pulse width is received, the pulse signal continues to be sent K times until the gun lock responds, and the pulse width corresponding to the gun lock response is updated to the target pulse width, wherein the width of the pulse signal sent for the first time among the K pulse signals is greater than the target pulse width, and the width of the pulse signal sent for the latter time among the K pulse signals is greater than the width of the pulse signal sent for the previous time, and K is a positive integer.

[0096] It is worth noting that after sending a pulse signal of the target pulse width to the gun lock, if no feedback signal is received from the gun lock in response to the pulse signal of the target pulse width, the first consideration is that the gun lock has been replaced, and the response pulse width of the gun lock is wider after the replacement. Therefore, it is necessary to enter the above-mentioned identification process again for identification. Since the current pulse width response fails, it means that a pulse width smaller than the pulse width cannot be matched. It is necessary to send a pulse signal starting from a pulse width greater than the target pulse width in the direction of increasing pulse width until the gun lock responds.

[0097] In the case where no feedback signal of the pulse signal of the target pulse width is received, the pulse signal continues to be sent K times until the gun lock responds, and the pulse width corresponding to the gun lock response is updated to the target pulse width, wherein the width of the pulse signal sent for the first time among the K pulse signals is greater than the target pulse width, and the width of the pulse signal sent after the K pulse signals is greater than the width of the pulse signal sent before, and K is a positive integer.

[0098] For example, the target pulse width is 350ms. If no feedback signal is received from the gun lock in response to a 350ms pulse signal, the pulse signal continues to be sent. The width of each pulse signal sent is 50ms greater than the width of the previously sent pulse signal. If the gun lock responds when the second pulse signal is sent, the target pulse width will be updated to 450ms.

[0099] In the above technical solution, when no feedback signal of the pulse signal of the target pulse width is received, the pulse signal continues to be sent K times until the gun lock responds, and the pulse width corresponding to the gun lock response is updated to the target pulse width. The new pulse width can be matched in time when the gun lock is replaced, which improves the success rate of controlling the gun lock, reduces the probability of damage to the gun lock and the hardware cost of compatibility with different types of gun lines, reduces the matching time for identifying the gun lock pulse width, and is conducive to timely replacement of gun lines from different manufacturers.

[0100] In one embodiment of the present application, the method further includes:

[0101] After sending the N pulse signals, if the gun lock does not respond, a fault alarm message is output;

[0102] Alternatively, after traversing the preset pulse width set, if the gun lock does not respond, a fault alarm message is output.

[0103] Optionally, after sending N pulse signals, if the gun lock does not respond, a fault alarm message is output. For example, if the gun lock does not respond after sending 20 pulse signals, it means that the gun lock is damaged or there is a fault in the gun lock feedback loop. At this time, a fault alarm message can be output to the background to prompt relevant personnel to take repair measures.

[0104] Optionally, after traversing the preset pulse width set, the gun lock does not respond, indicating that the gun lock is damaged or there is a fault in the gun lock feedback loop and cannot be charged normally. At this time, a fault alarm message can be output to the background to prompt relevant personnel to take repair measures.

[0105] In some embodiments, the first pulse width and the pulse width of the N pulse signals both belong to a preset pulse width set, the preset pulse width set is obtained by dividing the maximum value of the pulse width of the gun lock that needs to be compatible, and the preset pulse width set includes multiple pulse widths.

[0106] It should be noted that the preset pulse width set includes a plurality of intervals, and each interval includes a plurality of pulse widths arranged from small to large.

[0107] It can be understood that the number of intervals can be determined according to the types of gun locks currently on the market. For example, there are four common types of gun locks in the current market, and these four types of gun locks correspond to four response width ranges respectively. Then, four intervals can be determined based on the pulse widths corresponding to these four types of gun locks.

[0108] Figure 2 is a schematic diagram of a preset pulse width set provided in an embodiment of the present application, such as Figure 2As shown, the preset pulse width set includes 4 intervals, namely (0, 250ms], (250ms, 500ms], (500ms, 750ms], and (750ms, 1000ms], wherein the pulse width in the interval (0, 250ms] is 50ms, 100ms, 150ms, 200ms, and 250ms; the pulse width in the interval (250ms, 500ms] is 300ms, 350ms, 400ms, 450ms, and 500ms; the pulse width in the interval (500ms, 750ms] is 550ms, 600ms, 650ms, 700ms, and 750ms; the pulse width in the interval (750ms, 1000ms] is 800ms, 850ms, 900ms, 950ms, and 1000ms.

[0109] In the above technical solution, if the gun lock does not respond after sending N pulse signals or traversing the preset pulse width set, a fault alarm message is output, so that the gun lock fault can be discovered in time and corresponding measures can be taken, thereby improving the reliability and practicality of the gun lock.

[0110] According to an embodiment of the present application, the first pulse width belongs to a first interval, the pulse widths of the N pulse signals respectively correspond to an interval, and the interval is determined according to the preset pulse width set.

[0111] It is easy to understand that the gun lock control device needs to first obtain a preset pulse width set when sending a pulse signal of a first pulse width.

[0112] Figure 3 is a schematic diagram of a flow chart of obtaining a preset pulse width set provided in an embodiment of the present application, such as Figure 3 As shown, obtaining the preset pulse width set includes step 310 , step 320 and step 330 .

[0113] Step 310, obtaining the maximum value of the pulse width of the gun lock that needs to be compatible;

[0114] The gun lock control device obtains the maximum value of the pulse width of the gun lock that needs to be compatible to determine the range of the pulse width set. For example, in the gun lock that needs to be compatible, the maximum value of the pulse width that can be responded to is 1 second.

[0115] Step 320: Divide the pulse width corresponding to the maximum value into a plurality of intervals according to a preset interval width;

[0116] According to the preset interval width, the pulse width corresponding to the maximum value of the pulse width is divided into multiple intervals. For example, the preset interval width is 250ms, the maximum value of the pulse width is 1 second, and 1 second can be divided into 4 intervals, namely (0, 250ms], (250ms, 500ms], (500ms, 750ms], and (750ms, 1000ms].

[0117] It should be noted that the preset interval width can be divided according to the pulse width interval provided in the specifications of gun locks from different manufacturers, or it can be divided according to actual conditions and scenarios, and this application does not impose any restrictions.

[0118] Step 330: In each interval, determine a plurality of pulse widths according to a preset pulse width interval.

[0119] It is easy to understand that in each interval, multiple pulse widths are determined according to the preset pulse width interval. For example, the preset pulse width interval is 50ms, the maximum value of the pulse width is 1 second, and the pulse width corresponding to 1 second is divided into 4 intervals, which are (0, 250ms], (250ms, 500ms], (500ms, 750ms], and (750ms, 1000ms], respectively. The pulse widths in the interval (0, 250ms) are 50ms, 100ms, 150ms, respectively. The pulse widths in the interval [250ms, 500ms] are 300ms, 350ms, 400ms, 450ms, 500ms respectively; the pulse widths in the interval [500ms, 750ms] are 550ms, 600ms, 650ms, 700ms, 750ms respectively; the pulse widths in the interval [50ms, 1000ms] are 800ms, 850ms, 900ms, 950ms, 1000ms respectively.

[0120] The preset pulse width interval can be selected according to the requirements. For example, if you want higher accuracy, you can set the preset pulse width interval to 25ms. If you want to shorten the pulse width matching time, you can set the preset pulse width interval to 100ms.

[0121] It can be understood that after obtaining multiple intervals, a pulse width can be selected from each interval and sent to the gun lock in sequence, so that the interval of the pulse width that the gun lock responds to can be quickly found. For example, a pulse width can be selected from each of the four intervals of (0, 250ms], (250ms, 500ms], (500ms, 750ms], and (750ms, 1000ms] and sent to the gun lock. If (500ms, 750ms] and (750ms, 1000ms] both receive feedback signals, according to the principle of gun lock response, more pulse widths can be further selected in the interval of (500ms, 750ms] and sent to the gun lock to find the minimum value of the pulse width that the gun lock can respond to.

[0122] It can be understood that, since the intervals can be divided according to the width to which the gun lock can respond, the number of times the pulse signal is sent at the beginning can be reduced, thereby quickly finding the pulse width interval to which the gun lock can respond.

[0123] In the above technical solution, by obtaining the maximum value of the pulse width of the gun lock that needs to be compatible, the pulse width corresponding to the maximum value is divided into multiple intervals according to the preset interval width, and in each interval, multiple pulse widths are determined according to the preset pulse width interval, which can cover the possible values ​​of the pulse width of the compatible gun lock and improve the success rate of controlling the gun lock.

[0124] Figure 4 is a schematic diagram of a gun lock control device provided by the present application, such as Figure 4 As shown, the gun lock control device 40 includes a processing unit and a sending unit.

[0125] The processing unit 401 is used to send a pulse signal with a first pulse width to the gun lock when receiving a first signal, wherein the first signal is used to instruct to control the gun lock to lock or unlock;

[0126] The processing unit 401 is further configured to determine the first pulse width as a target pulse width when receiving a feedback signal of the pulse signal of the first pulse width;

[0127] The processing unit 401 is further configured to, in the case of not receiving a feedback signal for the pulse signal of the first pulse width, continue to send N pulse signals until the gun lock responds, and determine the pulse width of the pulse signal corresponding to the gun lock response as the target pulse width, wherein the width of the pulse signal sent first among the N pulse signals is greater than the first pulse width, the width of the pulse signal sent later among the N pulse signals is greater than the width of the pulse signal sent previously, and N is a positive integer;

[0128] The sending unit 402 is used to send a pulse signal of the target pulse width;

[0129] The pulse signal of the target pulse width is a pulse signal to which the gun lock can respond.

[0130] Optionally, the processing unit 401 is further configured to:

[0131] When a feedback signal of a pulse signal of the target pulse width is received, the pulse signal continues to be sent M times until the gun lock does not respond, and the width of the pulse signal sent last time corresponding to the pulse width when the gun lock does not respond is updated to the target pulse width, wherein the width of the pulse signal sent first among the M pulse signals is smaller than the target pulse width, and the width of the pulse signal sent last among the M pulse signals is smaller than the width of the pulse signal sent last time, and M is a positive integer.

[0132] Optionally, the sending unit 402 is further configured to:

[0133] Periodically sending M pulse signals;

[0134] Alternatively, when receiving an indication signal for changing the gun lock, continue to send M pulse signals.

[0135] Optionally, the processing unit 401 is further configured to:

[0136] In the case where no feedback signal of the pulse signal of the target pulse width is received, the pulse signal continues to be sent K times until the gun lock responds, and the pulse width corresponding to the gun lock response is updated to the target pulse width, wherein the width of the pulse signal sent for the first time among the K pulse signals is greater than the target pulse width, and the width of the pulse signal sent for the latter time among the K pulse signals is greater than the width of the pulse signal sent for the previous time, and K is a positive integer.

[0137] Optionally, the device further comprises a fault alarm unit, which is used to:

[0138] After sending the N pulse signals, if the gun lock does not respond, a fault alarm message is output;

[0139] Alternatively, after traversing the preset pulse width set, if the gun lock does not respond, a fault alarm message is output.

[0140] Optionally, the first pulse width belongs to a first interval, the pulse widths of the N pulse signals respectively correspond to an interval, and the interval is determined according to the preset pulse width set.

[0141] In the above technical solution, a pulse signal of a first pulse width is sent to the gun lock, and when a feedback signal of the gun lock to the pulse signal is received, the first pulse width is used as the target pulse width for subsequently driving the gun lock. When no feedback signal of the gun lock to the pulse signal is received, the pulse signal is continued to be sent N times until the gun lock responds, and the pulse width of the pulse signal corresponding to the response of the gun lock is determined as the target pulse width. This self-learning method improves the success rate of controlling the gun lock and reduces the probability of damage to the gun lock. At the same time, it reduces the hardware cost of compatibility with different types of gun lines, reduces the matching time for identifying the gun lock pulse width, improves the efficiency of controlling the gun lock, and is conducive to timely replacement of gun lines from different manufacturers.

[0142] The gun lock control device 40 in the embodiment of the present application can be an electronic device, or a component in the electronic device, such as an integrated circuit or a chip. The electronic device can be a terminal, or other devices other than a terminal. Exemplarily, the electronic device can be a mobile phone, a tablet computer, a laptop computer, a PDA, a vehicle-mounted electronic device, a mobile Internet device (Mobile Internet Device, MID), an augmented reality (augmented reality, AR) / virtual reality (virtual reality, VR) device, a robot, a wearable device, an ultra-mobile personal computer (ultra-mobile personal computer, UMPC), a netbook or a personal digital assistant (personal digital assistant, PDA), etc. It can also be a server, a network attached storage (Network Attached Storage, NAS), a personal computer (personal computer, PC), a television (television, TV), a teller machine or a self-service machine, etc., and the embodiment of the present application does not make specific limitations.

[0143] The gun lock control device 40 in the embodiment of the present application may be a device having an operating system. The operating system may be a Microsoft (Windows) operating system, an Android (Android) operating system, an IOS operating system, or other possible operating systems, which are not specifically limited in the embodiment of the present application.

[0144] The gun lock control device 40 provided in the embodiment of the present application can achieve Figures 1 to 3 To avoid repetition, the various processes implemented by the method embodiment are not described here.

[0145] The present application also provides a charging pile. Figure 5 Schematic diagram of the structure of the charging pile provided in the embodiment of the present application. Figure 5As shown, the charging pile 50 includes a gun lock control device 40 and a gun lock 501, the gun lock control device 40 includes a first control pin 502 and a second control pin 503, the first control pin 502 is connected to the gun lock control line, the second control pin 503 is connected to the gun lock feedback line, the first control pin 502 is used to output a pulse signal to the gun lock 501 through the gun lock control line, the second control pin 503 is used to receive the feedback signal of the gun lock 501 through the gun lock feedback line, and the gun lock control device 40 is used to execute the gun lock control method as described above.

[0146] Figure 6 : is a flow chart of the first matching pulse width of the charging pile gun lock provided in the embodiment of the present application, such as Figure 6 As shown, the first control pin outputs a pulse signal to the gun lock through the gun lock control line, including an instruction to control the gun lock. After receiving the feedback signal sent by the second control pin, the gun lock control device tries in sequence from the first pulse width point in the minimum interval according to the interval range set by the program. If the second control pin receives the feedback signal sent by the gun lock, the interval and pulse width value corresponding to the current pulse width are recorded as the target pulse width for subsequent driving of the gun lock. If no feedback is received after traversing the pulse widths in all intervals, it means that the gun lock is damaged, and the gun lock control device sends a fault message to the background.

[0147] Figure 7 : is a schematic diagram of the process of the charging pile gun lock matching the pulse width again provided in the embodiment of the present application, such as Figure 7 As shown, the first control pin outputs a pulse signal to the gun lock through the gun lock control line, including the command to control the gun lock. After receiving the feedback signal sent by the second control pin, the gun lock control device determines whether there is recorded data. If not, it follows the above Figure 6 The process is executed. If it exists, determine whether the recorded data successfully controls the gun lock. If the recorded data can successfully control the gun lock, verify whether the recorded gun lock pulse width is the minimum pulse width, and take the minimum pulse width as the latest control pulse width value. If the recorded data cannot successfully control the gun lock, delete the record and continue to try from this interval and this pulse width point in sequence. If the second control pin receives the feedback signal sent by the gun lock, record the interval and pulse width value corresponding to the new pulse width as the target pulse width for subsequent driving of the gun lock. If no feedback is received after traversing all the pulse widths in the interval, it means that the gun lock is damaged, and the gun lock control device sends a fault message to the background.

[0148] In the above technical solution, the charging pile sends a pulse signal of a first pulse width to the gun lock through the gun lock control device. When receiving a feedback signal from the gun lock to the pulse signal, the first pulse width is used as the target pulse width for subsequent driving of the gun lock. When not receiving a feedback signal from the gun lock to the pulse signal, the pulse signal is continuously sent N times until the gun lock responds. The pulse width of the pulse signal corresponding to the response of the gun lock is determined as the target pulse width. This self-learning method improves the success rate of controlling the gun lock and reduces the probability of damage to the gun lock. At the same time, it reduces the hardware cost of being compatible with different types of gun lines, reduces the matching time of identifying the gun lock pulse width, improves the efficiency of controlling the gun lock, and is conducive to timely replacement of gun lines from different manufacturers. For the understanding of the above charging pile, reference can be made to the description in the above-mentioned gun lock control method embodiment, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.

[0149] In some embodiments, Figure 8 As shown, the embodiment of the present application also provides an electronic device 800, including a processor 808, a memory 802, and a computer program stored in the memory 802 and executable on the processor 808. When the program is executed by the processor 808, each process of the above-mentioned gun lock control method embodiment is implemented, and the same technical effect can be achieved. To avoid repetition, it will not be described here.

[0150] It should be noted that the electronic devices in the embodiments of the present application include the mobile electronic devices and non-mobile electronic devices mentioned above.

[0151] The embodiment of the present application also provides a non-transitory computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the various processes of the above-mentioned gun lock control method embodiment are implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.

[0152] The processor is the processor in the electronic device described in the above embodiment. The readable storage medium includes a computer readable storage medium, such as a computer read-only memory ROM, a random access memory RAM, a magnetic disk or an optical disk.

[0153] An embodiment of the present application also provides a computer program product, including a computer program, which implements the above-mentioned gun lock control method when executed by a processor.

[0154] The processor is the processor in the electronic device described in the above embodiment. The readable storage medium includes a computer readable storage medium, such as a computer read-only memory ROM, a random access memory RAM, a magnetic disk or an optical disk.

[0155] An embodiment of the present application further provides a chip, which includes a processor and a communication interface, wherein the communication interface is coupled to the processor, and the processor is used to run programs or instructions to implement the various processes of the above-mentioned gun lock control method embodiment, and can achieve the same technical effect. To avoid repetition, it will not be repeated here.

[0156] It should be understood that the chip mentioned in the embodiments of the present application can also be called a system-level chip, a system chip, a chip system or a system-on-chip chip, etc.

[0157] It should be noted that, in this article, the terms "comprise", "include" or any other variant thereof are intended to cover non-exclusive inclusion, so that the process, method, article or device including a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise one..." do not exclude the presence of other identical elements in the process, method, article or device including the element. In addition, it should be pointed out that the scope of the methods and devices in the embodiments of the present application is not limited to performing functions in the order shown or discussed, and may also include performing functions in a substantially simultaneous manner or in reverse order according to the functions involved, for example, the described method may be performed in an order different from that described, and various steps may also be added, omitted, or combined. In addition, the features described with reference to certain examples may be combined in other examples.

[0158] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a computer software product, which is stored in a storage medium (such as ROM / RAM, a disk, or an optical disk), and includes a number of instructions for a terminal (which can be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods described in each embodiment of the present application.

[0159] The embodiments of the present application are described above in conjunction with the accompanying drawings, but the present application is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the guidance of the present application, ordinary technicians in this field can also make many forms without departing from the purpose of the present application and the scope of protection of the claims, all of which are within the protection of the present application.

[0160] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "illustrative embodiments", "examples", "specific examples", or "some examples" means that the specific features, structures, materials, or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present application. In this specification, the schematic representation of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials, or characteristics described may be combined in any one or more embodiments or examples in a suitable manner.

[0161] Although the embodiments of the present application have been shown and described, those skilled in the art will appreciate that various changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the present application, and that the scope of the present application is defined by the claims and their equivalents.

Claims

1. A gun lock control method, characterized in that: include: When a first signal is received, a pulse signal with a first pulse width is sent to the gun lock, wherein the first signal is used to instruct the gun lock to be locked or unlocked; In case of receiving a feedback signal of the pulse signal of the first pulse width, determining the first pulse width as a target pulse width; Alternatively, in the case where no feedback signal is received for the pulse signal of the first pulse width, the pulse signal is continuously sent N times until the gun lock responds, and the pulse width of the pulse signal corresponding to the gun lock response is determined as the target pulse width, wherein the width of the pulse signal sent first among the N pulse signals is greater than the first pulse width, and the width of the pulse signal sent later among the N pulse signals is greater than the width of the pulse signal sent previously, and N is a positive integer; Sending a pulse signal of the target pulse width; The pulse signal of the target pulse width is a pulse signal to which the gun lock can respond.

2. The gun lock control method according to claim 1, characterized in that: After sending the pulse signal of the target pulse width, the method further includes: When a feedback signal of a pulse signal of the target pulse width is received, the pulse signal continues to be sent M times until the gun lock does not respond, and the width of the pulse signal sent last time corresponding to the pulse width when the gun lock does not respond is updated to the target pulse width, wherein the width of the pulse signal sent first among the M pulse signals is smaller than the target pulse width, and the width of the pulse signal sent last among the M pulse signals is smaller than the width of the pulse signal sent last time, and M is a positive integer.

3. The gun lock control method according to claim 2, characterized in that: The continuing to send the pulse signal M times includes: Periodically sending M pulse signals; Alternatively, when receiving an indication signal for changing the gun lock, continue to send M pulse signals.

4. The gun lock control method according to claim 1, characterized in that: After sending the pulse signal of the target pulse width, the method further includes: In the case where no feedback signal of the pulse signal of the target pulse width is received, the pulse signal continues to be sent K times until the gun lock responds, and the pulse width corresponding to the gun lock response is updated to the target pulse width, wherein the width of the pulse signal sent for the first time among the K pulse signals is greater than the target pulse width, and the width of the pulse signal sent for the latter time among the K pulse signals is greater than the width of the pulse signal sent for the previous time, and K is a positive integer.

5. The gun lock control method according to claim 1, characterized in that: The method further comprises: After sending the N pulse signals, if the gun lock does not respond, a fault alarm message is output; Alternatively, after traversing the preset pulse width set, if the gun lock does not respond, a fault alarm message is output.

6. The gun lock control method according to claim 1, characterized in that: The first pulse width belongs to a first interval, the pulse widths of the N pulse signals respectively correspond to an interval, and the interval is determined according to a preset pulse width set.

7. A gun lock control device, characterized in that: include: a processing unit, configured to send a pulse signal with a first pulse width to the gun lock when receiving a first signal, wherein the first signal is used to instruct to control the gun lock to be locked or unlocked, and the first pulse width is in a first interval; The processing unit is further configured to record the first pulse width and the first interval upon receiving a feedback signal from the gun lock in response to the pulse signal, and use the first pulse width as a target pulse width for subsequently driving the gun lock; The processing unit is further configured to determine the next pulse width of the current pulse width from a preset pulse width set when no feedback signal from the gun lock to the pulse signal is received, send a pulse signal of the next pulse width to the gun lock until the gun lock responds, record the pulse width and interval corresponding to the gun lock response, and use the pulse width corresponding to the gun lock response as a target pulse width for subsequently driving the gun lock; A sending unit, used for sending a pulse signal of the target pulse width; The pulse signal of the target pulse width is a pulse signal to which the gun lock can respond.

8. A charging pile, characterized in that: include: A gun lock control device, the gun lock control device comprising a first control pin and a second control pin, the first control pin being connected to a gun lock control line, the second control pin being connected to a gun lock feedback line, the first control pin being used to output a pulse signal to the gun lock through the gun lock control line, the second control pin being used to receive a feedback signal from the gun lock through the gun lock feedback line, the gun lock control device being used to execute the gun lock control method as described in any one of claims 1 to 6.

9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the program, the gun lock control method as described in any one of claims 1-6 is implemented.

10. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the gun lock control method as described in any one of claims 1-6 is implemented.