Log storage method and device, smart speaker and cloud server

By establishing a correspondence between log strings and unique identifiers in smart speakers, the problem of traditional log storage methods occupying large storage space is solved, and efficient and storage-space-saving log storage is achieved, which is suitable for embedded devices such as smart speakers.

CN113656277BActive Publication Date: 2025-09-26ALIBABA GROUP HOLDING LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202010395417.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-05-12
Publication Date
2025-09-26
Estimated Expiration
2040-05-12

AI Technical Summary

Technical Problem

Traditional log storage methods occupy a large amount of storage space and consume high computing power, which makes it difficult to meet the storage needs of embedded devices, especially the limited storage space and computing power of smart speakers.

Method used

By establishing a correspondence between log strings and unique identifiers, only the unique identifiers are stored instead of the original log strings, saving storage space. The storage solution is optimized through collaborative storage between smart speakers and cloud servers.

Benefits of technology

It significantly reduces storage space usage, improves the storage efficiency of embedded devices, avoids the consumption of computing power by complex compression algorithms, and is suitable for the storage needs of smart speakers.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113656277B_ABST
    Figure CN113656277B_ABST
Patent Text Reader

Abstract

This application discloses a log storage method and device, as well as a smart speaker and cloud server. When storing log files, embodiments of this application store only a brief unique identifier corresponding to the log string, significantly saving storage space and consuming no additional computing power. The log storage method provided by this application achieves simple and efficient log storage.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to but is not limited to data processing technology, and in particular to a log storage method and device, a smart speaker, and a cloud server. Background Art

[0002] Generally, embedded devices need to use offline logs to analyze problems.

[0003] The traditional log storage method is to directly write log strings into text. For example, the string "TmallGenie system in it successfully" requires 37 bytes of storage space. This log storage method takes up a large amount of storage space.

[0004] Alternatively, a compression tool may be further used to compress the generated log files before storing them. However, adding algorithm compression consumes more computing power, which may affect the normal application functions of the embedded device. Summary of the Invention

[0005] The present application provides a log storage method and device, a smart speaker, and a cloud server, which can simply and efficiently store logs.

[0006] An embodiment of the present invention provides a log storage method, including:

[0007] Obtain log information by debugging the application;

[0008] According to the log information obtained by debugging, a corresponding relationship between the log string included in the log information and the unique identifier is established;

[0009] The log is stored according to the unique identifier corresponding to the log string in the established correspondence.

[0010] In an exemplary embodiment, establishing a correspondence between a log string included in the log information and a unique identifier includes:

[0011] During the compilation process of the application, the compiled executable file is processed according to the log information obtained by debugging to obtain a log string in the executable file;

[0012] Assign a unique identifier to each log string in the obtained executable file;

[0013] The corresponding relationship between each log string in the executable file and its unique identifier is stored.

[0014] In an exemplary embodiment, processing the compiled executable file according to the log information obtained by debugging includes:

[0015] The log information obtained by the debugging is compared with the log information in the executable file, and a log string that is the same as the log string in the log information obtained during the debugging process is extracted from the log information in the executable file, and the extracted log string is the log string in the obtained executable file.

[0016] In an exemplary embodiment, establishing a correspondence between a log string included in the log information and a unique identifier includes:

[0017] During the operation of the application, the address pointer of the format control string in the log information obtained from the log interface is used as the unique identifier of the log string included in the log information;

[0018] The corresponding relationship between the log character string included in the log information and the unique identifier is established.

[0019] In an exemplary embodiment, storing the unique identifier corresponding to the log string in the established correspondence relationship includes:

[0020] During the operation of the application, according to the established corresponding relationship, the format control character string in the log information obtained from the log interface is replaced with the corresponding unique identifier and written into the log file.

[0021] In an exemplary embodiment, the method further includes:

[0022] When viewing the log, the stored unique identifier is converted into a log string according to the established corresponding relationship.

[0023] In an exemplary embodiment, the unique identifier is a symbol used to distinguish different log character strings, including: a number, a combination of characters, a combination of numbers and characters, and an address pointer.

[0024] The present application also provides a computer-readable storage medium storing computer-executable instructions, wherein the computer-executable instructions are used to execute any of the log storage methods described above.

[0025] The present application also provides a device for constructing a high-precision map, including a memory and a processor, wherein the memory stores the following instructions that can be executed by the processor: for executing the steps of any of the log storage methods described above.

[0026] This application also provides a log storage method, including:

[0027] The smart speaker obtains log information by debugging the application;

