Control method and device of lifting mechanism, computer device and storage medium

CN116149164BActive Publication Date: 2026-10-27NETEASE YOUDAO (HANGZHOU) SMART TECH CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202211540291.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-12-02
Publication Date
2026-10-27
Estimated Expiration
2042-12-02

AI Technical Summary

Technical Problem

[0003]有鉴于此,本申请实施例提供一种升降机构的控制方法、装置、计算机设备及存储介质,至少解决由于摩擦力等外部因素导致升降机构的控制速度不精确,设置的控制参数实际运行时无法达到的问题

Benefits of technology

[0026]本申请实施例中,从驱动机构启动之后每间隔固定时长就确定一次升降机构的当前速度并利用PID控制算法重新计算控制信号的PWM频率,最后基于PWM频率控制驱动机构进而实现准确地控制升降机构进行上升或下降运动。这样,加入PID控制可以实时获取动态升降速度,以重新计算控制信号的PWM频率并下发到硬件,从而可以更准确地控制升降机构,进而能够减少由于摩擦力等外部因素导致驱动机构的控制速度不精确所引起的一些问题。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116149164B_ABST
    Figure CN116149164B_ABST
Patent Text Reader

Abstract

Embodiments of the present application disclose a control method and device of a lifting mechanism, a computer device and a storage medium. The computer device comprises a processor, a driving mechanism and a lifting mechanism. In response to a driving mechanism starting instruction, the driving mechanism is started, and a control operation is performed at a preset time interval, comprising: determining a current speed of the lifting mechanism; determining a dynamic lifting speed of the lifting mechanism by performing PID control on an error of the current speed relative to an expected speed; wherein the expected speed is determined according to a predicted lifting distance and a preset lifting time length; determining a PWM frequency of a control signal output by the processor based on the dynamic lifting speed and characteristic parameters of the driving mechanism; and controlling the driving mechanism based on the PWM frequency, thereby driving the lifting mechanism to perform lifting and lowering movement.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to, but is not limited to, the field of computer equipment technology, and in particular to a control method, device, computer equipment, and storage medium for a lifting mechanism. Background Technology

[0002] Lifting mechanisms are used in computer devices such as smartphones, tablets, surveillance cameras, and pan-tilt units. Typically, lifting mechanisms operate at a fixed preset speed, thus limiting their ability to move quickly and with precise control. This imprecise control can lead to either the lifting mechanism exceeding its maximum position and stalling, or failing to reach its intended position and becoming unusable. Summary of the Invention

[0003] In view of this, embodiments of this application provide a control method, device, computer equipment, and storage medium for a lifting mechanism, which at least solves the problem that the control speed of the lifting mechanism is inaccurate due to external factors such as friction, and the set control parameters cannot be achieved in actual operation.

[0004] The technical solution of this application embodiment is implemented as follows:

[0005] In a first aspect, embodiments of this application provide a control method for a lifting mechanism, applied to a computer device, the computer device including a processor, a drive mechanism, and a lifting mechanism, wherein, in response to a drive mechanism start command, the drive mechanism is activated, and control operations are performed at preset time intervals, including:

[0006] The current speed of the lifting mechanism is determined; the dynamic lifting speed of the lifting mechanism is determined by PID control of the error between the current speed and the desired speed; wherein the desired speed is determined according to the predicted lifting distance and the preset lifting time; based on the dynamic lifting speed and the characteristic parameters of the drive mechanism, the PWM frequency of the control signal output by the processor is determined; based on the PWM frequency, the drive mechanism is controlled to drive the lifting mechanism to perform upward / downward movement.

[0007] In some embodiments, the lifting mechanism is magnetic, and the computer device further includes a Hall sensor. Determining the current speed of the lifting mechanism includes: determining the current distance of the lifting mechanism relative to a predetermined position based on the magnetic flux density of the Hall sensor and the corresponding Hall sensing characteristic parameters; and determining the current speed of the lifting mechanism based on the current distance of the lifting mechanism and the preset time interval.

[0008] In some embodiments, the computer device includes two Hall sensors, the two Hall sensors being spaced a fixed distance apart and lying on a line parallel to the running direction of the lifting mechanism. The method further includes: differentially analyzing the magnetic flux density of each of the two Hall sensors to obtain a corrected magnetic flux density; and determining the current distance of the lifting mechanism relative to the predetermined position based on the corrected magnetic flux density and the corresponding sensing characteristic parameters.

[0009] In some embodiments, determining the dynamic lifting speed of the lifting mechanism by performing PID control on the error between the current speed and the desired speed includes: determining the error between the current speed and the desired speed; differentiating and integrating the error according to preset differential coefficients and preset integral coefficients to obtain corresponding differential and integral results; and multiplying the sum of the error, the differential result, and the integral result by a preset proportional coefficient to obtain the dynamic lifting speed of the lifting mechanism.

[0010] In some embodiments, determining the dynamic lifting speed of the lifting mechanism by performing PID control on the error between the current speed and the desired speed includes: determining the error between the current speed and the desired speed; differentiating and integrating the error according to preset differential coefficients and preset integral coefficients to obtain corresponding differential and integral results; and multiplying the sum of the error, the differential result, and the integral result by a preset proportional coefficient to obtain the dynamic lifting speed of the lifting mechanism.

[0011] In some embodiments, the method further includes: acquiring a recorded aging stroke pattern table; the aging stroke pattern table is used to characterize the relationship between the number of strokes and the maximum single movement distance of the lifting mechanism; in response to receiving an upward command triggered through a human-machine interface, acquiring the current cumulative number of strokes from a specific position; and determining the predicted lifting distance of the lifting mechanism based on the current cumulative number of strokes and the aging stroke pattern table.

[0012] In some implementations, determining the predicted lifting distance of the lifting mechanism based on the current cumulative number of strokes and the aging stroke pattern table includes: if the current cumulative number of strokes falls between two discrete historical stroke counts in the aging stroke pattern table, determining the predicted lifting distance according to the following formula:

[0013]

[0014] Where Y is the maximum travel distance recorded in the aging stroke pattern table, D1 is the factory maximum distance of the lifting mechanism, and x r x represents the current cumulative number of trips. maxand x min These are the records in the aging process rule table and x r The two most recent historical trip times, y max and y min These are the records in the aging process record table and x max and x min The corresponding distance traveled.

[0015] In some embodiments, during the process of controlling the lifting mechanism to rise, the method further includes: if the lifting mechanism is detected to be in a state of obstructed rise, lowering the lifting mechanism by a preset step size or resetting the lifting mechanism to the lowest position and then continuing to rise; in response to detecting that the lifting mechanism has risen to the correct position, sending a stop command to the drive mechanism, and simultaneously incrementing the current cumulative stroke count and updating the saved current cumulative stroke count.

[0016] In some embodiments, the response to the drive mechanism start command further includes: obtaining the battery level of the system in the computer device; if the battery level is between a first value and a second value, activating the drive mechanism and notifying the system's battery monitoring subsystem not to update the battery status; if the second value is greater than the first value; and when the lifting mechanism rises to a first target position or falls to a second target position, deactivating the drive mechanism and notifying the system's battery monitoring subsystem to update the battery status.

[0017] In some embodiments, the method further includes: when the lifting mechanism descends to the second target position, shutting down the drive mechanism; determining the current distance between the second target position and the predetermined position; if the current distance is not zero, sending a reset command to the drive mechanism; the reset command is used to instruct the lifting mechanism to reset to the predetermined position.

