CN107820129B - Method for automatically maintaining application data packet of intelligent equipment - Google Patents
Method for automatically maintaining application data packet of intelligent equipment Download PDFInfo
- Publication number
- CN107820129B CN107820129B CN201711137317.XA CN201711137317A CN107820129B CN 107820129 B CN107820129 B CN 107820129B CN 201711137317 A CN201711137317 A CN 201711137317A CN 107820129 B CN107820129 B CN 107820129B
- Authority
- CN
- China
- Prior art keywords
- application
- apk
- codes
- storage system
- code
- 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.)
- Active
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/40—Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
- H04N21/43—Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
- H04N21/443—OS processes, e.g. booting an STB, implementing a Java virtual machine in an STB or power management in an STB
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/40—Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
- H04N21/41—Structure of client; Structure of client peripherals
- H04N21/426—Internal components of the client ; Characteristics thereof
- H04N21/42661—Internal components of the client ; Characteristics thereof for reading from or writing on a magnetic storage medium, e.g. hard disk drive
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/40—Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
- H04N21/43—Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
- H04N21/443—OS processes, e.g. booting an STB, implementing a Java virtual machine in an STB or power management in an STB
- H04N21/4431—OS processes, e.g. booting an STB, implementing a Java virtual machine in an STB or power management in an STB characterized by the use of Application Program Interface [API] libraries
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/40—Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
- H04N21/43—Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
- H04N21/443—OS processes, e.g. booting an STB, implementing a Java virtual machine in an STB or power management in an STB
- H04N21/4435—Memory management
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/80—Generation or processing of content or additional data by content creator independently of the distribution process; Content per se
- H04N21/81—Monomedia components thereof
- H04N21/8166—Monomedia components thereof involving executable data, e.g. software
- H04N21/8173—End-user applications, e.g. Web browser, game
Abstract
The invention belongs to an application source code management technology of an intelligent digital video terminal, and discloses a method for automatically maintaining an application data packet of intelligent equipment, which solves the problems of low efficiency and high error rate of manually copying an application apk in the intelligent equipment in the traditional technology. The method comprises the following steps: a. automatically acquiring the apk package names of all applications carried by the whole television through application information management software installed on the intelligent television, and calculating MD5 codes of the apks of all applications; the MD5 codes are imported into a storage system according to corresponding package names; b. traversing and searching application apk under all directories of the intelligent television system by running the copy script; copying all the files to a certain folder of an external memory; c. and by running the import script, sequentially calculating MD5 codes of the copied application apk one by one, matching the MD5 codes with MD5 codes in the storage system, and importing the application apk to the corresponding apk package name of the storage system after successful matching.
Description
Technical Field
The invention belongs to an application source code management technology of an intelligent digital video terminal, and particularly relates to a method for automatically maintaining an intelligent device application data packet.
Background
With the increasingly abundant applications carried by the smart television, convenience and fun are brought to developers and users. As the number of the loaded applications is increasing, the difficulty of software application apk management of the smart television is increased, and the situations of loss of source codes, storage errors and the like of apk versions occur, so that managing and releasing the software-loaded applications apk becomes an important requirement for software archiving management.
Generally, the android system television application apk is generally placed under a plurality of different paths, and path names are different along with the difference of a movement, so that the copy path of each time is not fixed; part of the application's apk's filename placed under the path of the corresponding package name will also often use the same name; if the direct copy is carried out, the phenomenon that part of the apps are not copied and some apps miss the copy can occur. The copied application apk causes great trouble to maintenance personnel, and has long copying time and high error rate.
For the sake of understanding, technical terms that may appear in the present invention are explained below:
the application comprises the following steps: each application corresponds to an apk package and is installed on the smart television, and the file names of the applications are unified as apk;
the loaded applications are: the application is preset on the software of the whole machine, and the user cannot delete the application;
each application has 3 important pieces of information: the name of the application package, the version of the application and the MD5 code of the application;
the application package name: the applications are distinguished according to packet names; different applications have different package names.
Application version: versioncode, versioname; performing version discrimination according to the 2 parameters;
applying MD5 code: the same application apk is compiled once, and has only one MD5 code; the MD5 code is an identity card for the application apk.
Application of apk: an installer for each application. And the intelligent television system calls the apk to carry out related application operation. If no confusion code exists, the source code of the application can be directly recovered; maintaining different versions of an application apk is administratively critical.
Disclosure of Invention
The technical problem to be solved by the invention is as follows: a method for automatically maintaining an application data packet of an intelligent device is provided, and the problems of low efficiency and high error rate of manually copying an application apk in the intelligent device in the traditional technology are solved.
The technical scheme adopted by the invention for solving the technical problems is as follows:
a method for automatically maintaining an intelligent device application data packet comprises the following steps:
a. automatically acquiring the apk package names of all applications carried by the whole television through application information management software installed on the intelligent television, and calculating MD5 codes of the apks of all applications; the MD5 codes are imported into a storage system according to corresponding package names;
b. traversing and searching application apk under all directories of the intelligent television system by running the copy script; copying all the files to a certain folder of an external memory;
c. and by running the import script, sequentially calculating MD5 codes of the copied application apk one by one, matching the MD5 codes with MD5 codes in the storage system, and importing the application apk to the corresponding apk package name of the storage system after successful matching.
As a further optimization, in step a, the MD5 code of each application apk is calculated by calling a standard function generated by the smart television system at compile time.
As a further optimization, in step b, all the application apk are copied to a certain folder of the external memory, and the file name of the application apk is modified as follows: incrementing the sequence number + pathname apk; the name of the folder is modified to the current television movement + version.
As a further optimization, step c specifically includes:
after the import script is run, sequentially calculating the MD5 code of the current Nth application, and performing traversal comparison on the MD5 code and the MD5 code of the application apk stored in the storage system; if the comparison is consistent, importing the currently applied apk into a corresponding storage position in the storage system;
if the MD5 code is not consistent with the MD5 codes of all stored application apks in comparison, the current apk does not belong to the currently stored application; directly skipping processing on the current apk; calculating the MD5 code of the (N + 1) th application, and continuing the comparison operation;
when all the application apks in the folder are imported into the storage system or corresponding application apks are stored under all the application apk package names stored in the storage system, the operation is quitted; and finally, the apk which conforms to all the MD5 codes of the imported system is the apk file actually used by the whole machine.
The invention has the beneficial effects that: through traversing and copying all applied apks installed on the whole machine, extracting the applied MD5 code and importing the code into a storage system, traversing and matching the MD5 code of the installed and applied whole machine with the information of the applied MD5 code of the input system, and automatically storing the correctly matched applied apks in a storage; because the scheme is automatically realized through the script, the MD5 code with unique apk is used as the matching basis during matching, so that the copying efficiency and accuracy can be improved, and the problems caused by large application placement difference and inconsistent application names of different movement applications are solved.
Drawings
FIG. 1 is a flow diagram of automatic import of an application apk.
Detailed Description
The invention aims to provide a method for automatically maintaining an application data packet of intelligent equipment, which solves the problems of low efficiency and high error rate of manually copying an application apk in the intelligent equipment in the traditional technology.
According to the scheme, the application apk of the television is accurately copied by compiling the application copy script based on more than 4.0 of an android operating system, and the correct apk is imported into the storage system according to the uniqueness of the MD5 code of the apk. In the concrete implementation, the whole technical scheme is functionally divided into three parts, namely acquisition of the application apk, copying of the application apk and automatic import of the application apk:
firstly, acquiring by using apk:
acquiring the package names of all application apks loaded in the intelligent television system through application information management software installed on the intelligent television, and calculating MD5 codes of the application apks under a path by calling a standard function generated during compiling of the intelligent television system; and the MD5 code is imported into a storage system according to the corresponding package name;
second, copy of application apk:
traversing and searching all directories of the smart television system by running a copy script; all of them are copied to a certain folder of an external memory (such as a U disk), and the file name of apk is modified as follows: incrementing the sequence number + pathname apk; the name of the folder is modified to the current television movement + version.
Thirdly, automatic import of application apk:
running an apk import script, sequentially calculating the MD5 code of the current Nth application as shown in FIG. 1, and performing traversal comparison on the MD5 code and the MD5 code of the application apk stored in the system; comparing and leading the corresponding apk into the corresponding position of the stored application package name; when the MD5 code is inconsistent with all the stored application comparisons, the current apk is not the current stored application; directly skip the current apk; calculating the MD5 code of the next application (i.e. the (N + 1) th application), and continuing the comparison operation; and the operation is exited after any traversal of the MD5 codes of the application apk under the folder or the application apk stored by the system is completed. And finally, the apk which conforms to all the MD5 codes of the imported system is the apk file actually used by the whole machine.
It should be noted that: the "copy script" and the "import script" described in the present invention are software scripts that can be easily implemented according to the functional requirements of the present invention, and the detailed implementation process thereof will not be described herein.
Example (b):
in this embodiment, the foregoing implementation has been implemented on 81 versions of 29 cartridges, and the specific implementation steps of checking the storage applications apk1042 include:
1. using the intelligent television complete machine, and installing 'application information management, apk': clicking the installed application information management, apk, and entering the application; clicking a button of 'all application information', and outputting txt files of corresponding information to corresponding folders of the USB flash disk; the txt file contains the package name of the application apk and the corresponding MD5 code;
2. copying the copy script to a new folder of the USB flash disk, running the copy script, and copying all apks of the smart television to the current folder according to a method of sequence number + application path +/file name apk;
3. the txt corresponding to the information acquired in the step 1 is input into a storage system, and a storage position corresponding to the package name is established in the storage system according to the MD5 code;
4. running an import script, copying the copied apk to a designated position of a storage system, sequentially calculating the MD5 codes of the Nth application in the U disk, traversing and matching the MD5 codes in the application information in the storage system, and if the MD5 codes are matched, automatically importing the application apk to a link position corresponding to a package name according to the package name; if not, sequentially selecting the (N + 1) th application to continue the operation; by adopting the method, the copied application apk can be ensured to be in one-to-one correspondence with the apk carried by the intelligent television system, the accuracy of the application apk is effectively ensured, and the application apk can be downloaded at any time.
Claims (3)
1. A method for automatically maintaining an intelligent device application data packet is characterized by comprising the following steps:
a. automatically acquiring the apk package names of all applications carried by the whole television through application information management software installed on the intelligent television, and calculating MD5 codes of the apks of all applications; the MD5 codes are imported into a storage system according to corresponding package names;
b. traversing and searching application apk under all directories of the intelligent television system by running the copy script; copying all the files to a certain folder of an external memory;
c. by running the import script, sequentially calculating MD5 codes of the copied application apk one by one, matching the MD5 codes with MD5 codes in the storage system, and importing the application apk to the corresponding apk package name of the storage system after successful matching;
in the step c, the method specifically comprises the following steps:
after the import script is run, sequentially calculating the MD5 code of the current Nth application, and performing traversal comparison on the MD5 code and the MD5 code of the application apk stored in the storage system; if the comparison is consistent, importing the currently applied apk into a corresponding storage position in the storage system;
if the MD5 code is not consistent with the MD5 codes of all stored application apks in comparison, the current apk does not belong to the currently stored application; directly skipping processing on the current apk; calculating the MD5 code of the (N + 1) th application, and continuing the comparison operation;
when all the application apks in the folder are imported into the storage system or corresponding application apks are stored under all the application apk package names stored in the storage system, the operation is quitted; and finally, the apk which conforms to all the MD5 codes of the imported system is the apk file actually used by the whole machine.
2. The method for automatically maintaining the application data package of the intelligent equipment as claimed in claim 1, wherein in the step a, the MD5 code of each application apk is calculated by calling a standard function generated by the intelligent television system at the compiling time.
3. The method for automatically maintaining the application data packet of the intelligent device according to claim 1, wherein in the step b, all the application apk is copied to a certain folder of the external memory, and the file name of the application apk is modified as follows: incrementing the sequence number + pathname apk; the name of the folder is modified to the current television movement + version.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201711137317.XA CN107820129B (en) | 2017-11-16 | 2017-11-16 | Method for automatically maintaining application data packet of intelligent equipment |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201711137317.XA CN107820129B (en) | 2017-11-16 | 2017-11-16 | Method for automatically maintaining application data packet of intelligent equipment |
Publications (2)
Publication Number | Publication Date |
---|---|
CN107820129A CN107820129A (en) | 2018-03-20 |
CN107820129B true CN107820129B (en) | 2020-07-07 |
Family
ID=61609898
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201711137317.XA Active CN107820129B (en) | 2017-11-16 | 2017-11-16 | Method for automatically maintaining application data packet of intelligent equipment |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN107820129B (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113342282A (en) * | 2021-06-28 | 2021-09-03 | 深圳市瑞驰信息技术有限公司 | Method for migrating data backup of android system to rbd storage |
Family Cites Families (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102456027A (en) * | 2010-10-21 | 2012-05-16 | 北京市金蝶政务软件有限公司 | Method, terminals and system for copying files in distributed system |
CN102110031A (en) * | 2011-02-23 | 2011-06-29 | 宇龙计算机通信科技(深圳)有限公司 | Android system-based application program backup and recovery method |
WO2014010847A1 (en) * | 2012-07-09 | 2014-01-16 | 주식회사 안랩 | Apparatus and method for diagnosing malicious applications |
CN103177077B (en) * | 2013-01-08 | 2016-08-10 | 杭州米加科技有限公司 | The storage of a kind of APK file and output intent |
CN103176864B (en) * | 2013-03-11 | 2016-03-23 | 广东欧珀移动通信有限公司 | A kind of backup method based on Android system, device and mobile terminal |
CN103619008A (en) * | 2013-12-11 | 2014-03-05 | 北京网秦天下科技有限公司 | System and method for performing backup and restoration on data |
CN104683797A (en) * | 2015-03-05 | 2015-06-03 | 青岛歌尔声学科技有限公司 | Intelligent television production test method and system |
KR20160109870A (en) * | 2015-03-13 | 2016-09-21 | 한국전자통신연구원 | System and method of fast searching of android malware |
CN106845167A (en) * | 2016-12-12 | 2017-06-13 | 北京奇虎科技有限公司 | The reinforcement means and device of a kind of APK, and dynamic loading method and device |
-
2017
- 2017-11-16 CN CN201711137317.XA patent/CN107820129B/en active Active
Also Published As
Publication number | Publication date |
---|---|
CN107820129A (en) | 2018-03-20 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US9465717B2 (en) | Native code profiler framework | |
CN102736978B (en) | A kind of method and device detecting the installment state of application program | |
CN106371940B (en) | Method and device for solving program crash | |
CN103955363B (en) | A kind of manufacture method of program upgrade installation package | |
CN106547572B (en) | program file comparison method and device | |
US20160179495A1 (en) | Device and method for packaging application | |
CN110737437A (en) | compiling method and device based on code integration | |
CN112214219A (en) | Component processing method and device, server and storage medium | |
CN109558318B (en) | Code management method and code warehouse distributed system | |
CN112099880B (en) | Method and system for reducing application program driven by scene | |
CN111124872A (en) | Branch detection method and device based on difference code analysis and storage medium | |
US20130042225A1 (en) | Object Linking Based On A Determined Linker Order | |
CN113835713B (en) | Source code packet downloading method, device, computer equipment and storage medium | |
CN107820129B (en) | Method for automatically maintaining application data packet of intelligent equipment | |
US10747514B2 (en) | Reduced save and restore instructions for call-clobbered registers | |
CN113515303B (en) | Project transformation method, device and equipment | |
CN110688147A (en) | Method for packing and analyzing metadata | |
CN108446224B (en) | Performance analysis method of application program on mobile terminal and storage medium | |
CN111352631B (en) | Interface compatibility detection method and device | |
US20110246966A1 (en) | Embedding source files into program symbol files | |
CN106445737B (en) | Multi-backup starting method | |
CN107333131A (en) | A kind of method for the application carried on test intelligent television | |
CN110750310A (en) | Binary and source code switching method based on IOS system componentization development | |
CN110737438A (en) | data processing method and device | |
CN113568834A (en) | SDK code compatibility detection method, device, computer equipment and medium |
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 | ||
GR01 | Patent grant | ||
GR01 | Patent grant |