Memory firmware log storage and analysis method and management system thereof

By converting log files into binary format and generating binary indexes, the problems of low storage efficiency and poor security caused by plaintext storage are solved, efficient and secure log storage and parsing are achieved, and system performance is optimized.

CN120371804APending Publication Date: 2025-07-25ARTMEM TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510355199.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-25
Publication Date
2025-07-25

AI Technical Summary

Technical Problem

The existing log storage solution is stored in plaintext form, resulting in low storage space efficiency and poor security, making it difficult to efficiently parse non-plaintext information.

Method used

Convert log files to binary format, generate binary indexes and parameter values through preset rules, store them as binary log files, and use parsing dependent files for parsing to achieve non-plaintext storage and efficient parsing.

Benefits of technology

It reduces the space occupied by log data, improves storage efficiency and security, and facilitates users to analyze log information, optimizes system configuration and improves overall performance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120371804A_ABST
    Figure CN120371804A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a memory firmware log storage method, a memory firmware log analysis method and a memory firmware log management system.The storage method comprises the steps that a log file generated by firmware running of a memory is obtained, the log file comprises at least one original log entry, and each original log entry comprises the value of at least one log parameter; for each original log entry, determining a binary index corresponding to the original log entry based on a preset rule, and converting a value of a log parameter corresponding to the original log entry into a binary parameter value; generating a binary log file corresponding to the log file, wherein the binary log file comprises binary indexes and binary parameter values corresponding to all the original log entries in the log file; and storing the binary log file to a storage medium so as to improve the use efficiency of a log storage space while ensuring the safety of log information.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computer information management technology, and particularly to a method for storing and parsing memory firmware logs and its management system. Background Art

[0002] In the current field of log management, most mainstream log storage schemes store logs in plain text, that is, directly store the plain text information of the logs into the storage space. Although this storage method is simple and direct, there are many problems in actual applications. For example, the log data stored in plain text occupies a large amount of space, resulting in low utilization efficiency of the log storage space. Since logs usually contain a large amount of repetitive information and redundant data, directly storing them in plain text will significantly increase the storage requirements. Especially in the case of rapid growth of data volume, the storage cost and management complexity also increase accordingly.

[0003] Secondly, the log information stored in plain text lacks security and is easily accessed and tampered with without authorization, thus leaking sensitive information. If such information is stored in plain text, once the storage system is breached or the data is accessed improperly, the core information of the system will be directly exposed, bringing serious security risks to enterprises and users.

[0004] In addition, when storing logs in the form of non-plain text information in the storage space, how to efficiently and accurately parse the non-plain text information when analyzing and auditing it has become an urgent problem to be solved. Summary of the Invention

[0005] The main purpose of the embodiments of this application is to propose a method for storing and parsing memory firmware logs and its management system, aiming to ensure the security of log information while improving the utilization efficiency of the log storage space and realizing the efficient parsing of stored logs.

[0006] To achieve the above object, the first aspect of the embodiments of this application proposes a method for storing memory firmware logs, and the method includes:

[0007] Obtain a log file generated by the firmware operation of the memory, where the log file contains at least one original log entry, and each original log entry contains the value of at least one log parameter;

[0008] For each of the original log entries, determine the binary index corresponding to the original log entry based on a preset rule, and convert the value of the log parameter corresponding to the original log entry into a binary parameter value;

[0009] Generate a binary log file corresponding to the log file, where the binary log file includes binary indexes and binary parameter values corresponding to all the original log entries in the log file;

[0010] Store the binary log file in a storage medium.

[0011] Through the method provided in the first aspect, by only saving key information, the log can be stored in the storage space in a non-plaintext form, reducing the occupied space of the log data, improving the utilization efficiency of the log storage space, and ensuring the security of the log information.

[0012] In a possible way, determining the binary index corresponding to the original log entry based on a preset rule includes:

[0013] Obtain a preset parsing dependency file, where the parsing dependency file includes multiple log entry records and binary indexes corresponding to each log entry record;

[0014] Search for the log entry record corresponding to the original log entry in the parsing dependency file, and determine the binary index corresponding to the original log entry based on the log entry record.

[0015] In a possible way, before obtaining the preset parsing dependency file, the method further includes:

[0016] Scan the source code of the firmware of the memory through a script tool to obtain at least one log interface function used in the source code;

[0017] Extract the log entry records based on the log interface function, and create corresponding binary indexes for the log entry records;

[0018] Generate the parsing dependency file, where the parsing dependency file includes the log entry records and binary indexes corresponding to the log entry records.

