WO2022166875A1 - Log storage method, communication apparatus, chip, and module device - Google Patents

Log storage method, communication apparatus, chip, and module device Download PDF

Info

Publication number
WO2022166875A1
WO2022166875A1 PCT/CN2022/074944 CN2022074944W WO2022166875A1 WO 2022166875 A1 WO2022166875 A1 WO 2022166875A1 CN 2022074944 W CN2022074944 W CN 2022074944W WO 2022166875 A1 WO2022166875 A1 WO 2022166875A1
Authority
WO
WIPO (PCT)
Prior art keywords
log information
terminal device
ddr
abnormality
flash
Prior art date
Application number
PCT/CN2022/074944
Other languages
French (fr)
Chinese (zh)
Inventor
郑建华
Original Assignee
展讯通信(上海)有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 展讯通信(上海)有限公司 filed Critical 展讯通信(上海)有限公司
Publication of WO2022166875A1 publication Critical patent/WO2022166875A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3065Monitoring arrangements determined by the means or processing involved in reporting the monitored data
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/14Error detection or correction of the data by redundancy in operation
    • G06F11/1402Saving, restoring, recovering or retrying
    • G06F11/1415Saving, restoring, recovering or retrying at system level
    • G06F11/1438Restarting or rejuvenating
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0638Organizing or formatting or addressing of data
    • G06F3/0643Management of files
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0646Horizontal data movement in storage systems, i.e. moving data in between storage devices or systems
    • G06F3/0652Erasing, e.g. deleting, data cleaning, moving of data to a wastebasket
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0668Interfaces specially adapted for storage systems adopting a particular infrastructure
    • G06F3/0671In-line storage system
    • G06F3/0673Single storage device
    • G06F3/0679Non-volatile semiconductor memory device, e.g. flash memory, one time programmable memory [OTP]