[0018] In some embodiments, the system software architecture of the computer device includes a system application layer, an application framework layer, and a hardware abstraction layer. The control method for the lifting mechanism is implemented through the hardware abstraction layer. The method further includes: defining a state indicator set for the lifting mechanism through the hardware abstraction layer; the state indicator set includes at least the following states: rising, falling, rising complete, falling complete, rising blocked, and falling blocked; obtaining the state indicator set by calling the interface of the hardware abstraction layer through the application layer; and calling the interface of the application framework layer through the system application layer to control the human-computer interaction interface of the computer device to display animations and / or text prompts for each state in real time based on the state indicator set.

[0019] Secondly, embodiments of this application provide a control method for a lifting mechanism, applied to a computer device, the computer device including a processor, a drive mechanism, and a lifting mechanism, the device including:

[0020] The first determining module is used to determine the current speed of the lifting mechanism;

[0021] The second determining module is used to determine the dynamic lifting speed of the lifting mechanism by performing PID control on the error between the current speed and the desired speed; wherein the desired speed is determined according to the predicted lifting distance and the preset lifting time.

[0022] The third determining module is used to determine the PWM frequency of the control signal output by the processor based on the dynamic lifting speed and the characteristic parameters of the drive mechanism;

[0023] The control module is used to control the drive mechanism based on the PWM frequency, thereby driving the lifting mechanism to perform upward / downward movements.

[0024] Thirdly, embodiments of this application provide a computer device, including a processor, a drive mechanism, and a lifting mechanism; wherein the processor performs the steps of the method described in the first aspect above.

[0025] Fourthly, embodiments of this application provide a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements some or all of the steps in the method described in the first aspect above.

[0026] In this embodiment, after the drive mechanism is started, the current speed of the lifting mechanism is determined at fixed time intervals, and the PWM frequency of the control signal is recalculated using a PID control algorithm. Finally, the drive mechanism is controlled based on the PWM frequency to accurately control the lifting mechanism to move upward or downward. By incorporating PID control, the dynamic lifting speed can be obtained in real time to recalculate the PWM frequency of the control signal and send it to the hardware, thereby enabling more accurate control of the lifting mechanism and reducing problems caused by inaccurate control speed of the drive mechanism due to external factors such as friction.

[0027] It should be understood that the above general description and the following detailed description are merely exemplary and explanatory, and are not intended to limit the technical solutions of this disclosure. Attached Figure Description

[0028] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with this application and, together with the specification, serve to explain the technical solutions of this application.

[0029] Figure 1A schematic flowchart of an optional control method for a lifting mechanism provided in an embodiment of this application;

[0030] Figure 2 A schematic flowchart of an optional control method for a lifting mechanism provided in an embodiment of this application;

[0031] Figure 3 A schematic flowchart of an optional control method for a lifting mechanism provided in an embodiment of this application;

[0032] Figure 4 This application provides a system framework for a control method of a lifting mechanism.

[0033] Figure 5 A logic flowchart of a control method for a lifting mechanism provided in an embodiment of this application;

[0034] Figure 6 This application provides a schematic diagram of the composition of a control device for a lifting mechanism.

[0035] Figure 7 This is a schematic diagram of the hardware entity of a computer device provided in an embodiment of this application. Detailed Implementation

[0036] To make the objectives, technical solutions, and advantages of this application clearer, the technical solutions of this application are further described in detail below with reference to the accompanying drawings and embodiments. The described embodiments should not be regarded as limitations on this application. All other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0037] In the following description, references are made to “some embodiments,” which describe a subset of all possible embodiments. However, it is understood that “some embodiments” may be the same subset or different subsets of all possible embodiments and may be combined with each other without conflict.

[0038] The terms “first / second / third” are used merely to distinguish similar objects and do not represent a specific ordering of objects. It is understood that “first / second / third” may be interchanged in a specific order or sequence where permitted, so that the embodiments of this application described herein can be implemented in an order other than that illustrated or described herein.

[0039] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application pertains. The terminology used herein is for descriptive purposes only and is not intended to be limiting of this application.

[0040] This application provides a control method for a lifting mechanism, which can be executed by a processor of a computer device. The computer device can refer to a server, laptop, tablet, desktop computer, smart TV, set-top box, mobile device (e.g., mobile phone, portable video player, personal digital assistant, dedicated messaging device, portable gaming device), or other device with control capabilities. In this application embodiment, the computer device includes at least a processor, a drive mechanism, and a lifting mechanism. In some embodiments, the computer device is a mobile terminal, including a housing and a camera assembly; in some embodiments, the drive mechanism may include a motor and a control chip, fixed to the housing and electrically connected to the circuit board of the mobile terminal. During implementation, the processor sends a calculated PWM frequency to the control chip, which generates a motor control signal to drive the motor to rotate, thereby controlling the lifting mechanism to perform upward or downward movement. In some embodiments, the camera assembly is mounted on the lifting mechanism, allowing the camera to rise from the housing when needed and to fall back and be hidden inside the housing when not in use.

[0041] Figure 1 The following is a schematic diagram of an optional flow of the control method for the lifting mechanism provided in the embodiments of this application, such as... Figure 1 As shown, the method responds to a drive mechanism start command, turns on the drive mechanism, and performs control operations according to a preset time interval. That is, upon receiving the start command, the drive mechanism begins to operate, including both power-on and power-off states. Specifically, it includes the following steps S110 to S140:

[0042] Step S110: Determine the current speed of the lifting mechanism;

[0043] In some embodiments, the computer device further includes a pressure sensor to detect the current position and corresponding current speed of the lifting mechanism.

[0044] In some embodiments, the lifting mechanism is magnetic, and the computer device further includes a Hall sensor to detect the current position and corresponding current speed of the lifting mechanism: based on the magnetic flux density of the Hall sensor and the corresponding Hall sensing characteristic parameters, the current distance of the lifting mechanism relative to a predetermined position is determined; based on the current distance of the lifting mechanism and the preset time interval, the current speed of the lifting mechanism is determined.

[0045] Here, unlike the lifting mechanism which can move up and down, the Hall sensor is fixed on the motherboard. A magnetic component, such as a magnet, is provided on the side of the lifting mechanism opposite to the Hall sensor, so that the lifting mechanism is magnetic. The magnet moves as the lifting mechanism rises / falls, causing the Hall sensor and the magnet to interact with each other by moving at a distance, thereby obtaining the magnetic flux, i.e., magnetic flux density, at different positions.

[0046] The preset time interval is the sampling interval for acquiring magnetic flux density. For example, after the motor starts moving, the value of the Hall sensor is acquired every 100 milliseconds. In implementation, the magnetic flux density of each Hall sensor can be directly obtained through the Linux underlying file system. Then, by dividing the current distance by the preset time interval, i.e., the magnetic flux acquisition period, the current speed of the lifting mechanism can be obtained.

[0047] The Hall sensor characteristic parameters are preset values, which are statistically summarized from the variation of the magnetic flux density of the Hall sensor and the current distance of the lifting mechanism tested during the factory production process. This variation is also called the characteristic curve of the Hall sensor. The current distance of the lifting mechanism can be directly calculated through this characteristic curve.

[0048] In some embodiments, the computer device includes two Hall sensors, the two Hall sensors being spaced a fixed distance apart and their lines being parallel to the operating direction of the lifting mechanism. The method further includes: differentially analyzing the magnetic flux density of each of the two Hall sensors to obtain a corrected magnetic flux density; and determining the current distance of the lifting mechanism relative to the predetermined position based on the corrected magnetic flux density and the corresponding Hall sensing characteristic parameters.