[0019] In a possible way, the parsing dependency file further includes the number of log parameters; after extracting the log entry records based on the log interface function, the method further includes:

[0020] Determine the number of log parameters according to the log parameters included in the log entry record.

[0021] In a possible way, the length of the binary index is fixed to a first length, and the length of the binary parameter value is fixed to a second length.

[0022] In a second aspect, an embodiment of the present application provides a method for parsing a memory firmware log, and the method includes:

[0023] Obtain a binary log file from a storage medium, where the binary log file contains at least one binary log entry, and each binary log entry contains a corresponding binary index and a binary parameter value;

[0024] Call a parsing dependency file, where the parsing dependency file contains multiple binary indexes and log entry records corresponding to the binary indexes, and each log entry record contains at least one log parameter;

[0025] For each binary log entry, based on the binary index corresponding to the binary log entry, find the log entry record corresponding to the binary log entry from the parsing dependency file, and replace the log parameter in the log entry record with the binary parameter value corresponding to the binary log entry to obtain an original log entry.

[0026] Through the method provided in the second aspect, it is possible to parse the non-cleartext log information in the storage space to obtain the cleartext information of the log, which is convenient for users to analyze the cleartext information of the log, so as to optimize the system configuration and code and improve the overall performance.

[0027] In a possible way, the length of the binary index is fixed to a first length, and the length of the binary parameter value is fixed to a second length; the parsing dependency file further contains the number of log parameters corresponding to the binary index;

[0028] Extract the corresponding binary index from the binary log entry based on the first length;

[0029] Find the log entry record and the number of log parameters corresponding to the binary log entry from the parsing dependency file;

[0030] Extract all the corresponding binary parameter values from the binary log entry based on the second length and the number of log parameters, and replace each log parameter in the log entry record with the corresponding binary parameter value to obtain the original log entry.

[0031] In a third aspect, an embodiment of the present application provides a memory firmware log management system, which includes a storage module and a parsing module, where the storage module includes:

[0032] A log file acquisition unit, configured to acquire a log file generated by the firmware operation of the memory, where the log file contains at least one original log entry, and each original log entry contains at least one value of a log parameter;

[0033] A log entry encoding unit, configured to, for each of the original log entries, determine a binary index corresponding to the original log entry based on a preset rule, and convert the value of a log parameter corresponding to the original log entry into a binary parameter value;

[0034] A log file generation unit, configured to generate a binary log file corresponding to the log file, where the binary log file includes binary indexes and binary parameter values corresponding to all the original log entries in the log file;

[0035] A storage unit, configured to store the binary log file into a storage medium;

[0036] The parsing module includes:

[0037] A log file acquisition unit, configured to acquire a binary log file from a storage medium, where the binary log file includes at least one binary log entry, and each binary log entry includes a corresponding binary index and binary parameter value;

[0038] A parsing call unit, configured to call a parsing dependency file, where the parsing dependency file includes multiple binary indexes and log entry records corresponding to the binary indexes, and each log entry record includes at least one log parameter;

[0039] A log entry parsing unit, configured to, for each of the binary log entries, based on the binary index corresponding to the binary log entry, find the log entry record corresponding to the binary log entry from the parsing dependency file, and replace the log parameter in the log entry record with the binary parameter value corresponding to the binary log entry to obtain an original log entry.

[0040] Through the system provided by the third aspect, it is possible to store logs in a non-cleartext form in a storage space by only saving key information, reduce the occupied space of log data, improve the usage efficiency of the log storage space, and ensure the security of log information; it is also possible to parse the non-cleartext log information in the storage space to obtain the cleartext information of the logs, which is convenient for users to analyze the cleartext information of the logs, so as to optimize the system configuration and code and improve the overall performance.

[0041] In a fourth aspect, there is provided an electronic device, including:

[0042] One or more processors;

[0043] A memory stores one or more programs which, when executed by one or more processors, cause the one or more processors to implement the memory firmware log storage method as described in the first aspect or the memory firmware log parsing method as described in the second aspect.

[0044] In a fifth aspect, there is provided a computer-readable storage medium storing a computer program which, when executed by a processor, implements the memory firmware log storage method as described in the first aspect or the memory firmware log parsing method as described in the second aspect. Description of the Drawings

[0045] To more clearly illustrate the technical solutions in one or more embodiments of this specification or the prior art, the following will briefly introduce the drawings required for the description of one or more embodiments or the prior art. Obviously, the drawings in the following description are only some embodiments recorded in this specification. For those of ordinary skill in the art, without creative efforts, other drawings can also be obtained based on these drawings.

