Method, device and equipment for updating resources and sending task information

By sending a task query request carrying resource identification to the server in the Internet of Things device, the server returns task information, and the device performs updates, the problem of cumbersome resource update process and waste of resources in the existing technology is solved, and a simplified dynamic resource update process is realized. .

CN119211158APending Publication Date: 2024-12-27ALIPAY (HANGZHOU) INFORMATION TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411295689.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-14
Publication Date
2024-12-27

AI Technical Summary

Technical Problem

In the Internet of Things network, when new devices or applications are upgraded, the existing technology needs to recreate and publish resource update tasks, resulting in cumbersome processes and waste of resources.

Method used

The Internet of Things device sends a task query request carrying resource identification to the server. The server queryes based on the resource identification and returns the corresponding task information. The device performs resource update tasks without maintaining the binding relationship between the device and the resource, and avoiding re-publishing tasks.

Benefits of technology

Simplifies the dynamic resource update process when adding new devices or applications is upgraded, and avoids resource waste caused by adding new binding relationships and re-release tasks.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119211158A_ABST
    Figure CN119211158A_ABST
Patent Text Reader

Abstract

The invention provides a resource updating and task information sending method, device and equipment. According to the scheme, the method comprises the steps that the Internet of Things equipment sends a task query request to a server, the task query request carries at least one resource identifier, and the resource identifier is used for identifying program resources needed by operation of a target application on the Internet of Things equipment; then, the server queries task information based on the at least one resource identifier and returns the task information to the Internet of Things device, the task information being used for describing a resource updating task for updating resources identified by at least part of the resource identifiers in the at least one resource identifier, and the resource updating task being used for updating the resources identified by the at least part of the resource identifiers in the at least one resource identifier; the task information comprises a resource identifier of a resource used for updating by the resource updating task; and then, the Internet of Things equipment executes the resource updating task according to the task information.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to a resource updating method, device and equipment, and a task information sending method, device and equipment. Background Art

[0002] Currently, Internet of Things (IoT) devices have become an indispensable part of daily life. They are widely used in smart homes, industrial automation, health monitoring and other fields. With the development of IoT technology, the functions of IoT devices are also expanding, and more and more applications are integrated into IoT devices to provide more diverse services. As time goes by, dynamic resources in applications (such as applets, lightweight applications, etc.) need to be updated regularly or irregularly to keep them up to date and secure.

[0003] In the related art, the update of dynamic resources on IoT devices depends on the binding relationship between resources and IoT devices. Specifically, when it is necessary to update the dynamic resources in the application on the IoT device, the server can create resource update tasks. These resource update tasks need to specify the device type information of the IoT device, so that when the IoT device initiates a task query to the server, the server can match the resource update task according to the aforementioned binding relationship, thereby issuing a resource update task that matches its device type information to the IoT device. However, when a new device is connected to the IoT network, in order to enable the new device to perform dynamic resource updates normally, it is necessary to increase the binding relationship between the new device and the resource, and re-issue the resource update task; and when the application of the existing IoT device is upgraded, if a resource that is not bound to the IoT device is added, it is necessary to increase the binding relationship between the new resource and the IoT device, and re-issue the resource update task. It can be seen that the resource update process in the case of new devices or application updates is very cumbersome, and the re-issuance of tasks also causes a certain degree of resource waste.

[0004] In view of this, it is necessary to provide a dynamic resource update solution that is friendly to new device access or application upgrades. Summary of the invention

[0005] In view of this, embodiments of the present application provide a resource update method, apparatus, device and computer-readable medium to solve the existing problem that when a new device is connected to an IoT network or an application is updated on an existing device, resource update tasks need to be recreated and published, which results in a cumbersome process and waste of resources.

[0006] According to a first aspect of an embodiment of the present application, a resource update method is provided, which is applied to an Internet of Things device, including:

[0007] Sending a task query request to a server; the task query request carries at least one resource identifier; the resource identifier is used to identify the program resources required for the target application on the IoT device to run;

[0008] Receive task information returned by the server based on the query of the at least one resource identifier; the task information is used to describe a resource update task for updating resources identified by at least some of the at least one resource identifier; the task information includes resource identifiers of resources that the resource update task is used to update;

[0009] The resource update task is executed according to the task information.

[0010] According to a second aspect of an embodiment of the present application, a method for sending task information is provided, which is applied to a server and includes:

[0011] Receive a task query request sent by an IoT device; the task query request carries at least one resource identifier; the resource identifier is used to identify program resources required for running a target application on the IoT device;

[0012] In response to the task query request, query the task information corresponding to the at least one resource identifier; the task information is used to describe a resource update task for updating resources identified by at least part of the resource identifiers in the at least one resource identifier; the task information includes the resource identifier of the resource that the resource update task is used to update;

[0013] The task information is sent to the IoT device so that the IoT device performs the resource update task according to the task information.

[0014] According to a third aspect of an embodiment of the present application, a resource updating device is provided, which is applied to an Internet of Things device, including:

[0015] A request sending module, used to send a task query request to a server; the task query request carries at least one resource identifier; the resource identifier is used to identify the program resources required for the target application on the IoT device to run;

[0016] A task information receiving module, used to receive the task information returned by the server based on the query of the at least one resource identifier; the task information is used to describe a resource update task for updating resources identified by at least some of the at least one resource identifier; the task information includes the resource identifier of the resource that the resource update task is used to update;

[0017] The resource updating module is used to execute the resource updating task according to the task information.

[0018] According to a fourth aspect of an embodiment of the present application, a device for sending task information is provided, which is applied to a server and includes:

[0019] A request receiving module, used to receive a task query request sent by an IoT device; the task query request carries at least one resource identifier; the resource identifier is used to identify a program resource required for the target application running on the IoT device;

[0020] A task matching module, configured to query task information corresponding to the at least one resource identifier in response to the task query request; the task information is used to describe a resource update task for updating resources identified by at least some of the at least one resource identifier; the task information includes a resource identifier of a resource that the resource update task is used to update;

[0021] The task information sending module is used to send the task information to the Internet of Things device so that the Internet of Things device performs the resource update task according to the task information.

[0022] According to a fifth aspect of an embodiment of the present application, an Internet of Things device is provided, including:

[0023] at least one processor; and,

[0024] a memory communicatively connected to the at least one processor; wherein,

[0025] 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:

[0026] Sending a task query request to a server; the task query request carries at least one resource identifier; the resource identifier is used to identify the program resources required for the target application on the IoT device to run;

[0027] Receive task information returned by the server based on the query of the at least one resource identifier; the task information is used to describe a resource update task for updating resources identified by at least some of the at least one resource identifier; the task information includes resource identifiers of resources that the resource update task is used to update;

[0028] The resource update task is executed according to the task information.

[0029] According to a sixth aspect of an embodiment of the present application, a server is provided, including:

[0030] at least one processor; and,

[0031] a memory communicatively connected to the at least one processor; wherein,

[0032] 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:

[0033] Receive a task query request sent by an IoT device; the task query request carries at least one resource identifier; the resource identifier is used to identify program resources required for running a target application on the IoT device;

[0034] In response to the task query request, query the task information corresponding to the at least one resource identifier; the task information is used to describe a resource update task for updating resources identified by at least part of the resource identifiers in the at least one resource identifier; the task information includes the resource identifier of the resource that the resource update task is used to update;

[0035] The task information is sent to the IoT device so that the IoT device performs the resource update task according to the task information.

[0036] One embodiment of the present specification can achieve at least the following beneficial effects: by sending a task query request carrying a resource identifier from an IoT device to a server, the server can query the corresponding task based on the resource identifier carried in the task query request, and the server does not need to maintain the binding relationship between the IoT device and the resource. Therefore, even if a new device is added or the application in the existing device is updated, there is no need to update any binding relationship, and there is no need to re-publish the task. It can be seen that the resource update method simplifies the dynamic resource update process when a new device is added or the application in the existing device is updated, and avoids the waste of resources caused by adding a new binding relationship, re-publishing tasks, etc. BRIEF DESCRIPTION OF THE DRAWINGS

[0037] In order to more clearly illustrate the embodiments of this specification or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. 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 paying creative labor.

[0038] Figure 1 A schematic diagram of an application scenario of a dynamic resource update method provided in an embodiment of this specification;

[0039] Figure 2 A schematic diagram of a resource updating method provided in an embodiment of this specification;

[0040] Figure 3A flowchart of a method for sending task information provided in an embodiment of this specification;

[0041] Figure 4 A schematic diagram of a process of dynamic resource update of an IoT device in an actual application scenario provided in an embodiment of this specification;

[0042] Figure 5 The embodiments of this specification provide corresponding to Figure 2 A schematic diagram of the structure of a resource updating device;

[0043] Figure 6 The embodiments of this specification provide corresponding to Figure 3 A structural diagram of a device for sending task information;

[0044] Figure 7 The embodiments of this specification provide corresponding to Figure 2 A structural diagram of an Internet of Things device;

[0045] Figure 8 The embodiments of this specification provide corresponding to Figure 3 A schematic diagram of the structure of a server. DETAILED DESCRIPTION

[0046] Many specific details are described in the following description to facilitate a full understanding of the present application. However, the present application can be implemented in many other ways than those described herein, and those skilled in the art can make similar generalizations without violating the connotation of the present application, so the present application is not limited by the specific implementation disclosed below.