[0049] Here, the magnetic flux m2 of the Hall sensor located at the bottom and the magnetic flux m1 of the Hall sensor located at the top are obtained by driving respectively. The corrected magnetic flux density m is determined by formula (7) m=k1m1+k2m2, where k1 and k2 are preset constants, which are summarized from a large number of tests of computer equipment in actual scenarios.

[0050] It should be noted that the Hall sensor characteristic parameters here were obtained by fitting detection data obtained from the operation of the lifting mechanism in the actual equipment using two Hall sensors and through a large number of experiments.

[0051] In the above embodiment, differential magnetic flux density is achieved using two Hall sensors located at the top and bottom of the lifting mechanism, which can correct for interference from external magnetic fields and thus improve the accuracy of speed control.

[0052] It is worth noting that if the camera was not lowered to its lowest position due to the previous abnormal shutdown, meaning the calculated current distance of the lifting mechanism is not the distance at the lowest position, then the camera will be automatically lowered to its lowest position before proceeding with subsequent control operations.

[0053] Step S120: Determine the dynamic lifting speed of the lifting mechanism by performing PID control on the error between the current speed and the desired speed;

[0054] Here, the desired speed is determined based on the predicted lifting distance and the preset lifting duration; the predicted lifting distance represents the theoretically possible distance the lifting mechanism can rise or fall, and the preset lifting duration is the expected total time for rising or falling. Since the lifting mechanism will be affected by aging during long-term use, extensive pre-decommissioning tests can be conducted to summarize the relationship between the number of lifting operations and the distance traveled from initial assembly to eventual decommissioning. Based on this relationship, the predicted lifting distance can then be predicted during use.

[0055] In industrial process control, PID (Proportional Integral Derivative) control refers to controlling the object by proportional, integral, and derivative measures of the error generated by comparing the real-time data of the controlled object with the given value. In this embodiment, proportional, integral, and derivative control is applied to the error between the current speed and the desired speed of the lifting mechanism to achieve precise control of the lifting mechanism.

[0056] Step S130: Based on the dynamic lifting speed and the characteristic parameters of the drive mechanism, determine the PWM frequency of the control signal output by the processor;

[0057] Here, the PWM frequency refers to the number of times the signal transitions from a high level to a low level and back to a high level within one second. The characteristic parameters of the drive mechanism need to be calculated based on the characteristics of the motor and motor control chip in the actual project. Therefore, multiplying the calculated dynamic lifting speed of the lifting mechanism by the characteristic parameters of the drive mechanism yields the PWM frequency of the control signal.

[0058] Step S140: Based on the PWM frequency, control the drive mechanism to drive the lifting mechanism to perform upward / downward movement.

[0059] Here, the drive mechanism may include a motor and a control chip. The processor sends the calculated PWM frequency to the control chip, which generates a motor control signal to drive the motor to rotate, thereby controlling the lifting mechanism to perform upward or downward movement.

[0060] In this embodiment, after the drive mechanism is started, the current speed of the lifting mechanism is determined at fixed time intervals, and the PWM frequency of the control signal is recalculated using a PID control algorithm. Finally, the drive mechanism is controlled based on the PWM frequency to accurately control the lifting mechanism to move upward or downward. In this way, by adding PID control, the dynamic lifting speed can be obtained in real time to recalculate the PWM frequency of the control signal and send it to the drive mechanism, thereby enabling more accurate control of the lifting mechanism and reducing problems caused by inaccurate control speed of the drive mechanism due to external factors such as friction.

[0061] In some embodiments, the response to the drive mechanism start command may further include the following steps S111 to S113:

[0062] Step S111: Obtain the battery level of the system in the computer device;

[0063] Step S112: When the battery level is between the first and second values, start the drive mechanism normally and notify the battery monitoring subsystem of the system not to update the battery status.

[0064] Here, the battery status includes information such as battery charge and voltage. The second value is greater than the first value, which is usually a set empirical value. For example, the first value and the second value are 7% and 10% respectively. If the system battery charge is less than the first value, starting the drive mechanism will cause an abnormal shutdown. At this time, no operation will be performed.

[0065] In some implementations, when the battery level is between a first and a second value, the drive mechanism is started normally, and the battery monitoring subsystem in the device is notified not to update the battery status, for example, by setting a low battery flag. Subsequently, it is only necessary to check if the flag is set to trigger a message notification to the system not to update the battery status, thus preventing the drive mechanism from pulling down the battery voltage and causing shutdown.

[0066] Step S113: When the lifting mechanism rises to the first target position or falls to the second target position, the drive mechanism is turned off, and the battery monitoring subsystem of the system is notified to update the status of the battery.

[0067] Here, the drive mechanism is turned off when the lifting mechanism is in position. At this time, rising to the first target position means rising to stop, and falling to the second target position means falling to stop.

[0068] In the above embodiments, for the case of low battery operation of the drive mechanism, the battery state is not updated when the battery level is within a preset range, to prevent the drive mechanism from pulling down the battery voltage and causing shutdown, thereby ensuring the stability of the system.

[0069] In some embodiments, the method further includes: shutting down the drive mechanism when the lifting mechanism descends to a second target position; determining the current distance between the second target position and a predetermined position; and sending a reset command to the drive mechanism if the current distance is not zero; the reset command instructing the lifting mechanism to reset to the predetermined position. Thus, during the shutdown process of the drive mechanism, a reset command is sent to the drive mechanism in response to the determined current distance of the lifting mechanism not being at the lowest position, thereby ensuring the normal operation of the lifting mechanism in the next operation.

[0070] In some embodiments, during the process of controlling the lifting mechanism to rise, the method further includes the following steps S160 to S170:

[0071] Step S160: If the lifting mechanism is detected to be in a state of obstruction during ascent, the lifting mechanism is lowered by a preset step length or the lifting mechanism is reset to the lowest position before continuing to rise.

[0072] Here, the obstructed upward movement indicates that the drive mechanism is stalled or there is another abnormality. In this case, the control parameters set for the drive mechanism cannot be achieved during actual operation, and obstruction handling is required.

[0073] In some implementations, it is first determined whether the distance between the current position of the lifting mechanism and the bottom position is greater than a preset step length. If the distance is less than the preset step length, the mechanism will start rising again from the bottom if it has reached the bottom without moving the preset step length.

[0074] In some implementations, if the lifting mechanism is detected to be in an obstructed state again, the lifting mechanism is reset to the lowest position and then raised again.

[0075] Here, if the upward movement is still blocked after the preset descent step length continues, the mechanism will reset and descend to the lowest position, then control the lifting mechanism to resume the upward movement from the bottom.

[0076] In some implementations, if the current of the motor in the drive mechanism is detected to be greater than the normal operating value, it is determined that the lifting mechanism is in a state of obstructed ascent. In some implementations, if the difference between the magnetic flux density of two consecutive Hall sensors is not significantly different for N consecutive times and is less than the magnetic flux at the maximum position, it is determined that the lifting mechanism is in a state of obstructed ascent, where N can be greater than or equal to 3.

[0077] In step S170, in response to detecting that the lifting mechanism has risen to the correct position, a stop command is sent to the drive mechanism, and the current cumulative stroke count is incremented and the saved current cumulative stroke count is updated.