[0046] Figure 1 It is a flowchart showing a method for storing memory firmware logs provided by an embodiment of the present application.

[0047] Figure 2 It is a flowchart showing a method for parsing memory firmware logs provided by an embodiment of the present application.

[0048] Figure 3 It is a system architecture diagram of a memory firmware log management system provided by an embodiment of the present application.

[0049] Figure 4 It is a block diagram of the structure of an electronic device provided by an embodiment of the present application. Detailed Embodiments

[0050] To enable those skilled in the art to better understand the technical solutions in this specification, the following will clearly and completely describe the technical solutions in one or more embodiments of this specification with reference to the drawings in one or more embodiments of this specification. Obviously, the described one or more embodiments are only a part of the embodiments of this specification, rather than all of the embodiments. Based on the one or more embodiments in this specification, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of this document.

[0051] It should be noted that although the functional modules are divided in the schematic diagram of the device and the logical sequence is shown in the flowchart, in some cases, the steps shown or described may be executed in a different module division in the device or a different order in the flowchart. The terms "first", "second", etc. in the description, claims and the above-mentioned drawings are used to distinguish similar objects and do not necessarily have to be used to describe a specific order or sequence.

[0052] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by those of ordinary skill in the technical field to which this application belongs. The terms used herein are only for the purpose of describing the embodiments of this application and are not intended to limit this application.

[0053] It should be noted that in each specific implementation of this application, when it comes to relevant processing based on data related to the user's identity or characteristics, such as user information, user behavior data, user historical data, and user location information, the user's permission or consent will be obtained first. Moreover, the collection, use, and processing of these data will comply with the relevant laws, regulations, and standards of the relevant countries and regions. In addition, when the embodiments of this application need to obtain the user's sensitive personal information, the user's separate permission or separate consent will be obtained by means such as pop-up windows or redirecting to a confirmation page. After clearly obtaining the user's separate permission or separate consent, the necessary user-related data for the normal operation of the embodiments of this application will be obtained.

[0054] In addition, the technical features involved in the various embodiments of the present invention described below can be combined with each other as long as they do not conflict with each other. The embodiments of the present invention will be further described below with reference to the accompanying drawings.

[0055] Figure 1 is an optional flowchart of the method for storing the memory firmware log provided by the embodiments of this application. Figure 1 The method in may include, but is not limited to, steps S100 to S400.

[0056] In the first aspect, as Figure 1 shown, a method for storing a memory firmware log is provided, and the method includes:

[0057] S100. Obtain a log file generated by the firmware operation of the memory. The log file contains at least one original log entry, and each original log entry contains the value of at least one log parameter.

[0058] It should be noted that the log file contains at least one original log entry. A log entry is the basic unit of a log, which records events, operations, or status changes that occur in the system or application at a specific point in time. Usually, a large amount of repetitive or insignificant information is included in the log file. In the log storage method provided by the embodiments of the present application, each original log entry contains at least the value of one log parameter, that is, only the value of the log parameter is retained, significantly reducing the occupation of storage space. Moreover, when troubleshooting problems, it is easier to quickly locate only by retaining the value of the log parameter, without having to search through a large amount of irrelevant information, and the log entry related to the problem can be directly extracted, reducing false alarms and interference.

[0059] S200. For each original log entry, determine the binary index corresponding to the original log entry based on a preset rule, and convert the value of the log parameter corresponding to the original log entry into a binary parameter value.

[0060] It should be noted that, first of all, for each original log entry, determining the binary index corresponding to the original log entry based on a preset rule can improve the query efficiency and quickly locate a specific log entry in a large amount of log data; secondly, the index can optimize the storage structure of the log data and reduce the storage of redundant data; in addition, the index can partition and store the logs according to different fields, which is convenient for management and query, or perform precise retrieval for specific fields, improving the accuracy and flexibility of the retrieval.

[0061] S300. Generate a binary log file corresponding to the log file. The binary log file contains the binary indexes and binary parameter values corresponding to all the original log entries in the log file.

[0062] In some embodiments, generate a binary log file corresponding to the log file. The binary log file contains the binary indexes and binary parameter values corresponding to all the original log entries in the log file. Storing the log data in binary format is more compact than storing it in text format. Storing in binary format avoids redundant characters in the text format, can significantly reduce the occupation of storage space, and reduce the storage cost; moreover, the binary format can directly write data to the disk without complex encoding and formatting operations. When reading binary data, it can be directly parsed into a data structure in memory without text parsing, improving the writing and reading efficiency; in addition, the binary format can support more complex data structures, so it is convenient to expand the fields and types of log data without modifying the storage format, and binary data is easier to combine with encryption technology and is difficult to be directly tampered with, further enhancing the security of the data.