[0047] The terms used in one or more embodiments of the present application are only for the purpose of describing specific embodiments, and are not intended to limit one or more embodiments of the present application. The singular forms of "a", "said" and "the" used in one or more embodiments of the present application and the appended claims are also intended to include plural forms, unless the context clearly indicates other meanings. It should also be understood that the term "and / or" used in one or more embodiments of the present application refers to and includes any or all possible combinations of one or more associated listed items.

[0048] It should be understood that, although the terms first, second, etc. may be used to describe various information in one or more embodiments of the present application, these information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. For example, without departing from the scope of one or more embodiments of the present application, the first may also be referred to as the second, and similarly, the second may also be referred to as the first. Depending on the context, the word "if" as used herein may be interpreted as "at the time of" or "when" or "in response to determining".

[0049] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant laws, regulations and standards in the relevant regions, and provide corresponding operation entrances for users to choose to authorize or refuse.

[0050] On IoT devices, there are many different types of applications that can be run. The types of applications running on IoT devices can include control management applications, service applications, business applications, etc., but are not limited to these. As an example, the Smile application, as a comprehensive platform on IoT devices, can have the functions of control management applications, service applications, and business applications at the same time. For example, the Smile application can collect video and audio information for identity recognition by controlling cameras, microphones, speakers, etc., has face payment or identity verification functions, and displays payment results or verification results. For example, the Smile application can also provide some marketing activities services, such as electronic posters, bullet screens, blessings, etc., and merchants can promote marketing by calling these services. As an example, service applications on IoT devices can include IotService applications. Such applications usually provide specific services, such as device activation, remote maintenance, fault diagnosis, software upgrades, etc., which can help users better manage and maintain IoT devices, ensure that the devices operate normally and extend their service life. As an example, business applications on IoT devices can include, for example, health monitoring applications, production monitoring applications, environmental monitoring applications, smart security system applications, entertainment applications, education applications, etc., depending on the business scenario.

[0051] Applications running on IoT devices often have a variety of dynamic resources, such as mini-programs (Rocket), bundles, and light applications (liteApp), etc., but are not limited to these examples. Among them, mini-programs can be lightweight applications developed by front-end languages ​​and run in a specific container of the host application. Bundles can be application module units that meet the OSGI (OpenService Gateway Initiative) specification. LiteApp can be a lightweight application composed of Android native apk, mini-programs, and bundles that runs in a virtual machine of the host application.

[0052] During the running of the application, the server of the application can dynamically send some resources to implement partial updates or problem repairs of the application. In the related art, the update of dynamic resources on the IoT device depends on binding the resources with the device type information of the IoT device on the server. Specifically, when the server creates a resource, a binding relationship between the resource identifier and the device type information of the IoT device (for example, the device type identifier itemID) can be established; and when the server creates a resource update task, the device type condition can be specified in the task matching condition. Thus, when the IoT device initiates a task query request for a resource update task, the server can determine the resource that has a binding relationship with the IoT device based on the device type information of the IoT device carried in the task query request; then, traverse each resource that has a binding relationship with the IoT device in turn, and determine the task that matches the IoT device. Specifically, the tasks corresponding to each resource can be screened out to find the tasks whose task matching conditions are hit by the device status information of the IoT device.

[0053] As an example, when issuing a resource update task, the server can set a resource identifier and a task matching condition. For example, the resource identifier of task 1, resID=a1, and the task matching condition includes a device type condition (e.g., itemID=x1), an application version condition (e.g., application version>6.0.8), etc. When the server receives the task query request of the IoT device, first, one or more resources bound to the device type identifier can be determined according to the device type identifier of the IoT device carried in the task query request, assuming that the resource includes the resource corresponding to the resource identifier resID=a1; then, the bound one or more resources can be traversed to determine whether the tasks published for each resource match the state information of the IoT device. For example, when traversing to the resource with resID=a1, the aforementioned task 1 published for the resource with resID=a1 is queried, and the state information of the IoT device can be compared to see whether it meets the task matching condition of task 1: assuming that the device type in the state information of the IoT device is itemID=x1 and the application version=6.0.9, that is, it meets the task matching condition of task 1, then task 1 is hit, and task 1 can be returned to the IoT device that initiated the query; assuming that the device type in the state information of the IoT device is itemID=x1 and the application version=6.0.7, that is, it does not meet the task matching condition of task 1, then task 1 is not hit, and task 1 is not returned to the IoT device that initiated the query.

[0054] As mentioned above, in the relevant technology, it is necessary to establish a binding relationship between resources and device types. This binding relationship will result in the need to manually re-establish the binding relationship between resources and device type information and re-publish tasks when adding new device types or upgrading applications. For example, when a new device type (new itemID) is connected, it is necessary to establish a binding relationship between existing resources and the new itemID, and re-create and publish tasks for existing resources involving the new itemID. For another example, when existing devices upgrade applications, with the iteration of applications, the types and numbers of resources in the application will continue to be added or deleted. If the itemID of the existing device is not bound to the new resources of the upgraded application, it is necessary to re-bind the itemID and the new resources, and re-create and publish tasks for the new resources. For another example, for some devices, if the process when accessing the application is not standardized and the itemID is not provided to the server, it will also lead to the inability to perform dynamic resource updates on these devices in the future.

[0055] In view of this, in the embodiments of this specification, the binding relationship between resources and device types is decoupled, the resource identifiers of the program resources required for the application program to run are maintained on the IoT device, and based on the maintained resource identifiers, the task information of the resource update tasks corresponding to these resource identifiers are queried from the server, and then the resource update on the IoT device is realized based on the task information. Based on this solution, since the resources are not bound to the device type, the IoT device side pulls the task through the resource identifier. Therefore, when a new device type needs to be added or the application needs to be upgraded, there is no need to create and publish a new task. Therefore, the dynamic resource update process in the scenario of adding a new device type or upgrading the application is not cumbersome.

[0056] Figure 1 A schematic diagram of an application scenario of a dynamic resource updating method provided in an embodiment of this specification.

[0057] like Figure 1 As shown, an IoT device such as a face recognition device 101 and a container 102 may be installed with an application, and program resources in the application may be dynamically updated. The server 103 may be a server corresponding to the application installed on the IoT device, and the server 103 may be used to publish a task for updating program resources in the application, so that the IoT device obtains the corresponding task from the server 103 and updates the resources based on the task information.

[0058] In such Figure 1 In the application scenario shown, the server can be connected to one or more IoT devices via a local area network connection, a wide area network connection, an Internet connection, or other types of data networks. Typically, a large number of IoT devices can be connected.

[0059] In the embodiments of this specification, the IoT device may be any type of device, and optionally, may be any device with network communication and service processing capabilities. Specifically, Figure 1 The face recognition device 101 and the container 102 shown in the figure are only examples of IoT devices. For example, IoT devices may also include cash register devices, smart home devices, smart wearable devices, smart vehicle-mounted devices, smart medical devices, etc., but are not limited thereto. Among them, cash register devices may include but are not limited to supermarket cash registers, small business cash registers, etc. Smart home devices may include but are not limited to smart TVs, smart air conditioners, smart humidifiers, smart water heaters, smart kitchen appliances, smart doors and windows, smart air purifiers, etc. Smart wearable devices may include but are not limited to smart bracelets, smart watches, smart glasses, etc. Smart vehicle-mounted devices may include but are not limited to smart navigators, smart recorders, etc. Smart medical devices may include but are not limited to smart blood pressure monitors, smart weight scales, smart blood glucose meters, smart massage chairs, etc.

[0060] Figure 1 The server may include but is not limited to any device, equipment, platform, equipment cluster, cloud computing service center, etc. with computing and processing capabilities, and this specification does not make specific limitations on this.

[0061] The present application provides a resource updating method and a method for sending task information. The present application also involves a resource updating device, a device for sending task information, a resource updating device and a device for sending task information, which are described in detail one by one in the following embodiments.

[0062] Figure 2 A flowchart of a resource updating method provided in an embodiment of this specification.

[0063] From a program perspective, the execution subject of the process can be a program installed on the application terminal, specifically, it can be an application program installed on the Internet of Things device.

[0064] like Figure 2 As shown, the process may include the following steps:

[0065] Step 202: Send a task query request to the server; the task query request carries at least one resource identifier; the resource identifier is used to identify the program resources required for the target application on the IoT device to run.

[0066] The program resources may be resources that need to be loaded during the operation of the target application. The server of the target application may provide the target application with new resources or new versions of existing resources, that is, the resources need to be updated.

[0067] In actual application, when certain preset trigger conditions are met, the target application installed on the IoT device can send a task query request to the server corresponding to the target application. The task query request can be used to query the task for updating the program resources in the target application.

[0068] In an embodiment of the present specification, the program resources may include at least one of a mini-program or a light application (liteApp). Optionally, the program resources may also include multiple types such as Budle, Patch, JS_flow, zip, etc., but are not limited to this. Each resource type can generally contain a variety of different resources. For example, the mini-program resource type may include a first mini-program, a second mini-program, a third mini-program, and the like. For another example, the liteApp resource type may include a first liteApp, a second liteApp, and the like. For another example, the Budle resource type may include a first Budle, a second Budle, and the like.

[0069] Different resources may have different resource identifiers. For example, the resource identifier of the first mini program resource may be appId1, the resource identifier of the second mini program resource may be appId2, and the resource identifier of the third mini program resource may be appId3. For another example, the resource identifier of the first liteApp resource may be liteId1, and the resource identifier of the second liteApp resource may be liteId2. For another example, the resource identifier of the first Budle resource may be Budle1, and the resource identifier of the second Budle resource may be Budle2. What is given here is only an example of resource identifier. In actual application, the resource identifier may be an arbitrarily set string. For example, the resource identifiers of the first mini program, the second mini program, the third mini program, the first liteApp, the second liteApp, the first Budle, and the second Budle may be zy1, zy2, zy3, zy4, zy5, zy6, and zy7, respectively.

