CN103530165B - A kind of java solution that is applied to Internet of Things industry - Google Patents

A kind of java solution that is applied to Internet of Things industry Download PDF

Info

Publication number
CN103530165B
CN103530165B CN201310404344.4A CN201310404344A CN103530165B CN 103530165 B CN103530165 B CN 103530165B CN 201310404344 A CN201310404344 A CN 201310404344A CN 103530165 B CN103530165 B CN 103530165B
Authority
CN
China
Prior art keywords
java
module
virtual machine
internet
management
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.)
Expired - Fee Related
Application number
CN201310404344.4A
Other languages
Chinese (zh)
Other versions
CN103530165A (en
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.)
Chengdu Yalu Technology Co ltd
Original Assignee
Yarlungzangbo Beijing Science And Technology 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 Yarlungzangbo Beijing Science And Technology Ltd filed Critical Yarlungzangbo Beijing Science And Technology Ltd
Priority to CN201310404344.4A priority Critical patent/CN103530165B/en
Publication of CN103530165A publication Critical patent/CN103530165A/en
Application granted granted Critical
Publication of CN103530165B publication Critical patent/CN103530165B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

The invention provides a kind of be applied to Internet of Things industry based on Android? the Java Virtual Machine system of Dalvik Virtual Machine Mechanism, be Dthing system, this system comprises: Java Virtual Machine kernel module, Java language base library module and operating system transplantation layer. Dthing utilizes the Dalvik virtual machine technique of increasing income free, redesigns, and optimizes, and cutting, increases new function, and a set of Java Virtual Machine solution that is adapted to embedded system of developing. Dthing system is efficiently, to industry customer, to manufacturer terminal, application developer is had to the Java Virtual Machine solution of very big help.

Description