[0063] S400. Store the binary log file in a storage medium.

[0064] Through the method provided by the first aspect, by only saving key information, the log can be stored in the storage space in a non-plaintext form, reducing the occupied space of the log data, improving the utilization efficiency of the log storage space, and ensuring the security of the log information.

[0065] In a possible way, determining the binary index corresponding to the original log entry based on the preset rule includes: obtaining a preset parsing dependency file, where the parsing dependency file includes multiple log entry records and the binary index corresponding to each log entry record; searching for the log entry record corresponding to the original log entry from the parsing dependency file, and determining the binary index corresponding to the original log entry based on the log entry record.

[0066] It should be noted that the parsing dependency file is used to parse the binary log file in the storage space. The preset parsing dependency file includes multiple log entry records and the binary index corresponding to each log entry record. Search for the log entry record corresponding to the original log entry from the parsing dependency file, and determine the binary index corresponding to the original log entry based on the log entry record. So that when performing subsequent parsing operations on the binary log file, use the binary index corresponding to each log entry record in the parsing dependency file to pair with the binary index corresponding to the original log entry, so as to retrieve the original log entry with a matching binary index for subsequent parsing operations of the binary log file. Through the binary index, the query efficiency can be improved, and specific log entries can be quickly located in a large amount of log data; secondly, the index can optimize the storage structure of the log data and reduce the storage of redundant data; in addition, the index can partition and store the log according to different fields, which is convenient for management and query, or perform precise retrieval for specific fields, improving the accuracy and flexibility of retrieval.

[0067] In a possible way, before obtaining the preset parsing dependency file, the method further includes: scanning the source code of the firmware of the memory through a script tool to obtain at least one log interface function used in the source code; extracting the log entry record based on the log interface function, and creating a corresponding binary index for the log entry record; generating the parsing dependency file, where the parsing dependency file includes the log entry record and the binary index corresponding to the log entry record.

[0068] It should be noted that in some embodiments, it is necessary to scan the source code of the firmware of the memory through a script tool to obtain at least one log interface function used in the source code, extract log entry records from the log interface function, and create a corresponding binary index for the log entry records, generating a parsing dependency file including the log entry records and the binary index corresponding to the log entry records. Among them, the log interface function is a tool for recording log information, from which log entry records can be extracted, facilitating developers to optimize the system configuration according to the extracted log information and improving the stability and performance of the system.

[0069] In a possible way, the parsing dependency file further includes the number of log parameters; after the log entry records are extracted based on the log interface function, the method further includes: determining the number of log parameters according to the log parameters included in the log entry records.

[0070] It should be noted that determining the number of log parameters according to the log parameters included in the log entry records can estimate the size and growth rate of the log file, so as to reasonably plan the storage space, and can also quickly locate the time range and relevant log entries where the problem occurs. And when it is necessary to parse the binary log file subsequently, each original log entry in the binary log file can be parsed one by one through the obtained number of log parameters to obtain the plaintext information of the log, facilitating users to analyze the plaintext information of the log, so as to optimize the system configuration and code and improve the overall performance.

[0071] In a possible way, the length of the binary index is fixed to a first length, and the length of the binary parameter value is fixed to a second length.

[0072] It should be noted that the fixed-length binary index and the fixed-length binary parameter value can efficiently utilize the storage space, making the planning of the storage space easier. For example, the length of the binary index can be fixed to the first length, and the length of the binary parameter value can be fixed to the second length, which can avoid the storage space shortage caused by the over-large index file. And the fixed-length binary index and the fixed-length binary parameter value make the data structure simpler and more consistent, and this simple structure is convenient for management and maintenance.

[0073] Figure 2 is an optional flowchart of the memory firmware log parsing method provided by the embodiments of the present application, Figure 2 The method in may include but is not limited to steps S500 to S700.

[0074] In a second aspect, as Figure 2 shown, the embodiments of the present application provide a memory firmware log parsing method, and the method includes:

[0075] S500. Obtain a binary log file from a storage medium. The binary log file contains at least one binary log entry, and each binary log entry contains a corresponding binary index and a binary parameter value.

[0076] S600. Invoke a parsing dependency file. The parsing dependency file contains multiple binary indexes and log entry records corresponding to the binary indexes. Each log entry record contains at least one log parameter.