[0070] Even if the same target application is installed in different IoT devices, different program resources can be used in their respective target applications. Which program resources are needed in which IoT devices can be determined based on multiple factors such as the device type, operating system type, network connection type, geographical location, offline business scenario, etc. of the IoT device. For example, in the first IoT device, the target application may need to call resources such as the first applet, the second applet, and the first liteApp during operation, while in the second IoT device, the target application may need to call resources such as the second applet, the first liteApp, and the first Budle during operation. In view of this, in an embodiment of the present specification, in the task query request sent by the IoT device to the server, the resource identifier of the program resource that may need to be called or has been called by the IoT device in the process of running the target application can be carried, thereby realizing on-demand query of resource update tasks and on-demand update of resources, and avoiding the waste of computer resources and network resources caused by full query and full update.

[0071] Step 204: Receive the task information returned by the server based on the query of the at least one resource identifier; the task information is used to describe a resource update task for updating resources identified by at least some of the at least one resource identifier; the task information includes the resource identifier of the resource that the resource update task is used to update.

[0072] After receiving the task query request, the server can filter out the resource update tasks corresponding to the resource identifier carried in the task query request from the published resource update tasks according to the resource identifiers of the resources targeted by each resource update task.

[0073] Specifically, the server can query whether there is a resource update task corresponding to each resource identifier in at least one resource identifier carried in the task query request. In actual application, for at least one resource identifier carried in the task query request, it is possible that only some of the at least one resource identifier can query the corresponding resource update task, or it is possible that all of the at least one resource identifier can query the corresponding resource update task. The task information corresponding to the queried resource update task can be returned to the Internet of Things device. Of course, it is also possible that all of the at least one resource identifier cannot query the corresponding resource update task. In this case, an empty query result can be returned.

[0074] In actual application, each resource update task may be established for a resource to be updated. Optionally, for a resource update task, it may be set to be only for one resource to be updated.

[0075] In the embodiments of this specification, the task information may also be referred to as task execution information, which may be information corresponding to a resource update task and provided to an IoT device. The task information may include all information for implementing a resource update task. Specifically, the task information may include task type information and resource information (e.g., resource identifier, resource version identifier, etc.). Optionally, the task information may also include resource acquisition information (e.g., resource download link), etc.

[0076] For example, if the resource identifier carried in the task query request is (resID1, resID2, resID3), then the server can query the task corresponding to resID1, the task corresponding to resID2, and the task corresponding to resID3 in sequence. Assuming that task 1 corresponding to resID1 and task 2 corresponding to resID2 are queried, and no task corresponding to resID3 is queried, then the task information of task 1 and task 2 can be returned to the IoT device that sent the task query request.

[0077] Step 206: Execute the resource update task according to the task information.

[0078] In actual application, different resource update processes can be executed for different types of resource update tasks. In the embodiments of the present specification, the task types of resource update tasks can specifically include resource dispatch tasks, rollback tasks, reset tasks, etc., and the task types of resource update tasks can be determined based on task type information. Among them, resource updates based on resource dispatch tasks can be updating resources to updated versions; resource updates based on rollback tasks can be updating resources to earlier versions; and resource updates based on reset tasks can be updating resources to the original versions.

[0079] As an example, if it is determined based on the task type information that the resource update task is specifically a resource delivery task, then new resources can be further acquired from the path indicated by the resource acquisition information (for example, a resource download link) according to the resource acquisition information carried in the task information (for example, downloading new resources from the address indicated by the resource download link) to update the resources indicated by the resource identifier carried in the task information.

[0080] As an example, if it is determined based on the task type information that the resource update task is specifically a rollback task, then the resource indicated by the resource identifier can be further rolled back to a version before the version indicated by the resource version identifier based on the resource identifier and resource version identifier carried in the task information, for example, rolling back to the previous version of the version indicated by the resource version identifier.

[0081] As an example, if it is determined based on the task type information that the resource update task is specifically a reset task, the resource indicated by the resource identifier can be further reset to an initial version based on the resource identifier carried in the task information, and the initial version is the version built into the program package of the target application.

[0082] In actual application, executing the resource update task realizes the update of the resource indicated by the resource identifier, which may specifically include updating the resource package stored locally in the IoT device.

[0083] It should be understood that in the methods described in one or more embodiments of this specification, the order of some steps can be adjusted according to actual needs, or some steps can be omitted.

[0084] Figure 2 In the method, the IoT device sends a task query request carrying a resource identifier to the server, and the server can query the corresponding task based on the resource identifier carried in the task query request. The server does not need to maintain the binding relationship between the device type information of the IoT device and the resource. Therefore, even if a new device is added or the application in the existing device is updated, there is no need to update any binding relationship, and there is no need to re-publish the task. It can be seen that the resource update method simplifies the dynamic resource update process when a new device is added or the application in the existing device is updated, and avoids the waste of resources caused by adding a binding relationship, re-issuing tasks, etc.

[0085] based on Figure 2 The present specification also provides some improved implementation methods of the method, which are described below.

[0086] In the related art, the device type information of the IoT device is bound to the resources. However, in actual applications, the types and quantities of resources used in applications are constantly increasing. In this case, on the one hand, it increases the difficulty for the server to maintain the binding relationship between the device type information of the IoT device and the resources. On the other hand, due to the excessive number of resources bound to the device type information of the IoT device, when the server receives a task query request carrying the IoT device type information, the number of resources bound to the device type information is determined to be large, and the process of traversing these resources to match the tasks takes a long time, which can easily lead to a gateway query timeout.

[0087] In actual application, for a determined gateway timeout, the number of resources that the server can process in response to a single task query request is the quantity threshold corresponding to the gateway timeout. For example, when the gateway timeout is 3s, if the server wants to return the query result to the requester within 3s, it can only process task matches for up to 150 resources, and 150 is the threshold corresponding to the gateway timeout of 3s. In practice, if the number of resource identifiers bound to the device type information exceeds the quantity threshold corresponding to the gateway timeout (for example, a certain itemID is bound to 200 resources, which exceeds 150 and cannot be processed within 3s), the problem of gateway query timeout will occur, or the server needs to actively discard the query for some resources.

[0088] In one or more embodiments of the present specification, the number of at least one resource identifier carried in the task query request sent by the Internet of Things device to the server is less than or equal to a preset number; the preset number is the maximum number of resources that the server can process within the gateway timeout period.

[0089] The gateway timeout usually refers to the maximum time a data packet or request waits without a response in network communication. If no response is received within this time period, the request will be marked as timed out and may be resent or generate an error notification. In different network environments, the gateway timeout setting may be different. In the dynamic resource update scenario, as an example, if the IoT device does not receive any response from the server within the default timeout period (e.g., 3 seconds) after sending a task query request, the task query request will be marked as timed out.

[0090] Based on the embodiments of the present specification, since the resource identifier is directly carried in the task query request, the number of resource identifiers carried in the task query request can be controlled. By controlling the number of resource identifiers carried in the task query request to be less than or equal to the number threshold corresponding to the gateway timeout period, the probability of gateway query timeout can be reduced, thereby improving the update success rate of dynamic resource updates and the stability of the solution.

[0091] In one or more embodiments of the present specification, a resource identification list may be maintained locally in the IoT device, and the resource identifications in the resource identification list may be used to identify resources running in a target application of the IoT device.

[0092] Specifically, before sending the task query request to the server, the IoT device may obtain a locally stored resource identifier list. Accordingly, sending the task query request to the server may specifically include sending the task query request carrying the selected resource identifier in the resource identifier list to the server. The selected resource identifier may be at least part of the resource identifiers in the resource identifier list.

[0093] Optionally, in order to control the number of resources requested for query in one task query request to avoid query timeout, the length of the resource identification list may be limited to a quantity threshold corresponding to the gateway timeout period.

[0094] Specifically, before sending the task query request to the server, the method may further include: obtaining a first resource identifier in a resource identifier list corresponding to the IoT device; wherein the number of resource identifiers that the resource identifier list can accommodate is less than or equal to the preset number. Accordingly, sending the task query request to the server may specifically include: sending a task query request carrying the first resource identifier to the server. wherein the first resource identifier may be all resource identifiers in the resource identifier list.

[0095] Optionally, in order to control the number of resources requested in a task query request to avoid query timeout, the resource identifiers of the resources to be updated can be screened to control the number of resource identifiers to not exceed a quantity threshold corresponding to the gateway timeout period.

[0096] Specifically, before sending the task query request to the server, it may also include: according to a preset resource identifier screening rule, filtering out second resource identifiers whose number is less than or equal to the preset number from the resource identifier list corresponding to the IoT device. Accordingly, sending the task query request to the server may specifically include: sending a task query request carrying the second resource identifier to the server. The second resource identifier may be all or part of the resource identifiers in the resource identifier list.

[0097] In one or more embodiments of the present specification, the resource identification list may specifically be an ordered list.

[0098] Optionally, the resource identifiers in the resource identifier list can be sorted according to the call time, and the call time corresponding to a resource identifier can reflect the time when the resource represented by the resource identifier was last called in the target application. Then, according to the preset resource identifier screening rule, the second resource identifier is screened out from the resource identifier list, which can specifically include screening out resource identifiers with a relatively late call time (i.e., a relatively small difference between the call time and the current time) less than or equal to a preset number from the resource identifier list as the second resource identifier to be carried in the task query request.

