WO2018068658A1 - Procédé de chargement de composant de dispositif, appareil et système de l'internet des objets - Google Patents

Procédé de chargement de composant de dispositif, appareil et système de l'internet des objets Download PDF

Info

Publication number
WO2018068658A1
WO2018068658A1 PCT/CN2017/104168 CN2017104168W WO2018068658A1 WO 2018068658 A1 WO2018068658 A1 WO 2018068658A1 CN 2017104168 W CN2017104168 W CN 2017104168W WO 2018068658 A1 WO2018068658 A1 WO 2018068658A1
Authority
WO
WIPO (PCT)
Prior art keywords
component
cloud server
target
target component
executable file
Prior art date
Application number
PCT/CN2017/104168
Other languages
English (en)
Chinese (zh)
Inventor
蔡艳明
曾旭
张春晖
Original Assignee
阿里巴巴集团控股有限公司
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 阿里巴巴集团控股有限公司 filed Critical 阿里巴巴集团控股有限公司
Publication of WO2018068658A1 publication Critical patent/WO2018068658A1/fr

Links

Images

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/44521Dynamic linking or loading; Link editing at or after load time, e.g. Java class loading
    • G06F9/44526Plug-ins; Add-ons
    • 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

Definitions

  • the present application relates to the field of computer technology, and in particular, to a component loading method of a device, a component loading device of the device, a device, and an Internet of Things system.
  • IoT terminal devices such as industrial control devices, smart furniture devices, and wearable devices can communicate through access networks.
  • Various sensors can be set up on the IoT terminal devices to collect various data and conduct networks. data transmission.
  • IoT terminal devices In order to reduce costs, IoT terminal devices usually use embedded devices with limited computing power and limited memory resources to control each sensor.
  • the embedded device needs to load the driver components of the sensor to control the sensor.
  • the driving components of the respective sensors can be preset in the embedded device or dynamically loaded.
  • the way to pre-set the drive components to the embedded device is not to update the drive components flexibly.
  • the existing dynamic loading mode after the embedded component downloads the driving component, the embedded component needs to drive the component to perform symbol relocation, the relocation process needs to occupy more computing resources, and the driving component includes information for relocation. Information takes up a lot of memory space.
  • embodiments of the present application have been made in order to provide a component loading method of a device that overcomes the above problems or at least partially solves the above problems, a component loading device of a corresponding device, a device, and a device Networked system.
  • the embodiment of the present application discloses a component loading method of a device, where the device communicates with a cloud server, and the method includes:
  • the device generates a component load request
  • the device runs an executable file of the target component to complete loading of the target component.
  • the method further includes:
  • the device stores the received executable file of the target component into a flash memory.
  • the step of the device running the executable file of the target component to complete loading of the target component comprises:
  • the device extracts an initialization function of the executable file of the target component in the flash memory;
  • the device runs the initialization function to complete loading of the target component.
  • the step of the device running the executable file of the target component to complete the loading of the target component further comprises:
  • the device extracts metadata in an executable file of the target component;
  • the metadata includes: an initialization function memory address and the executable file Corresponding component name;
  • the device copies the executable file of the target component after extracting the metadata into the memory
  • the device runs the initialization function to complete loading of the target component.
  • the method further includes:
  • the step of the device generating a component loading request includes:
  • the device generates a component load request for the target component that needs to be updated.
  • the executable file of the target component has a standardized interface function;
  • the interface function includes at least one of the following functions: a start function, a close function, a read function, a write function, and an I/O channel management function.
  • the component loading request includes available memory address space information of the device; or, the cloud server is preset with available memory address space information of the device;
  • the executable file of the target component is generated by the cloud server by using an object file of the target component and available memory address space information of the device; the target file of the target component is obtained by the cloud server according to the component loading request. .
  • the component loading request includes memory address information of a target symbol, and the target symbol is the target The symbol in the device to be called by the target component; or the memory address information of the target symbol preset in the cloud server;
  • the executable file of the target component is generated by the cloud server using a target file of the target component, available memory address space information of the device, and a memory address information link of the target symbol.
  • the cloud server is an Internet of Things server
  • the target component is a driving component of a sensor that the device needs to load.
  • the embodiment of the present application further discloses a component loading method of a device, where the device communicates with a cloud server, and the method includes:
  • the cloud server generates an executable file of the target component according to the component loading request
  • the cloud server sends an executable file of the target component to the device, and the device is configured to execute an executable file of the target component to complete loading of the target component.
  • the component loading request includes available memory address space information of the device; or, the cloud server is preset with available memory address space information of the device;
  • the step of generating, by the cloud server, the executable file of the target component according to the component loading request includes:
  • the cloud server obtains an object file of the target component according to the component loading request
  • the cloud server uses the target file of the target component and the available memory address space information to generate an executable file of the target component in a preset format.
  • the component loading request includes memory address information of a target symbol, the target symbol is a symbol in the device that the target component needs to invoke; or a memory address preset with a target symbol in the cloud server information;
  • the step of the cloud server using the target file of the target component and the available memory address space information to generate an executable file of the target component in a preset format includes:
  • the cloud server uses the target file of the target component, the available memory address space information, and the memory address information of the target symbol to link, and generates an executable file of the target component in a preset format.
  • the step of the cloud server sending the executable file to the device comprises:
  • the cloud server sets an executable file of the target component to an XIP execution mode
  • the cloud server sends the executable file of the target component set to the XIP execution mode to the device.
  • the method further includes:
  • the cloud server generates a component update message when the component is updated
  • the cloud server sends the component update message to the device, and the device is configured to return the component load request after receiving the component update message.
  • the executable file of the target component has a standardized interface function;
  • the interface function includes at least one of the following functions: a start function, a close function, a read function, a write function, and an I/O channel management function.
  • the cloud server is an Internet of Things server
  • the target component is a driving component of a sensor that the device needs to load.
  • the embodiment of the present application further discloses a component loading device of the device, where the device communicates with a cloud server, and the device includes:
  • a request generation module located at the device, configured to generate a component load request
  • a request sending module of the device configured to send the component loading request to the cloud server
  • a file receiving module of the device configured to receive an executable file of a target component returned by the cloud server; and an executable file of the target component is generated by the cloud server according to the component loading request;
  • a file execution module located in the device, configured to execute an executable file of the target component to complete loading of the target component.
  • the embodiment of the present application further discloses a component loading device of the device, where the device communicates with a cloud server, and the device includes:
  • a request receiving module of the cloud server configured to receive a component loading request sent by the device
  • An executable file generating module of the cloud server configured to generate an executable file of the target component according to the component loading request
  • a file sending module of the cloud server configured to send an executable file of the target component to the device, where the device is configured to run an executable file of the target component to complete loading of the target component.
  • the embodiment of the present application further discloses a device, where the device communicates with a cloud server, where the device includes:
  • An output device coupled to the processor for transmitting the component load request to the cloud server
  • An input device coupled to the processor for receiving an executable file of a target component returned by the cloud server
  • An executable file of the target component is generated by the cloud server according to the component loading request
  • the processor is further configured to execute an executable file of the target component obtained by the input device to complete loading of the target component.
  • an Internet of Things system including: a cloud server and a device that communicates with the cloud server;
  • the device includes:
  • a request generation module for generating a component load request
  • a request sending module configured to send the component loading request to the cloud server
  • a file receiving module configured to receive an executable file of a target component returned by the cloud server
  • a file running module configured to execute an executable file of the target component to complete loading of the target component
  • the cloud server includes:
  • a request receiving module configured to receive a component loading request sent by the device
  • An executable file generating module configured to generate an executable file of the target component according to the component loading request
  • a file sending module configured to send an executable file of the target component to the device, where the device is configured to run an executable file of the target component to complete loading of the target component.
  • the embedded device when the embedded device needs to load the driver component, the embedded device sends a component loading request to the cloud server, where the request includes the available memory address space information of the embedded device.
  • the cloud server determines the driver component required by the embedded device according to the request, and generates an executable file of the driver component by using the available memory address space information of the embedded device, and the embedded device runs the executable file of the driver component to complete the loading of the driver component.
  • the cloud server locates the memory address of each symbol of the driving component according to the available memory address space information of the embedded device, and needs to be used by the driving component.
  • the memory address of the embedded device local symbol is directly positioned as the actual memory address of the symbol in the memory space of the embedded device.
  • the embedded device can directly run the executable file of the driver component without symbol relocation, which reduces the occupation of computing resources of the embedded device.
  • the executable component of the driver component eliminates the information for symbol relocation, thereby reducing the memory space.
  • the dynamic loading of components can also be implemented in the embedded device with limited computing power and memory resources by the method described in the present application.
  • Embodiment 1 is a flow chart showing the steps of Embodiment 1 of a component loading method of a device of the present application;
  • Embodiment 2 is a flow chart showing the steps of Embodiment 2 of a component loading method of a device according to the present application;
  • FIG. 3 is a flow chart of dynamic loading of a driving component according to an embodiment of the present application.
  • FIG. 4 is a flow chart of dynamic loading of a driving component according to an embodiment of the present application.
  • Embodiment 3 is a flow chart showing the steps of Embodiment 3 of a component loading method of a device according to the present application.
  • Embodiment 1 is a structural block diagram of Embodiment 1 of a component loading device of an apparatus of the present application;
  • Embodiment 7 is a structural block diagram of Embodiment 2 of a component loading device of an apparatus of the present application;
  • FIG. 8 is a hardware structural diagram of an apparatus embodiment of the present application.
  • FIG. 9 is a block diagram of an embodiment of an Internet of Things system of the present application.
  • One of the core concepts of the embodiments of the present application is that the memory address of the symbol of the driver component is located by the cloud server, so that the embedded device does not need to perform the symbol relocation process when loading the driver component.
  • FIG. 1 a flow chart of the steps of the component loading method of the device of the present application is shown, wherein the device is in communication with a cloud server, and the method may specifically include the following steps:
  • Step 101 The device generates a component loading request.
  • the device in the embodiment of the present application may be an embedded device with limited computing power and memory resources, or a large computing device with sufficient computing power and sufficient memory resources.
  • the component load request can include the identity of the target component that the device needs to load.
  • the embedded device when an embedded device first calls a sensor, the embedded device needs to load the driver component of the sensor, and the embedded device generates a component load request according to the driver component that needs to be loaded for the first time.
  • the embedded device when a driver component of a sensor needs to be updated, the embedded device generates a component load request according to the determination component that needs to be updated.
  • an executable image of an embedded device is preset in the device.
  • Executable image contains The main part of the operating system, that is, the operating system's kernel API (Application Programming Interface), such as task collaboration management module, memory management module.
  • kernel API Application Programming Interface
  • the executable image is loaded into the memory RAM when the embedded device is running.
  • the component Component in the embedded device can call the kernel API provided by the operating system. After the component is loaded into the memory, the component can call the kernel API according to the actual memory address in the memory of the kernel API symbol.
  • the external does not know the actual memory address of the kernel API in the device memory that the component needs to use. Therefore, after the embedded device downloads the component, it needs to relocate the address of the symbol of the kernel API that the component calls to the actual memory address of the symbols of these kernel APIs in memory. This process is called symbol relocation.
  • Step 102 The device sends the component loading request to the cloud server.
  • Step 103 The device receives an executable file of a target component returned by the cloud server; an executable file of the target component is generated by the cloud server according to the component loading request;
  • the cloud server After receiving the component loading request, the cloud server generates an executable file of the target component that the device needs to load.
  • the target symbol refers to a symbol in a device that the target component needs to invoke, and may specifically include a symbol of a kernel API of the device and a symbol of a component that is already running in the device.
  • the cloud server assigns the symbol of the target component to the available memory address that has not been used, ensuring that the memory address of the symbol of the target component does not conflict with the memory address of the local symbol in the device.
  • the device Since the memory address of each symbol in the target file of the target component and the memory address of the target symbol are the actual memory addresses in the memory space of the device, the device does not need to perform the symbol relocation process after receiving the executable file of the target component. .
  • Step 104 The device runs an executable file of the target component to complete loading of the target component.
  • the target component can be loaded by running the executable file of the target component.
  • the embedded device when the embedded device needs to load the driver component, the embedded device sends a component loading request to the cloud server.
  • the cloud server generates an executable file of the driver component required by the embedded device according to the component loading request, and the embedded device runs the executable file of the driver component to complete the loading of the driver component.
  • the cloud server is available according to the embedded device.
  • the address space information is stored, the memory address of each symbol of the driver component is located, and the memory address of the local symbol of the embedded device that is required to be driven by the component is directly positioned as the actual memory address of the symbol in the memory space of the embedded device.
  • the embedded device can directly run the executable file of the driver component without symbol relocation, which reduces the occupation of computing resources of the embedded device.
  • the executable component of the driver component eliminates the information for symbol relocation, thereby reducing the memory space.
  • the dynamic loading of components can also be implemented in the embedded device with limited computing power and memory resources by the method described in the present application.
  • FIG. 2 a flow chart of the steps of the component loading method of the device of the present application is shown, wherein the device is in communication with the cloud server, and the method may specifically include the following steps:
  • Step 201 The device generates a component loading request.
  • the method may further include:
  • the step 201 may specifically include the following sub-steps:
  • Sub-step S11 the device determines, according to the component update message, a target component that needs to be updated
  • Sub-step S12 the device generates a component load request for the target component that needs to be updated.
  • the cloud server can notify the device to update components.
  • the cloud server when the cloud server detects a driver component update of a sensor, the cloud server notifies the device that the driver component can be updated.
  • Step 202 The device sends the component loading request to the cloud server.
  • Step 203 The device receives an executable file of a target component returned by the cloud server, and an executable file of the target component is generated by the cloud server according to the component loading request.
  • the component loading request includes available memory address space information of the device; or, the cloud server is preset with available memory address space information of the device;
  • the executable file of the target component is generated by the cloud server by using an object file of the target component and available memory address space information of the device; the target file of the target component is obtained by the cloud server according to the component loading request. .
  • the available address information may specifically include available address fields and address ranges.
  • the device can send available memory address space information to the cloud server in a component load request.
  • the cloud server may obtain the available memory address space information of the device in advance, or First agree which addresses can be available memory address space information.
  • the component loading request includes memory address information of a target symbol, where the target symbol is a symbol in the device that the target component needs to invoke; or, in the cloud server Pre-set memory address information of the target symbol;
  • the executable file of the target component is generated by the cloud server using a target file of the target component, available memory address space information of the device, and a memory address information link of the target symbol.
  • the device may send the memory address information of the target symbol to the cloud server in the component loading request.
  • the device sends the symbol table of the memory address information of the target symbol to the cloud server through the component loading request.
  • the cloud server may obtain the memory address information of the target symbol in the device in advance.
  • the cloud server may obtain the symbol table of the device in advance, and the memory address information of the target symbol is recorded in the symbol table.
  • the target component When the target component is loaded, the target component can interact with the device's kernel API. Interaction between components refers to calls between symbols in a component and symbols in other components. The interaction between a component and the kernel API refers to a call between the symbol of the component and the symbol of the kernel API. Symbols are variables and functions in a component.
  • the executable file of the target component has a standardized interface function;
  • the interface function includes at least one of the following functions: a start function, a close function, a read function, a write function, and an I/O channel. Management function.
  • the local component on the device side can interact with the dynamically downloaded target component.
  • the standardized interface function described above is also provided for the component local to the device.
  • Each component interacts through standardized interface functions, thereby avoiding the generation of a large symbol table during the interaction process, greatly reducing the Footprint occupation, and Footprint refers to RAM/ROM.
  • the calling process is performed by reading the memory address of the symbol.
  • the memory address of each symbol in the target component that is dynamically downloaded from the cloud server is generated by the cloud server link, and the cloud server uses the available memory address space information in the device as each symbol in the target component. Assign an address. This ensures that the memory address of the target component does not conflict with the memory address of the symbol local to the device.
  • the start function is a function that starts the component;
  • the close function is a function that closes the component;
  • the read function is a function that the component uses to read data;
  • the write function is a function that the component uses to write data;
  • component A can be started by the startup function of component B.
  • Component B When component A needs to read the data of component B, component A can read the data of component B through the read function.
  • group price A can write data to component B through the write function.
  • component A does not need to call component B component A closes component B through the closing function of component B.
  • the I/O channel management function is a function that the component manages the I/O channel in the device, for example, controlling the transmission baud rate and sensor mode of the serial port.
  • Step 204 The device stores the received executable file of the target component into a flash memory.
  • the device stores the executable file of the target component received into the code segment address space of the flash memory.
  • Step 205 The device runs an executable file of the target component to complete loading of the target component.
  • the step 205 may specifically include the following sub-steps:
  • Sub-step S21 if the executable file of the target component is an XIP execution mode, the device extracts an initialization function of the executable file of the target component in the flash memory;
  • the XIP (eXecute In Place) execution mode is a way to execute directly in the flash memory.
  • the executable file of the target file is in the XIP execution mode, the device is initialized in the address space of the flash memory. function.
  • the initialization function may exist at the head of the executable file of the target file, and the device may take out the initialization function from the head of the executable file of the target file.
  • Sub-step S22 the device runs the initialization function to complete loading of the target component.
  • the device completes the loading of the target component by running an initialization function.
  • the standardized interface function of the target component is recorded in an interface data structure.
  • the pointer of the interface data structure is recorded in the hash map table of the operating system of the device, and the name of each component and the pointer of the interface data structure of each component are maintained in the hash map table.
  • a pointer to the interface data structure of the component to be called can be found according to the hash map table.
  • the memory address of each interface function of the component can be found through the memory address of the interface data structure.
  • the step 204 may further include the following sub-steps:
  • Sub-step S23 if the executable file of the target component is not in the XIP execution mode, the device extracts metadata in the executable file of the target component; the metadata includes: an initialization function memory address and a location The component name corresponding to the executable file;
  • Sub-step S24 the device copies the executable file of the target component after extracting the metadata into the memory
  • Sub-step S25 the device runs the initialization function to complete loading of the target component.
  • the device If the executable file of the target component is not in the XIP execution mode, the device extracts the metadata of the executable file of the target component (the initialization function memory address and the component name corresponding to the executable file) in the code segment address space of the flash memory. And then copy the executable file that retrieved the metadata into the memory RAM. The device runs an initialization function to complete the loading of the target component.
  • a pointer to the interface data structure of the interface function of the component is recorded in the hash map table of the operating system of the device.
  • the cloud server is an Internet of Things server
  • the target component is a driving component of a sensor that the device needs to load.
  • FIG. 3 a flow chart of dynamic loading of a driving component of an embodiment of the present application is shown.
  • a drive component load request containing the device identification is sent to the IoT server.
  • the information of the sensor used by the IoT server may be registered in advance, such as model information, and then stored in association with the sensor information through the unique device identifier of the device chip.
  • the IoT server can determine the sensor information such as the sensor model associated with the device identifier according to the device identifier.
  • the IoT server can return sensor information pre-registered by the device to the device.
  • the device downloads the executable file of the corresponding driver component from the IoT server according to the sensor information. Specifically, in one case, after the IoT server sends the sensor information to the device, the executable file of the driver component corresponding to the sensor information is directly pushed to the device, and the device downloads and loads the operating system, thereby driving the sensor to work normally. In another case, after the IoT server sends the sensor information to the device, the device sends a download request to the IoT server according to the sensor information, and the IoT server sends the executable file of the corresponding driver component to the device according to the download request, and the device Download and load into the operating system to drive the sensor to work properly.
  • the target file of the driver component is the file generated by the compiler's source code file compiled by the compiler.
  • the source code file of the driver component of the sensor in the IoT server or the target file of the driver component may be provided by the vendor of the sensor.
  • FIG. 4 a flow chart of dynamic loading of a driving component of an embodiment of the present application is shown.
  • the drive component loading request including the device identifier is sent to the Internet of Things server.
  • the IoT server After receiving the component loading request, the IoT server detects the sensor information newly connected by the device.
  • the IoT server service can obtain sensor information such as the sensor model connected to the device.
  • the IoT server returns the detected sensor information to the device.
  • the device downloads the executable file of the corresponding driver component from the IoT server according to the sensor information. Specifically, in one case, after the IoT server sends the sensor information to the device, the executable file of the driver component corresponding to the sensor information is directly pushed to the device, and the device downloads and loads the operating system, thereby driving the sensor to work normally. In another case, after the IoT server sends the sensor information to the device, the device sends a download request to the IoT server according to the sensor information, and the IoT server sends the executable file of the corresponding driver component to the device according to the download request, and the device Download and load into the operating system to drive the sensor to work properly.
  • FIG. 5 a flow chart of the steps of the component loading method of the device of the present application is shown in FIG. 5, wherein the device is in communication with a cloud server, and the method may specifically include the following steps:
  • Step 301 The cloud server receives a component loading request sent by the device.
  • the cloud server may be in communication connection with multiple devices.
  • the component loading request may include a device identifier, and the cloud server may determine, according to the device identifier, which device sent the component loading request.
  • Step 302 The cloud server generates an executable file of the target component according to the component loading request.
  • the cloud server is an Internet of Things server
  • the target component is a driving component of a sensor that the device needs to load.
  • the component loading request includes available memory address space information of the device; or, the cloud server is preset with available memory address space information of the device;
  • the step 302 may specifically include the following sub-steps:
  • Sub-step S31 the cloud server obtains an object file of the target component according to the component loading request
  • the target file is the source code file that is compiled by the compiler to get the file.
  • the source code files include: .c files, .cpp files, .e files.
  • the target files include: .obj file, .lib file, .o file, .a file.
  • the target file of the target component or the source code file of the target component is preset in the cloud server.
  • the cloud server When the cloud server receives the component load request, it immediately compiles the source code file of the target component to generate the target file of the target component.
  • Sub-step S32 the cloud server uses the target file of the target component and the available memory address space information to generate an executable file of the target component in a preset format;
  • the component loading request includes memory address information of the target symbol, where the target symbol is a symbol in the device that the target component needs to invoke; or, the cloud server is pre- Memory address information with the target symbol;
  • the sub-step S32 may further include:
  • the cloud server uses the target file of the target component, the available memory address space information, and the memory address information of the target symbol to link, and generates an executable file of the target component in a preset format.
  • An executable file is a file generated by a linker link of a target file.
  • the linker generates an executable file by linking the target file of the target component, the available memory address space information, and the memory address information of the target symbol.
  • Executable files include: EXE files, DLL files, ELF files, SO files.
  • the device Since the memory address of each symbol in the target file of the target component and the memory address of the target symbol are the actual memory addresses in the memory space of the device, the device does not need to perform the symbol relocation process after receiving the executable file of the target component. .
  • the executable file is located in the Y-ELF format in the embodiment of the present application.
  • the executable file in the Y-ELF format only exposes the standardized initialization function interface.
  • the initialization function attaches the interface data structure of the standardized function to the hash map table of the operating system of the device, and the name of each component is maintained in the hash map table. A pointer to the interface data structure of each component.
  • a standardized interface function is recorded in the interface data structure; the standardized interface function includes at least one of the following functions: a start function, a close function, a read function, a write function, and an I/O channel management function.
  • a pointer to the interface data structure of the component to be called can be found according to the hash map table.
  • the memory address of each interface function of the component can be found through the memory address of the interface data structure.
  • the standardized interface function described above is also provided for the component local to the device.
  • the various components interact with each other through standardized interface functions, thereby avoiding the generation of huge symbol tables in the interaction process and greatly reducing the Footprint occupation.
  • components can interact with the device's kernel API.
  • Step 303 The cloud server sends an executable file of the target component to the device, where the device is configured to run an executable file of the target component to complete loading of the target component.
  • the step 303 may specifically include the following sub-steps:
  • the cloud server sets an executable file of the target component to an XIP execution mode
  • the cloud server sends the executable file of the target component set to the XIP execution mode to the device.
  • the cloud server determines whether the device can support the XIP execution mode. If the device supports the XIP execution mode, the cloud server sets the executable file of the target file to the XIP execution mode.
  • the method may further include:
  • the cloud server generates a component update message when the component is updated
  • the cloud server sends the component update message to the device, and the device is configured to return the component load request after receiving the component update message.
  • the cloud server can record the component name of the component existing in each device.
  • the cloud server detects the device having the component name of the updated component, and then sends a component update message to the device. After receiving the component update message, the device returns a phase component load request to the cloud server.
  • the cloud server determines a driving component required by the embedded device according to the component loading request of the embedded device, and generates an executable file of the driving component by using available memory address space information of the embedded device, and the embedded device runs.
  • the driver component's executable file can be loaded by the driver component.
  • the cloud server locates the address of each symbol of the driving component according to the available memory address space information of the embedded device, and embeds the required component of the driving component.
  • the address of the local symbol of the device is directly positioned as the actual memory address of the symbol in the memory space of the embedded device.
  • the embedded device can directly run the executable file of the driver component without symbol relocation, which reduces the occupation of computing resources of the embedded device.
  • the executable component of the driver component eliminates the information for symbol relocation, thereby reducing the memory space.
  • the dynamic loading of components can also be implemented in the embedded device with limited computing power and memory resources by the method described in the present application.
  • FIG. 6 a structural block diagram of a component loading device embodiment 1 of an apparatus of the present application is shown, wherein the device is in communication with a cloud server, and the device may specifically include the following modules:
  • a request generation module 401 located at the device, configured to generate a component load request
  • a request sending module 402 located at the device, configured to send the component loading request to the cloud server;
  • a file receiving module 403 of the device configured to receive an executable file of a target component returned by the cloud server; and an executable file of the target component is generated by the cloud server according to the component loading request;
  • a file execution module 404 located at the device is configured to execute an executable file of the target component to complete loading of the target component.
  • the device may further include:
  • a storage module located in the device, configured to store the received executable file of the target component into a flash memory.
  • the file running module 404 may include:
  • a function extracting submodule configured to extract an initialization function of an executable file of the target component in the flash memory if the executable file of the target component is an XIP execution mode
  • the first function runs a submodule for running the initialization function to complete loading of the target component.
  • the file running module 404 may further include:
  • a metadata extraction submodule configured to extract metadata in an executable file of the target component if the executable file of the target component is not in an XIP execution manner;
  • the metadata includes: an initialization function memory address and a component name corresponding to the executable file;
  • a copy submodule configured to copy an executable file of the target component that is proposed to extract metadata into an internal memory
  • the second function runs a submodule for running the initialization function to complete loading of the target component.
  • the device may further include: a message receiving module located in the device, configured to receive a component update message sent by the cloud server;
  • the request generating module 401 can include:
  • a target component determining submodule configured to determine, according to the component update message, a target component that needs to be updated
  • the target request generation submodule is configured to generate a component load request for the target component that needs to be updated.
  • the executable file of the target component has a standardized interface function;
  • the interface function includes at least one of the following functions: a start function, a close function, a read function, a write function, and an I/O channel. Management function.
  • the component loading request includes available memory address space information of the device; or, the cloud server is preset with available memory address space information of the device;
  • the executable file of the target component is generated by the cloud server by using an object file of the target component and available memory address space information of the device; the target file of the target component is added by the cloud server according to the component Request is obtained.
  • the component loading request includes memory address information of a target symbol, where the target symbol is a symbol in the device that the target component needs to invoke; or, a target is preset in the cloud server. Memory address information of the symbol;
  • the executable file of the target component is generated by the cloud server using a target file of the target component, available memory address space information of the device, and a memory address information link of the target symbol.
  • the cloud server is an Internet of Things server
  • the target component is a driving component of a sensor that the device needs to load.
  • the embedded device when the embedded device needs to load the driver component, the embedded device sends a component loading request to the cloud server, where the request includes the available memory address space information of the embedded device.
  • the cloud server determines the driver component required by the embedded device according to the request, and generates an executable file of the driver component by using the available memory address space information of the embedded device, and the embedded device runs the executable file of the driver component to complete the loading of the driver component. .
  • the cloud server locates the address of each symbol of the driving component according to the available memory address space information of the embedded device, and embeds the required component of the driving component.
  • the address of the local symbol of the device is directly positioned as the actual memory address of the symbol in the memory space of the embedded device.
  • the embedded device can directly run the executable file of the driver component without symbol relocation, which reduces the occupation of computing resources of the embedded device.
  • the executable component of the driver component eliminates the information for symbol relocation, thereby reducing the memory space.
  • the dynamic loading of components can also be implemented in the embedded device with limited computing power and memory resources by the method described in the present application.
  • FIG. 7 a structural block diagram of a component loading device of a device of the present application is shown, wherein the device communicates with a cloud server, and the device may specifically include the following modules:
  • a request receiving module 501 located at the cloud server, configured to receive a component loading request sent by the device;
  • An executable file generating module 502 located at the cloud server, configured to generate an executable file of the target component according to the component loading request;
  • the component loading request includes available memory address space information of the device; or, the cloud server is preset with available memory address space information of the device;
  • the executable file generating module 502 can include:
  • the target file obtaining submodule is configured to obtain the target file of the target component according to the component loading request;
  • An executable file generating submodule configured to generate an executable file of the target component in a preset format by using an object file of the target component and the available memory address space information.
  • the component loading request includes memory address information of a target symbol, where the target symbol is a symbol in the device that the target component needs to invoke; or, a target is preset in the cloud server. Memory address information of the symbol;
  • the executable file generation submodule further includes:
  • a linking unit configured to link with an object file of the target component, the available memory address space information, and memory address information of the target symbol, to generate an executable file of the target component in a preset format.
  • the file sending module 503 may include:
  • An execution mode setting submodule configured to set an executable file of the target component to an XIP execution mode
  • a file sending submodule configured to send the executable file of the target component set to the XIP execution mode to the device.
  • the device may further include:
  • An update message generating module located at the cloud server, configured to generate a component update message when the component is updated;
  • An update message sending module of the cloud server configured to send the component update message to the device, where the device is configured to return the component load request after receiving the component update message.
  • the executable file of the target component has a standardized interface function;
  • the interface function includes at least one of the following functions: a start function, a close function, a read function, a write function, and an I/O channel. Management function.
  • the cloud server is an Internet of Things server
  • the target component is a driving component of a sensor that the device needs to load.
  • the cloud server determines a driving component required by the embedded device according to the component loading request of the embedded device, and generates an executable file of the driving component by using available memory address space information of the embedded device, and the embedded device runs.
  • the driver component's executable file can be loaded by the driver component.
  • the cloud server locates the address of each symbol of the driving component according to the available memory address space information of the embedded device, and embeds the required component of the driving component.
  • the address of the local symbol of the device is directly positioned as the actual memory address of the symbol in the memory space of the embedded device.
  • the embedded device can directly run the executable file of the driver component without symbol relocation, which reduces the occupation of computing resources of the embedded device.
  • the executable component of the driver component eliminates the information for symbol relocation, from And reduce the memory space.
  • the dynamic loading of components can also be implemented in the embedded device with limited computing power and memory resources by the method described in the present application.
  • the device can include a processor 60, an output device 61, an input device 62, a memory 63, and at least one communication bus 64.
  • Communication bus 64 is used to implement a communication connection between components.
  • Memory 23 may include high speed RAM memory, and may also include non-volatile memory NVM, such as at least one disk memory, and may also include flash memory.
  • Various programs can be stored in the memory for performing various processing functions and implementing the method steps of the present embodiment.
  • the processor 60 may be, for example, a central processing unit (CPU), an application specific integrated circuit (ASIC), a digital signal processor (DSP), a digital signal processing device (DSPD), or the like.
  • CPU central processing unit
  • ASIC application specific integrated circuit
  • DSP digital signal processor
  • DSPD digital signal processing device
  • PLD programming logic device
  • FPGA field programmable gate array
  • controller a controller
  • microcontroller a microprocessor, or other electronic component coupled to the input device 62 and via an in-vehicle line or wireless connection Output device 61.
  • the input device 62 may include multiple input devices, for example, at least one of a user-oriented user interface, a device-oriented device interface, and a transceiver.
  • the device-oriented device interface may be a wired interface for data transmission between the device and the device, or may be a hardware insertion interface (for example, USB) for data or command transmission between the device and the device.
  • the input touch sensing device for example, a touch screen with a touch sensing function, a touch panel, etc.
  • the transceiver may be a radio frequency transceiver chip with a communication function, a baseband processing chip, a transceiver antenna, and the like.
  • the output device 61 may be a corresponding output interface or a voice playback device or a transceiver with a communication function.
  • the processor 60 is configured to generate a component loading request.
  • An output device 61 coupled to the processor 60, for transmitting the component loading request to the cloud server;
  • An input device 62 coupled to the processor 60, for receiving an executable file of a target component returned by the cloud server; an executable file of the target component is generated by the cloud server according to the component loading request;
  • the processor 60 is further configured to execute an executable file of the target component obtained by the input device 62 to complete loading of the target component.
  • the device provided by the embodiment of the present application may perform the foregoing method embodiments, and the implementation principles and technical effects thereof are similar, and details are not described herein again.
  • the processor 60 is further configured to store the executable file of the target component received by the input device 62 into the flash memory.
  • the processor 60 is specifically configured to: if the executable file of the target component is an XIP execution mode, extract an initialization function of the executable file of the target component in the flash memory; The initialization function to complete loading of the target component.
  • the processor 60 is specifically configured to: if the executable file of the target component is not the XIP execution mode, extract metadata in the executable file of the target component; the metadata
  • the method includes: initializing a function memory address and a component name corresponding to the executable file; copying an executable file of the target component after extracting the metadata into the memory; and running the initialization function to complete the target component load.
  • the input device 62 is further configured to receive a component update message sent by the cloud server;
  • the processor 60 is specifically configured to determine, according to the component update message, a target component that needs to be updated, and generate a component load request for the target component that needs to be updated.
  • the executable file of the target component has a standardized interface function;
  • the interface function includes at least one of the following functions: a start function, a close function, a read function, a write function, and an I/O channel management. function.
  • the component loading request includes available memory address space information of the device; or, the cloud server is preset with available memory address space information of the device;
  • the executable file of the target component is generated by the cloud server by using an object file of the target component and available memory address space information of the device; the target file of the target component is obtained by the cloud server according to the component loading request. .
  • the component loading request includes the memory address information of the target symbol, where the target symbol is a symbol in the device that the target component needs to invoke; or the target symbol is preset in the cloud server. Memory address information;
  • the executable file of the target component is generated by the cloud server using a target file of the target component, available memory address space information of the device, and a memory address information link of the target symbol.
  • the cloud server is an Internet of Things server
  • the target component is a driving component of a sensor that the device needs to load.
  • the device provided by the embodiment of the present application may perform the foregoing method embodiments, and the implementation principle and the technical effect are similar. I will not repeat them here.
  • FIG. 9 a block diagram of an embodiment of an Internet of Things system of the present application is shown, the Internet of Things system comprising: a cloud server 70 and a device 71 in communication with the cloud server;
  • the device 71 can include:
  • a request generation module for generating a component load request
  • a request sending module configured to send the component loading request to the cloud server
  • a file receiving module configured to receive an executable file of a target component returned by the cloud server
  • a file running module configured to execute an executable file of the target component to complete loading of the target component
  • the cloud server 70 can include:
  • a request receiving module configured to receive a component loading request sent by the device
  • An executable file generating module configured to generate an executable file of the target component according to the component loading request
  • a file sending module configured to send an executable file of the target component to the device, where the device is configured to run an executable file of the target component to complete loading of the target component.
  • the device 71 may further include:
  • a storage module configured to store the received executable file of the target component into the flash memory.
  • the file sending module may include:
  • An execution mode setting submodule configured to set an executable file of the target component to an XIP execution mode
  • a file sending submodule configured to send the executable file of the target component set to the XIP execution mode to the device.
  • the file running module may include:
  • a function extracting submodule configured to extract an initialization function of an executable file of the target component in the flash memory if the executable file of the target component is an XIP execution mode
  • the first function runs a submodule for running the initialization function to complete loading of the target component.
  • the file running module may further include:
  • a metadata extraction submodule configured to extract metadata in an executable file of the target component if the executable file of the target component is not in an XIP execution manner;
  • the metadata includes: an initialization function memory address and a component name corresponding to the executable file;
  • a copy submodule configured to copy an executable file of the target component that is proposed to extract metadata into an internal memory
  • the second function runs a submodule for running the initialization function to complete loading of the target component.
  • the cloud server 70 may further include:
  • An update message generating module configured to generate a component update message when the component is updated
  • an update message sending module configured to send the component update message to the device, where the device is configured to return the component load request after receiving the component update message.
  • the device may further include:
  • a message receiving module configured to receive a component update message sent by the cloud server
  • the request generation module includes:
  • a target component determining submodule configured to determine, according to the component update message, a target component that needs to be updated
  • the target request generation submodule is configured to generate a component load request for the target component that needs to be updated.
  • the executable file of the target component has a standardized interface function;
  • the interface function includes at least one of the following functions: a start function, a close function, a read function, a write function, and an I/O channel. Management function.
  • the component loading request includes available memory address space information of the device; or, the cloud server is preset with available memory address space information of the device;
  • the executable file generating module includes:
  • the target file obtaining submodule is configured to obtain the target file of the target component according to the component loading request;
  • An executable file generating submodule configured to generate an executable file of the target component in a preset format by using an object file of the target component and the available memory address space information.
  • the component load request includes memory address information of the target symbol, the target symbol is a symbol in the device that the target component needs to invoke; or memory address information in which the target symbol is preset in the cloud server;
  • the executable file generation submodule further includes:
  • a linking unit configured to link with an object file of the target component, the available memory address space information, and memory address information of the target symbol, to generate an executable file of the target component in a preset format.
  • the cloud server is an Internet of Things server
  • the target component is a driving component of a sensor that the device needs to load.
  • the description is relatively simple and relevant. See the section of the method embodiment for a description.
  • embodiments of the embodiments of the present application can be provided as a method, apparatus, or computer program product. Therefore, the embodiments of the present application may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware. Moreover, embodiments of the present application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) including computer usable program code.
  • computer-usable storage media including but not limited to disk storage, CD-ROM, optical storage, etc.
  • Embodiments of the present application are described with reference to flowcharts and/or block diagrams of methods, terminal devices (systems), and computer program products according to embodiments of the present application. It will be understood that each flow and/or block of the flowchart illustrations and/or FIG.
  • These computer program instructions can be provided to a processor of a general purpose computer, special purpose computer, embedded processor or other programmable data processing terminal device to produce a machine such that instructions are executed by a processor of a computer or other programmable data processing terminal device
  • Means are provided for implementing the functions specified in one or more of the flow or in one or more blocks of the flow chart.
  • the computer program instructions can also be stored in a computer readable memory that can direct a computer or other programmable data processing terminal device to operate in a particular manner, such that the instructions stored in the computer readable memory produce an article of manufacture comprising the instruction device.
  • the instruction device implements the functions specified in one or more blocks of the flowchart or in a flow or block of the flowchart.

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Stored Programmes (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

L'invention concerne un procédé de chargement de composant de dispositif, ledit dispositif étant en communication avec un serveur en nuage, et le procédé comprenant les étapes suivantes : un dispositif génère une demande de chargement de composant (101) ; le dispositif envoie ladite demande de chargement de composant au serveur en nuage (102) ; le dispositif reçoit un fichier exécutable associé à un composant cible renvoyé par le serveur en nuage ; le fichier exécutable associé au composant cible est généré par le serveur en nuage selon la demande de chargement de composant (103) ; le dispositif exécutant le fichier exécutable associé au composant cible achève le chargement du composant cible (104). Dans le présent procédé, un fichier exécutable associé à un composant cible est généré par un serveur en nuage, et un dispositif reçoit ensuite le fichier exécutable associé au composant cible, le fichier exécutable pouvant être exécuté directement de manière à achever le chargement du composant cible ; il n'est pas nécessaire de mettre en oeuvre un déplacement de symboles, ce qui réduit l'utilisation de ressources informatiques par le dispositif.
PCT/CN2017/104168 2016-10-13 2017-09-29 Procédé de chargement de composant de dispositif, appareil et système de l'internet des objets WO2018068658A1 (fr)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201610895963.1A CN107957887A (zh) 2016-10-13 2016-10-13 一种设备的组件加载方法、装置以及物联网系统
CN201610895963.1 2016-10-13

Publications (1)

Publication Number Publication Date
WO2018068658A1 true WO2018068658A1 (fr) 2018-04-19

Family

ID=61905173

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2017/104168 WO2018068658A1 (fr) 2016-10-13 2017-09-29 Procédé de chargement de composant de dispositif, appareil et système de l'internet des objets

Country Status (3)

Country Link
CN (1) CN107957887A (fr)
TW (1) TW201814546A (fr)
WO (1) WO2018068658A1 (fr)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111190649B (zh) * 2018-10-26 2023-07-25 阿里巴巴集团控股有限公司 客户端组建方法、装置及系统
CN113475048B (zh) * 2019-04-03 2024-05-14 深圳迈瑞生物医疗电子股份有限公司 接入控制方法、接入控制设备及电子设备
TWI740380B (zh) * 2020-02-17 2021-09-21 中華電信股份有限公司 監控設備之系統及其方法
CN113873044B (zh) * 2021-10-15 2024-01-02 阿里巴巴(中国)有限公司 数据传输方法、系统、设备及存储介质

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6269481B1 (en) * 1997-05-02 2001-07-31 Webtv Networks, Inc. Automatic selecting and downloading device drivers from a server system to a client system that includes one or more devices
US20090228881A1 (en) * 2008-03-04 2009-09-10 Atul Mukker Linux matrix compilation system and method
US20140108600A1 (en) * 2010-12-06 2014-04-17 Flexycore Application distribution supplying a dedicated application to a terminal from an application deposited by the developer
US20140207846A1 (en) * 2013-01-23 2014-07-24 International Business Machines Corporation Client-side aggregation of nested resource dependencies
CN104144466A (zh) * 2013-05-10 2014-11-12 中国电信股份有限公司 物联网中传感器接入方法、物联网系统和服务器
CN104253783A (zh) * 2013-06-25 2014-12-31 中国移动通信集团公司 web应用实现代码加载方法、装置、系统及服务器

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1252951C (zh) * 2003-11-04 2006-04-19 中兴通讯股份有限公司 节点b单板软件下载及升级方法
CN101510161A (zh) * 2009-03-30 2009-08-19 北京中星微电子有限公司 一种引导程序的实现方法、装置和便携式电子设备
CN107729083B (zh) * 2014-04-30 2021-02-12 华为技术有限公司 一种加载驱动程序的方法及嵌入式设备
CN105988836B (zh) * 2015-02-12 2020-07-10 Oppo广东移动通信有限公司 一种应用推荐方法及装置
CN105991729B (zh) * 2015-02-12 2019-12-31 Oppo广东移动通信有限公司 一种安装包下载方法及服务器
CN105573810A (zh) * 2016-03-23 2016-05-11 重庆邮电大学 一种无线传感器网络节点远程升级方法及装置

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6269481B1 (en) * 1997-05-02 2001-07-31 Webtv Networks, Inc. Automatic selecting and downloading device drivers from a server system to a client system that includes one or more devices
US20090228881A1 (en) * 2008-03-04 2009-09-10 Atul Mukker Linux matrix compilation system and method
US20140108600A1 (en) * 2010-12-06 2014-04-17 Flexycore Application distribution supplying a dedicated application to a terminal from an application deposited by the developer
US20140207846A1 (en) * 2013-01-23 2014-07-24 International Business Machines Corporation Client-side aggregation of nested resource dependencies
CN104144466A (zh) * 2013-05-10 2014-11-12 中国电信股份有限公司 物联网中传感器接入方法、物联网系统和服务器
CN104253783A (zh) * 2013-06-25 2014-12-31 中国移动通信集团公司 web应用实现代码加载方法、装置、系统及服务器

Also Published As

Publication number Publication date
TW201814546A (zh) 2018-04-16
CN107957887A (zh) 2018-04-24

Similar Documents

Publication Publication Date Title
US11847470B2 (en) Request processing method, system on chip, and public cloud management component
WO2018068658A1 (fr) Procédé de chargement de composant de dispositif, appareil et système de l'internet des objets
WO2018137564A1 (fr) Procédé et appareil de traitement de service
US20200089522A1 (en) Configuration of speed of virtual network interface card
JP7346606B2 (ja) 画面共有処理方法、装置、機器及び記憶媒体
WO2015062389A1 (fr) Procédé et appareil permettant de désinstaller une application de système sur un dispositif terminal
TW201721411A (zh) 應用程式的處理方法和裝置
EP3413602B1 (fr) Procédé et appareil de traitement d'application destinés à une carte de circuit intégrée universelle incorporée
WO2019047745A1 (fr) Procédé de partage de données, appareil terminal et support de stockage
TW201606648A (zh) 應用的處理方法及裝置
WO2018040746A1 (fr) Procédé, dispositif et appareil électronique d'installation de pilote
US20140047526A1 (en) Electronic device and method for providing cloud computing services
US9692600B2 (en) Device and method for re-signing application package, and terminal device for running application package
WO2023070823A1 (fr) Procédé, appareil et système de chargement de programme d'amorçage, dispositif électronique et support
JP2012079130A (ja) デバッグ支援プログラム、デバッグ支援装置、及びデバッグ支援方法
CN109656844B (zh) 一种AT24xx EEPROM驱动方法和装置
WO2015051728A1 (fr) Procédé et dispositif d'acquisition d'application d'appariement de terminal
CN106803794B (zh) 一种用于主机的kvm虚拟机网卡直通方法及其装置
WO2018006884A1 (fr) Procédé, dispositif et terminal utilisateur pour installation de logiciels
CN105245581A (zh) 一种应用程序传输方法及装置
CN102929662A (zh) 一种基于网络批量分区的方法
JP2013513874A (ja) データカードのアップグレーディング方法およびデバイス
US9292318B2 (en) Initiating software applications requiring different processor architectures in respective isolated execution environment of an operating system
WO2018121652A1 (fr) Procédé et dispositif permettant de se connecter à un point d'accès sans fil par le biais d'une application dans un équipement utilisateur
JP5975003B2 (ja) 仮想化制御装置、仮想化システム、仮想化方法、および、仮想化制御プログラム。

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 17860363

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 17860363

Country of ref document: EP

Kind code of ref document: A1