[0077] S700. For each binary log entry, based on the binary index corresponding to the binary log entry, find the log entry record corresponding to the binary log entry from the parsing dependency file, and replace the log parameter in the log entry record with the binary parameter value corresponding to the binary log entry to obtain the original log entry.

[0078] It should be noted that for each binary log entry, index according to the corresponding binary index it contains, find the corresponding log entry record that matches the binary index from the parsing dependency file, and replace the log parameter in the log entry record with the binary parameter value corresponding to the binary log entry to obtain the original log entry, so as to realize the parsing of the non - plaintext log information in the storage space to obtain the plaintext information of the log. Through this parsing method, users can clearly view the detailed content in the log, including operation records, error information, performance metrics, etc. This not only helps to quickly locate problems and bottlenecks, but also provides strong support for optimizing system configuration and code, thereby significantly improving the overall performance and stability of the system.

[0079] Through the method provided in the second aspect, it is possible to parse the non - plaintext log information in the storage space to obtain the plaintext information of the log, which is convenient for users to analyze the plaintext information of the log, thereby optimizing system configuration and code and improving the overall performance.

[0080] In a possible way, the length of the binary index is fixed to a first length, and the length of the binary parameter value is fixed to a second length; the parsing dependency file also contains the number of log parameters corresponding to the binary index; based on the first length, extract the corresponding binary index from the binary log entry; find the log entry record and the number of log parameters corresponding to the binary log entry from the parsing dependency file; based on the second length and the number of log parameters, extract all the corresponding binary parameter values from the binary log entry, and replace each log parameter in the log entry record with the corresponding binary parameter value to obtain the original log entry.

[0081] It should be noted that in some embodiments, based on the first length, the corresponding binary index is extracted from the binary log entry, and then the log entry record and the number of log parameters corresponding to the binary log entry are found from the parsed dependency file. Based on the second length and the number of log parameters, all the corresponding binary parameter values are extracted from the binary log entry, and each binary parameter value is used to replace the corresponding log parameter in the log entry record to obtain the original log entry. Through this parsing method, it can be ensured that no binary log entry is missed, so as to obtain the complete original log entry, which helps the user to comprehensively capture problem information, discover hidden anomalies, gradually narrow down the problem scope, improve the troubleshooting efficiency, and enhance the reliability of the system according to the parsed plaintext information.

[0082] In a third aspect, as Figure 3 shown, an embodiment of the present application provides a memory firmware log management system, which includes a storage module and a parsing module. Among them, the storage module includes:

[0083] A log file acquisition unit, configured to acquire a log file generated by the firmware operation of the memory, where the log file includes at least one original log entry, and each original log entry includes the value of at least one log parameter.

[0084] It should be noted that the log file includes at least one original log entry. A log entry is the basic unit of a log, which records events, operations, or status changes that occur in the system or application at a specific time point. The log file usually contains a large amount of repetitive or irrelevant information. In the log storage method provided by the embodiment of the present application, each original log entry includes the value of at least one log parameter, that is, only the value of the log parameter is retained, which significantly reduces the occupation of storage space. Moreover, when troubleshooting problems, it is easier to quickly locate only the value of the log parameter without searching through a large amount of irrelevant information, and the log entry related to the problem can be directly extracted, reducing false alarms and interference.

[0085] A log entry encoding unit, configured to, for each of the original log entries, determine the binary index corresponding to the original log entry based on a preset rule, and convert the value of the log parameter corresponding to the original log entry into a binary parameter value.

[0086] It should be noted that first, for each original log entry, determining the binary index corresponding to the original log entry based on a preset rule can improve the query efficiency and quickly locate a specific log entry in a large amount of log data; second, the index can optimize the storage structure of the log data and reduce the storage of redundant data; in addition, the index can partition and store the logs according to different fields for easy management and query, or perform precise retrieval for specific fields to improve the accuracy and flexibility of the retrieval.

[0087] A log file generation unit for generating a binary log file corresponding to the log file, where the binary log file contains binary indexes and binary parameter values corresponding to all the original log entries in the log file.

[0088] In some embodiments, a binary log file corresponding to the log file is generated. The binary log file contains binary indexes and binary parameter values corresponding to all the original log entries in the log file. Storing the log data in binary format is more compact than storing it in text format. Storing in binary format avoids redundant characters in the text format, can significantly reduce the occupied storage space, and lower the storage cost. Moreover, binary format can directly write data to the disk without complex encoding and formatting operations. When reading binary data, it can be directly parsed into data structures in memory without text parsing, improving the writing and reading efficiency. Additionally, binary format can support more complex data structures, so it is convenient to expand the fields and types of log data without modifying the storage format, and binary data is easier to combine with encryption technology and is difficult to be directly tampered with, further enhancing data security.