[0099] Optionally, the resource identifiers in the resource identifier list can be sorted according to the number of calls, and the number of calls corresponding to a resource identifier can reflect the number of times the resource represented by the resource identifier is called in the target application within a certain statistical period. Then, according to a preset resource identifier screening rule, the second resource identifier is screened out from the resource identifier list, which can specifically include screening out a resource identifier with a relatively large number of calls less than or equal to a preset number from the resource identifier list as the second resource identifier for carrying in the task query request.

[0100] In the related technology, the resources on the IoT devices to be updated are determined based on the binding relationship between the device type information of the IoT devices and the resources. Therefore, for a large number of IoT devices corresponding to a certain device type information, all resources bound to the device type information are usually updated, and it is not considered whether all the matching resources of these IoT devices need to be updated. This may cause the IoT devices to update resources that they do not need, thus objectively causing a waste of computer resources and network resources. For example, the hotel and travel scene and the payment scene use devices with the same itemID, which causes the machine in the hotel and travel scene to issue coupon packages and Easter egg applets that are only used in the payment scene, resulting in a waste of resources.

[0101] In view of this, in one or more embodiments of the present specification, the resource represented by the at least one resource identifier is a resource that has been called on the IoT device. Specifically, the resource represented by the at least one resource identifier is a resource that has been called on the target application on the IoT device.

[0102] In actual application, the resource identifiers of the resources called in the target application can be added to the resource identifier list, so that the tasks pulled based on the resource identifier list are only used to update the called resources, realizing on-demand pulling and on-demand updating.

[0103] Specifically, the at least one resource identifier is included in a resource identifier list corresponding to the Internet of Things device; the resource update method of the embodiment of the present specification may also include: obtaining a call request for a target resource, the call request carrying a target resource identifier of the target resource; in response to the call request, adding or updating the target resource identifier in the resource identifier list.

[0104] The step of obtaining a call request for a target resource specifically includes: obtaining a call request for a target resource in the target application.

[0105] Optionally, if the target resource has not been called before, the resource identifier of the target resource can be added to the resource identifier list. Specifically, the calling time and / or calling times of the target resource can be recorded.

[0106] Optionally, if the target resource has been called before, the relevant information of the resource identifier of the target resource can be updated in the resource identifier list. Specifically, the calling time and / or calling times of the target resource can be updated.

[0107] In one or more embodiments of the present specification, when a program resource is called, it is possible to query whether the called resource is stored locally. If so, the resource is loaded. If not, the server is queried for a task to update the corresponding resource and the resource is updated based on the queried task, and then the resource is loaded.

[0108] Specifically, the resource update method of the embodiment of the present specification may also include: obtaining a call request for a target resource, wherein the call request carries the target resource information of the target resource; then, in response to the call request, querying whether the target resource matching the target resource information is stored locally on the IoT device to obtain a first resource query result. The target resource information may include a target resource identifier, or the target resource information may include a target resource identifier and a target resource version identifier. The resource version identifier indicates the version of the resource represented by the resource identifier. For example, the resource identifier of a resource (for example, a small program) is xxx, and the resource may include multiple versions, such as 1.0, 1.2, 2.0, etc. Then, these version identifiers 1.0, 1.2, 2.0 refer to the version identifiers corresponding to the resource identifier xxx, that is, these version identifiers 1.0, 1.2, 2.0 are actually xxx1.0, xxx1.2, xxx2.0.

[0109] If the first resource query result indicates that the IoT device has locally stored the target resource that matches the target resource information, the target resource can be loaded.

[0110] Optionally, after obtaining the call request for the target resource, the method may further include: starting a timeout timer. Then, if the target resource matching the target resource information is locally stored in the IoT device, the target resource is loaded, which may specifically include: if the target resource matching the target resource information is found in the local storage within the timeout period specified by the timeout timer, the target resource is loaded; otherwise, the loading fails.

[0111] If the first resource query result indicates that the target resource matching the target resource information is not stored locally on the IoT device, a second task query request may be sent to the server, the second task query request carrying the resource identifier of the target resource; and the resource download link returned by the server based on the resource identifier of the target resource is received; then, the target resource is downloaded from the address indicated by the resource download link. In actual application, after downloading the target resource, the target resource may also be loaded; and the target resource may also be stored locally on the IoT device.

[0112] Optionally, after obtaining the call request for the target resource, the method may further include: starting a timeout timer. Then, loading the target resource after downloading the target resource may specifically include: if a designated resource dispatch task corresponding to the target resource is found and downloaded within the timeout period specified by the timeout timer, the target resource is loaded; otherwise, the loading fails.

[0113] In actual application, when the timeout timer is started, information indicating that resources are loading, such as "loading", "loading", etc., can be displayed to the user in the first user interface; if the target resource is queried within the timeout period specified by the timeout timer, and the target resource is a front-end type resource used for page display, the information corresponding to the target resource can be displayed to the user in the second user interface; if the target resource is not queried within the timeout period specified by the timeout timer, information indicating that resource loading failed can be displayed to the user in the third user interface, such as "loading failed", "resource loading error", etc.

[0114] In one or more embodiments of the present specification, the IoT device may send a task query request to the server when a preset condition is met.

[0115] Optionally, the IoT device can initiate a task query to the server based on the heartbeat program. Specifically, the task query request can be sent to the server according to a preset polling cycle. In actual application, the heartbeat program can be started after the main process of the target application is started, and is used to actively send a task query request to the server according to a preset polling cycle during the operation of the target application, so as to pull new tasks in time and then update resources in time. For example, the IoT device can send a task query request to the server every hour after the target application is started.

[0116] Optionally, the IoT device can initiate a task query to the server in response to a trigger from the server. Specifically, a push message (i.e., a push message) sent by the server can be received, and the push message is used to instruct the IoT device to send a task query request to the server; then, in response to the push message, a task query request is sent to the server. In actual application, the target application can register a listening task on the server side, so that when the main process of the target program is started, it can receive a push message from the server based on the listening task. For example, for a more urgent resource update task, in order to enable the IoT device to complete the update in a timely manner, the server can actively trigger the IoT device to immediately send a task query request to the server.

[0117] In one or more embodiments of the present specification, after the IoT device obtains the task information of the resource update task from the server, it can execute different resource update processes based on the task information of different types of tasks. In actual application, the resource update task can include different task types such as resource delivery task, rollback task, reset task, etc. The task information can include task type information for indicating the task type of the resource update task.

[0118] Optionally, the resource update task may include a resource delivery task. The task information may include first task type information and a resource download link, and the first task type information is used to indicate that the resource update task is a resource delivery task. Then, executing the resource update task according to the task information may specifically include: downloading the resource to be downloaded from the address indicated by the resource download link; and then storing the resource to be downloaded locally on the IoT device. The stored resource to be downloaded may be obtained from the local storage when the resource to be downloaded is called later.

[0119] Specifically, when the resource update task is a resource delivery task, the resource information to be downloaded in the task information can be used to query whether the IoT device has the resource indicated by the resource information to be downloaded locally; if not, the resource indicated by the resource information to be downloaded is downloaded according to the resource download link carried in the task information, and the downloaded resource is stored locally in the IoT device; if it exists, there is no need to perform subsequent download processes. The resource information may include a resource identifier; optionally, the resource information may also include a resource version identifier.

[0120] More specifically, the task information also includes the resource information to be downloaded of the resource to be downloaded. Before downloading the resource to be downloaded from the address indicated by the resource download link, it may also include: determining whether the IoT device has locally stored a resource matching the resource information to be downloaded, and obtaining a second resource query result; then, downloading the resource to be downloaded from the address indicated by the resource download link may specifically include: if the second resource query result indicates that the IoT device has not locally stored a resource matching the resource information to be downloaded, then downloading the resource to be downloaded from the address indicated by the resource download link.

[0121] The resource information to be downloaded may include a resource identifier to be downloaded, so that when the IoT device does not store a resource (eg, a small program) indicated by a resource identifier locally, the resource can be automatically downloaded based on the dynamic resource update solution of the embodiment of this specification.

[0122] In addition, in at least some embodiments, the resource information to be downloaded may include not only the identifier of the resource to be downloaded, but also the identifier of the version of the resource to be downloaded. As a result, when the IoT device locally stores an earlier version (e.g., version 1.0) of a resource (e.g., applet a1) indicated by a resource identifier, the dynamic resource update solution of the embodiment of this specification can be used to update the existing version of the resource so that the user can obtain the latest version (e.g., version 2.0) of the resource when accessing it.

[0123] Optionally, the resource update task may include a rollback task. The task information may include second task type information and resource information to be rolled back; the second task type information is used to indicate that the resource update task is a rollback task; the resource information to be rolled back includes a resource identifier to be rolled back and a resource version identifier to be rolled back. Executing the resource update task according to the task information may specifically include: rolling back the resource locally stored in the IoT device corresponding to the resource information to be rolled back to a resource of a specified version; the specified version is a version before the resource version to be rolled back.

[0124] Specifically, when the resource update task is a rollback task, it is possible to query whether the resource indicated by the resource information to be rolled back exists locally on the IoT device based on the resource information to be rolled back in the task information; if it exists, the resource indicated by the resource information to be rolled back can be rolled back to the previous version. For example, if not specifically specified, it can be rolled back to the previous version of the resource version to be rolled back. For another example, in a specifically specified case, if the task information carries a rollback target version identifier, it can be rolled back to the resource version corresponding to the rollback target version identifier.

