CN106371884B - Universal embedded loading application system and method - Google Patents

Universal embedded loading application system and method Download PDF

Info

Publication number
CN106371884B
CN106371884B CN201610826247.8A CN201610826247A CN106371884B CN 106371884 B CN106371884 B CN 106371884B CN 201610826247 A CN201610826247 A CN 201610826247A CN 106371884 B CN106371884 B CN 106371884B
Authority
CN
China
Prior art keywords
application
program
identification number
interface structure
entry
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
Application number
CN201610826247.8A
Other languages
Chinese (zh)
Other versions
CN106371884A (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.)
Shirui Technology (shenzhen) Co Ltd
Original Assignee
Shirui Technology (shenzhen) 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 Shirui Technology (shenzhen) Co Ltd filed Critical Shirui Technology (shenzhen) Co Ltd
Priority to CN201610826247.8A priority Critical patent/CN106371884B/en
Publication of CN106371884A publication Critical patent/CN106371884A/en
Application granted granted Critical
Publication of CN106371884B publication Critical patent/CN106371884B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44505Configuring for program initiating, e.g. using registry, configuration files
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/448Execution paradigms, e.g. implementations of programming paradigms
    • G06F9/4488Object-oriented
    • G06F9/449Object-oriented method invocation or resolution

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Security & Cryptography (AREA)
  • Stored Programmes (AREA)

Abstract

The invention discloses a universal embedded loading application system and a universal embedded loading application method, and belongs to the technical field of electronics. The method comprises the following steps: defining a group of dynamic pointer arrays, and pointing to the entry position of the program and other interface positions of the program; structuring and storing each application program in a read-only memory according to the actual storage position of the application program; defining a program entry format; storing the corresponding relation between the application identification number and the application interface structure position corresponding to the application identification number into an application calling module; the calling application begins. The invention changes the mode that the interface is executed after the whole application is loaded and can only be called according to the operation requirement of the system, and realizes the direct calling of the interface when required, thus the whole application does not need to be loaded into the transient memory in advance for operation, the actions of loading and unloading do not need to be repeated, and the problem of memory leakage can not be caused. The stability of the system can be increased.

Description

