CN110474941A - The implementation method for being synchronized to server-side is got in a kind of log ready - Google Patents

The implementation method for being synchronized to server-side is got in a kind of log ready Download PDF

Info

Publication number
CN110474941A
CN110474941A CN201810441362.2A CN201810441362A CN110474941A CN 110474941 A CN110474941 A CN 110474941A CN 201810441362 A CN201810441362 A CN 201810441362A CN 110474941 A CN110474941 A CN 110474941A
Authority
CN
China
Prior art keywords
log
file
boot parameter
server
intelligent terminal
Prior art date
Legal status (The legal status 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 status listed.)
Pending
Application number
CN201810441362.2A
Other languages
Chinese (zh)
Inventor
冯晓
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hangzhou Tuya Information Technology Co Ltd
Original Assignee
Hangzhou Tuya Information Technology Co Ltd
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 Hangzhou Tuya Information Technology Co Ltd filed Critical Hangzhou Tuya Information Technology Co Ltd
Priority to CN201810441362.2A priority Critical patent/CN110474941A/en
Publication of CN110474941A publication Critical patent/CN110474941A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/06Management of faults, events, alarms or notifications
    • H04L41/069Management of faults, events, alarms or notifications using logs of notifications; Post-processing of notifications
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/06Protocols specially adapted for file transfer, e.g. file transfer protocol [FTP]

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Debugging And Monitoring (AREA)
  • Power Sources (AREA)

Abstract

The invention discloses the power consumptions that CPU is reduced using daemon thread; in app use process, it will not influence using experience, and in the way of Rename file; protect transmitting file, the implementation method for being synchronized to server-side is got in a kind of log that will not lead to the problem of Read-Write Locks ready.It the described method comprises the following steps: journal file is kept in local cache area, then it carries out being divided into several small documents according to file size, every time when upper transmitting file, this file is first arranged to upper arq mode (carrying out by the way of Rename file), then data are read out to this file, uploaded in batches.Technical solution of the present invention is capable of providing the power consumption that CPU is reduced using daemon thread, in app use process, will not influence using experience, and in the way of Rename file, protect transmitting file.

Description