[0078] Here, when the current distance of the lifting mechanism is calculated to reach the maximum moving distance through magnetic flux density, it indicates that the lifting mechanism has reached the upper limit. At this time, a stop command can be sent to the hardware to complete the current lifting process, and the current cumulative number of strokes is recorded accordingly.

[0079] The above embodiments define the obstruction handling process of the lifting mechanism during the ascent, thereby improving the stability of the drive mechanism control. Simultaneously, after reaching the final position, the current stroke is recorded, and the current cumulative stroke count is added to the corresponding partition for subsequent statistical analysis of aging stroke patterns and aging prediction.

[0080] In some embodiments, the system software architecture of the computer device includes a system application layer, an application framework layer, and a hardware abstraction layer. The control method for the lifting mechanism is implemented through the hardware abstraction layer. The method further includes: defining a state indicator set for the lifting mechanism through the hardware abstraction layer; the state indicator set includes at least the following states: rising, falling, rising completed, falling completed, rising blocked, and falling blocked; obtaining the state indicator set by calling the interface of the hardware abstraction layer through the application layer; and calling the interface of the application framework layer through the system application layer to control the human-computer interaction interface of the computer device to display animations and / or text prompts for each state in real time based on the state indicator set.

[0081] In this application embodiment, most of the control logic is implemented in the hardware abstraction layer. At the same time, a set of status indicators for the lifting mechanism is defined: rising, falling, rising completed, falling completed, rising blocked, falling blocked, etc. This information is transmitted to the upper application framework layer in real time through the Interface Description Language (HIDL) framework, and then obtained by the application. The application will display different animations and prompts according to different status indicators.

[0082] based on Figure 1 , Figure 2 The following is a schematic diagram of an optional flow of the control method for the lifting mechanism provided in the embodiments of this application, such as... Figure 2 As shown, step S120, "determining the dynamic lifting speed of the lifting mechanism by performing PID control on the error between the current speed and the desired speed," includes the following steps S210 to S230:

[0083] Step S210: Determine the error of the current speed relative to the desired speed;

[0084] Here, the desired speed is determined based on the predicted lifting distance and the preset lifting duration, where the preset lifting duration is the desired total time for rising or falling, and the predicted lifting distance is the movement distance of the lifting mechanism summarized through a large number of tests. The embodiments of this application aim to use the predicted lifting distance to control the lifting mechanism's lifting.

[0085] Step S220: Differentiate and integrate the error according to the preset differential coefficients and preset integral coefficients to obtain the corresponding differential and integral results;

[0086] Here, the preset differential coefficients and preset integral coefficients need to be calculated based on the actual structure of the project and the selection of components, and require extensive testing for correction.

[0087] The integral coefficient is used for integral adjustment of the error, aiming to eliminate static error and increase the system's error-free performance. By integrating the error, the magnitude of the error over a period of time can be obtained, thereby adjusting the input. As long as the deviation exists, integral adjustment will continue to take effect. The differential coefficient is used to predict the trend of the error, making predictive adjustments to the output in advance. Differential adjustment involves taking the derivative of the error with respect to time to obtain the trend of error change.

[0088] Step S230: Multiply the sum of the error, the differential result, and the integral result by a preset scaling factor to obtain the dynamic lifting speed of the lifting mechanism.

[0089] Here, the preset proportional coefficient needs to be calculated based on the actual project structure and component selection, and requires extensive testing and correction. During implementation, any error that occurs will be immediately adjusted, and the magnitude of the error is proportional to the output.

[0090] It should be noted that external factors such as friction can cause inaccurate speed control of the drive mechanism, making it impossible to achieve the set control parameters during actual operation. Therefore, this embodiment uses PID control to calculate the current speed based on the magnetic flux density to obtain the dynamic lifting speed, thereby controlling the lifting mechanism more accurately.

[0091] based on Figure 1 , Figure 3 The following is a schematic diagram of an optional flow of the control method for the lifting mechanism provided in the embodiments of this application, such as... Figure 3 As shown, the method further includes the following steps S310 to S330:

[0092] Step S310: Obtain the recorded aging process pattern table.

[0093] Here, the aging stroke pattern table is used to characterize the relationship between the number of strokes and the maximum single movement distance of the lifting mechanism.

[0094] In the early stages of this application, extensive scrapping tests were conducted. Various parameters of the lifting mechanism, such as the number of lifting operations, the actual total lifting distance, and the rate of change of the magnetic flux at the highest point, were statistically analyzed from the initial assembly to the scrapping process. The change patterns were summarized, fitted into curves, and then discretized into an aging stroke pattern table and integrated into the software. This data is saved for future aging prediction.

[0095] Step S320: In response to receiving an upward command triggered by the user through the human-computer interaction interface of the computer device, obtain the current cumulative number of trips from a specific location;

[0096] Here, the specific location refers to a partition that cannot be reset during Over-the-Air (OTA) upgrades, ensuring data integrity. When a user triggers an upgrade via a human-computer interaction interface (UI), the system retrieves the currently accumulated number of trips from this specific partition.

[0097] Step S330: Based on the current cumulative number of strokes and the aging stroke pattern table, determine the predicted lifting distance of the lifting mechanism.

[0098] Here, based on the current cumulative number of trips, a suitable trip is selected from the aging trip pattern table as the predicted rise / fall distance. In some embodiments, if the current cumulative number of trips falls between two discrete historical trip counts in the aging trip pattern table, the predicted rise / fall distance is determined by linear calculation; in some embodiments, the predicted rise / fall distance is determined according to the following formula (1):

[0099]

[0100] Where Y is the maximum travel distance recorded in the aging stroke pattern table, D1 is the factory maximum distance of the lifting mechanism, and x r x represents the current cumulative number of trips. max and x min These are the records in the aging process rule table and x r The two most recent historical trip times, y max and y min These are the records in the aging process record table and x max and x min The corresponding distance traveled.

[0101] In other words, assuming the horizontal axis of the aging travel pattern table represents the number of historical travels and the vertical axis represents the maximum single travel distance, x max and x minIt is discrete data and x r The two most recent values, y max and y min It is x max and x min The corresponding ordinate value.

[0102] For example, the current cumulative number of trips x r The value is 1100, and the two closest values ​​found in the aging schedule are (1000, 17) and (1500, 15). Therefore, y can be calculated using the formula (1) above. r =((17-15)*(1100-1000) / (1500-1000)+15)*D1 / Y=15.4*D1 / Y.

[0103] It should be noted that during factory production, a step is required to test the variation between the magnetic flux density m and distance d of the Hall sensor for each device, i.e., the Hall sensor characteristic curve, as well as the magnetic flux M0 at the lowest position and the magnetic flux M1 at the maximum position, thereby calculating the minimum and maximum factory distances D0 and D1. In other words, the maximum factory distance D1 of the lifting mechanism is determined based on the calibrated Hall sensor characteristic curve and the magnetic flux M1 at the maximum position.

[0104] This application addresses the issue of software parameter mismatch caused by the aging of the lifting mechanism by incorporating an aging prediction algorithm, resulting in greater accuracy over extended use. Thanks to the aging prediction mechanism, redundant calibration modes are no longer needed, simplifying the user experience.

[0105] The control method of the above-mentioned lifting mechanism will be described below with reference to a specific embodiment. However, it should be noted that this specific embodiment is only for better illustration of this application and does not constitute an improper limitation of this application.