Universal embedded loading application system and method
Technical Field
The invention relates to the technical field of electronics, in particular to a universal embedded loading application system and a universal embedded loading application method.
Background
In order to ensure the working efficiency and stability on the general embedded chip, an operating system with file management is not necessarily loaded, such as: linux, windows, etc. This type of system has high requirements for chips and resources, and not all embedded main control chips can be loaded. Even if a lightweight real-time operating system (RTOS) has a file archive management system, it is not always possible to load and run applications.
Under the condition that new application cannot be dynamically loaded, the firmware of the whole embedded chip must be downloaded again when the embedded chip is upgraded at present, and the embedded chip can be used if upgrading tools such as a USB (universal serial bus) or a serial port are used. If over-the-air upgrades are used, the large data transfer process is prone to failure as an upgrade. Moreover, in order to achieve over-the-air (OTA) functionality, more than 2 times the memory space must be prepared on current systems. This space is not usable at ordinary times and is certainly wasted. For example: the factory has dozens of detection links, and the detection data and the judgment method of each link are different. But the basic plate type is the same. This situation is often encountered within the internet of things (IoT). If the same hardware board type to do covers different functions, different applications have to be loaded. But putting all applications into one software tends to be an unstable problem for testing and development. If different curing software is used, the production is difficult to realize.
In the past, the loading of application software must have a perfect file system and a complex application loading process, such as systems of LINUX, WINDOWS, UNIX and the like, and the systems can be only LINUX, ANDROID, WINDOWS10IoT or WINDOWCE which can be finished in an embedded type. These systems can all load applications at will, loading when needed. Can be removed when not needed, and can only be used widely. Endows the product with complex and practical application.
However, the application of these systems requires huge resources, and the systems cannot be loaded if only a simple Microcontroller Chip (MCU) is used. Such as: 8051 chip system, 64K ROM and 2K RAM in total, the small resource is not enough to support the above system operation. Such single chip (MCU) systems are all the more so on the IoT. How to solve the application loading of these systems is an urgent need in the market at present.
Current systems require file archives to manage applications, although convenient. But for embedded single chips that do not have or require complex files. The import of a file system is instead a bundle. Because the file system requires a large amount of storage allocation for the code shutdown file. The single chip system already determines all the applications or bits of data storage at the beginning of the design. It is not worth adding code for file management just to load an application. The invention does not need to use a file system, dynamically loads the application program by using a pointer mode of a programming language, and sets a calling function of each program. This allows all applications to be invoked correctly.
When the current system is dynamically applied, an environment similar to a container (dock) is required to be manufactured, the application is operated in the environment, the container is just like a small computer or a chip, the chip environment is continuously copied in the chip, the operation performance of the chip is easily and greatly reduced, and the application is changed into a part of a main program without using a container technology. Without changing any speed of operation at all.
The current approach must first read the application from a permanent memory (ROM) or disk, put it into a temporary memory, and let it run later. This approach requires a large amount of temporary memory. The resource requirements of the system must satisfy all program operating memory spaces. This approach must be repeated twice as many memory providing program operations (one part being storage and one part being run). The invention utilizes disk space to run directly. The process of loading once more is not needed.
The method can quickly and simply solve the problems, dynamically load the environment of the application like a mobile phone or a computer, and change the application at any time. A product is not changed as long as it is hardware, but different functions can be generated.
Disclosure of Invention
Aiming at the defects of the prior art, the invention provides a universal embedded loading application system and a universal embedded loading application method.
In order to achieve the purpose, the technical scheme of the invention is as follows:
a universal embedded loading application method is characterized by comprising the following steps:
defining a group of dynamic pointer arrays, and pointing to the entry position of the program and other interface positions of the program;
structuring and storing each application program in a read-only memory according to the actual storage position of the application program;
defining a program entry format comprising: the interface architecture defines the position of each application interface structure, and the entrance architecture defines the application identification number and the corresponding relation with the position of the application interface structure;
storing the corresponding relation between the application identification number and the application interface structure position corresponding to the application identification number into an application calling module;
starting to call an application program, firstly, transmitting an application identification number to be called into an application calling module, and inquiring and judging whether the application exists or not by the application calling module according to the application identification number;
and when the application identification number exists, the application calling module finds out the application interface structure position corresponding to the application identification number and jumps to the position to execute the corresponding application interface structure program.
Further, a dynamic pointer array is defined, and pointer values of the other interfaces of the program in the entry position of the program and other interface positions of the program are set to be a fixed gap value relative to the pointer value of the entry position.
Further, the storage sequence of each application program stored in the ROM program according to the actual storage position in the application program is structured from top to bottom as follows: a starting code storage area, a system program storage area, an entry pointer storage area and an application program storage area.
Further, when the determination is that the application identifier exists, the application calling module finds out the application interface structure position corresponding to the application identifier, and jumps to the position to execute the corresponding application interface structure program, and then the method further includes: and after the execution of the application interface structure program is finished, notifying the called application program, returning success by calling a success reply, and returning failure by calling a failure reply.
A universal embedded loading application system is characterized by comprising the following modules:
the pointer definition module is used for defining a group of dynamic pointer arrays and pointing to the entry position of the program and other interface positions of the program;
the program storage module is used for storing each application program in the read-only memory according to the actual storage position in a structuralized manner;
an entry definition module for defining a program entry format, comprising: the interface architecture defines the position of each application interface structure, and the entrance architecture defines the application identification number and the corresponding relation with the position of the application interface structure;
the calling information storage module is used for storing the application identification number and the corresponding relation between the application interface structure positions corresponding to the application identification number into the application calling module;
the application calling module is used for starting to call the application, firstly, the application identification number to be called is transmitted into the application calling module, and the application calling module inquires and judges whether the application exists according to the application identification number; and when the application identification number exists, the application calling module finds out the application interface structure position corresponding to the application identification number and jumps to the position to execute the corresponding application interface structure program.
The invention has the beneficial effects that:
the method calls the interface directly when needed, thus the whole application does not need to be loaded into the transient memory in advance for operation, the actions of repeated loading and unloading are not needed, and the problem of memory leakage is not caused. The stability of the system can be increased.
Drawings
FIG. 1 is a frame diagram of the present invention;
FIG. 2 is a schematic diagram of the program storage of the present invention;
FIG. 3 is a main flow chart of the present invention.
Detailed Description
The invention is further illustrated below with reference to the figures and examples.
S101, defining a group of dynamic pointer arrays to point to the entry position of a program and other interface positions of the program;
defining a group of dynamic pointer arrays, pointing to the entry position of the program and other interface positions of the program, wherein the pointer arrays store the entry position of the program and dynamic pointers of other interfaces in sequence, and the pointer values of other interfaces of the program are fixed differences relative to the pointer value of the entry position, so that different applications can be called by modifying the correspondence of the entry positions.
S102, storing each application program in a read-only memory according to the actual storage position in a structuralized manner;
the program storage mode proposed by the invention is shown in fig. 2, and only the application program storage area and the entry pointer storage area can be upgraded when the hardware is upgraded. This can greatly reduce the time for over-the-air upgrades, reducing the likelihood of failures due to traffic and connection interruptions. Meanwhile, the application program storage area and the entry pointer storage area can be subdivided into 2 parts, one part can be upgraded, and the other part does not need to be upgraded. This further reduces the likelihood of problems with upgrades.
According to the storage mode proposed by the invention, the system can be added with new application programs more easily. The newly added application program can be called by placing the application program in the storage area and adding the application entry storage position pointer to the entry pointer part. Moreover, the hardware does not need to be repeatedly upgraded, and different functions can be achieved by the same hardware.
Each application program is structurally stored in the ROM according to the actual storage position. And calls the program directly through the secondary pointer when needed. The secondary pointer includes: one level is a chip that does not support external storage, and the chip needs to load the chip into an internal storage area for calling and running. The second level is a chip supporting external storage, and the operation is directly called in an external storage area.
S103, defining a program entry format, including: the interface architecture defines the position of each application interface structure, and the entrance architecture defines the application identification number and the corresponding relation with the position of the application interface structure;
the program entry format is defined as follows:
the program interface architecture:
the architecture of an application may be different terms depending on the implementation, and the basic architecture is as follows:
the architecture of the structure must include:
{
the location of the entry point to the start-up procedure,
the position of the entry point of the end program,
the location of the entry point of the communication interface,
. . . . (can be increased as desired)
}
Program entry architecture:
the program entry is the storage location and the unique identification number of all the application program structure bodies, and the unique identification number can be defined according to the continuity of the product. The structure is defined as follows:
the structure body:
{
application identification number 1: the application 1 is given the location of the interface structure,
application identification number 2: the application 2 interface structure location is such that,
application identification number 3: the application 3 is applying the location of the interface structure,
s104, storing the corresponding relation between the application identification number and the application interface structure position corresponding to the application identification number into an application calling module;
s105, starting to call an application program, firstly, transmitting an application identification number to be called into an application calling module, and inquiring and judging whether the application exists or not by the application calling module according to the application identification number; when the application identification number exists, the application calling module finds out the application interface structure position corresponding to the application identification number and jumps to the position to execute the corresponding application interface structure program; and after the execution of the application interface structure program is finished, informing the called application program whether the calling is successful or not.
When the application program is called, an application identification number to be called is firstly transmitted to an application calling module, and the application calling module inquires whether the application exists or not according to the identification number;
when the identification number exists, according to the appointed calling interface, the application calling module inquires the application interface structure and jumps to the appointed position to execute the application interface;
and after the execution of the interface is finished, informing the called application program whether the calling is successful or not.
The call success reply returns success, and the call failure reply returns failure. And the system is prevented from being crashed because the system is always in the calling program state after the calling fails.
1. The method can be used on all real-time operating systems or without operating systems without file systems:
the invention can realize the functions of loading, running and unloading of the application by using the characteristics of the programming language and only by defining the structure body without adding new codes.
2. The application code is directly operated without using a container mode, the system efficiency is not influenced, and the system operation resource requirement is reduced:
although the container mode can ensure that the application code does not affect the stability of the system, in many embedded applications, the code applied by the application is not complex, and the instability is increased by using the container structure. It is also not as easy as the stability of direct control applications.
The method directly runs the application code instead of loading the application code into a container for execution.
3. The interface is called according to the operation requirement of the system without loading the whole application and then executing the application.
The invention directly calls the interface when needed, thus the whole application does not need to be loaded into the transient memory in advance for operation, the actions of loading and unloading do not need to be repeated, and the problem of memory leakage can not be caused. The stability of the system can be increased.
What has been described above is only a preferred embodiment of the present invention, and the present invention is not limited to the above examples. It is to be understood that other modifications and variations directly derivable or suggested by those skilled in the art without departing from the basic concept of the present invention are to be considered as included within the scope of the present invention.

Claims (5)

1. A universal embedded loading application method is characterized by comprising the following steps:
defining a dynamic pointer array, which points to the entry position of the application program and other interface positions of the application program;
structuring and storing each application program in a read-only memory according to the actual storage position of the application program;
defining an application entry format comprising: the interface architecture defines various application interface structure positions, and the entrance architecture defines application identification numbers and corresponding relations with the application interface structure positions;
storing the corresponding relation between the application identification number and the application interface structure position corresponding to the application identification number into an application calling module;
starting to call an application program, firstly, transmitting an application identification number to be called into an application calling module, and inquiring and judging whether the application program exists or not by the application calling module according to the application identification number;
and when the application identification number exists, the application calling module finds out the application interface structure position corresponding to the application identification number and jumps to the position to execute the corresponding application interface structure program.
2. The method as claimed in claim 1, wherein the defining a dynamic pointer array is performed such that the pointer values pointing to the entry location of the application program and other interfaces of the application program in other interface locations of the application program are a settable fixed gap value with respect to the pointer values of the entry location.
3. The method according to claim 1, wherein the storing order of each application program stored in the rom program according to the actual storing position is from top to bottom: a starting code storage area, a system program storage area, an entry pointer storage area and an application program storage area.
4. The method as claimed in claim 1, wherein when the determining is yes, the step of finding the position of the application interface structure corresponding to the application identifier by the application calling module, and after jumping to the position and executing the corresponding application interface structure program further comprises: and after the execution of the application interface structure program is finished, notifying the called application program, returning success by calling a success reply, and returning failure by calling a failure reply.
5. A universal embedded loading application system is characterized by comprising the following modules:
the pointer definition module is used for defining a group of dynamic pointer arrays and pointing to the entry position of the application program and other interface positions of the application program;
the program storage module is used for storing each application program in the read-only memory according to the actual storage position in a structuralized manner;
an entry definition module for defining an application entry format, comprising: the interface architecture defines various application interface structure positions, and the entrance architecture defines application identification numbers and corresponding relations with the application interface structure positions;
the calling information storage module is used for storing the application identification number and the corresponding relation between the application interface structure positions corresponding to the application identification number into the application calling module;
the application calling module is used for starting to call the application, firstly, the application identification number to be called is transmitted into the application calling module, and the application calling module inquires and judges whether the application exists according to the application identification number; and when the application identification number exists, the application calling module finds out the application interface structure position corresponding to the application identification number and jumps to the position to execute the corresponding application interface structure program.
CN201610826247.8A 2016-09-18 2016-09-18 Universal embedded loading application system and method Active CN106371884B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610826247.8A CN106371884B (en) 2016-09-18 2016-09-18 Universal embedded loading application system and method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610826247.8A CN106371884B (en) 2016-09-18 2016-09-18 Universal embedded loading application system and method

Publications (2)

Publication Number Publication Date
CN106371884A CN106371884A (en) 2017-02-01
CN106371884B true CN106371884B (en) 2019-12-20

Family

ID=57896706

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610826247.8A Active CN106371884B (en) 2016-09-18 2016-09-18 Universal embedded loading application system and method

Country Status (1)

Country Link
CN (1) CN106371884B (en)

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1502075A (en) * 2001-03-16 2004-06-02 Ħ��������˾ Method for loading and executing an application in an embedded environment
CN1529227A (en) * 2003-09-29 2004-09-15 中兴通讯股份有限公司 USB storage drive development method in embedding system
CN1687899A (en) * 2005-06-15 2005-10-26 大唐微电子技术有限公司 Method, system and module for dynamic downloading of applied programe to user identification
CN101004690A (en) * 2007-01-09 2007-07-25 京信通信技术(广州)有限公司 Integrative method for updating load program and application program in embedded type system
CN101290577A (en) * 2007-04-20 2008-10-22 鸿富锦精密工业(深圳)有限公司 Embedded equipment and its loading method
CN101464807A (en) * 2009-01-08 2009-06-24 杭州华三通信技术有限公司 Application program loading method and device
CN102541579A (en) * 2010-12-17 2012-07-04 沈阳新邮通信设备有限公司 Method for dynamically loading application program of embedded system
CN102750157A (en) * 2011-04-20 2012-10-24 中兴通讯股份有限公司 Application program loading method and device
CN102955707A (en) * 2011-08-31 2013-03-06 福建三元达软件有限公司 Method for mutual loading of drive program and application program based on foreground-background system
CN103294510A (en) * 2013-05-24 2013-09-11 深圳市爱夫卡科技有限公司 Dynamic application loading method and device

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1502075A (en) * 2001-03-16 2004-06-02 Ħ��������˾ Method for loading and executing an application in an embedded environment
CN1529227A (en) * 2003-09-29 2004-09-15 中兴通讯股份有限公司 USB storage drive development method in embedding system
CN1687899A (en) * 2005-06-15 2005-10-26 大唐微电子技术有限公司 Method, system and module for dynamic downloading of applied programe to user identification
CN101004690A (en) * 2007-01-09 2007-07-25 京信通信技术(广州)有限公司 Integrative method for updating load program and application program in embedded type system
CN101290577A (en) * 2007-04-20 2008-10-22 鸿富锦精密工业(深圳)有限公司 Embedded equipment and its loading method
CN101464807A (en) * 2009-01-08 2009-06-24 杭州华三通信技术有限公司 Application program loading method and device
CN102541579A (en) * 2010-12-17 2012-07-04 沈阳新邮通信设备有限公司 Method for dynamically loading application program of embedded system
CN102750157A (en) * 2011-04-20 2012-10-24 中兴通讯股份有限公司 Application program loading method and device
CN102955707A (en) * 2011-08-31 2013-03-06 福建三元达软件有限公司 Method for mutual loading of drive program and application program based on foreground-background system
CN103294510A (en) * 2013-05-24 2013-09-11 深圳市爱夫卡科技有限公司 Dynamic application loading method and device

Also Published As

Publication number Publication date
CN106371884A (en) 2017-02-01

Similar Documents

Publication Publication Date Title
CN110673853B (en) Compiling method, device and system
CN105718287B (en) A kind of program streaming execution method of intelligent terminal
CN105100191A (en) Method, device and system for realizing Java application installation via cloud compilation
US20140033208A1 (en) Method and device for loading application program
CN103810416A (en) Software installation or uninstallation method and device
CN105335187A (en) Application processing method and apparatus
CN103927180A (en) Implementation method for functional plug-ins based on Android system and system of functional plug-ins based on Android system
CN110727581A (en) Collapse positioning method and electronic equipment
CN108255735A (en) Associated environment test method, electronic device and computer readable storage medium
CN105045642A (en) Method and device for loading self-defined classes
CN107562499A (en) Using the method, apparatus and computer-readable recording medium of loading
CN101932145B (en) Device and method for managing software versions in wireless communication system
CN111158743A (en) Big data operation and maintenance management platform
CN106371884B (en) Universal embedded loading application system and method
CN112214413B (en) Application program testing method, device, equipment and storage medium
CN113791870B (en) WebAssemble virtual machine distributed system fine granularity migration method and system
CN113986312B (en) Software upgrading method and device, electronic equipment and computer readable storage medium
CN113342376B (en) Method and device for upgrading operating system of Internet of things equipment
CN116028084A (en) Cross-version hot upgrading method, system and terminal based on OpenStack cloud platform
CN115454575A (en) Method, device, equipment and storage medium for conversion and automatic loading of jar package
CN110309018B (en) Charging equipment system switching method, charging equipment and readable storage medium
CN112965733A (en) Component library updating method and device, electronic equipment and readable storage medium
WO2019157891A1 (en) Application installation method and application installer generating method
CN112596821A (en) Method for dynamically loading algorithm in android application
CN112035439A (en) Data migration method and device, computer equipment and computer readable storage medium

Legal Events

Date Code Title Description
C06 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