A kind of java solution that is applied to Internet of Things industry
Technical field
The invention belongs to field of computer, relate in particular to Java Virtual Machine field, is a kind of based on AndroidDalvik virtual machine interpreter, is applicable to embedded OS, the novel Java Virtual Machine solution of Internet of Things industry.
Background technology
Java language is a kind of computer programming language being proposed by SUN company. Java Virtual Machine refers to the running environment of Java language. In mobile phone terminal operating system, Java Virtual Machine mechanism has based on the J2ME of SUN company with reference to the stack virtual machine of realizing, be mainly used on non intelligent mobile phone, and the Dalvik virtual machine based on register of Android system on smart mobile phone.
As shown in Figure 1, based on the virtual machine of stack, its instruction is single byte code, and number of instructions is no more than 256. Based on the virtual machine of stack, it is all to carry out on stack that all instructions are carried out, for the instruction that has multiple operands, can be by data load to after on Java stack, then operate.
As shown in Figure 2, DalvikVM is based on register virtual machine. The class file that JDK compiling is generated generates Dexcode after processing by Dex instrument, also can be described as " double byte code ". Its instruction format is for being double byte, i.e. 16 bit instructions. Dalvik has virtual register, and command operating can carry out computing etc. by operand load after register again.
Existing J2ME specification and virtual machine are mainly for game on non intelligent mobile phone and application design, at present except not doing and expand for Internet of Things industry, secondly, if manufacturer is used this type of virtual machine, need to pay expensive License expense to SUN company (current Oracle).
The Davlik Virtual Machine Mechanism of Android is increased income completely, but the Dalvik virtual machine of Android is based on (SuSE) Linux OS, and is not suitable for current Internet of Things operating system platform.
Summary of the invention
The invention provides a kind of Java Virtual Machine system based on AndroidDalvik Virtual Machine Mechanism that is applied to Internet of Things industry, do not do the Dalvik virtual machine of expanding and need to pay the problem of expensive License expense and solve Android to SUN company (current Oracle) and be not suitable for the problem of current Internet of Things operating system platform to solve J2ME specification and virtual machine for Internet of Things industry.
In order to address the above problem, the present invention proposes a kind of Java Virtual Machine system based on AndroidDalvik Virtual Machine Mechanism that is applied to Internet of Things industry, i.e. Dthing system. This system comprises: Java Virtual Machine kernel module, Java language base library module and operating system transplantation layer; Described Java Virtual Machine kernel module comprises class load-on module, memory management module, garbage reclamation module, thread management module, virtual machine interpreter module; When Java Virtual Machine starts, load Java language base library module, initialization system, operation java application; Described class load-on module is used for loading Java system-based storehouse, for explaining that operation Java calls while application, class load-on module adopts in class loading procedure and the shared mode in Java system running memory space reduces internal memory use, removes AndroidMMAP mechanism to adapt to embedded OS environment simultaneously; Described memory management module increases memory fragmentation and arranges frequency to improve reusing of internal memory; Described garbage reclamation module adopts the Mark-Sweep-Compact mechanism of optimizing to improve the service efficiency of internal memory in embedded device; Described thread management module adopts light-duty threading mechanism, is independent of operating system; Described virtual machine interpreter module is according to the Java language base library simplification of simplifying or remove some instruction; Described Java language base library module has been removed some function in standard Java language storehouse, the space taking to reduce virtual machine according to Internet of Things characteristics of industry application; Described operating system transplantation layer is the unified interface definition that virtual machine call platform feature provides, the efficiency of transplanting on different operating system or plateform system to improve dummy machine system.
This Java Virtual Machine system can be applied in the operating system of internet-of-things terminal.
This system also comprises: Java driver module, application management module, operator's administration module; Described Java driver module, has realized the driving mechanism of Java layer, to improve the management to magnanimity sensor in Internet of Things; Described application management module, has realized the Long-distance Control of applying; Described operator's administration module has increased the support to different operators agreement.
This system has also defined a kind of Java driving method, and the method comprises: step 1: the control and management of the system-level driving of platform operations and reading and writing data are risen in Java system and realized; Step 2: platform operations system only provides general hardware controls interface; Step 3: the driver element control interface that uses Java application call Java Virtual Machine to provide.
This Java driving method is applicable to the driving adaptation after magnanimity sensor is disposed.
The step of specification that this system realizes mobile WMMP agreement is as follows: step 1: Java system is loaded into WMMP function in system after starting; Step 2: Java system registry, to the operation management platform of mobile operator, is registered local terminal; Step 3: system sends linking request and the link of Operator Specific Service management platform, finishing service flow process. Described operator protocol comprises mobile WMMP agreement.
As can be seen here, tool of the present invention has the following advantages:
1. the present invention is applied to the problem on embedded OS in order to solve DalvikVM, customization again and design that DalvikVM is carried out, make its requirement to system resource lower, and efficiency is higher, be more suitable for picture ThreadX, the embedded OSs such as Nucleus.
2. increased the feature of Internet of Things industry, proposed to increase Java dynamic driving, the mechanism such as remote monitoring in virtual machine.
3. solve third-party license expense.
Dthing dummy machine system and J2ME dummy machine system comparative benefits:
The interpreter of 1.Dthing system adopts the Virtual Machine Mechanism based on register of AndroidDalvikVM, and its efficiency is higher than the Virtual Machine Mechanism efficiency based on stack.
2. existing embedded Java virtual machine is all the framework based on J2ME, and J2ME is the industry towards non intelligent mobile phone, and the technical specification of J2ME is in Internet of Things industry and be not suitable for. The technical specification of J2ME is not upgraded for a long time simultaneously, needs new technology to supplement.
The license specification of the virtual machine of 3.Dthing system based on Apache, needn't be to Google or SUN(Oracle) pay third party license expense.
Dthing dummy machine system and AndroidDalvik dummy machine system comparative benefits:
1.AndroidDalvik virtual machine is the Virtual Machine Mechanism based on designing on (SuSE) Linux OS. And require very high to hardware environment.
2.AndroidDalvik virtual machine is not independent product, and it is only present in the mobile phone operating system of Android. Although thereby its efficiency is very high, cannot be applied directly to other industry.
Dthing dummy machine system has solved the AndroidDalvik virtual machine problem high to resource requirement, and applies it on embedded OS, has expanded its application. Dthing system has strengthened corresponding function for embedded OS simultaneously.
Brief description of the drawings
Fig. 1 is the Java Virtual Machine based on stack.
Fig. 2 is the Java Virtual Machine framework based on register.
Fig. 3 is Dthing system architecture diagram.
Detailed description of the invention
The present invention proposes a kind of Java Virtual Machine system based on AndroidDalvik Virtual Machine Mechanism that is applied to Internet of Things industry, i.e. Dthing system, this system Java Virtual Machine kernel mechanism, Java language base library, operating system transplantation layer. Described Java Virtual Machine kernel portion has class load-on module, memory management module, garbage reclamation module, thread management module, virtual machine interpreter module. Base library when Java Virtual Machine running comprises virtual machine activation loads, initializes, and virtual machine operation java application. Described class load-on module is used for loading Java system-based storehouse, for explaining that operation Java calls while application, class load-on module of the present invention reduces internal memory with Java system running memory space sharing mode and uses in class loading procedure, removes AndroidMMAP mechanism to adapt to embedded OS environment simultaneously. Described memory management module increases memory fragmentation and arranges frequency to improve reusing of internal memory. Described garbage reclamation module adopts the Mark-Sweep-Compact mechanism of optimizing to improve the service efficiency of internal memory in embedded device. Described thread management module adopts light-duty threading mechanism, is independent of operating system. Described virtual machine explanation module simplify according to the Java language base library of simplifying or remove some and so on. Described Java language base library has been removed some function in standard Java language storehouse according to Internet of Things characteristics of industry application, as screen, and media etc., the space taking to reduce virtual machine. Described operating system transplantation layer, is the unified interface definition that virtual machine call platform feature provides, and within this week, mode has improved dummy machine system at different operating system, the efficiency of transplanting on plateform system.
This system also comprises Java driver module, and application management module, in operator's administration module. Described Java driver module, has realized the driving mechanism of Java layer, to improve the management to magnanimity sensor in Internet of Things. Said application management module has realized the Long-distance Control of application. Described operator's module has increased different operators as the support of mobile WMMP agreement.
The present invention uses the DalvikVM Virtual Machine Mechanism of Android, can avoid paying expensive License expense to SUN. Thereby greatly reduce virtual machine and be applied to the Cost Problems after embedded system. Also broken the monopolization situation of Java Virtual Machine under embedded environment simultaneously.
Below in conjunction with accompanying drawing 3, the present invention is described in detail:
Operating system: the embedded environment of virtual machine operation
Software platform: different chip modules has different software platforms, software platform provides the encapsulation to various hardware supported and all kinds of services. There is screen; Network; Sensor; File system; Event communication mechanism and message mechanism;
Operating system transplantation layer: this layer is mainly the encapsulation to platform and operating system, makes upper system to make large amendment with the variation of platform and operating system. Comprise platform independence encapsulation, system function encapsulation, stage function encapsulation, and drive encapsulation
Virtual machine kernel: for the core operation module of Dalvik virtual machine, mainly comprise JNI Interface realization; Interpreter, memory management, garbage reclamation mechanism, debugging management, class loads.
Third party library: be the third party library of Dalvik virtual machine use in service. As: database; Security module; Compression module; Language is supported.
DthingJava system library: be all kinds of Java service modules of DalvikVM system, for final M2M application provides all kinds of function and services. Comprise: application management module; Java dlm (dynamic loading module); J2SE base library module; M2M protocol extension module; WMMP agreement is supported; OSGi structure module; Multitask module; Java language base library
Dalvik virtual machine kernel, DthingJava system library, system transplantation layer has formed the such Java middleware system of Dthing.
The modules below this system being comprised is described in detail:
Class load-on module: in the dummy machine system of Android, class load-on module adopts the loaded and optimized Java file later of the MMAP mode of Linux, be mapped to subsequently the loading of carrying out Java base library in internal memory, and realize the loading of internal memory with a large amount of internal memories. Dthing system removes MMAP mechanism, adopts and main memory module shared memory space, has reduced the use of internal memory.
The Virtual Machine Manager module of memory management module: Android has been reserved at least memory headroom of 8M byte, and can be according to the increase internal memory that requires bulk of upper strata Framework. Dthing system by the frequency that increases memory management and defragmentation to improve reusing of internal memory, thereby internal memory maximum is reduced to acceptable scope (2M-3M byte).
Garbage reclamation mechanism: adopt the mechanism of Mark-Sweep-Compact, can be optimized in algorithm, to improve the service efficiency of internal memory in embedded device.
The virtual machine thread management mechanism of thread management mechanism: Android is that the abundant interface function that provides of the pthread mechanism based on Linux is for virtual machine. But in embedded OS, thread management all can have various restrictions. Dthing system is independent of realization the light-type thread management mechanism of operating system, and this has not only increased the independence of Dthing system platform, and isochrone thread management function is simpler.
Virtual machine interpreter: virtual machine interpreter can, according to the function of virtual machine base library, be simplified the implementation of some instruction, to improve execution efficiency.
Java language base library: Java language general-purpose library conventionally can be large and complete; Dthing system has been removed the no function of Internet of Things industry according to the application of Physical Network industry; as complicated screen operator; multimedia support etc.; so both reduced the space hold of whole system, the basis of the optimization simultaneously providing for a lot of modules of virtual machine.
Application management module: Dthing system has added remote application administration module, to carry out the remote monitoring of terminal system. Remote application administration module comprises: local list of application, and remote activation, long-range deletion, long-range stopping, remote loading upgrades application.
Java driver module: Dthing system definition Java driving model, can long-rangely drive dynamic load to arrive Dthing terminal system various kinds of sensors, can realize like this plug-and-play feature of sensor, can accomplish the backward deployment of Internet of Things-after internet-of-things terminal is disposed simultaneously, can be by change different sensors, and the renewal of remote application, realize deployment that Internet of Things is new and the upgrading of function.
The present invention is not limited to above-mentioned detailed description of the invention, and the present invention can have various amendments and alternative form, and in drawings and detailed description, some specific embodiments are just explained as an example. But should be understood that these drawings and detailed description are never in order to limit the present invention on disclosed concrete form, on the contrary, the present invention should be included in whole amendments, equivalents and the alternative form in scope as defined in the claims.