[0106] This application uses a tablet computer as an example, and the driving mechanism includes a motor and a control chip as an example for illustration. Figure 4 This is a schematic diagram of the control system of a lifting mechanism provided in an embodiment of this application, as shown below. Figure 4 The control system shown includes: a flat panel 41, a motor 42, a lifting mechanism 43, a transmission mechanism 44, and a Hall sensor 45; wherein a camera 431 is provided on the lifting mechanism 43, and the lifting mechanism 43 can move up and down relative to the flat panel 41. All other components are fixed on the flat panel 41. Two Hall sensors 45 are spaced a certain distance apart, and the line where the two Hall sensors 45 are located is parallel to the up and down movement direction of the lifting mechanism 43, which is used to sense the magnetic field of the magnet 432 provided on the bottom of the lifting mechanism 43. Figure 4The image shows the lifting mechanism 43 in its lowest position, capable of moving linearly upwards until the magnet 432 and the top Hall sensor 45 are at the same horizontal level, while the camera 431 moves into place. In other embodiments, only one Hall sensor 45 may be included. In some other embodiments, a pressure sensor may be used instead of a Hall sensor, in which case the distance calculation and hardware will change accordingly. It should be noted that since the control chip in the drive mechanism is located on the motherboard, Figure 4 The control chip is not shown in the image.

[0107] This application embodiment employs Android's pass-through Binder-based HIDL. Using this framework allows for more stable and faster data transmission between the framework layer (application framework layer) and the HAL layer (Hardware Abstraction Layer), with good portability. In implementation, most control logic can be implemented in the HAL layer, encapsulated into a standard, traditional HAL module, and exposed to HIDL through an interface, thus providing access for the application framework layer. The application layer uses AIDL (Android Interface Definition Language) to call the application framework layer's interface to control the lifting mechanism. This architecture ensures stable communication while maintaining fast data transmission. The HAL layer defines a set of status indicators: ascending, descending, ascending complete, descending complete, ascending blocked, descending blocked, and transmits this information in real-time through the HIDL framework to the upper layer, where it is obtained by the application. The application displays different animations and prompts based on different status indicators.

[0108] In some other embodiments, when the Android system is not used, the software architecture of the control logic is encapsulated into a dynamic library, and then the UI application calls this dynamic library to implement various controls.

[0109] Due to external factors such as friction, the motor speed control is inaccurate, and the set control parameters cannot be achieved in actual operation. To control the lifting mechanism more accurately, a PID algorithm is added. The PID and a series of calculations can be run in the platform's built-in DSP, reducing the CPU load.

[0110] Figure 5 The logic flowchart of the control method for the lifting mechanism provided in the embodiments of this application is as follows: Figure 5 As shown, the method for the boot process includes the following steps:

[0111] Step S501: Obtain the magnetic flux density of the Hall sensor.

[0112] Here, the magnetic flux density of the Hall sensor can be directly obtained through the Linux underlying file system.

[0113] Step S502: Determine the current distance of the lifting mechanism.

[0114] Here, the current distance of the lifting mechanism can be directly calculated based on the preset characteristic curve of the Hall sensor. For example, the current distance d of the lifting mechanism can be calculated using the following formula (2):

[0115]

[0116] Where m is the magnetic flux density, K B and K C These are Hall effect sensor characteristic parameters, which need to be statistically summarized based on the actual equipment environment and are preset values.

[0117] It is worth noting that the above process of determining the current distance of the lifting mechanism is illustrated using a single Hall sensor as an example. For cases with two Hall sensors, they can be set at positions level with the highest and lowest points in the direction of the lifting mechanism's movement. In this case, the magnetic flux m1 of the Hall sensor at the bottom and m2 of the Hall sensor at the top are obtained by driving the sensor. The corrected magnetic flux density m is then determined using formula (7): m = k1m1 + k2m2, where k1 and k2 are preset constants derived from extensive testing of computer equipment in real-world scenarios. The corrected magnetic flux density m is then substituted into formula (2) to calculate the current distance of the lifting mechanism relative to the lowest position. It should be noted that the Hall sensor characteristic parameter K is used here. B and K C It was obtained by fitting detection data based on the operation process of the lifting mechanism in the actual equipment using two Hall sensors and a large number of experiments.

[0118] During implementation, if the camera was not lowered to its lowest position due to the previous abnormal shutdown, meaning the current distance of the lifting mechanism is greater than the lowest position, then the camera will be automatically lowered to its lowest position.

[0119] Step S503: Determine whether the lifting mechanism is at its lowest position.

[0120] Here, step S504 is executed if the lifting mechanism is in the lowest position; otherwise, step S505 is executed.

[0121] Step S504: Wait for the UI to be triggered.

[0122] Here, users can trigger corresponding controls through the UI interface to make the lifting mechanism rise or fall.

[0123] Step S505: Obtain the current system battery level.

[0124] Here, the current battery level is obtained every time the motor is started (whether it is rotating forward or backward).

[0125] Step S506: Determine if the battery level is below 7%.

[0126] Here, starting the motor when the battery level is below 7% will cause an abnormal shutdown. In this case, wait for the UI to trigger and notify the application that the battery is low.

[0127] Step S507: Determine whether the battery level is between 7% and 10%.

[0128] Here, if the judgment result is yes, step S508 is executed; otherwise, step S509 is executed.

[0129] Step S508: Instruct the system not to update voltage and power, and simultaneously set the low power flag.

[0130] Here, when the battery level is between 7% and 10%, the motor can start normally, and the Android system's battery monitoring subsystem is notified not to update the battery level and voltage. This prevents the motor from lowering the battery voltage and causing shutdown during operation. In implementation, a low-battery flag can be set, which can be queried later to determine whether to notify the system to update the voltage and battery level. When the movement reaches its destination, the motor is turned off, and the Android system's battery monitoring subsystem is notified to refresh and update the battery level and voltage.

[0131] Step S509: Obtain the magnetic flux density of the Hall sensor.

[0132] The specific implementation process here is the same as step S501 above, and can be found in the above description.

[0133] Step S510: Determine the current distance of the lifting mechanism.

[0134] The specific implementation process here is the same as step S502 above, and can be found in the above description.

[0135] Step S511: Calculate the PWM frequency using a PID control algorithm based on the current distance.

[0136] Here, PWM frequency refers to the number of times the signal goes from high level to low level and back to high level in 1 second (i.e., one cycle), that is, how many cycles of PWM are there in one second, and the unit is Hz (Hertz).

[0137] In order to control the lifting structure more accurately, PID control is added to the embodiments of this application. The specific process is as follows: (3) to (6):

[0138] f = K A v1 formula (3);

[0139] Where f is the final calculated PWM frequency, and K A It needs to be calculated based on the characteristics of the motor and motor control chip in the actual project. v1 is the acceleration and deceleration speed, which can be obtained by the following formula (4):

[0140]

[0141] Among them, v t For dynamic speed, e(t) represents the difference between the desired speed v2 and the current speed v3 of the lifting mechanism, and K P K I K D These are the linear coefficient, integral coefficient, and differential coefficient, respectively. The desired velocity v2 and the current velocity v3 can be determined according to formulas (5) and (6), respectively:

[0142]

[0143]

[0144] Where T is a preset fixed value, which is the expected total rising time or total falling time; D is the predicted travel distance, which is affected by aging; t is the magnetic flux acquisition cycle, which is a fixed preset value in the software; and d is the current distance of the lifting mechanism calculated according to step S501 above.

