Log updating method and device, mobile operation equipment and computer readable medium
By intelligently identifying the battery power-on event and recording the battery information at a preset frequency in the automatic wake-up state, the problem of logging in the prior art that does not adapt to the energy consumption of the intelligent battery management system is solved, and long-term battery status monitoring and energy consumption optimization are realized.
Patent Information
- Application Number
- CN202510631160.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-16
- Publication Date
- 2025-08-15
- Estimated Expiration
- 2045-05-16
AI Technical Summary
In the existing battery management system, the logging method does not adapt to the energy consumption scheme of the intelligent battery management system, making it difficult to judge the various energy consumption states of the battery and log them separately, affecting the long-term status monitoring of the battery.
By intelligently identifying the type of battery boot event, starting the log update process in response to the battery boot event, determining the type of battery boot event, and updating the log at a preset frequency in the automatic wake-up state, recording the specified type information, including battery capacity, cycle times and maximum power parameters, etc.
It realizes information recording and adaptation of the battery in various energy consumption states, supports long-term battery status monitoring and maintenance, and optimizes the energy consumption scheme of the battery management system.
Smart Images

Figure CN120492420A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of battery management technology, and in particular to a log updating method, device, mobile operating equipment, and computer-readable medium. Background Art
[0002] A battery management system (BMS) is an electronic system that manages the battery packs in mobile devices, including drones and unmanned vehicles. A BMS generates and manages logs that reflect a series of events during the battery's charge and discharge process, including abnormal events, special events, and historical daily data. This allows users and maintenance personnel to understand the battery status and make timely adjustments and assessments based on the battery's condition.
[0003] In existing battery management systems, when a user turns on the battery, the management system begins logging data and continues until the battery is turned off. Generally speaking, logging lasts for the entire battery's normal operating period. However, this logging method is incompatible with more intelligent battery management system energy consumption solutions. It makes it difficult to identify and log each battery's various energy consumption states. Furthermore, the logged information does not fully reflect battery information during the automatic wake-up state, hindering long-term battery status monitoring.
[0004] In view of this, it is necessary to improve the existing battery management system log update method to solve the above problems. It should be noted that the above introduction to the background technology is only for the convenience of a clear and complete description of the technical solutions of this application and to facilitate the understanding of those skilled in the art. It cannot be assumed that the above technical solutions are well known to those skilled in the art simply because they are described in the background technology section of this application. Summary of the Invention
[0005] The purpose of the present invention is to disclose a log update method, device, mobile operating equipment and computer-readable medium. The log update method is used to solve the problem in the prior art that is not conducive to long-term status monitoring of batteries. By intelligently identifying the type of power-on event and recording various types of battery information in the automatic wake-up state in a targeted manner, it is more suitable for the energy consumption solution of the intelligent battery management system.
[0006] To achieve the above object, the present invention provides a log updating method, comprising:
[0007] Respond to the battery power-on event to start the log update process;
[0008] Write the preset type information collected when the battery is turned on into the log file as the log header;
[0009] Determining the type of the battery power-on event;
[0010] If the type of the battery power-on event is automatic wake-up, then performing log updates at a preset frequency within the set time corresponding to the automatic wake-up;
[0011] In each log update, the specified type information in the log header is updated, and the specific type information is recorded in the log file.
[0012] As a further improvement of the present invention, determining the category of the battery power-on event includes:
[0013] Obtain the startup current value of the battery when it is powered on, and compare the startup current value with the preset current value;
[0014] The category of the battery power-on event is determined based on the comparison result between the power-on current value and the preset current value and the alarm flag. If the power-on current value is less than the preset current value and the real-time alarm flag is set to 1 when the power is turned on, the category of the battery power-on event is determined to be automatic wake-up.
[0015] As a further improvement of the present invention, performing log updates at a preset frequency within the set time corresponding to the automatic wake-up includes:
[0016] Within 10 seconds corresponding to the automatic wake-up, executing the log update at a preset frequency;
[0017] In the log update, the specified type of information includes the battery capacity update value, the number of battery cycles and the maximum value of the electrical parameters at the end of the current cycle; and / or, the specific type of information includes battery status information, battery control information, fault information and communication information.
[0018] As a further improvement of the present invention, before writing the preset type information collected when the battery is turned on into the log file as a log header, the method further includes:
[0019] Determine whether the battery's microcontroller has successfully mounted the cache;
[0020] When the single chip microcomputer successfully mounts the cache, executing the step of writing the preset type information collected when the battery is turned on into a log file as a log header;
[0021] During the log update, determining whether the file size of the current log file exceeds a preset size;
[0022] If it exceeds, the current day file will be closed and a new log file will be created to update the preset type information and record the specific type information.
[0023] As a further improvement of the present invention, the preset type information collected when the battery is turned on is written into a log file as a log header including:
[0024] Initialize the log header and collect preset type information when the battery is powered on, the preset type information including the battery initial capacity value, initial voltage, power-on current value and alarm flag;
[0025] A new log file is created and opened to write the preset type information into the new log file and record the content as a log header.
[0026] As a further improvement of the present invention, after determining the category of the battery power-on event, the method further includes:
[0027] If the battery power-on event is classified as a normal power-on event, performing log updates at a preset frequency during the power-on period;
[0028] If the file size of the current log file exceeds the preset size or the recording time of the current log file exceeds the preset time, the current log file will be closed and a new log file will be created to record the preset type of information.
[0029] As a further improvement of the present invention, closing the current log file includes:
[0030] Checking in sequence whether the remaining capacity of the storage space can store the current log file to be closed, whether the number of log files stored in the storage space is less than a preset number, and whether the free blocks of the storage space are greater than the first reserved storage capacity;
[0031] If yes, close the current log file and store it in the storage space;
[0032] If not, the log files are deleted in order of creation time from the earliest to the latest until the remaining capacity of the storage space can store the current log file to be closed, the number of log files stored in the storage space is less than the preset number and the free blocks of the storage space are greater than the second reserved storage capacity.
[0033] Based on the same inventive concept, the present invention also discloses a log updating device for a battery management system, comprising:
[0034] A startup module, used to respond to a battery power-on event to start the log update process;
[0035] A pre-recording module is used to write the preset type of information collected when the battery is turned on into a log file as a log header;
[0036] A determination module, configured to determine the type of the battery power-on event;
[0037] A log recording module is used to perform log updates at a preset frequency when the category of the battery power-on event is automatic wake-up and within the set time corresponding to the automatic wake-up; in each log update, the specified type information in the log header of the log file is updated, and the specific type information is recorded in the log file.
[0038] The present invention also discloses a mobile operating device, comprising a battery management system, wherein the battery management system uses any of the aforementioned log updating methods to perform log updates;
[0039] The mobile operating equipment includes an unmanned aerial vehicle (UAV), an unmanned ground operating equipment, or an unmanned surface operating equipment.
[0040] The present invention also discloses a computer-readable storage medium having a computer program stored thereon, wherein the program implements any of the aforementioned log updating methods when executed by a processor.
[0041] Compared to the prior art, the present invention has the following advantages: a log update process is initiated in response to a battery power-on event, and the type of battery power-on event is determined. If the battery power-on event is an automatic wake-up event, the log file created for this battery power-on event is updated and recorded with the information specified in the log header at a preset frequency within the automatic wake-up time. If the battery power-on event is a normal power-on event without automatic wake-up, the log file is updated and recorded with the information specified in the log header at a preset frequency within the working hours. The present invention creates a log file in response to the log update process and sets the log header to preset the initial battery information to be collected, thereby determining the type of battery power-on event and initiating the log update process for automatic wake-up or normal battery power-on, respectively. Furthermore, the daily update of the battery power-on event is synchronized with the end of the automatic wake-up state to end the log file update. Through the above scheme, intelligent identification of the power-on event type is achieved. When the battery power-on event is identified as an automatic wake-up event, the various types of battery information in the log file are updated in a targeted manner. This scheme is particularly suitable for monitoring the long-term storage energy consumption status of batteries, facilitating maintenance personnel's battery maintenance and battery characteristic research. BRIEF DESCRIPTION OF THE DRAWINGS
[0042] Figure 1 This is a flow chart of the log updating method of the present invention;
[0043] Figure 2 This is a specific flow chart for embodying steps S3 to S6 in the present invention;
[0044] Figure 3 This is a specific flow chart for embodying steps S5 to S7 in the present invention.
[0045] Figure 4A topological diagram of the log updating device in the present invention;
[0046] Figure 5 A topological diagram of the computer-readable medium in the present invention. DETAILED DESCRIPTION
[0047] The present invention is described in detail below with reference to the various embodiments shown in the accompanying drawings, but it should be noted that these embodiments are not limitations of the present invention, and any equivalent transformations or substitutions in functions, methods, or structures made by ordinary technicians in this field based on these embodiments are all within the scope of protection of the present invention.
[0048] Ginseng Figures 1 to 3 The figure shows a specific embodiment of a log update method disclosed by the present invention. This log update method is applied to the battery management system of mobile working equipment to solve the problem that log update methods in the prior art are difficult to adapt to more intelligent battery management system energy consumption solutions, and thus difficult to meet the needs of long-term battery monitoring. By automatically determining battery power-on events and more specifically recording battery type information in the log file according to the battery automatic wake-up state, a more intelligent adaptation of battery information recording in various energy consumption states is achieved.
[0049] Ginseng Figure 1 and Figure 2 As shown, the log update method includes the following steps S1, S2, and S3 to S5:
[0050] Step S1: responding to a battery power-on event to start a log update process.
[0051] Step S2: Determine whether the battery microcontroller is successfully mounted with cache. If not, terminate the log update process and issue an error alarm. If yes, proceed to step S3.
[0052] Step S3: writing the preset type information collected when the battery is powered on into a log file as a log header.
[0053] Step S4: Determine the type of the battery power-on event.
[0054] Ginseng Figure 2 As shown, step S4 specifically includes the following steps S41 and S42:
[0055] Step S41: obtaining a startup current value when the battery is powered on, and comparing the startup current value with a preset current value.
[0056] Step S42: determining the type of the battery power-on event based on the comparison result between the power-on current value and the preset current value and the alarm flag.
[0057] Ginseng Figure 1As shown, step S5 specifically includes the following steps S50 and S51:
[0058] Step S50: Determine whether the battery power-on event is an automatic wake-up event.
[0059] Step S51: Perform log update at a preset frequency within the set time corresponding to the automatic wake-up.
[0060] It should be noted that the log header is a relatively fixed part of the log file. After the present invention uses the preset type information collected when the battery is turned on as the log header, in the log update cycle corresponding to the current battery power-on event, the specified type information in the preset type information is updated, while the other parts of the preset type information are not updated. Among them, the specified type information to be updated may include information such as battery capacity, number of battery cycles and the maximum value of electrical parameters at the end of the current cycle. Of course, it may also include information such as battery state of charge, current cell temperature, number of pre-charge failures, number of chip initialization failures, number of chip operation failures, etc. The other parts that are not updated may include information such as battery management system ID, cell ID, version number, starting maximum cell voltage, starting minimum cell voltage, starting number of battery cycles, and starting cell temperature.
[0061] It is understandable that during the log update cycle, in addition to updating the specified type of information in the log header of the log file, it also includes recording and updating other information after the log header, such as the specific type of information. The specific type of information may include battery status information, battery control information, fault information, and communication information. Specifically, in this embodiment, the set time corresponding to the automatic wake-up of the battery is 10 seconds, and the preset frequency is 0.1 seconds each time. Therefore, step S51 is specifically as follows: within the 10 seconds corresponding to the automatic wake-up setting, execute the log update at a frequency of 0.1 seconds each time until the automatic wake-up period ends and the device automatically shuts down. Of course, before executing the automatic shutdown action, the current log file must be saved and closed.
[0062] Further, refer to Figure 2 As shown, the log updating method further includes step S6, which specifically includes the following steps S60 and S61:
[0063] Step S60: Determine whether the battery startup event is a normal startup.
[0064] Step S61: When the battery is normally powered on, log updates are performed at a preset frequency.
[0065] In this embodiment, a log update process is initiated in response to a battery power-on event. Specifically, a new log file is created in response to this battery power-on event, and the battery information during this power-on process is continuously and cyclically recorded in the log file during the duration of this power-on event. Furthermore, in this embodiment, preset information types are collected and written into the log file as a log header. The preset information types specifically include the log file's creation time, version number, file size, battery initial capacity value, initial voltage, and other information types commonly recorded in log files. Furthermore, the preset information types written into the log file as the log header in the present invention also include the power-on current value and alarm flag information when the battery is powered on, so as to facilitate step S4 in determining the battery power-on event category.
[0066] Ginseng Figure 2 As shown, step S3 includes step S31 and step S32:
[0067] Step S31: Collecting preset type information when the battery is turned on.
[0068] Step S32: Create a new log file and initialize the log header. Open the log file and write the preset type information when the battery is turned on as the log header.
[0069] It should be noted that in this embodiment, a log file is created before the type of battery power-on event is determined, and the information types of the log header general records including creation time, version number, file size, battery initial capacity value and initial voltage are written, and the power-on current value when the battery is powered on and the real-time alarm flag information when the battery is powered on are further obtained as the log header.
[0070] Furthermore, when it is determined that the battery power-on event is an automatic battery wake-up, the log file is updated at a frequency of 0.1 seconds within 10 seconds of the automatic wake-up and power-on, ensuring the breadth of battery information acquisition data while updating the log at a faster frequency to ensure the amount of battery information data acquired. Specifically, in addition to updating the specified type of information in the log header during the log update process, the specific type of information in the log file is also updated. Moreover, when a battery power-on event occurs, the acquired information is written into the log file as a log header, and the type of battery power-on event corresponding to the new log file is determined accordingly to match the log update frequency corresponding to different battery power-on events.
[0071] Ginseng Figure 2 As shown, step S42 specifically includes the following steps S421 and S422:
[0072] Step S421: If the power-on current value is less than the preset current value, and the real-time alarm flag is set to 1 during power-on, execute step S50.
[0073] Step S422: If the power-on current value is greater than or equal to the preset current value, and / or the real-time alarm flag is set to 0 when the power is on, execute step S60. Figure 2 Instead, it is presented in the form of a split of step S421 and step S422.
[0074] It should be noted that in this embodiment, the battery is automatically awakened and powered on by the RTC alarm. The type of battery power-on event is determined by combining the alarm flag position 0 / 1 with the battery's power-on current value. Furthermore, in this embodiment, the preset current value is set to 0.8A. If the battery's power-on current value is less than 0.8A, it indicates that the battery was powered on in a no-load state, meeting one of the criteria for automatic battery awakening. However, automatic battery awakening cannot be determined solely based on the battery's power-on current value. That is, even when the battery is powered on normally and not yet operating, the power-on current value is still less than 0.8A. Therefore, the alarm flag is required to determine the battery's automatic awakening. Specifically, if the alarm flag is 1, it indicates that the battery was automatically awakened by the RTC alarm, rather than by a normal button press. At the same time, a power-on current value less than 0.8A indicates that the battery was in a no-load state. Therefore, the battery is determined to be periodically awakened. This is intended to allow the battery to automatically start when no work is required, allowing for log file creation and battery information acquisition, facilitating battery monitoring. It should be noted that if the alarm flag is 1 but the power-on current value is greater than or equal to 0.8A, it indicates that although the battery power-on event is automatically woken up by the RTC alarm, it has a workload and does not belong to the battery power-on event corresponding to the automatic wake-up.
[0075] Furthermore, in this embodiment, the initial current value and alarm flag at battery startup are written into the log header as designated information obtained when the battery is powered on, through the above-mentioned method, to determine whether the power-on event is an automatic wake-up or a normal power-up, thereby achieving the purpose of intelligently determining the type of power-on event. Furthermore, the two power-on events determined to be automatic wake-up and normal power-up enter their corresponding log update processes to specifically update various types of battery information. It should be noted that the purpose of automatic battery wake-up is to automatically activate and obtain battery information when the battery is in a long-term storage energy consumption state, with the purpose of optimizing long-term monitoring of the battery. In this embodiment, the above-mentioned judgment method is used to more intelligently adapt the logging of battery information under various energy consumption states. More specifically, it adapts to the two states of high-load working state and automatic wake-up of long-term storage energy consumption state. This is particularly suitable for efficiently and specifically updating the corresponding types of information of automatic wake-up in the log, and is more suitable for the energy consumption solution of the intelligent battery management system.
[0076] It should be noted that after determining that the battery startup event is an automatic wake-up startup, in addition to entering the log update process (ie step S51), the reference Figures 1 to 3 As shown, it is also necessary to perform step S52 and step S53:
[0077] Step S52: Restart the RTC alarm to execute the automatic wake-up event again after the set time, and turn off the timer to execute the battery automatic shutdown event after 10 seconds.
[0078] Step S53: Determine whether the file size of the current log file is greater than or equal to the preset size. If so, execute step S531; if not, return to execute step S51.
[0079] Step S531 , execute step S7 , and create a new log file to return to execute step S32 .
[0080] It should be noted that when the battery power-on event is determined to be an automatic wake-up, an interrupt is generated to restart the RTC alarm so that the battery automatically wakes up again after a set duration (e.g., 4 hours, or other arbitrarily set time period) to enter the next log update. The specific log update is as described above and will not be described in detail here. Further, as described above, the purpose of the battery's automatic wake-up is to automatically activate the battery to obtain battery information, which is beneficial for long-term monitoring of the battery. During the duration of the battery's automatic wake-up, no load operation is required. Therefore, a shorter duration is set for the battery's automatic wake-up to achieve the above purpose. That is, during the 10-second automatic wake-up duration set in this embodiment, the log update is performed at a frequency of 0.1 seconds each. Through frequent log updates, the purpose of obtaining a sufficient amount of data and the purpose of comprehensively monitoring the battery status is achieved. After reaching the 10-second power-on duration, the device automatically shuts down to wait for the next automatic wake-up of the battery. The specific implementation steps of step S7 are shown below. Since the log is updated at a very fast frequency (0.1 seconds each time) in the automatic wake-up state in this embodiment, the log file will have a large amount of data. By introducing the judgment of the file size of the log file, the log file with a large file size is closed in time and a new log file is created to write the log header data when the battery is turned on, so as to continue to record relevant information. At the same time, it avoids the problem of a single log file occupying too much space, which is not conducive to storage planning and data management, and is also not conducive to ensuring the stability of log reading.
[0081] Ginseng Figure 2 As shown, step S6 further includes step S62:
[0082] Step S62: Determine whether the file size of the current log file is greater than or equal to a preset size and / or whether the recording duration of the current log file is greater than or equal to a preset duration.
[0083] Ginseng Figure 3 As shown, step S62 specifically includes steps S621 to S623:
[0084] Step S621: Determine whether the file size of the current log file is greater than or equal to a preset size. If so, proceed to step S622; if not, proceed to step S623.
[0085] Step S622: Execute step S7, and create a new log file to return to execute step S32.
[0086] Step S623: Determine whether the recording duration of the current log file is greater than or equal to the preset duration. If so, execute step S622; if not, return to execute step S61.
[0087] When the battery is in a normal power-on state, and no battery shutdown event is executed, it is necessary to continuously acquire battery information to update the log file. Therefore, compared to the short power-on period during which the battery is automatically awakened, the log file only needs to acquire log information during the automatic awakening period. In this embodiment, when the battery is in a normal power-on state, after the log file periodically records battery information, the log file size and recording duration are determined, and log files that exceed the preset size and duration are promptly closed, thereby achieving the effect of log file management.
[0088] Specifically, the preset size of the log file in this embodiment can be within the conventional upper limit of the log file size (for example, 128Kb), and the preset log file recording time in this embodiment is set to 6*3600*100ms (i.e., 6 hours). By setting the size of the log file and the recording time as described above, the log files stored in the storage space are stored with a nearly consistent file size, and the duration of the log data recorded in each log file is limited to within 6 hours, which can more clearly reflect the working data status of the battery within a period of time (i.e., the aforementioned 6 hours). Moreover, consistent with the aforementioned automatic wake-up, the newly created log file first writes the preset type information containing the specified type information to enable orderly association of the log file and the information. Among them, the specified type information at this time is the latest corresponding information obtained.
[0089] Ginseng Figure 3 As shown, step S7 specifically includes steps S71 to S77:
[0090] Step S71: Determine whether the current size of the log file to be closed is greater than or equal to the remaining capacity of the storage space. If so, execute step S72; if not, execute step S73.
[0091] Step S72: Delete the log files in order of creation time until the remaining space in the storage space is larger than the current log file size, and then execute step S73.
[0092] Step S73: Determine whether the total number of log files in the storage space is greater than or equal to the preset storage limit. If so, execute step S74; if not, execute step S75.
[0093] Step S74: Delete the log files in order of creation time until the number of log files in the storage space is less than the preset upper limit, and then execute step S75.
[0094] Step S75: Determine whether the free blocks in the storage space are greater than or equal to the first reserved storage capacity. If so, execute step S76; if not, execute step S77.
[0095] Step S76: Delete the log files in order of creation time from earliest to latest until the free blocks in the storage space are larger than the second reserved storage capacity, and then execute step S77.
[0096] Step S77: store the log file to be closed in the storage space.
[0097] Need to prove, in the whole cycle of above-mentioned steps S7, first judge whether the residual capacity of storage space is enough to hold this log file to be stored, if residual capacity is not enough to store this log file, then according to the order from first to last the log file existing in the storage space is deleted, until the residual capacity in the storage space is enough to store this log file.Then the log file quantity existing in the storage space is judged, if the log file quantity existing in the storage space has reached the preset quantity upper limit (this preset quantity is according to actual voluntarily setting, for example, 200), then according to the order from first to last the log file existing in the storage space is deleted, until the log quantity in the storage space is less than preset quantity (200).Because storage space is selected as the external storage of mounting in the present embodiment, therefore after judging the log file quantity in the storage space, also the free block in the storage space will be judged whether to be greater than or equal to the first reserved storage capacity, in the present embodiment, the first reserved storage capacity is set to 128KB, and the second reserved storage capacity is set to 256KB. If the free block in the storage space is smaller than the first reserved storage capacity (128KB), the current log file is stored normally in the storage space; if the free block in the storage space is larger than the first reserved storage capacity (128KB), the log files in the storage space are deleted in order from first to last until the free block in the storage space is larger than the second reserved storage capacity (256KB), and then the current log file is stored in the storage space.
[0098] It should be noted that the purpose of the entire process from steps S71 to S77 is to store the current log file only when the storage space simultaneously satisfies the following conditions: the remaining space is greater than the size of the current log file, the number of existing log files in the storage space is less than a preset number, and the size of the free blocks in the storage space is greater than the first reserved storage capacity. If two of the above three conditions are met but the third is not, the log files in the storage space still need to be deleted in order from the first to the last until the condition is met. Through the above scheme, the log files in the storage space are managed in three dimensions to ensure that the health of the storage space is sufficient to guarantee the normal storage of log files.
[0099] Based on the same invention idea, Figure 4 As shown, the present invention also discloses a log update device 200 for a battery management system, including: a startup module 201, used to respond to a battery power-on event to start a log update process; a pre-recording module 202, used to write preset type information collected when the battery is powered on into a log file as a log header; a judgment module 203, used to judge the category of the battery power-on event; a log recording module 204, used to perform log updates at a preset frequency when the category of the battery power-on event is automatic wake-up and within the set time corresponding to the automatic wake-up; in each log update, the type information specified by the log header is updated, and the specific type information is recorded in the log file.
[0100] It should be noted that steps S1, S3 to S5 in the aforementioned log updating method are implemented by the startup module 201, pre-recording module 202, judgment module 203 and log recording module 204 in the log updating device 200. The specific scheme can be found in the aforementioned implementation method and will not be repeated here.
[0101] Based on the same inventive concept, the present invention also discloses a mobile operating equipment, including a battery management system, which performs log updates through the log update method as in the aforementioned embodiment. The specific log update method is described in the aforementioned embodiment and will not be repeated here; the mobile operating equipment includes a drone or unmanned ground operating equipment or unmanned surface operating equipment.
[0102] Based on the same invention idea, Figure 5 As shown, the present invention also discloses a computer-readable storage medium 300, which stores computer program instructions 301. When the computer program instructions 301 are read and executed by a processor 302, the steps in the log update method disclosed in the above embodiment are executed.
[0103] Optionally, the computer-readable medium 300 can be configured as a server, and the server runs on a physical device that builds a private cloud, hybrid cloud, or public cloud. At the same time, the computer-readable medium 400 can also be configured as a random access memory (RAM), a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), etc.
[0104] The computer-readable medium 300 is used to store programs, and the processor 302 executes the steps of the log updating method disclosed in the above embodiment after receiving the execution instruction.
[0105] The series of detailed descriptions listed above are only specific descriptions of feasible implementation methods of the present invention. They are not intended to limit the scope of protection of the present invention. Any equivalent implementation methods or changes that do not deviate from the technical spirit of the present invention should be included in the scope of protection of the present invention.
[0106] It will be apparent to those skilled in the art that the present invention is not limited to the details of the exemplary embodiments described above and that the invention can be embodied in other specific forms without departing from the spirit or essential characteristics of the invention. Therefore, the embodiments should be considered in all respects as illustrative and non-restrictive, and the scope of the invention is defined by the appended claims, not the foregoing description, and all variations within the meaning and range of equivalents of the claims are intended to be included therein. Any reference sign in a claim should not be construed as limiting the claim to which it relates.
[0107] In addition, it should be understood that although this specification is described in terms of implementation methods, not every implementation method contains only one independent technical solution. This narrative method of the specification is only for the sake of clarity. Those skilled in the art should regard the specification as a whole. The technical solutions in each embodiment can also be appropriately combined to form other implementation methods that can be understood by those skilled in the art.
Claims
1. A log updating method, characterized in that: include: Respond to the battery power-on event to start the log update process; Write the preset type information collected when the battery is turned on into the log file as the log header; Determining the type of the battery power-on event; If the type of the battery power-on event is automatic wake-up, then performing log updates at a preset frequency within the set time corresponding to the automatic wake-up; In each log update, the specified type information of the log header is updated, and the specific type information is recorded in the log file.
2. The log updating method according to claim 1, wherein: The categories of the battery power-on events include: Obtain the startup current value of the battery when it is powered on, and compare the startup current value with the preset current value; The category of the battery power-on event is determined based on the comparison result between the power-on current value and the preset current value and the alarm flag. If the power-on current value is less than the preset current value and the real-time alarm flag is set to 1 when the power is turned on, the category of the battery power-on event is determined to be automatic wake-up.
3. The log updating method according to claim 2, wherein: Executing log updates at a preset frequency within the set time corresponding to the automatic wake-up includes: Within 10 seconds corresponding to the automatic wake-up, executing the log update at a preset frequency; In the log update, the specified type of information includes the battery capacity update value, the number of battery cycles and the maximum value of the electrical parameters at the end of the current cycle; and / or, the specific type of information includes battery status information, battery control information, fault information and communication information.
4. The log updating method according to claim 1, wherein: Before writing the preset type of information collected when the battery is powered on into the log file as the log header, it also includes: Determine whether the battery's microcontroller has successfully mounted the cache; When the single chip microcomputer successfully mounts the cache, executing the step of writing the preset type information collected when the battery is turned on into a log file as a log header; During the log update, determining whether the file size of the current log file exceeds a preset size; If it exceeds, the current log file is closed and a new log file is created to update the preset type information and record the specific type information.
5. The log updating method according to claim 3, wherein: Write the preset type of information collected when the battery is turned on into the log file as a log header including: Initialize the log header and collect preset type information when the battery is powered on, the preset type information including the battery initial capacity value, initial voltage, power-on current value and alarm flag; A new log file is created and opened to write the preset type information into the new log file and record the content as a log header.
6. The log updating method according to claim 5, characterized in that: After determining the type of the battery power-on event, the method further includes: If the battery startup event is classified as a normal startup, performing log updates at a preset frequency during the startup period; If the file size of the current log file exceeds the preset size or the recording time of the current log file exceeds the preset time, the current log file is closed and a new log file is created to record the preset type of information.
7. The log updating method according to claim 4 or 6, characterized in that: Closing the current log file includes: Check whether the remaining capacity of the storage space can store the current log file to be closed, whether the number of log files stored in the storage space is less than a preset number, and whether the free blocks of the storage space are greater than the first reserved storage capacity; If yes, close the current log file and store it in the storage space; If not, the log files are deleted in order of creation time from the earliest to the latest until the remaining capacity of the storage space can store the current log file to be closed, the number of log files stored in the storage space is less than the preset number and the free blocks of the storage space are greater than the second reserved storage capacity.
8. A log updating device, characterized in that: include: A startup module, used to respond to a battery power-on event to start the log update process; A pre-recording module is used to write the preset type of information collected when the battery is turned on into a log file as a log header; A determination module, configured to determine the type of the battery power-on event; The log recording module is used to perform log updates at a preset frequency within the set time corresponding to the automatic wake-up when the category of the battery power-on event is automatic wake-up; in each log update, the specified type information in the log header is updated and the specific type information is recorded in the log file.
9. A mobile working equipment, characterized in that: A battery management system is included, wherein the battery management system performs log updates using the log update method according to any one of claims 1 to 7; The mobile operating equipment includes an unmanned aerial vehicle (UAV), an unmanned ground operating equipment, or an unmanned surface operating equipment.
10. A computer-readable medium having a computer program stored thereon, characterized in that: When executed by a processor, the program implements the log updating method according to any one of claims 1 to 7.
Citation Information
Patent Citations
Control and diagnosis of a controller wake up feature
CN105083168A
Log information reporting method and device, storage medium, ADSP and terminal
CN107562602A
Log file automatic grabbing method and device and computer equipment
CN111930703A
Battery management system self-awakening diagnosis method, battery management system and vehicle
CN113696780A
Computer sleep stability test system and method
CN114490287A