Claims (7)

1. the Java Virtual Machine system based on AndroidDalvik Virtual Machine Mechanism that is applied to Internet of Things industry, its feature existsIn, this system comprises: Java Virtual Machine kernel module, Java language base library module and operating system transplantation layer; Described JavaVirtual machine kernel module comprises class load-on module, memory management module, garbage reclamation module, thread management module, virtual machine solutionRelease device module; When Java Virtual Machine starts, load Java language base library module, initialization system, operation java application;Described class load-on module is used for loading Java system-based storehouse, and for explaining that operation Java calls while application, class load-on module adds in classIn the process of carrying, employing and the shared mode in Java system running memory space reduce internal memory use, remove simultaneouslyAndroidMMAP mechanism is to adapt to embedded OS environment; Described memory management module increases memory fragmentation and arranges frequencyTo improve reusing of internal memory; Described garbage reclamation module adopts the Mark-Sweep-Compact mechanism of optimizing to improve embedded establishingThe service efficiency of standby middle internal memory; Described thread management module adopts light-duty threading mechanism, is independent of operating system; DescribedVirtual machine interpreter module is according to the Java language base library simplification of simplifying or remove some instruction; Described Java language base libraryModule has been removed some function in standard Java language storehouse, the space taking to reduce virtual machine according to Internet of Things characteristics of industry application;Described operating system transplantation layer, the unified interface definition providing for virtual machine call platform feature, to improve dummy machine systemThe efficiency of transplanting on different operating system or plateform system.
2. the system as claimed in claim 1, is characterized in that, this Java Virtual Machine system can be applied to internet-of-things terminalIn operating system.
3. the system as claimed in claim 1, is characterized in that, this system also comprises: Java driver module, and application management module,Operator's administration module; Described Java driver module, has realized the driving mechanism of Java layer, to improve in Internet of Things, magnanimity is passedThe management of sensor; Described application management module, has realized the Long-distance Control of applying; It is right that described operator's administration module has increasedThe support of different operators agreement.
4. system as claimed in claim 2, is characterized in that, this system also comprises: Java driver module, and application management module,Operator's administration module; Described Java driver module, has realized the driving mechanism of Java layer, to improve in Internet of Things, magnanimity is passedThe management of sensor; Described application management module, has realized the Long-distance Control of applying; It is right that described operator's administration module has increasedThe support of different operators agreement.
5. the system as described in claim 1-4 any one, is characterized in that, this system has also defined a kind of Java driving method,The method comprises: step 1: the control and management of the system-level driving of platform operations and reading and writing data are risen in Java system realExisting; Step 2: platform operations system only provides general hardware controls interface; Step 3: use Java application call JavaThe driver element control interface that virtual machine provides.
6. system as claimed in claim 5, is characterized in that, this Java driving method is applicable to after the deployment of magnanimity sensorDrive adaptive.
7. the system as described in claim 1-4 any one, is characterized in that, this system realizes the specification of mobile WMMP agreementStep as follows:
Step 1: Java system is loaded into WMMP function in system after starting;
Step 2: Java system registry, to the operation management platform of mobile operator, is registered local terminal;
Step 3: system sends linking request and the link of Operator Specific Service management platform, finishing service flow process.
CN201310404344.4A 2013-09-06 2013-09-06 A kind of java solution that is applied to Internet of Things industry Expired - Fee Related CN103530165B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201310404344.4A CN103530165B (en) 2013-09-06 2013-09-06 A kind of java solution that is applied to Internet of Things industry

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201310404344.4A CN103530165B (en) 2013-09-06 2013-09-06 A kind of java solution that is applied to Internet of Things industry