[0145] In step S512, frequency parameters are sent to the motor control chip to control the lifting mechanism to start rising.

[0146] Here, the magnetic flux density of the Hall sensor is acquired every 100 milliseconds after the motor starts moving. The frequency is recalculated based on the magnetic flux density and sent to the hardware to control the lifting mechanism to rise (the same applies to the descent process).

[0147] Step S513: Determine whether the lifting mechanism is obstructed during its movement.

[0148] Here, if the process is blocked, step S514 is executed; otherwise, step S515 is executed.

[0149] In some implementations, the magnetic flux density is subtracted from the previously obtained value each time it is acquired. If the difference is greater than a threshold for three consecutive times, it is determined to be blocked.

[0150] In some implementations, since the current is greater during stall than during normal operation, the current detection is essentially a negative feedback loop. Therefore, by detecting whether the motor's current is greater than the current during normal operation, an abnormal current detection indicates a blockage.

[0151] Step S514: Move the preset step length in the opposite direction and continuously determine whether a specific position has been reached.

[0152] Here, for the upward movement of the lifting mechanism, with the specific position being the bottom, it first descends by a preset step size. If it reaches the bottom before reaching the preset step size, it stops and then rises again. If the upward movement is still obstructed, it resets and descends to the bottom. After reaching the bottom or the preset position, step S511 is executed to recalculate the PWM frequency at the corresponding position. Similarly, for the downward movement of the lifting mechanism, with the specific position being the top, it rises by a preset step size and determines whether it has reached the top.

[0153] Step S515: Continue to raise / lower the lifting mechanism into position.

[0154] Here, for example, in the case of rising, after the Hall sensor above detects that the lifting mechanism has risen to the correct position, it sends a stop command to the hardware and increases the historical travel count to the corresponding partition.

[0155] Step S516: Determine whether the low power flag is set.

[0156] Here, if the low-power flag is not set, step S517 is executed; otherwise, step S518 is executed directly.

[0157] Step S517: Notify the system to restore and update voltage and power.

[0158] Step S518: Wait for the UI to be triggered.

[0159] The shutdown process only starts from step S504; steps S501 to S503 are not required. Similar to the power-on process, the descent process is the same as the as the ascent process, except that the "ascend" action in the corresponding steps is replaced with "descend," and "ascend to position" is replaced with "descend to position." During shutdown, the magnetic flux density of the Hall sensor is acquired, and the position of the lifting mechanism is calculated. If the lifting mechanism is not at the bottom position, a "descend to position" command is executed.

[0160] To address the software parameter mismatch issue caused by the aging of the lifting structure during long-term use, this application incorporates an aging prediction algorithm. Specifically, after extensive pre-use testing, the algorithm statistically analyzes the changes in various parameters of the lifting mechanism from its initial assembly to its eventual scrapping. These changes are then summarized, fitted into curves, and discretized into an aging stroke pattern table. During use, the ideal stroke is obtained by looking up the table based on the number of strokes, the current stroke is predicted, and the lifting mechanism is controlled to lift and lower using the predicted stroke.

[0161] The embodiments of this application are based on the following preset process: 1) After a large number of tests, the relationship between the number of strokes and the maximum single movement distance is summarized. This data is saved for aging prediction and will generate an aging stroke pattern table, which is then integrated into the software; 2) During the factory production process, there must be a step to test the relationship between the magnetic flux density m and distance d of the Hall sensor of each device, as well as the magnetic flux M0 at the lowest position and the magnetic flux M1 at the maximum position, so as to use the above formula (1) to calculate the minimum distance D0 and the maximum distance D1 at the time of leaving the factory.

[0162] When a user triggers an ascent via the UI, the current cumulative trip count is retrieved from a specific location. This specific location is a partition that cannot be reset during an OTA upgrade, ensuring that data is not lost. Based on the current cumulative trip count and combined with the aging trip pattern table, a suitable trip is selected. This pattern table represents discrete data. When the current cumulative trip count falls between two discrete data points, a value is calculated linearly, for example, the predicted ascent and descent distance is fitted using the formula (1) above. The suitable predicted ascent and descent distance y is calculated. r After (equivalent to the predicted travel distance D above), the predicted lifting distance is substituted into the formula (5) of the PID algorithm to obtain the PWM output frequency that needs to be set, and the frequency is set in the hardware to control the lifting mechanism to start moving.

[0163] The embodiments of this application can precisely control the motor movement, reduce stalling, and extend the motor life; in addition, the aging process incorporates a predictive mechanism, which is more accurate for long-term use. Due to the aging prediction mechanism, there is no need for extra calibration modes, making the user experience less cumbersome, while also reducing stalling.

[0164] Based on the foregoing embodiments, this application provides a control device for a lifting mechanism. The device includes various modules, sub-modules, and units included in each module, which can be implemented by a processor in a computer device; of course, it can also be implemented by specific logic circuits. In the implementation process, the processor can be a central processing unit (CPU), a microprocessor unit (MPU), a digital signal processor (DSP), or a field programmable gate array (FPGA), etc.

[0165] Figure 6 This is a schematic diagram of the composition structure of a control device for a lifting mechanism provided in an embodiment of this application, as shown below. Figure 6As shown, the control device 600 includes: a first determining module 610, a second determining module 620, a third determining module 630, and a control module 640, wherein:

[0166] The first determining module 610 is used to determine the current speed of the lifting mechanism;

[0167] The second determining module 620 is used to determine the dynamic lifting speed of the lifting mechanism by performing PID control on the error between the current speed and the desired speed; wherein the desired speed is determined according to the predicted lifting distance and the preset lifting time.

[0168] The third determining module 630 is used to determine the PWM frequency of the control signal output by the processor based on the dynamic lifting speed and the characteristic parameters of the drive mechanism.

[0169] The control module 640 is used to control the drive mechanism based on the PWM frequency, thereby driving the lifting mechanism to perform upward / downward movement.

[0170] In some possible embodiments, the lifting mechanism is magnetic, and the computer device further includes a Hall sensor. The first determining module 620 includes: a first determining unit, used to obtain the current distance of the lifting mechanism based on the magnetic flux density of the Hall sensor and the corresponding Hall sensing characteristic parameters; and a third determining unit, used to determine the corresponding current speed based on the current distance of the lifting mechanism relative to a predetermined position and the preset time interval.

[0171] In some possible embodiments, the computer device includes two Hall sensors, which are spaced at a fixed distance and lie on a line parallel to the running direction of the lifting mechanism. The first determining module further includes a second determining unit, which is used to perform differential analysis on the magnetic flux density of each of the two Hall sensors to obtain a corrected magnetic flux density; and based on the corrected magnetic flux density and the corresponding Hall sensing characteristic parameters, to determine the current distance of the lifting mechanism relative to the predetermined position.

[0172] In some possible embodiments, the second determining module 630 includes: a fourth determining unit, used to determine the error of the current speed relative to the desired speed; a processing unit, used to differentiate and integrate the error according to preset differential coefficients and preset integral coefficients, respectively, to obtain corresponding differential results and integral results; and a fifth determining unit, used to multiply the sum of the error, the differential result and the integral result by a preset proportional coefficient to obtain the dynamic lifting speed of the lifting mechanism.

