Resource issuing method, device and equipment for IOT equipment side
By integrating and processing the resources of IoT devices and unifying them, the problem of failed issuance of IoT device resources is solved, and the issuance success rate and reliability of business execution are improved.
Patent Information
- Application Number
- CN202411463944.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-18
- Publication Date
- 2025-01-10
AI Technical Summary
In the prior art, during the resource issuance process of IoT devices, some resources may not be successfully issued, resulting in business execution failure and reducing the issuance success rate.
By obtaining multiple resources required by IOT devices to perform target services, performing integration and processing, unified delivery, avoiding the failure of resource issuance caused by different issuance platforms.
It improves the success rate of IOT equipment resource issuance, ensures that the resources required for target services can be issued successfully as a whole, and improves the reliability of business execution.
Smart Images

Figure CN119299515A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of terminal technology, and in particular to a method, device and equipment for delivering resources to an IOT device side. Background Art
[0002] When performing a certain business, Internet of Things Devices (IOT) usually need to use multiple resources to collaborate with each other to complete the business. Therefore, multiple resources need to be pre-deployed on IOT devices. In the prior art, when deploying each resource to an IOT device, it is usually deployed based on a separate distribution method. Since each resource has its own corresponding distribution platform or upgrade channel, during the resource distribution process, some resources may be successfully distributed while others cannot be distributed successfully. However, for multiple resources required to execute the same business, if one resource fails to be distributed successfully, the business may not be executed successfully.
[0003] Therefore, how to improve the success rate of issuing various resources for the same business has become a technical problem that needs to be solved urgently. Summary of the invention
[0004] The embodiments of this specification provide a method, apparatus and device for delivering resources to an IOT device, which can improve the success rate of delivering various resources for the same service.
[0005] To solve the above technical problems, the embodiments of this specification are implemented as follows: A resource delivery method for an IOT device side provided in an embodiment of the present specification is applied to a server, and includes: obtaining a first program resource from program resources required for executing a target business; the target business is a business that needs to be executed on the IOT device side, and executing the target business requires at least the first program resource and the second program resource; the first program resource is maintained by a first organization; the second program resource is maintained by a second organization; determining the second program resource required for executing the target business; integrating the first program resource with the second program resource to obtain a data packet in a light application format; and delivering the data packet to the IOT device side.
[0006] The embodiment of this specification provides a resource installation method for an IOT device side, which is applied to the IOT device side and includes: Receive a data packet in a light application format sent by a server; parse the data packet to obtain program resources required to execute the target business, the program resources including at least a first program resource and a second program resource; the first program resource is maintained by a first organization; the second program resource is maintained by a second organization; install the program resources to execute the target business.
[0007] The embodiment of this specification provides a resource delivery device for an IOT device side, which is applied to a server and includes: A first program resource acquisition module is used to acquire a first program resource among program resources required to execute a target business; the target business is a business that needs to be executed on the IOT device side, and at least the first program resource and the second program resource are required to execute the target business; the first program resource is maintained by a first organization; and the second program resource is maintained by a second organization; A second program resource determination module, used to determine the second program resource required to execute the target service; A resource integration module, used to integrate the first program resource with the second program resource to obtain a data packet in a light application format; The data packet sending module is used to send the data packet to the IOT device side.
[0008] The embodiment of this specification provides a resource installation device for an IOT device side, which is applied to the IOT device side, including: A data packet receiving module, used to receive data packets in a light application format sent by a server; A data packet parsing module, used to parse the data packet to obtain program resources required for executing the target business, wherein the program resources include at least a first program resource and a second program resource; the first program resource is maintained by a first institution; and the second program resource is maintained by a second institution; The program resource installation module is used to install the program resources so as to execute the target business.
[0009] A server provided in an embodiment of the present specification includes: at least one processor; and, a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can: obtain a first program resource from program resources required to execute a target business; the target business is a business that needs to be executed on the IOT device side, and executing the target business requires at least the first program resource and the second program resource; the first program resource is maintained by a first organization; the second program resource is maintained by a second organization; determine the second program resource required to execute the target business; integrate the first program resource with the second program resource to obtain a data packet in a light application format; and send the data packet to the IOT device side.
[0010] An IOT device provided in an embodiment of this specification includes: at least one processor; and, a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can: receive a data packet in a light application format sent by a server; parse the data packet to obtain program resources required to execute the target business, and the program resources include at least a first program resource and a second program resource; the first program resource is maintained by a first organization; the second program resource is maintained by a second organization; and the program resources are installed to execute the target business.
[0011] At least one embodiment of this specification can achieve the following beneficial effects: Before sending resources to the IOT device side, first obtain the various resources required for the IOT device side to execute the target business, then integrate the various resources obtained to obtain a data packet in a light application format, and finally send the data packet in a light application format to the IOT device side as a whole. This allows the various resources required to execute the target business to be sent to the IOT device side as a whole through a unified platform, so as to avoid the problem that some resources can be sent successfully while others cannot be sent successfully when sending various resources to the IOT device side based on different sending platforms, thereby improving the sending success rate of various resources for the target business. BRIEF DESCRIPTION OF THE DRAWINGS
[0012] In order to more clearly illustrate the technical solutions in the embodiments of this specification or the prior art, the following briefly introduces the drawings required for use in the embodiments or the prior art description. Obviously, the drawings described below are only some embodiments recorded in this application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0013] Figure 1 This is a schematic diagram of an application scenario of a resource delivery method for an IOT device side provided in an embodiment of this specification; Figure 2 This is a flowchart of a method for delivering resources to an IOT device side provided in an embodiment of this specification; Figure 3 This is a flowchart of a resource installation method for an IOT device side provided in an embodiment of this specification; Figure 4 This specification provides an embodiment corresponding to Figure 2 Resource delivery method for IOT device side and Figure 3 A swimlane flow diagram of the resource installation method for the IOT device side; Figure 5 The embodiments of this specification provide corresponding to Figure 2 A structural diagram of a resource delivery device for an IOT device side; Figure 6 The embodiments of this specification provide corresponding to Figure 3 A structural diagram of a resource installation device for an IOT device side; Figure 7 The embodiments of this specification provide corresponding to Figure 2 A structural diagram of a resource delivery device for an IOT device side; Figure 8 The embodiments of this specification provide corresponding to Figure 3 A structural diagram of a resource installation device on the IOT device side. DETAILED DESCRIPTION
[0014] In order to make the purpose, technical solutions and advantages of one or more embodiments of this specification clearer, the technical solutions of one or more embodiments of this specification will be clearly and completely described below in combination with the specific embodiments of this specification and the corresponding drawings. Obviously, the described embodiments are only part of the embodiments of this specification, not all of the embodiments. Based on the embodiments in this specification, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of one or more embodiments of this specification.
[0015] In order to facilitate understanding of the technical solutions of one or more embodiments of this specification, some terms are explained: Rocket: A dynamic self-rendering engine for IoT scenarios.
[0016] Bundle: A native dynamic method that has the ability to dynamically send and load.
[0017] APK: Application installation package, which is the distribution and installation format of Android applications, contains all the application code, resources, metadata, etc.
[0018] Virtual application runtime environment: The four major Android components of the target application are run through a proxy, and the hook technology is used to simulate the sandbox runtime environment. The target application running in the virtual application runtime environment does not need to perceive the difference in the runtime environment.
[0019] Hook: is a technology used to intercept or modify function calls or events in programs, operating systems, or other software. It allows developers to "hook" when the system or application performs a certain operation, that is, insert custom code or logic to change the behavior of the program.
[0020] Activity: One of the core components of an Android application, representing a user interface or screen. Users can interact with the application through Activity.
[0021] In the prior art, various resources required for the IOT device to execute the target service are usually sent to the IOT device separately through different sending channels. However, in the process of sending resources separately, due to the different resource sending channels, some resources may be sent successfully, while others may fail to be sent. When some resources can be sent successfully but some cannot, the IOT device cannot normally execute the target service.
[0022] The technical solutions provided by the embodiments of this specification are described in detail below in conjunction with the accompanying drawings.
[0023] Figure 1 This is a schematic diagram of an application scenario of a method for delivering resources to an IOT device in an embodiment of this specification.
[0024] like Figure 1 As shown, the application scenario diagram includes a terminal device 101 and a server 102.
[0025] In the embodiments of this specification, the terminal device may include but is not limited to mobile phones, tablet computers, laptop computers, desktop computers, intelligent voice interaction devices, vehicle-mounted terminals and other devices. The terminal device 101 may be any of the aforementioned terminal devices. The terminal device 101 may execute the target service based on the collaborative relationship between the deployed multiple resources.
[0026] The server 102 may be an independent physical server, a server cluster or a distributed system composed of multiple physical servers, or a cloud server providing cloud computing services. The server 102 may send various resources required by the terminal device 101 to execute the target service.
[0027] The terminal device 101 and the server 102 may communicate with each other via a communication network, which may include a wired network or a wireless network.
[0028] Figure 2 A flowchart of a method for sending resources to an IOT device side provided in an embodiment of this specification. From a software perspective, the execution subject of the process can be an application installed on a server for sending resources to the IOT device side. From a hardware perspective, the execution subject of the process can be a server for sending resources to the IOT device side.
[0029] like Figure 2 As shown, the method may include the following steps.
[0030] Step 202: Obtain a first program resource from among program resources required to execute a target business; the target business is a business that needs to be executed on the IOT device side, and executing the target business requires at least the use of the first program resource and the second program resource; the first program resource is maintained by a first organization; and the second program resource is maintained by a second organization.
[0031] In the embodiments of this specification, the IOT device may include a vending machine cabinet in an unmanned vending scenario, a face recognition device in a station entry and exit scenario, and an identity verification device in a hotel check-in scenario, etc. The target business may include the business that the IOT device is responsible for executing, and the program resources required for the IOT device to execute the target business may include multiple resources.
[0032] In the embodiments of this specification, program resources may include configuration information, such as background image information or logo information on an image when the target service is executed on the IOT device side. Program resources may also include applets, such as Rocket, a technology engine used in the IoT environment. Rocket is specifically used for dynamic self-rendering, and its function is to generate and render interfaces and content in real time according to different scenarios and needs, rather than relying on predefined static interfaces. Program resources may also include code modules, such as a Bundle with dynamic distribution and dynamic loading capabilities. A Bundle can be understood as a packaged patch code that can be distributed to the client through a server to achieve dynamic updates of the application. Program resources may also include applications, such as application installation packages APK, etc.
[0033] Optionally, the first organization can be represented as a supplier on the platform side of the IOT device side, and the second organization can be represented as a service provider that provides services using the platform side of the IOT device side, that is, the first program resources can be resources provided by the supplier on the platform side of the IOT device side, and the second program resources can be resources provided by the service provider that provides services using the platform side of the IOT device side.
[0034] Alternatively, the first organization and the second organization can both be represented as service providers that provide services using the platform side of the IOT device side, that is, the first program resources and the second program resources can both be resources provided by a service provider that provides services using the platform side of the IOT device side, and the service provider that provides the first program resources is different from the service provider that provides the second program resources.
[0035] Step 204: Determine the second program resource required to execute the target service.
[0036] In the embodiments of this specification, the server may pre-store a resource list corresponding to the IoT device required to execute the target business. For different types of IoT devices, the resource list pre-stored in the server is different. Based on the acquired first program resource, a target resource list including the first program resource may be determined, and then based on the target resource list, a second program resource required to execute the target business may be determined.
[0037] Step 206: Integrate the first program resource and the second program resource to obtain a data packet in a light application format.
[0038] In an embodiment of the present specification, the first program resource and the second program resource can be integrated into a packaged file with a unified directory structure based on a packaging tool, and each resource in the packaged file has a unique resource name, that is, the resource names of any two different resources are different, so as to avoid conflicts in the resource names of different resources; each resource in the packaged file has a unique storage path, that is, the storage paths of any two different resources are different, so as to avoid conflicts in the storage paths of different resources.
[0039] In the embodiments of this specification, a light application running environment for running light applications may be deployed on the IOT device side. In order to adapt to the light application running environment deployed on the IOT device side, the packaged file obtained by the integration processing is a data packet in the light application format.
[0040] In the embodiments of this specification, when the server sends resources to the IOT device side, it does not send resources to only one IOT device, but sends resources to multiple IOT devices. If the data volume of the packaged file is large, it will occupy a large amount of data transmission resources of the server. If a large amount of data transmission resources are occupied, the risk of server downtime will increase, which will lead to failure of resource delivery. Therefore, integrating the packaged files into data packets in the light application format can also reduce the task volume of data transmission resources at the server and improve the success rate of sending resources to the IOT device side.
[0041] Step 208: Send the data packet to the IOT device side.
[0042] In the embodiments of the present specification, the server may receive in advance a request for obtaining a data packet sent by the IOT device side, and send a data packet in a light application format to the IOT device side in response to the request.
[0043] Optionally, the server may also actively send a request to the IOT device side, and in response to the instruction returned by the IOT device side allowing resources to be sent to the IOT device side, send the data packet in the light application format to the IOT device side.
[0044] In the embodiments of the present specification, when the server determines that a target data packet needs to be sent to the IOT device side, if the server does not receive feedback information returned by the IOT device side to prove that the target data packet has been successfully sent within a preset time period after sending the target data packet to the IOT device side, the server will re-send the target data packet to the IOT device side until feedback information returned by the IOT device side to prove that the target data packet has been successfully sent is received. In this way, it can be ensured that the target data packet is successfully sent to the IOT device side, so that the IOT device side can smoothly execute the target service.
[0045] It should be understood that the order of some steps in the methods described in one or more embodiments of this specification can be interchanged according to actual needs, or some steps can be omitted or deleted.
[0046] Figure 2The method in the embodiment integrates the first program resource and the second program resource required for executing the target business on the IOT device side into a data packet in a light application format, and then sends the data packet to the IOT device side, so that the various resources required for executing the target business can be sent to the IOT device side as a whole through a unified platform, so as to avoid the problem that some resources can be sent successfully while some resources cannot be sent successfully when each resource is sent to the IOT device side separately based on different sending platforms. Usually, the probability of successful sending of each sending platform is less than 1. Therefore, the first probability of successful sending when each resource is sent through multiple sending platforms (the product of the probability of successful sending of each sending platform) is bound to be less than the second probability of successful sending when each resource is sent through a unified sending platform. Therefore, the solution based on the present application can improve the success rate of sending each resource for the target business.
[0047] based on Figure 2 The method, the embodiments of this specification also provide some specific implementation methods of the method, which are described below.
[0048] For the same target resource, various versions of the target resource can be stored at the server. The target business can only be executed when the version information of each resource required to execute the target business on the IoT device side matches. For example, the required resources include the first program resource and the second program resource. When the version information of the first program resource matches the version information of the second program resource, the target business can be completed based on the coordination between the first program resource and the second program resource.
[0049] Based on this, determining the second program resource required to execute the target business (step 204) may specifically include: obtaining the first version information of the first program resource; determining the second version information having a corresponding relationship with the first version information; the corresponding relationship is used to reflect the relationship between the first version information of the first program resource required to execute the target business and the second version information of the second program resource required to execute the target business; determining the second program resource corresponding to the second version information.
[0050] In the embodiment of the present specification, the version information may include any one of the following information: the serial number information of the resource, the version number information of the resource, the timestamp information corresponding to the resource, and the name of the resource.
[0051] In the embodiments of the present specification, a second program resource having multiple version information may be pre-stored in the server, and each second program resource having a version information corresponds to a first program resource. The correspondence between the first version information of the first program resource and the second version information of the second program resource may include a correspondence in the form of a key-value pair, and based on the correspondence, after parsing the first version information of the first program resource, the second version information corresponding to the first version information may be determined, and then based on the determined second version information, the second program resource required for executing the target business may be determined from the second program resources having multiple version information stored in the server.
[0052] In one or more embodiments of this specification, the correspondence between the first version information of the first program resource and the second version information of the second program resource can reflect that the first program resource of the first version information and the second program resource of the second version information can cooperate to execute the target business. Since the first version information of the first program resource and the second version information of the second program resource contained in the data packet sent to the IOT device side have the above-mentioned correspondence, the risk of the target business being unable to be executed due to the mismatch of the version information between the first program resource and the second program resource can be avoided, so as to improve the effectiveness of executing the target business on the IOT device side.
[0053] In order to integrate the first program resource and the second program resource whose version information matches into the same data package, the server may pre-store the correspondence between the respective version information corresponding to the first program resource and the second program resource. Based on this, before obtaining the first program resource among the program resources required to execute the target business, the method may also include: pre-storing the correspondence between the first version information of the first program resource and the second version information of the second program resource.
[0054] In the embodiments of this specification, the first program resource may be a resource provided by a first service provider that provides services using a platform side on an IOT device side, and the second program resource may be a resource provided by a second service provider that provides services using a platform side on an IOT device side.
[0055] In the embodiment of this specification, the correspondence between the version information may include a first correspondence stored in scenario 1 and a second correspondence stored in scenario 2. The storage methods in scenario 1 and scenario 2 are described below.
[0056] Scenario 1: The initial stage of a first program resource that does not contain any version information and a second program resource that does not contain any version information on the platform side.
[0057] The platform side may send a first request to the first service provider to obtain the first program resource required for executing the target business, and the first request may include the version information of the first program resource required for executing the target business, and send a second request to the second service provider to obtain the second program resource required for executing the target business, and the second request may include the version information of the second program resource required for executing the target business. The first service provider responds to the first request, develops an initial version of the first program resource, and sends the initial version of the first program resource to the platform side; the second service provider responds to the second request, develops an initial version of the second program resource, and sends the initial version of the second program resource to the platform side. Since the first request includes the requirement of the version information of the first program resource required for executing the target business, and the second request includes the requirement of the version information of the second program resource required for executing the target business, the initial version of the first program resource and the initial version of the second program resource obtained by the platform side can be used to execute the target business. After obtaining the initial version of the first program resource and the initial version of the second program resource, the platform side pre-stores the first corresponding relationship between the initial version of the first program resource and the initial version of the second program resource.
[0058] Scenario 2: A subsequent stage after the platform receives the initial version of the first program resource and the initial version of the second program resource.
[0059] Assuming that the first service provider upgrades the first program resource and sends the upgraded updated version of the first program resource to the platform side, in order to successfully complete the target business, the second service provider can develop, test and upgrade the initial version of the second program resource based on the updated version of the first program resource on the platform side to obtain the updated version of the second program resource, and send the updated version of the second program resource to the platform side. Since the updated version of the second program resource is developed and upgraded with reference to the updated version of the first program resource, the version information between the updated version of the first program resource and the updated version of the second program resource still matches. After obtaining the updated version of the first program resource and the updated version of the second program resource, the platform side pre-stores the second corresponding relationship between the updated version of the first program resource and the updated version of the second program resource.
[0060] The step of integrating the first program resource with the second program resource to obtain a data packet in a light application format (step 206) may specifically include: integrating the configuration information required for executing the target business, basic attribute information for describing the data packet, list information for performing integrity verification on the data packet, the first program resource, and the second program resource to obtain the data packet.
[0061] In the embodiments of this specification, the configuration information may include R&D configuration information and business configuration information. Different business scenarios have different configuration information. For example, in the scene of entering and exiting a station, the configured background image information may be image information containing landmark buildings of the station, and the logo information configured on the background image may be the identification information of the station. For another example, in the scene of checking in a hotel, the configured background image information may be image information containing the appearance of the hotel, and the logo information configured on the background image may be the identification information of the hotel.
[0062] In the embodiment of this specification, the basic attribute information may include the name information, ID information, function description information of the data packet, etc. Optionally, the basic attribute information may also include entry module information, which is used to reflect the resource information of the light application first started by the data packet in the light application format.
[0063] In the embodiments of this specification, the list information is used to verify the integrity and authenticity of the data packet file. Each file or data in the data packet can be converted into a Secure Hash Algorithm 256-bit (SHA-256) format to obtain each unique identifier corresponding to each file or data, and the unique identifiers are aggregated to obtain the list information corresponding to the data packet.
[0064] In the embodiments of this specification, the first program resource may include an internal resource provided by a supplier on the platform side of the IOT device side, and the internal resource may include Rocket and / or Bundle. Optionally, the internal resource may also include Apk. The second program resource may include an external resource provided by a service provider that provides services using the platform side of the IOT device side, and the external resource may include Apk. Optionally, the external resource may also include Rocket and / or Bundle.
[0065] In the embodiments of the present specification, configuration information, basic attribute information, internal resource information, external resource information and inventory information can be summarized and integrated based on the Zip overall packaging method to generate a data packet in a light application format with a suffix (Lite Application Package, LAPK) for adapting to the operating environment of the IOT device and / or achieving fast download and low resource usage.
[0066] In order to improve the freshness of the light application on the IOT device side, the IOT device side can send a query request to the server at a preset time interval to query whether there is a new version of the data packet on the server. Based on this, before sending the data packet to the IOT device side, it can also include: Obtain a query request sent by the IOT device side, wherein the query request carries the version information of the program resources installed on the IOT device side; determine whether the version information of the program resources maintained by the server is newer than the version information of the installed program resources, and obtain a first determination result.
[0067] The sending of the data packet to the IOT device side may specifically include: If the first judgment result indicates that the version information of the program resource maintained by the server is newer than the version information of the installed program resource, the data packet is sent to the IOT device side.
[0068] In the embodiment of the present specification, the server receives the query request sent by the IOT device side, and the query request may include the location information and / or identification information and / or the version information of the installed program resources on the IOT device side. The server responds to the query request sent by the IOT device side, and determines the target business to be executed by the IOT device side based on the location information and / or identification information in the query request, and then determines the target data packet used to execute the target business according to the target business. The program resources corresponding to the target data packet can be the latest version of the program resources maintained by the server. The version information of the latest version of the program resources maintained by the server is compared with the version information of the installed program resources. If the version information of the latest version of the program resources maintained by the server is newer than the version information of the installed program resources, the target data packet is sent to the IOT device side; if the version information of the latest version of the program resources maintained by the server is matched, it is not newer than the version information of the installed program resources, the comparison result is sent to the IOT device side, and the IOT device side determines whether to send a request to the server to obtain the target data packet based on the comparison result obtained. In special scenarios, the IoT device may have accidentally deleted some resources due to misoperation, so it needs to request the server to obtain the target data packet for reinstallation on the IoT device. If the server receives the acquisition request for the target data packet sent by the IoT device within the preset time, the target data packet will be sent to the IoT device.
[0069] Optionally, after receiving the query request sent by the IOT device side, the server can also determine the corresponding target data packet based on the location information and / or identification information of the IOT device side in the query request, and directly send the target data packet to the IOT device side after determining the target data packet. The IOT device side compares the program resources corresponding to the target data packet with the installed program resources, and then decides whether to update the installed program resources on the IOT device side based on the comparison results.
[0070] In the embodiments of the present specification, the IOT device side actively sends a query request to the server to inquire whether there is an updated version of the data packet at the server, so as to avoid the server sending a query request to each IOT device in turn to inquire whether the program resources are updated, thereby reducing the workload at the server and reducing the risk of server downtime.
[0071] Based on Figure 2 With the same idea as the solution shown in , the embodiment of this specification also provides a resource installation method for the IOT device side. Figure 3 The following is a flowchart of a resource installation method for an IOT device provided in an embodiment of the present specification. From a software perspective, the execution subject of the process can be a program or application client installed on an IOT device. From a hardware perspective, the execution subject of the process can be an IOT device. Figure 3 As shown, the process may include the following steps.
[0072] Step 302: Receive a data packet in a light application format sent by a server.
[0073] In the embodiments of the present specification, the IOT device side may send a request to the server in advance to obtain a data packet, and receive a data packet in a light application format returned by the server in response to the request.
[0074] Optionally, the IOT device side may also receive a sending request sent by the server in advance for requesting to send a data packet, and in response to the sending request, send an instruction to the server to allow resources to be sent to the IOT device side, and receive a data packet in a light application format sent by the server in response to the instruction.
[0075] Step 304: Parse the data packet to obtain program resources required for executing the target business, wherein the program resources include at least a first program resource and a second program resource; the first program resource is maintained by a first organization; and the second program resource is maintained by a second organization.
[0076] In the embodiments of this specification, the IOT device side may include a light application running environment capable of running light applications, and the program providing the light application running environment may be deployed at the operating system on the IOT device side, or may also be deployed at the preset application installed on the operating system on the IOT device side. The data packet may be parsed by any one of the operating system on the IOT device side and the preset application installed on the operating system to obtain the program resources required to execute the target business.
[0077] In the embodiment of this specification, the specific explanation contents of the program resources, the first program resources, the second program resources, the first mechanism and the second mechanism can refer to the relevant explanation contents in step 202, so they will not be repeated here.
[0078] Step 306: Install the program resources to execute the target service.
[0079] In the embodiment of this specification, in the process of installing program resources, first create an application data directory for the target application corresponding to the program resources, and create an application installation directory for the target application. The application data directory is used to store the private data of the target application, such as database data, configuration file data, cache data, etc., and the application installation directory is used to store the APK file of the target application and its related optimization files. After the application data directory and the application installation directory are successfully created, the program resources are installed into the installation directory composed of the application data directory and the application installation directory, and the light application corresponding to the data packet in the light application format is obtained, and the target business is executed based on the generated light application.
[0080] Figure 3 In the method, the data packet in the light application format received by the IOT device side includes various program resources required for executing the target business, so that the various program resources required for executing the target business can be sent to the IOT device side as a whole through a unified platform, so as to avoid the problem that some resources can be sent successfully while some resources cannot be sent successfully when each resource is sent to the IOT device side separately based on different sending platforms, thereby improving the sending success rate of each resource for the target business.
[0081] based on Figure 3 The method in this specification also provides some specific implementation plans of the method, which are described below.
[0082] Optionally, the installing the program resource (step 306) may specifically include: for an IOT device that has not installed the program resource, executing an initial installation process for the program resource.
[0083] In the embodiments of this specification, the IOT device parses the data packet in the light application format, and after obtaining the corresponding program resource, it will query whether the program resource is installed on the IOT device. If it is queried that the program resource is not installed on the IOT device, the initial installation process for the program resource is executed. The initial installation process may include the installation process of the program resource for the first time on the IOT device, and the installed program resource can be any version of the program resource. The initial installation process may also include the installation process of installing the most original version of the program resource to the IOT device. Exemplarily, it is assumed that the version of the program resource includes the initial version, the first upgraded version, the second upgraded version...the Nth upgraded version. Then the initial installation process may include the process of installing the program resource for the first time on the IOT device, and the version of the installed program resource can be any version of the initial version, the first upgraded version, the second upgraded version...the Nth upgraded version; the initial installation process may also include the process of installing the initial version of the program resource to the IOT device. After executing the initial installation process for the program resource, the corresponding initial light application can be obtained.
[0084] Optionally, the installing the program resource (step 306) may specifically include: for the IOT device that has installed the program resource, executing an update installation process for the program resource.
[0085] In the embodiment of this specification, the IOT device parses the data packet in the light application format, obtains the corresponding program resource, and then queries whether the program resource is installed on the IOT device. If the program resource is already installed on the IOT device, the update installation process for the program resource is executed. The update installation process may include an overall update of the program resources installed on the IOT device, or a partial update of the program resources installed on the IOT device. Exemplarily, the version information of the program resource refers to the version information of the program resource in the initial installation process. It is assumed that the version corresponding to the program resource installed on the IOT device is the initial version, and the version corresponding to the program resource received by the IOT device is the first upgraded version. The update installation process may include replacing the program resource of the initial version as a whole based on the program resource of the first upgraded version; or the update installation process may also include partially replacing the program resource of the initial version based on the program resource of the first upgraded version. Partially replacing the program resource of the initial version based on the program resource of the first upgraded version may specifically include: allowing update replacement for the difference content between the initial version and the first upgraded version, and prohibiting update replacement for the same content between the initial version and the first upgraded version. After executing the update installation process for the program resource, the corresponding updated light application can be obtained.
[0086] In order to avoid invalid updates and upgrades, the update and installation process for the program resources will only be executed when the version information of the parsed program resources is newer than the version information of the installed program resources. Based on this, the update and installation process for the program resources for the IOT device that has installed the program resources may specifically include: Determine whether the parsed version information of the program resources is newer than the version information of the installed program resources to obtain a second judgment result; if the second judgment result indicates that the parsed version information of the program resources is not newer than the version information of the installed program resources, prohibit the execution of the update and installation process for the program resources; if the second judgment result indicates that the parsed version information of the program resources is newer than the version information of the installed program resources, execute the update and installation process for the program resources.
[0087] In the embodiments of the present specification, judging whether the version information of the program resource parsed is newer than the version information of the installed program resource may specifically include: judging whether the generation time of the parsed program resource is later than the generation time of the installed program resource, judging whether the generation time of the first serial number of the parsed program resource is later than the generation time of the second serial number of the installed program resource, and judging whether the generation time of the first version number of the parsed program resource is later than the generation time of the second version number of the installed program resource according to the version number naming rule. When it is judged that the version information of the parsed program resource is not newer than the version information of the installed program resource, the update installation process for the program resource is prohibited; when it is judged that the version information of the parsed program resource is newer than the version information of the installed program resource, the update installation process for the program resource is prohibited.
[0088] Optionally, during the update and installation process for program resources, if the program resources are in a running state, the creation of an application data directory is allowed, and the creation of an application installation directory is prohibited. When the program resources are converted from a running state to a standby state, the creation of an application installation directory is allowed. After both the application data directory and the application installation directory are successfully created, the parsed program resources are updated to the installation directory consisting of the application data directory and the application installation directory, and the originally installed program resources are set to an updated state.
[0089] Optionally, after installing the program resource, the following steps may also be included: The first program resource is loaded into a first operating environment corresponding to the first program resource; in the first operating environment, the first program resource is started; the second program resource is loaded into a second operating environment corresponding to the second program resource; in the second operating environment, the second program resource is started.
[0090] In the embodiments of this specification, the first program resource may be any resource included in the program resources, the second program resource may be any resource included in the program resources, and the first program resource is different from the second program resource. The operating environment corresponding to the first program resource is the first operating environment, and the operating environment corresponding to the second program resource is the second operating environment, and the first operating environment is different from the second operating environment. The light application loads the first program resource into the first operating environment, and loads the second program resource into the second operating environment. After the first program resource and the second program resource are successfully loaded, the light application starts the corresponding resource according to the entry module information carried in the data packet. If the entry module information indicates that the resource to be started is the first program resource, the first program resource is started in the first operating environment; if the entry module information indicates that the resource to be started is the second program resource, the second program resource is started in the second operating environment.
[0091] Program resources may include Rocket and / or Bundle provided by the supplier on the platform side of the IOT device side. The light application runtime environment deployed on the IOT device side may provide a container for loading and starting Rocket or Bundle. The first container for loading and starting Rocket is different from the second container for loading and starting Bundle. Program resources may also include APK provided by a service provider who uses the platform side of the IOT device side to provide services. In order to load and start the APK provided by the service provider, the IOT device side also needs to be deployed with an runtime environment for running APK. Based on this, the IOT device side is deployed with a virtual application runtime environment, and the runtime environment virtualized by the virtual application runtime environment is consistent with the second runtime environment.
[0092] The loading the second program resource into a second operating environment corresponding to the second program resource may specifically include: loading the second program resource into the virtual application operating environment.
[0093] The starting the second program resource in the second operating environment may specifically include: In the virtual application running environment, the second program resource is started.
[0094] In the embodiment of this specification, the second program resource can be an APK provided by a service provider that provides services using the platform side of the IOT device side. The program that provides the virtual application running environment can be deployed at the operating system on the IOT device side, or the program that provides the virtual application running environment can also be deployed at the preset application installed on the operating system on the IOT device side.
[0095] In the embodiments of the present specification, when a light application is loading various resources, if the resource being loaded is an APK provided by a service provider, the APK provided by the service provider will be loaded into the virtual application runtime environment, and the APK will be started in the virtual application runtime environment based on the startup instruction of the light application.
[0096] It should be noted that operations such as loading, starting, running, updating, and uninstalling the APK provided by the service provider in the virtual application runtime environment can all be performed by the light application.
[0097] Optionally, the virtual application runtime environment is pre-configured with an installation directory structure for installing the second program resource; and loading the second program resource into the virtual application runtime environment may specifically include: Install the internal resources of the second program resource into the internal directory of the installation directory structure, wherein the internal directory is a directory that the target application corresponding to the second program resource is allowed to access; install the external resources of the second program resource into the external directory of the installation directory structure, wherein the external directory is a directory that the target application and other applications are allowed to access.
[0098] In an embodiment of the present specification, a target installation directory structure for installing the second program resource in the virtual application runtime environment can be set in accordance with the installation directory structure when the second program resource is installed in the operating system. The target installation directory structure includes an internal directory and an external directory, and the data corresponding to the internal directory may include data that is only allowed to be accessed by the application corresponding to the second program resource, such as data in the cache. The data corresponding to the external directory may include data that is allowed to be accessed by the application corresponding to the second program resource and other applications, such as data stored in an external SD card. Loading the second program resource into the virtual application runtime environment may include installing the internal resources of the second program resource into the internal directory of the target installation directory structure, and installing the external resources of the second program resource into the external directory of the target installation directory structure.
[0099] In the embodiments of this specification, the APK provided by the service provider can be installed in the virtual application running environment deployed on the IOT device side, thereby avoiding the tedious process of various permission confirmations when installing the APK in the operating system on the IOT device side, thereby simplifying the APK installation operation process and improving the user experience.
[0100] Optionally, after starting the second program resource in the virtual application running environment, the method may further include: Obtaining the operation result data generated by the second program resource after running in the virtual application running environment; sending the operation result data to the first running environment, so that the light application corresponding to the program resource executes the target business based on the operation result data and the first program resource.
[0101] In the embodiments of this specification, the first operating environment may be a light application operating environment, and the relationship between the virtual application operating environment and the light application operating environment may be expressed as follows: the virtual application operating environment belongs to the bottom operating environment, and the light application operating environment belongs to the upper operating environment (business layer). The virtual application operating environment includes an API interface for interacting with the light application operating environment, and the light application can use the API interface to access the functional modules contained in any application running on the virtual application operating environment and the operating result data after any application is run.
[0102] In the embodiments of the present specification, the light application interacts with the user through the light application running environment based on the functional modules and / or running result data obtained from the virtual application running environment and the various resources running in the light application running environment, and then realizes the execution process of the target business based on the interaction with the user.
[0103] In the embodiments of this specification, the virtual application running environment can run applications provided by multiple service providers that are required to execute the target business. Taking the identity verification business in the hotel check-in scenario as an example, the virtual application running environment can run applications such as applications that upload personal information to the designated system when checking in at the hotel (for example, PSB applications), face scanning applications, and advertising applications that provide advertising services to customers. When executing the identity verification business, the light application can retrieve the functional modules and / or operation result data of applications such as PSB applications, face scanning applications, and advertising applications from the virtual application running environment. Since the version information correspondence between the PSB application, face scanning application, and advertising application contained in the data packet can meet the preset requirements for executing the identity verification business, the PSB application, face scanning application, and advertising application obtained by the light application from the virtual application running environment can work together to complete the identity verification business.
[0104] It should be noted that if the authorization instruction of the light application is obtained, the PSB application, face-scanning application, advertising application and other applications running in the virtual application running environment can be upgraded and updated at the same time. If the authorization instruction of the light application is not obtained, any application among the PSB application, face-scanning application and advertising application and other applications running in the virtual application running environment is prohibited from being upgraded and updated separately. With such a setting, the version information correspondence between the PSB application, face-scanning application and advertising application and other applications running in the virtual application running environment can meet the preset requirements for executing the identity verification service in real time. This is to avoid the risk of version information mismatch due to different upgrade channels of PSB application, face-scanning application and advertising application when the PSB application, face-scanning application and advertising application are installed separately to the operating system of the IOT device, thereby avoiding the risk of inability to execute the identity verification service due to version information mismatch.
[0105] Optionally, the startup process of the APK provided by the service provider in the virtual application runtime environment may include: taking the Activity (user interface component) in the virtual application corresponding to the startup APK as an example, the real Activity belonging to the APK (real application) that is actually started is replaced with the proxy Activity belonging to the virtual application runtime environment through the Hook technology. Since the virtual application runtime environment is registered and installed in the operating system, while the real application is not registered and installed in the operating system, the operating system can identify the proxy Activity belonging to the virtual application runtime environment, but cannot identify the real Activity belonging to the real application. The proxy Activity is provided to the operating system to obtain the running framework for running the proxy Activity from the operating system. After the virtual application runtime environment obtains the running framework for running the proxy Activity, it runs the real Activity based on the running framework, thereby realizing the startup of the Activity in the real application.
[0106] Figure 4 This specification provides an embodiment corresponding to Figure 2 Resource delivery method for IOT device side and Figure 3 A swimlane flow diagram of the resource installation method for the IoT device side.
[0107] like Figure 4 As shown, the solution may include a resource distribution phase and a resource installation phase.
[0108] The execution subject of the resource delivery stage may be a server. The resource delivery stage may specifically include the following steps.
[0109] Step 402: Acquire a first program resource among program resources required to execute a target service.
[0110] The program resources may include at least a first program resource and a second program resource, the first program resource is maintained by a first organization, and the second program resource is maintained by a second organization.
[0111] Step 404: Determine the second program resource required to execute the target service.
[0112] The second program resource may be a resource determined based on the first program resource. Optionally, second version information having a corresponding relationship with the first version information may be determined based on the first version information of the first program resource, and then the second program resource may be determined based on the second version information. The corresponding relationship may be a relationship between the first version information of the first program resource and the second version information of the second program resource pre-stored by the server.
[0113] Step 406: Integrate the first program resource and the second program resource to obtain a data packet in a light application format.
[0114] Step 408: Send the data packet to the IOT device side.
[0115] The execution subject of the resource installation phase may be the IOT device side. The resource installation phase may specifically include the following steps.
[0116] Step 410: Receive a data packet in a light application format sent by a server.
[0117] Step 412: Parse the data packet to obtain program resources required to execute the target service.
[0118] The IoT device side can be deployed with a light application runtime environment for running light applications. The program that provides the light application runtime environment can be deployed at the operating system on the IoT device side, or can also be deployed at a preset application installed on the operating system. The parsing operation for the data packet can be performed by the operating system on the IoT device side, or can also be performed by a preset application on the operating system.
[0119] Step 414: Determine whether the program resources have been installed on the IOT device side.
[0120] Step 416: Execute the initial installation process to obtain the initial light application.
[0121] If it is determined that the program resources are not installed on the IOT device side, an initial installation process for the program resources is performed to obtain an initial light application.
[0122] Step 418: Determine whether the version information of the parsed program resource is newer than the version information of the installed program resource.
[0123] If it is determined that the program resource has been installed on the IOT device side, it is determined whether the version information of the parsed program resource is newer than the version information of the installed program resource.
[0124] Step 420: Execute the update installation process to obtain the updated light application.
[0125] If it is determined that the version information of the parsed program resource is newer than the version information of the installed program resource, an update installation process for the program resource is executed to obtain an updated light application.
[0126] Step 422: Prohibit execution of the update installation process.
[0127] If it is determined that the parsed version information of the program resource is not newer than the version information of the installed program resource, the update installation process for the program resource is prohibited.
[0128] Step 424: Load the first program resource and the second program resource.
[0129] The parsed program resources may include at least a first program resource and a second program resource. After the program resources are installed, a corresponding light application (initial light application or updated light application) can be generated. The light application is responsible for loading the first program resource into the first operating environment corresponding to the first program resource, and loading the second program resource into the second operating environment corresponding to the second program resource. For example: if the first program resource is a Rocket and / or Bundle provided by a supplier on the platform side of the IOT device side, the first program resource is loaded into the light application operating environment for loading Rocket or Bundle container, and the first container for loading Rocket is different from the second container for loading Bundle. If the second program resource is an APK provided by a service provider that uses the platform side to provide services, the second program resource is loaded into a virtual application operating environment, and a virtual application operating environment for running virtual applications is also deployed on the IOT device side.
[0130] Step 426: Start the first program resource and the second program resource.
[0131] A first program resource is started in a first execution environment, and a second program resource is started in a second execution environment.
[0132] Step 428: Acquire the operation result data generated by the second program resource running in the virtual application running environment.
[0133] The virtual application running environment has an API interface for interacting with the light application running environment. Based on the API interface, the light application retrieves the running result data generated after the second program resource is run from the virtual application running environment, and sends the running result data to the light application running environment.
[0134] Step 430: Execute the target business based on the operation result data and the first program resource.
[0135] The light application executes the target service based on the acquired operation result data and the first program resources running in the light application running environment.
[0136] Based on the same idea, the embodiments of this specification also provide a device corresponding to the above method. Figure 5 The embodiments of this specification provide corresponding to Figure 2 A schematic diagram of a structure of a resource delivery device for an IOT device. Figure 5 As shown, the device may include: The first program resource acquisition module 502 is used to acquire the first program resource among the program resources required to execute the target business; the target business is the business that needs to be executed on the IOT device side, and executing the target business requires at least the use of the first program resource and the second program resource; the first program resource is maintained by the first organization; the second program resource is maintained by the second organization.
[0137] The second program resource determination module 504 is configured to determine the second program resource required to execute the target service.
[0138] The resource integration module 506 is used to integrate the first program resource with the second program resource to obtain a data packet in a light application format.
[0139] The data packet sending module 508 is used to send the data packet to the IOT device side.
[0140] based on Figure 5 The present specification also provides some specific implementation schemes of the device, which are described below.
[0141] Optionally, the second program resource determining module 504 may specifically include: The version information obtaining unit is used to obtain the first version information of the first program resource.
[0142] The version information determination unit is used to determine second version information having a corresponding relationship with the first version information; the corresponding relationship is used to reflect the relationship between the first version information of the first program resource required to execute the target business and the second version information of the second program resource required to execute the target business.
[0143] A program resource determining unit is used to determine the second program resource corresponding to the second version information.
[0144] Optionally, the Figure 5 The device may further include: The storage module is used to pre-store the corresponding relationship between the first version information of the first program resource and the second version information of the second program resource.
[0145] Optionally, the resource integration module 506 may specifically include: A resource integration unit is used to integrate the configuration information required for executing the target business, the basic attribute information for describing the data packet, the list information for integrity verification of the data packet, the first program resource and the second program resource to obtain the data packet.
[0146] Optionally, the Figure 5 The device may further include: The query request acquisition unit is used to acquire the query request sent by the IOT device side, and the query request carries the version information of the program resource installed on the IOT device side.
[0147] The version information determination unit is used to determine whether the version information of the program resource maintained by the server is newer than the version information of the installed program resource, and obtain a first determination result.
[0148] The data packet sending module 508 may specifically include: A data packet sending unit is used to send the data packet to the IOT device side if the first judgment result indicates that the version information of the program resource maintained by the server is newer than the version information of the installed program resource.
[0149] Figure 5The device in the embodiment integrates the first program resource and the second program resource required for executing the target business on the IOT device side into a data packet in a light application format, and then sends the data packet to the IOT device side. So that the various resources required for executing the target business can be sent to the IOT device side as a whole through a unified platform, so as to avoid the problem that some resources can be sent successfully while some resources cannot be sent successfully when each resource is sent to the IOT device side based on different sending platforms, thereby improving the sending success rate of each resource for the target business. There is also a corresponding relationship between the first version information of the first program resource contained in the data packet sent to the IOT device side and the second version information of the second program resource, and the corresponding relationship can reflect that the first program resource of the first version information and the second program resource of the second version information can cooperate to execute the target business. Therefore, the risk of the target business not being executed due to the mismatch of the version information between the first program resource and the second program resource can be avoided, so as to improve the effectiveness of the IOT device side in executing the target business.
[0150] Figure 6 The embodiments of this specification provide corresponding to Figure 3 A schematic diagram of a structure of a resource installation device for an IOT device side. Figure 6 As shown, the device may include: The data packet receiving module 602 is used to receive data packets in a light application format sent by the server.
[0151] The data packet parsing module 604 is used to parse the data packet to obtain the program resources required to execute the target business, and the program resources include at least a first program resource and a second program resource; the first program resource is maintained by a first organization; the second program resource is maintained by a second organization.
[0152] The program resource installation module 606 is used to install the program resource so as to execute the target service.
[0153] based on Figure 6 The present specification also provides some specific implementation schemes of the device, which are described below.
[0154] Optionally, the program resource installation module 606 may specifically include: The initial installation execution unit is used to execute an initial installation process for the program resource for an IOT device that has not installed the program resource.
[0155] Optionally, the program resource installation module 606 may specifically include: The update installation execution unit is used to execute the update installation process for the program resource for the IOT device that has installed the program resource.
[0156] Optionally, the update installation execution unit may specifically include: The version information determination subunit is used to determine whether the parsed version information of the program resource is newer than the version information of the installed program resource, and obtain a second determination result.
[0157] The update installation prohibition subunit is used to prohibit the execution of the update installation process for the program resource if the second judgment result indicates that the parsed version information of the program resource is not newer than the version information of the installed program resource.
[0158] The update installation execution subunit is used to execute the update installation process for the program resource if the second judgment result indicates that the parsed version information of the program resource is newer than the version information of the installed program resource.
[0159] Optionally, the Figure 6 The device may further include: The first program resource loading module is used to load the first program resource into a first operating environment corresponding to the first program resource.
[0160] The first program resource starting module is used to start the first program resource in the first operating environment.
[0161] A second program resource loading module, used to load the second program resource into a second operating environment corresponding to the second program resource; The second program resource starting module is used to start the second program resource in the second operating environment.
[0162] Optionally, a virtual application operating environment is deployed on the IOT device side, and the operating environment virtualized by the virtual application operating environment is consistent with the second operating environment.
[0163] Optionally, the second program resource loading module may specifically include: The second program resource loading unit is used to load the second program resource into the virtual application running environment.
[0164] The second program resource startup module may specifically include: The second program resource starting unit is used to start the second program resource in the virtual application running environment.
[0165] Optionally, the virtual application execution environment is pre-configured with an installation directory structure for installing the second program resource.
[0166] Optionally, the second program resource loading unit may specifically include: The internal resource installation subunit is used to install the internal resource of the second program resource into the internal directory of the installation directory structure, where the internal directory is a directory that is accessible to the target application corresponding to the second program resource.
[0167] The external resource installation subunit is used to install the external resource of the second program resource into the external directory of the installation directory structure, where the external directory is a directory that allows the target application and other applications to access.
[0168] Optionally, the second program resource startup module may further include: The operation result data acquisition unit is used to acquire the operation result data generated after the second program resource is run in the virtual application running environment.
[0169] The operation result data sending unit is used to send the operation result data to the first operation environment, so that the light application corresponding to the program resource executes the target business based on the operation result data and the first program resource.
[0170] Figure 6 In the device, the data packet in the light application format received by the IOT device side includes various program resources required to execute the target business, so that the various program resources required to execute the target business can be sent to the IOT device side as a whole through a unified platform, so as to avoid the problem that some resources can be sent successfully while some resources cannot be sent successfully when each resource is sent to the IOT device side based on different sending platforms, thereby improving the sending success rate of each resource for the target business. There is also a corresponding relationship between the first version information of the first program resource and the second version information of the second program resource contained in the data packet received by the IOT device side, and the corresponding relationship can reflect that the first program resource of the first version information and the second program resource of the second version information can cooperate to execute the target business. Therefore, the risk of the target business being unable to be executed due to the mismatch of the version information between the first program resource and the second program resource can be avoided, so as to improve the effectiveness of the IOT device side in executing the target business.
[0171] Based on the same idea, the embodiments of this specification also provide a device corresponding to the above method.
[0172] Figure 7 The embodiments of this specification provide corresponding to Figure 2A schematic diagram of a structure of a resource delivery device for an IOT device. Figure 7 As shown, the device 700 may include: At least one processor 710; and a memory 730 communicatively connected to the at least one processor; wherein, The memory 730 stores instructions 720 that can be executed by the at least one processor 710. The instructions are executed by the at least one processor 710 to enable the at least one processor 710 to: Obtain a first program resource from program resources required to execute a target business; the target business is a business that needs to be executed on the IOT device side, and executing the target business requires at least the first program resource and the second program resource; the first program resource is maintained by a first organization; the second program resource is maintained by a second organization; determine the second program resource required to execute the target business; integrate the first program resource with the second program resource to obtain a data packet in a light application format; and send the data packet to the IOT device side.
[0173] Figure 7 The device in the IOT device integrates the first program resource and the second program resource required to execute the target business on the IOT device side into a data packet in a light application format, and then sends the data packet to the IOT device side. This allows the various resources required to execute the target business to be sent to the IOT device side as a whole through a unified platform, so as to avoid the problem that some resources can be sent successfully while others cannot be sent successfully when each resource is sent to the IOT device side based on different sending platforms, thereby improving the sending success rate of each resource for the target business.
[0174] Figure 8 The embodiments of this specification provide corresponding to Figure 3 A schematic diagram of a structure of a resource installation device for an IOT device. Figure 8 As shown, the device 800 may include: At least one processor 810; and a memory 830 communicatively connected to the at least one processor; wherein, The memory 830 stores instructions 820 that can be executed by the at least one processor 810. The instructions are executed by the at least one processor 810 to enable the at least one processor 810 to: Receive a data packet in a light application format sent by a server; parse the data packet to obtain program resources required to execute the target business, the program resources including at least a first program resource and a second program resource; the first program resource is maintained by a first organization; the second program resource is maintained by a second organization; install the program resources to execute the target business.
[0175] Figure 8 The device in the light application format received by the IOT device side includes various program resources required to execute the target business, so that the various program resources required to execute the target business can be sent to the IOT device side as a whole through a unified platform, so as to avoid the problem that some resources can be sent successfully while some resources cannot be sent successfully when each resource is sent to the IOT device side separately based on different sending platforms, thereby improving the success rate of sending each resource for the target business.
[0176] The above is a description of a specific embodiment of the specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in an order different from that in the embodiments and still achieve the desired results. In addition, the processes depicted in the drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0177] Each embodiment in this specification is described in a progressive manner. The same or similar parts between the embodiments can be referred to each other. Each embodiment focuses on the differences from other embodiments. Figure 7 and Figure 8 As for the device shown, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
[0178] In the 1990s, it was very clear whether the improvement of a technology was hardware improvement (for example, improvement of the circuit structure of diodes, transistors, switches, etc.) or software improvement (improvement of the method flow). However, with the development of technology, many improvements of the method flow today can be regarded as direct improvements of the hardware circuit structure. Designers almost always obtain the corresponding hardware circuit structure by programming the improved method flow into the hardware circuit. Therefore, it cannot be said that the improvement of a method flow cannot be implemented with hardware entity modules. For example, a programmable logic device (PLD) (such as a field programmable gate array (FPGA)) is such an integrated circuit whose logical function is determined by the user's programming of the device. Designers can "integrate" a digital system on a PLD by programming it themselves, without having to ask chip manufacturers to design and make dedicated integrated circuit chips. Moreover, nowadays, instead of manually making integrated circuit chips, this kind of programming is mostly implemented by "logic compiler" software, which is similar to the software compiler used when developing and writing programs, and the original code before compilation must also be written in a specific programming language, which is called hardware description language (HDL). There is not only one kind of HDL, but many kinds, such as ABEL (Advanced Boolean Expression Language), AHDL (Altera Hardware Description Language), Confluence, CUPL (Cornell University Programming Language), HDCal, JHDL (Java Hardware Description Language), Lava, Lola, MyHDL, PALASM, RHDL (Ruby Hardware Description Language), etc. The most commonly used ones are VHDL (Very-High-Speed Integrated Circuit Hardware Description Language) and Verilog. Those skilled in the art should also know that it is only necessary to program the method flow slightly in the above-mentioned hardware description languages and program it into the integrated circuit, and then it is easy to obtain the hardware circuit that implements the logic method flow.
[0179] The controller may be implemented in any suitable manner, for example, the controller may take the form of a microprocessor or processor and a computer-readable medium storing a computer-readable program code (e.g., software or firmware) executable by the (micro)processor, a logic gate, a switch, an application-specific integrated circuit (ASIC), a programmable logic controller, and an embedded microcontroller, examples of which include but are not limited to the following microcontrollers: ARC 625D, Atmel AT91SAM, Microchip PIC18F26K20, and Silicone Labs C8051F320, and the memory controller may also be implemented as part of the control logic of the memory. It is also known to those skilled in the art that, in addition to implementing the controller in a purely computer-readable program code manner, the controller may be implemented in the form of a logic gate, a switch, an application-specific integrated circuit, a programmable logic controller, and an embedded microcontroller by logically programming the method steps. Therefore, such a controller may be considered as a hardware component, and the devices for implementing various functions included therein may also be considered as structures within the hardware component. Or even, the devices for implementing various functions may be considered as both software modules for implementing the method and structures within the hardware component.
[0180] The systems, devices, modules or units described in the above embodiments may be implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a computer. Specifically, the computer may be, for example, a personal computer, a laptop computer, a cellular phone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.
[0181] For the convenience of description, the above device is described in various units according to their functions. Of course, when implementing the present application, the functions of each unit can be implemented in the same or multiple software and / or hardware.
[0182] It will be appreciated by those skilled in the art that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Furthermore, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0183] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0184] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0185] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0186] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0187] Memory may include non-permanent storage in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. Memory is an example of a computer-readable medium.
[0188] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined in this article, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.
[0189] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.
[0190] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems or computer program products. Therefore, the present application may take the form of a complete hardware embodiment, a complete software embodiment or an embodiment combining software and hardware. Moreover, the present application may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes.
[0191] The present application may be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. The present application may also be practiced in distributed computing environments where tasks are performed by remote processing devices connected through a communication network. In a distributed computing environment, program modules may be located in local and remote computer storage media, including storage devices.
[0192] The above is only an embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the scope of the claims of the present application.
Claims
1. A resource delivery method for an IOT device side, applied to a server, comprising: Acquire a first program resource among program resources required to execute a target business; The target service is a service that needs to be executed on the IOT device side, and executing the target service requires at least the first program resource and the second program resource; the first program resource is maintained by the first organization; and the second program resource is maintained by the second organization; Determining the second program resource required to execute the target business; Integrate the first program resource with the second program resource to obtain a data packet in a light application format; The data packet is sent to the IOT device side.
2. The method according to claim 1, wherein determining the second program resource required to execute the target service comprises: Obtaining first version information of the first program resource; Determine second version information that has a corresponding relationship with the first version information; The corresponding relationship is used to reflect the relationship between the first version information of the first program resource required to execute the target business and the second version information of the second program resource required to execute the target business; Determine the second program resource corresponding to the second version information.
3. The method according to claim 2, before acquiring the first program resource among the program resources required to execute the target business, further comprising: The corresponding relationship between the first version information of the first program resource and the second version information of the second program resource is pre-stored.
4. The method according to claim 1, wherein the integrating the first program resource and the second program resource to obtain a data packet in a light application format comprises: The configuration information required to execute the target business, the basic attribute information used to describe the data packet, the list information used to perform integrity verification on the data packet, the first program resource and the second program resource are integrated to obtain the data packet.
5. The method according to claim 1, before sending the data packet to the IOT device side, further comprising: Obtaining a query request sent by the IOT device side, wherein the query request carries version information of the program resource installed on the IOT device side; Determine whether the version information of the program resource maintained by the server is newer than the version information of the installed program resource, and obtain a first determination result; The sending of the data packet to the IOT device side specifically includes: If the first judgment result indicates that the version information of the program resource maintained by the server is newer than the version information of the installed program resource, the data packet is sent to the IOT device side.
6. A resource installation method for an IOT device side, applied to the IOT device side, comprising: Receive data packets in light application format sent by the server; Parsing the data packet to obtain program resources required for executing the target business, the program resources at least including a first program resource and a second program resource; the first program resource is maintained by a first organization; the second program resource is maintained by a second organization; The program resource is installed to execute the target service.
7. The method according to claim 6, wherein the step of installing the program resource comprises: For the IOT device that has not installed the program resource, an initial installation process for the program resource is performed.
8. The method according to claim 6, wherein the step of installing the program resource comprises: For the IOT device that has installed the program resource, an update installation process for the program resource is performed.
9. The method according to claim 8, wherein for the IOT device that has installed the program resource, executing the update installation process for the program resource specifically comprises: Determine whether the parsed version information of the program resource is newer than the version information of the installed program resource, and obtain a second determination result; If the second judgment result indicates that the parsed version information of the program resource is not newer than the version information of the installed program resource, then prohibiting execution of the update installation process for the program resource; If the second judgment result indicates that the parsed version information of the program resource is newer than the version information of the installed program resource, an update installation process for the program resource is executed.
10. The method according to claim 6, after installing the program resource, further comprising: loading the first program resource into a first operating environment corresponding to the first program resource; In the first operating environment, starting the first program resource; loading the second program resource into a second operating environment corresponding to the second program resource; In the second operating environment, the second program resource is started.
11. The method according to claim 10, wherein a virtual application operating environment is deployed on the IOT device side, and the operating environment virtualized by the virtual application operating environment is consistent with the second operating environment; The step of loading the second program resource into a second operating environment corresponding to the second program resource specifically includes: Loading the second program resource into the virtual application running environment; The starting the second program resource in the second operating environment specifically includes: In the virtual application running environment, the second program resource is started.
12. The method according to claim 11, wherein the virtual application runtime environment is pre-set with an installation directory structure for installing the second program resource; and the step of loading the second program resource into the virtual application runtime environment specifically comprises: Installing the internal resources of the second program resource into the internal directory of the installation directory structure, wherein the internal directory is a directory that is accessible to the target application corresponding to the second program resource; The external resources of the second program resources are installed into an external directory of the installation directory structure, where the external directory is a directory that is allowed to be accessed by the target application and other applications.
13. The method according to claim 11, after starting the second program resource in the virtual application execution environment, further comprising: Acquire operation result data generated by the second program resource after the virtual application operation environment is executed; The operation result data is sent to the first operation environment, so that the light application corresponding to the program resource executes the target business based on the operation result data and the first program resource.
14. A resource delivery device for an IOT device, applied to a server, comprising: A first program resource acquisition module, used to acquire a first program resource among program resources required to execute a target business; The target service is a service that needs to be executed on the IOT device side, and executing the target service requires at least the first program resource and the second program resource; the first program resource is maintained by the first organization; and the second program resource is maintained by the second organization; A second program resource determination module, used to determine the second program resource required to execute the target service; A resource integration module, used to integrate the first program resource with the second program resource to obtain a data packet in a light application format; The data packet sending module is used to send the data packet to the IOT device side.
15. A resource installation device for an IOT device side, applied to the IOT device side, comprising: A data packet receiving module, used to receive data packets in a light application format sent by a server; A data packet parsing module, used to parse the data packet to obtain program resources required for executing the target business, wherein the program resources include at least a first program resource and a second program resource; the first program resource is maintained by a first institution; and the second program resource is maintained by a second institution; The program resource installation module is used to install the program resources so as to execute the target business.
16. A server, comprising: at least one processor; as well as, a memory communicatively connected to the at least one processor; wherein, The memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to: Acquire a first program resource among program resources required to execute a target business; the target business is a business that needs to be executed on the IOT device side, and executing the target business requires at least the first program resource and the second program resource; the first program resource is maintained by a first organization; and the second program resource is maintained by a second organization; Determining the second program resource required to execute the target business; Integrate the first program resource with the second program resource to obtain a data packet in a light application format; The data packet is sent to the IOT device side.
17. An IOT device, comprising: at least one processor; as well as, a memory communicatively connected to the at least one processor; wherein, The memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to: Receive data packets in light application format sent by the server; Parsing the data packet to obtain program resources required for executing the target business, the program resources at least including a first program resource and a second program resource; the first program resource is maintained by a first organization; the second program resource is maintained by a second organization; The program resource is installed to execute the target service.