[0125] Optionally, the resource update task may include a reset task. The task information may include third task type information and resource information to be reset; the third task type information is used to indicate that the resource update task is a reset task. The executing the resource update task according to the task information specifically includes: resetting the resources corresponding to the resource information to be reset stored locally in the IoT device to the initial version of the resources built into the target application.

[0126] The resource information to be reset may include a resource identifier to be reset. Thus, based on the reset task, the resource corresponding to the resource identifier to be reset stored locally in the IoT device can be reset to an initial version. In actual application, this solution can be used to reset a resource running on a large number of IoTs.

[0127] In addition, in at least some embodiments, the resource information to be reset may include not only the resource identifier to be reset, but also the resource version identifier to be reset. As a result, if the IoT device locally stores a resource (e.g., applet a1) of the version indicated by the resource version identifier to be reset (e.g., version 3.0), the resource of the specified version is reset. In actual application, this solution can be used to reset a resource that only runs a specified version on a large number of IoT devices.

[0128] In actual application, in the local IoT device, on the one hand, the resource itself can be stored in the local resource library, and on the other hand, the metadata of the resource can be stored in the database engine file (for example, sqlite). Among them, the metadata of the resource can include resource information (for example, resource identifier, resource version identifier, resource name, etc.), resource download link, resource local storage path and other information. Then, when a resource update task is received, it can be queried first whether the database engine file stores resource metadata matching the resource information updated by the resource update task, and determine whether to execute the subsequent resource update process or end the process based on the query result.

[0129] Alternatively, a disk cache mechanism such as Disk LRU Cache can be used to manage the resources stored in the local resource library, so as to provide convenience for users to access the latest resources through the local resource library while trying to control the computer resource consumption of the local resource library and improve resource storage efficiency. The working principle of Disk LRU Cache is to use the Least Recently Used (LRU) algorithm to manage cache files on the disk. When the cache number reaches the specified maximum number, the longest unused resources will be removed to free up space.

[0130] In one or more embodiments of the present specification, the task query request sent by the IoT device to the server may also carry IoT device status information, wherein the IoT device status information is related to program resources used on the IoT device.

[0131] Optionally, the IoT device status information may include at least one of the application version identifier of the target application and the device type identifier of the IoT device. In an embodiment of the present specification, the device type identifier is used to identify the type of IoT device, that is, one device type identifier corresponds to a class of IoT devices. For example, the device type identifier of a face-swiping payment device may be xxxx, then the face-swiping payment devices of this device type (for example, tens of thousands of face-swiping payment devices of this type) are all identified as xxxx. For another example, the device type identifier of a container is yyyy, then the containers of this device type (for example, hundreds of containers of this type) are all identified as yyyy. Optionally, the IoT device status information may also include the operating system type, network connection type, geographic location information, etc. of the IoT device, but is not limited thereto.

[0132] In the resource update tasks published on the server, task matching conditions can be set, and these task matching conditions can correspond to the state information of the IoT device. For example, the task matching conditions can be set with application version range, device type range, operating system type range, network connection type range, geographic location range, etc. Thus, the server can filter out resource update tasks for updating program resources used on the IoT device from the resource update tasks published by the server according to the IoT device state information.

[0133] In actual application, for each resource, the process of matching tasks that meet the task matching conditions from the published resource update tasks according to the IoT device status information is relatively time-consuming. In related technologies, after the IoT device sends a task query request to the server, the task matching process will be executed for all resources bound to the device type information of the IoT device. Therefore, when the number of resources bound to the device type information of the IoT device is large, query timeout is likely to occur. Based on the solution of the embodiment of this specification, the IoT device maintains a list of resource identifiers corresponding to itself locally, and carries the resource identifier corresponding to itself in the task query request sent to the server. Then, when the server receives the task query request, it only needs to execute the task matching process for the resources indicated by the resource identifier corresponding to the IoT device itself carried in the request, which provides a solution for effectively controlling the number of task matches and can effectively avoid query timeouts.

[0134] And in fact, even for the same type of IoT devices, the resources actually used on different devices are usually not exactly the same. For example, for a face-scanning payment device (the device type identifier can be xxxx), the first face-scanning payment device placed in a supermarket scene may need to obtain resources related to supermarket shopping, while the second face-scanning payment device placed in a hotel and travel scene may need to obtain resources related to accommodation and travel scenes. In the related art, resource updates rely on the binding relationship between the device type identifier of the IoT device and the resources, which may lead to a large amount of resource waste. Based on the solution of the embodiments of this specification, since each IoT device carries the resource identifier of the resources it actually needs in the task query request sent to the server, it can only perform task queries and resource updates on the resources running by itself, reducing resource waste.

[0135] Figure 3 A flowchart of a method for sending task information provided in an embodiment of this specification.

[0136] From a program perspective, the execution subject of the process can be a program installed on the server side, specifically, it can be a program installed on a server corresponding to the application running on the IoT device.

[0137] like Figure 3 As shown, the process may include the following steps:

[0138] Step 302: receiving a task query request sent by an IoT device; the task query request carries at least one resource identifier; the resource identifier is used to identify program resources required for the target application on the IoT device to run;

[0139] Step 304: In response to the task query request, query the task information corresponding to the at least one resource identifier; the task information is used to describe a resource update task for updating resources identified by at least part of the resource identifiers in the at least one resource identifier; the task information includes the resource identifier of the resource that the resource update task is used to update;

[0140] Step 306: Send the task information to the IoT device so that the IoT device performs the resource update task according to the task information.

[0141] Specifically, the target application runs on the IoT device. When the IoT device sends a query request to the server, the query request can carry at least one resource identifier; then, the server can query the corresponding resource update task based on the at least one resource identifier carried in the query request. In actual application, if the server queries the resource update tasks corresponding to at least some of the at least one resource identifier, the task information corresponding to these resource update tasks can be returned to the IoT device that sent the task query request. If the server does not query the resource update task corresponding to any resource identifier in the at least one resource identifier, an empty task query result that does not contain any task information can be returned to the IoT device that sent the task query request.

[0142] For the parts of step 302 to step 306 that are consistent with the aforementioned step 202 to step 206, reference can be made to the above description of step 202 to step 206, and no further details will be given here.

[0143] based on Figure 3 The present specification also provides some improved implementation methods of the method, which are described below.

[0144] In one or more embodiments of the present specification, a resource update task may be pre-established and published on the server, so that when a task query request sent by an IoT device is received, task matching and feedback are performed from the published tasks.

[0145] Specifically, before receiving the task query request sent by the IoT device, it may also include: receiving task configuration information for a specified resource, wherein the task configuration information includes resource information of the specified resource; then, establishing a resource update task corresponding to the task configuration information; thereafter, publishing the resource update task so that the task information corresponding to the resource update task is in a state that can be obtained by the IoT device, and the task information may include the resource information. The resource information may include a resource identifier. Optionally, the resource information may also include a resource version identifier;

[0146] The task configuration information may be information input by a business person in a business terminal for configuring a resource update task. Specifically, the task configuration information may include task type information and resource information. The task type information may be used to reflect the specific type of the resource update task, and may include resource delivery task type, rollback task type, reset task type, etc. The resource information may at least include a resource identifier; a resource may have multiple different versions, so the resource information may also include a resource version identifier.

[0147] Optionally, the task configuration information may also include a task matching condition. The task matching condition may be used to specifically indicate the coverage of the resource update task. Specifically, the task matching condition may include conditions that the IoT device or target application that can obtain the resource update task should meet. For example, it may include, for example, an application version range, a device type range, an operating system type range, a network connection type range, a geographic location range, etc., but is not limited thereto.

[0148] In actual application, the resource update task can be set according to the aforementioned task matching conditions. The task information of a resource update task can be specifically determined based on the task configuration information of the resource update task. Therefore, the resource information in the task information is the same as the resource information in the task configuration information. In addition, in the resource delivery scenario, the task information can also include resource acquisition information, such as a resource acquisition link.

[0149] Optionally, in response to the task query request, querying the task information corresponding to the at least one resource identifier may specifically include: obtaining the task information of the first resource update task that the Internet of Things device needs to execute based on the at least one resource identifier; the first resource update task is used to update the program resources on the Internet of Things device.

[0150] In actual application, task matching conditions may not be set in the resource update task. Then, when the server receives the task query request sent by the IoT device, it can query the resource update task for updating the resources indicated by these resource identifiers based on the resource identifiers carried in the request and return it to the IoT device that sent the request.

[0151] Optionally, the task query request also carries IoT device status information related to program resources used on the IoT device; in response to the task query request, querying the task information corresponding to the at least one resource identifier, which may specifically include: obtaining task information of a second resource update task that needs to be executed by the IoT device based on the IoT device status information and the at least one resource identifier; the second resource update task is used to update the program resources on the IoT device.

[0152] In actual application, one or more task matching conditions can be set in the resource update task. Then, when the server receives the task query request sent by the IoT device, it can first query the resource update task (called the first resource update task) for updating the resources indicated by these resource identifiers based on the resource identifier carried in the request; then, based on the IoT device status information carried in the request, it can determine whether the IoT device status information meets the task matching conditions of each task in the first resource update task, and return the resource update task (called the second resource update task) hit by the IoT device status information to the IoT device that sent the request.