[0173] In some possible embodiments, the device further includes: a second acquisition module, configured to acquire a recorded aging stroke pattern table; the aging stroke pattern table is used to characterize the relationship between the number of strokes and the maximum single movement distance of the lifting mechanism; a third acquisition module, configured to acquire the current cumulative number of strokes from a specific position in response to receiving a lifting command triggered through a human-machine interface; and a fourth determination module, configured to determine the predicted lifting distance of the lifting mechanism based on the current cumulative number of strokes and the aging stroke pattern table.

[0174] In some possible embodiments, the fourth determining module is further configured to determine the predicted rise / fall distance according to the following formula if the current cumulative number of trips falls between two discrete historical trip counts in the aging trip pattern table:

[0175]

[0176] Where Y is the maximum travel distance recorded in the aging stroke pattern table, D1 is the factory maximum distance of the lifting mechanism, and x r x represents the current cumulative number of trips. max and x min These are the records in the aging process rule table and x r The two most recent historical trip times, y max and y min These are the records in the aging process record table and x max and x min The corresponding distance traveled.

[0177] In some possible embodiments, the device further includes: a descent and reset module, configured to, during the process of controlling the lifting mechanism to rise, if the lifting mechanism is detected to be in a state of obstruction during rise, descent of the lifting mechanism by a preset step size or reset of the lifting mechanism to the lowest position and then continue to rise; and a sending module, configured to, in response to detecting that the lifting mechanism has reached its rising position, send a stop command to the drive mechanism, and simultaneously increment the current cumulative stroke count and update the saved current cumulative stroke count.

[0178] In some possible embodiments, the device further includes a first acquisition module, configured to acquire the battery level of the system in the computer device after the motor is powered on; if the battery level is between a first value and a second value, start the motor normally and simultaneously notify the battery monitoring subsystem of the system not to update the battery status; if the second value is greater than the first value; when the lifting mechanism rises to a first target position or falls to a second target position, shut down the drive mechanism and notify the battery monitoring subsystem of the system to update the battery status.

[0179] In some possible embodiments, the device further includes a shut-off module for shutting off the drive mechanism when the lifting mechanism descends to the second target position; a fifth determining module for determining the current distance between the second target position and the predetermined position; and a reset module for sending a reset command to the drive mechanism if the current distance is not zero; the reset command is used to instruct the lifting mechanism to reset to the predetermined position.

[0180] In some possible embodiments, the system software architecture of the computer device includes a system application layer, an application framework layer, and a hardware abstraction layer. The control method for the lifting mechanism is implemented through the hardware abstraction layer. The device further includes a processing module for defining a set of status indicators for the lifting mechanism through the hardware abstraction layer. The set of status indicators includes at least the following states: rising, falling, rising complete, falling complete, rising blocked, and falling blocked. A fourth acquisition module is used to obtain the set of status indicators by calling the interface of the hardware abstraction layer through the application layer. A display module is used to call the interface of the application framework layer through the system application layer to control the human-computer interaction interface of the computer device to display animations and / or text prompts for each of the states in real time based on the set of status indicators.

[0181] The descriptions of the apparatus embodiments above are similar to those of the method embodiments above, and have similar beneficial effects. In some embodiments, the functions or modules included in the apparatus provided in this disclosure can be used to perform the methods described in the method embodiments above. For technical details not disclosed in the apparatus embodiments of this application, please refer to the descriptions of the method embodiments of this application for understanding.

[0182] It should be noted that, in the embodiments of this application, if the control method of the lifting mechanism described above is implemented in the form of a software functional module and sold or used as an independent product, it can also be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the embodiments of this application, or the part that contributes to the related technology, can be embodied in the form of a software product. This 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 methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, mobile hard drives, read-only memory (ROM), magnetic disks, or optical disks. Thus, the embodiments of this application are not limited to any specific hardware, software, or firmware, or any combination of hardware, software, and firmware.

[0183] This application provides a computer device including a memory and a processor. The memory stores a computer program that can run on the processor. When the processor executes the program, it implements some or all of the steps in the above-described method.

[0184] This application provides a computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements some or all of the steps in the above-described method. The computer-readable storage medium can be transient or non-transient.

[0185] This application provides a computer program including computer-readable code, wherein when the computer-readable code is executed in a computer device, a processor in the computer device performs some or all of the steps in the above-described method.

[0186] This application provides a computer program product, which includes a non-transitory computer-readable storage medium storing a computer program. When the computer program is read and executed by a computer, it implements some or all of the steps in the above-described method. This computer program product can be implemented specifically through hardware, software, or a combination thereof. In some embodiments, the computer program product is specifically embodied as a computer storage medium; in other embodiments, the computer program product is specifically embodied as a software product, such as a software development kit (SDK), etc.

[0187] It should be noted that the descriptions of the various embodiments above tend to emphasize the differences between them, while their similarities or commonalities can be referred to interchangeably. The descriptions of the above embodiments of the device, storage medium, computer program, and computer program product are similar to the descriptions of the above method embodiments and have similar beneficial effects. For technical details not disclosed in the embodiments of the device, storage medium, computer program, and computer program product of this application, please refer to the descriptions of the method embodiments of this application for understanding.

[0188] It should be noted that, Figure 7 This is a schematic diagram of a hardware entity of a computer device in an embodiment of this application, such as... Figure 7As shown, the hardware entity of the computer device 700 includes a drive mechanism 710, a lifting mechanism 720, and a processor 730. The processor 730 performs the steps described in the above method embodiment: in response to a drive mechanism start command, it activates the drive mechanism and performs control operations at preset time intervals, including: determining the current speed of the lifting mechanism; determining the dynamic lifting speed of the lifting mechanism by performing PID control on the error between the current speed and the desired speed; wherein the desired speed is determined based on a predicted lifting distance and a preset lifting duration; determining the PWM frequency of the control signal output by the processor based on the dynamic lifting speed and the characteristic parameters of the drive mechanism; and controlling the drive mechanism based on the PWM frequency to drive the lifting mechanism to perform upward / downward movement.

[0189] In some embodiments, the drive mechanism 710 includes a motor and a control chip, which generates a motor control signal based on a PWM frequency calculated by the processor 740, drives the motor to rotate, and then converts it into the rising / falling motion of the lifting mechanism 720.

[0190] In some implementations, the computer device may refer to a server, laptop computer, tablet computer, desktop computer, smart TV, set-top box, mobile device (e.g., mobile phone, portable video player, personal digital assistant, dedicated messaging device, portable gaming device), or other device with motor control capabilities.

[0191] In some embodiments, the lifting mechanism is magnetic, for example, a magnetic element such as a magnet is provided on one side of the lifting mechanism, and the computer device includes a Hall sensor, which generates magnetic flux by means of the relative motion between the Hall sensor and the magnet, and then uses the magnetic flux density to determine the current distance and current speed of the lifting mechanism from a specific position.

[0192] In some embodiments, the computer device includes two Hall sensors spaced at a fixed distance and positioned on a line parallel to the operating direction of the lifting mechanism. In practice, the magnetic flux density of each of the two Hall sensors is differentially analyzed to correct for interference from external magnetic fields.

[0193] In some embodiments, the lifting mechanism 720 is also equipped with a camera, which can be raised from the computer device body through the lifting mechanism 700 when needed, and hidden inside the computer device body when not in use.

[0194] In some embodiments, a magnet is also provided on one side of the lifting mechanism 720. The lifting mechanism 720 drives the camera to move up or down. Whether the camera has moved up or down to the correct position is mainly achieved by the magnet and the Hall sensor.