Definitions

  • the present application relates to the field of communication technologies, and in particular, to a log storage method, a communication device, a chip and a module device.
  • the present application discloses a log saving method, a communication device, a chip and a module device, which are beneficial to quickly save log information.
  • the present application provides a log saving method, which is applied to a terminal device.
  • the method includes: the terminal device detects whether there is an abnormality in the system; and when the terminal device detects an abnormality, save the log information corresponding to the above exception to a Double data rate synchronous dynamic random access memory DDR; terminal equipment restarts the above system.
  • saving the log information corresponding to the above exception in the double data rate synchronous dynamic random access memory DDR includes: the terminal device saves the above log information in a preset storage space in the DDR, and the preset storage The space is the storage space reserved by DDR for storing abnormal log information.
  • the terminal device detecting whether the system is abnormal includes: the terminal device detecting whether the subsystem is abnormal; and the terminal device restarting the system includes: the terminal device restarting the subsystem.
  • the method further includes: the terminal device uploads the log information stored in the DDR to the server.
  • the method further includes: the terminal device saves the log information in the non-volatile memory Flash.
  • the above-mentioned terminal device saves the log information in the non-volatile memory Flash, which includes: when the terminal device is in an idle state, save the above-mentioned log information in the Flash.
  • the method includes: the terminal device deletes the log information in the DDR.
  • the method further includes: uploading the log information stored in the above-mentioned Flash to the server by the terminal device.
  • the method after uploading the log information stored in the Flash to the server, the method includes: the terminal device deletes the log information in the Flash.
  • the present application provides a communication device, which includes a processing unit and a storage unit, wherein: the processing unit is used to detect whether there is an abnormality in the system; the storage unit is used to store the above The log information corresponding to the abnormality is stored in the double data rate synchronous dynamic random access memory DDR; the processing unit is also used for restarting the system.
  • the storage unit is specifically configured to: save the log information in a preset storage space in the DDR, where the preset storage space is a storage space reserved by the DDR for storing abnormal log information.
  • the above-mentioned processing unit is specifically used for: detecting whether the subsystem is abnormal; and the above-mentioned processing unit is specifically used for: restarting the above-mentioned subsystem.
  • the above-mentioned processing unit is further configured to: upload the log information stored in the above-mentioned DDR to the server.
  • the above-mentioned storage unit is further configured to: save the above-mentioned log information in the non-volatile memory Flash.
  • the above-mentioned storage unit is specifically configured to: in the case of being in an idle state, save the above-mentioned log information into the above-mentioned Flash.
  • the above-mentioned processing unit is further configured to: delete the above-mentioned log information in the above-mentioned DDR.
  • the above-mentioned processing unit is further configured to: upload the log information saved in the above-mentioned Flash to the server.
  • the above-mentioned processing device is further configured to: delete the log information in the above-mentioned Flash.
  • the present application provides a chip, which is used to detect whether there is an abnormality in the system; the chip is also used to save the log information corresponding to the above abnormality to a double data rate when an abnormality is detected. Synchronous dynamic random access memory DDR; this chip is also used to restart the above system.
  • the application provides a module device, the module device includes a communication module, a power module, a storage module and a chip module, wherein: the power module is used to provide electrical energy for the module device ;
  • the storage module is used to store data and instructions;
  • the communication module is used for internal communication of the module device, or for the module device to communicate with external devices;
  • the chip module is used to: detect whether there is an abnormality in the system ; In the case of detecting an abnormality, save the log information corresponding to the above abnormality in the double data rate synchronous dynamic random access memory DDR; and restart the above system.
  • FIG. 1 is a flowchart of a method for saving logs according to an embodiment of the present application
  • FIG. 3 provides a communication device according to an embodiment of the present application
  • FIG. 4 is another communication device provided by an embodiment of the present application.
  • FIG. 5 is a schematic structural diagram of a module device according to an embodiment of the present application.
  • Double data rate synchronous dynamic random access memory double data rate SDRAM, DDR
  • DDR is a double-rate synchronous dynamic random access memory (SDRAM), that is, the data transfer rate of DDR is twice as high as that of SDRAM. This doubling rate is not simply doubling the clock cycle, but DDR can transfer data twice in the clock cycle that SDRAM transfers data once. Therefore, DDR has the characteristics of fast access and easy to read and write.
  • SDRAM synchronous dynamic random access memory
  • Non-volatile memory Flash EEPROM Memory, Flash
  • Flash can also be called “flash memory” or “flash memory”, which is essentially an electrically erasable programmable read-only memory (EEPROM), which combines random access memory (Random access memory,
  • EEPROM electrically erasable programmable read-only memory
  • RAM random access memory
  • ROM read only memory
  • FIG. 1 is a flowchart of a method for saving logs according to an embodiment of the present application.
  • the log saving method can be implemented by a terminal device or by a chip in the terminal device.
  • the terminal device is an entity on the user side for receiving or transmitting signals, such as a mobile phone.
  • a terminal device may also be called a terminal (terminal), a user equipment (UE), a mobile station (mobile station, MS), a mobile terminal (mobile terminal, MT), and the like.
  • the terminal device can be a mobile phone (mobile phone), a wearable device, a tablet computer (Pad), a computer with a wireless transceiver function, a virtual reality (VR) terminal device, an augmented reality (AR) terminal device, industrial Wireless terminals in industrial control, wireless terminals in self-driving, wireless terminals in remote medical surgery, wireless terminals in smart grid, transportation security safety), wireless terminals in smart cities, wireless terminals in smart homes, to support enhanced Machine-Type communication (eMTC) and/or to support general purpose Terminal equipment of long term evolution (LTE) of mobile communication technology, etc.
  • eMTC Machine-Type communication
  • LTE long term evolution
  • the log saving method includes but is not limited to the following S101 to S103 , and the method shown in FIG. 1 is described by taking the application to the above-mentioned terminal device as an example.
  • the terminal device detects whether the system is abnormal.
  • the terminal device can always detect whether there is an abnormality in the system; if there is an abnormality, the terminal device can take timely measures (for example, restart the system) to avoid more serious problems such as system crash, which affects the user experience.
  • the terminal device can detect whether there is an abnormality in the system by means of hardware or software. For example: configure a timer circuit in the terminal device, you can regularly check the internal situation of the chip in the system, and send a signal once an error occurs, such as a restart signal.
  • the log information corresponding to the above abnormality can be understood as log information of the corresponding system during the period from the moment when the terminal device detects the abnormality to the time when the terminal device takes measures to recover the abnormality.
  • the log information corresponding to the exception is stored separately.
  • the log information corresponding to the exception is less than all the log information, which can save the storage time; on the other hand, it is stored in a targeted manner.
  • the log information corresponding to the exception can be stored centrally, which is convenient for subsequent analysis of the abnormal situation and the abnormal solution.
  • saving the log information corresponding to the above exception in the DDR includes: the terminal device saves the above log information in a preset storage space in the DDR, where the preset storage space is reserved by the DDR for storage Storage space for exception log information.
  • the preset storage space is a dedicated storage space in the DDR and cannot be occupied by other information.
  • the storage space can only be used to store log information corresponding to the abnormal state, but cannot be used to store other types of information.
  • the DDR has the characteristics of fast access and easy read and write. Therefore, if a dedicated storage space is reserved in the DDR for use when an abnormality is detected, the corresponding log information can be stored more quickly.
  • the above-mentioned terminal equipment detecting whether the system is abnormal includes: the above-mentioned terminal equipment detecting whether the subsystem is abnormal; and the above-mentioned terminal equipment restarting the system includes: the terminal equipment restarting the above-mentioned subsystem.
  • the terminal device may choose to repair the abnormality by restarting the subsystem. In this way, the above exceptions can be fixed without affecting the user experience as much as possible.
  • the terminal device when the terminal device detects that the subsystem is abnormal, it can also choose to restart the system to repair the abnormality. For example, after the terminal device restarts the subsystem, if the above exception is not repaired, you can choose to restart the system.
  • the method further includes: the terminal device uploads the log information stored in the above-mentioned DDR to the server.
  • uploading the log information stored in the DDR by the terminal device to the server includes: uploading the log information stored in the DDR to the server when the terminal device is connected to a wireless network.
  • connecting to a wireless network can be understood as when the terminal device is in a Wi-Fi state. It should be noted that, when the terminal device is connected to the wireless network, the information in the DDR is uploaded to the server, which can save the user's traffic while ensuring the upload rate. Optionally, the terminal device can upload the information in the DDR to the server at any other time; for example, when the user's own traffic is sufficient, the user can choose the upload time by himself.
  • the method further includes: the terminal device saves the log information in the Flash.
  • Flash is the internal storage space of the terminal device.
  • the time for writing to the DDR is much shorter than the time for writing the Flash
  • the Flash has a larger capacity and can store more information. Therefore, after the terminal device takes restarting measures to repair the abnormality, the log information corresponding to the above abnormality can be saved in the Flash.
  • log information cannot be stored in DDR for a long time. For example, if an abnormality is detected in the system after the terminal device is restarted, the log information corresponding to the last abnormality in the DDR may be displayed. It is overwritten by the log information corresponding to the new exception; therefore, in order to ensure that the log information of the exception can be completely preserved, the log information stored in the DDR can be saved to the Flash as soon as possible.
  • the terminal device saves the above log information in the Flash, which includes: when the terminal device is in an idle state, save the above log information in the Flash.
  • the idle state can be understood as a state in which the terminal device is not running any background programs.
  • the log information saved in the DDR is saved in the Flash, which can effectively avoid occupying the background running space, thereby ensuring the user experience.
  • the method includes: the terminal device deletes the log information in the DDR.
  • the DDR itself cannot store the log information persistently, the log information in the DDR can be transferred to the Flash as soon as possible. After the Flash receives the above log information, it can delete the log information in the DDR for use when an exception occurs next time.
  • the above method further includes: uploading the log information saved in the above Flash to the server by the terminal device.
  • the above-mentioned Flash can also be used to store daily log information of the system and information other than log information.
  • the capacity of Flash is larger than that of DDR, if too much information is stored, its performance will still be affected to a certain extent. Therefore, Flash can upload the stored information to the server within a certain period, so that it can be easily searched or used when needed later.
  • the period for uploading log information may be set to T1, and the period for uploading other information may be set to T2.
  • T1 and T2 are both adjustable parameters, which are not limited in this application.
  • uploading the log information stored in the Flash to the server by the terminal device includes: uploading the log information stored in the Flash to the server when the terminal device is connected to a wireless network.
  • the terminal device when the terminal device is connected to the wireless network, the information in the Flash is uploaded to the server, which can save the user's traffic while ensuring the upload rate.
  • the terminal device can also upload the information in the Flash to the server at any other time; for example, when the user's own traffic is sufficient, the user can choose the upload time by himself.
  • the method after uploading the log information stored in the Flash to the server, the method includes: the terminal device deletes the log information in the Flash.
  • the previously stored information may be deleted.
  • timed deletion for example, set to delete information older than 6 months; or you can set quantitative deletion according to memory capacity, for example: when the information storage capacity reaches 50%, set to delete all information.
  • the log information corresponding to the exception can be quickly saved, and the log information can be effectively ensured to be uploaded to the server, so that the exception can be reported as soon as possible.
  • FIG. 2 is a flowchart of another log saving method provided by an embodiment of the present application.
  • the log saving method can be implemented by a terminal device or by a chip in the terminal device.
  • the log saving method includes, but is not limited to, the following S201 to S206 , and the method shown in FIG. 2 is described by taking the application to the above-mentioned terminal device as an example.
  • the terminal device reserves a dedicated storage space in the DDR
  • the terminal device detects whether the system is abnormal
  • whether the above-mentioned terminal device detection system is abnormal includes: whether the terminal device detects whether the subsystem is abnormal.
  • saving the log information corresponding to the abnormality in the DDR includes: when the terminal device detects that the subsystem is abnormal, saving the log information corresponding to the abnormality into the DDR.
  • restarting the system by the terminal device includes: restarting the subsystem by the terminal device.
  • the terminal device uploads the log information stored in the DDR to the server;
  • the terminal device saves the log information stored in the DDR to the Flash;
  • the terminal device may save the log information stored in the DDR to the Flash.
  • the user can set the subsequent operations of this mode according to requirements, which is not limited in this application.
  • S205 in FIG. 2 other steps that can be taken are not shown, which does not limit the embodiment of the present application.
  • the terminal device uploads the log information stored in the Flash to the server.
  • FIG. 3 is a schematic diagram of a communication device according to an embodiment of the present application.
  • the device may be a terminal device, or a device in the terminal device, or a device that can be used in combination with the terminal device.
  • the communication apparatus shown in FIG. 3 may include a processing unit 301 and a storage unit 302 .
  • the processing unit 301 is used for data processing;
  • the storage unit 302 is used for storing data. in:
  • the processing unit 301 is used to detect whether there is an abnormality in the system
  • the storage unit 302 is configured to save the log information corresponding to the abnormality in the double data rate synchronous dynamic random access memory DDR when an abnormality is detected;
  • the processing unit 301 is further configured to restart the above system.
  • the storage unit 302 is further configured to save the log information in a preset storage space in the DDR, where the preset storage space is a storage space reserved by the DDR for storing abnormal log information.
  • the aforementioned processing unit 301 is further configured to detect whether the subsystem is abnormal; and the aforementioned processing unit 301 is further configured to restart the aforementioned subsystem.
  • the above-mentioned communication apparatus further includes a communication unit, and the communication unit is configured to upload the log information stored in the above-mentioned DDR to the server.
  • the above-mentioned storage unit 302 is further configured to save the above-mentioned log information in the non-volatile memory Flash.
  • the above-mentioned storage unit 302 is further configured to save the above-mentioned log information in the Flash when the terminal device is in an idle state.
  • the above-mentioned processing unit 301 is further configured to delete the above-mentioned log information in the DDR.
  • the above-mentioned communication unit is further configured to upload the log information stored in the above-mentioned Flash to the server.
  • the above-mentioned processing unit 301 is further configured to delete the log information in the above-mentioned Flash.
  • each unit in the communication device shown in FIG. 3 may be combined into one or several other units, respectively or all, to form, or some unit(s) may be further divided into functions The same operation can be achieved without affecting the realization of the technical effects of the embodiments of the present application.
  • the above units are divided based on logical functions. In practical applications, the function of one unit can also be implemented by multiple units, or the functions of multiple units can be implemented by one unit. In other embodiments of the present application, the communication apparatus may also include other units, and in practical applications, these functions may also be implemented with the assistance of other units, and may be implemented by cooperation of multiple units.
  • the above communication device may be, for example, a chip or a chip module.
  • the modules included in the devices and products described in the above embodiments they may be software modules or hardware modules, or may be partly software modules and partly hardware modules.
  • each module contained therein may be implemented by hardware such as circuits, or at least some of the modules may be implemented by a software program that runs inside the chip
  • the remaining (if any) modules can be implemented by hardware such as circuits; for each device and product applied to or integrated in the chip module, each module contained therein can be implemented by hardware such as circuits.
  • different modules may be located in the same component (such as a chip, circuit module, etc.) or in different components of the chip module, or at least some modules may be implemented by a software program that runs on the processing integrated inside the chip module
  • the remaining (if any) modules can be implemented by hardware such as circuits; for each device and product applied to or integrated in the terminal, each module included can be implemented by hardware such as circuits, and different modules can be It is located in the same component (for example, chip, circuit module, etc.) or in different components in the terminal, or at least some of the modules can be implemented in the form of software programs that run on the processor integrated inside the terminal, and the rest (if any) Some modules can be implemented in hardware such as circuits.
  • FIG. 4 is another communication device 40 provided by an embodiment of the present application.
  • the communication apparatus may include a transceiver 401 , a processor 402 and a memory 403 .
  • the transceiver 401, the processor 402 and the memory 403 may be connected through a bus 404 or other means.
  • the bus is represented by a thick line in FIG. 4 , and the connection modes between other components are only for schematic illustration, and are not meant to be limited.
  • the bus can be divided into address bus, data bus, control bus and so on. For ease of presentation, only one thick line is used in FIG. 4, but it does not mean that there is only one bus or one type of bus.
  • the transceiver 401 may be a transceiver, a circuit, a bus, a module or other types of transceivers, and is used to communicate with other devices through a transmission medium.
  • the transceiver 401 is used in the communication apparatus 40 so that the communication apparatus 40 can communicate with other devices.
  • the processor 402 uses the transceiver 401 to send and receive data, and is used to implement the methods of the above method embodiments.
  • the coupling in the embodiments of the present application is an indirect coupling or communication connection between devices, units or modules, which may be in electrical, mechanical or other forms, and is used for information exchange between devices, units or modules.
  • the specific connection medium between the transceiver 401 , the processor 402 , and the memory 403 is not limited in the embodiments of the present application.
  • Memory 403 may include read-only memory and random access memory, and provides instructions and data to processor 402 . A portion of memory 403 may also include non-volatile random access memory.
  • the processor 402 can be a central processing unit (Central Processing Unit, CPU), and the processor 402 can also be other general-purpose processors, digital signal processors (Digital Signal Processor, DSP), application specific integrated circuit (Application Specific Integrated Circuit, ASIC) ), Field-Programmable Gate Array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc.
  • a general-purpose processor can be a microprocessor, alternatively, the processor 402 can also be any conventional processor or the like. in:
  • the memory 403 is used to store program instructions.
  • the processor 402 is used to call the program instructions stored in the memory 403, so as to:
  • the memory 403 is configured to save the above log information in a preset storage space in the DDR, where the preset storage space is a storage space reserved by the DDR for storing abnormal log information.
  • the processor 402 is configured to detect whether the subsystem is abnormal; and the processor 402 is further configured to restart the above-mentioned subsystem.
  • the transceiver 401 is configured to upload the log information stored in the above-mentioned DDR to the server.
  • the memory 403 is used to save the above log information in the non-volatile memory Flash.
  • the memory 403 is configured to save the above log information in the Flash when the terminal device is in an idle state.
  • the processor 402 is configured to delete the above log information in the DDR.
  • the transceiver 401 is configured to upload the log information saved in the above-mentioned Flash to the server.
  • the processor 402 is configured to delete the log information in the above-mentioned Flash.
  • a general-purpose computing device such as a computer including processing elements and storage elements such as a central processing unit (CPU), a random access storage medium (RAM), and a read only storage medium (ROM).
  • CPU central processing unit
  • RAM random access storage medium
  • ROM read only storage medium
  • a computer program (including program code) that executes the steps involved in the corresponding methods as shown in FIG. 1 and FIG. 2 , and implements the log saving method of the embodiment of the present application.
  • the computer program can be recorded on, for example, a computer-readable recording medium, and loaded in the above-mentioned computing apparatus through the computer-readable recording medium, and executed therein.
  • the principles and beneficial effects of the communication device for solving problems provided in the embodiments of the present application are similar to the principles and beneficial effects for solving problems of the communication devices in the method embodiments of the present application. Please refer to the principles and beneficial effects of the implementation of the method. For the sake of brevity, details are not repeated here.
  • Embodiments of the present application further provide a chip, where the chip can execute the relevant steps of the terminal device in the foregoing method embodiments.
  • the chip is used for: detecting whether there is an abnormality in the system; in the case of detecting the abnormality, saving the log information corresponding to the above-mentioned abnormality in the double data rate synchronous dynamic random access memory DDR; and restarting the above-mentioned system.
  • the above log information is saved to a preset storage space in the DDR, where the preset storage space is a storage space reserved by the DDR for storing abnormal log information.
  • the log information stored in the foregoing DDR is uploaded to the server.
  • the above log information is stored in the non-volatile memory Flash.
  • the above log information is saved in the Flash.
  • the above log information in the DDR is deleted.
  • the log information saved in the above-mentioned Flash is uploaded to the server.
  • the above-mentioned chip includes at least one processor, at least one first memory and at least one second memory; wherein, the at least one first memory and the at least one processor are interconnected through lines, and the first Instructions are stored in the memory; the at least one second memory and the at least one processor are interconnected through a line, and the data to be stored in the foregoing method embodiments are stored in the second memory.
  • each module contained therein may be implemented by hardware such as circuits, or at least some of the modules may be implemented by a software program that runs on the integrated circuit inside the chip.
  • the processor and the remaining (if any) modules can be implemented in hardware such as circuits.
  • FIG. 5 is a schematic structural diagram of a module device provided by an embodiment of the present application.
  • the module device 50 can perform the relevant steps of the terminal device in the foregoing method embodiments, and the module device 50 includes: a communication module 501 , a power module 502 , a storage module 503 and a chip module 504 .
  • the above-mentioned power module 502 is used to provide power for the module equipment;
  • the above-mentioned storage module 503 is used to store data and instructions;
  • the above-mentioned communication module 501 is used for internal communication of the module equipment, or for the module equipment to communicate with the outside The device communicates;
  • the above-mentioned chip module 504 is used for:
  • the above log information is saved to a preset storage space in the DDR, where the preset storage space is a storage space reserved by the DDR for storing abnormal log information.
  • the log information stored in the foregoing DDR is uploaded to the server.
  • the above log information is stored in the non-volatile memory Flash.
  • the above log information is saved in the Flash.
  • the above log information in the DDR is deleted.
  • the log information saved in the above-mentioned Flash is uploaded to the server.
  • each module contained therein can be implemented in hardware such as circuits, and different modules can be located in the same component of the chip module (such as a chip, a circuit module, etc.) or Among different components, or at least some of the modules can be implemented by a software program, the software program runs on the processor integrated inside the chip module, and the remaining (if any) part of the modules can be implemented by hardware such as circuits.
  • Embodiments of the present application further provide a computer-readable storage medium, where one or more instructions are stored in the computer-readable storage medium, and the one or more instructions are suitable for being loaded by a processor and executing the log saving method of the foregoing method embodiment.
  • Embodiments of the present application further provide a computer program product including instructions, which, when running on a computer, cause the computer to execute the log saving method of the above method embodiments.
  • the modules in the apparatus of the embodiment of the present application may be combined, divided and deleted according to actual needs.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Human Computer Interaction (AREA)
  • Quality & Reliability (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The present application discloses a log storage method, a communication apparatus, a chip, and a module device. The method comprises the steps: a terminal device detects whether an abnormality is present in a system (S101); in the case that the terminal device detects an abnormality, storing log information corresponding to the abnormality into a double data rate synchronous dynamic random access memory (DDR) (S102); the terminal device restarts the system (S103). By implementing the method provided by the present application, the log information can be quickly stored.

Description

一种日志保存方法、通信装置、芯片及模组设备A log storage method, communication device, chip and module device 技术领域technical field
本申请涉及通信技术领域,尤其涉及一种日志保存方法、通信装置、芯片及模组设备。The present application relates to the field of communication technologies, and in particular, to a log storage method, a communication device, a chip and a module device.
背景技术Background technique
在终端设备的使用过程中,可能会出现一些偶然发生的异常,这类异常与当时的网络环境,或者操作流程等相关,通常不会重复出现。若终端设备发生系统死机,或者通过重启等方式修复了上述异常,很可能会丢失当时的日志信息。由于缺少用户端异常情况对应的日志信息,会使得厂家无法及时或准确地找到该异常的解决方案。During the use of the terminal device, some occasional exceptions may occur. Such exceptions are related to the network environment or operation process at that time, and usually do not occur repeatedly. If the system crashes on the terminal device, or the above exception is repaired by restarting, the log information at that time may be lost. Due to the lack of log information corresponding to the abnormal situation on the user side, the manufacturer cannot find the solution to the abnormal situation in a timely or accurate manner.
因此如何快速地保存日志信息成为了目前亟待解决的问题。Therefore, how to quickly save the log information has become an urgent problem to be solved at present.
发明内容SUMMARY OF THE INVENTION
本申请公开了一种日志保存方法、通信装置、芯片及模组设备,有利于快速地保存日志信息。The present application discloses a log saving method, a communication device, a chip and a module device, which are beneficial to quickly save log information.
第一方面,本申请提供了一种日志保存方法,应用于终端设备,该方法包括:终端设备检测系统是否存在异常;在终端设备检测到异常的情况下,将上述异常对应的日志信息保存到双倍数据率同步动态随机存取存储器DDR中;终端设备重启上述系统。In a first aspect, the present application provides a log saving method, which is applied to a terminal device. The method includes: the terminal device detects whether there is an abnormality in the system; and when the terminal device detects an abnormality, save the log information corresponding to the above exception to a Double data rate synchronous dynamic random access memory DDR; terminal equipment restarts the above system.
在一种实现方式中,将上述异常对应的日志信息保存到双倍数据率同步动态随机存取存储器DDR中包括:终端设备将上述日志信息保存到DDR中的预设存储空间,该预设存储空间为DDR预留的用于存储异常日志信息的存储空间。In an implementation manner, saving the log information corresponding to the above exception in the double data rate synchronous dynamic random access memory DDR includes: the terminal device saves the above log information in a preset storage space in the DDR, and the preset storage The space is the storage space reserved by DDR for storing abnormal log information.
在一种实现方式中,上述终端设备检测系统是否存在异常,包括:终端设备检测子系统是否存在异常;以及上述终端设备重启上述系统,包括:终端设备重启上述子系统。In an implementation manner, the terminal device detecting whether the system is abnormal includes: the terminal device detecting whether the subsystem is abnormal; and the terminal device restarting the system includes: the terminal device restarting the subsystem.
在一种实现方式中,上述终端设备重启系统之后,该方法还包括:终端设备将保存在上述DDR中的日志信息上传到服务器。In an implementation manner, after the terminal device restarts the system, the method further includes: the terminal device uploads the log information stored in the DDR to the server.
在一种实现方式中,上述终端设备重启系统之后,该方法还包括:终端设备将上述日志信息保存到非易失性存储器Flash中。In an implementation manner, after the terminal device restarts the system, the method further includes: the terminal device saves the log information in the non-volatile memory Flash.
在一种实现方式中,上述终端设备将日志信息保存到非易失性存储器Flash中,包括:在终端设备处于空闲状态的情况下,将上述日志信息保存到Flash中。In an implementation manner, the above-mentioned terminal device saves the log information in the non-volatile memory Flash, which includes: when the terminal device is in an idle state, save the above-mentioned log information in the Flash.
在一种实现方式中,上述终端设备将日志信息保存到Flash中之后,包括:终端设备删除DDR中的上述日志信息。In an implementation manner, after the terminal device saves the log information in the Flash, the method includes: the terminal device deletes the log information in the DDR.
在一种实现方式中,该方法还包括:终端设备将保存在上述Flash中的日 志信息上传到服务器。In an implementation manner, the method further includes: uploading the log information stored in the above-mentioned Flash to the server by the terminal device.
在一种实现方式中,上述将保存在Flash中的日志信息上传到服务器之后,包括:终端设备删除上述Flash中的日志信息。In an implementation manner, after uploading the log information stored in the Flash to the server, the method includes: the terminal device deletes the log information in the Flash.
第二方面,本申请提供了一种通信装置,该装置包括处理单元和存储单元,其中:处理单元,用于检测系统是否存在异常;存储单元,用于在检测到异常的情况下,将上述异常对应的日志信息保存到双倍数据率同步动态随机存取存储器DDR中;上述处理单元,还用于重启上述系统。In a second aspect, the present application provides a communication device, which includes a processing unit and a storage unit, wherein: the processing unit is used to detect whether there is an abnormality in the system; the storage unit is used to store the above The log information corresponding to the abnormality is stored in the double data rate synchronous dynamic random access memory DDR; the processing unit is also used for restarting the system.
在一种实现方式中,上述存储单元具体用于:将日志信息保存到上述DDR中的预设存储空间,上述预设存储空间为DDR预留的用于存储异常日志信息的存储空间。In an implementation manner, the storage unit is specifically configured to: save the log information in a preset storage space in the DDR, where the preset storage space is a storage space reserved by the DDR for storing abnormal log information.
在一种实现方式中,上述处理单元具体用于:检测子系统是否存在异常;以及上述处理单元具体用于:重启上述子系统。In an implementation manner, the above-mentioned processing unit is specifically used for: detecting whether the subsystem is abnormal; and the above-mentioned processing unit is specifically used for: restarting the above-mentioned subsystem.
在一种实现方式中,上述处理单元还用于:将保存在上述DDR中的日志信息上传到服务器。In an implementation manner, the above-mentioned processing unit is further configured to: upload the log information stored in the above-mentioned DDR to the server.
在一种实现方式中,上述存储单元还用于:将上述日志信息保存到非易失性存储器Flash中。In an implementation manner, the above-mentioned storage unit is further configured to: save the above-mentioned log information in the non-volatile memory Flash.
在一种实现方式中,上述存储单元具体用于:在处于空闲状态的情况下,将上述日志信息保存到上述Flash中。In an implementation manner, the above-mentioned storage unit is specifically configured to: in the case of being in an idle state, save the above-mentioned log information into the above-mentioned Flash.
在一种实现方式中,上述处理单元还用于:删除上述DDR中的上述日志信息。In an implementation manner, the above-mentioned processing unit is further configured to: delete the above-mentioned log information in the above-mentioned DDR.
在一种实现方式中,上述处理单元还用于:将保存在上述Flash中的日志信息上传到服务器。In an implementation manner, the above-mentioned processing unit is further configured to: upload the log information saved in the above-mentioned Flash to the server.
在一种实现方式中,上述处理设备还用于:删除上述Flash中的日志信息。In an implementation manner, the above-mentioned processing device is further configured to: delete the log information in the above-mentioned Flash.
第三方面,本申请提供了一种芯片,该芯片,用于检测系统是否存在异常;该芯片,还用于在检测到异常的情况下,将上述异常对应的日志信息保存到双倍数据率同步动态随机存取存储器DDR中;该芯片,还用于重启上述系统。In a third aspect, the present application provides a chip, which is used to detect whether there is an abnormality in the system; the chip is also used to save the log information corresponding to the above abnormality to a double data rate when an abnormality is detected. Synchronous dynamic random access memory DDR; this chip is also used to restart the above system.
第四方面,本申请提供了一种模组设备,该模组设备包括通信模组、电源模组、存储模组以及芯片模组,其中:该电源模组用于为该模组设备提供电能;该存储模组用于存储数据和指令;该通信模组用于进行模组设备内部通信,或者用于该模组设备与外部设备进行通信;该芯片模组用于:检测系统是否存在异常;在检测到异常的情况下,将上述异常对应的日志信息保存到双倍数据率同步动态随机存取存储器DDR中;重启上述系统。In a fourth aspect, the application provides a module device, the module device includes a communication module, a power module, a storage module and a chip module, wherein: the power module is used to provide electrical energy for the module device ; The storage module is used to store data and instructions; The communication module is used for internal communication of the module device, or for the module device to communicate with external devices; The chip module is used to: detect whether there is an abnormality in the system ; In the case of detecting an abnormality, save the log information corresponding to the above abnormality in the double data rate synchronous dynamic random access memory DDR; and restart the above system.
附图说明Description of drawings
为了更清楚地说明本申请实施例技术方案,下面将对实施例描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to explain the technical solutions of the embodiments of the present application more clearly, the following briefly introduces the accompanying drawings used in the description of the embodiments. For those of ordinary skill, other drawings can also be obtained from these drawings without any creative effort.
图1为本申请实施例提供的一种日志保存方法的流程图;1 is a flowchart of a method for saving logs according to an embodiment of the present application;
图2为本申请实施例提供的另一种日志保存方法的流程图;2 is a flowchart of another log storage method provided by an embodiment of the present application;
图3为本申请实施例提供的一种通信装置;FIG. 3 provides a communication device according to an embodiment of the present application;
图4为本申请实施例提供的另一种通信装置;FIG. 4 is another communication device provided by an embodiment of the present application;
图5为本申请实施例提供的一种模组设备的结构示意图。FIG. 5 is a schematic structural diagram of a module device according to an embodiment of the present application.
具体实施方式Detailed ways
为了便于理解,首先介绍本申请涉及的术语。For ease of understanding, terms involved in this application are first introduced.
1、双倍数据率同步动态随机存取存储器(double data rate SDRAM,DDR)1. Double data rate synchronous dynamic random access memory (double data rate SDRAM, DDR)
DDR是双倍速率的同步动态随机存取存储器(synchronous dynamic random access memory,SDRAM),即DDR的数据传输速率比SDRAM高一倍。该高一倍的速率不是简单地将时钟周期提高一倍,而是在SDRAM传输一次数据的时钟周期中,DDR可以传输两次数据。因此,DDR具有访问快、易于读写的特点。DDR is a double-rate synchronous dynamic random access memory (SDRAM), that is, the data transfer rate of DDR is twice as high as that of SDRAM. This doubling rate is not simply doubling the clock cycle, but DDR can transfer data twice in the clock cycle that SDRAM transfers data once. Therefore, DDR has the characteristics of fast access and easy to read and write.
2、非易失性存储器(Flash EEPROM Memory,Flash)2. Non-volatile memory (Flash EEPROM Memory, Flash)
Flash也可以称为“闪速存储器”或者“闪存”,其本质上属于电可擦可编程只读存储器(electrically erasable programmable read-only memory,EEPROM),它结合了随机存储内存(Random access memory,RAM)和只读存储器(read only memory,ROM)的优点,不仅容量大,又有很高的存取速度,而且易于擦除和重写,功耗也很小。而Flash常用于终端设备的内部存储空间,是因为它可以在不加电的情况下也能长期保持存储的信息。Flash can also be called "flash memory" or "flash memory", which is essentially an electrically erasable programmable read-only memory (EEPROM), which combines random access memory (Random access memory, The advantages of RAM) and read only memory (ROM) are not only large capacity, but also high access speed, easy to erase and rewrite, and low power consumption. Flash is often used in the internal storage space of terminal equipment because it can maintain stored information for a long time without powering on.
请参阅图1,图1为本申请实施例提供的一种日志保存方法的流程图。该日志保存方法可以由终端设备,或者由终端设备中的芯片实现。Please refer to FIG. 1. FIG. 1 is a flowchart of a method for saving logs according to an embodiment of the present application. The log saving method can be implemented by a terminal device or by a chip in the terminal device.
其中,终端设备是用户侧的一种用于接收或发射信号的实体,如手机。终端设备也可以称为终端(terminal)、用户设备(user equipment,UE)、移动台(mobile station,MS)、移动终端(mobile terminal,MT)等。终端设备可以是手机(mobile phone)、穿戴式设备、平板电脑(Pad)、带无线收发功能的电脑、虚拟现实(virtual reality,VR)终端设备、增强现实(augmented reality,AR)终端设备、工业控制(industrial control)中的无线终端、无人驾驶(self-driving)中的无线终端、远程手术(remote medical surgery)中的无线终端、智能电网(smart grid)中的无线终端、运输安全(transportation safety)中的无线终端、智慧城市(smart city)中的无线终端、智慧家庭(smart home)中的无线终端、为支持增强型机器类型通信(enhanced Machine-Type communication,eMTC)和/或支持通用移动通信技术的长期演进(long term evolution,LTE)的终端设备等等。本申请的实施例对终端设备所采用的具体技术和具体设备形态不做限定。The terminal device is an entity on the user side for receiving or transmitting signals, such as a mobile phone. A terminal device may also be called a terminal (terminal), a user equipment (UE), a mobile station (mobile station, MS), a mobile terminal (mobile terminal, MT), and the like. The terminal device can be a mobile phone (mobile phone), a wearable device, a tablet computer (Pad), a computer with a wireless transceiver function, a virtual reality (VR) terminal device, an augmented reality (AR) terminal device, industrial Wireless terminals in industrial control, wireless terminals in self-driving, wireless terminals in remote medical surgery, wireless terminals in smart grid, transportation security safety), wireless terminals in smart cities, wireless terminals in smart homes, to support enhanced Machine-Type communication (eMTC) and/or to support general purpose Terminal equipment of long term evolution (LTE) of mobile communication technology, etc. The embodiments of the present application do not limit the specific technology and specific device form adopted by the terminal device.
如图1所示,该日志保存方法包括但不限于如下S101~S103,图1所示的方法以应用于上述终端设备为例进行说明。As shown in FIG. 1 , the log saving method includes but is not limited to the following S101 to S103 , and the method shown in FIG. 1 is described by taking the application to the above-mentioned terminal device as an example.
S101,终端设备检测系统是否存在异常。S101, the terminal device detects whether the system is abnormal.
需要说明的是,终端设备可以时刻检测系统是否存在异常;若存在异常,终端设备可以及时采取措施(例如:重启系统),以避免发生系统死机等更严重的问题,从而影响用户的使用体验。It should be noted that the terminal device can always detect whether there is an abnormality in the system; if there is an abnormality, the terminal device can take timely measures (for example, restart the system) to avoid more serious problems such as system crash, which affects the user experience.
在一种实现方式中,终端设备可以通过硬件或软件的方式,来检测系统是否存在异常。例如:在终端设备中配置一个定时器电路,可以定期查看系统中芯片内部的情况,一旦发现发生错误便发出信号,例如:重启信号。In an implementation manner, the terminal device can detect whether there is an abnormality in the system by means of hardware or software. For example: configure a timer circuit in the terminal device, you can regularly check the internal situation of the chip in the system, and send a signal once an error occurs, such as a restart signal.
S102,在终端设备检测到异常的情况下,将上述异常对应的日志信息保存到DDR中。S102, in the case that the terminal device detects an abnormality, save the log information corresponding to the abnormality in the DDR.
其中,上述异常对应的日志信息,可以理解为,从终端设备检测到异常的时刻开始到终端设备采取措施恢复异常这个时间段内,所对应的系统的日志信息。在本申请实施例中,采取单独将异常对应的日志信息保存下来,一方面是由于异常对应的日志信息相比所有的日志信息更少,可以节省保存时间;另一方面是有针对性地存储,可以集中存储异常对应的日志信息,方便后续对异常情况进行分析,得出异常的解决方案。The log information corresponding to the above abnormality can be understood as log information of the corresponding system during the period from the moment when the terminal device detects the abnormality to the time when the terminal device takes measures to recover the abnormality. In the embodiment of the present application, the log information corresponding to the exception is stored separately. On the one hand, the log information corresponding to the exception is less than all the log information, which can save the storage time; on the other hand, it is stored in a targeted manner. , the log information corresponding to the exception can be stored centrally, which is convenient for subsequent analysis of the abnormal situation and the abnormal solution.
在一种实现方式中,将上述异常对应的日志信息保存到DDR中,包括:终端设备将上述日志信息保存到DDR中的预设存储空间,该预设存储空间为DDR预留的用于存储异常日志信息的存储空间。In an implementation manner, saving the log information corresponding to the above exception in the DDR includes: the terminal device saves the above log information in a preset storage space in the DDR, where the preset storage space is reserved by the DDR for storage Storage space for exception log information.
需要说明的是,该预设存储空间为DDR中专用的存储空间,不可被其他信息占用。换言之,该存储空间仅可以用于存储异常状态对应的日志信息,但不可以用于存储其他类型的信息。It should be noted that the preset storage space is a dedicated storage space in the DDR and cannot be occupied by other information. In other words, the storage space can only be used to store log information corresponding to the abnormal state, but cannot be used to store other types of information.
在检测到系统异常时,为了不影响用户的使用体验,越早地采取措施修复异常,能更好地避免更严重的状况发生,因此,需要把保存异常对应的日志信息的时间控制得越短越好。由前述内容可知,DDR具有访问快、易于读写的特点,所以,将DDR中预留专用的存储空间以供检测到异常时使用,可以更快速地存储到相应的日志信息。When a system abnormality is detected, in order not to affect the user experience, the sooner measures are taken to repair the abnormality, the better to avoid more serious situations. Therefore, it is necessary to control the time for saving the log information corresponding to the abnormality to be shorter. the better. It can be seen from the foregoing that the DDR has the characteristics of fast access and easy read and write. Therefore, if a dedicated storage space is reserved in the DDR for use when an abnormality is detected, the corresponding log information can be stored more quickly.
S103,终端设备重启上述系统。S103, the terminal device restarts the above system.
在一种实现方式中,上述终端设备检测系统是否存在异常,包括:上述终端设备检测子系统是否存在异常;以及上述终端设备重启系统,包括:终端设备重启上述子系统。In an implementation manner, the above-mentioned terminal equipment detecting whether the system is abnormal includes: the above-mentioned terminal equipment detecting whether the subsystem is abnormal; and the above-mentioned terminal equipment restarting the system includes: the terminal equipment restarting the above-mentioned subsystem.
需要说明的是,若是终端设备检测到子系统存在异常,则终端设备可以选择通过重启子系统的方式来修复该异常。通过这种方式,可以在尽量避免影响用户体验的情况下,修复上述异常。可选的,终端设备检测到子系统存在异常的情况下,也可以选择重启系统的方式来修复该异常。例如:在终端设备重启子系统后,并没有修复上述异常的情况时,可以选择重启系统。It should be noted that, if the terminal device detects that the subsystem is abnormal, the terminal device may choose to repair the abnormality by restarting the subsystem. In this way, the above exceptions can be fixed without affecting the user experience as much as possible. Optionally, when the terminal device detects that the subsystem is abnormal, it can also choose to restart the system to repair the abnormality. For example, after the terminal device restarts the subsystem, if the above exception is not repaired, you can choose to restart the system.
在一种实现方式中,上述终端设备重启上述系统之后,该方法还包括:终端设备将保存在上述DDR中的日志信息上传到服务器。In an implementation manner, after the above-mentioned terminal device restarts the above-mentioned system, the method further includes: the terminal device uploads the log information stored in the above-mentioned DDR to the server.
需要说明的是,修复上述异常之后,将上述异常对应的日志信息上传至服务器,可以尽快地上报异常,从而能尽早地判断该异常的原因。另一方面,由 于DDR无法长时间地存储信息,从DDR直接上传到服务器,可以更有效地保证日志信息的上传,避免中途出现日志遗失等状况。It should be noted that, after the above exception is repaired, the log information corresponding to the above exception is uploaded to the server, so that the abnormality can be reported as soon as possible, so that the cause of the abnormality can be determined as soon as possible. On the other hand, since DDR cannot store information for a long time, uploading directly from DDR to the server can more effectively ensure the upload of log information and avoid the loss of logs in the middle.
在一种实现方式中,上述终端设备将保存在上述DDR中的日志信息上传到服务器,包括:在终端设备连接到无线网络时,将保存在上述DDR中的日志信息上传到服务器。In an implementation manner, uploading the log information stored in the DDR by the terminal device to the server includes: uploading the log information stored in the DDR to the server when the terminal device is connected to a wireless network.
其中,连接到无线网络可以理解为,当终端设备处于Wi-Fi状态。需要说明的是,在终端设备连接到无线网络时,再将DDR中的信息上传到服务器,可以在保证上传速率的同时,节省用户的流量。可选的,终端设备可以在其他任意时间,将DDR中的信息上传到服务器;例如:在用户自身流量充足的情况下,用户可以自行选择上传的时间。Wherein, connecting to a wireless network can be understood as when the terminal device is in a Wi-Fi state. It should be noted that, when the terminal device is connected to the wireless network, the information in the DDR is uploaded to the server, which can save the user's traffic while ensuring the upload rate. Optionally, the terminal device can upload the information in the DDR to the server at any other time; for example, when the user's own traffic is sufficient, the user can choose the upload time by himself.
在一种实现方式中,上述终端设备重启系统后,该方法还包括:终端设备将上述日志信息保存到Flash中。In an implementation manner, after the terminal device restarts the system, the method further includes: the terminal device saves the log information in the Flash.
其中,Flash为终端设备的内部存储空间。由前述内容可知,虽然写入DDR的时间远小于写入Flash的时间,但Flash的容量更大,能够存储更多的信息。因此,终端设备采取重启措施修复异常之后,可以将上述异常对应的日志信息保存到Flash中。Among them, Flash is the internal storage space of the terminal device. As can be seen from the foregoing content, although the time for writing to the DDR is much shorter than the time for writing the Flash, the Flash has a larger capacity and can store more information. Therefore, after the terminal device takes restarting measures to repair the abnormality, the log information corresponding to the above abnormality can be saved in the Flash.
需要说明的是,由前述内容可知,日志信息在DDR中无法长时间的存储,例如:若终端设备重启之后,又检测到系统出现异常的情况时,DDR中上一次异常对应的日志信息可能会被新的异常对应的日志信息覆盖掉;因此,为了保证异常的日志信息可以被完整保留,可以尽快将存储在DDR中的日志信息保存到Flash中。It should be noted that, as can be seen from the foregoing, log information cannot be stored in DDR for a long time. For example, if an abnormality is detected in the system after the terminal device is restarted, the log information corresponding to the last abnormality in the DDR may be displayed. It is overwritten by the log information corresponding to the new exception; therefore, in order to ensure that the log information of the exception can be completely preserved, the log information stored in the DDR can be saved to the Flash as soon as possible.
在一种实现方式中,终端设备将上述日志信息保存到Flash中,包括:在终端设备处于空闲状态的情况下,将上述日志信息保存到Flash中。In an implementation manner, the terminal device saves the above log information in the Flash, which includes: when the terminal device is in an idle state, save the above log information in the Flash.
其中,空闲状态可以理解为,终端设备没有进行任何后台程序运行的状态。在终端设备处于空闲状态的情况下,将保存在DDR中的日志信息保存到Flash中,可以有效地避免占用后台运行空间,从而保证用户的体验。The idle state can be understood as a state in which the terminal device is not running any background programs. When the terminal device is in an idle state, the log information saved in the DDR is saved in the Flash, which can effectively avoid occupying the background running space, thereby ensuring the user experience.
在一种实现方式中,上述终端设备将日志信息保存到Flash中之后,包括:终端设备删除上述DDR中的日志信息。In an implementation manner, after the terminal device saves the log information in the Flash, the method includes: the terminal device deletes the log information in the DDR.
需要说明的是,鉴于DDR本身无法持久地保存日志信息,因此,可以尽快将DDR中的日志信息转存至Flash中去。当Flash接收到上述日志信息之后,便可以将DDR中的日志信息进行删除,以供下一次出现异常时使用。It should be noted that, since the DDR itself cannot store the log information persistently, the log information in the DDR can be transferred to the Flash as soon as possible. After the Flash receives the above log information, it can delete the log information in the DDR for use when an exception occurs next time.
在一种实现方式中,上述方法还包括:终端设备将保存在上述Flash中的日志信息上传到服务器。In an implementation manner, the above method further includes: uploading the log information saved in the above Flash to the server by the terminal device.
需要说明的是,上述Flash除了可以存储DDR中异常对应的日志信息,还可以用于存储系统日常的日志信息,以及其他日志信息之外的信息。尽管Flash的容量比DDR更大,但若存储太多信息,仍然会在一定程度上影响其性能。因此,Flash可以在一定的周期内,将所存储的信息上传至服务器,以供后续有需要的时候方便查找或使用。其中,可以将上传日志信息的周期设置为T1,将 上传其他信息的周期设置为T2,上述T1和T2均为可调节参数,本申请对此不作限制。It should be noted that, in addition to storing log information corresponding to exceptions in the DDR, the above-mentioned Flash can also be used to store daily log information of the system and information other than log information. Although the capacity of Flash is larger than that of DDR, if too much information is stored, its performance will still be affected to a certain extent. Therefore, Flash can upload the stored information to the server within a certain period, so that it can be easily searched or used when needed later. The period for uploading log information may be set to T1, and the period for uploading other information may be set to T2. The above-mentioned T1 and T2 are both adjustable parameters, which are not limited in this application.
在一种实现方式中,上述终端设备将保存在Flash中的日志信息上传到服务器,包括:在终端设备连接到无线网络时,将保存在上述Flash中的日志信息上传到服务器。In an implementation manner, uploading the log information stored in the Flash to the server by the terminal device includes: uploading the log information stored in the Flash to the server when the terminal device is connected to a wireless network.
由前述内容可知,在终端设备连接到无线网络时,再将Flash中的信息上传到服务器,可以在保证上传速率的同时,节省用户的流量。可选的,终端设备也可以在其他任意时间,将Flash中的信息上传到服务器;例如:在用户自身流量充足的情况下,用户可以自行选择上传的时间。As can be seen from the foregoing, when the terminal device is connected to the wireless network, the information in the Flash is uploaded to the server, which can save the user's traffic while ensuring the upload rate. Optionally, the terminal device can also upload the information in the Flash to the server at any other time; for example, when the user's own traffic is sufficient, the user can choose the upload time by himself.
在一种实现方式中,上述将保存在Flash中的日志信息上传到服务器之后,包括:终端设备删除上述Flash中的日志信息。In an implementation manner, after uploading the log information stored in the Flash to the server, the method includes: the terminal device deletes the log information in the Flash.
需要说明的是,当Flash中的信息在服务器中进行备份之后,为了保证Flash能够继续存储新的信息,可以将之前所存储的信息进行删除。具体的,可以根据时间来设置定时删除,例如:设置删除大于6个月以上的信息;或者也可以根据内存容量来设置定量删除,例如:信息存储量达到百分之五十时,设置删除所有信息。以上内容仅用于举例,不对本申请造成限制。It should be noted that, after the information in the Flash is backed up in the server, in order to ensure that the Flash can continue to store new information, the previously stored information may be deleted. Specifically, you can set timed deletion according to time, for example, set to delete information older than 6 months; or you can set quantitative deletion according to memory capacity, for example: when the information storage capacity reaches 50%, set to delete all information. The above contents are only used for examples and do not limit the application.
通过上述日志保存方法,可以快速地保存异常对应的日志信息,并且能有效地保证日志信息上传至服务器,从而尽快地上报该异常。Through the above log saving method, the log information corresponding to the exception can be quickly saved, and the log information can be effectively ensured to be uploaded to the server, so that the exception can be reported as soon as possible.
请参阅图2,图2为本申请实施例提供的另一种日志保存方法的流程图。该日志保存方法可以由终端设备,或者由终端设备中的芯片实现。如图2所述,该日志保存方法包括但不限于如下S201~S206,图2所示的方法以应用于上述终端设备为例进行说明。Please refer to FIG. 2 , which is a flowchart of another log saving method provided by an embodiment of the present application. The log saving method can be implemented by a terminal device or by a chip in the terminal device. As shown in FIG. 2 , the log saving method includes, but is not limited to, the following S201 to S206 , and the method shown in FIG. 2 is described by taking the application to the above-mentioned terminal device as an example.
S201,终端设备在DDR中预留专用的存储空间;S201, the terminal device reserves a dedicated storage space in the DDR;
S202,终端设备检测系统是否存在异常;S202, the terminal device detects whether the system is abnormal;
可选的,上述终端设备检测系统是否存在异常,包括:终端设备检测子系统是否存在异常。Optionally, whether the above-mentioned terminal device detection system is abnormal includes: whether the terminal device detects whether the subsystem is abnormal.
S203,在终端设备检测到系统存在异常的情况下,将异常对应的日志信息保存到DDR中;S203, when the terminal device detects that the system is abnormal, save the log information corresponding to the abnormality in the DDR;
可选的,上述在终端设备检测到系统存在异常的情况下,将异常对应的日志信息保存到DDR中,包括:在终端设备检测到子系统存在异常的情况下,将异常对应的日志信息保存到DDR中。Optionally, when the terminal device detects that the system is abnormal, saving the log information corresponding to the abnormality in the DDR includes: when the terminal device detects that the subsystem is abnormal, saving the log information corresponding to the abnormality into the DDR.
S204,终端设备重新启动系统;S204, the terminal device restarts the system;
可选的,上述终端设备重新启动系统,包括:终端设备重新启动子系统。Optionally, restarting the system by the terminal device includes: restarting the subsystem by the terminal device.
S205,终端设备将保存在DDR中的日志信息上传到服务器;S205, the terminal device uploads the log information stored in the DDR to the server;
S206,终端设备将保存在DDR中的日志信息保存到Flash中;S206, the terminal device saves the log information stored in the DDR to the Flash;
需要说明的是,上述S205和S206的步骤不分先后,可以先实施S205,也可以先实施S206。It should be noted that the above steps of S205 and S206 are in no particular order, and S205 may be implemented first, or S206 may be implemented first.
可选的,在实施S205之后,终端设备可以将保存在DDR中的日志信息保存到Flash中。用户可以根据需求,对此方式的后续操作进行设置,本申请对此不作限制。在图2中S205之后,没有示出其他可采取的步骤,并不对本申请实施例造成限制。Optionally, after implementing S205, the terminal device may save the log information stored in the DDR to the Flash. The user can set the subsequent operations of this mode according to requirements, which is not limited in this application. After S205 in FIG. 2 , other steps that can be taken are not shown, which does not limit the embodiment of the present application.
S207,终端设备将保存在Flash中的日志信息上传到服务器。S207, the terminal device uploads the log information stored in the Flash to the server.
通过上述日志保存方法,不仅可以快速地保存异常对应的日志信息,还能够尽快地将该日志信息上传至服务器,从而有利于解决该异常。Through the above log saving method, not only the log information corresponding to the abnormality can be quickly saved, but also the log information can be uploaded to the server as soon as possible, thereby helping to solve the abnormality.
请参阅图3,图3为本申请实施例提供的一种通信装置的示意图。该装置可以是终端设备,也可以是终端设备中的装置,或者是能够和终端设备匹配使用的装置。图3所示的通信装置可以包括处理单元301和存储单元302。其中,处理单元301,用于进行数据处理;存储单元302,用于存储数据。其中:Please refer to FIG. 3 , which is a schematic diagram of a communication device according to an embodiment of the present application. The device may be a terminal device, or a device in the terminal device, or a device that can be used in combination with the terminal device. The communication apparatus shown in FIG. 3 may include a processing unit 301 and a storage unit 302 . Among them, the processing unit 301 is used for data processing; the storage unit 302 is used for storing data. in:
处理单元301,用于检测系统是否存在异常;The processing unit 301 is used to detect whether there is an abnormality in the system;
存储单元302,用于在检测到异常的情况下,将上述异常对应的日志信息保存到双倍数据率同步动态随机存取存储器DDR中;The storage unit 302 is configured to save the log information corresponding to the abnormality in the double data rate synchronous dynamic random access memory DDR when an abnormality is detected;
该处理单元301,还用于重启上述系统。The processing unit 301 is further configured to restart the above system.
在一种实现方式中,上述存储单元302还用于,将上述日志信息保存到DDR中的预设存储空间,该预设存储空间为DDR预留的用于存储异常日志信息的存储空间。In an implementation manner, the storage unit 302 is further configured to save the log information in a preset storage space in the DDR, where the preset storage space is a storage space reserved by the DDR for storing abnormal log information.
在一种实现方式中,上述处理单元301还用于,检测子系统是否存在异常;以及上述处理单元301还用于重启上述子系统。In an implementation manner, the aforementioned processing unit 301 is further configured to detect whether the subsystem is abnormal; and the aforementioned processing unit 301 is further configured to restart the aforementioned subsystem.
在一种实现方式中,上述通信装置还包括通信单元,该通信单元用于,将保存在上述DDR中的日志信息上传到服务器。In an implementation manner, the above-mentioned communication apparatus further includes a communication unit, and the communication unit is configured to upload the log information stored in the above-mentioned DDR to the server.
在一种实现方式中,上述存储单元302还用于,将上述日志信息保存到非易失性存储器Flash中。In an implementation manner, the above-mentioned storage unit 302 is further configured to save the above-mentioned log information in the non-volatile memory Flash.
在一种实现方式中,上述存储单元302还用于,在终端设备处于空闲状态的情况下,将上述日志信息保存到Flash中。In an implementation manner, the above-mentioned storage unit 302 is further configured to save the above-mentioned log information in the Flash when the terminal device is in an idle state.
在一种实现方式中,上述处理单元301还用于,删除DDR中的上述日志信息。In an implementation manner, the above-mentioned processing unit 301 is further configured to delete the above-mentioned log information in the DDR.
在一种实现方式中,上述通信单元还用于,将保存在上述Flash中的日志信息上传到服务器。In an implementation manner, the above-mentioned communication unit is further configured to upload the log information stored in the above-mentioned Flash to the server.
在一种实现方式中,上述处理单元301还用于,删除上述Flash中的日志信息。In an implementation manner, the above-mentioned processing unit 301 is further configured to delete the log information in the above-mentioned Flash.
根据本申请的实施例,图3所示的通信装置中的各个单元可以分别或全部合并为一个或若干个另外的单元来构成,或者其中的某个(些)单元还可以再拆分为功能上更小的多个单元来构成,这可以实现同样的操作,而不影响本申请的实施例的技术效果的实现。上述单元是基于逻辑功能划分的,在实际应用中,一个单元的功能也可以由多个单元来实现,或者多个单元的功能由一个单 元实现。在本申请的其他实施例中,该通信装置也可以包括其他单元,在实际应用中,这些功能也可以由其他单元协助实现,并且可以由多个单元协作实现。According to the embodiments of the present application, each unit in the communication device shown in FIG. 3 may be combined into one or several other units, respectively or all, to form, or some unit(s) may be further divided into functions The same operation can be achieved without affecting the realization of the technical effects of the embodiments of the present application. The above units are divided based on logical functions. In practical applications, the function of one unit can also be implemented by multiple units, or the functions of multiple units can be implemented by one unit. In other embodiments of the present application, the communication apparatus may also include other units, and in practical applications, these functions may also be implemented with the assistance of other units, and may be implemented by cooperation of multiple units.
上述通信装置例如可以是:芯片、或者芯片模组。关于上述实施例中描述的各个装置、产品包含的各个模块,其可以是软件模块,也可以是硬件模块,或者也可以部分是软件模块,部分是硬件模块。例如,对于应用于或集成于芯片的各个装置、产品,其包含的各个模块可以都采用电路等硬件的方式实现,或者,至少部分模块可以采用软件程序的方式实现,该软件程序运行于芯片内部集成的处理器,剩余的(如果有)部分模块可以采用电路等硬件方式实现;对于应用于或集成于芯片模组的各个装置、产品,其包含的各个模块可以都采用电路等硬件的方式实现,不同的模块可以位于芯片模组的同一组件(例如芯片、电路模块等)或者不同组件中,或者,至少部分模块可以采用软件程序的方式实现,该软件程序运行于芯片模组内部集成的处理器,剩余的(如果有)部分模块可以采用电路等硬件方式实现;对于应用于或集成于终端的各个装置、产品,其包含的各个模块可以都采用电路等硬件的方式实现,不同的模块可以位于终端内同一组件(例如,芯片、电路模块等)或者不同组件中,或者,至少部分模块可以采用软件程序的方式实现,该软件程序运行于终端内部集成的处理器,剩余的(如果有)部分模块可以采用电路等硬件方式实现。The above communication device may be, for example, a chip or a chip module. Regarding the modules included in the devices and products described in the above embodiments, they may be software modules or hardware modules, or may be partly software modules and partly hardware modules. For example, for each device or product applied to or integrated in a chip, each module contained therein may be implemented by hardware such as circuits, or at least some of the modules may be implemented by a software program that runs inside the chip For the integrated processor, the remaining (if any) modules can be implemented by hardware such as circuits; for each device and product applied to or integrated in the chip module, each module contained therein can be implemented by hardware such as circuits. , different modules may be located in the same component (such as a chip, circuit module, etc.) or in different components of the chip module, or at least some modules may be implemented by a software program that runs on the processing integrated inside the chip module The remaining (if any) modules can be implemented by hardware such as circuits; for each device and product applied to or integrated in the terminal, each module included can be implemented by hardware such as circuits, and different modules can be It is located in the same component (for example, chip, circuit module, etc.) or in different components in the terminal, or at least some of the modules can be implemented in the form of software programs that run on the processor integrated inside the terminal, and the rest (if any) Some modules can be implemented in hardware such as circuits.
本申请实施例和前述方法的实施例基于同一构思,其带来的技术效果也相同,具体原理请参照前述实施例的描述,在此不赘述。The embodiments of the present application and the embodiments of the foregoing method are based on the same concept, and the technical effects brought by them are also the same. For specific principles, please refer to the description of the foregoing embodiments, which will not be repeated here.
请参阅图4,图4为本申请实施例提供的另一种通信装置40。如图4所示,该通信装置可以包括收发器401、处理器402以及存储器403。其中,收发器401、处理器402以及存储器403可以通过总线404或其他方式连接。总线在图4中以粗线表示,其它部件之间的连接方式,仅是进行示意性说明,并不引以为限。总线可以分为地址总线、数据总线、控制总线等。为便于表示,图4中仅用一条粗线表示,但并不表示仅有一根总线或一种类型的总线。Please refer to FIG. 4 . FIG. 4 is another communication device 40 provided by an embodiment of the present application. As shown in FIG. 4 , the communication apparatus may include a transceiver 401 , a processor 402 and a memory 403 . Wherein, the transceiver 401, the processor 402 and the memory 403 may be connected through a bus 404 or other means. The bus is represented by a thick line in FIG. 4 , and the connection modes between other components are only for schematic illustration, and are not meant to be limited. The bus can be divided into address bus, data bus, control bus and so on. For ease of presentation, only one thick line is used in FIG. 4, but it does not mean that there is only one bus or one type of bus.
在本申请实施例中,收发器401可以是收发器、电路、总线、模块或其它类型的收发器,用于通过传输介质和其它设备进行通信。例如,收发器401用于通信装置40中使得该通信装置40可以和其它设备进行通信。处理器402利用收发器401收发数据,并用于实现上述方法实施例的方法。本申请实施例中的耦合是装置、单元或模块之间的间接耦合或通信连接,可以是电性,机械或其它的形式,用于装置、单元或模块之间的信息交互。本申请实施例中不限定上述收发器401、处理器402以及存储器403之间的具体连接介质。In this embodiment of the present application, the transceiver 401 may be a transceiver, a circuit, a bus, a module or other types of transceivers, and is used to communicate with other devices through a transmission medium. For example, the transceiver 401 is used in the communication apparatus 40 so that the communication apparatus 40 can communicate with other devices. The processor 402 uses the transceiver 401 to send and receive data, and is used to implement the methods of the above method embodiments. The coupling in the embodiments of the present application is an indirect coupling or communication connection between devices, units or modules, which may be in electrical, mechanical or other forms, and is used for information exchange between devices, units or modules. The specific connection medium between the transceiver 401 , the processor 402 , and the memory 403 is not limited in the embodiments of the present application.
存储器403可以包括只读存储器和随机存取存储器,并向处理器402提供指令和数据。存储器403的一部分还可以包括非易失性随机存取存储器。 Memory 403 may include read-only memory and random access memory, and provides instructions and data to processor 402 . A portion of memory 403 may also include non-volatile random access memory.
处理器402可以是中央处理单元(Central Processing Unit,CPU),该处理器402还可以是其他通用处理器、数字信号处理器(Digital Signal Processor,DSP)、专用集成电路(Application Specific Integrated Circuit,ASIC)、现场可 编程门阵列(Field-Programmable Gate Array,FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件等。通用处理器可以是微处理器,可选的,该处理器402也可以是任何常规的处理器等。其中:The processor 402 can be a central processing unit (Central Processing Unit, CPU), and the processor 402 can also be other general-purpose processors, digital signal processors (Digital Signal Processor, DSP), application specific integrated circuit (Application Specific Integrated Circuit, ASIC) ), Field-Programmable Gate Array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor can be a microprocessor, alternatively, the processor 402 can also be any conventional processor or the like. in:
存储器403,用于存储程序指令。The memory 403 is used to store program instructions.
处理器402,用于调用存储器403中存储的程序指令,以用于:The processor 402 is used to call the program instructions stored in the memory 403, so as to:
检测系统是否存在异常;Check whether there is any abnormality in the system;
在检测到异常的情况下,将上述异常对应的日志信息保存到双倍数据率同步动态随机存取存储器DDR中;In the case of detecting an abnormality, save the log information corresponding to the above abnormality in the double data rate synchronous dynamic random access memory DDR;
重启上述系统。Restart the above system.
在一种实现方式中,存储器403用于将上述日志信息保存到DDR中的预设存储空间,该预设存储空间为DDR预留的用于存储异常日志信息的存储空间。In an implementation manner, the memory 403 is configured to save the above log information in a preset storage space in the DDR, where the preset storage space is a storage space reserved by the DDR for storing abnormal log information.
在一种实现方式中,处理器402用于检测子系统是否存在异常;以及处理器402还用于重启上述子系统。In an implementation manner, the processor 402 is configured to detect whether the subsystem is abnormal; and the processor 402 is further configured to restart the above-mentioned subsystem.
在一种实现方式中,收发器401用于将保存在上述DDR中的日志信息上传到服务器。In an implementation manner, the transceiver 401 is configured to upload the log information stored in the above-mentioned DDR to the server.
在一种实现方式中,存储器403用于将上述日志信息保存到非易失性存储器Flash中。In an implementation manner, the memory 403 is used to save the above log information in the non-volatile memory Flash.
在一种实现方式中,存储器403用于在终端设备处于空闲状态的情况下,将上述日志信息保存到Flash中。In an implementation manner, the memory 403 is configured to save the above log information in the Flash when the terminal device is in an idle state.
在一种实现方式中,处理器402用于删除DDR中的上述日志信息。In an implementation manner, the processor 402 is configured to delete the above log information in the DDR.
在一种实现方式中,收发器401用于将保存在上述Flash中的日志信息上传到服务器。In an implementation manner, the transceiver 401 is configured to upload the log information saved in the above-mentioned Flash to the server.
在一种实现方式中,处理器402用于删除上述Flash中的日志信息。In an implementation manner, the processor 402 is configured to delete the log information in the above-mentioned Flash.
在本申请实施例中,可以通过在包括中央处理单元(CPU)、随机存取存储介质(RAM)、只读存储介质(ROM)等处理元件和存储元件的例如计算机的通用计算装置上运行能够执行如图1、图2中所示的相应方法所涉及的各步骤的计算机程序(包括程序代码),以及来实现本申请实施例的日志保存方法。计算机程序可以记载于例如计算机可读记录介质上,并通过计算机可读记录介质装载于上述计算装置中,并在其中运行。In the embodiments of the present application, it may be possible to run on a general-purpose computing device such as a computer including processing elements and storage elements such as a central processing unit (CPU), a random access storage medium (RAM), and a read only storage medium (ROM). A computer program (including program code) that executes the steps involved in the corresponding methods as shown in FIG. 1 and FIG. 2 , and implements the log saving method of the embodiment of the present application. The computer program can be recorded on, for example, a computer-readable recording medium, and loaded in the above-mentioned computing apparatus through the computer-readable recording medium, and executed therein.
基于同一发明构思,本申请实施例中提供的通信装置解决问题的原理与有益效果与本申请方法实施例中通信装置解决问题的原理和有益效果相似,可以参见方法的实施的原理和有益效果,为简洁描述,在这里不再赘述。Based on the same inventive concept, the principles and beneficial effects of the communication device for solving problems provided in the embodiments of the present application are similar to the principles and beneficial effects for solving problems of the communication devices in the method embodiments of the present application. Please refer to the principles and beneficial effects of the implementation of the method. For the sake of brevity, details are not repeated here.
本申请实施例还提供一种芯片,该芯片可以执行前述方法实施例中终端设备的相关步骤。该芯片用于:检测系统是否存在异常;在检测到异常的情况下,将上述异常对应的日志信息保存到双倍数据率同步动态随机存取存储器DDR中;重启上述系统。Embodiments of the present application further provide a chip, where the chip can execute the relevant steps of the terminal device in the foregoing method embodiments. The chip is used for: detecting whether there is an abnormality in the system; in the case of detecting the abnormality, saving the log information corresponding to the above-mentioned abnormality in the double data rate synchronous dynamic random access memory DDR; and restarting the above-mentioned system.
在一种实现方式中,将上述日志信息保存到DDR中的预设存储空间,该预 设存储空间为DDR预留的用于存储异常日志信息的存储空间。In an implementation manner, the above log information is saved to a preset storage space in the DDR, where the preset storage space is a storage space reserved by the DDR for storing abnormal log information.
在一种实现方式中,检测子系统是否存在异常;以及重启上述子系统。In an implementation manner, detecting whether the subsystem is abnormal; and restarting the above-mentioned subsystem.
在一种实现方式中,将保存在上述DDR中的日志信息上传到服务器。In an implementation manner, the log information stored in the foregoing DDR is uploaded to the server.
在一种实现方式中,将上述日志信息保存到非易失性存储器Flash中。In an implementation manner, the above log information is stored in the non-volatile memory Flash.
在一种实现方式中,在终端设备处于空闲状态的情况下,将上述日志信息保存到Flash中。In an implementation manner, when the terminal device is in an idle state, the above log information is saved in the Flash.
在一种实现方式中,删除DDR中的上述日志信息。In an implementation manner, the above log information in the DDR is deleted.
在一种实现方式中,将保存在上述Flash中的日志信息上传到服务器。In an implementation manner, the log information saved in the above-mentioned Flash is uploaded to the server.
在一种实现方式中,删除上述Flash中的日志信息。In an implementation manner, the log information in the above-mentioned Flash is deleted.
在一种可能的实现方式中,上述芯片包括至少一个处理器、至少一个第一存储器和至少一个第二存储器;其中,前述至少一个第一存储器和前述至少一个处理器通过线路互联,前述第一存储器中存储有指令;前述至少一个第二存储器和前述至少一个处理器通过线路互联,前述第二存储器中存储前述方法实施例中需要存储的数据。In a possible implementation manner, the above-mentioned chip includes at least one processor, at least one first memory and at least one second memory; wherein, the at least one first memory and the at least one processor are interconnected through lines, and the first Instructions are stored in the memory; the at least one second memory and the at least one processor are interconnected through a line, and the data to be stored in the foregoing method embodiments are stored in the second memory.
对于应用于或集成于芯片的各个装置、产品,其包含的各个模块可以都采用电路等硬件的方式实现,或者,至少部分模块可以采用软件程序的方式实现,该软件程序运行于芯片内部集成的处理器,剩余的(如果有)部分模块可以采用电路等硬件方式实现。For each device or product applied to or integrated in the chip, each module contained therein may be implemented by hardware such as circuits, or at least some of the modules may be implemented by a software program that runs on the integrated circuit inside the chip. The processor and the remaining (if any) modules can be implemented in hardware such as circuits.
请参阅图5,图5为本申请实施例提供的一种模组设备的结构示意图。该模组设备50可以执行前述方法实施例中终端设备的相关步骤,该模组设备50包括:通信模组501、电源模组502、存储模组503以及芯片模组504。Please refer to FIG. 5 , which is a schematic structural diagram of a module device provided by an embodiment of the present application. The module device 50 can perform the relevant steps of the terminal device in the foregoing method embodiments, and the module device 50 includes: a communication module 501 , a power module 502 , a storage module 503 and a chip module 504 .
其中,上述电源模组502用于为模组设备提供电能;上述存储模组503用于存储数据和指令;上述通信模组501用于进行模组设备内部通信,或者用于模组设备与外部设备进行通信;上述芯片模组504用于:Wherein, the above-mentioned power module 502 is used to provide power for the module equipment; the above-mentioned storage module 503 is used to store data and instructions; the above-mentioned communication module 501 is used for internal communication of the module equipment, or for the module equipment to communicate with the outside The device communicates; the above-mentioned chip module 504 is used for:
检测系统是否存在异常;在检测到异常的情况下,将上述异常对应的日志信息保存到双倍数据率同步动态随机存取存储器DDR中;重启上述系统。Detecting whether there is an abnormality in the system; in the case of detecting the abnormality, saving the log information corresponding to the above-mentioned abnormality in the double data rate synchronous dynamic random access memory DDR; restarting the above-mentioned system.
在一种实现方式中,将上述日志信息保存到DDR中的预设存储空间,该预设存储空间为DDR预留的用于存储异常日志信息的存储空间。In an implementation manner, the above log information is saved to a preset storage space in the DDR, where the preset storage space is a storage space reserved by the DDR for storing abnormal log information.
在一种实现方式中,检测子系统是否存在异常;以及重启上述子系统。In an implementation manner, detecting whether the subsystem is abnormal; and restarting the above-mentioned subsystem.
在一种实现方式中,将保存在上述DDR中的日志信息上传到服务器。In an implementation manner, the log information stored in the foregoing DDR is uploaded to the server.
在一种实现方式中,将上述日志信息保存到非易失性存储器Flash中。In an implementation manner, the above log information is stored in the non-volatile memory Flash.
在一种实现方式中,在终端设备处于空闲状态的情况下,将上述日志信息保存到Flash中。In an implementation manner, when the terminal device is in an idle state, the above log information is saved in the Flash.
在一种实现方式中,删除DDR中的上述日志信息。In an implementation manner, the above log information in the DDR is deleted.
在一种实现方式中,将保存在上述Flash中的日志信息上传到服务器。In an implementation manner, the log information saved in the above-mentioned Flash is uploaded to the server.
在一种实现方式中,删除上述Flash中的日志信息。In an implementation manner, the log information in the above-mentioned Flash is deleted.
对于应用于或集成于芯片模组的各个装置、产品,其包含的各个模块可以 都采用电路等硬件的方式实现,不同的模块可以位于芯片模组的同一组件(例如芯片、电路模块等)或者不同组件中,或者,至少部分模块可以采用软件程序的方式实现,该软件程序运行于芯片模组内部集成的处理器,剩余的(如果有)部分模块可以采用电路等硬件方式实现。For each device and product applied to or integrated in the chip module, each module contained therein can be implemented in hardware such as circuits, and different modules can be located in the same component of the chip module (such as a chip, a circuit module, etc.) or Among different components, or at least some of the modules can be implemented by a software program, the software program runs on the processor integrated inside the chip module, and the remaining (if any) part of the modules can be implemented by hardware such as circuits.
本申请实施例还提供一种计算机可读存储介质,计算机可读存储介质中存储有一条或多条指令,一条或多条指令适于由处理器加载并执行上述方法实施例的日志保存方法。Embodiments of the present application further provide a computer-readable storage medium, where one or more instructions are stored in the computer-readable storage medium, and the one or more instructions are suitable for being loaded by a processor and executing the log saving method of the foregoing method embodiment.
本申请实施例还提供一种包含指令的计算机程序产品,当其在计算机上运行时,使得计算机执行上述方法实施例的日志保存方法。Embodiments of the present application further provide a computer program product including instructions, which, when running on a computer, cause the computer to execute the log saving method of the above method embodiments.
需要说明的是,对于前述的各个方法实施例,为了简单描述,故将其都表述为一系列的动作组合,但是本领域技术人员应该知悉,本申请并不受所描述的动作顺序的限制,因为依据本申请,某一些步骤可以采用其他顺序或者同时进行。其次,本领域技术人员也应该知悉,说明书中所描述的实施例均属于优选实施例,所涉及的动作和模块并不一定是本申请所必须的。It should be noted that, for the sake of simple description, the foregoing method embodiments are all expressed as a series of action combinations, but those skilled in the art should know that the present application is not limited by the described action sequence. Because in accordance with the present application, certain steps may be performed in other orders or simultaneously. Secondly, those skilled in the art should also know that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the present application.
本申请实施例方法中的步骤可以根据实际需要进行顺序调整、合并和删减。The steps in the method of the embodiment of the present application may be adjusted in sequence, combined and deleted according to actual needs.
本申请实施例装置中的模块可以根据实际需要进行合并、划分和删减。The modules in the apparatus of the embodiment of the present application may be combined, divided and deleted according to actual needs.
本领域普通技术人员可以理解上述实施例的各种方法中的全部或部分步骤是可以通过程序来指令相关的硬件来完成,该程序可以存储于一计算机可读存储介质中,可读存储介质可以包括:闪存盘、只读存储器(Read-Only Memory,ROM)、随机存取器(Random Access Memory,RAM)、磁盘或光盘等。Those of ordinary skill in the art can understand that all or part of the steps in the various methods of the above embodiments can be completed by instructing relevant hardware through a program, and the program can be stored in a computer-readable storage medium, and the readable storage medium can Including: flash disk, read-only memory (Read-Only Memory, ROM), random access device (Random Access Memory, RAM), magnetic disk or optical disk, etc.
以上所揭露的仅为本申请一种较佳实施例而已,仅仅是本发明一部分实施例,当然不能以此来限定本申请之权利范围。基于本发明中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。What is disclosed above is only a preferred embodiment of the present application, and is only a part of the embodiments of the present invention, which of course cannot limit the scope of the right of the present application. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.