[0153] In one or more embodiments of the present specification, the IoT device status information may include information corresponding to the task matching condition. Assuming that the task matching condition may include conditions such as application version range, device type range, operating system type range, network connection type range, and geographic location range, then the IoT device status information may include application version identification, device type information, operating system type information, network connection type information, and geographic location information. Optionally, the IoT device status information includes at least one of the application version identification of the target application and the device type identification of the IoT device.

[0154] In one or more embodiments of the present specification, the client can pull tasks from the server by periodic polling based on the heartbeat mechanism. The receiving of the task query request sent by the IoT device specifically includes: receiving the task query request sent by the IoT device according to a preset polling period.

[0155] In one or more embodiments of the present specification, tasks can be pushed from the server to the client based on a message push mechanism (i.e., a push mechanism). Specifically, the target application can register a listener to receive real-time message pushes from the server, and these push messages can include events for indicating established resource update tasks, so that the target application can send task query requests to the client in a timely manner to pull newly established tasks. In actual applications, message push can be implemented through cloud push or a specific event subscription interface (such as HTTP callback).

[0156] Specifically, before receiving the task query request sent by the Internet of Things device, it may also include: sending a push message to the Internet of Things device, and the push message is used to instruct the Internet of Things device to send a task query request to the server; then, receiving the task query request sent by the Internet of Things device may specifically include: receiving the task query request sent by the Internet of Things device in response to the push message.

[0157] The various technical features in the above embodiments can be combined arbitrarily as long as there is no conflict or contradiction between the combinations of features. However, due to space limitations, they are not described one by one. Therefore, any combination of the various technical features in the above embodiments also falls within the scope of this specification.

[0158] According to the above description, the present specification provides a flowchart of a dynamic resource update process of an IoT device in an actual application scenario, such as Figure 4 shown.

[0159] like Figure 4 As shown, in the first stage, task deployment may be performed on the server (step 402), specifically, a resource update task may be created and published.

[0160] In the second stage, on the IoT device, after the main process of the application is started (step 404), the locally maintained resource identifiers can be queried (step 406). Specifically, an ordered list of maxSize=m can be established, and the resource identifier sequence saved in the local file can be read to load into the ordered list; wherein m can be the maximum number of resources that the server can process within the gateway timeout period; wherein the resource identifier sequence saved in the local file can be obtained by persistently storing the resource identifier sequence in the cached ordered list after the application was opened the last time. Then, the heartbeat I can be started (step 408), and based on the resource identifier sequence obtained in the ordered list, a first task query request can be sent to the server (step 410).

[0161] In response to the first task query request, the server may match tasks according to the resource identification sequence carried in the request (step 412). If the server finds a matching task, it returns the task to the IoT device that initiated the request (step 414). If the server does not find a matching task, it returns an empty query result to the IoT device.

[0162] After the IoT device receives the task returned by the server, it can perform resource updates according to the task information (step 416) and store the update results in the resource library (step 418). Taking the task of resource delivery as an example, in step 416, the resource identifier (resID) and resource version identifier (resVersion) can be parsed from the resource delivery task; then, it is determined whether the resource corresponding to the (resID, resVersion) is stored in the local resource library; if not, the resource download is started, and the downloaded resource is stored after the download is completed. In actual application, as an example, the metadata of the downloaded resource (for example, resource identifier, resource version identifier, resource name, resource download link, resource local storage location, etc.) can be written into a database management engine such as sqlite, and the Disk Lru Cache library can be used to save the resource data packet. For example, the Disk LruCache library can only retain the most recent one or several resource data packets for task rollback, and the earlier data packets can be cleared to reduce the occupation of the local storage space of the IoT device.

[0163] Optionally, the IoT device may register a monitoring task with the server in advance, so that when the server releases a new task, it may send a push message to the IoT device, and after the IoT device monitors the push message (step 420), it may immediately initiate a first task query request (step 410). In view of this, after the resource update task is released, the resource update on the IoT device can be timely and efficiently realized.

[0164] In the third stage, on the IoT device, when a business party calls the target resource (step 422), such as opening a small program or a light application, the resource identifier corresponding to the target resource will be passed in. Optionally, a resource version identifier corresponding to the resource identifier of the target resource may also be passed in. At this time, the locally cached resource identifier list can be updated based on the passed in resource identifier (resID).

[0165] Furthermore, in response to the call to the target resource, information indicating that the resource is loading may be displayed (step 424, for example, a loading pop-up window may be displayed), and a query may be made as to whether the target resource is stored in the local resource library (step 426). Specifically, if only the resource identifier is passed in when the resource is called, a query may be made as to whether there is a resource corresponding to the resource identifier; if both the resource identifier and the resource version identifier are passed in when the resource is called, a query may be made as to whether there is a resource corresponding to both the resource identifier and the resource version identifier.

[0166] If the target resource is found from the local resource library (step 428), the target resource is loaded (step 430), for example, the page of the mini-program or light application is rendered; if the target resource is not found from the local resource library, a second task query request is initiated to the server (step 432), and the second task query request may carry the resource identifier of the target resource. Thereafter, the process of step 412, step 414, step 416, and step 418 may be continued.

[0167] In actual application, after receiving a call request for a target resource, while querying the target resource locally, a timeout timer can be started (step 434), and the local resource library can be continuously queried for the target resource within the timeout period. Afterwards, if the target resource is queried within the timeout period, the resource is loaded (step 430) and the timer is canceled; if the target resource is not queried within the timeout period, the timer is canceled and a loading failure is displayed (step 436).

[0168] Based on the aforementioned scheme of the embodiments of this specification, the IoT device locally maintains the resource identification sequence of the resources used when its own application is running. Therefore, when the IoT device can send a task query request carrying the resource identification to the server, the server can determine the task to be matched based on the resource identification carried in the task query request. Therefore, on the first hand, there is no need for the server to maintain the binding relationship between the device type information of the IoT device and the resources. When a new device is added or the existing device is upgraded, there is no need to update the binding relationship or re-issue the resource update task; on the second hand, there is no need for the server to perform task matching on all resources bound to the device type information of the IoT device, but task matching can be performed on the resources required by each IoT device itself and carried with the identification in the task query request, which greatly saves the computer resources used by the server for task matching, the network resources used for task information transmission, and the computer and network resources used by the IoT device for downloading and storage; on the third hand, the number of resources requested for task matching can be conveniently controlled by controlling the length of the locally maintained resource identification list, thereby avoiding the problem of gateway query timeout caused by a large number of resources to be queried.

[0169] In at least some embodiments of the present specification, the resources running in the target application on the IoT device may include resources with clear resource callers, such as applets, light applications, and some bundle resources. For such resources, when the resources are called, the resource identifier of the called resource can be stored in a local resource identifier list for use when performing resource update task queries.

[0170] In addition, in actual applications, the resources running in the target application on the IoT device may also include some resources without a clear resource caller, such as H5 resources, TEXT resources, ZIP resources, etc. For such resources, it is difficult to obtain the corresponding resource identifier when they are called. In this case, such resources can still be queried and updated according to the task query request based on the device type identifier in the relevant technology. Figure 4 As shown in, after the main process of the application is started (step 404), heartbeat II can also be started (step 438), and a third task query request is sent to the server (step 440). The third task query request can be used to query for update tasks for resources that do not have a clear resource caller.

[0171] In view of this, in at least some embodiments of this specification, resources can be divided into two categories. For one type of resources with a clear resource caller, a first task query request can be sent to the server, carrying the resource identifier of the resource required by the IoT device itself, to achieve on-demand pulling; for another type of resources that do not have a clear resource caller, a third task query request can be sent to the server, carrying the device type information of the IoT device, and the server determines all resources bound to the device type information based on the binding relationship between the device type information and the resource, and then performs task matching on these determined resources. And in actual application, the first task query request and the second task query request can be controlled by independent heartbeats.

[0172] It should be noted that even if only some resources in the IoT devices (resources with clear resource callers) are pulled by resource identification and updated on demand, the pressure on the server to match tasks can be greatly alleviated and the probability of gateway query timeout can be reduced; and, at least partially, the problem of scenario-based on-demand pulling of IoT devices can be solved, reducing the waste of resources caused by full-scale pulling.

[0173] Based on the same idea, the embodiments of this specification also provide a device corresponding to the above method.

[0174] Figure 5 The embodiments of this specification provide corresponding to Figure 2 A structural schematic diagram of a resource updating device.

[0175] like Figure 5 As shown, the device is applied to IoT devices and may include:

[0176] The request sending module 502 is used to send a task query request to the server; the task query request carries at least one resource identifier; the resource identifier is used to identify the program resources required for the target application on the IoT device to run;

[0177] The task information receiving module 504 is used to receive the task information returned by the server based on the query of the at least one resource identifier; the task information is used to describe the resource update task for updating the resources identified by at least part of the resource identifiers in the at least one resource identifier; the task information includes the resource identifier of the resource that the resource update task is used to update;

[0178] The resource updating module 506 is used to execute the resource updating task according to the task information.

[0179] based on Figure 5 The present specification also provides some specific implementation plans of the method, which are described below.

[0180] Optionally, the number of the at least one resource identifier is less than or equal to a preset number; the preset number is the maximum number of resources that the server can process within a gateway timeout period.

[0181] Optionally, the resource updating device further includes a first resource identifier acquisition module, which is used to, before sending the task query request to the server, acquire a first resource identifier in a resource identifier list corresponding to the IoT device; wherein the number of resource identifiers that can be accommodated in the resource identifier list is less than or equal to the preset number. Accordingly, the request sending module 502 is specifically used to: send a task query request carrying the first resource identifier to the server.