[0089] A storage unit for storing the binary log file to a storage medium.

[0090] The parsing module includes:

[0091] A log file acquisition unit for acquiring a binary log file from a storage medium, where the binary log file contains at least one binary log entry, and each binary log entry contains a corresponding binary index and binary parameter value.

[0092] A parsing call unit for calling a parsing dependency file, where the parsing dependency file contains multiple binary indexes and log entry records corresponding to the binary indexes, and each log entry record contains at least one log parameter.

[0093] A log entry parsing unit for, for each binary log entry, based on the binary index corresponding to the binary log entry, finding the log entry record corresponding to the binary log entry from the parsing dependency file, and replacing the log parameter in the log entry record with the binary parameter value corresponding to the binary log entry to obtain the original log entry.

[0094] It should be noted that for each binary log entry, it is indexed according to the corresponding binary index contained therein. The corresponding log entry record with a matching binary index is retrieved from the parsed dependency file, and the binary parameter value corresponding to the binary log entry is used to replace the log parameter in the log entry record to obtain the original log entry, thereby realizing the parsing of the non-plaintext log information in the storage space to obtain the plaintext information of the log. Through this parsing method, users can clearly view the detailed content in the log, including operation records, error messages, performance metrics, etc. This not only helps to quickly locate problems and bottlenecks, but also provides strong support for optimizing system configuration and code, thereby significantly improving the overall performance and stability of the system.

[0095] Through the system provided by a third party, the log can be stored in the storage space in a non-plaintext form by only saving key information, reducing the occupied space of the log data, improving the utilization efficiency of the log storage space, and ensuring the security of the log information; it can also realize the parsing of the non-plaintext log information in the storage space to obtain the plaintext information of the log, facilitating users to analyze the plaintext information of the log, thereby optimizing the system configuration and code and improving the overall performance.

[0096] The embodiment of the present application also provides an electronic device, such as Figure 4 shown. The electronic device 1400 includes:

[0097] One or more processors 1410;

[0098] A memory 1420, on which one or more programs are stored. When the one or more programs are executed by the one or more processors 1410, the one or more processors 1410 implement the memory firmware log storage method or the memory firmware log parsing method provided by any embodiment of the present application.

[0099] As a non-transitory network system, the memory 1420 can be used to store non-transitory software programs and non-transitory computer-executable programs. In addition, the memory 1420 may include high-speed random access memory, and may also include non-transitory memory, such as at least one magnetic disk storage device, a flash memory device, or other non-transitory solid-state storage devices. In some embodiments, the memory 1420 may optionally include a memory 1420 remotely disposed relative to the processor 1410, and these remote memories 1420 may be connected to the processor 1410 through a network. Examples of the above networks include but are not limited to the Internet, an enterprise intranet, a local area network, a mobile communication network, and combinations thereof.

[0100] The memory 1420 can be implemented in the form of a read-only memory (ROM), a static storage device, a dynamic storage device, or a random access memory (RAM), etc. The memory 1420 can store an operating system and other application programs. When implementing the technical solutions provided in the embodiments of this specification through software or firmware, the relevant program codes are stored in the memory 1420 and are called by the processor 1410 to execute the methods of the embodiments of this application.

[0101] The processor 1410 can be implemented in ways such as a general-purpose CPU (Central Processing Unit), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of this application.

[0102] In some embodiments, the electronic device further includes:

[0103] An input / output interface for implementing information input and output;

[0104] A communication interface for implementing communication and interaction between this device and other devices, which can achieve communication through a wired manner (such as USB, network cable, etc.) or through a wireless manner (such as a mobile network, WIFI, Bluetooth, etc.);

[0105] A bus for transmitting information between various components of the device (such as the processor 1410, the memory 1420, the input / output interface, and the communication interface);

[0106] Among them, the processor 1410, the memory 1420, the input / output interface, and the communication interface can achieve communication connections with each other inside the device through the bus.

[0107] An embodiment of this application also provides a computer-readable storage medium storing computer-executable instructions for executing the memory firmware log storage method or the memory firmware log parsing method provided in any one of the embodiments of this application.