The implementation method for being synchronized to server-side is got in a kind of log ready
Technical field
The present invention relates to wireless communication technology fields, especially device log method for uploading.
Background technique
Log collection is most important in APP, and developer can collect some abnormal datas or user behavior of user Data, with timely orientation problem and optimization interaction.And log uploads how cloud solves the problems, such as power consumption, do not influence app and normally make It is extremely important with this.
Summary of the invention
The present invention is the shortcoming uploaded for APP log in the prior art, and providing is reduced using daemon thread The power consumption of CPU will not influence in app use process using experience, and in the way of Rename file, make transmitting file It is protected, the implementation method for being synchronized to server-side is got in a kind of log that will not lead to the problem of Read-Write Locks ready.
To achieve the above object, the invention adopts the following technical scheme:
The implementation method for being synchronized to server-side is got in a kind of log of the invention ready, characterized in that the method includes following Step:
Journal file is kept in local cache area, then carries out being divided into several small documents according to file size, often When secondary upper transmitting file, this file is first arranged to upper arq mode (carrying out by the way of Rename file), then to this File is read out data, uploads in batches.
Preferably, the method also includes: upload service is carried out independent process, when application is withdrawn into backstage, is opened Dynamic upload service, carries out upload data, reduces the use to CPU using daemon thread in upload procedure.
Preferably, the method also includes:
When the main system of intelligent terminal breaks down, control main system generates and stores journal file, and guides intelligence The log system of terminal is restarted;
When log system is restarted, the system file of log system is loaded, and initialize to log system;
After the completion of log system initialization, control log system reads the journal file of storage, and the log is literary Part is uploaded onto the server.
Preferably, the log system of the guidance intelligent terminal includes: the step of restarting
The boot parameter in the guidance information that intelligent terminal prestores is obtained, and the type of boot parameter is guided by main system Parameter switching is log system boot parameter;
According to log system boot parameter, the log system of intelligent terminal is guided to restart.
Preferably, including: after the described the step of journal file is uploaded onto the server
The type of boot parameter in switching and booting information, and according to the main system of the type of boot parameter guidance intelligent terminal Restart.
Preferably, in the switching and booting information boot parameter type, and according to the type of boot parameter guide intelligence Can the main system of terminal the step of restarting include:
The type of boot parameter in guidance information is switched to main system boot parameter by log system boot parameter;
According to main system boot parameter, the main system of intelligent terminal is guided to restart.
Get the device for being synchronized to server-side ready present invention simultaneously provides a kind of log, described device includes: memory, processing The program for being synchronized to server-side is got in device, communication bus and the log being stored on the memory ready:
The communication bus is for realizing the connection communication between processor and memory;
The processor is for executing the log upload program, the step of to realize the log method for uploading.
A kind of computer readable storage medium, which is characterized in that be stored with log on the computer readable storage medium It gets the program for being synchronized to server-side ready, realizes that the log is got ready when the log upload program is executed by processor and be synchronized to The step of method of server-side.
Technical solution of the present invention is capable of providing the power consumption that CPU is reduced using daemon thread, in app use process, It will not influence using experience, and in the way of Rename file, protect transmitting file.
Detailed description of the invention
Fig. 1 is the first pass figure of the method for the present invention.
Fig. 2 is the second flow chart of the method for the present invention.
Specific embodiment
The present invention is described further with reference to the accompanying drawings and detailed description.
The implementation method for being synchronized to server-side is got in a kind of log of the invention ready, characterized in that the method includes following Step:
Journal file is kept in local cache area, then carries out being divided into several small documents according to file size, often When secondary upper transmitting file, this file is first arranged to upper arq mode (carrying out by the way of Rename file), then to this File is read out data, uploads in batches.
Preferably, the method also includes: upload service is carried out independent process, when application is withdrawn into backstage, is opened Dynamic upload service, carries out upload data, reduces the use to CPU using daemon thread in upload procedure.
Preferably, the method also includes:
When the main system of intelligent terminal breaks down, control main system generates and stores journal file, and guides intelligence The log system of terminal is restarted;
When log system is restarted, the system file of log system is loaded, and initialize to log system;
After the completion of log system initialization, control log system reads the journal file of storage, and the log is literary Part is uploaded onto the server.
Preferably, the log system of the guidance intelligent terminal includes: the step of restarting
The boot parameter in the guidance information that intelligent terminal prestores is obtained, and the type of boot parameter is guided by main system Parameter switching is log system boot parameter;
According to log system boot parameter, the log system of intelligent terminal is guided to restart.
Preferably, including: after the described the step of journal file is uploaded onto the server
The type of boot parameter in switching and booting information, and according to the main system of the type of boot parameter guidance intelligent terminal Restart.
Preferably, in the switching and booting information boot parameter type, and according to the type of boot parameter guide intelligence Can the main system of terminal the step of restarting include:
The type of boot parameter in guidance information is switched to main system boot parameter by log system boot parameter;
According to main system boot parameter, the main system of intelligent terminal is guided to restart.
Get the device for being synchronized to server-side ready present invention simultaneously provides a kind of log, described device includes: memory, processing The program for being synchronized to server-side is got in device, communication bus and the log being stored on the memory ready:
The communication bus is for realizing the connection communication between processor and memory;
The processor is for executing the log upload program, the step of to realize the log method for uploading.
A kind of computer readable storage medium, which is characterized in that be stored with log on the computer readable storage medium It gets the program for being synchronized to server-side ready, realizes that the log is got ready when the log upload program is executed by processor and be synchronized to The step of method of server-side.
Technical solution of the present invention is capable of providing the power consumption that CPU is reduced using daemon thread, in app use process, It will not influence using experience, and in the way of Rename file, protect transmitting file.

Claims (8)

1. the implementation method for being synchronized to server-side is got in a kind of log ready, characterized in that the described method comprises the following steps:
Journal file is kept in local cache area, then carries out being divided into several small documents according to file size;
Every time when upper transmitting file, this file is arranged to upper arq mode (being carried out by the way of Rename file), it is then right This file is read out data, uploads in batches.
2. according to the method described in claim 1, it is characterized in that, the method also includes: upload service is carried out independent process, When application is withdrawn into backstage, starts upload service, carry out upload data, daemon thread reduction pair is used in upload procedure The use of CPU.
3. according to the method described in claim 1, it is characterized in that, the method also includes:
When the main system of intelligent terminal breaks down, control main system generates and stores journal file, and guides intelligent terminal Log system restart;
When log system is restarted, the system file of log system is loaded, and initialize to log system;
After the completion of log system initialization, control log system reads the journal file of storage, and will be on the journal file Pass to server.
4. according to the method described in claim 1, it is characterized in that, log system the step of restarting packet of the guidance intelligent terminal It includes:
The boot parameter in the guidance information that intelligent terminal prestores is obtained, and by the type of boot parameter by main system boot parameter It is switched to log system boot parameter;
According to log system boot parameter, the log system of intelligent terminal is guided to restart.
5. according to the method described in claim 4, it is characterized in that, the described the step of journal file is uploaded onto the server it After include:
The type of boot parameter in switching and booting information, and according to the main system weight of the type of boot parameter guidance intelligent terminal It opens.
6. according to the method described in claim 5, it is characterized in that, the type of boot parameter in the switching and booting information, and root According to boot parameter type guidance intelligent terminal main system restart the step of include:
The type of boot parameter in guidance information is switched to main system boot parameter by log system boot parameter;
According to main system boot parameter, the main system of intelligent terminal is guided to restart.
7. the device for being synchronized to server-side is got in a kind of log ready, characterized in that described device includes: memory, processor, communication The program for being synchronized to server-side is got in bus and the log being stored on the memory ready:
The communication bus is for realizing the connection communication between processor and memory;
The processor is for executing the log upload program, to realize such as log of any of claims 1-6 The step of method for uploading.
8. a kind of computer readable storage medium, characterized in that be stored with log on the computer readable storage medium and get ready It is synchronized to the program of server-side, is realized when the log upload program is executed by processor such as any one of claim 1-6 institute The step of method for being synchronized to server-side is got in the log stated ready.
CN201810441362.2A 2018-05-10 2018-05-10 The implementation method for being synchronized to server-side is got in a kind of log ready Pending CN110474941A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810441362.2A CN110474941A (en) 2018-05-10 2018-05-10 The implementation method for being synchronized to server-side is got in a kind of log ready

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810441362.2A CN110474941A (en) 2018-05-10 2018-05-10 The implementation method for being synchronized to server-side is got in a kind of log ready

