Invention content
In view of above-mentioned deficiencies of the prior art, it is an object of the invention to methods and electricity that a kind of client reports daily record
Sub- equipment, it is intended to solve the problems, such as that existing customer end result reproduction step is cumbersome, efficiency is low.
Technical scheme is as follows:
A kind of method that client reports daily record comprising step:
A, the operation behavior of user customer is written in local file, and generation encryption is encrypted to local file
File;
B, the encryption file is uploaded to background server, and be stored in background server;
C, the encryption file is downloaded from background server, and is decrypted;
D, the decryption file after decryption is obtained, according to the operation behavior of decryption file analysis user customer.
Preferably, further include before the step A:
The permission that the operation behavior of user customer is written to local file is obtained in advance.
Preferably, the step A is specifically included:
A1, it judges whether local file, if it is present executing step A2, is not present, is then transferred to step A3;
A2, directly the operation behavior of user customer is written in local file, and life is encrypted to local file
At encryption file;
A3, local file is created, and the local file is named with current date, by the behaviour of user customer
Make in behavior write-in local file, and generation encryption file is encrypted to local file.
Preferably, the operation behavior of user customer write-in local file is specifically included in the step A:
In advance each behavioral approach of client bury a little;
When triggering the behavioral approach, corresponding flag be written in local file.
Preferably, it is encrypted using md5 encryption mode in the step A.
Preferably, the step B is specifically included:
B1, detection client current network conditions enter step B2 when client is in WiFi environment;
B2, the encryption file is uploaded to background server, and be stored in background server.
Preferably, in the step A, one retention cycle is set for the local file.
The present invention also provides a kind of electronic equipment comprising:
Processor is adapted for carrying out each instruction, and
Storage device is suitable for storing a plurality of instruction, and described instruction is suitable for being loaded and being executed by processor, is adapted for carrying out each finger
It enables:
The operation behavior of user customer is written in local file, and generation encryption text is encrypted to local file
Part;
The encryption file is uploaded to background server, and is stored in background server;
The encryption file is downloaded from background server, and is decrypted;
The decryption file after decryption is obtained, according to the operation behavior of decryption file analysis user customer.
Preferably, it is that a retention cycle is arranged in the local file.
Preferably, it is encrypted using md5 encryption mode.
Advantageous effect:The method and electronic equipment provided through the invention, user need not first repeat before to client
The operation at end makes result reappear again, eliminates cumbersome flow, has saved the time, improves efficiency, increases the stalwartness of client
Property, auxiliary solves the exception that client occurs.
Specific implementation mode
The present invention provides the method and electronic equipment that a kind of client reports daily record, to make the purpose of the present invention, technology
Scheme and effect are clearer, clear, and the present invention is described in more detail below.It should be appreciated that described herein specific
Embodiment is only used to explain the present invention, is not intended to limit the present invention.
Fig. 1 is please referred to, Fig. 1 is the flow chart for the method preferred embodiment that a kind of client of the present invention reports daily record, packet
Include step:
The operation behavior of user customer is written in local file S1, and generation encryption is encrypted to local file
File;
S2, the encryption file is uploaded to background server, and be stored in background server;
S3, the encryption file is downloaded from background server, and be decrypted;
S4, the decryption file after decryption is obtained, according to the operation behavior of decryption file analysis user customer.
The method provided through the invention, can download encryption file by background server, and decryption is encrypted after file
User's operation behavior is obtained, operation of the user before to client just can be analyzed by operation behavior.In this way, user just no longer needs
Work effect is improved by that, to the operation of client, operating result can be made to reappear before repetition, the time is greatly saved
Rate.
Preferably, further include before the step S1:
The permission that the operation behavior of user customer is written to local file is obtained in advance.
Client needs to obtain the permission of write-in in advance before operation behavior is written to local file.For example, if one
A App will apply for Camera permissions, when needing using Camera, be called if it is first time, since App does not exist
It was registered in Camera services, at this moment, Camera services will call AppOpsManager to access AppOpsService, send
Authority application is asked, and pops up unified authority application dialog box, and registration needs permission to be used, such as is chosen in dialog box
The permission that user needs, and determine.If obtaining permission, open requested service, if be rejected, refuse to
APP provides service.This opportunity is when AppOpsManager is identified, similar to there is no the APP of permission progress
Service intercepts, if being provided with the permission of response in Setting, can also go to update corresponding limiting operation persistence file/
Data/system/appops.xml, when next time, application serviced again, service can identify permission again.
Preferably, the step S1 is specifically included:
S11, it judges whether local file, if it is present executing step S12, is not present, is then transferred to step S13;
S12, directly the operation behavior of user customer is written in local file, and life is encrypted to local file
At encryption file;
S13, local file is created, and the local file is named with current date, by user customer
Operation behavior is written in local file, and generation encryption file is encrypted to local file.
In the step S11, local file is judged whether, when there are file, then follow the steps S12;If no
There are local files, then are transferred to step S13.
In the step S12, when there are local file, local file first is written into the operation behavior of user customer
In, then generation encryption file is encrypted to local file.For example, the behavior of user's operation client specifically includes:To express mail
Scanning is entered the station;Express mail restocking;Express mail is signed for.So, these three behaviors are directly write in local file, write-in completion
Afterwards, first file content is encrypted, encryption is the safety for content, and after avoiding file from losing, other users can be with
Directly understand file content.After the completion of encrypted content file, then to file encryption, generate encryption file.
In the step S13, when there is no local file, local file is first created, and with current date to described
Ground file is named.Such as the file of name is entitled:2017.12.05.After creating and naming completion, by user to client
In the operation behavior write-in local file at end, file content is encrypted, after the completion of encryption, then to file encryption, generates and adds
Ciphertext part.
Preferably, in the step S1, one retention cycle is set for the local file.
After local file establishment, a retention cycle is set.For example, the retention cycle set is seven day, then creating
When local file, the holding time of the local file is seven days, the automatic cleaning after seven days.False local file wound as in the previous
Build the time be 2017.12.01, then before local file in 2017.12.08 auto-destruct, if then current date is
2017.12.09 then needing to create local file;If current date is 2017.12.07, without creating local file.In this way,
It can ensure that file is always held in retention cycle, has effectively saved space, be also beneficial to the robustness of program.
Preferably, the operation behavior of user customer write-in local file is specifically included in the step S1:
S11 ', in advance each behavioral approach of client bury a little;
S12 ', when triggering the behavioral approach, corresponding flag be written in local file.
In the step S11 ' and S12 ', each behavioral approach of client is all carried out burying a little in advance, it is corresponding in triggering
Behavioral approach when, just corresponding flag (identify) is written in local file.After write-in is completed, subsequent step is executed
Suddenly.
Described buries the relevant technologies for a little referring to capturing, handle and send for specific user's behavior or event
And its implementation process.
For example, user signs for express mail by client, before this, express mail will be signed in advance, on express mail
Frame the behavioral approaches such as signs for and carries out burying point (corresponding flag is embedded in corresponding behavioral approach), when user passes through client
When express mail is signed at end, corresponding flag is written in local file, and is encrypted, generates encryption file.
Preferably, the step S2 is specifically included:
S21, detection client current network conditions enter step S22 when client is in WiFi environment;
S22, the encryption file is uploaded to background server, and be stored in background server.
There are an interface arrangement in client, comparison account can be obtained, after entering client, by local account
Compared with the comparison account that interface arrangement obtains, if eligible, the environment of the encryption file in WiFi on date will be met
Under uploaded.The case where a large amount of extraneous data can be avoided to upload in this way, more targetedly, meanwhile, also ensure account
Number uniqueness reported.The interface arrangement can obtain a comparison account, by pair for comparing account and local account
Than when local account is eligible, the encryption file for meeting the date is uploaded.It is described that meet the date can be that user sets in advance
Surely the encryption file for meeting one of them period is uploaded, for example, the period 2017.12.01- will be set as
2017.12.07, then the local text that will be created or write direct in this period of 2017.12.01-2017.12.07
Part is uploaded after re-encrypting.
In the step S21, the network environment residing for client is detected, specific detecting step is as follows:
Broadcast recipients BroadcastReceiver is by Binder mechanism to AMS (Activity Manager
Service it) is registered;
Broadcast transmission person is sent to AMS by binder mechanism and is broadcasted;
AMS lookups meet the BroadcastReceiver that corresponding conditions i.e. client is under Wifi environment, and broadcast is sent out
It is sent in the corresponding Message Rotation Queues of BroadcastReceiver (being Activity under normal circumstances);
This broadcast is taken in message loop execution, adjusts back onReceive () method in BroadcastReceiver.
The news release and subscribe to both ends that broadcast transmission person and broadcast recipients are belonging respectively in Observer Pattern, AMS belongs to
In intermediate processing center.The execution of broadcast transmission person and broadcast recipients are asynchronous, and the broadcast sent out, which will not be concerned about, to be had
No recipient receives, and does not also know recipient is that when can just receive on earth.
In the step S22, qualified encryption file is uploaded in background server, background server receives
Afterwards, it stores it in background server.When user enters APP, it can give tacit consent to and open a background service, verification account is (i.e.
The local account referred in abovementioned steps S1 is compared with the account that interface arrangement obtains), then select qualified encryption text
Part carries out etc. to be uploaded.
In the step S3, the encryption file in background server is downloaded, is actually operated in cloud storage.Cloud storage is
It is a kind of emerging network in new concept cloud computing (cloud computing) conceptive extension and developed
Memory technology refers to by functions such as cluster application, network technology or distributed file systems, by a large amount of various differences in network
The storage device of type gathers collaborative work by application software, common externally to provide data storage and Operational Visit function
System.When the core of cloud computing system operation and processing is the storage and management of mass data, just needed in cloud computing system
A large amount of storage device is configured, then cloud computing system is transformed into as a cloud storage system, so cloud storage is one
The cloud computing system for core is stored and managed with data.In simple terms, storage resources are exactly put on cloud for people by cloud storage
A kind of emerging scheme of access.User at any time, Anywhere can be connected to cloud through any web-enabled device
On easily access data.When file uploads to cloud storage, so that it may be operated with the website in cloud storage.
In this way, being uploaded under WiFi network environment, customer flow on the one hand can be saved, on the other hand, transmission is more
The stabilization added, transmission speed also faster, have saved the time.
Preferably, it is encrypted using md5 encryption mode in the step S1.
Encryption specifically includes encrypted content file and file encryption.The encrypted content file is to the content in file
It is encrypted, is to avoid after file is lost in this way, criminal can directly understand file content, to get client
Other information, file in end etc..The file encryption is that file is integrally encrypted, and (i.e. file integrally adds file encryption
It is close) first secret value can be obtained.When uploading the encryption file, also need to upload first secret value, and
It is stored in background server, convenient for value verification is subsequently encrypted.
The full name of MD5 is Message-Digest Algorithm 5 (message digest algorithm the 5th edition), and md5 encryption is to allow
Large capacity information at a kind of format of secrecy (is exactly one by " compression " before signing private secret key with digital signature software
The byte serial of meaning length is transformed into the big integer of a fixed length).And there is following feature using md5 encryption:Stationarity:Arbitrarily
The MD5 value length of the data of length, calculating is fixed;Easily calculate:MD5 values are calculated from former data to be easy to;Anti- modification
Property:It makes any change to former data, even if only changing 1 byte, there are very big differences for the MD5 values being calculated;It is anti-by force to touch
It hits:Known original data and its MD5 value want that it is very difficult to find the data (i.e. data falsification) with identical MD5 values.
It downloads after completing, the encryption file obtained to download is decrypted, and the decryption is first to be carried out certainly to file
The decryption of MD5 rules is defined, MD5 rule decryption is carried out to file content again after the completion of decryption.Self-defined MD5 rule are being carried out to file
When then decrypting, second secret value can be obtained by calculating.When user downloads encryption file from background server, equally
It needs to download first secret value.It is decrypted after downloading to encryption file, can obtain second secret value, and by the
One secret value is compared with second secret value.After the decryption for carrying out file and file content to encryption file, at this time
File content in obtained decryption file is the operation behavior of user customer.
User directly directly can judge whether file exception occurs by two secret values, and specific judgment rule is such as
Under:
When first secret value is as second secret value, supporting paper was not modified, and file is
Safety;
When first secret value and different second secret value, supporting paper has change, in some instances it may even be possible to by wooden horse, disease
Poison attack, and the content of file may also divulge a secret.
User can according to first secret value with whether second secret value identical makes corresponding measure, when first
When secret value is identical as second secret value, user can select to execute subsequent step S4, when first secret value and second
When secret value differs, the decryption file that user can first obtain decryption is handled, such as is killed virus to decryption file
Processing, reselection execute step S4.
In the step S4, user can decrypt the operation behavior in file with direct reading, in conjunction with specific business scenario point
The analysis operation behavior.The user experience that mobile client can preferably be optimized increases the robustness of client, auxiliary solution
The bug that certainly the machine client occurs.
For example, user is put in storage express mail by client, restocking and sign for, due to the operation error of user, soon
The circulation of part occur it is abnormal, but user and it is uncertain be which link goes wrong.Add at this point, being downloaded by background server
Ciphertext part and first secret value are decrypted encryption file, acquire second secret value and user to client
The operation behavior at end, by the comparison with first secret value, the two is identical, and supporting paper is not tampered and by wooden horse
Attack.By understanding the operation behavior of user customer, learn that due to operation error, restocking is not carried out to express mail by user
Operation only to express mail be put in storage and sign for.In this way, user can carry out restocking to express mail again by client,
Keep the circulation of express mail complete, forms a closed loop.
In this way, the operation behavior by analyzing user customer, just can specify which user carries out to client before
Operation behavior illustrates user when operating client when lacking necessary operation behavior, since error has leaked one of those
Link can again be operated by client, keeps links complete at this time, form closed loop.
The present invention also provides a kind of electronic equipment 10, as shown in Figure 2 comprising:
Processor 110 is adapted for carrying out each instruction, and
Storage device 120, is suitable for storing a plurality of instruction, and described instruction is suitable for being loaded and being executed by processor, be adapted for carrying out
Each instruction:
The operation behavior of user customer is written in local file, and generation encryption text is encrypted to local file
Part;
The encryption file is uploaded to background server, and is stored in background server;
The encryption file is downloaded from background server, and is decrypted;
The decryption file after decryption is obtained, according to the operation behavior of decryption file analysis user customer.
The processor 110 can be general processor, digital signal processor (DSP), application-specific integrated circuit (ASIC),
Field programmable gate array (FPGA), microcontroller, ARM (Acorn RISC Machine) or other programmable logic device are divided
Any combinations of vertical door or transistor logic, discrete hardware component or these components.In addition, processor can also be any
Conventional processors, microprocessor or state machine.Processor can also be implemented as the combination of computing device, for example, DSP and Wei Chu
Manage combination, multi-microprocessor, one or more microprocessors combination DSP core or any other this configuration of device.
Storage device 120 is used as a kind of non-volatile computer readable storage medium storing program for executing, can be used for storing non-volatile software
Program, non-volatile computer executable program and module, as the domain name dynamic switching method in the embodiment of the present invention corresponds to
Program instruction.Processor is stored in non-volatile software program, instruction and unit in storage device by operation, to
Various function application and the data processing for executing dynamic domain name switching realize that the domain name dynamic in above method embodiment is cut
Change method.
Preferably, it is that a retention cycle is arranged in the local file.
Preferably, it is encrypted using md5 encryption mode.
Particular technique details about above-mentioned electronic equipment has been described in detail in above-mentioned steps, is not repeated herein.
It should be understood that the application of the present invention is not limited to the above for those of ordinary skills can
With improvement or transformation based on the above description, all these modifications and variations should all belong to the guarantor of appended claims of the present invention
Protect range.