Publications (2)

Publication Number Publication Date
CN103530165A CN103530165A (en) 2014-01-22
CN103530165B true CN103530165B (en) 2016-06-15

Family

ID=49932205

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201310404344.4A Expired - Fee Related CN103530165B (en) 2013-09-06 2013-09-06 A kind of java solution that is applied to Internet of Things industry

Country Status (1)

Country Link
CN (1) CN103530165B (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104063243A (en) * 2014-06-17 2014-09-24 成都雅鲁科技有限公司 Application store solution applied to intelligent dressing equipment
CN104601714A (en) * 2015-01-29 2015-05-06 太仓市同维电子有限公司 Implementation method of management of three-layer network terminal by phone application program
CN105721555B (en) * 2016-01-25 2019-10-29 英科信息技术(北京)有限公司 Operating system and internet-of-things terminal equipment for Internet of Things
CN105578659B (en) * 2016-02-04 2018-02-16 宁波登云信息科技有限公司 A kind of intelligent lighting system applied to field of street lamp lighting
CN106528264A (en) * 2016-10-24 2017-03-22 许小刚 Intelligent terminal operation system applied to IoT (Internet of Things)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101593127A (en) * 2008-05-27 2009-12-02 商埃曲网络软件(上海)有限公司 A kind of cross-platform Jave virtual machine of Digital Television middleware system
CN102004662A (en) * 2010-12-07 2011-04-06 江南大学 Embedded scalable virtual machine
CN102779047A (en) * 2012-07-09 2012-11-14 哈尔滨工程大学 Embedded software support platform

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100989613B1 (en) * 2009-12-08 2010-10-26 (주)제이모바일 Terminal device for executing android application based non-android flatform

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101593127A (en) * 2008-05-27 2009-12-02 商埃曲网络软件(上海)有限公司 A kind of cross-platform Jave virtual machine of Digital Television middleware system
CN102004662A (en) * 2010-12-07 2011-04-06 江南大学 Embedded scalable virtual machine
CN102779047A (en) * 2012-07-09 2012-11-14 哈尔滨工程大学 Embedded software support platform

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
《许小刚:物联网跨平台解决方案》;移动Labs;《http://labs.chinamobile.com/news/77796》;20120821;正文第1-4页 *

Also Published As

Publication number Publication date
CN103530165A (en) 2014-01-22

Similar Documents

Publication Publication Date Title
CA2768752C (en) Terminal device of non-android platform for executing android applications, and computer readable recording medium for storing program of executing android applications on non-android platform
CN103530165B (en) A kind of java solution that is applied to Internet of Things industry
CN102073520A (en) Dynamic management system and method for C++ application program version
WO2023124967A1 (en) Method for calling android hidl interface by software operating system, and device and medium
TWI715762B (en) Method and apparatus for creating virtual machine
US11556348B2 (en) Bootstrapping profile-guided compilation and verification
US20140033208A1 (en) Method and device for loading application program
CN104375849A (en) Core loading method and device
KR101856486B1 (en) Method for bi-direction calling between open system and mainframe system
CN112835975B (en) Method for deploying, updating and calling intelligent contracts in blockchain
CN110673853A (en) Compiling method, device and system
CN106909441B (en) Disk direct I/O access method based on JVM
CN105378689A (en) Unified extensible firmware interface (UEFI) driver and protocol
WO2023124968A1 (en) Method for calling android dynamic library hal interface by software operating system, device and medium
CN104699503A (en) Method and device for replacing function execution logic in Android system
CN113448650A (en) Live broadcast function plug-in loading method, device, equipment and storage medium
CN111651169B (en) Block chain intelligent contract operation method and system based on web container
CN112256249A (en) Method and equipment for expanding Android system function and computer storage medium
CN103761118A (en) Intelligent card and method for deploying applications in same
CN116680209A (en) WASM-based multi-intelligent contract instance management method
US20220326939A1 (en) Mobile service upgrade method and apparatus, and terminal
CN108804236B (en) AIDL file sharing method and system
CN112540777A (en) Method and terminal for supporting dynamic read-write of NV (network video) parameters
CN112650512A (en) Hardware driving method and device, terminal and storage medium
WO2019157891A1 (en) Application installation method and application installer generating method

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
TR01 Transfer of patent right

Effective date of registration: 20181015

Address after: 610041 Sichuan Chengdu high tech Zone No. 7 Tianhua 99, 4 floor 415.

Patentee after: CHENGDU YALU TECHNOLOGY CO.,LTD.

Address before: 100190 room 5098, block A, 9 Fengxiang street, Yang Song Town, Huairou District, Beijing.

Patentee before: Brahmaputra Science and Technology Co.,Ltd.

TR01 Transfer of patent right
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20160615

Termination date: 20210906

CF01 Termination of patent right due to non-payment of annual fee