Publications (1)

Publication Number Publication Date
CN110474941A true CN110474941A (en) 2019-11-19

Family

ID=68503765

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810441362.2A Pending CN110474941A (en) 2018-05-10 2018-05-10 The implementation method for being synchronized to server-side is got in a kind of log ready

Country Status (1)

Country Link
CN (1) CN110474941A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111294287A (en) * 2020-02-14 2020-06-16 广州市百果园信息技术有限公司 Data uploading method, device, equipment and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101964795A (en) * 2010-09-30 2011-02-02 北京世纪互联工程技术服务有限公司 Log collecting system, log collection method and log recycling server
CN103475714A (en) * 2013-09-10 2013-12-25 北京思特奇信息技术股份有限公司 System and method for operation log recording and uploading on basis of Active X technique
CN106453652A (en) * 2016-11-30 2017-02-22 努比亚技术有限公司 Log file uploading method and system
CN106815363A (en) * 2017-01-24 2017-06-09 郑州云海信息技术有限公司 One kind rotates management method and device based on linux daily records

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101964795A (en) * 2010-09-30 2011-02-02 北京世纪互联工程技术服务有限公司 Log collecting system, log collection method and log recycling server
CN103475714A (en) * 2013-09-10 2013-12-25 北京思特奇信息技术股份有限公司 System and method for operation log recording and uploading on basis of Active X technique
CN106453652A (en) * 2016-11-30 2017-02-22 努比亚技术有限公司 Log file uploading method and system
CN106815363A (en) * 2017-01-24 2017-06-09 郑州云海信息技术有限公司 One kind rotates management method and device based on linux daily records

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111294287A (en) * 2020-02-14 2020-06-16 广州市百果园信息技术有限公司 Data uploading method, device, equipment and storage medium
CN111294287B (en) * 2020-02-14 2023-11-21 广州市百果园信息技术有限公司 Data uploading method, device, equipment and storage medium

Similar Documents

Publication Publication Date Title
US11055085B2 (en) Method, apparatus, and system for hot-deploying application
CA2919839C (en) Virtual computing instance migration
CN105871587A (en) Log uploading method and device
CN104205050A (en) Accessing a device on a remote machine
US20160224554A1 (en) Search methods, servers, and systems
CN104376122A (en) Method and server for browser client side to acquire static files
US8793651B2 (en) Remote card content management using synchronous server-side scripting
US10938773B2 (en) Method and apparatus for synchronizing contact information and medium
CN110580195B (en) Memory allocation method and device based on memory hot plug
CN103269339B (en) Based on document transmission method and the system of HTML (Hypertext Markup Language)
CN107517223A (en) A kind of method and system of long-range renewal mellanox network card softwares
KR102533726B1 (en) Electronic apparatus and controlling method thereof
CN110474941A (en) The implementation method for being synchronized to server-side is got in a kind of log ready
CN114285838A (en) File uploading method, device, system, storage medium and electronic equipment
WO2014145089A1 (en) System and method for anchoring third party metadata in a document
CN112328272B (en) Algorithm upgrading method, device, equipment and storage medium
CN112433812A (en) Method, system, equipment and computer medium for virtual machine cross-cluster migration
CN105824622B (en) Data processing method and electronic equipment
CN116361584A (en) Page data processing method and device, computer equipment and storage medium
WO2015035899A1 (en) Search methods and terminals
CN110069493B (en) Data processing method, device, computer equipment and storage medium
WO2016058188A1 (en) Software upgrading method and apparatus applied to terminal and terminal
CN101789070B (en) Intelligent card initialization method and terminal equipment
CN104156282A (en) System image file backup system and method
CN111182012B (en) Intelligent equipment management method, device and system

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication

Application publication date: 20191119

RJ01 Rejection of invention patent application after publication