[0182] Optionally, the resource updating device further includes a second resource identifier acquisition module, which is used to, before sending the task query request to the server, filter out second resource identifiers whose number is less than or equal to the preset number from the resource identifier list corresponding to the IoT device according to a preset resource identifier screening rule. Accordingly, the request sending module 502 is specifically used to: send a task query request carrying the second resource identifier to the server.

[0183] Optionally, the resource represented by the at least one resource identifier is a resource that has been called on the Internet of Things device.

[0184] Optionally, the at least one resource identifier is included in a resource identifier list corresponding to the Internet of Things device; the resource updating device is also used to: obtain a call request for a target resource, the call request carrying a target resource identifier of the target resource; and in response to the call request, add or update the target resource identifier in the resource identifier list.

[0185] Optionally, the resource update device is also used to: obtain a call request for a target resource; the call request carries target resource information of the target resource; in response to the call request, query whether the Internet of Things device locally stores the target resource that matches the target resource information, and obtain a first resource query result; if the first resource query result indicates that the Internet of Things device locally stores the target resource that matches the target resource information, then load the target resource.

[0186] Optionally, the resource update device is also used to: if the first resource query result indicates that the IoT device does not locally store the target resource that matches the target resource information, then send a second task query request to the server; carry the resource identifier of the target resource in the second task query request; receive a resource download link returned by the server based on the resource identifier of the target resource; and download the target resource from the address indicated by the resource download link.

[0187] Optionally, the resource updating device further includes a message receiving module, which is used to receive a push message sent by the server before sending the task query request to the server; the push message is used to instruct the IoT device to send the task query request to the server. Accordingly, the request sending module 502 is specifically used to: send the task query request to the server in response to the push message.

[0188] Optionally, the task information includes first task type information and a resource download link; the first task type information is used to indicate that the resource update task is a resource delivery task; the resource update module 506 is specifically used to: download the resource to be downloaded from the address indicated by the resource download link; and store the resource to be downloaded locally on the Internet of Things device.

[0189] Optionally, the task information also includes the resource information to be downloaded of the resource to be downloaded; before downloading the resource to be downloaded from the address indicated by the resource download link, it also includes: determining whether the IoT device has locally stored a resource matching the resource information to be downloaded, and obtaining a second resource query result. The downloading of the resource to be downloaded from the address indicated by the resource download link specifically includes: if the second resource query result indicates that the IoT device does not have locally stored a resource matching the resource information to be downloaded, then downloading the resource to be downloaded from the address indicated by the resource download link.

[0190] Optionally, the task information includes second task type information and resource information to be rolled back; the second task type information is used to indicate that the resource update task is a rollback task; the resource information to be rolled back includes a resource identifier to be rolled back and a resource version identifier to be rolled back; the resource update module 506 is specifically used to: roll back the resources corresponding to the resource information to be rolled back and stored locally on the Internet of Things device to a specified version of the resource; the specified version is a version before the resource version to be rolled back.

[0191] Optionally, the task information includes third task type information and resource information to be reset; the third task type information is used to indicate that the resource update task is a reset task; the resource update module 506 is specifically used to: reset the resources corresponding to the resource information to be reset stored locally in the Internet of Things device to the initial version of the resources built into the target application.

[0192] Optionally, the task query request carries IoT device status information; the IoT device status information includes at least one of an application version identifier of the target application and a device type identifier of the IoT device.

[0193] Optionally, the program resources include at least one of a mini-program or a light application.

[0194] The above is a schematic scheme of a resource updating device of this embodiment. It should be noted that the technical scheme of the resource updating device and the technical scheme of the resource updating method described above are of the same concept, and the details not described in detail in the technical scheme of the resource updating device can be found in the description of the technical scheme of the resource updating method described above.

[0195] Figure 6 The embodiments of this specification provide corresponding to Figure 3 A structural diagram of a device for sending task information.

[0196] like Figure 6 As shown, the device is applied to a server and may include:

[0197] The request receiving module 602 is used to receive a task query request sent by an IoT device; the task query request carries at least one resource identifier; the resource identifier is used to identify the program resources required for the target application on the IoT device to run;

[0198] The task matching module 604 is used to query the task information corresponding to the at least one resource identifier in response to the task query request; the task information is used to describe the resource update task for updating the resources identified by at least part of the resource identifiers in the at least one resource identifier; the task information includes the resource identifier of the resource that the resource update task is used to update;

[0199] The task information sending module 606 is used to send the task information to the IoT device so that the IoT device executes the resource update task according to the task information.

[0200] based on Figure 6 The present specification also provides some specific implementation plans of the method, which are described below.

[0201] Optionally, the device for sending task information also includes a task publishing module, which is used to: receive task configuration information for a specified resource, the task configuration information including resource information of the specified resource; establish a resource update task corresponding to the task configuration information; publish the resource update task so that the task information corresponding to the resource update task is in a state that can be obtained by an Internet of Things device; the task information includes the resource information.

[0202] Optionally, the task matching module 604 is specifically used to: obtain task information of a first resource update task that the IoT device needs to execute according to the at least one resource identifier; the first resource update task is used to update program resources on the IoT device.

[0203] Optionally, the task query request also carries IoT device status information related to the program resources used on the IoT device; the task matching module 604 is specifically used to: obtain task information of a second resource update task that needs to be executed by the IoT device based on the IoT device status information and the at least one resource identifier; the second resource update task is used to update the program resources on the IoT device.

[0204] Optionally, the IoT device status information includes at least one of an application version identifier of the target application and a device type identifier of the IoT device.

[0205] Optionally, the device for sending task information further includes a push information sending module, which is used to send a push message to the IoT device; the push message is used to instruct the IoT device to send a task query request to the server. The request receiving module 602 is specifically used to: receive the task query request sent by the IoT device in response to the push message.

[0206] It is understood that the above modules refer to computer programs or program segments for executing one or more specific functions. In addition, the distinction between the above modules does not mean that the actual program codes must also be separated.

[0207] The above is a schematic scheme of a device for sending task information of this embodiment. It should be noted that the technical scheme of the device for sending task information and the technical scheme of the method for sending task information described above are of the same concept, and the details of the technical scheme of the device for sending task information that are not described in detail can be found in the description of the technical scheme of the method for sending task information described above.

[0208] Based on the same idea, the embodiments of this specification also provide a device corresponding to the above method.

[0209] Figure 7 The embodiments of this specification provide corresponding to Figure 2 A schematic diagram of the structure of an Internet of Things device.

[0210] like Figure 7 As shown, the device 700 may include:

[0211] at least one processor 710; and,

[0212] A memory 730 in communication with the at least one processor; wherein,

[0213] 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:

[0214] Sending a task query request to a server; the task query request carries at least one resource identifier; the resource identifier is used to identify the program resources required for the target application on the IoT device to run;

[0215] Receive task information returned by the server based on the query of the at least one resource identifier; the task information is used to describe a resource update task for updating resources identified by at least some of the at least one resource identifier; the task information includes resource identifiers of resources that the resource update task is used to update;

[0216] The resource update task is executed according to the task information.

[0217] The above is a schematic scheme of a computing device of this embodiment. It should be noted that the technical scheme of the computing device and the technical scheme of the resource updating method described above are of the same concept, and the details not described in detail in the technical scheme of the computing device can be found in the description of the technical scheme of the resource updating method described above.

[0218] Based on the same idea, the embodiments of this specification also provide a device corresponding to the above method.

[0219] Figure 8 The embodiments of this specification provide corresponding to Figure 3 A schematic diagram of the structure of a server.

[0220] like Figure 8 As shown, the device 800 may include:

[0221] at least one processor 810; and,

[0222] A memory 830 in communication with the at least one processor; wherein,

[0223] 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:

[0224] Receive a task query request sent by an IoT device; the task query request carries at least one resource identifier; the resource identifier is used to identify program resources required for running a target application on the IoT device;

[0225] In response to the task query request, query the task information corresponding to the at least one resource identifier; the task information is used to describe a resource update task for updating resources identified by at least part of the resource identifiers in the at least one resource identifier; the task information includes the resource identifier of the resource that the resource update task is used to update;

[0226] The task information is sent to the IoT device so that the IoT device performs the resource update task according to the task information.

[0227] The above is a schematic scheme of a computing device of this embodiment. It should be noted that the technical scheme of the computing device and the technical scheme of the method for sending task information above belong to the same concept, and the details not described in detail in the technical scheme of the computing device can be referred to the description of the technical scheme of the method for sending task information above.

[0228] Each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other. Each embodiment focuses on the differences from other embodiments. In particular, for the device and equipment embodiments, since they are basically similar to the method embodiments, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiments. The devices, equipment and methods provided in the embodiments of this specification correspond to each other, so the devices and equipment also have beneficial technical effects similar to the corresponding methods. Since the beneficial technical effects of the methods have been described in detail above, the beneficial technical effects of the corresponding devices and equipment will not be repeated here.

[0229] The above describes specific embodiments of the present application. 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 accompanying 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.

[0230] In the 1990s, improvements to a technology could be clearly distinguished as hardware improvements (for example, improvements to the circuit structure of diodes, transistors, switches, etc.) or software improvements (improvements to the method flow). However, with the development of technology, many improvements to the method flow today can be regarded as direct improvements to 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 an improvement in a method flow cannot be implemented using a hardware entity module. 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 a chip manufacturer to design and produce a dedicated integrated circuit chip. 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 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.

