Robot resource acquisition method, device, robot, medium and electronic equipment
By comparing resource package information and application information, the robot downloads resource files on demand, solving the traffic and memory waste problems caused by the one-time distribution of resource files in the existing technology, and achieving more efficient resource management.
Patent Information
- Application Number
- CN202111662805.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-31
- Publication Date
- 2025-09-23
- Estimated Expiration
- 2041-12-31
AI Technical Summary
In the prior art, when updating robot resources, all resource files are sent as a compressed package at once, resulting in unnecessary traffic consumption and memory usage.
By comparing the file description information of the candidate resource files in the resource package information to be updated with the application information of the robot target application, the required resource files are determined and downloaded based on the file acquisition interface associated with the required resource files.
The robot can download resource files on demand, reducing unnecessary traffic consumption and memory usage.
Smart Images

Figure CN114385208B_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the field of computer application technology, and in particular to a robot resource acquisition method, device, robot, medium, and electronic device. Background Art
[0002] With the continuous development of artificial intelligence technology, more and more robots have entered the market to replace human labor and serve various fields. Resource files are the data foundation for the normal operation of robots. When updating the robot service version, the resource files currently used by the robot need to be updated.
[0003] Currently, when the current application software version of the robot is updated, all resource files will be compressed as a resource package and sent to the robot at one time. Summary of the Invention
[0004] The embodiments of the present application provide a robot resource acquisition method, device, robot, medium and electronic device, which can achieve the purpose of supporting the robot to download resource files on demand.
[0005] In a first aspect, an embodiment of the present application provides a method for acquiring robot resources, the method comprising:
[0006] Based on the application information of the target application in the robot, obtaining the resource package information to be updated of the target application, wherein the resource package information to be updated includes at least file description information and a file acquisition interface of two candidate resource files;
[0007] Determining a target file acquisition interface from the file acquisition interfaces of the candidate resource files according to the application information and the file description information;
[0008] Based on the target file acquisition interface, the target resource file is acquired.
[0009] In a second aspect, an embodiment of the present application provides a robot resource acquisition device, the device comprising:
[0010] A module for acquiring information about a resource package to be updated, configured to acquire information about a resource package to be updated of a target application based on application information of the target application in the robot, wherein the information about the resource package to be updated includes at least file description information and a file acquisition interface for two candidate resource files;
[0011] a target file acquisition interface determination module, configured to determine a target file acquisition interface from the file acquisition interfaces of the candidate resource files according to the application information and the file description information;
[0012] The target resource file acquisition module is used to acquire the target resource file based on the target file acquisition interface.
[0013] In a third aspect, an embodiment of the present application provides a robot, comprising: one or more processors; a memory for storing one or more programs; when the one or more programs are executed by the one or more processors, the one or more processors implement the robot resource acquisition method as described in the embodiment of the present application.
[0014] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the robot resource acquisition method as described in the embodiment of the present application.
[0015] In a fifth aspect, an embodiment of the present application provides an electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the robot resource acquisition method as described in the embodiment of the present application is implemented.
[0016] The technical solution provided by the embodiments of this application determines the required resource files by comparing the file description information of the candidate resource files in the resource package information to be updated with the application information of the target application in the robot. The target resource files are then obtained based on the file acquisition interface associated with the required resource files. This allows the robot to download resource files on demand, effectively reducing unnecessary data consumption and memory usage. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] Figure 1 This is a flowchart of a robot resource acquisition method provided in Example 1 of the present application;
[0018] Figure 2 This is a flowchart of another robot resource acquisition method provided in Example 2 of the present application;
[0019] Figure 3 This is a flowchart of another robot resource acquisition method provided in Example 3 of the present application;
[0020] Figure 4 This is a structural diagram of a robot resource acquisition device provided in Example 4 of the present application;
[0021] Figure 5 It is a structural diagram of an electronic device or robot provided in an embodiment of the present application. DETAILED DESCRIPTION
[0022] The present application will be further described in detail below with reference to the accompanying drawings and examples. It should be understood that the specific embodiments described herein are intended only to illustrate the present application and are not intended to limit the present application. It should also be noted that, for ease of description, the accompanying drawings only illustrate portions of the present application, not all of the structures.
[0023] Before discussing the exemplary embodiments in more detail, it should be mentioned that some exemplary embodiments are described as processes or methods depicted as flow charts. Although the flow charts describe the steps as sequential processes, many of the steps can be implemented in parallel, concurrently, or simultaneously. In addition, the order of the steps can be rearranged. The process can be terminated when its operation is completed, but can also have additional steps not included in the accompanying drawings. The process can correspond to a method, function, procedure, subroutine, subprogram, etc.
[0024] Example 1
[0025] Figure 1 This is a flowchart of a robot resource acquisition method provided in Example 1 of this application. This embodiment is applicable to situations where robot applications are updated. This method can be executed by the robot resource acquisition device provided in this embodiment of the application. This device can be implemented in software and / or hardware and can be integrated into the electronic equipment running this system, which can be installed on the robot.
[0026] like Figure 1 As shown, the robot resource acquisition method includes:
[0027] S110 . Based on application information of a target application in the robot, obtain resource package information to be updated of the target application, where the resource package information to be updated includes at least file description information and a file acquisition interface of two candidate resource files.
[0028] Multiple applications can be configured in a robot. The target application can be an application or its resource package that needs to be updated in the robot, or an application or its resource package that has been updated for a certain period of time, such as a food delivery app. Application information refers to information used to describe the properties of the application. Optionally, the application information includes at least one of the application type, application version, dependent resource files, and application identifier. The application type can correspond to the robot's business type. For example, the target application in a food delivery robot can be a food delivery app, and its application type is food delivery.
[0029] It is known that resource files need to be loaded during the running of an application, and the resource files that different applications rely on may be different.
[0030] The resource package information to be updated includes information about resource files related to the update of the robot application. The resource package information to be updated includes at least file description information and file acquisition interfaces of two candidate resource files. Among them, the file description information is information used to describe the basic attributes of the candidate resource file. Optionally, the file description information includes: file identifier, file size, information summary and at least one of the acquisition address. The file acquisition interface refers to the interface used to obtain the candidate resource file. Each candidate resource file has a corresponding file acquisition interface. For example, each candidate resource file has its corresponding API. Optionally, each file acquisition interface is associated with at least two resource files. This can reduce the number of interfaces and facilitate file management. Optionally, the file acquisition interface is also related to the application version. When the candidate resource file type is determined, for example, they are all voice files for completing meal pickup, but the application versions in the application information are different, and the requested file acquisition interfaces are different. The file acquisition interface encapsulates the resource file acquisition method corresponding to the corresponding application version.
[0031] Optionally, the multiple resource files associated with each file acquisition interface are adapted to different application versions respectively. The file description information of the resource files adapted to the current application version can be returned to the robot after being obtained through the file acquisition interface based on the application version information of the robot's target application.
[0032] According to the application information of the target application, the resource package information to be updated associated with the target application can be determined, and the resource package information to be updated of the target application can be obtained. Specifically, the file description information and file acquisition interface of the candidate resource files included in the resource package information to be updated can be requested. The holder of the resource package information to be updated of the target application is not limited here, and is determined according to the actual situation. Exemplarily, the holder of the resource package information to be updated can be a resource server or another robot. Taking into account data security and information transmission stability, it is preferred to request the resource package information to be updated of the target application from the resource server based on the application information of the target application in the robot.
[0033] S120: Determine a target file acquisition interface from the file acquisition interfaces of the candidate resource files according to the application information and the file description information.
[0034] Optionally, the application information includes file description information for the target application's resource files in the robot's local resource package. The local resource package refers to the resource package already acquired by the robot. The resource package information to be updated refers to the latest resource package corresponding to the target application in the resource server. The resource files corresponding to the resource files in the resource package to be updated may or may not be the same as the resource files in the local resource package.
[0035] According to the application information and file description information, specifically, according to the file description information of the candidate resource file in the resource package information to be updated and the file description information of the resource file in the local resource package of the robot, the target resource file is determined in the candidate resource file. Then, the target file acquisition interface corresponding to the target resource file is determined. Among them, the target file acquisition interface is associated with the target resource file, and the target resource file can be acquired based on the target file acquisition interface. Compared with directly downloading and acquiring the target resource file, this embodiment configures a corresponding acquisition interface for each target resource file, which facilitates the robot to download at a specific time according to the acquisition interface as needed.
[0036] S130: Acquire a target resource file based on the target file acquisition interface.
[0037] The target resource file is generated within the candidate resource file and is required for updating the resource file of the robot application. The target resource file is obtained using the target file acquisition interface. Specifically, the target resource file can be obtained by calling the target resource file acquisition method through the target file acquisition interface and using the corresponding acquisition path.
[0038] The technical solution provided by the embodiments of this application determines the required resource files by comparing the file description information of the candidate resource files in the resource package information to be updated with the application information of the target application in the robot. The target resource files are then obtained based on the file acquisition interface associated with the required resource files. This allows the robot to download resource files on demand, effectively reducing unnecessary data consumption and memory usage.
[0039] Example 2
[0040] Figure 2 This is a flowchart of another robot resource acquisition method provided in Example 2 of the present application. This embodiment is further optimized on the basis of the above embodiment. Specifically, the optimization is that the target file acquisition interface is determined from the file acquisition interface of the candidate resource file based on the application information and the file description information, including: comparing the information summary in the application information and the file description information to obtain a summary comparison result; if the summary comparison result is inconsistent, the corresponding candidate resource file is determined as the target resource file; and the file acquisition interface associated with the target resource file is determined as the target file acquisition interface.
[0041] like Figure 2 As shown, the robot resource acquisition method includes:
[0042] S210 . Based on application information of a target application in the robot, obtain resource package information to be updated of the target application, where the resource package information to be updated includes at least file description information and a file acquisition interface of two candidate resource files.
[0043] S220: Compare the application information with the information digest in the file description information to obtain a summary comparison result.
[0044] The message digest refers to information used to describe the content characteristics of the resource file. Optionally, the message digest can be extracted from the resource file using a message digest algorithm. A message digest algorithm is also known as a hash algorithm or a hash algorithm. After the resource file is processed by a hash function, a unique message digest can be obtained. Exemplarily, the message digest algorithm can be the MD5 message digest algorithm, and accordingly, the message digest is an MD5 value.
[0045] The information digest in the application information is compared with the information digest in the file description information. Specifically, the information digest of each resource file in the local resource package is compared with the information digest of the candidate resource file in the resource package information to be updated to obtain a summary comparison result.
[0046] S230: If the summary comparison result is inconsistent, the corresponding candidate resource file is determined as the target resource file.
[0047] The digest comparison result may or may not be consistent. If the digest comparison result is consistent, the resource file the robot has already obtained is the same as the candidate resource file corresponding to the information digest, and the robot does not need to obtain the candidate resource file again. If the digest comparison result is inconsistent, it indicates that the candidate resource file corresponding to the information digest is different from the resource file the robot has already obtained. This candidate resource file is the resource file required for the robot service version update and is determined as the target resource file.
[0048] Optionally, there can be multiple target resource files. Resource files serve as the data basis for the normal operation of the robot. When the current business version of the robot is updated, multiple resource files are often updated. For example, taking the guide robot as an example, when the current business version of the guide robot is updated, one or both of the navigation resources or voice resources of the guide robot may be updated. Among them, navigation resources may include navigation map files, positioning point files, and planned route files; voice resources may include arrival voice files, departure voice files, merchant phone files, and merchant picture files, etc.
[0049] S240: Determine the file acquisition interface associated with the target resource file as the target file acquisition interface.
[0050] The target resource file needs to be obtained through the file acquisition interface associated with it. Optionally, when the target resource file is determined, the target file acquisition interface is determined by the file acquisition interface associated with the target resource file based on the application version in the application information. For example, when the target resource file is a meal delivery route file, different application versions such as v1.9.0 and v1.8.0 need to call two different file acquisition interfaces to obtain the meal delivery route file.
[0051] S250: Acquire a target resource file based on the target file acquisition interface.
[0052] In an optional embodiment, obtaining the target resource file based on the target file acquisition interface includes: obtaining the current network status and the current working status; determining the target acquisition time of the target resource file based on the current network status, the current working status and the file size of the target resource file; and obtaining the target resource file from the resource server at the target acquisition time based on the target file acquisition interface.
[0053] The current network status refers to the robot's current network status. Optionally, the current network status includes at least one of network type, network connection status, and signal strength. The current operating status refers to the robot's current operating status. Optionally, the current operating status includes at least one of idle status, estimated task completion time, and remaining battery power.
[0054] The current network status and the file size of the target resource file will affect the download time of the resource file and the traffic charges generated by downloading the resource file. The target acquisition time of the target resource file is determined based on the current network status and current working status of the robot and the file size of the target resource file. Specifically, when the file size of the target resource file is larger than the preset file size, it is preferred to download the target resource file when the robot is connected to a WiFi (WIreless Fidelity) network with high signal strength and the robot is in an idle state. If the robot is in a non-idle state, it is preferred to use a background silent download method to avoid interrupting the robot's current work. When the target resource file is smaller than the preset file size, the current network status of the robot can be no longer considered. When the current working state of the robot is in a non-idle state, it is preferred to directly download the target resource file in a background silent download method. When the current working state of the robot is in an idle state, the target resource file can also be directly downloaded. Among them, the preset file size is determined according to actual business needs and is not limited here. The above technical solution takes into account the network traffic cost of downloading resource files and the robot's work efficiency, and comprehensively considers the current network status, current working status and file size of the target resource file to determine the target acquisition time of the target resource file. This can reduce network resource costs while avoiding interrupting the robot's current work, and optimize the robot's on-demand acquisition of resource files from a time dimension.
[0055] The technical solution provided in the embodiment of the present application compares the information digests in the application information and the file description information to obtain a summary comparison result; if the summary comparison result is inconsistent, the corresponding candidate resource file is determined as the target resource file; and the file acquisition interface associated with the target resource file is determined as the target file acquisition interface. Implementing the technical solution provided by the present application can avoid downloading duplicate resource files, which would waste network traffic and data storage space.
[0056] Example 3
[0057] Figure 3 This is a flowchart of another robot resource acquisition method provided in Example 3 of the present application. This embodiment is further optimized on the basis of the above embodiment. Specifically, before obtaining the resource package information to be updated of the target application based on the application information of the target application in the robot, the method further includes: generating a resource query request according to the application business type and the robot identifier; sending the resource query request to the resource server so that the resource server performs the following operations: in response to the resource query request, determining the target service store associated with the robot identifier in the candidate service stores; and determining the target application in the candidate applications associated with the target service store according to the application business type.
[0058] like Figure 3 As shown, the robot resource acquisition method includes:
[0059] S310: Generate a resource query request according to the application service type and the robot identifier.
[0060] The resource query request is generated by the robot to query for resources to be updated. The resource query request can be generated by the robot on a scheduled basis or in response to a resource update notification. The timing of generating the resource query request is not specified here and is determined based on actual circumstances.
[0061] Among them, the application business type is related to the type of robot. The type of robot can be determined according to the application environment of the robot and the work it performs. For example, robots can be divided into industrial robots, service robots and special robots according to the application environment. Furthermore, service robots can be divided into navigation robots, food delivery robots and disinfection robots according to the service content. Different types of robots rely on different resource files. Taking the guidance robot and the food delivery robot as an example, the guidance robot needs an arrival voice file, a departure voice file, a merchant phone file, and a merchant picture file, etc. The food delivery robot needs a voice file for prompting to pick up the food, a voice file for completing the food pickup, and a food delivery route file, etc.
[0062] The robot ID is the identifying information of the robot, which is used to distinguish different robots. For example, the robot ID can be the robot's SN (Serial Number), which can be used to determine the robot's service store.
[0063] S320. Send the resource query request to the resource server so that the resource server performs the following operations: in response to the resource query request, determine the target service store associated with the robot identifier among the candidate service stores; and determine the target application among the candidate applications associated with the target service store according to the application business type.
[0064] The resource query request is generated by the robot based on the application business type and robot identifier. The robot sends the resource query request to the resource server. The resource server is used to store and manage resource files. Optionally, resource files of different application business types are stored separately in the resource server based on the store dimension. It is understandable that the resource files used by robots of different business types working in the same service store may include common resource files and unique resource files. Common resource files are related to the service store and are resource files that all robots working in the same service store rely on. Exemplarily, common resources include map resource files and navigation resource files for the service store. Exemplarily, navigation resource files may include charging station location information and origin location information, etc. Storing resource files separately according to application business type based on the store dimension, instead of storing resource files as a whole based on the robot application version dimension, eliminates the need to recreate resource packages for certain robots when the business version needs to be upgraded, thereby improving the flexibility of resource file modification and the reuse of resource files.
[0065] In response to the resource query request, the resource server determines the target service store associated with the robot ID from the candidate stores based on the robot ID in the resource query request. The candidate service stores may include all robot service stores, robot service stores owned by a specific customer, or robot service stores within a specific region. Each robot is associated with its service store, so the robot ID can be used to determine the corresponding target service store. For example, a candidate service store may be a hotel, restaurant, or shopping mall.
[0066] Candidate applications refer to applications or their resource files that may be used by various types of robots operating in a target service store. Based on the application's business type, the target application is determined from the candidate applications associated with the target service store. This involves identifying resource files associated with the target application type from the resource files associated with the target service store. Exemplarily, the resource files associated with the target service store may include map resource files, navigation resource files, food delivery resource files, guidance resource files, seating resource files, and disinfection resource files. Map resource files and navigation resource files may be shared resource files, while food delivery resource files, guidance resource files, seating resource files, and disinfection resource files are unique resource files. Shared resource files are required for all types of robots operating in the service store, while unique resource files are required for specific types of robots operating in the service store. Optionally, to facilitate resource file management, resource files are stored in resource packages within the resource server. In response to a resource query request, the resource server provides information about shared resource files and unique resource files corresponding to the target application type as resource package information to be updated to the target robot that sent the resource query request. The resource server does not send the resource package to be updated directly to the target robot, but feeds back the information of the resource package to be updated to the target robot.
[0067] In an optional embodiment, after sending the resource query request to the resource server, the method further includes: respectively determining the file description information of the target application's resource package to be updated and the local resource package; and judging whether the target application's resource package to be updated is the same as the local resource package based on the file description information of the target application's resource package to be updated and the local resource package.
[0068] The file description information of the resource package to be updated describes the basic attributes of the candidate resource files in the resource package to be updated. Optionally, the file description information of the resource package to be updated includes: a summary of the information of the candidate resource files included in the resource package to be updated. The file description information of the local resource package describes the basic attributes of the local resource files in the local resource package. Optionally, the file description information of the local resource package includes: a summary of the information of the local resource files included in the local resource package.
[0069] The file description information of the resource package to be updated can be extracted from the resource package to be updated by the resource server based on the information digest algorithm and fed back to the robot. The file description information of the local resource package can be obtained by the resource server based on the information digest algorithm and stored locally on the robot.
[0070] According to the file description information of the target application's resource package to be updated and the local resource package, determine whether the target application's resource package to be updated is the same as the local resource package. Specifically, compare the information summary in the file description information, and determine whether the resource package to be updated and the local resource package are the same based on the summary comparison result. If the summary comparison result is consistent, it indicates that the resource package to be updated and the local resource package are the same; if the summary comparison result is inconsistent, it indicates that the resource package to be updated and the local resource package are different. In order to avoid downloading duplicate resource packages, when the summary comparison result is inconsistent, that is, when the resource package to be updated and the local resource package are different, the ID of the resource package to be updated can be obtained, and then the file description information and file acquisition interface of the candidate resource file in the resource package to be updated can be requested. The above technical solution can avoid repeated acquisition of resource files, reduce network traffic and waste of data storage space.
[0071] S330: Based on the application information of the target application in the robot, obtain the resource package information to be updated of the target application, where the resource package information to be updated includes at least file description information and a file acquisition interface of two candidate resource files.
[0072] S340: Determine a target file acquisition interface from the file acquisition interfaces of the candidate resource files according to the application information and the file description information.
[0073] S350: Acquire the target resource file based on the target file acquisition interface.
[0074] The technical solution of the embodiment of the present application generates a resource query request based on the application business type and the robot identifier; sends the resource query request to the resource server, so that the resource server performs the following operations: in response to the resource query request, determines the target service store associated with the robot identifier in the candidate service stores; and determines the target application in the candidate applications associated with the target service store based on the application business type. The embodiment of the present application associates the robot with the service store where it works, and the resource files of different application business types in the resource server are stored separately in the dimension of the store. This allows the robot to only obtain the resource package information to be updated that is consistent with the application business type under the service store associated with it, supports the robot to obtain resource files on demand, further reduces unnecessary resource file downloads, and saves network traffic and data storage space.
[0075] In a specific embodiment, service store A is associated with two robots of different business types, namely a food delivery robot and a guidance robot. Under service store A, the resource server stores a resource package to be updated that can be used by the food delivery robot and the guidance robot in service store A. Optionally, the resource package to be updated corresponding to service store A in the resource server is stored separately according to business type. For example, the resource package to be updated corresponding to service store A is stored separately according to navigation resources, food delivery resources and guidance resources. Among them, navigation resources include: navigation map files, positioning point files, point attribute files, etc.; food delivery resources include: food pickup prompt voice files corresponding to positioning points, food pickup completion voice files, food delivery route files, etc.; guidance resources include: arrival voice files, departure voice files, merchant phone files and merchant picture files corresponding to positioning points.
[0076] The robot in service store A can obtain the resource files it needs in the following way. For ease of understanding, this article uses a food delivery robot as an example:
[0077] First, based on the app's application information, such as its service type and robot identifier (robot SN code), the delivery robot requests information from the resource server about the resource package to be updated for the delivery app corresponding to service store A. This resource package, for example, could be a holiday-themed resource package that includes navigation resources, delivery resources, and guidance resources. The resource package information includes the identifier of the resource package to be updated, such as the resource package ID, and file description information for the entire set of files required in the resource package to be updated, including a digest such as an MD5 value.
[0078] The food delivery robot then compares the MD5 value of the resource package to be updated with the MD5 value of the local resource package. If the MD5 values of the resource package to be updated and the local resource package are different, the robot requests the file description information and file acquisition interface of the candidate resource files in the resource package to be updated from the resource server based on the identifier of the resource package to be updated. It is worth noting that the MD5 value of the resource package to be updated does not refer to the MD5 value of the entire resource package to be updated, but rather the MD5 value of the resource files related to the target application in the resource package to be updated. Here, it refers to the MD5 value of the navigation resources related to the food delivery app in the food delivery robot and the resource files corresponding to the food delivery resources in the resource package to be updated, excluding the guide resources.
[0079] Next, the resource server provides the food delivery robot with a file retrieval interface for the candidate resource file and the file description information of the candidate resource file associated with the file retrieval interface. Exemplarily, the resource server's feedback may include: interface 1 and the file description information of the candidate resource file associated with interface 1; interface 2 and the file description information of the candidate resource file associated with interface 2. Interfaces can be represented as follows: / xxx / xxx / APP version number / resource package identifier / resource type. Interface 1 may correspond to food delivery resources, and interface 2 may correspond to navigation resources. After receiving the file retrieval interface for the candidate resource file and the file description information of the candidate resource file associated with the file retrieval interface, the food delivery robot compares the file description information with the file description information of the corresponding resource file type in the local resource package to determine whether the candidate resource file is identical to the resource file in the local resource package. If the candidate resource file is different from the resource file in the local resource package, the food delivery robot calls the file retrieval interface associated with the candidate file to retrieve the candidate resource file. Specifically, the food delivery robot calls the file retrieval interface, which returns the retrieval address of the candidate resource file, such as a URL. The food delivery robot can retrieve the candidate resource file based on the URL address of the candidate resource file. Optionally, the food delivery robot saves the MD5 value of the candidate resource file after obtaining the candidate resource file.
[0080] Since the file acquisition interface is related to the application version, each application version has a corresponding file acquisition interface. When the food delivery APP version is upgraded, the food delivery robot can obtain the required resource files by calling the file acquisition interface corresponding to the current application version.
[0081] Example 4
[0082] Figure 4 This is a robot resource acquisition device provided in the fourth embodiment of the present application. This embodiment is applicable to the case of updating the robot service version. The device can be implemented by software and / or hardware and can be integrated into electronic devices such as smart terminals.
[0083] like Figure 4 As shown, the apparatus may include: a module 410 for obtaining information of a resource package to be updated, a module 420 for determining a target file obtaining interface, and a module 430 for obtaining a target resource file.
[0084] The resource package information acquisition module 410 is configured to acquire the resource package information to be updated of the target application based on the application information of the target application in the robot, wherein the resource package information to be updated includes at least file description information and a file acquisition interface of two candidate resource files;
[0085] A target file acquisition interface determination module 420 is configured to determine a target file acquisition interface from the file acquisition interfaces of the candidate resource files based on the application information and the file description information;
[0086] The target resource file acquisition module 430 is configured to acquire the target resource file based on the target file acquisition interface.
[0087] The technical solution provided by the embodiments of this application determines the required resource files by comparing the file description information of the candidate resource files in the resource package information to be updated with the application information of the target application in the robot. The target resource files are then obtained based on the file acquisition interface associated with the required resource files. This allows the robot to download resource files on demand, effectively reducing unnecessary data consumption and memory usage.
[0088] Optionally, the target file acquisition interface determination module includes: an information summary comparison submodule, used to compare the information summary in the application information and the file description information to obtain a summary comparison result; a target resource file determination submodule, used to determine the corresponding candidate resource file as the target resource file if the summary comparison result is inconsistent; and a target file acquisition interface determination submodule, used to determine the file acquisition interface associated with the target resource file as the target file acquisition interface.
[0089] Optionally, the device also includes: a resource query request generating module, which is used to generate a resource query request according to the application business type and the robot identifier before obtaining the resource package information to be updated of the target application based on the application information of the target application in the robot; a resource query request sending module, which is used to send the resource query request to the resource server so that the resource server performs the following operations: in response to the resource query request, determine the target service store associated with the robot identifier among the candidate service stores; and determine the target application among the candidate applications associated with the target service store according to the application business type.
[0090] Optionally, the device also includes: a file description information determination module, used to determine the file description information of the target application's to-be-updated resource package and the local resource package respectively after sending the resource query request to the resource server; a resource package difference judgment module, used to judge whether the target application's to-be-updated resource package is the same as the local resource package based on the file description information of the target application's to-be-updated resource package and the local resource package.
[0091] Optionally, the target resource file acquisition module 430 includes: a robot status data acquisition sub-module, used to obtain the current network status and the current working status; a target acquisition time determination sub-module, used to determine the target acquisition time of the target resource file based on the current network status, the current working status and the file size of the target resource file; a target resource file acquisition sub-module, used to obtain the target resource file from the resource server at the target acquisition time based on the target file acquisition interface.
[0092] A robot resource acquisition device provided by an embodiment of the present invention can execute a robot resource acquisition method provided by any embodiment of the present invention, and has corresponding performance modules and beneficial effects for executing a robot resource acquisition method.
[0093] Example 5
[0094] The fifth embodiment of the present application further provides a storage medium containing computer-executable instructions. When the computer-executable instructions are executed by a computer processor, they are used to perform a robot resource acquisition method. The method includes:
[0095] Based on the application information of the target application in the robot, obtaining the resource package information to be updated of the target application, wherein the resource package information to be updated includes at least file description information and a file acquisition interface of two candidate resource files;
[0096] Determining a target file acquisition interface from the file acquisition interfaces of the candidate resource files according to the application information and the file description information;
[0097] Based on the target file acquisition interface, the target resource file is acquired.
[0098] Storage media refers to any of various types of memory electronic devices or storage electronic devices. The term "storage medium" is intended to include: installation media, such as CD-ROMs, floppy disks, or tape devices; computer system memory or random access memory, such as DRAM, DDR RAM, SRAM, EDO RAM, Rambus RAM, etc.; non-volatile memory, such as flash memory, magnetic media (such as hard disks or optical storage); registers or other similar types of memory elements, etc. Storage media may also include other types of memory or combinations thereof. In addition, the storage medium may be located in the computer system in which the program is executed, or it may be located in a different second computer system that is connected to the computer system via a network (such as the Internet). The second computer system may provide program instructions to the computer for execution. The term "storage medium" may include two or more storage media that may reside in different locations (e.g., in different computer systems connected via a network). The storage medium may store program instructions (e.g., embodied as a computer program) that can be executed by one or more processors.
[0099] Of course, the storage medium containing computer-executable instructions provided in an embodiment of the present application is not limited to the robot resource acquisition operation described above, and can also execute related operations in the robot resource acquisition method provided in any embodiment of the present application.
[0100] Example 6
[0101] Embodiment 6 of the present application provides an electronic device, into which the robot resource acquisition device provided in the embodiment of the present application can be integrated. The electronic device can be configured within the system, or it can be a device that executes part or all of the performance within the system. Figure 5 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. Figure 5 As shown, this embodiment provides an electronic device 500, which includes: one or more processors 520; a storage device 510 for storing one or more programs. When the one or more programs are executed by the one or more processors 520, the one or more processors 520 implement the robot resource acquisition method provided in the embodiment of the present application. The method includes:
[0102] Based on the application information of the target application in the robot, obtaining the resource package information to be updated of the target application, wherein the resource package information to be updated includes at least file description information and a file acquisition interface of two candidate resource files;
[0103] Determining a target file acquisition interface from the file acquisition interfaces of the candidate resource files according to the application information and the file description information;
[0104] Based on the target file acquisition interface, the target resource file is acquired.
[0105] Of course, those skilled in the art will appreciate that the processor 520 also implements the technical solution of the robot resource acquisition method provided in any embodiment of the present application.
[0106] Figure 5 The electronic device 500 shown is merely an example and should not limit the performance and scope of use of the embodiments of the present application.
[0107] like Figure 5 As shown, the electronic device 500 includes a processor 520, a storage device 510, an input device 530, and an output device 540; the number of processors 520 in the electronic device can be one or more. Figure 5 In the figure, a processor 520 is used as an example; the processor 520, the storage device 510, the input device 530 and the output device 540 in the electronic device can be connected via a bus or other means. Figure 5 The connection via bus 550 is taken as an example.
[0108] The storage device 510 is a computer-readable storage medium that can be used to store software programs, computer executable programs, and module units, such as program instructions corresponding to the robot resource acquisition method in the embodiment of the present application.
[0109] The storage device 510 may primarily include a program storage area and a data storage area. The program storage area may store an operating system and at least one application required for performance; the data storage area may store data created based on the use of the terminal, etc. Furthermore, the storage device 510 may include high-speed random access memory and may also include non-volatile memory, such as at least one disk storage device, flash memory device, or other non-volatile solid-state memory device. In some instances, the storage device 510 may further include memory remotely located relative to the processor 520, and these remote memories may be connected via a network. Examples of the aforementioned networks include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0110] The input device 530 may be used to receive input numbers, character information or voice information, and generate key signal input related to user settings and performance control of the electronic device. The output device 540 may include electronic devices such as a display screen and a speaker.
[0111] Example 7
[0112] Figure 5 This is a structural diagram of a robot provided in an embodiment of the present application. Figure 5The robot 500 shown includes a storage device 510 , a processor 520 , an input device 530 , an output device 540 , and a bus 550 .
[0113] The output device 540 is used to send a resource data acquisition request to a resource server or other robot holding the resource package information to be updated;
[0114] Input device 530, for receiving resource data transmitted by various input devices, such as file description information and file acquisition interface of candidate resource files and target resource files in the resource package information to be updated;
[0115] one or more processors 520;
[0116] a storage device 510 for storing one or more programs;
[0117] Figure 5 Taking a processor 520 as an example, the input device 530 in the robot can be connected to the output device 540, the processor 520 and the storage device 510 through a bus 550 or other means, and the processor 530 and the storage device 510 are also connected through a bus 550 or other means. Figure 5 The connection via bus 550 is taken as an example.
[0118] In this embodiment, the processor 520 in the robot 500 can control the output device 540 to send a resource data acquisition request to the resource server or other robots that hold the resource package information to be updated. The processor 520 can also be controlled to determine the target file acquisition interface from the file acquisition interface of the candidate resource file based on the application information and file description information; the input device 530 can also be controlled to receive the resource data transmitted by each input device; the storage device 510 in the robot is a computer-readable storage medium that can be used to store one or more programs, which can be software programs, computer executable programs, and modules, such as the program instructions / modules corresponding to the robot resource acquisition method in the embodiment of the present invention (for example, the attached Figure 4 The processor 520 executes the software programs, instructions, and modules stored in the storage device 510 to execute various functional applications and data processing of the robot, thereby implementing the robot resource method in the above method embodiment.
[0119] The storage device 510 may include a program storage area and a data storage area, wherein the program storage area may store an operating system and applications required for at least one function; the data storage area may store data, etc. (such as the file description information and file acquisition interface of the candidate resource file in the above embodiment). In addition, the storage device 510 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other non-volatile solid-state storage device. In some instances, the storage device 510 may further include a memory remotely located relative to the processor 520, and these remote memories may be connected to the server via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0120] The robot resource acquisition apparatus, robot, medium, and electronic device provided in the above embodiments can execute the robot resource acquisition method provided in any embodiment of this application, and possess the corresponding performance modules and beneficial effects of executing the method. For technical details not fully described in the above embodiments, please refer to the robot resource acquisition method provided in any embodiment of this application.
[0121] Note that the above are only preferred embodiments of the present application and the technical principles employed. Those skilled in the art will understand that the present application is not limited to the specific embodiments described herein, and that various obvious changes, readjustments, and substitutions can be made by those skilled in the art without departing from the scope of protection of the present application. Therefore, although the present application has been described in more detail through the above embodiments, the present application is not limited to the above embodiments and may include many other equivalent embodiments without departing from the scope of the present application. The scope of the present application is determined by the scope of the appended claims.
Claims
1. A robot resource acquisition method, characterized in that: The method comprises: Generate resource query requests based on application business type and robot identifier; The resource query request is sent to a resource server, so that the resource server performs the following operations: in response to the resource query request, determining a target service store associated with the robot identifier from candidate service stores; and determining, based on the application business type, from resource files associated with the target service store, common resource files and unique resource file information corresponding to the target application type as resource package information to be updated; Based on application information of a target application in the robot, obtaining resource package information to be updated for the target application, wherein the resource package information to be updated includes at least file description information and a file acquisition interface of two candidate resource files; the application information includes an application type; the application type corresponds to the service type of the robot; and the file description information includes an information summary and an acquisition address; Determining a target file acquisition interface from the file acquisition interfaces of the candidate resource files according to the application information and the file description information; Based on the target file acquisition interface, obtain the target resource file from the resource server; Among them, in the resource server, resource files of different application business types are stored separately in the dimension of stores; the common resource files are resource files that all robots working in the same service store rely on; the unique resource files are resource files required to be used by robots of a specific type working in the service store; the application business type is related to the type of robot; the type of robot is determined according to the application environment of the robot and the work it performs.
2. The method according to claim 1, characterized in that The determining, based on the application information and the file description information, a target file acquisition interface from the file acquisition interfaces of the candidate resource files includes: Comparing the application information with the information digest in the file description information to obtain a summary comparison result; If the summary comparison result is inconsistent, the corresponding candidate resource file is determined as the target resource file; The file acquisition interface associated with the target resource file is determined as the target file acquisition interface.
3. The method according to claim 2, characterized in that After sending the resource query request to the resource server, the method further includes: Determine the file description information of the resource package to be updated and the local resource package of the target application respectively; According to the file description information of the target application's resource package to be updated and the local resource package, it is determined whether the target application's resource package to be updated is the same as the local resource package.
4. The method according to claim 1, wherein The step of obtaining the target resource file from the resource server based on the target file obtaining interface includes: Get the current network status and current working status; Determining a target acquisition time for the target resource file based on the current network status, the current working status, and the file size of the target resource file; Based on the target file acquisition interface, the target resource file is acquired from the resource server at the target acquisition time.
5. A robot resource acquisition device, characterized in that: The device comprises: A resource query request generation module is used to generate a resource query request based on the application business type and robot identifier; A resource query request sending module is configured to send the resource query request to a resource server, so that the resource server performs the following operations: in response to the resource query request, determining a target service store associated with the robot identifier from candidate service stores; and determining, based on the application business type, from resource files associated with the target service store, common resource files and unique resource file information corresponding to the target application type as resource package information to be updated; A module for acquiring information about resource packages to be updated is configured to acquire information about resource packages to be updated of a target application based on application information of the target application in the robot, wherein the information about resource packages to be updated includes at least file description information and a file acquisition interface for two candidate resource files; the application information includes an application type corresponding to the service type of the robot; and the file description information includes an information summary and an acquisition address. a target file acquisition interface determination module, configured to determine a target file acquisition interface from the file acquisition interfaces of the candidate resource files according to the application information and the file description information; A target resource file acquisition module is used to acquire the target resource file from the resource server based on the target file acquisition interface; Among them, in the resource server, resource files of different application business types are stored separately in the dimension of stores; the common resource files are resource files that all robots working in the same service store rely on; the unique resource files are resource files required to be used by robots of a specific type working in the service store; the application business type is related to the type of robot; the type of robot is determined according to the application environment of the robot and the work it performs.
6. The device according to claim 5, characterized in that The target file acquisition interface determination module includes: An information summary comparison submodule, configured to compare the application information with the information summary in the file description information to obtain a summary comparison result; a target resource file determination submodule, configured to determine the corresponding candidate resource file as the target resource file if the digest comparison result is inconsistent; The target file acquisition interface determination submodule is used to determine the file acquisition interface associated with the target resource file as the target file acquisition interface.
7. A robot, characterized in that: The robot comprises: one or more processors; a memory for storing one or more programs; When the one or more programs are executed by the one or more processors, the one or more processors implement a robot resource acquisition method as described in any one of claims 1 to 4.
8. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, a robot resource acquisition method according to any one of claims 1 to 4 is implemented.
9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable by the processor, wherein: When the processor executes the computer program, a robot resource acquisition method according to any one of claims 1 to 4 is implemented.
Citation Information
Patent Citations
OTA upgrading method and apparatus
CN105848190A
Updating method, device and client of game resource
CN107205057A
Page interaction method and device, terminal and storage medium
CN112363789A