[0108] An embodiment of the present application further provides a computer program product, including a computer program or computer instructions, which are stored in a computer-readable storage medium. The processor of the computer device reads the computer program or computer instructions from the computer-readable storage medium, and the processor executes the computer program or computer instructions, so that the computer device executes the memory firmware log storage method or the memory firmware log parsing method provided by any embodiment of the present application.

[0109] The system architecture and application scenarios described in the embodiments of the present application are to more clearly illustrate the technical solutions of the embodiments of the present application, and do not constitute a limitation on the technical solutions provided by the embodiments of the present application. Those skilled in the art can know that with the evolution of the system architecture and the emergence of new application scenarios, the technical solutions provided by the embodiments of the present application are equally applicable to similar technical problems.

[0110] Those of ordinary skill in the art can understand that all or part of the processes in the methods of the above embodiments can be completed by instructing relevant hardware through a computer program. The computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above methods. Among them, any reference to a memory, storage, database, or other medium used in the embodiments provided by the present application can include non-volatile and / or volatile memories. Non-volatile memories can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memories can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDR SDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), Rambus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and Rambus dynamic RAM (RDRAM), etc.

[0111] Those of ordinary skill in the art will understand that all or some of the steps and systems disclosed above can be implemented as software, firmware, hardware, and appropriate combinations thereof. Some or all of the physical components can be implemented as software executed by a processor, such as a central processing unit, a digital signal processor, or a microprocessor, or as hardware, or as an integrated circuit, such as an application-specific integrated circuit. Such software can be distributed on a computer-readable medium, which can include a computer storage medium (or non-transitory medium) and a communication medium (or transitory medium). As is well known to those of ordinary skill in the art, the term computer storage medium includes volatile and non-volatile, removable and non-removable media implemented in any method or technology for storing information, such as computer-readable instructions, data structures, program modules, or other data. Computer storage media includes, but is not limited to, RAM, ROM, EEPROM, flash memory or other memory technologies, CD-ROM, digital versatile disks (DVD) or other optical disk storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other medium that can be used to store the desired information and can be accessed by a computer. In addition, as is well known to those of ordinary skill in the art, a communication medium typically includes computer-readable instructions, data structures, program modules, or other data in a modulated data signal such as a carrier wave or other transmission mechanism, and can include any information delivery medium.

[0112] The above has illustrated some embodiments of the present application with reference to the accompanying drawings, and thus does not limit the scope of the rights of the present invention. Any modifications, equivalent replacements, and improvements made by those skilled in the art without departing from the scope and essence of the present invention shall be within the scope of the rights of the present application.

[0113] Those of ordinary skill in the art will understand that all or some of the steps, systems, and functional modules / units in the devices disclosed above can be implemented as software, firmware, hardware, and appropriate combinations thereof.

[0114] The terms "first", "second", "third", "fourth", etc. (if any) in the specification of the present application and the above accompanying drawings are used to distinguish similar objects and do not necessarily need to be used to describe a specific order or sequence. It should be understood that such data can be interchanged under appropriate circumstances so that the embodiments of the present application described here can be implemented in an order other than those illustrated or described here. In addition, the terms "comprising" and "having" and any variations thereof are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or device that includes a series of steps or units does not necessarily have to be limited to those steps or units clearly listed, but may include other steps or units not clearly listed or inherent to these processes, methods, products, or devices.

[0115] In addition, in each embodiment of the present application, each functional unit may be integrated into one processing unit, or each unit may exist physically alone, or two or more units may be integrated into one unit. The above integrated unit may be implemented in the form of hardware or in the form of a software functional unit.

[0116] Each embodiment in this specification is described in a progressive manner. For the same or similar parts among the embodiments, reference can be made to each other. Each embodiment focuses on the differences from other embodiments. In particular, for the system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and for the relevant parts, reference can be made to the partial description of the method embodiment.

[0117] The specific embodiments of this specification have been described above. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recited in the claims may be performed in a different order than in the embodiments and still achieve the desired result. Additionally, the processes depicted in the drawings do not necessarily require the particular order or sequential order shown to achieve the desired result. In certain embodiments, multitasking and parallel processing are also possible or may be advantageous.

[0118] The preferred embodiments of the embodiments of the present application have been described above with reference to the drawings, but this does not limit the scope of rights of the embodiments of the present application. Any modification, equivalent replacement, and improvement made by those skilled in the art without departing from the scope and essence of the embodiments of the present application shall be within the scope of rights of the embodiments of the present application.

Claims

