Driving method and driving system of embedded software system and embedded software system
By separating the application layer and platform layer in an embedded software system and using function mapping tables to make interface calls, the problems of increased compilation time and poor portability caused by integrated development in an embedded system are solved, and rapid compilation and Efficient maintenance.
Patent Information
- Application Number
- CN202410947929.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-16
- Publication Date
- 2024-11-12
AI Technical Summary
The integrated development and compilation of existing embedded systems leads to a high coupling of the underlying and upper-level code, which increases the compilation time, reduces the system's portability and reusability, and increases the difficulty of post-update updates and maintenance.
By dividing the embedded software system into independently compiled application layer and platform layer, using function mapping tables to make the application layer call the platform layer interface, realizing low coupling between the application layer and the platform layer, reducing compilation time and improving portability and reproducibility Usability.
It realizes the rapid compilation of embedded software systems, improves the portability and reusability of the system, and reduces the difficulty of post-update updates and maintenance.
Smart Images

Figure CN118939328A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of embedded systems, and in particular to a driving method, a driving system and an embedded software system. Background Art
[0002] At present, embedded systems are usually developed and compiled in an integrated manner, that is, the underlying basic libraries, drivers, etc. are compiled with the upper-level applications into a single executable file. The underlying code is highly coupled with the upper-level application code. When the underlying code changes, the upper-level application needs to be modified accordingly. Since the underlying code and the upper-level application code are compiled together, the compilation time of the entire project will increase significantly. At the same time, integrated development and compilation will also make the portability and reusability of the application worse, which is not conducive to later updates and maintenance. Summary of the invention
[0003] In view of this, the object of the present invention is to provide a driving method, a driving system and an embedded software system for an embedded software system, thereby reducing the compilation time of the embedded software system, improving the portability and reusability of the embedded software system, and further reducing the difficulty of later updating and maintenance of the embedded software system.
[0004] In the first aspect, an embodiment of the present invention provides a driving method for an embedded software system, which is applied to the embedded software system, wherein the embedded software system is divided into an independently compiled application layer and a platform layer, wherein the platform layer is pre-installed in the embedded device, and the application layer includes at least one application software; the method comprises: the application layer calls a function mapping table pre-stored in the embedded device based on information of the application software to be run; the function mapping table stores a correspondence between an interface name of a function interface and a function pointer; the application layer traverses the function mapping table according to the function mapping table and the target interface name in the information of the application software to be run, and obtains a target function pointer corresponding to the target interface name; the application layer calls the corresponding target function interface in the platform layer according to the target function pointer to run the application software to be run.
[0005] Furthermore, at least one function interface that can be called by the application layer is pre-encapsulated in the platform layer; a function interface interacts with a hardware function of the embedded device, or a function interface interacts with an algorithm function of a third-party software; before the application layer calls the function mapping table pre-stored in the embedded device based on the information of the application software to be run, the method also includes: the platform layer sets a unique memory address for the function pointer corresponding to each function interface based on the pre-stored compilation link file; the platform layer generates a function mapping table according to the correspondence between the function name corresponding to each function interface and the function pointer; the platform layer sends the function mapping table to the public memory area of the embedded device for the application layer to call.
[0006] Furthermore, after the step in which the platform layer sends the function mapping table to the public memory area of the embedded device for the application layer to call, the method also includes: step S1: when the platform layer is started, the platform layer obtains the function mapping table in the public memory area; step S2: the platform layer determines whether the unverified memory address corresponding to the unverified function pointer in the function mapping table is the same as the initial memory address set for the current function pointer based on the compiled link file in a preset order; step S3: if the unverified memory address is different from the initial memory address, the number of errors is increased by 1; wherein the initial number of errors is 0; step S4: the platform layer determines whether the number of errors is less than a preset number threshold; step S5: if the number of errors is less than the preset number threshold, the unverified memory address is modified according to the initial memory address, and steps S2-S4 are repeated until the function mapping table does not include the unverified function pointer, and it is determined that the function mapping table verification is completed; step S6: if the number of errors is greater than or equal to the preset number threshold, it is determined that the public memory area is damaged and the startup is stopped.
[0007] Further, after determining that the function mapping table verification is completed, the method also includes: the platform layer obtains application description information in the public memory area; the application description information includes description package information and application information corresponding to the installed application software in the application layer; the platform layer determines the description package integrity verification result corresponding to the description package information according to a preset integrity verification method; when the description package integrity verification result is that the description package integrity verification is successful, the platform layer determines the description package signature verification result corresponding to the description package information according to a preset signature verification method; when the description package signature verification result is that the description package signature verification is successful, the platform layer determines the application integrity verification result corresponding to the application information according to the preset integrity verification method; when the application integrity verification result is that the application integrity verification is successful, the platform layer determines the application signature verification result corresponding to the application information according to the preset signature verification method; when the application signature verification result is that the application signature verification is successful, the platform layer updates the application management table according to the installed application software; the application management table stores the correspondence between the application software name of the installed application software and the application description information; the platform layer generates a run request to the application layer based on the run address corresponding to the installed application software.
[0008] Furthermore, before the step of the platform layer obtaining the application description information in the public memory area; the method also includes: when the platform layer is in the application installation state, the platform layer opens a preset offline installation interface; the preset offline installation interface corresponds to the peripheral interface of the embedded device; when the preset offline installation interface is opened and the peripheral interface is connected to the external device, the application layer obtains the authentication instruction sent by the external device; the application layer determines whether the authentication instruction is valid according to the preset authentication method; if the authentication instruction is valid, the application layer obtains the firmware header information corresponding to the application software to be installed in the external device; the platform layer determines whether the firmware header information meets the preset integrity and correctness requirements; if the firmware header information meets the preset integrity and correctness requirements, the application software to be installed is received and installed; the platform layer verifies the installed application software to be installed according to the preset application software verification method, and obtains the verification result of the installed application software to be installed; when the verification result is a successful verification, it is determined that the installed application software to be installed is an installed application software, and the application layer sends the application description information corresponding to the installed application software to the public memory area.
[0009] Furthermore, before the step of the platform layer obtaining the application description information in the public memory area; the method also includes: when the platform layer is in the application installation state, the platform layer opens a preset online installation interface; the preset online installation interface corresponds to the peripheral interface of the embedded device; when the preset online installation interface is opened, the application layer communicates with the peripheral server; the platform layer sends application software update information to the peripheral server through the application layer to receive the firmware package corresponding to the application software to be updated returned by the peripheral server; the application software update information includes the software name and update version number corresponding to the application software to be updated; the platform layer stores the firmware package; the application layer calls the preset upgrade flag interface to set the upgrade flag for the firmware package; the platform layer updates the application software to be updated based on the upgrade flag and the firmware package, and restarts the updated application software to be updated after the update is completed.
[0010] Furthermore, the platform layer updates the application software to be updated based on the upgrade flag and the firmware package, and restarts the updated application software to be updated after the update is completed, including: the platform layer determines whether the application layer stores the upgrade flag; if the application layer stores the upgrade flag, the platform layer obtains the firmware header information corresponding to the application software to be updated in the firmware package; the platform layer determines whether the firmware header information meets the preset integrity and correctness requirements; if the firmware header information meets the preset integrity and correctness requirements, the application layer updates the application software to be updated to the updated version number; the application layer verifies the updated application software to be updated according to the preset application software verification method, and obtains the verification result of the updated application software to be updated; when the verification result of the updated application software to be updated is successful, the application updates the corresponding application description information stored in the public memory area according to the application description information corresponding to the updated application software to be updated, and the platform layer sends a restart signal to the application layer to restart the updated application software to be updated.
[0011] In the second aspect, an embodiment of the present invention provides a driving system for an embedded software system, which is applied to the embedded software system, and the driving system includes: a function mapping table acquisition module, which is used by the application layer to call the function mapping table pre-stored in the embedded device based on the information of the application software to be run; the function mapping table stores the correspondence between the interface name of the function interface and the function pointer; a target function pointer determination module, which is used by the application layer to traverse the function mapping table according to the function mapping table and the target interface name in the information of the application software to be run, and obtain the target function pointer corresponding to the target interface name; an application software running module, which is used by the application layer to call the corresponding target function interface in the platform layer according to the target function pointer to run the application software to be run.
[0012] In a third aspect, an embodiment of the present invention provides an embedded software system, comprising an independently compiled application layer and a platform layer; and also comprising a driving system for the above-mentioned embedded software system; the driving system for the embedded software system is respectively arranged in the application layer and the platform layer; and the platform layer is pre-installed in an embedded device.
[0013] Furthermore, the application layer includes at least one application software; each application software is compiled independently; the application software is installed in the embedded device through the peripheral interface of the embedded device; a function mapping table is set in the platform layer, and the correspondence between the interface name of the function interface and the function pointer is pre-stored in the function mapping table, and at least one function interface that can be called by the application layer is pre-encapsulated in the platform layer; a function interface interacts with a hardware function of the embedded device, or a function interface interacts with an algorithm function of a third-party software; when the application software is running, the hardware function or the algorithm function is called through the function mapping table; the platform layer is also provided with a kernel unit and a service unit; the kernel unit includes a real-time operating system and a hardware abstraction subunit matching the real-time operating system; the service unit is used to monitor the operation of the real-time operating system.
[0014] The embodiment of the present invention provides a driving method, driving system and embedded software system of an embedded software system, which are applied to the embedded software system, wherein the embedded software system is divided into an independently compiled application layer and a platform layer, wherein the platform layer is pre-set in an embedded device, and the application layer includes at least one application software; the method comprises: the application layer calls a function mapping table pre-stored in the embedded device based on the information of the application software to be run; the function mapping table stores the corresponding relationship between the interface name of the function interface and the function pointer; the application layer traverses the function mapping table according to the function mapping table and the target interface name in the information of the application software to be run, and obtains the target function pointer corresponding to the target interface name; the application layer calls the corresponding target function interface in the platform layer according to the target function pointer to run the application software to be run. In this method, by setting a function mapping table between the independently compiled application layer and the platform layer, so that the application layer runs the application software to be run by calling the corresponding interface in the platform layer through the function mapping table, the application layer can flexibly call various functions provided by the platform layer, and realizes low coupling between the application layer and the platform layer, thereby reducing the compilation time of the embedded software system, improving the portability and reusability of the embedded software system, and further reducing the difficulty of later updating and maintenance of the embedded software system.
[0015] Other features and advantages of the present invention will be described in the following description, and partly become apparent from the description, or understood by practicing the present invention. The purpose and other advantages of the present invention are realized and obtained by the structures particularly pointed out in the description, claims and drawings.
[0016] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, preferred embodiments are given below and described in detail with reference to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] In order to more clearly illustrate the specific implementation methods of the present invention or the technical solutions in the prior art, the drawings required for use in the specific implementation methods or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some implementation methods of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0018] Figure 1 A flowchart of a driving method for an embedded software system provided in Embodiment 1 of the present invention;
[0019] Figure 2 A flow chart of a method for setting a function mapping table provided in Embodiment 1 of the present invention;
[0020] Figure 3 A flowchart of a method for verifying a function mapping table at startup of a platform layer provided in Embodiment 1 of the present invention;
[0021] Figure 4 A flow chart of a method for updating an application management table and starting an application at the platform layer provided in Embodiment 1 of the present invention;
[0022] Figure 5 A flowchart of a method for offline installation of application software when the platform layer is in an application installation state provided in the first embodiment of the present invention;
[0023] Figure 6 A flowchart of a method for online installation of application software when the platform layer is in an application installation state provided in the first embodiment of the present invention;
[0024] Figure 7 A flowchart of a method for updating and restarting application software to be updated based on an upgrade flag and a firmware package at the platform layer provided in the first embodiment of the present invention;
[0025] Figure 8 A schematic diagram of a driving system of an embedded software system provided in Embodiment 2 of the present invention;
[0026] Fig. 9 A schematic diagram of a driving system of another embedded software system provided in Embodiment 2 of the present invention;
[0027] Fig.10 A schematic diagram of an embedded software system provided in Embodiment 3 of the present invention;
[0028] Fig.11 This is a schematic diagram of another embedded software system provided in Embodiment 3 of the present invention.
[0029] Icons: 1-function mapping table acquisition module; 2-target function pointer determination module; 3-application software running module; 4-function mapping table setting module; 5-application software installation and update module; 6-application layer; 7-platform layer; 8-driver system; 61-application software; 71-function mapping table; 72-kernel unit; 73-service unit. DETAILED DESCRIPTION
[0030] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the accompanying drawings. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0031] To facilitate understanding of this embodiment, the embodiment of the present invention is described in detail below.
[0032] Embodiment 1:
[0033] Figure 1 This is a flow chart of a driving method for an embedded software system provided in Embodiment 1 of the present invention.
[0034] The driving method of the embedded software system is applied to the embedded software system. The embedded software system is divided into an independently compiled application layer and a platform layer. The platform layer is preset in the embedded device, and the application layer includes at least one application software.
[0035] Here, in the embedded software system, an independent software project is created for the platform layer, and independent software projects are created for each application in the application layer. Each software project is compiled and linked to generate its own independent application software executable firmware, realizing the separation design of software application and software platform.
[0036] Reference Figure 1 , a driving method for an embedded software system, comprising:
[0037] Step S101, the application layer calls a function mapping table pre-stored in the embedded device based on information of the application software to be run; the function mapping table stores a correspondence between an interface name of a function interface and a function pointer.
[0038] Here, the platform layer is pre-packaged with function interfaces that can be called by the application layer. The application software in the application layer is downloaded to the embedded device through the peripheral interface of the embedded device. The application layer calls the platform layer by calling the interface in the platform layer to run the application software and implement corresponding business operations.
[0039] In one embodiment, at least one function interface that can be called by the application layer is pre-encapsulated in the platform layer; a function interface interacts with a hardware function of the embedded device, or a function interface interacts with an algorithm function of a third-party software.
[0040] Here, the platform layer predefines a set of standard function interfaces and protocols for communication with the application layer. The function interface is used to access the hardware resources of the embedded device and call the algorithm of the third-party software. The platform layer stores the corresponding relationship between the interface names and function pointers of these function interfaces in a data mapping table.
[0041] The platform layer encapsulates the complex hardware operations in embedded devices behind the function interface to simplify the application layer's calls to hardware resources. For example, the platform layer provides an interface to control LED lights, and the application layer only needs to call this interface without knowing how to specifically control the LED lights in embedded devices.
[0042] The interfaces of third-party software may include math library interfaces, which are used to provide common math calculation functions; graphics library interfaces, which are used to provide graphics drawing and image processing functions, etc. In this way, the algorithm functions of third-party software can be encapsulated in the platform layer, and the application layer can easily call these functions without knowing their specific implementation details.
[0043] The application layer can call the function interface provided by the platform layer through the function name to realize the management and use of embedded device hardware resources and third-party software resources, thus reflecting the low coupling between the platform layer and the application layer.
[0044] Step S102: the application layer traverses the function mapping table according to the target interface name in the function mapping table and the information of the application software to be run, and obtains a target function pointer corresponding to the target interface name.
[0045] Specifically, when the application layer is started, it obtains the starting address of the function mapping table by reading the address of the public memory area. The application layer traverses each entry in the function mapping table according to the target interface name, compares the target interface name with the interface name stored in the function mapping table, and extracts the target function pointer in the entry if a matching function name is found.
[0046] Step S103, the application layer calls the corresponding target function interface in the platform layer according to the target function pointer to run the application software to be run.
[0047] Here, the application layer calls the corresponding function interface through the found target function pointer, and calls the corresponding hardware or third-party software to run the application software to be run.
[0048] Reference Figure 2 Before step S101, the method further includes:
[0049] Step S201: the platform layer sets a unique memory address for a function pointer corresponding to each function interface based on a pre-stored compilation link file.
[0050] Here, the compilation link file is used to define how the compiled code and data are placed in memory.
[0051] Step S202: the platform layer generates a function mapping table according to the correspondence between the function name and the function pointer corresponding to each function interface.
[0052] Here, the platform layer defines a special segment based on the compiled link file to store the function mapping table. This segment contains the function name and the corresponding function pointer.
[0053] Step S203: the platform layer sends the function mapping table to the public memory area of the embedded device for the application layer to call.
[0054] Here, the public shared memory area is a public RAM (Random Access Memory). The platform layer stores the function mapping table into the public RAM based on the compiled link file.
[0055] In one embodiment, referring to Figure 3 After step S203, the method further includes:
[0056] Step S1: When the platform layer is started, the platform layer obtains the function mapping table in the public memory area.
[0057] Here, when the platform layer is started, the revelation address of the public RAM is read to obtain the data mapping table address.
[0058] Step S2: The platform layer determines, in a preset order, whether the unverified memory address corresponding to the unverified function pointer in the function mapping table is the same as the initial memory address set for the current function pointer based on the compiled link file.
[0059] Here, the preset order is pre-set according to the actual situation, and can be the order from the first to the last. The platform layer traverses each entry in the data mapping table in the preset order to verify the function pointer in the function mapping table. Compare the unverified memory address of the unverified function pointer with the initial memory address set based on the compilation link file to see if they are the same.
[0060] Step S3: If the unverified memory address is different from the initial memory address, the number of errors is increased by 1; wherein the initial number of errors is 0.
[0061] Here, the number of errors is initialized to 0 before traversing the function mapping table.
[0062] Each time an unverified memory address is found to be different from the initial memory address, the error count is increased.
[0063] Step S4: The platform layer determines whether the number of errors is less than a preset number threshold.
[0064] Here, the preset number threshold is pre-set according to actual conditions and can be set to 3.
[0065] The number threshold is used to represent the maximum allowable number of times that the unverified memory address in the function mapping table is different from the initial memory address.
[0066] Step S5: If the number of errors is less than the preset number threshold, modify the unverified memory address according to the initial memory address, and repeat steps S2-S4 until the function mapping table does not include unverified function pointers, and determine that the function mapping table verification is completed.
[0067] Here, when the number of errors is less than a preset number threshold, the current unverified memory address in the function mapping table is updated according to the initial memory address, and verification is continued until the function mapping table verification is completed.
[0068] Step S6: If the number of errors is greater than or equal to the preset number threshold, it is determined that the public memory area is damaged and the startup is stopped.
[0069] Here, when the number of errors is greater than or equal to a preset number threshold, it is determined that the public memory area is damaged, the platform layer stops starting, and an error prompt is given.
[0070] The platform layer verifies the correctness of the function mapping table at startup and corrects the error address if necessary. If the number of errors exceeds the preset threshold, it is considered that the common memory area may be damaged and the startup process is stopped. This can improve the reliability of the system and ensure that the addresses in the function mapping table are correct.
[0071] In one embodiment, referring to Figure 4 In step S6, after determining that the function mapping table verification is completed, the method further includes:
[0072] Step S401, the platform layer obtains application description information in the public memory area; the application description information includes description package information and application program information corresponding to the installed application software in the application layer.
[0073] Here, the description package information is metadata and signature information about the application, which is used to verify the source and integrity of the application.
[0074] Application information includes the actual running application data and related information, which is used to start and run the application.
[0075] Specifically, the description package information should include: Application name: also called the name of the application, used to identify the application. Application version number, used for version management and update checking. Publisher information, related information of the developer or organization that published the application. Signature information, used to verify the digital signature of the application to ensure that the source of the application is credible. Hash value, hash value of the application data, used to verify the integrity of the application and ensure that the data has not been tampered with. Description file, a file that describes the application functions and dependencies in detail. Dependencies, a list of other libraries or components required by the application.
[0076] Application information should include: Run address, the starting run address of the application, used to start the application. Program size, the size of the application, used for memory management and verification. Program data, the actual application code and data. Hash value, the hash value of the program data, used for integrity verification. Signature information, used to verify the digital signature of the program data to ensure that the data source is credible. Startup parameters, the parameters required to start the application. Permission information, a list of system permissions required by the application.
[0077] Step S402: The platform layer determines the description package integrity verification result corresponding to the description package information according to a preset integrity verification method.
[0078] Here, the preset integrity verification method is pre-set according to the actual situation, and can be a hash value verification method. The platform layer verifies the integrity of the description package information through the hash value verification method. Among them, the description package integrity verification result is the description package integrity verification success or the description package integrity verification failure.
[0079] Step S403, when the description package integrity verification result is that the description package integrity verification is successful, the platform layer determines the description package signature verification result corresponding to the description package information according to a preset signature verification method.
[0080] Here, the preset signature verification method is pre-set according to the actual situation, and can be a public key verification method. The platform layer performs description package signature verification on the description package whose description package integrity verification succeeds according to the public key verification method. The description package signature verification result is the description package signature verification success or the description package signature verification failure.
[0081] Step S404: When the description package signature verification result is that the description package signature verification is successful, the platform layer determines the application integrity verification result corresponding to the application information according to a preset integrity verification method.
[0082] Here, after the package verification is successful, the platform layer verifies the integrity of the application to ensure that the application has not been tampered with. The application integrity verification result is the application integrity verification success or the application integrity verification failure.
[0083] Step S405, when the application integrity verification result is that the application integrity verification is successful, the platform layer determines the application signature verification result corresponding to the application information according to a preset signature verification method.
[0084] Here, if the application integrity check succeeds, the platform layer further checks the application signature to ensure that its source is credible. The application signature verification result is either application signature verification success or application signature verification failure.
[0085] Step S406, when the application signature verification result is that the application signature verification is successful, the platform layer updates the application management table according to the installed application software; the application management table stores the correspondence between the application software name and the application description information of the installed application software.
[0086] Here, when the description package information and the application program information are verified successfully, the platform layer updates the application management table and writes the information of the installed application software into the application management table.
[0087] Step S407: the platform layer generates an execution request to the application layer based on the execution address corresponding to the installed application software.
[0088] Here, the platform layer determines the application software to be run according to the running address of the installed application software recorded in the application management table, generates a running request based on the information of the application software to be run, and sends it to the application layer to start the application software to be run.
[0089] During the startup process, the platform layer uses this information to perform multi-level verification to ensure the integrity and source of the application. After successful verification, the platform layer updates the application management table and starts the application, ensuring the security and stability of the system.
[0090] In one embodiment, referring to Figure 5 Before step S401, the method further includes:
[0091] Step S501, when the platform layer is in the application installation state, the platform layer opens a preset offline installation interface; the preset offline installation interface corresponds to the peripheral interface of the embedded device.
[0092] Here, when the platform layer is in the application installation state, the platform opens an interface for offline installation, and the offline installation interface corresponds to the peripheral interface of the embedded device, which can be a USB (Universal Serial Bus) interface and a UART (Universal Asynchronous Receiver / Transmitter) interface, etc. The offline installation interface is used to receive installation data transmitted by an external device.
[0093] Step S502: When the preset offline installation interface is enabled and the peripheral interface is connected to an external device, the application layer obtains an authentication instruction sent by the external device.
[0094] Here, when the preset offline installation interface is opened and the external device is connected to the peripheral interface, the application layer starts to listen to the authentication command sent by the external device. The authentication command is usually used to verify the identity of the external device to ensure that only authorized devices can install applications.
[0095] The components of the authentication instruction include: device identifier, which uniquely identifies the ID of the external device; timestamp, which is the current timestamp used to prevent replay attacks; random number, which is a randomly generated number used to increase unpredictability; signature, which uses the private key of the external device to digitally sign the above content; authentication code, which is authentication data composed of device identifier, timestamp, random number and signature.
[0096] Authentication instructions ensure the identity of external devices and the integrity of data through device identifiers, timestamps, random numbers, and digital signatures. By verifying this information, embedded devices can ensure that only authorized devices can install applications, thereby improving system security.
[0097] Step S503: The application layer determines whether the authentication instruction is valid according to a preset authentication method.
[0098] Here, the preset authentication method is preset according to the actual situation.
[0099] Specifically, the authentication method may be: parsing the authentication instruction, after receiving the authentication instruction from the external device, parsing the device identifier, timestamp, random number and signature. Checking the timestamp, verifying whether the timestamp is within a reasonable range to prevent replay attacks. Verifying the signature, using the pre-stored public key to verify the validity of the signature, ensuring that the data has not been tampered with and the source is credible. Checking the device ID, verifying whether the device ID is in the authorized device list.
[0100] Step S504: If the authentication instruction is valid, the application layer obtains the firmware header information corresponding to the application software to be installed in the external device.
[0101] Step S505: the platform layer determines whether the firmware header information meets the preset integrity and correctness requirements.
[0102] Here, the preset integrity requirement may be that the hash value verification result of the firmware header information is successful. The preset correctness requirement may be that the name of the firmware header information conforms to a preset format, the version number is valid, and the size of the firmware package is within a reasonable range.
[0103] Step S506: If the firmware header information meets the preset integrity and correctness requirements, the application software to be installed is received and installed.
[0104] Here, if the firmware header information meets the preset integrity and correctness requirements, it is determined that the firmware header information has not been tampered with or damaged.
[0105] Step S507: the platform layer verifies the installed application software to be installed according to a preset application software verification method to obtain a verification result of the installed application software to be installed.
[0106] Here, the preset application software verification method is pre-set according to the actual situation, and may include program integrity verification and firmware signature verification. After the installation is completed, the platform layer verifies the installed application software to ensure that it is successfully installed and has not been tampered with.
[0107] Step S508, when the verification result is successful, it is determined that the application software to be installed after installation is installed application software, and the application layer sends the application description information corresponding to the installed application software to the public memory area.
[0108] Here, if the installed application software passes the verification, the application layer marks it as installed application software and stores its description information in the public memory area for subsequent use.
[0109] The platform layer can safely receive and install application software from external devices through the above steps, ensuring that only verified and authorized applications can be installed. The above method ensures the security of the system and also provides a flexible offline installation mechanism.
[0110] In one embodiment, referring to Figure 6 Before step S401, the method further includes:
[0111] Step S601, when the platform layer is in the application installation state, the platform layer opens a preset online installation interface; the preset online installation interface corresponds to the peripheral interface of the embedded device.
[0112] Here, when the platform layer enters the application installation state, the online installation interface is opened, and the online installation interface corresponds to the peripheral interface of the embedded device and is used to communicate with the peripheral server. Among them, the peripheral interface can be Wi-Fi and Ethernet, etc.
[0113] Step S602, when the preset online installation interface is opened, the application layer communicates with the peripheral server.
[0114] Here, when the online installation interface is turned on, the application layer establishes a communication connection with the peripheral server through the online installation interface.
[0115] In step S603, the platform layer sends application software update information to the peripheral server through the application layer to receive the firmware package corresponding to the application software to be updated returned by the peripheral server; the application software update information includes the software name and update version number corresponding to the application software to be updated.
[0116] Step S604: the platform layer stores the firmware package.
[0117] Here, the platform layer stores the received firmware package in the memory of the embedded device for subsequent installation and use.
[0118] Step S605: The application layer calls a preset upgrade flag interface to set an upgrade flag for the firmware package.
[0119] Here, the upgrade flag is used to instruct the platform layer to perform a firmware upgrade at the next startup.
[0120] Step S606: the platform layer updates the application software to be updated based on the upgrade flag and the firmware package, and restarts the updated application software to be updated after the update is completed.
[0121] In one embodiment, referring to Figure 7 , the steps of step S606 include:
[0122] Step S701: the platform layer determines whether the application layer stores an upgrade flag.
[0123] Here, the platform layer determines whether the application layer stores an upgrade flag indicating that the firmware package needs to be upgraded. This flag is usually stored in a non-volatile memory (such as EEPROM or Flash) of the device.
[0124] The platform layer reads the upgrade flag in the memory, and if the flag exists and is set, it indicates that a firmware upgrade is required.
[0125] Step S702: If the application layer stores an upgrade flag, the platform layer obtains firmware header information corresponding to the application software to be updated in the firmware package.
[0126] Here, if it is confirmed that a firmware upgrade is required, the platform layer will read the firmware header information stored in the device memory and prepare to verify it. The firmware header information usually includes the firmware name, version number, size, hash value, etc.
[0127] Step S703: the platform layer determines whether the firmware header information meets the preset integrity and correctness requirements.
[0128] Here, the hash value of the firmware header is calculated and compared with the expected value to check whether each field of the header information meets the expected standard. Verify the integrity and correctness of the firmware header information to ensure that the firmware package has not been tampered with and that the structure and content meet expectations. Integrity is usually verified by calculating and comparing hash values, and correctness is verified by checking whether fields such as name, version number, size, etc. are reasonable.
[0129] Step S704: If the firmware header information meets the preset integrity and correctness requirements, the application layer updates the application software to be updated to the updated version number.
[0130] Here, if the firmware package header information verification passes, the application layer installs the new version of the application software in the firmware package on the device, writes the new application software in the firmware package into the program storage area of the device, and overwrites the old version of the application software.
[0131] Step S705 , the application layer verifies the updated application software to be updated according to a preset application software verification method to obtain a verification result of the updated application software to be updated.
[0132] Here, after the update is completed, the application layer needs to verify the newly installed application software to ensure its correctness and integrity. The verification method may include hash verification, signature verification, etc.
[0133] Step S706, when the verification result of the updated application software to be updated is successful, the application program updates the corresponding application description information stored in the public memory area according to the application description information corresponding to the updated application software to be updated, and the platform layer sends a restart signal to the application layer to restart the updated application software to be updated.
[0134] Here, if the newly installed application software passes the verification, the application layer writes the updated application description information into the public memory area. The application description information usually includes the application name, version number, publisher information, etc.
[0135] At the same time, in order for the update to take effect, the platform layer needs to restart the device or restart the application software. The platform layer sends a restart signal to the application layer, instructing it to perform a restart operation so that the updated software can start running.
[0136] The embodiment of the present invention provides a driving method for an embedded software system, which is applied to the embedded software system. The embedded software system is divided into an independently compiled application layer and a platform layer. The platform layer is pre-set in the embedded device, and the application layer includes at least one application software. The method includes: the application layer calls a function mapping table pre-stored in the embedded device based on the information of the application software to be run; the function mapping table stores the corresponding relationship between the interface name of the function interface and the function pointer; the application layer traverses the function mapping table according to the function mapping table and the target interface name in the information of the application software to be run, and obtains the target function pointer corresponding to the target interface name; the application layer calls the corresponding target function interface in the platform layer according to the target function pointer to run the application software to be run. In this method, by setting a function mapping table between the independently compiled application layer and the platform layer, so that the application layer runs the application software to be run by calling the corresponding interface in the platform layer through the function mapping table, the application layer can flexibly call various functions provided by the platform layer, and realize the low coupling between the application layer and the platform layer, thereby reducing the compilation time of the embedded software system, improving the portability and reusability of the embedded software system, and thus reducing the difficulty of later update and maintenance of the embedded software system.
[0137] Embodiment 2:
[0138] Figure 8 A schematic diagram of a driving system of an embedded software system provided in Embodiment 2 of the present invention.
[0139] The driver system of the embedded software system is applied to the embedded software system. The embedded software system is divided into an independently compiled application layer and a platform layer. The platform layer is pre-installed in the embedded device, and the application layer includes at least one application software. The driver system includes:
[0140] The function mapping table acquisition module 1 is used for the application layer to call the function mapping table pre-stored in the embedded device based on the information of the application software to be run; the function mapping table stores the corresponding relationship between the interface name of the function interface and the function pointer.
[0141] The target function pointer determination module 2 is used to traverse the function mapping table through the application layer according to the target interface name in the function mapping table and the information of the application software to be run, and obtain the target function pointer corresponding to the target interface name.
[0142] The application software running module 3 is used for the application layer to call the corresponding target function interface in the platform layer according to the target function pointer to run the application software to be run.
[0143] In one embodiment, referring to Fig. 9 The driving system of the embedded software system further comprises: a function mapping table setting module 4, the function mapping table setting module 4 is used to:
[0144] The platform layer sets a unique memory address for the function pointer corresponding to each function interface based on the pre-stored compilation link file.
[0145] The platform layer generates a function mapping table based on the correspondence between the function name and function pointer corresponding to each function interface.
[0146] The platform layer sends the function mapping table to the public memory area of the embedded device for the application layer to call.
[0147] In one embodiment, referring to Fig. 9 , the function mapping table setting module 4 is also used for:
[0148] When the platform layer starts, the platform layer obtains the function mapping table in the public memory area.
[0149] The platform layer determines, in a preset order, whether the unverified memory address corresponding to the unverified function pointer in the function mapping table is the same as the initial memory address set for the current function pointer based on the compiled link file.
[0150] If the unverified memory address is not the same as the initial memory address, the number of errors is increased by 1; wherein the initial number of errors is 0.
[0151] The platform layer determines whether the number of errors is less than the preset number threshold.
[0152] If the number of errors is less than a preset number threshold, the unverified memory address is modified according to the initial memory address, and the above steps are repeated until the function mapping table does not include an unverified function pointer, and it is determined that the function mapping table verification is completed.
[0153] If the number of errors is greater than or equal to the preset number threshold, it is determined that the common memory area is damaged and the startup is stopped.
[0154] In one embodiment, referring to Fig. 9 , the function mapping table setting module 4 is also used for:
[0155] The platform layer obtains the application description information in the public memory area; the application description information includes the description package information and application program information corresponding to the installed application software in the application layer.
[0156] The platform layer determines the description package integrity verification result corresponding to the description package information according to a preset integrity verification method.
[0157] When the description package integrity verification result is that the description package integrity verification is successful, the platform layer determines the description package signature verification result corresponding to the description package information according to a preset signature verification method.
[0158] When the description package signature verification result is that the description package signature verification is successful, the platform layer determines the application integrity verification result corresponding to the application information according to a preset integrity verification method.
[0159] When the application integrity verification result is that the application integrity verification is successful, the platform layer determines the application signature verification result corresponding to the application information according to a preset signature verification method.
[0160] When the application signature verification result is that the application signature verification is successful, the platform layer updates the application management table according to the installed application software; the application management table stores the correspondence between the application software name and the application description information of the installed application software.
[0161] The platform layer generates a running request to the application layer based on the running address corresponding to the installed application software.
[0162] In one embodiment, referring to Fig. 9 The driving system of the embedded software system further includes: an application software installation and update module 5, the application software installation and update module 5 is used to:
[0163] When the platform layer is in the application installation state, the platform layer opens a preset offline installation interface; the preset offline installation interface corresponds to the peripheral interface of the embedded device.
[0164] When the preset offline installation interface is turned on and the peripheral interface is connected to an external device, the application layer obtains the authentication instruction sent by the external device.
[0165] The application layer determines whether the authentication instruction is valid based on the preset authentication method.
[0166] If the authentication instruction is valid, the application layer obtains the firmware header information corresponding to the application software to be installed in the external device.
[0167] The platform layer determines whether the firmware header information meets the preset integrity and correctness requirements.
[0168] If the firmware header information meets the preset integrity and correctness requirements, the application software to be installed is received and installed.
[0169] The platform layer verifies the installed application software to be installed according to a preset application software verification method to obtain a verification result of the installed application software to be installed.
[0170] When the verification result is successful, it is determined that the application software to be installed after installation is installed application software, and the application layer sends the application description information corresponding to the installed application software to the public memory area.
[0171] In one embodiment, referring to Fig. 9, the application software installation and update module 5 is also used for:
[0172] When the platform layer is in the application installation state, the platform layer opens a preset online installation interface; the preset online installation interface corresponds to the peripheral interface of the embedded device.
[0173] When the preset online installation interface is opened, the application layer communicates with the peripheral server.
[0174] The platform layer sends application software update information to the peripheral server through the application layer to receive the firmware package corresponding to the application software to be updated returned by the peripheral server; the application software update information includes the software name and update version number corresponding to the application software to be updated.
[0175] Platform layer storage firmware package.
[0176] The application layer calls the preset upgrade flag interface to set the upgrade flag for the firmware package.
[0177] The platform layer updates the application software to be updated based on the upgrade flag and the firmware package, and restarts the updated application software to be updated after the update is completed.
[0178] In one embodiment, referring to Fig. 9 , the application software installation and update module 5 is also used for:
[0179] The platform layer determines whether the application layer stores an upgrade flag.
[0180] If the application layer stores an upgrade flag, the platform layer obtains the firmware package header information corresponding to the application software to be updated in the firmware package.
[0181] The platform layer determines whether the firmware header information meets the preset integrity and correctness requirements.
[0182] If the firmware header information meets the preset integrity and correctness requirements, the application layer will update the application software to be updated to the updated version number.
[0183] The application layer verifies the updated application software to be updated according to a preset application software verification method to obtain a verification result of the updated application software to be updated.
[0184] When the verification result of the updated application software to be updated is successful, the application program updates the corresponding application description information stored in the public memory area according to the application description information corresponding to the updated application software to be updated, and the platform layer sends a restart signal to the application layer to restart the updated application software to be updated.
[0185] An embodiment of the present invention provides a driving system for an embedded software system, which is applied to the embedded software system. In this method, a function mapping table is set between an independently compiled application layer and a platform layer, so that the application layer calls a corresponding interface in the platform layer through the function mapping table to run the application software to be run, so that the application layer can flexibly call various functions provided by the platform layer, and a low coupling between the application layer and the platform layer is achieved, thereby reducing the compilation time of the embedded software system, improving the portability and reusability of the embedded software system, and further reducing the difficulty of later updating and maintenance of the embedded software system.
[0186] Embodiment three:
[0187] Fig.10 This is a schematic diagram of an embedded software system provided in Embodiment 3 of the present invention.
[0188] Reference Fig.10 The embedded software system includes an independently compiled application layer 6 and a platform layer 7; it also includes the driving system 8 of the above-mentioned embedded software system; the driving system 8 of the embedded software system is respectively arranged in the application layer 6 and the platform layer 7; the platform layer 7 is pre-installed in the embedded device.
[0189] In one embodiment, referring to Fig.11 The application layer 6 includes at least one application software 61; each application software 61 is independently compiled; and the application software 61 is installed into the embedded device through the peripheral interface of the embedded device.
[0190] A function mapping table 71 is provided in the platform layer 7, in which the correspondence between the interface name of the function interface and the function pointer is pre-stored. The platform layer pre-encapsulates at least one function interface that can be called by the application layer; a function interface interacts with a hardware function of the embedded device, or a function interface interacts with an algorithm function of a third-party software; when the application software is running, the hardware function or the algorithm function is called through the function mapping table.
[0191] The platform layer 7 is also provided with a kernel unit 72 and a service unit 73; the kernel unit 72 includes a real-time operating system and a hardware abstraction subunit matching the real-time operating system; the service unit 73 is used to monitor the operation of the real-time operating system.
[0192] An embodiment of the present invention provides an embedded software system, which sets a function mapping table between an independently compiled application layer and a platform layer so that the application layer calls a corresponding interface in the platform layer through the function mapping table to run the application software to be run, so that the application layer can flexibly call various functions provided by the platform layer, and achieves low coupling between the application layer and the platform layer, thereby reducing the compilation time of the embedded software system, improving the portability and reusability of the embedded software system, and further reducing the difficulty of later updating and maintenance of the embedded software system.
[0193] The computer program product provided in the embodiment of the present invention includes a computer-readable storage medium storing program code. The instructions included in the program code can be used to execute the method described in the previous method embodiment. The specific implementation can be found in the method embodiment and will not be repeated here.
[0194] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working process of the system and device described above can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here.
[0195] In addition, in the description of the embodiments of the present invention, unless otherwise clearly specified and limited, the terms "installed", "connected", and "connected" should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection or an indirect connection through an intermediate medium, or it can be the internal communication of two components. For ordinary technicians in this field, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.
[0196] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc., which can store program codes.
[0197] In the description of the present invention, it should be noted that the terms "center", "upper", "lower", "left", "right", "vertical", "horizontal", "inner", "outer", etc., indicating the orientation or positional relationship, are based on the orientation or positional relationship shown in the drawings, and are only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as limiting the present invention. In addition, the terms "first", "second", and "third" are used for descriptive purposes only, and cannot be understood as indicating or implying relative importance.
[0198] Finally, it should be noted that the above-described embodiments are only specific implementations of the present invention, which are used to illustrate the technical solutions of the present invention, rather than to limit them. The protection scope of the present invention is not limited thereto. Although the present invention is described in detail with reference to the above-described embodiments, ordinary technicians in the field should understand that any technician familiar with the technical field can still modify the technical solutions recorded in the above-described embodiments within the technical scope disclosed by the present invention, or can easily think of changes, or make equivalent replacements for some of the technical features therein; and these modifications, changes or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present invention, and should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention shall be based on the protection scope of the claims.
Claims
1. A driving method for an embedded software system, characterized in that: Applied to the embedded software system, the embedded software system is divided into an independently compiled application layer and a platform layer, the platform layer is pre-installed in the embedded device, and the application layer includes at least one application software; the method includes: The application layer calls the function mapping table pre-stored in the embedded device based on the information of the application software to be run; the function mapping table stores the corresponding relationship between the interface name of the function interface and the function pointer; The application layer traverses the function mapping table according to the target interface name in the function mapping table and the information of the application software to be run, and obtains a target function pointer corresponding to the target interface name; The application layer calls the corresponding target function interface in the platform layer according to the target function pointer to run the application software to be run.
2. The driving method of the embedded software system according to claim 1, characterized in that: The platform layer pre-encapsulates at least one function interface that can be called by the application layer; one of the function interfaces interacts with a hardware function of the embedded device, or one of the function interfaces interacts with an algorithm function of a third-party software; Before the step of the application layer calling the function mapping table pre-stored in the embedded device based on the information of the application software to be run, the method further includes: The platform layer sets a unique memory address for the function pointer corresponding to each of the function interfaces based on the pre-stored compile link file; The platform layer generates the function mapping table according to the corresponding relationship between the function name and the function pointer corresponding to each of the function interfaces; The platform layer sends the function mapping table to the public memory area of the embedded device for the application layer to call.
3. The driving method of the embedded software system according to claim 2, characterized in that: After the step of the platform layer sending the function mapping table to the public memory area of the embedded device for the application layer to call, the method further includes: Step S1: when the platform layer is started, the platform layer obtains the function mapping table in the public memory area; Step S2: the platform layer determines, in a preset order, whether the unverified memory address corresponding to the unverified function pointer in the function mapping table is the same as the initial memory address set for the current function pointer based on the compile link file; Step S3: if the unverified memory address is different from the initial memory address, the number of errors is increased by 1; wherein the initial number of errors is 0; Step S4: The platform layer determines whether the number of errors is less than a preset number threshold; Step S5: if the number of errors is less than the preset number threshold, modify the unverified memory address according to the initial memory address, and repeat steps S2-S4 until the function mapping table does not include the unverified function pointer, and determine that the function mapping table verification is completed; Step S6: If the number of errors is greater than or equal to the preset number threshold, it is determined that the public memory area is damaged and the startup is stopped.
4. The driving method of the embedded software system according to claim 3, characterized in that: After the step of determining that the function mapping table verification is completed, the method further includes: The platform layer obtains the application description information in the public memory area; the application description information includes description package information and application program information corresponding to the installed application software in the application layer; The platform layer determines the description package integrity verification result corresponding to the description package information according to a preset integrity verification method; When the description package integrity verification result is that the description package integrity verification is successful, the platform layer determines the description package signature verification result corresponding to the description package information according to a preset signature verification method; When the description package signature verification result is that the description package signature verification is successful, the platform layer determines the application integrity verification result corresponding to the application information according to the preset integrity verification method; When the application integrity verification result is that the application integrity verification is successful, the platform layer determines the application signature verification result corresponding to the application information according to the preset signature verification method; When the application signature verification result is that the application signature verification is successful, the platform layer updates the application management table according to the installed application software; the application management table stores the correspondence between the application software name of the installed application software and the application description information; The platform layer generates an execution request to the application layer based on the execution address corresponding to the installed application software.
5. The driving method of the embedded software system according to claim 4, characterized in that: Before the step of obtaining the application description information in the public memory area by the platform layer; the method further comprises: When the platform layer is in the application installation state, the platform layer opens a preset offline installation interface; the preset offline installation interface corresponds to the peripheral interface of the embedded device; When the preset offline installation interface is turned on and the peripheral interface is connected to an external device, the application layer obtains an authentication instruction sent by the external device; The application layer determines whether the authentication instruction is valid according to a preset authentication method; If the authentication instruction is valid, the application layer obtains firmware header information corresponding to the application software to be installed in the external device; The platform layer determines whether the firmware header information meets the preset integrity and correctness requirements; If the firmware header information meets the preset integrity and correctness requirements, receiving and installing the application software to be installed; The platform layer verifies the installed application software to be installed according to a preset application software verification method to obtain a verification result of the installed application software to be installed; When the verification result is successful, it is determined that the installed application software to be installed is the installed application software, and the application layer sends the application description information corresponding to the installed application software to the public memory area.
6. The driving method of the embedded software system according to claim 4, characterized in that: Before the step of obtaining the application description information in the public memory area by the platform layer; the method further comprises: When the platform layer is in the application installation state, the platform layer opens a preset online installation interface; the preset online installation interface corresponds to the peripheral interface of the embedded device; When the preset online installation interface is opened, the application layer is connected to the peripheral server for communication; The platform layer sends application software update information to the peripheral device server through the application layer to receive a firmware package corresponding to the application software to be updated returned by the peripheral device server; the application software update information includes a software name and an update version number corresponding to the application software to be updated; The platform layer stores the firmware package; The application layer calls a preset upgrade flag interface to set an upgrade flag for the firmware package; The platform layer updates the application software to be updated based on the upgrade flag and the firmware package, and restarts the updated application software to be updated after the update is completed.
7. The driving method of the embedded software system according to claim 6, characterized in that: The step of the platform layer updating the application software to be updated based on the upgrade flag and the firmware package, and restarting the updated application software to be updated after the update is completed, includes: The platform layer determines whether the application layer stores the upgrade flag; If the upgrade flag is stored in the application layer, the platform layer obtains firmware header information corresponding to the application software to be updated in the firmware package; The platform layer determines whether the firmware header information meets the preset integrity and correctness requirements; If the firmware header information meets the preset integrity and correctness requirements, the application layer updates the application software to be updated to the updated version number; The application layer verifies the updated application software to be updated according to a preset application software verification method to obtain a verification result of the updated application software to be updated; When the verification result of the updated application software to be updated is successful, the application program updates the application description information correspondingly stored in the public memory area according to the application description information corresponding to the updated application software to be updated, and the platform layer sends a restart signal to the application layer to restart the updated application software to be updated.
8. A driving system for an embedded software system, characterized in that: Applied to the embedded software system, the driving system includes: A function mapping table acquisition module is used for the application layer to call a function mapping table pre-stored in the embedded device based on the information of the application software to be run; the function mapping table stores the corresponding relationship between the interface name of the function interface and the function pointer; A target function pointer determination module is used to traverse the function mapping table through the application layer according to the function mapping table and the target interface name in the information of the application software to be run, and obtain the target function pointer corresponding to the target interface name; The application software running module is used for the application layer to call the corresponding target function interface in the platform layer according to the target function pointer to run the application software to be run.
9. An embedded software system, characterized in that: It includes independently compiled application layer and platform layer; it also includes the driving system of the embedded software system as described in claim 8 above; the driving system of the embedded software system is respectively arranged in the application layer and the platform layer; the platform layer is pre-installed in the embedded device.
10. The embedded software system according to claim 9, characterized in that: The application layer includes at least one application software; each of the application software is independently compiled; the application software is installed into the embedded device through the peripheral interface of the embedded device; The platform layer is provided with a function mapping table, in which the corresponding relationship between the interface name of the function interface and the function pointer is pre-stored, and the platform layer pre-encapsulates at least one function interface that can be called by the application layer; one of the function interfaces interacts with a hardware function of the embedded device, or one of the function interfaces interacts with an algorithm function of a third-party software; when the application software is running, the hardware function or the algorithm function is called through the function mapping table; The platform layer is also provided with a kernel unit and a service unit; the kernel unit includes a real-time operating system and a hardware abstraction subunit matching the real-time operating system; the service unit is used for monitoring the operation of the real-time operating system.