[0028] According to the log information obtained by debugging, a corresponding relationship between the log string included in the log information and the unique identifier is established;

[0029] The log is stored according to the unique identifier corresponding to the log string in the established correspondence relationship;

[0030] When viewing the log, the stored unique identifier is converted into a log string according to the established corresponding relationship.

[0031] In an exemplary embodiment, the method further includes:

[0032] The smart speaker determines that its own storage space is insufficient, and forwards its own log information to one or more smart speakers belonging to the same account as the smart speaker according to the unique identifier.

[0033] In an exemplary embodiment, forwarding and storing the own log information in one or more smart speakers belonging to the same account as the smart speaker includes:

[0034] The smart speaker randomly forwards its own log information to one or more smart speakers belonging to the same account as the smart speaker itself.

[0035] In an exemplary embodiment, forwarding the own log information to one or more smart speakers belonging to the same account as the own includes:

[0036] The smart speaker obtains, from the cloud server, usage of storage space of smart speakers belonging to the same account as the smart speaker;

[0037] Select one or more smart speakers with more remaining storage space from the smart speakers belonging to the same account as the smart speaker;

[0038] The smart speaker forwards and stores its own log information in one or more selected smart speakers according to the unique identifier.

[0039] In an exemplary embodiment, the method further includes:

[0040] The smart speaker periodically feeds back the storage space information of its own log information to the cloud server.

[0041] The present application further provides a smart speaker, comprising a memory and a processor, wherein the memory stores the following instructions that can be executed by the processor: for executing the steps of any of the log storage methods described above.

[0042] This application also provides a log storage method, including:

[0043] The smart speaker receives log information based on the unique identifier from the smart speaker belonging to the same account as the smart speaker;

[0044] Stores received log information.

[0045] In an exemplary embodiment, the method further includes:

[0046] The smart speaker periodically feeds back the storage space information of its own log information to the cloud server.

[0047] The present application further provides a smart speaker, comprising a memory and a processor, wherein the memory stores the following instructions that can be executed by the processor: for executing the steps of any of the above-mentioned log storage methods.

[0048] This application also provides a log storage method, including:

[0049] The cloud server receives and stores storage space information of the smart speaker's own log information periodically fed back by the smart speaker;

[0050] Upon receiving a request from a smart speaker, information about the storage space usage of smart speakers belonging to the same account as the smart speaker that initiated the request is sent to the smart speaker that initiated the request.

[0051] In an exemplary embodiment, the method further includes:

[0052] The cloud server receives and stores log information from the smart speaker based on the unique identifier.

[0053] The present application further provides a cloud server, comprising a memory and a processor, wherein the memory stores the following instructions executable by the processor: for executing the steps of any of the above-mentioned log storage methods.

[0054] The present application further provides a log storage device, comprising: a debugging module, a creation module, and a storage processing module; wherein,

[0055] The debugging module is used to obtain log information by debugging the application;

[0056] Establishing a module for establishing a correspondence between a log string included in the log information and a unique identifier based on the log information obtained by debugging;

[0057] The storage processing module is used to store the log according to the unique identifier corresponding to the log character string in the established corresponding relationship.

[0058] The embodiment of the present application stores only a short unique identifier corresponding to the log string when storing the log file, thereby greatly saving storage space and not consuming additional computing power. The log storage method provided by the present application realizes the storage of logs in a simple and efficient manner.

[0059] Furthermore, in the corresponding relationship established in the embodiment of the present application, the log character strings will not appear repeatedly, so the corresponding relationship will only occupy a very small storage space.

[0060] Other features and advantages of the present invention will be described in the following description, and in part will become apparent from the description, or will be understood by practicing the present invention. The purposes and other advantages of the present invention can be realized and obtained by the structures particularly pointed out in the description, claims and drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0061] The accompanying drawings are used to provide a further understanding of the technical solution of the present application and constitute a part of the specification. Together with the embodiments of the present application, they are used to explain the technical solution of the present application and do not constitute a limitation on the technical solution of the present application.

[0062] Figure 1 This is a flowchart of an embodiment of the log storage method of the present application;

[0063] Figure 2 This is a schematic diagram of an embodiment of an application scenario of the log storage method of the present application;

[0064] Figure 3 This is a schematic diagram of the composition structure of the log storage device of this application. DETAILED DESCRIPTION

[0065] To make the purpose, technical solutions and advantages of this application more clear, the embodiments of this application will be described in detail below with reference to the accompanying drawings. It should be noted that, unless there is a conflict, the embodiments and features in the embodiments of this application can be combined with each other in any way.