Claims (20)

  1. 一种日志保存方法,其特征在于,所述方法包括:A log storage method, characterized in that the method comprises:
    终端设备检测系统是否存在异常;The terminal equipment detects whether there is any abnormality in the system;
    在所述终端设备检测到异常的情况下,将所述异常对应的日志信息保存到双倍数据率同步动态随机存取存储器DDR中;When the terminal device detects an abnormality, save the log information corresponding to the abnormality in the double data rate synchronous dynamic random access memory DDR;
    所述终端设备重启所述系统。The terminal device restarts the system.
  2. 根据权利要求1所述的方法,其特征在于,所述将所述异常对应的日志信息保存到双倍数据率同步动态随机存取存储器DDR中,包括:The method according to claim 1, wherein the storing the log information corresponding to the exception in the double data rate synchronous dynamic random access memory (DDR) comprises:
    所述终端设备将所述日志信息保存到所述DDR中的预设存储空间,所述预设存储空间为所述DDR预留的用于存储异常日志信息的存储空间。The terminal device saves the log information in a preset storage space in the DDR, where the preset storage space is a storage space reserved by the DDR for storing abnormal log information.
  3. 根据权利要求1或2所述的方法,其特征在于,所述终端设备检测系统是否存在异常,包括:The method according to claim 1 or 2, wherein the terminal device detects whether there is an abnormality in the system, comprising:
    所述终端设备检测子系统是否存在异常;以及The terminal device detects whether there is an abnormality in the subsystem; and
    所述终端设备重启所述系统,包括:The terminal device restarts the system, including:
    所述终端设备重启所述子系统。The terminal device restarts the subsystem.
  4. 根据权利要求1所述的方法,其特征在于,所述终端设备重启所述系统之后,所述方法还包括:The method according to claim 1, wherein after the terminal device restarts the system, the method further comprises:
    所述终端设备将保存在所述DDR中的日志信息上传到服务器。The terminal device uploads the log information stored in the DDR to the server.
  5. 根据权利要求1所述的方法,其特征在于,所述终端设备重启所述系统之后,所述方法还包括:The method according to claim 1, wherein after the terminal device restarts the system, the method further comprises:
    所述终端设备将所述日志信息保存到非易失性存储器Flash中。The terminal device saves the log information in the non-volatile memory Flash.
  6. 根据权利要求5所述的方法,其特征在于,所述终端设备将所述日志信息保存到非易失性存储器Flash中,包括:The method according to claim 5, wherein the terminal device saves the log information in a non-volatile memory Flash, comprising:
    在所述终端设备处于空闲状态的情况下,将所述日志信息保存到所述Flash中。When the terminal device is in an idle state, the log information is saved in the Flash.
  7. 根据权利要求5或6所述的方法,其特征在于,所述终端设备将所述日志信息保存到所述Flash中之后,所述方法还包括:The method according to claim 5 or 6, wherein after the terminal device saves the log information in the Flash, the method further comprises:
    所述终端设备删除所述DDR中的所述日志信息。The terminal device deletes the log information in the DDR.
  8. 根据权利要求5所述的方法,其特征在于,所述方法还包括:The method according to claim 5, wherein the method further comprises:
    所述终端设备将保存在所述Flash中的日志信息上传到服务器。The terminal device uploads the log information stored in the Flash to the server.
  9. 根据权利要求8所述的方法,其特征在于,所述将保存在所述Flash中的日志信息上传到服务器之后,所述方法还包括:The method according to claim 8, wherein after uploading the log information stored in the Flash to the server, the method further comprises:
    所述终端设备删除所述Flash中的日志信息。The terminal device deletes the log information in the Flash.
  10. 一种通信装置,其特征在于,所述装置包括处理单元和存储单元,其中:A communication device, characterized in that the device comprises a processing unit and a storage unit, wherein:
    处理单元,用于检测系统是否存在异常;The processing unit is used to detect whether there is an abnormality in the system;
    存储单元,用于在检测到异常的情况下,将所述异常对应的日志信息保存到双倍数据率同步动态随机存取存储器DDR中;a storage unit, configured to save the log information corresponding to the abnormality in the double data rate synchronous dynamic random access memory DDR when an abnormality is detected;
    所述处理单元,还用于重启所述系统。The processing unit is further configured to restart the system.
  11. 根据权利要求10所述的装置,其特征在于,所述存储单元具体用于:The device according to claim 10, wherein the storage unit is specifically used for:
    将所述日志信息保存到所述DDR中的预设存储空间,所述预设存储空间为所述DDR预留的用于存储异常日志信息的存储空间。The log information is saved to a preset storage space in the DDR, where the preset storage space is a storage space reserved by the DDR for storing abnormal log information.
  12. 根据权利要求10或11所述的装置,其特征在于,所述处理单元具体用于:The device according to claim 10 or 11, wherein the processing unit is specifically configured to:
    检测子系统是否存在异常;以及Detecting subsystems for anomalies; and
    所述处理单元具体用于:The processing unit is specifically used for:
    重启所述子系统。Restart the subsystem.
  13. 根据权利要求10所述的装置,其特征在于,所述处理单元还用于:The apparatus according to claim 10, wherein the processing unit is further configured to:
    将保存在所述DDR中的日志信息上传到服务器。Upload the log information saved in the DDR to the server.
  14. 根据权利要求10所述的装置,其特征在于,所述存储单元还用于:The device according to claim 10, wherein the storage unit is further used for:
    将所述日志信息保存到非易失性存储器Flash中。The log information is saved in the non-volatile memory Flash.
  15. 根据权利要求14所述的装置,其特征在于,所述存储单元具体用于:The device according to claim 14, wherein the storage unit is specifically used for:
    在处于空闲状态的情况下,将所述日志信息保存到所述Flash中。In the case of being in an idle state, the log information is saved in the Flash.
  16. 根据权利要求14或15所述的装置,其特征在于,所述处理单元还用于:The apparatus according to claim 14 or 15, wherein the processing unit is further configured to:
    删除所述DDR中的所述日志信息。Delete the log information in the DDR.
  17. 根据权利要求14所述的装置,其特征在于,所述处理单元还用于:The apparatus according to claim 14, wherein the processing unit is further configured to:
    将保存在所述Flash中的日志信息上传到服务器。Upload the log information saved in the Flash to the server.
  18. 根据权利要求17所述的装置,其特征在于,所述处理设备还用于:The apparatus according to claim 17, wherein the processing device is further configured to:
    删除所述Flash中的日志信息。Delete log information in the Flash.
  19. 一种芯片,其特征在于,A chip, characterized in that,
    所述芯片,用于检测系统是否存在异常;The chip is used to detect whether there is an abnormality in the system;
    所述芯片,还用于在检测到异常的情况下,将所述异常对应的日志信息保存到双倍数据率同步动态随机存取存储器DDR中;The chip is further configured to save the log information corresponding to the abnormality in the double data rate synchronous dynamic random access memory DDR when an abnormality is detected;
    所述芯片,还用于重启所述系统。The chip is also used for restarting the system.
  20. 一种芯片模组,其特征在于,所述模组设备包括通信模组、电源模组、存储模组以及芯片模组,其中:A chip module, characterized in that the module equipment includes a communication module, a power module, a storage module and a chip module, wherein:
    所述电源模组用于为所述模组设备提供电能;The power module is used to provide power for the module device;
    所述存储模组用于存储数据和指令;The storage module is used to store data and instructions;
    所述通信模组用于进行模组设备内部通信,或者用于所述模组设备与外部设备进行通信;The communication module is used for internal communication of the module device, or for the module device to communicate with an external device;
    所述芯片模组用于:The chip module is used for:
    检测系统是否存在异常;Check whether there is any abnormality in the system;
    在检测到异常的情况下,将所述异常对应的日志信息保存到双倍数据率同步动态随机存取存储器DDR中;In the case of detecting an abnormality, save the log information corresponding to the abnormality in the double data rate synchronous dynamic random access memory DDR;
    重启所述系统。Reboot the system.