[0231] The controller can be implemented in any appropriate manner, for example, the controller can take the form of a microprocessor or processor and a computer-readable medium storing a computer-readable program code (such as software or firmware) that can be executed 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 controllers include, but are not limited to, the following microcontrollers: ARC 625D, Atmel AT91SAM, Microchip PIC18F26K20, and Silicone Labs C8051F320. The memory controller can also be implemented as part of the control logic of the memory. Those skilled in the art also know that in addition to implementing the controller in a purely computer-readable program code manner, the controller can 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, this controller can be considered as a hardware component, and the devices included therein for implementing various functions can also be regarded as structures within the hardware component. Or even, the devices for implementing various functions can be regarded as both software modules for implementing the method and structures within the hardware component.

[0232] 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.

[0233] 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.

[0234] Those skilled in the art will appreciate 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. Moreover, 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.

[0235] 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.

[0236] 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.

[0237] 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.

[0238] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.

[0239] The 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. The memory is an example of a computer-readable medium.

[0240] 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 herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.

[0241] 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.

[0242] 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.

[0243] 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 update method, applied to an IoT device, comprising: Send a task query request to the server; The task query request carries at least one resource identifier; The resource identifier is used to identify the program resources required for the target application on the IoT device to run; Receiving the task information returned by the server and queried based on the at least one resource identifier; The task information is used to describe a resource update task for updating resources identified by at least some of the resource identifiers in the at least one resource identifier; The task information includes a resource identifier of a resource used to be updated by the resource update task; The resource update task is executed according to the task information.

2. The method of claim 1, wherein: The number of the at least one resource identifier is less than or equal to a preset number; the preset number is the maximum number of resources that the server can process within the gateway timeout period.

3. The method according to claim 2, before sending the task query request to the server, further comprising: Obtaining a first resource identifier in a resource identifier list corresponding to the Internet of Things device; wherein the number of resource identifiers that can be accommodated in the resource identifier list is less than or equal to the preset number; The sending of the task query request to the server specifically includes: Sending a task query request carrying the first resource identifier to the server.

4. The method according to claim 2, before sending the task query request to the server, further comprising: According to a preset resource identifier screening rule, screening out second resource identifiers whose number is less than or equal to the preset number from the resource identifier list corresponding to the Internet of Things device; The sending of the task query request to the server specifically includes: Send a task query request carrying the second resource identifier to the server.

5. In the method as claimed in claim 1, the resource represented by the at least one resource identifier is a resource that has been called on the IoT device.

6. The method of claim 5, wherein the at least one resource identifier is included in a resource identifier list corresponding to the IoT device; the method further comprising: Get the call request for the target resource; The calling request carries a target resource identifier of the target resource; In response to the call request, the target resource identifier is added or updated in the resource identifier list.

7. The method of claim 1, further comprising: Get the call request for the target resource; The calling request carries the target resource information of the target resource; In response to the call request, query whether the target resource matching the target resource information is stored locally on the IoT device to obtain a first resource query result; If the first resource query result indicates that the target resource matching the target resource information is locally stored in the IoT device, the target resource is loaded.

8. The method according to claim 7, after obtaining the first resource query result, further comprising: If the first resource query result indicates that the IoT device does not locally store the target resource matching the target resource information, sending a second task query request to the server; The second task query request carries the resource identifier of the target resource; Receiving a resource download link returned by the server and queried based on the resource identifier of the target resource; The target resource is downloaded from the address indicated by the resource download link.

9. The method according to claim 1, before sending the task query request to the server, further comprising: Receive push messages sent by the server; The push message is used to instruct the IoT device to send a task query request to the server; The sending of the task query request to the server specifically includes: In response to the push message, a task query request is sent to the server.

10. The method according to claim 1, wherein the task information includes first task type information and a resource download link; The first task type information is used to indicate that the resource update task is a resource delivery task; and executing the resource update task according to the task information specifically includes: Download the resource to be downloaded from the address indicated by the resource download link; The resource to be downloaded is stored locally on the IoT device.

11. The method according to claim 10, wherein the task information further includes resource information of the resource to be downloaded; before downloading the resource to be downloaded from the address indicated by the resource download link, the method further comprises: Determine whether the IoT device has locally stored resources matching the resource information to be downloaded, and obtain a second resource query result; The downloading of the resource to be downloaded from the address indicated by the resource download link specifically includes: If the second resource query result indicates that the IoT device does not locally store the resource to be downloaded that matches the resource information to be downloaded, the resource to be downloaded is downloaded from the address indicated by the resource download link.

12. The method according to claim 1, wherein the task information includes second task type information and information about resources to be rolled back; the second task type information is used to indicate that the resource update task is a rollback task; The resource information to be rolled back includes a resource identifier to be rolled back and a resource version identifier to be rolled back; and executing the resource update task according to the task information specifically includes: Rolling back the resources corresponding to the to-be-rolled-back resource information stored locally on the IoT device to resources of a specified version; The specified version is a version before the resource version to be rolled back.

13. The method according to claim 1, wherein the task information includes third task type information and information about resources to be reset; the third task type information is used to indicate that the resource update task is a reset task; and executing the resource update task according to the task information specifically comprises: The resources corresponding to the resource information to be reset and stored locally in the IoT device are reset to the initial version of the resources built into the target application.

14. The method of claim 1, wherein: The task query request carries IoT device status information; the IoT device status information includes at least one of an application version identifier of the target application and a device type identifier of the IoT device.

15. The method according to any one of claims 1 to 14, wherein: The program resources include at least one of a mini-program or a light application.

16. A method for sending task information, applied to a server, comprising: Receive task query requests sent by IoT devices; The task query request carries at least one resource identifier; The resource identifier is used to identify the program resources required for the target application on the IoT device to run; In response to the task query request, querying task information corresponding to the at least one resource identifier; The task information is used to describe a resource update task for updating resources identified by at least some of the resource identifiers in the at least one resource identifier; The task information includes a resource identifier of a resource used to be updated by the resource update task; The task information is sent to the IoT device so that the IoT device performs the resource update task according to the task information.

17. The method according to claim 16, before receiving the task query request sent by the IoT device, further comprising: Receiving task configuration information for a specified resource, wherein the task configuration information includes resource information of the specified resource; Establishing a resource update task corresponding to the task configuration information; The resource update task is published so that the task information corresponding to the resource update task is in a state that can be obtained by the Internet of Things device; the task information includes the resource information.

18. The method of claim 16, wherein in response to the task query request, querying the task information corresponding to the at least one resource identifier specifically comprises: Acquire task information of a first resource update task that the Internet of Things device needs to execute according to the at least one resource identifier; The first resource update task is used to update program resources on the Internet of Things device.

19. The method of claim 16, wherein the task query request further carries IoT device status information related to program resources used on the IoT device; and the step of responding to the task query request and querying task information corresponding to the at least one resource identifier specifically comprises: Acquire task information of a second resource update task that needs to be executed by the Internet of Things device according to the Internet of Things device state information and the at least one resource identifier; The second resource update task is used to update the program resources on the Internet of Things device.

20. The method of claim 19, wherein: The IoT device status information includes at least one of an application version identifier of the target application and a device type identifier of the IoT device.

21. The method according to claim 16, before receiving the task query request sent by the IoT device, further comprising: Send push messages to IoT devices; The push message is used to instruct the IoT device to send a task query request to the server; The receiving of the task query request sent by the IoT device specifically includes: Receive a task query request sent by the IoT device in response to the push message.

22. A resource updating device, applied to an Internet of Things device, comprising: A request sending module is used to send a task query request to the server; The task query request carries at least one resource identifier; The resource identifier is used to identify the program resources required for the target application on the IoT device to run; A task information receiving module, used for receiving the task information returned by the server and queried based on the at least one resource identifier; The task information is used to describe a resource update task for updating resources identified by at least some of the resource identifiers in the at least one resource identifier; the task information includes resource identifiers of resources that the resource update task is used to update; The resource updating module is used to execute the resource updating task according to the task information.

23. A device for sending task information, applied to a server, comprising: A request receiving module, used to receive a task query request sent by an IoT device; The task query request carries at least one resource identifier; The resource identifier is used to identify the program resources required for the target application on the IoT device to run; A task matching module, configured to query task information corresponding to the at least one resource identifier in response to the task query request; The task information is used to describe a resource update task for updating resources identified by at least some of the resource identifiers in the at least one resource identifier; the task information includes resource identifiers of resources that the resource update task is used to update; The task information sending module is used to send the task information to the Internet of Things device so that the Internet of Things device performs the resource update task according to the task information.

24. An Internet of Things 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: Sending a task query request to a server; the task query request carries at least one resource identifier; the resource identifier is used to identify the program resources required for the target application on the IoT device to run; Receive task information returned by the server based on the query of the at least one resource identifier; the task information is used to describe a resource update task for updating resources identified by at least some of the at least one resource identifier; the task information includes resource identifiers of resources that the resource update task is used to update; The resource update task is executed according to the task information.

25. 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: Receive a task query request sent by an IoT device; the task query request carries at least one resource identifier; the resource identifier is used to identify program resources required for running a target application on the IoT device; In response to the task query request, query the task information corresponding to the at least one resource identifier; the task information is used to describe a resource update task for updating resources identified by at least part of the resource identifiers in the at least one resource identifier; the task information includes the resource identifier of the resource that the resource update task is used to update; The task information is sent to the IoT device so that the IoT device performs the resource update task according to the task information.