[0066] In a typical configuration of the present application, a computing device includes one or more processors (CPUs), input / output interfaces, network interfaces, and memory.

[0067] Memory may include non-permanent storage in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. Memory is an example of a computer-readable medium.

[0068] Computer-readable media includes permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. The information can be computer-readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic cassettes, magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer-readable media does not include non-transitory media such as modulated data signals and carrier waves.

[0069] The steps shown in the flowcharts of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions. Also, although a logical order is shown in the flowcharts, in some cases, the steps shown or described can be performed in an order different from that shown here.

[0070] For Linux projects (128MB to 256MB flash memory), the log storage methods provided in related art can still meet the storage requirements. However, for real-time operating system (RTOS) projects, the inventors of this application discovered that the total system storage space is only 8MB to 16MB, leaving very limited space for the log system, typically only a few hundred KB. RTOSes generally have limited computing power and are not suitable for running complex compression algorithms. Therefore, a simpler and more efficient log storage method is needed—that is, a log storage method that does not require a complex compression process but still achieves good compression results.

[0071] Figure 1 This is a flow chart of an embodiment of the log storage method of the present application, as shown in FIG. Figure 1 As shown, including:

[0072] Step 100: Obtain log information by debugging the application.

[0073] In an exemplary embodiment, this step may include:

[0074] During debugging of an application, the application (also called application code) is written into a log file through a log interface call to obtain the log information.

[0075] In an exemplary embodiment, the log interface may include various open source log systems, log interfaces customized by private systems, and the like.

[0076] Step 101: establishing a correspondence between a log string included in the log information and a unique identifier based on the log information obtained by debugging.

[0077] In an exemplary embodiment, step 101 may include:

[0078] During the compilation process of the application, the compiled executable file is processed according to the log information obtained by debugging to obtain the log string in the executable file;

[0079] Assign a unique identifier to each log string in the obtained executable file;

[0080] Stores the correspondence between each log string in the executable file and its unique identifier.

[0081] In an exemplary embodiment, processing the compiled executable file according to the log information obtained from debugging may include:

[0082] The log information obtained by debugging is compared with the log information in the executable file, and a log string that is the same as the log string in the log information obtained during the debugging process is extracted from the log information in the executable file.

[0083] In an exemplary embodiment, step 101 may include:

[0084] During the running of the application, the address pointer of the format control string in the log information obtained from the log interface is used as the unique identifier of the log string included in the log information;

[0085] Establish a correspondence between the log string included in the log information and the unique identifier.

[0086] The unique identifier in this application can be any form of symbol that can be used to distinguish different log strings, such as: a number, a combination of characters, a combination of numbers and characters, an address pointer, etc. The simpler the unique identifier, the more storage space it can save.

[0087] In an exemplary embodiment, the unique identifier can be dynamically expanded according to the application scenario requirements, thereby improving the adaptability of the log storage method of the present application.

[0088] In the corresponding relationship established in the embodiment of the present application, the log character strings will not appear repeatedly, so the corresponding relationship occupies very little storage space.

[0089] Step 102: Store the log according to the unique identifier corresponding to the log string in the established correspondence.

[0090] In one exemplary embodiment, step 102 may include:

[0091] During the operation of the application, according to the established correspondence, the format control string in the log information obtained from the log interface is replaced with the corresponding unique identifier and written into the log file.

[0092] When storing log files in the embodiment of the present application, only a short unique identifier corresponding to the log string is stored, thereby greatly saving storage space and not consuming additional computing power.

[0093] The log storage method provided in this application implements log storage in a simple and efficient manner.

[0094] In an exemplary embodiment, for an application scenario where multiple smart devices interact, logs can be stored in a local storage space and uploaded to the cloud periodically, reducing the pressure on cloud access.

[0095] In an exemplary embodiment, the present application may further include:

[0096] When viewing the log, the stored unique identifier is converted into a log string based on the established correspondence.

[0097] Taking smart speakers as an example, the total storage space of smart speaker systems is usually only 8MB to 16MB, of which the space left for the log system is very limited, generally only a few hundred KB, such as 500KB. For smart speakers used for real-time interaction, the computing power is generally limited, and it is not suitable for running complex compression algorithms to process log information. However, the log storage method provided in the embodiment of the present application does not require a complex compression process and has a good compression effect. It is simple and very suitable for the application environment of smart speakers. The inventors of the present application have proved through experiments that for such smart speakers, if the compression algorithm in the relevant technology is used to store log information, the space left for the log system can be equivalent to being expanded by about 10 times the original amount. However, if the log storage method provided in the embodiment of the present application is adopted, that is, when storing log files, only a short unique identifier corresponding to the log string is stored, the space left for the log system can be equivalent to being expanded by about 20 times the original amount.