PCT/CN2022/074944 2021-02-04 2022-01-29 Log storage method, communication apparatus, chip, and module device WO2022166875A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202110159449.2A CN112860516A (en) 2021-02-04 2021-02-04 Log saving method, communication device, chip and module equipment
CN202110159449.2 2021-02-04

Publications (1)

Publication Number Publication Date
WO2022166875A1 true WO2022166875A1 (en) 2022-08-11

Family

ID=75989005

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/074944 WO2022166875A1 (en) 2021-02-04 2022-01-29 Log storage method, communication apparatus, chip, and module device

Country Status (2)

Country Link
CN (1) CN112860516A (en)
WO (1) WO2022166875A1 (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112860516A (en) * 2021-02-04 2021-05-28 展讯通信(上海)有限公司 Log saving method, communication device, chip and module equipment
CN113505014B (en) * 2021-06-09 2022-05-27 荣耀终端有限公司 Fault diagnosis file acquisition method and device
CN113448762B (en) * 2021-06-29 2022-12-27 东莞市小精灵教育软件有限公司 Crash processing method and system, intelligent device and storage medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107276789A (en) * 2017-05-19 2017-10-20 努比亚技术有限公司 Daily record method for uploading, device and computer-readable recording medium
CN107463459A (en) * 2017-08-14 2017-12-12 青岛海信电器股份有限公司 Store method, device, system and the terminal device of system exception internal storage data
CN108572955A (en) * 2017-03-07 2018-09-25 大唐移动通信设备有限公司 A kind of journal file generation method and device
CN108959526A (en) * 2018-06-28 2018-12-07 郑州云海信息技术有限公司 Blog management method and log management apparatus
CN110333964A (en) * 2019-07-01 2019-10-15 Oppo广东移动通信有限公司 Abnormal log processing method and processing device, electronic equipment, storage medium
CN112860516A (en) * 2021-02-04 2021-05-28 展讯通信(上海)有限公司 Log saving method, communication device, chip and module equipment

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103500133A (en) * 2013-09-17 2014-01-08 华为技术有限公司 Fault locating method and device
CN105512008B (en) * 2014-09-22 2018-05-11 华为技术有限公司 A kind of method and device for obtaining fault message
CN111625384B (en) * 2020-05-25 2024-05-14 广东小天才科技有限公司 Mobile terminal abnormal problem analysis method, system, terminal equipment and storage medium

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108572955A (en) * 2017-03-07 2018-09-25 大唐移动通信设备有限公司 A kind of journal file generation method and device
CN107276789A (en) * 2017-05-19 2017-10-20 努比亚技术有限公司 Daily record method for uploading, device and computer-readable recording medium
CN107463459A (en) * 2017-08-14 2017-12-12 青岛海信电器股份有限公司 Store method, device, system and the terminal device of system exception internal storage data
CN108959526A (en) * 2018-06-28 2018-12-07 郑州云海信息技术有限公司 Blog management method and log management apparatus
CN110333964A (en) * 2019-07-01 2019-10-15 Oppo广东移动通信有限公司 Abnormal log processing method and processing device, electronic equipment, storage medium
CN112860516A (en) * 2021-02-04 2021-05-28 展讯通信(上海)有限公司 Log saving method, communication device, chip and module equipment

Also Published As

Publication number Publication date
CN112860516A (en) 2021-05-28

Similar Documents

Publication Publication Date Title
WO2022166875A1 (en) Log storage method, communication apparatus, chip, and module device
US9645829B2 (en) Techniques to communicate with a controller for a non-volatile dual in-line memory module
US20200117526A1 (en) Techniques for handling errors in persistent memory
US9740645B2 (en) Reducing latency in a peripheral component interconnect express link
US20180129553A1 (en) Memory devices and modules
US20140215016A1 (en) Communication method, communication apparatus and electronic device
CN110019502B (en) Synchronization method between primary database and backup database, database system and device
WO2020233435A1 (en) Data processing method, apparatus, and system
CN110910921A (en) Command read-write method and device and computer storage medium
US10761730B2 (en) Method for configuring disk array of electronic device and related electronic device
WO2019109299A1 (en) Memory access technique and computer system
WO2015199909A1 (en) Accelerating boot time zeroing of memory based on non-volatile memory (nvm) technology
CN113992473A (en) Communication method, communication device, electronic equipment and storage medium
WO2019090493A1 (en) Memory block recovery method and device
KR20140146275A (en) Operating method for memory controller controlling nonvolatile memory device and nonvolatile memroy system
US9734013B2 (en) System and method for providing operating system independent error control in a computing device
US20220253252A1 (en) Data processing method and apparatus
US20230325262A1 (en) Message notification method and apparatus
WO2013154540A1 (en) Continuous information transfer with reduced latency
JPWO2012081085A1 (en) Interrupt factor management device and interrupt processing system
WO2023124333A1 (en) Firmware refreshing method and apparatus, wireless module and storage medium
CN115756309A (en) Battery management equipment parameter storage method, battery management equipment and energy storage system
US10832132B2 (en) Data transmission method and calculation apparatus for neural network, electronic apparatus, computer-readable storage medium and computer program product
CN113934677A (en) Data processing method and device, electronic equipment and storage medium
CN112346660A (en) Data storage method and device and data reading method and device

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 22749154

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 22749154

Country of ref document: EP

Kind code of ref document: A1