1. A method for storing a memory firmware log, characterized in that The method includes: Obtaining a log file generated by the operation of the firmware of the memory, where the log file includes at least one original log entry, and each original log entry includes the value of at least one log parameter; For each of the original log entries, determining a binary index corresponding to the original log entry based on a preset rule, and converting the value of the log parameter corresponding to the original log entry into a binary parameter value; Generating a binary log file corresponding to the log file, where the binary log file includes the binary indexes and binary parameter values corresponding to all the original log entries in the log file; Storing the binary log file in a storage medium.

2. The method according to claim 1, characterized in that The determining the binary index corresponding to the original log entry based on the preset rule includes: Obtaining a preset parsing dependency file, where the parsing dependency file includes multiple log entry records and the binary index corresponding to each log entry record; Searching in the parsing dependency file for the log entry record corresponding to the original log entry, and determining the binary index corresponding to the original log entry based on the log entry record.

3. The method according to claim 2, wherein Before obtaining the preset parsing dependency file, the method further includes: Scanning the source code of the firmware of the memory through a script tool to obtain at least one log interface function used in the source code; Extracting the log entry records based on the log interface function, and creating a corresponding binary index for the log entry records; Generating the parsing dependency file, where the parsing dependency file includes the log entry records and the binary indexes corresponding to the log entry records.

4. The method according to claim 3, characterized in that The parsing dependency file further includes the number of log parameters; after extracting the log entry records based on the log interface function, the method further includes: Determining the number of log parameters according to the log parameters included in the log entry records.

5. The method according to claim 1, wherein The length of the binary index is fixed to a first length, and the length of the binary parameter value is fixed to a second length.

6. A method for parsing a memory firmware log, characterized in that, The method includes: Obtaining a binary log file from a storage medium, where the binary log file includes at least one binary log entry, and each binary log entry includes a corresponding binary index and binary parameter value; Invoking a parsing dependency file, where the parsing dependency file includes multiple binary indexes, the log entry records corresponding to the binary indexes, and each log entry record includes at least one log parameter; For each of the binary log entries, based on the binary index corresponding to the binary log entry, searching in the parsing dependency file for the log entry record corresponding to the binary log entry, and replacing the log parameter in the log entry record with the binary parameter value corresponding to the binary log entry to obtain an original log entry.

7. The method for parsing a memory firmware log according to claim 6, wherein The length of the binary index is fixed to a first length, and the length of the binary parameter value is fixed to a second length; the parsing dependency file further includes the number of log parameters corresponding to the binary index; Extracting the corresponding binary index from the binary log entry based on the first length; Find the log entry record corresponding to the binary log entry and the number of log parameters from the parsed dependency file; Based on the second length and the number of log parameters, extract all the binary parameter values corresponding to the binary log entry from the binary log entry, and replace the log parameters corresponding to the binary parameter values in the log entry record to obtain the original log entry.

8. A memory firmware log management system, the system comprising a storage module and a parsing module, wherein, The storage module includes: A log file acquisition unit, configured to acquire a log file generated by the firmware operation of the memory, where the log file includes at least one original log entry, and each original log entry includes the value of at least one log parameter; A log entry encoding unit, configured to, for each original log entry, determine the binary index corresponding to the original log entry based on a preset rule, and convert the value of the log parameter corresponding to the original log entry into a binary parameter value; A log file generation unit, configured to generate a binary log file corresponding to the log file, where the binary log file includes the binary indexes and binary parameter values corresponding to all the original log entries in the log file; A storage unit, configured to store the binary log file in a storage medium; The parsing module includes: A log file acquisition unit, configured to acquire a binary log file from a storage medium, where the binary log file includes at least one binary log entry, and each binary log entry includes a corresponding binary index and binary parameter value; A parsing call unit, configured to call a parsed dependency file, where the parsed dependency file includes multiple binary indexes and the log entry records corresponding to the binary indexes, and each log entry record includes at least one log parameter; A log entry parsing unit, configured to, for each binary log entry, based on the binary index corresponding to the binary log entry, find the log entry record corresponding to the binary log entry from the parsed dependency file, and replace the log parameter in the log entry record with the binary parameter value corresponding to the binary log entry to obtain the original log entry.

9. An electronic device, characterized in that, Includes: One or more processors; A memory, on which one or more programs are stored. When the one or more programs are executed by the one or more processors, the one or more processors implement the memory firmware log storage method according to any one of claims 1-5, or the memory firmware log parsing method according to any one of claims 6-7.

10. A computer-readable storage medium, characterized in that, On which a computer program is stored, and when the program is executed by a processor, it implements the memory firmware log storage method according to any one of claims 1-5, or the memory firmware log parsing method according to any one of claims 6-7.