[0098] The present application also provides a computer-readable storage medium storing computer-executable instructions, wherein the computer-executable instructions are used to execute any of the above log storage methods.

[0099] The present application further provides a device for implementing log storage, comprising a memory and a processor, wherein the memory stores the following instructions executable by the processor: for executing the steps of any of the above log storage methods.

[0100] Taking the establishment of a correspondence between a log string and a unique identifier in the compilation process of an application as an example, the following may be included:

[0101] First, call the log interface in the application code to obtain log information.

[0102] Next, an empty str2id table, such as table.c, is compiled to generate the origin.elf file. A script can be used to parse and extract the string table in origin.elf. Based on the log information obtained by calling an open-source logging system interface, the log information of non-logging strings in origin.elf is removed. Each remaining log string in the string table is assigned a unique ID and a str2id table is generated to store the corresponding relationship between the log string and the unique identifier. The key-value pairs in the generated str2id table are placed in str2id.c and compiled into the table.o file. The empty table.o is replaced with the new table.o, and the entire file is linked to form the final.elf file. The elf file is a file format used for binary files, executable files, object code, shared libraries, and core dumps.

[0103] Then, run the final.elf file, replace the format control string in the log information obtained from an open source logging system interface with the corresponding ID through table lookup, append the numerical value and the pointer of the static string parameter in the obtained log information after the ID in a fixed format, and then store it in the file. For example, for the log information obtained from an open source logging system interface ("Tmall Genie system init successfully: %d", 8), it will be converted into "1-8" according to the above method and written to the file.

[0104] In this way, when viewing the log, the read log is converted into the original log according to the established correspondence between the log string and the unique identifier, and the result is: Tmall Genie system init successfully: 8.

[0105] Taking the example of establishing a correspondence between a log string and a unique identifier in the running of an application, the following may be included:

[0106] First, call the log interface in the application code to obtain log information.