[0195] It should be understood that the phrase "one embodiment" or "an embodiment" throughout the specification means that a specific feature, structure, or characteristic related to the embodiment is included in at least one embodiment of this application. Therefore, "in one embodiment" or "in an embodiment" appearing throughout the specification does not necessarily refer to the same embodiment. Furthermore, these specific features, structures, or characteristics can be combined in any suitable manner in one or more embodiments. It should be understood that in the various embodiments of this application, the sequence numbers of the above steps / processes do not imply a sequential order of execution; the execution order of each step / process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this application. The sequence numbers of the above embodiments of this application are merely descriptive and do not represent the superiority or inferiority of the embodiments.

[0196] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element.

[0197] In the several embodiments provided in this application, it should be understood that the disclosed devices and methods can be implemented in other ways. The device embodiments described above are merely illustrative. For example, the division of units is only a logical functional division, and in actual implementation, there may be other division methods, such as: multiple units or components can be combined, or integrated into another system, or some features can be ignored or not executed. In addition, the coupling, direct coupling, or communication connection between the various components shown or discussed can be through some interfaces, and the indirect coupling or communication connection between devices or units can be electrical, mechanical, or other forms.

[0198] The units described above as separate components may or may not be physically separate. The components shown as units may or may not be physical units. They may be located in one place or distributed across multiple network units. Some or all of the units may be selected to achieve the purpose of this embodiment according to actual needs.

[0199] In addition, each functional unit in the various embodiments of this application can be integrated into one processing unit, or each unit can be a separate unit, or two or more units can be integrated into one unit; the integrated unit can be implemented in hardware or in the form of hardware plus software functional units.

[0200] Those skilled in the art will understand that all or part of the steps of the above method embodiments can be implemented by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When the program is executed, it performs the steps of the above method embodiments. The aforementioned storage medium includes various media that can store program code, such as mobile storage devices, read-only memory (ROM), magnetic disks, or optical disks.

[0201] Alternatively, if the integrated units described above are implemented as software functional modules and sold or used as independent products, they can also be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence or the part that contributes to related technologies, can be embodied in the form of a software product. This 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 methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as mobile storage devices, ROM, magnetic disks, or optical disks.

[0202] The above description is merely an embodiment of this application, but the scope of protection of this application is not limited thereto. Any changes or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application.

Claims

1. A control method for a lifting mechanism, characterized in that, Applied to a computer device, the computer device including a processor, a drive mechanism, and a lifting mechanism, in response to a drive mechanism start command, the drive mechanism is activated, and control operations are performed at preset time intervals, including: Obtain the recorded aging stroke pattern table; the aging stroke pattern table is used to characterize the relationship between the number of strokes and the maximum single movement distance of the lifting mechanism; In response to receiving an ascending command triggered by the user through the human-computer interaction interface of the computer device, the current cumulative number of trips is obtained from a specific location; Based on the current cumulative number of strokes and the aging stroke pattern table, the predicted lifting distance of the lifting mechanism is determined; Determine the current speed of the lifting mechanism; The dynamic lifting speed of the lifting mechanism is determined by performing proportional-integral-derivative PID control on the error between the current speed and the desired speed; wherein the desired speed is determined according to the predicted lifting distance and the preset lifting time. Based on the dynamic lifting speed and the characteristic parameters of the drive mechanism, the pulse width modulation (PWM) frequency of the control signal output by the processor is determined; Based on the PWM frequency, the drive mechanism is controlled to drive the lifting mechanism to perform upward / downward movements.

2. The method according to claim 1, characterized in that, The lifting mechanism is magnetic, and the computer device further includes a Hall sensor. Determining the current speed of the lifting mechanism includes: Based on the magnetic flux density of the Hall sensor and the corresponding Hall sensing characteristic parameters, the current distance of the lifting mechanism relative to the predetermined position is determined. The current speed of the lifting mechanism is determined based on the current distance of the lifting mechanism and the preset time interval.

3. The method according to claim 2, characterized in that, The computer device includes two Hall sensors, which are spaced at a fixed distance and lie in a line parallel to the operating direction of the lifting mechanism. The method further includes: The magnetic flux density of the two Hall sensors is differentially divided to obtain the corrected magnetic flux density. Based on the corrected magnetic flux density and the corresponding Hall sensor characteristic parameters, the current distance of the lifting mechanism relative to the predetermined position is determined.

4. The method according to claim 1, characterized in that, The step of determining the dynamic lifting speed of the lifting mechanism by performing PID control on the error between the current speed and the desired speed includes: Determine the error of the current speed relative to the desired speed; According to the preset differential coefficients and preset integral coefficients, the error is differentiated and integrated respectively to obtain the corresponding differential result and integral result; The dynamic lifting speed of the lifting mechanism is obtained by multiplying the sum of the error, the differential result, and the integral result by a preset scaling factor.

5. The method according to claim 1, characterized in that, The step of determining the predicted lifting distance of the lifting mechanism based on the current cumulative number of strokes and the aging stroke pattern table includes: If the current cumulative number of trips falls between two discrete historical trip counts in the aging trip pattern table, the predicted rise and fall distance is determined according to the following formula: ; in, Y It is the maximum distance traveled as recorded in the aging process pattern table. D 1 is the factory maximum distance of the lifting mechanism. The current cumulative number of trips, and These are the records in the aging process rule table and The two most recent historical trips, and These are the records in the aging process record table and and The corresponding distance traveled.

6. The method according to any one of claims 1 to 4, characterized in that, The response to the drive mechanism start command further includes: Obtain the battery level of the system in the computer device; When the battery level is between a first value and a second value, the drive mechanism is activated and the battery monitoring subsystem of the system is notified not to update the battery status; the second value is greater than the first value. When the lifting mechanism rises to the first target position or falls to the second target position, the drive mechanism is turned off, and the battery monitoring subsystem of the system is notified to update the status of the battery.

7. A control device for a lifting mechanism, characterized in that, Applied to computer equipment, the computer equipment including a processor, a drive mechanism, and a lifting mechanism, the device includes: The second acquisition module is used to acquire a recorded aging stroke pattern table; the aging stroke pattern table is used to characterize the relationship between the number of strokes and the maximum single movement distance of the lifting mechanism. The third acquisition module is used to obtain the current cumulative number of trips from a specific location in response to receiving an upward command triggered through the human-computer interaction interface; The fourth determining module is used to determine the predicted lifting distance of the lifting mechanism based on the current cumulative number of strokes and the aging stroke pattern table; The first determining module is used to determine the current speed of the lifting mechanism; The second determining module is used to determine the dynamic lifting speed of the lifting mechanism by performing PID control on the error between the current speed and the desired speed; wherein the desired speed is determined according to the predicted lifting distance and the preset lifting time. The third determining module is used to determine the PWM frequency of the control signal output by the processor based on the dynamic lifting speed and the characteristic parameters of the drive mechanism; The control module is used to control the drive mechanism based on the PWM frequency, thereby driving the lifting mechanism to perform upward / downward movements.

8. A computer device, characterized in that, It includes a processor, a drive mechanism, and a lifting mechanism; wherein the processor performs the steps of the method as described in any one of claims 1 to 6.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When executed by a processor, the computer program implements the steps of the method according to any one of claims 1 to 6.

Citation Information

Patent Citations

  • Camera lifting control method and device and mobile terminal

    CN110581952A

  • Parameter calibration method and device, storage medium and electronic equipment

    CN111625025A

  • Constant-speed lifting clothes airing machine for adjusting speed by utilizing electromagnetic induction

    CN210140707U