[0107] Next, during application execution, the pointer to the format control string in the log message obtained from an open-source logging system interface is used as the unique identifier for the format control string and stored. The obtained numeric value and pointer to the static string parameter in the log message are appended to the unique identifier and stored as a single line. For example, the log message ("Tmall Genie system init successfully: %d",8") obtained from an open-source logging system interface would be converted to "200022008" using the above method and written to the binary file. 20002200 is the address pointer of the format control string, which can be viewed in the ELF file.

[0108] In this way, when viewing the log, the read log is converted into the original log according to the established correspondence between the log string and the unique identifier and the elf file, and the result is: Tmall Genie system init successfully: 8.

[0109] The following uses an embedded device such as a smart speaker as an example of applying the log storage method provided by the embodiment of the present application. In order to more efficiently store the log information of the smart speaker, the following processing is performed:

[0110] During the code development phase, when debugging the smart speaker application, log information is obtained through a log interface call, such as AGLOG("tmall genie system receive message from voip: message content....."). The length of the message content may vary depending on the actual voice input, and may be up to thousands of bytes. The longer the message content, the more storage space-saving the log storage method provided by the embodiment of the application can demonstrate. In this embodiment, it is assumed that the log information obtained through the log interface call, i.e., the message content, is 200 bytes long.

[0111] During the code compilation phase, when compiling the smart speaker application, a unique identifier is assigned to each log string in the compiled executable file based on the debugged log information. The corresponding relationship between each log string and its unique identifier is stored. In this embodiment, assume that the log message "tmallgenie system receive message from voip:message is....." is assigned an ID of 1, which occupies one byte. This log message is then stored in a corresponding relationship with ID = 1.

[0112] In this way, when the code runs to AGLOG("tmall genie system receive message from voip: message content....."), the ID, i.e. 1, can be written to the file through table lookup conversion. In other words, the log information stored at this time only occupies one byte.

[0113] In the case of a large amount of log information, the unique identifier can be dynamically expanded according to the requirements of the application scenario. For example, in the above embodiment, the ID occupies one byte. In order to distinguish more different log information, the bytes occupied by the ID can be increased to, for example, two bytes according to the requirements of the application scenario to improve the adaptability of the log storage method of this application.

[0114] Figure 2 This is a schematic diagram of an embodiment of an application scenario of the log storage method of this application, such as Figure 2 As shown, in this embodiment, taking the embedded device as a smart speaker as an example, it is assumed that smart speaker 1, smart speaker 2, smart speaker 3 and smart speaker 4 are bound to the same user, such as user A, that is, smart speaker 1, smart speaker 2, smart speaker 3 and smart speaker 4 belong to the same account; smart speaker 5 is bound to user B; smart speaker 6 is bound to user C.

[0115] like Figure 2 As shown, if the smart speaker 1 determines that it does not have enough storage space to store log information, then the smart speaker 1 can act as a sender through the network and forward the log information of the smart speaker 1 itself to other smart speakers under the same account as the smart speaker 1 according to the unique identifier in this application, that is, Figure 2 The smart speaker 2, and / or smart speaker 3, and / or smart speaker 4 serve as the receiving end.

[0116] In one exemplary embodiment, in combination Figure 2 , smart speaker 1 can randomly select one or more smart speakers from smart speaker 2, smart speaker 3, and smart speaker 4 to store the log information of smart speaker 1, such as Figure 2 In this case, when the sending smart speaker determines that it does not have enough storage space to store log information, it randomly selects one or more smart speakers from other smart speakers under the same account as itself as the receiving smart speaker. It then forwards and stores the log information of smart speaker 1 to the receiving smart speaker based on the unique identifier in this application. The receiving smart speaker then stores the received log information locally.

[0117] In one exemplary embodiment, in combination Figure 2, the smart speakers under the same account, such as smart speaker 1, smart speaker 2, smart speaker 3 and smart speaker 4, can also periodically feed back the storage space information of their own log information to the cloud server. In this way, when smart speaker 1 needs to transfer log information, it can first obtain the storage space usage of smart speaker 2, smart speaker 3 and smart speaker 4 from the cloud server, and then select one or more smart speakers with more remaining storage space as the forwarding destination device of the log information, such as Figure 2 As shown, the log information of smart speaker 1 itself is forwarded and stored in the selected smart speaker 3 and smart speaker 4 with more remaining storage space according to the unique identifier in this application. In this case, when the smart speaker as the sending end determines that it does not have enough storage space to store the log information, it requests the cloud server to obtain the storage space usage of other smart speakers belonging to the same account as itself; selects one or more smart speakers with more remaining storage space as the receiving end; and forwards and stores the log information of smart speaker 1 itself to the smart speaker as the receiving end according to the unique identifier in this application. The smart speaker as the receiving end will store the received log information locally. After receiving the request from the smart speaker as the receiving end, the cloud server will send the storage space usage of other smart speakers belonging to the same account as the receiving end to the smart speaker as the receiving end. Moreover, both the smart speaker as the receiving end and the smart speaker as the receiving end will periodically feed back the storage space information of their own log information to the cloud server.

[0118] Figure 3 This is a schematic diagram of the composition structure of the log storage device of this application, such as Figure 3 As shown, it includes: debugging module, establishment module, storage processing module; wherein,

[0119] The debugging module is used to obtain log information by debugging the application;

[0120] Establishing a module for establishing a correspondence between a log string included in the log information and a unique identifier based on the log information obtained by debugging;

[0121] The storage processing module is used to store the log according to the unique identifier corresponding to the log character string in the established corresponding relationship.

[0122] In an exemplary embodiment, the establishment module is specifically configured to:

[0123] During the compilation process of the application, the compiled executable file is processed according to the log information obtained by debugging to obtain the log string in the executable file; a unique identifier is assigned to each log string in the obtained executable file; and the corresponding relationship between each log string in the executable file and its unique identifier is stored.

[0124] In an exemplary embodiment, the establishment module is specifically configured to:

[0125] During the running of the application, the address pointer of the format control string in the log information obtained from the log interface is used as the unique identifier of the log string included in the log information;

[0126] Establish a correspondence between the log string included in the log information and the unique identifier.

[0127] In an exemplary embodiment, the storage processing module is specifically configured to:

[0128] During the operation of the application, according to the established correspondence, the format control string in the log information obtained from the log interface is replaced with the corresponding unique identifier and written into the log file.

[0129] In an exemplary embodiment, the storage processing module is further configured to:

[0130] When viewing the log, the stored unique identifier is converted into a log string based on the established correspondence.

[0131] Although the embodiments disclosed in this application are as described above, the contents described are merely embodiments adopted to facilitate understanding of this application and are not intended to limit this application. Any person skilled in the art to which this application belongs may make any modifications and changes in the form and details of the implementation without departing from the spirit and scope disclosed in this application. However, the scope of patent protection of this application shall still be based on the scope defined by the attached claims.

Claims

1. A log storage method, comprising: The smart speaker obtains log information by debugging the application; According to the log information obtained by debugging, a corresponding relationship between the log string included in the log information and the unique identifier is established; The log is stored according to the unique identifier corresponding to the log string in the established correspondence relationship; The method also includes: the smart speaker determines that its own storage space is insufficient, and the smart speaker randomly forwards its own log information to one or more smart speakers belonging to the same account as the smart speaker, including: the smart speaker obtains the storage space usage of the smart speakers belonging to the same account as the smart speaker from the cloud server; selects one or more smart speakers with more remaining storage space from the smart speakers belonging to the same account as the smart speaker; and the smart speaker forwards and stores the log information of the smart speaker itself in the selected one or more smart speakers according to the unique identifier.

2. The log storage method according to claim 1, wherein: The establishing of a correspondence between a log string included in the log information and a unique identifier includes: During the compilation process of the application, the compiled executable file is processed according to the log information obtained by debugging to obtain a log string in the executable file; Assign a unique identifier to each log string in the obtained executable file; The corresponding relationship between each log string in the executable file and its unique identifier is stored.

3. The log storage method according to claim 2, wherein: The processing of the compiled executable file according to the log information obtained from debugging includes: The log information obtained by the debugging is compared with the log information in the executable file, and a log string that is the same as the log string in the log information obtained during the debugging process is extracted from the log information in the executable file, and the extracted log string is the log string in the obtained executable file.

4. The log storage method according to claim 1, wherein: The establishing of a correspondence between a log string included in the log information and a unique identifier includes: During the operation of the application, the address pointer of the format control string in the log information obtained from the log interface is used as the unique identifier of the log string included in the log information; The corresponding relationship between the log character string included in the log information and the unique identifier is established.

5. The log storage method according to claim 1, wherein: The storing of the log according to the unique identifier corresponding to the log string in the established corresponding relationship includes: During the operation of the application, according to the established corresponding relationship, the format control character string in the log information obtained from the log interface is replaced with the corresponding unique identifier and written into the log file.

6. The log storage method according to any one of claims 1 to 5, further comprising: When viewing the log, the stored unique identifier is converted into a log string according to the established corresponding relationship.

7. The log storage method according to claim 1, wherein: The unique identifier is a symbol used to distinguish different log character strings, including: a number, a combination of characters, a combination of numbers and characters, and an address pointer.

8. The log storage method according to claim 1, further comprising: The smart speaker periodically feeds back the storage space information of its own log information to the cloud server.

9. A computer-readable storage medium storing computer-executable instructions, wherein the computer-executable instructions are used to execute the log storage method according to any one of claims 1 to 8.

10. A device for implementing log storage, comprising a memory and a processor, wherein: The memory stores the following instructions that can be executed by the processor: used to execute the steps of the log storage method described in any one of claims 1 to 8.

11. A smart speaker, comprising a memory and a processor, wherein: The memory stores the following instructions that can be executed by the processor: used to execute the steps of the log storage method described in any one of claims 1 to 8.

12. A log storage method, comprising: The smart speaker receives log information based on the unique identifier from the smart speaker belonging to the same account as the smart speaker; Store received log information; Wherein, the smart speaker is the smart speaker described in claim 11.

13. The log storage method according to claim 12, further comprising: The smart speaker periodically feeds back the storage space information of its own log information to the cloud server.

14. A smart speaker, comprising a memory and a processor, wherein: The memory stores the following instructions that can be executed by the processor: used to execute the steps of the log storage method described in claim 12 or claim 13.

15. A log storage method, comprising: The cloud server receives and stores storage space information of the smart speaker's own log information periodically fed back by the smart speaker; Upon receiving a request from a smart speaker, sending the usage of the storage space of the smart speakers belonging to the same account as the smart speaker that initiated the request to the smart speaker that initiated the request; Wherein, the smart speaker is the smart speaker described in claim 11 or 14.

16. The log storage method according to claim 15, further comprising: The cloud server receives and stores log information from the smart speaker based on the unique identifier.

17. A cloud server comprising a memory and a processor, wherein: The memory stores the following instructions that can be executed by the processor: used to execute the steps of the log storage method described in claim 15 or claim 16.

Citation Information

Patent Citations

  • Log generation method and system

    CN106648467A

  • Method and device for processing log file in smart loudspeaker box and smart loudspeaker box

    CN108182292A