WO2022110754A1 - Resource loading method and apparatus, electronic device, storage medium, and program - Google Patents

Resource loading method and apparatus, electronic device, storage medium, and program Download PDF

Info

Publication number
WO2022110754A1
WO2022110754A1 PCT/CN2021/098335 CN2021098335W WO2022110754A1 WO 2022110754 A1 WO2022110754 A1 WO 2022110754A1 CN 2021098335 W CN2021098335 W CN 2021098335W WO 2022110754 A1 WO2022110754 A1 WO 2022110754A1
Authority
WO
WIPO (PCT)
Prior art keywords
resource
electronic device
loaded
information
location information
Prior art date
Application number
PCT/CN2021/098335
Other languages
French (fr)
Chinese (zh)
Inventor
张建博
Original Assignee
深圳市商汤科技有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 深圳市商汤科技有限公司 filed Critical 深圳市商汤科技有限公司
Priority to KR1020217043247A priority Critical patent/KR20220007171A/en
Priority to JP2021567017A priority patent/JP7450641B2/en
Publication of WO2022110754A1 publication Critical patent/WO2022110754A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/52Network services specially adapted for the location of the user terminal
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/131Protocols for games, networked simulations or virtual reality

Definitions

  • the present disclosure relates to the field of computer technologies, and in particular, to a resource loading method and apparatus, an electronic device, a storage medium, and a program.
  • AR Augmented Reality
  • Augmented Reality technology is a technology that ingeniously integrates virtual information with the real world. It widely uses multimedia, three-dimensional modeling, real-time tracking and registration, intelligent interaction and sensing. The computer-generated text, images, three-dimensional models, music, videos and other virtual information are simulated and applied to the real world, and the two kinds of information complement each other, thereby realizing the "enhancement" of the real world.
  • AR technology is widely used in various fields, such as: AR navigation, AR games, etc.
  • the present disclosure proposes a resource loading technical solution for loading AR resources.
  • a resource loading method is provided, applied to a first electronic device, including:
  • positioning information is used to enable the second electronic device to determine the position information of the first electronic device according to the positioning information, and determine the position information according to the position information of the first electronic device Augmented reality AR resources to be loaded;
  • the receiving the AR resource to be loaded sent by the second electronic device, and correspondingly displaying the AR resource to be loaded includes: receiving the AR resource sent by the second electronic device.
  • the identification information of the AR resource to be loaded; the identification information of the target AR resource is determined from the identification information of the AR resource to be loaded; the identification information of the target AR resource is carried in the AR resource acquisition request, and sent to the AR resource acquisition request.
  • the second electronic device sends an AR resource acquisition request, where the AR resource acquisition request is used to enable the second electronic device to acquire the target AR resource corresponding to the identification information of the target AR resource in response to the AR resource acquisition request; receive and The target AR resource sent by the second electronic device is displayed.
  • the receiving the AR resource to be loaded sent by the second electronic device, and correspondingly displaying the AR resource to be loaded includes: receiving the AR resource sent by the second electronic device.
  • the AR resource to be loaded; the target AR resource is determined from the AR resource to be loaded; the target AR resource is displayed.
  • the sending the positioning information to the second electronic device includes: within a time period, the distance moved by the first electronic device is greater than a distance threshold; During the time period, the real-time location information of the first electronic device is located outside the positioning area; when the previous time period ends, a new time period starts; wherein, the positioning area is based on the location of the first electronic device in the The location information corresponding to the initial time of the time period is the center area.
  • the identification information of the AR resource to be loaded includes an AR resource identification and AR resource version information
  • the identification information of the target AR resource is determined from the identification information of the AR resource to be loaded, Including: for the identification information of any AR resource to be loaded, in the case that the AR resource corresponding to the AR resource identifier is not cached locally, or the locally cached AR resource version information of the AR resource corresponding to the AR resource identifier, In the case of inconsistency with the AR resource version information, it is determined that the identification information of the AR resource to be loaded is the identification information of the target AR resource.
  • the positioning information includes an environment image where the first electronic device is located, and the environment image is used to enable the second electronic device to determine the first electronic device according to the environment image Location information of the device.
  • a resource loading method is provided, applied to a second electronic device, including:
  • the sending the AR resource to be loaded to the first electronic device includes: sending identification information of the AR resource to be loaded to the first electronic device, wherein the AR resource to be loaded is sent to the first electronic device.
  • the identification information of the AR resource to be loaded is used to enable the first electronic device to determine the identification information of the target AR resource from the identification information of the AR resource to be loaded;
  • the AR resource acquisition request In response to the AR resource acquisition request, acquire the target AR resource corresponding to the identification information of the target AR resource, and send the target AR resource to the first electronic device, wherein the target AR resource is displayed on the in the first electronic device.
  • the determining the AR resource to be loaded from the augmented reality AR resource according to the location information of the first electronic device includes: determining the range to be loaded according to the location information of the first electronic device; For any AR resource, if the location information corresponding to the AR resource is located within the to-be-loaded range, the AR resource is determined to be the to-be-loaded AR resource.
  • the determining the range to be loaded according to the location information of the first electronic device includes: determining range construction data; and according to the location information of the first electronic device and the range construction data, Determine the to-be-loaded range.
  • the positioning information further includes the network signal quality of the first electronic device and/or the moving speed of the first electronic device
  • the determining the range construction data includes: according to the network signal quality, and determine the range construction data corresponding to the network signal quality; and/or, according to the movement speed, determine the range construction data corresponding to the movement speed.
  • the determining the to-be-loaded range according to the location information of the first electronic device and the range construction data includes: according to the location information of the first electronic device and the range construction data range construction data, determine the initial range to be loaded; determine the number of AR resources whose location information is within the initial range to be loaded; adjust the range construction data according to the number of AR resources to obtain the adjusted range construction data; The adjusted range construction data and the location information of the first electronic device determine the to-be-loaded range.
  • the determining the AR resource to be loaded from the augmented reality AR resource according to the location information of the first electronic device includes: determining the location information of each AR resource and the location information of the first electronic device. The distance between the location information; after sorting the AR resources according to the distance from small to large, the first preset number of AR resources are determined as the AR resources to be loaded.
  • the positioning information includes an image of an environment where the first electronic device is located
  • the determining the position information of the first electronic device according to the positioning information includes: according to the first electronic device The image of the environment where the device is located visually locates the first electronic device to obtain location information of the first electronic device.
  • a resource loading apparatus which is applied to a first electronic device, and the apparatus includes:
  • a sending module configured to send positioning information to a second electronic device, where the positioning information is used to enable the second electronic device to determine the position information of the first electronic device according to the positioning information, and to determine the position information of the first electronic device according to the positioning information
  • the location information of the device determines the augmented reality AR resources to be loaded
  • a receiving module configured to receive the AR resource to be loaded sent by the second electronic device, and to display the AR resource to be loaded accordingly.
  • the receiving module is further configured to: receive the identification information of the AR resource to be loaded sent by the second electronic device; determine from the identification information of the AR resource to be loaded Identification information of the target AR resource;
  • the resource acquisition request acquires the target AR resource corresponding to the identification information of the target AR resource; and receives and displays the target AR resource sent by the second electronic device.
  • the receiving module is further configured to: receive the AR resource to be loaded sent by the second electronic device; determine the target AR resource from the AR resource to be loaded; display the AR resource to be loaded; Target AR resource.
  • the sending module is further configured to send positioning information to the second electronic device in response to any one of the following conditions: within a time period, the distance moved by the first electronic device is greater than the distance threshold; within the time period, the real-time location information of the first electronic device is located outside the positioning area; when the previous time period ends, a new time period starts; wherein, the positioning area is based on the first electronic device The location information corresponding to the device at the initial moment of the time period is the center of the area.
  • the identification information of the AR resource to be loaded includes the AR resource identification and the AR resource version information
  • the receiving module is further configured to: for any identification information of the AR resource to be loaded, the identification information of the AR resource to be loaded is not stored locally. If the AR resource corresponding to the AR resource identifier is cached, or if the locally cached AR resource version information of the AR resource corresponding to the AR resource identifier is inconsistent with the AR resource version information, determine the pending AR resource.
  • the identification information of the loaded AR resource is the identification information of the target AR resource.
  • the positioning information includes an environment image where the first electronic device is located, and the environment image is used to enable the second electronic device to determine the first electronic device according to the environment image Location information of the device.
  • a resource loading apparatus which is applied to a second electronic device, and the apparatus includes:
  • a receiving module configured to receive the positioning information sent by the first electronic device
  • a first determining module configured to determine the location information of the first electronic device according to the location information
  • a second determining module configured to determine the AR resource to be loaded from the augmented reality AR resource according to the location information of the first electronic device
  • a sending module configured to send the AR resource to be loaded to the first electronic device, wherein the AR resource to be loaded is displayed in the first electronic device.
  • the sending module is further configured to:
  • the second determining module is further configured to: determine the to-be-loaded range according to the location information of the first electronic device; for any AR resource, the location information corresponding to the AR resource In the case of being within the to-be-loaded range, the AR resource is determined to be the to-be-loaded AR resource.
  • the second determining module is further configured to: determine range construction data; and determine the to-be-loaded range according to the location information of the first electronic device and the range construction data.
  • the positioning information further includes the network signal quality of the first electronic device and/or the moving speed of the first electronic device
  • the second determining module is further configured to: According to the network signal quality, range construction data corresponding to the network signal quality is determined; and/or, based on the movement speed, range construction data corresponding to the movement speed is determined.
  • the second determining module is further configured to: determine an initial range to be loaded according to the location information of the first electronic device and the range construction data; determine that the location information is located in the initial range the number of AR resources in the range to be loaded; adjust the range construction data according to the number of AR resources to obtain the adjusted range construction data; according to the adjusted range construction data and the position of the first electronic device information to determine the to-be-loaded range.
  • the second determining module is further configured to: determine the distance between the location information of each AR resource and the location information of the first electronic device; After sorting to the largest, the first preset number of AR resources are determined as the AR resources to be loaded.
  • the positioning information includes an image of the environment where the first electronic device is located
  • the first determining module is further configured to: determine the first electronic device according to the image of the environment where the first electronic device is located.
  • An electronic device performs visual positioning to obtain location information of the first electronic device.
  • an electronic device comprising: a processor; a memory for storing instructions executable by the processor; wherein the processor is configured to call the instructions stored in the memory to Perform the above method.
  • a computer-readable storage medium having computer program instructions stored thereon, the computer program instructions implementing the above method when executed by a processor.
  • An embodiment of the present disclosure provides a computer program, including computer-readable code, when the computer-readable code is executed in an electronic device, the processor in the electronic device executes the above method.
  • the first electronic device may send positioning information to the second electronic device, where the positioning information is used to enable the second electronic device to determine the position information of the first electronic device according to the positioning information, and determine the augmented reality AR resource to be loaded according to the location information of the first electronic device, and then the first electronic device can receive the AR resource to be loaded sent by the second electronic device, and perform the AR resource to be loaded. Display accordingly.
  • the resource loading method and device, electronic device, storage medium and program provided by the embodiments of the present disclosure the corresponding AR resource to be loaded can be determined and loaded according to the location information of the first electronic device, which alleviates the need to package and download an AR application when downloading an AR application.
  • the problem that the installation package of the AR application is too large caused by all the AR resources makes the installation package of the AR application lightweight, and improves the download and installation efficiency of the AR application without affecting the user's use.
  • FIG. 1 shows a schematic diagram of a resource loading method according to an embodiment of the present disclosure
  • FIG. 2 shows a flowchart of a resource loading method according to an embodiment of the present disclosure
  • FIG. 3 shows a flowchart of a resource loading method according to an embodiment of the present disclosure
  • FIG. 4 shows a schematic diagram of a resource loading method according to an embodiment of the present disclosure
  • FIG. 5 shows a schematic diagram of a resource loading method according to an embodiment of the present disclosure
  • FIG. 6 shows a block diagram of a resource loading apparatus according to an embodiment of the present disclosure
  • FIG. 7 shows a block diagram of a resource loading apparatus according to an embodiment of the present disclosure
  • FIG. 8 shows a block diagram of an electronic device 800 according to an embodiment of the present disclosure
  • FIG. 9 shows a block diagram of an electronic device 1900 according to an embodiment of the present disclosure.
  • the AR application Users need to download the AR application to the terminal device before applying the AR application. If the AR resources involved in the AR application are packaged and downloaded at the same time when downloading the AR application, the installation package of the AR application will be too large. , If all AR resources are loaded from the cloud server after downloading and installing the AR application, the network transmission will take too long.
  • the embodiments of the present disclosure provide a resource loading method, which can determine the position information of a terminal device through VPS (Visual Positioning Service, visual positioning system) visual positioning, and then perform AR resource loading according to the position information of the terminal device. load.
  • the AR application installation package does not include AR resources or includes some AR resources.
  • the AR program can be used step by step according to the location information of the terminal device.
  • Load AR resources For example, the terminal device loads (AR resource 1, AR resource 2, and AR resource 3) at position 1, and loads (AR resource 4, AR resource 5, and AR resource 6) at position 2.
  • the installation package of the AR application can be made lightweight, thereby improving the download and installation efficiency of the AR application.
  • the resource loading method may be executed by a terminal device (hereinafter referred to as a first electronic device), and the terminal device may be a user equipment (User Equipment, UE), Mobile device, user terminal, terminal, cellular phone, cordless phone, Personal Digital Assistant (PDA), handheld device, computing device, vehicle-mounted device, wearable device, etc., the method can be stored in the memory by calling the processor implemented by means of computer readable instructions.
  • a terminal device hereinafter referred to as a first electronic device
  • UE user equipment
  • PDA Personal Digital Assistant
  • the resource loading method may include:
  • step S21 the positioning information is sent to the second electronic device, where the positioning information is used to enable the second electronic device to determine the position information of the first electronic device according to the positioning information, and according to the positioning information of the first electronic device
  • the location information determines the augmented reality AR resource to be loaded
  • step S22 the AR resource to be loaded sent by the second electronic device is received, and the AR resource to be loaded is displayed accordingly.
  • the above-mentioned second electronic device may include, for example, a cloud server or the like.
  • the first electronic device may send positioning information to the second electronic device, where the positioning information may include the position information of the first electronic device (the first electronic device performs a positioning operation to obtain the position information), and the second electronic device may obtain the position information from the positioning information Location information of the first electronic device.
  • the positioning information may include an environment image where the first electronic device is located, and the environment image is used to enable the second electronic device to determine the location of the first electronic device according to the environment image. location information.
  • the space can be reconstructed in advance by using a spatial reconstruction technology, for example, by using an SFM (Structure from Motion, motion recovery structure) spatial reconstruction technology, the spatial reconstruction is performed to obtain a three-dimensional model of the space.
  • the first electronic device may collect an image of the environment where it is located, and send positioning information including the environment image to the second electronic device. After the second electronic device receives the positioning information, it can visually locate the first electronic device according to the environment image and the three-dimensional model to obtain the position information of the first electronic device.
  • SFM Structure from Motion, motion recovery structure
  • the second electronic device After the second electronic device obtains the location information of the first electronic device, it can determine the AR resources to be loaded from all AR resources according to the location information of the first electronic device (in the case that the installation package of the AR application includes some AR resources) , the AR resource to be loaded may be determined from the remaining AR resources that are not packaged into the installation package), and the AR resource to be loaded may be sent to the first electronic device.
  • the second electronic device may determine that the AR resource whose location information and the location information of the first electronic device satisfy the loading condition is the AR resource to be loaded. For example, when the distance between the location information of the AR resource and the location information of the first electronic device is within the distance threshold, it may be determined that the AR resource satisfies the loading condition, and the AR resource is determined as the AR resource to be loaded.
  • a range to be loaded can be determined according to the position information of the first electronic device (for example, an area is determined with the position information of the first electronic device as the center, and the area is the range to be loaded), and the position information of the AR resource is located in the to-be-loaded range. When it is within the range, it can be determined that the AR resource is the AR resource to be loaded.
  • the first electronic device may display the AR resource to be loaded accordingly. For example: display the AR resources to be loaded that have not been loaded locally on the first electronic device, or display the corresponding loading prompt information for the AR resources to be loaded that have been loaded locally but have been updated. It asks the user whether to update the AR resource to be loaded, and can display correspondingly in response to the user's confirmation operation for the loading prompt information. For example: in response to the confirmation operation for loading, load and display the AR resource to be loaded, and delete the local cached version, or in response to the confirmation operation for not loading, do not load the AR resource to be loaded, and display the local AR resource to be loaded. cached version.
  • the first electronic device can send positioning information to the second electronic device, where the positioning information is used to enable the second electronic device to determine the position information of the first electronic device according to the positioning information, and
  • the location information of an electronic device determines the AR resource to be loaded, and then the first electronic device can receive the AR resource to be loaded sent by the second electronic device, and display the AR resource to be loaded accordingly.
  • the corresponding AR resource to be loaded can be determined and loaded according to the location information of the first electronic device, which alleviates the AR application caused by packaging and downloading all AR resources when downloading the AR application.
  • the problem that the installation package is too large makes the installation package of the AR application lightweight, which improves the download and installation efficiency of the AR application without affecting the user's use.
  • the receiving the AR resource to be loaded sent by the second electronic device, and correspondingly displaying the AR resource to be loaded may include:
  • the second electronic device may determine the AR resources to be loaded from all AR resources according to the location information of the first electronic device, and obtain identification information of the AR resources to be loaded, where the identification information of the AR resources to be loaded may be used to identify the AR resources to be loaded.
  • AR resource to be loaded may include the ID and name of the AR resource to be loaded, and may also include version information of the AR resource to be loaded, and the like.
  • the first electronic device may determine the identification information of the target AR resource from the identification information of the AR resource to be loaded according to the identification information of the locally cached AR resource and the identification information of the AR resource to be loaded.
  • the identification information of the AR resource to be loaded includes AR resource identification and AR resource version information, and the identification information of the target AR resource is determined from the identification information of the AR resource to be loaded, including :
  • the identification information of any AR resource to be loaded if the AR resource corresponding to the AR resource identifier is not cached locally, or the locally cached AR resource version information of the AR resource corresponding to the AR resource identifier is the same as the AR resource version information of the AR resource. In the case that the AR resource version information is inconsistent, it is determined that the identification information of the AR resource to be loaded is the identification information of the target AR resource.
  • the identification information of any AR resource to be loaded when the AR resource identification included in the identification information of the AR resource to be loaded does not exist in the AR resource identification corresponding to the locally cached AR resource, it is determined that the AR resource is not cached locally.
  • the identification information of the AR resource to be loaded may be determined as the identification information of the target AR resource.
  • the AR resource identifier included in the identifier information of the AR resource to be loaded exists in the AR resource identifier corresponding to the locally cached AR resource, but the AR resource version information corresponding to the AR resource identifier stored locally is the same as the AR resource identifier to be loaded.
  • the AR resource version information included in the identification information is inconsistent, it can be determined that the version of the AR resource to be loaded has been updated, so the identification information of the AR resource to be loaded can be determined as the identification information of the target AR resource.
  • the first electronic device may send an AR resource acquisition request to the second electronic device according to the identification information of the target AR resource.
  • the second electronic device may acquire the corresponding target AR resource according to the identification information of the target AR resource, and send the target AR resource to the first electronic device.
  • the first electronic device may receive the target AR resource sent by the second electronic device, and display the target AR resource on the display interface of the first electronic device.
  • the cached historical version may be deleted, and the target AR resource sent by the second electronic device may be cached.
  • the AR resource is AR billboard 1
  • the locally cached version is version 1.0
  • the version sent by the second electronic device is version 2.0
  • the locally cached version 1.0 of AR billboard 1 can be deleted, and the cached version sent by the second electronic device is version 2.0.
  • the AR resource can be loaded step by step according to the location information of the first electronic device, which can make the installation package of the AR application lightweight, and can improve the loading accuracy and efficiency in the process of loading the AR resource.
  • the receiving the AR resource to be loaded sent by the second electronic device, and correspondingly displaying the AR resource to be loaded may include:
  • the second electronic device may send the AR resource to be loaded to the first electronic device, and after receiving the AR resource to be loaded, the first electronic device may determine the target AR resource from the AR resource to be loaded, and load the AR resource for display Resource, wherein, for the method of determining the target AR resource, reference may be made to the foregoing embodiments, and details are not described herein again in this embodiment of the present disclosure.
  • the sending the positioning information to the second electronic device may include:
  • the positioning information is sent to the second electronic device; wherein, the positioning area is the area corresponding to the first electronic device at the initial moment of the time period.
  • the location information is the center of the area.
  • the first electronic device may send positioning information to the second electronic device every time period T, and the time period T may be preset or determined according to the moving speed of the first electronic device, for example: when When the moving speed of the first electronic device is relatively fast, a relatively small time period T can be set accordingly, and when the moving speed of the first electronic device is relatively slow, a relatively large time period T can be set accordingly.
  • a positioning area can be preset with the position information corresponding to the first electronic device at the initial moment of the time period as the center, and when the real-time position of the first electronic device is outside the positioning area, the second electronic device can be sent to the second electronic device. The positioning information is sent to reduce the interaction process with the second electronic device and improve resource utilization.
  • FIG. 3 shows a flowchart of a resource loading method according to an embodiment of the present disclosure.
  • the resource loading method can be applied to a cloud server (hereinafter referred to as a second electronic device) for execution.
  • a cloud server hereinafter referred to as a second electronic device
  • the resource loading method provided by an embodiment of the present disclosure Can include:
  • step S31 receiving the positioning information sent by the first electronic device
  • step S32 the location information of the first electronic device is determined according to the location information
  • step S33 determining the AR resource to be loaded from the augmented reality AR resource according to the location information of the first electronic device
  • step S34 the AR resource to be loaded is sent to the first electronic device, wherein the AR resource to be loaded is displayed in the first electronic device.
  • the first electronic device may perform a positioning operation, and after obtaining the position information of the first electronic device, send the positioning information to the second electronic device, where the positioning information may include the position information of the first electronic device.
  • the second electronic device may acquire the position information of the first electronic device from the positioning information.
  • the positioning information includes an image of an environment where the first electronic device is located
  • the determining the position information of the first electronic device according to the positioning information may include:
  • the first electronic device may send positioning information including an image of the environment where the first electronic device is located to the second electronic device (for a specific process, refer to the foregoing embodiment, which is not repeated in this embodiment of the present disclosure).
  • the second electronic device After the second electronic device receives the positioning request, it visually locates the first electronic device according to the environment image and the three-dimensional model obtained by reconstructing the space in advance, and obtains the position information of the first electronic device.
  • the specific process is not limited, and any visual positioning method can be used.
  • the second electronic device may determine the AR resource to be loaded from the AR resources according to the location information of the first electronic device and the location information of each AR resource. In some embodiments, the second electronic device may determine that the AR resource whose location information and the location information of the first electronic device satisfy the loading condition is the AR resource to be loaded.
  • the AR resource when the distance between the location information of the AR resource and the location information of the first electronic device is within the distance threshold, it may be determined that the AR resource satisfies the loading condition, and the AR resource may be determined as the AR resource to be loaded, or, according to the first
  • the location information of the electronic device determines a to-be-loaded range (for example, an area is determined with the location information of the first electronic device as the center, and the area is the to-be-loaded range).
  • a to-be-loaded range for example, an area is determined with the location information of the first electronic device as the center, and the area is the to-be-loaded range.
  • the second electronic device After the second electronic device determines the AR resources to be loaded, it can obtain the AR resources to be loaded and send the AR resources to be loaded to the first electronic device, so that the first electronic device can load and display the AR resources to be loaded according to the cache situation of the AR resources . For example, when the first electronic device does not cache the AR resource to be loaded or the cached AR resource version information of the AR resource to be loaded is inconsistent with the AR resource version information of the AR resource to be loaded, the AR resource to be loaded is loaded and displayed.
  • the second electronic device can receive the positioning information sent by the first electronic device, and determine the position information of the first electronic device according to the positioning information.
  • the second electronic device may determine the AR resource to be loaded from the augmented reality AR resource according to the location information of the first electronic device, and send the AR resource to be loaded to the first electronic device, so that the first electronic device
  • the device displays the AR resource to be loaded accordingly.
  • the AR resources can be loaded gradually according to the location information of the first electronic device, which alleviates the problem that the installation package of the AR application is too large due to downloading all the AR resources when downloading the AR application. The problem makes the installation package of the AR application lightweight, and improves the download and installation efficiency of the AR application without affecting the user's use.
  • the sending the AR resource to be loaded to the first electronic device may include:
  • the AR resource acquisition request In response to the AR resource acquisition request, acquire the target AR resource corresponding to the identification information of the target AR resource, and send the target AR resource to the first electronic device, wherein the target AR resource is displayed on the first electronic device.
  • the second electronic device may acquire identification information of the AR resource to be loaded, and send the identification information of the AR resource to be loaded to the first electronic device.
  • the first electronic device may determine the identification information of the target AR resource from the identification information of the AR resource to be loaded according to the situation of the locally cached AR resource (for the specific process, refer to the foregoing embodiment, which is not repeated in this embodiment of the present disclosure).
  • the first electronic device may send an AR resource acquisition request including the identification information of the target AR resource to the second electronic device.
  • the second electronic device can acquire the corresponding target AR resource according to the identification information of the target AR resource, and send the target AR resource to the first electronic device for caching and display.
  • the AR resource can be loaded step by step according to the location information of the first electronic device, which can make the installation package of the AR application lightweight, and can improve the loading accuracy and efficiency in the process of loading the AR resource.
  • the determining the AR resource to be loaded from the augmented reality AR resource according to the location information of the first electronic device may include:
  • the AR resource is determined to be the to-be-loaded AR resource.
  • a range to be loaded may be determined by using the position information of the first electronic device as a reference point. For example: take the position information of the first electronic device as the center point, determine a circular, rectangular or polygonal area, this area is the to-be-loaded area, the size of this area can be preset or dynamically determined, this disclosure implements The example does not specifically limit this.
  • the second electronic device may determine the AR resource whose location information is within the to-be-loaded range as the to-be-loaded AR resource. For example, referring to FIG. 4 , the position information P0 of the first electronic device can be used as the center point to determine a circular area as the range to be loaded, and then the AR resource 1, AR resource 2 and AR resource located in the to-be-loaded range 3 can be determined as the target AR resource.
  • the determining the range to be loaded according to the location information of the first electronic device may include:
  • the to-be-loaded range is determined according to the location information of the first electronic device and the range construction data.
  • the above range construction data may be parameters for defining the area of the range to be loaded.
  • the above range construction data when the range to be loaded is a circular area, the above range construction data may be the radius of the circular area; when the range to be loaded is a rectangle, the above range construction data may include the length and width of the rectangular area.
  • the size of the range construction data can be preset, or can also be determined according to the loading requirements. For example, when the loading speed is required to be fast, the range construction data can be set smaller.
  • the range to be loaded can be determined.
  • the position P0 of the first electronic device can be used as the center of the circle, and the range construction data is used as the radius to construct a circular area to obtain the range to be loaded.
  • the position P0 of the first electronic device may be taken as the center, and a rectangular area may be constructed with the range construction data as the length and width to obtain the range to be loaded.
  • the above-mentioned range to be loaded is a circular area or a rectangular area, which is an example of the range to be loaded in the embodiment of the present disclosure.
  • the range to be loaded may have any shape, and the embodiment of the present disclosure does not define the range to be loaded.
  • the shape presented does not make any restrictions.
  • the positioning request may further include the network signal quality of the first electronic device and/or the moving speed of the first electronic device, and the determining the range construction data may include:
  • range construction data corresponding to the moving speed is determined.
  • the first electronic device when the first electronic device sends the positioning information, it may detect the network signal quality of the first electronic device and/or determine the moving speed of the first electronic device (which may include data such as speed, acceleration, etc.), and send the first electronic device to the network.
  • the network signal quality of the device and/or the moving speed of the first electronic device are sent to the second electronic device through the positioning information.
  • the network signal quality can be divided into multiple levels, for example: divided into high quality, good, poor and other levels (the network signal quality level and level are not limited in the embodiments of the present disclosure) , where, when the network signal quality is high quality, the corresponding range construction data is the first range construction data, when the network signal quality is good, the corresponding range construction data is the second range construction data, and when the network signal quality is poor, the corresponding range construction data
  • the range construction data is the third range construction data, the first range construction data is larger than the second range construction data, and the second range construction data is larger than the third range construction data.
  • the second electronic device can determine the range construction data corresponding to the network signal quality according to the network signal quality of the first electronic device, so as to be able to set larger range construction data when the network signal quality is good, thereby expanding the to-be-loaded range , so that the first electronic device loads more AR resources, sets a smaller range construction data when the network signal quality is poor, and further narrows the to-be-loaded range to load less AR resources.
  • the first electronic device can adaptively load the AR resource according to the quality of the network signal, which can bring better user experience.
  • the moving speed can also be divided into multiple speed ranges, for example: 0 to 1m/s is divided into a first speed range, 1m/s to 2m/s is divided into a second speed range (excluding 1m/s), the speed greater than 2m/s is divided into the third speed range, wherein the first speed range corresponds to the fourth range construction data, the second speed range corresponds to the fifth range construction data, and the third speed range corresponds to the sixth range.
  • the range construction data, the fourth range construction data is smaller than the fifth range construction data, and the fifth range construction data is smaller than the sixth range construction data.
  • the second electronic device may determine the range construction data corresponding to the movement speed according to the movement speed of the first electronic device. For example, when the movement speed of the first electronic device is within the first speed range, the range construction data may be determined as the fourth range Build data.
  • the range construction data can be dynamically determined according to the moving speed of the first electronic device, so as to set a larger range construction data when the moving speed of the first electronic device is fast, thereby expanding the to-be-loaded range, so that the first electronic device moves faster.
  • the electronic device loads more AR resources; when the moving speed of the first electronic device is slow, a smaller range construction data is set, thereby narrowing the to-be-loaded range, so that the first electronic device loads less AR resources.
  • the loading process of the AR resources can be adapted to the moving process of the first electronic device, and the AR resources at the location of the first electronic device have not been loaded by the first electronic device due to the fast moving speed of the first electronic device. problems, which can lead to a better user experience.
  • the determining the range to be loaded according to the location information of the first electronic device and the range construction data may include:
  • the to-be-loaded range is determined according to the adjusted range construction data and the position information of the first electronic device.
  • the second electronic device can determine an initial range to be loaded according to the range construction data and the position information of the first electronic device, for example, the position information of the first electronic device can be used as the center of the circle , with the range construction data as the radius, construct a circular initial range to be loaded.
  • the data can be constructed by narrowing down the range according to the preset adjustment strategy , or, when the number of AR resources located in the initial to-be-loaded range is small (for example, when it is less than the second threshold), the range construction data can be increased according to the preset adjustment strategy, and the range construction data and data can be constructed according to the adjusted range.
  • the location information of the first electronic device is used to determine the to-be-loaded range (for the specific process, reference may be made to the foregoing embodiment, which is not repeated here in this embodiment of the present disclosure).
  • the second electronic device can dynamically adjust the range to be loaded, and then adjust the number of AR resources loaded by the first electronic device, which can ensure the loading speed, alleviate the problem of users waiting due to loading AR resources, and improve user experience.
  • the determining the AR resource to be loaded from the augmented reality AR resource according to the location information of the first electronic device may include:
  • the first preset number of AR resources are determined as the AR resources to be loaded.
  • the distance between the location information of each AR resource and the location information of the first electronic device can be determined respectively, and the AR resources can be sorted according to the distance from small to large, and the first preset number of AR resources in the sequence can be sorted.
  • the resource is determined as the AR resource to be loaded (or, the AR resources can be sorted from large to small according to the distance, and the last preset number of AR resources in the sequence can be determined as the AR resource to be loaded), and the preset number can be the preset number of AR resources. set value. For example, if the preset number is set to 5, the top 5 AR resources in the sequence can be determined as the AR resources to be loaded. In this way, the loading speed of AR resources can be guaranteed and the user experience can be improved.
  • the first electronic device may collect an image of the current environment, and send positioning information to the second electronic device according to the environment image.
  • the second electronic device can perform visual positioning according to an image of the environment where the first electronic device is located, so as to obtain the position information of the first electronic device.
  • the second electronic device may determine the range construction data, and use the position information of the first electronic device as a center point to construct the range to be loaded.
  • the first electronic device After receiving the identification information of the AR resource to be loaded, the first electronic device compares it with the locally cached AR resource, and the AR resource identified by the identification information of the AR resource to be loaded is not cached locally, or the locally cached AR resource identified by the identification information of the AR resource to be loaded is not cached locally.
  • the version information is inconsistent with the AR resource version information of the AR resource to be loaded, it may be determined that the identification information of the AR resource to be loaded is the identification information of the target AR resource, and a resource acquisition request is sent to the second electronic device according to the identification information of the target AR resource .
  • the second electronic device acquires the target AR resource according to the resource acquisition request, and sends the target AR resource to the first electronic device.
  • the first electronic device receives the cache and displays the target AR resource, and after the time period T or when the distance moved by the first electronic device exceeds the distance threshold, the above process is repeated.
  • the resource loading method provided by the embodiment of the present disclosure can load the corresponding target AR resource according to the location information of the first electronic device, which alleviates the excessively large installation package of the AR application caused by packaging and downloading all the AR resources when downloading the AR application.
  • the problem In some embodiments, after the AR game application or AR navigation application is started, the user does not need to wait for all AR resources to be updated to complete the AR game or AR navigation.
  • the location information of the electronic device loads AR resources, which improves the user experience.
  • the present disclosure also provides resource loading apparatuses, electronic devices, computer-readable storage media, and programs, all of which can be used to implement any resource loading method provided by the present disclosure.
  • resource loading apparatuses electronic devices, computer-readable storage media, and programs, all of which can be used to implement any resource loading method provided by the present disclosure.
  • FIG. 6 shows a block diagram of a resource loading apparatus according to an embodiment of the present disclosure.
  • the apparatus is applied to a first electronic device.
  • the apparatus includes: a sending module 61, which can be configured to send to a second electronic device Positioning information, where the positioning information is used to enable the second electronic device to determine the position information of the first electronic device according to the positioning information, and to determine the augmented reality AR resource to be loaded according to the position information of the first electronic device ;
  • the receiving module 62 may be configured to receive the AR resource to be loaded sent by the second electronic device, and to display the AR resource to be loaded accordingly.
  • the first electronic device can send positioning information to the second electronic device, so that the second electronic device determines the position information of the first electronic device according to the positioning information, and determines the position information of the first electronic device according to the position of the first electronic device.
  • the information determines the AR resource to be loaded, and then the first electronic device may receive the AR resource to be loaded sent by the second electronic device, and display the AR resource to be loaded accordingly.
  • the resource loading apparatus provided by the embodiment of the present disclosure, the corresponding AR resource to be loaded can be determined and loaded according to the location information of the first electronic device, which alleviates the AR application caused by packaging and downloading all AR resources when downloading the AR application.
  • the problem that the installation package is too large makes the installation package of the AR application lightweight, which improves the download and installation efficiency of the AR application without affecting the user's use.
  • the receiving module may be further configured to: receive the identification information of the AR resource to be loaded sent by the second electronic device; from the identification information of the AR resource to be loaded, Determine the identification information of the target AR resource; carry the identification information of the target AR resource in the AR resource acquisition request, and send the AR resource acquisition request to the second electronic device, and the AR resource acquisition request is used to make the AR resource acquisition request
  • the second electronic device acquires the target AR resource corresponding to the identification information of the target AR resource according to the AR resource acquisition request; and receives and displays the target AR resource sent by the second electronic device.
  • the receiving module may be further configured to: receive the AR resource to be loaded sent by the second electronic device; determine the target AR resource from the AR resource to be loaded; display the AR resource to be loaded; Describe the target AR resource.
  • the sending module may also be configured to send positioning information to the second electronic device in response to any of the following conditions: within a time period, the distance moved by the first electronic device is greater than distance threshold; within the time period, the real-time location information of the first electronic device is located outside the positioning area; when the previous time period ends, a new time period starts; wherein, the positioning area is based on the first time period
  • the position information corresponding to the electronic device at the initial moment of the time period is the center area.
  • the identification information of the AR resource to be loaded includes AR resource identification and AR resource version information
  • the receiving module may also be used to: for any identification information of the AR resource to be loaded, in the local If the AR resource corresponding to the AR resource identifier is not cached, or if the locally cached AR resource version information of the AR resource corresponding to the AR resource identifier is inconsistent with the AR resource version information, determine the AR resource.
  • the identification information of the AR resource to be loaded is the identification information of the target AR resource.
  • the positioning information may include an environment image where the first electronic device is located, and the environment image is used to enable the second electronic device to determine the first electronic device according to the environment image. Location information of electronic devices.
  • Fig. 7 shows a block diagram of a resource loading apparatus according to an embodiment of the present disclosure.
  • the apparatus is applied to a second electronic device.
  • the apparatus includes: a receiving module 71, which can be configured to receive data sent by the first electronic device
  • the first determining module 72 can be used to determine the location information of the first electronic device according to the positioning information
  • the second determining module 73 can be used to determine the location information of the first electronic device from the enhanced
  • the AR resource to be loaded is determined from the actual AR resource
  • the sending module 74 may be configured to send the AR resource to be loaded to the first electronic device, wherein the AR resource to be loaded is displayed in the first electronic device.
  • the second electronic device can receive the positioning information sent by the first electronic device, and determine the position information of the first electronic device according to the positioning information.
  • the second electronic device may determine the AR resource to be loaded from the augmented reality AR resource according to the location information of the first electronic device, and send the AR resource to be loaded to the first electronic device, so that the first electronic device
  • the device displays the AR resource to be loaded accordingly.
  • AR resources can be loaded gradually according to the location information of the first electronic device, which alleviates the problem of excessively large installation packages of AR applications caused by downloading all AR resources when downloading AR applications. The problem makes the installation package of the AR application lightweight, and improves the download and installation efficiency of the AR application without affecting the user's use.
  • the sending module may be further configured to: send the identification information of the AR resource to be loaded to the first electronic device, where the identification information of the AR resource to be loaded is used for Make the first electronic device determine the identification information of the target AR resource from the identification information of the AR resource to be loaded; receive an AR resource acquisition request sent by the first electronic device, where the AR resource acquisition request carries the identification information of the target AR resource; in response to the AR resource acquisition request, acquire the target AR resource corresponding to the identification information of the target AR resource, and send the target AR resource to the first electronic device, wherein the The target AR resource is displayed in the first electronic device.
  • the second determining module may be further configured to: determine the to-be-loaded range according to the location information of the first electronic device; for any AR resource, at the location corresponding to the AR resource When the information is within the to-be-loaded range, it is determined that the AR resource is the to-be-loaded AR resource.
  • the second determining module may be further configured to: determine range construction data; and determine the to-be-loaded range according to the location information of the first electronic device and the range construction data.
  • the positioning information further includes the network signal quality of the first electronic device and/or the moving speed of the first electronic device
  • the second determining module may also be used for : determining range construction data corresponding to the network signal quality according to the network signal quality; and/or determining range construction data corresponding to the movement speed according to the movement speed.
  • the second determining module may be further configured to: determine the initial range to be loaded according to the location information of the first electronic device and the range construction data; determine that the location information is located in the The number of AR resources in the range to be loaded initially; the range construction data is adjusted according to the number of AR resources to obtain the adjusted range construction data; the range construction data is adjusted according to the adjusted range construction data and the first electronic device. location information, to determine the to-be-loaded range.
  • the second determining module may be further configured to: determine the distance between the location information of each AR resource and the location information of the first electronic device; After sorting from small to large, the first preset number of AR resources are determined as AR resources to be loaded.
  • the positioning information includes an image of the environment where the first electronic device is located
  • the first determining module may be further configured to: determine the The first electronic device performs visual positioning to obtain location information of the first electronic device.
  • the functions or modules included in the apparatuses provided in the embodiments of the present disclosure may be used to execute the methods described in the above method embodiments.
  • Embodiments of the present disclosure further provide a computer-readable storage medium, on which computer program instructions are stored, and when the computer program instructions are executed by a processor, the foregoing method is implemented.
  • the computer-readable storage medium may be a non-volatile computer-readable storage medium.
  • An embodiment of the present disclosure further provides an electronic device, including: a processor; a memory for storing instructions executable by the processor; wherein the processor is configured to invoke the instructions stored in the memory to execute the above method.
  • Embodiments of the present disclosure also provide a computer program product, including computer-readable codes.
  • a processor in the device executes a method for implementing the resource loading method provided by any of the above embodiments. instruction.
  • Embodiments of the present disclosure further provide another computer program product for storing computer-readable instructions, which, when executed, cause a computer to perform operations of the resource loading method provided by any of the foregoing embodiments.
  • the electronic device may be provided as a terminal, server or other form of device.
  • FIG. 8 shows a block diagram of an electronic device 800 according to an embodiment of the present disclosure.
  • electronic device 800 may be a mobile phone, computer, digital broadcast terminal, messaging device, game console, tablet device, medical device, fitness device, personal digital assistant, etc. terminal.
  • an electronic device 800 may include one or more of the following components: a processing component 802, a memory 804, a power supply component 806, a multimedia component 808, an audio component 810, an input/output (I/O) interface 812, a sensor component 814 , and the communication component 816 .
  • the processing component 802 generally controls the overall operation of the electronic device 800, such as operations associated with display, phone calls, data communications, camera operations, and recording operations.
  • the processing component 802 can include one or more processors 820 to execute instructions to perform all or some of the steps of the methods described above.
  • processing component 802 may include one or more modules that facilitate interaction between processing component 802 and other components.
  • processing component 802 may include a multimedia module to facilitate interaction between multimedia component 808 and processing component 802.
  • Memory 804 is configured to store various types of data to support operation at electronic device 800 . Examples of such data include instructions for any application or method operating on electronic device 800, contact data, phonebook data, messages, pictures, videos, and the like. Memory 804 may be implemented by any type of volatile or nonvolatile storage device or combination thereof, such as static random access memory (SRAM), electrically erasable programmable read only memory (EEPROM), erasable Programmable Read Only Memory (EPROM), Programmable Read Only Memory (PROM), Read Only Memory (ROM), Magnetic Memory, Flash Memory, Magnetic or Optical Disk.
  • SRAM static random access memory
  • EEPROM electrically erasable programmable read only memory
  • EPROM erasable Programmable Read Only Memory
  • PROM Programmable Read Only Memory
  • ROM Read Only Memory
  • Magnetic Memory Flash Memory
  • Magnetic or Optical Disk Magnetic Disk
  • Power supply assembly 806 provides power to various components of electronic device 800 .
  • Power supply components 806 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power to electronic device 800 .
  • Multimedia component 808 includes a screen that provides an output interface between the electronic device 800 and the user.
  • the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from a user.
  • the touch panel includes one or more touch sensors to sense touch, swipe, and gestures on the touch panel. The touch sensor may not only sense the boundaries of a touch or swipe action, but also detect the duration and pressure associated with the touch or swipe action.
  • the multimedia component 808 includes a front-facing camera and/or a rear-facing camera. When the electronic device 800 is in an operation mode, such as a shooting mode or a video mode, the front camera and/or the rear camera may receive external multimedia data. Each of the front and rear cameras can be a fixed optical lens system or have focal length and optical zoom capability.
  • Audio component 810 is configured to output and/or input audio signals.
  • audio component 810 includes a microphone (MIC) that is configured to receive external audio signals when electronic device 800 is in operating modes, such as calling mode, recording mode, and voice recognition mode.
  • the received audio signal may be further stored in memory 804 or transmitted via communication component 816 .
  • audio component 810 also includes a speaker for outputting audio signals.
  • the I/O interface 812 provides an interface between the processing component 802 and a peripheral interface module, which may be a keyboard, a click wheel, a button, or the like. These buttons may include, but are not limited to: home button, volume buttons, start button, and lock button.
  • Sensor assembly 814 includes one or more sensors for providing status assessment of various aspects of electronic device 800 .
  • the sensor assembly 814 can detect the on/off state of the electronic device 800, the relative positioning of the components, such as the display and the keypad of the electronic device 800, the sensor assembly 814 can also detect the electronic device 800 or one of the electronic device 800 Changes in the position of components, presence or absence of user contact with the electronic device 800 , orientation or acceleration/deceleration of the electronic device 800 and changes in the temperature of the electronic device 800 .
  • Sensor assembly 814 may include a proximity sensor configured to detect the presence of nearby objects in the absence of any physical contact.
  • Sensor assembly 814 may also include a light sensor, such as a complementary metal oxide semiconductor (CMOS) or charge coupled device (CCD) image sensor, for use in imaging applications.
  • CMOS complementary metal oxide semiconductor
  • CCD charge coupled device
  • the sensor assembly 814 may also include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
  • Communication component 816 is configured to facilitate wired or wireless communication between electronic device 800 and other devices.
  • the electronic device 800 may access a wireless network based on a communication standard, such as wireless network (WiFi), second generation mobile communication technology (2G) or third generation mobile communication technology (3G), or a combination thereof.
  • the communication component 816 receives broadcast signals or broadcast related information from an external broadcast management system via a broadcast channel.
  • the communication component 816 also includes a near field communication (NFC) module to facilitate short-range communication.
  • the NFC module may be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology and other technologies.
  • RFID radio frequency identification
  • IrDA infrared data association
  • UWB ultra-wideband
  • Bluetooth Bluetooth
  • electronic device 800 may be implemented by one or more application specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable A programmed gate array (FPGA), controller, microcontroller, microprocessor or other electronic component implementation is used to perform the above method.
  • ASICs application specific integrated circuits
  • DSPs digital signal processors
  • DSPDs digital signal processing devices
  • PLDs programmable logic devices
  • FPGA field programmable A programmed gate array
  • controller microcontroller, microprocessor or other electronic component implementation is used to perform the above method.
  • a non-volatile computer-readable storage medium such as a memory 804 comprising computer program instructions executable by the processor 820 of the electronic device 800 to perform the above method is also provided.
  • FIG. 9 shows a block diagram of an electronic device 1900 according to an embodiment of the present disclosure.
  • the electronic device 1900 may be provided as a server.
  • electronic device 1900 includes processing component 1922, which further includes one or more processors, and a memory resource represented by memory 1932 for storing instructions executable by processing component 1922, such as applications.
  • An application program stored in memory 1932 may include one or more modules, each corresponding to a set of instructions.
  • the processing component 1922 is configured to execute instructions to perform the above-described methods.
  • the electronic device 1900 may also include a power supply assembly 1926 configured to perform power management of the electronic device 1900, a wired or wireless network interface 1950 configured to connect the electronic device 1900 to a network, and an input output (I/O) interface 1958 .
  • the electronic device 1900 can operate based on an operating system stored in the memory 1932, such as a Microsoft server operating system (Windows Server TM ), a graphical user interface based operating system (Mac OS X TM ) introduced by Apple, a multi-user multi-process computer operating system (Unix TM ), Free and Open Source Unix-like Operating System (Linux TM ), Open Source Unix-like Operating System (FreeBSD TM ) or the like.
  • Microsoft server operating system Windows Server TM
  • Mac OS X TM graphical user interface based operating system
  • Uniix TM multi-user multi-process computer operating system
  • Free and Open Source Unix-like Operating System Linux TM
  • FreeBSD TM Open Source Unix-like Operating System
  • a non-volatile computer-readable storage medium such as memory 1932 comprising computer program instructions executable by processing component 1922 of electronic device 1900 to perform the above-described method.
  • the present disclosure may be a system, method and/or computer program product.
  • the computer program product may include a computer-readable storage medium having computer-readable program instructions loaded thereon for causing a processor to implement various aspects of the embodiments of the present disclosure.
  • a computer-readable storage medium may be a tangible device that can hold and store instructions for use by the instruction execution device.
  • the computer-readable storage medium may be, for example, but not limited to, an electrical storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, or any suitable combination of the foregoing.
  • Non-exhaustive list of computer readable storage media include: portable computer disks, hard disks, random access memory (RAM), read only memory (ROM), erasable programmable read only memory (EPROM) or flash memory), static random access memory (SRAM), portable compact disk read only memory (CD-ROM), digital versatile disk (DVD), memory sticks, floppy disks, mechanically coded devices, such as printers with instructions stored thereon Hole cards or raised structures in grooves, and any suitable combination of the above.
  • RAM random access memory
  • ROM read only memory
  • EPROM erasable programmable read only memory
  • flash memory static random access memory
  • SRAM static random access memory
  • CD-ROM compact disk read only memory
  • DVD digital versatile disk
  • memory sticks floppy disks
  • mechanically coded devices such as printers with instructions stored thereon Hole cards or raised structures in grooves, and any suitable combination of the above.
  • Computer-readable storage media are not to be construed as transient signals per se, such as radio waves or other freely propagating electromagnetic waves, electromagnetic waves propagating through waveguides or other transmission media (eg, light pulses through fiber optic cables), or through electrical wires transmitted electrical signals.
  • the computer readable program instructions described herein may be downloaded to various computing/processing devices from a computer readable storage medium, or to an external computer or external storage device over a network such as the Internet, a local area network, a wide area network, and/or a wireless network.
  • the network may include copper transmission cables, fiber optic transmission, wireless transmission, routers, firewalls, switches, gateway computers, and/or edge servers.
  • a network adapter card or network interface in each computing/processing device receives computer-readable program instructions from a network and forwards the computer-readable program instructions for storage in a computer-readable storage medium in each computing/processing device .
  • Computer program instructions for carrying out operations of the present disclosure may be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-dependent instructions, microcode, firmware instructions, state setting data, or instructions in one or more programming languages.
  • Source or object code written in any combination, including object-oriented programming languages, such as Smalltalk, C++, etc., and conventional procedural programming languages, such as the "C" language or similar programming languages.
  • the computer readable program instructions may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer, or entirely on the remote computer or server implement.
  • the remote computer may be connected to the user's computer through any kind of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (eg, using an Internet service provider through the Internet connect).
  • LAN local area network
  • WAN wide area network
  • custom electronic circuits such as programmable logic circuits, field programmable gate arrays (FPGAs), or programmable logic arrays (PLAs)
  • FPGAs field programmable gate arrays
  • PDAs programmable logic arrays
  • Computer readable program instructions are executed to implement various aspects of the embodiments of the present disclosure.
  • These computer readable program instructions may be provided to a processor of a general purpose computer, special purpose computer or other programmable data processing apparatus to produce a machine that causes the instructions when executed by the processor of the computer or other programmable data processing apparatus , resulting in means for implementing the functions/acts specified in one or more blocks of the flowchart and/or block diagrams.
  • These computer readable program instructions can also be stored in a computer readable storage medium, these instructions cause a computer, programmable data processing apparatus and/or other equipment to operate in a specific manner, so that the computer readable medium on which the instructions are stored includes An article of manufacture comprising instructions for implementing various aspects of the functions/acts specified in one or more blocks of the flowchart and/or block diagrams.
  • Computer readable program instructions can also be loaded onto a computer, other programmable data processing apparatus, or other equipment to cause a series of operational steps to be performed on the computer, other programmable data processing apparatus, or other equipment to produce a computer-implemented process , thereby causing instructions executing on a computer, other programmable data processing apparatus, or other device to implement the functions/acts specified in one or more blocks of the flowcharts and/or block diagrams.
  • each block in the flowchart or block diagrams may represent a module, segment, or portion of instructions, which comprises one or more functions for implementing the specified logical function(s) executable instructions.
  • the functions noted in the blocks may occur out of the order noted in the figures. For example, two blocks in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved.
  • each block of the block diagrams and/or flowchart illustrations, and combinations of blocks in the block diagrams and/or flowchart illustrations can be implemented in dedicated hardware-based systems that perform the specified functions or actions , or can be implemented in a combination of dedicated hardware and computer instructions.
  • the computer program product can be specifically implemented by hardware, software or a combination thereof.
  • the computer program product is embodied as a computer storage medium, and in another optional embodiment, the computer program product is embodied as a software product, such as a software development kit (Software Development Kit, SDK), etc. Wait.
  • a software development kit Software Development Kit, SDK
  • the present disclosure provides a resource loading method and apparatus, an electronic device, a storage medium and a program, wherein positioning information is sent to a second electronic device, where the positioning information is used to enable the second electronic device to determine according to the positioning information the location information of the first electronic device, and determine the augmented reality AR resource to be loaded according to the location information of the first electronic device; receive the AR resource to be loaded sent by the second electronic device, and Load AR resources for corresponding display.

Abstract

The present disclosure relates to a resource loading method and apparatus, an electronic device, a storage medium, and a program. The method comprises: sending positioning information to a second electronic device, the positioning information being used for enabling the second electronic device to determine position information of a first electronic device according to the positioning information, and determining, according to the position information of the first electronic device, an augmented reality (AR) resource to be loaded; and receiving said AR resource sent from the second electronic device, and correspondingly displaying said AR resource. According to the embodiments of the present invention, a lightweight AR installation package can be achieved, thereby improving the download and installation efficiency of an AR application.

Description

资源加载方法及装置、电子设备和存储介质及程序Resource loading method and apparatus, electronic device, storage medium and program
相关申请的交叉引用CROSS-REFERENCE TO RELATED APPLICATIONS
本公开基于申请号为202011357349.2、申请日为2020年11月27日的中国专利申请提出,并要求该中国专利申请的优先权,该中国专利申请的全部内容在此引入本公开作为参考。The present disclosure is based on a Chinese patent application with application number 202011357349.2 and an application date of November 27, 2020, and claims the priority of the Chinese patent application, the entire contents of which are incorporated herein by reference.
技术领域technical field
本公开涉及计算机技术领域,尤其涉及一种资源加载方法及装置、电子设备和存储介质及程序。The present disclosure relates to the field of computer technologies, and in particular, to a resource loading method and apparatus, an electronic device, a storage medium, and a program.
背景技术Background technique
AR(Augmented Reality,增强现实)技术是一种将虚拟信息与真实世界巧妙融合的技术,广泛运用了多媒体、三维建模、实时跟踪及注册、智能交互和传感等多种技术手段。将计算机生成的文字、图像、三维模型、音乐、视频等虚拟信息模拟仿真后,应用到真实世界中,两种信息互为补充,从而实现对真实世界的“增强”。AR技术广泛应用到了各个领域,例如:AR导航、AR游戏等。AR (Augmented Reality, Augmented Reality) technology is a technology that ingeniously integrates virtual information with the real world. It widely uses multimedia, three-dimensional modeling, real-time tracking and registration, intelligent interaction and sensing. The computer-generated text, images, three-dimensional models, music, videos and other virtual information are simulated and applied to the real world, and the two kinds of information complement each other, thereby realizing the "enhancement" of the real world. AR technology is widely used in various fields, such as: AR navigation, AR games, etc.
发明内容SUMMARY OF THE INVENTION
本公开提出了一种用于加载AR资源的资源加载技术方案。The present disclosure proposes a resource loading technical solution for loading AR resources.
根据本公开实施例的一方面,提供了一种资源加载方法,应用于第一电子设备,包括:According to an aspect of the embodiments of the present disclosure, a resource loading method is provided, applied to a first electronic device, including:
向第二电子设备发送定位信息,所述定位信息用于使所述第二电子设备根据所述定位信息确定所述第一电子设备的位置信息,并根据所述第一电子设备的位置信息确定待加载增强现实AR资源;Sending positioning information to the second electronic device, where the positioning information is used to enable the second electronic device to determine the position information of the first electronic device according to the positioning information, and determine the position information according to the position information of the first electronic device Augmented reality AR resources to be loaded;
接收所述第二电子设备发送的所述待加载AR资源,并对所述待加载AR资源进行相应展示。Receive the AR resource to be loaded sent by the second electronic device, and display the AR resource to be loaded accordingly.
在一种可能的实现方式中,所述接收所述第二电子设备发送的所述待加载AR资源,并对所述待加载AR资源进行相应展示,包括:接收所述第二电子设备发送的所述待加载AR资源的标识信息;从所述待加载AR资源的标识信息中,确定目标AR资源的标识信息;将所述目标AR资源的标识信息携带于AR资源获取请求,并向所述第二电子设备发送AR资源获取请求,所述AR资源获取请求用于使所述第二电子设备响应于所述AR资源获取请求获取所述目标AR资源的标识信息对应的目标AR资源;接收并展示所述第二电子设备发送的所述目标AR资源。In a possible implementation manner, the receiving the AR resource to be loaded sent by the second electronic device, and correspondingly displaying the AR resource to be loaded, includes: receiving the AR resource sent by the second electronic device. The identification information of the AR resource to be loaded; the identification information of the target AR resource is determined from the identification information of the AR resource to be loaded; the identification information of the target AR resource is carried in the AR resource acquisition request, and sent to the AR resource acquisition request. The second electronic device sends an AR resource acquisition request, where the AR resource acquisition request is used to enable the second electronic device to acquire the target AR resource corresponding to the identification information of the target AR resource in response to the AR resource acquisition request; receive and The target AR resource sent by the second electronic device is displayed.
在一种可能的实现方式中,所述接收所述第二电子设备发送的所述待加载AR资源,并对所述待加载AR资源进行相应展示,包括:接收所述第二电子设备发送的所述待加载AR资源;从所述待加载AR资源中确定目标AR资源;展示所述目标AR资源。In a possible implementation manner, the receiving the AR resource to be loaded sent by the second electronic device, and correspondingly displaying the AR resource to be loaded, includes: receiving the AR resource sent by the second electronic device. The AR resource to be loaded; the target AR resource is determined from the AR resource to be loaded; the target AR resource is displayed.
在一种可能的实现方式中,响应于以下任一种情况,所述向第二电子设备发送定位信息,包括:在时间周期内,所述第一电子设备移动的距离大于距离阈值;在所述时间周期内,所述第一电子设备的实时位置信息位于定位区域外;在上一时间周期结束,开始新一时间周期;其中,所述定位区域为以所述第一电子设备在所述时间周期初始时刻对应的位置信息为中心的区域。In a possible implementation manner, in response to any one of the following situations, the sending the positioning information to the second electronic device includes: within a time period, the distance moved by the first electronic device is greater than a distance threshold; During the time period, the real-time location information of the first electronic device is located outside the positioning area; when the previous time period ends, a new time period starts; wherein, the positioning area is based on the location of the first electronic device in the The location information corresponding to the initial time of the time period is the center area.
在一种可能的实现方式中,所述待加载AR资源的标识信息包括AR资源标识及AR资源版本信息,所述从所述待加载AR资源的标识信息中,确定目标AR资源的标识信息,包括:针对任一待加载AR资源的标识信息,在本地未缓存所述AR资源标识对应的AR资 源的情况下,或者在本地缓存的所述AR资源标识对应的AR资源的AR资源版本信息,与所述AR资源版本信息不一致的情况下,确定所述待加载AR资源的标识信息为所述目标AR资源的标识信息。In a possible implementation manner, the identification information of the AR resource to be loaded includes an AR resource identification and AR resource version information, and the identification information of the target AR resource is determined from the identification information of the AR resource to be loaded, Including: for the identification information of any AR resource to be loaded, in the case that the AR resource corresponding to the AR resource identifier is not cached locally, or the locally cached AR resource version information of the AR resource corresponding to the AR resource identifier, In the case of inconsistency with the AR resource version information, it is determined that the identification information of the AR resource to be loaded is the identification information of the target AR resource.
在一种可能的实现方式中,所述定位信息中包括所述第一电子设备所在的环境图像,所述环境图像用于使所述第二电子设备根据所述环境图像确定所述第一电子设备的位置信息。In a possible implementation manner, the positioning information includes an environment image where the first electronic device is located, and the environment image is used to enable the second electronic device to determine the first electronic device according to the environment image Location information of the device.
根据本公开实施例的一方面,提供了一种资源加载方法,应用于第二电子设备,包括:According to an aspect of the embodiments of the present disclosure, a resource loading method is provided, applied to a second electronic device, including:
接收第一电子设备发送的定位信息;receiving the positioning information sent by the first electronic device;
根据所述定位信息确定所述第一电子设备的位置信息;Determine location information of the first electronic device according to the location information;
根据所述第一电子设备的位置信息从增强现实AR资源中确定待加载AR资源;Determine the AR resource to be loaded from the augmented reality AR resource according to the location information of the first electronic device;
向所述第一电子设备发送所述待加载AR资源,其中,所述待加载AR资源展示于所述第一电子设备中。Sending the AR resource to be loaded to the first electronic device, wherein the AR resource to be loaded is displayed in the first electronic device.
在一种可能的实现方式中,所述向所述第一电子设备发送所述待加载AR资源,包括:向所述第一电子设备发送所述待加载AR资源的标识信息,其中,所述待加载AR资源的标识信息用于使所述第一电子设备从所述待加载AR资源的标识信息中确定目标AR资源的标识信息;In a possible implementation manner, the sending the AR resource to be loaded to the first electronic device includes: sending identification information of the AR resource to be loaded to the first electronic device, wherein the AR resource to be loaded is sent to the first electronic device. The identification information of the AR resource to be loaded is used to enable the first electronic device to determine the identification information of the target AR resource from the identification information of the AR resource to be loaded;
接收所述第一电子设备发送的AR资源获取请求,所述AR资源获取请求中携带所述目标AR资源的标识信息;receiving an AR resource acquisition request sent by the first electronic device, where the AR resource acquisition request carries the identification information of the target AR resource;
响应于所述AR资源获取请求,获取所述目标AR资源的标识信息对应的目标AR资源,并向所述第一电子设备发送所述目标AR资源,其中,所述目标AR资源展示于所述第一电子设备中。In response to the AR resource acquisition request, acquire the target AR resource corresponding to the identification information of the target AR resource, and send the target AR resource to the first electronic device, wherein the target AR resource is displayed on the in the first electronic device.
在一种可能的实现方式中,所述根据所述第一电子设备的位置信息从增强现实AR资源中确定待加载AR资源,包括:根据所述第一电子设备的位置信息确定待加载范围;针对任一AR资源,在所述AR资源对应的位置信息位于所述待加载范围内的情况下,确定所述AR资源为待加载AR资源。In a possible implementation manner, the determining the AR resource to be loaded from the augmented reality AR resource according to the location information of the first electronic device includes: determining the range to be loaded according to the location information of the first electronic device; For any AR resource, if the location information corresponding to the AR resource is located within the to-be-loaded range, the AR resource is determined to be the to-be-loaded AR resource.
在一种可能的实现方式中,所述根据所述第一电子设备的位置信息确定待加载范围,包括:确定范围构建数据;根据所述第一电子设备的位置信息及所述范围构建数据,确定所述待加载范围。In a possible implementation manner, the determining the range to be loaded according to the location information of the first electronic device includes: determining range construction data; and according to the location information of the first electronic device and the range construction data, Determine the to-be-loaded range.
在一种可能的实现方式中,所述定位信息中还包括所述第一电子设备的网络信号质量和/或所述第一电子设备的移动速度,所述确定范围构建数据,包括:根据所述网络信号质量,确定与所述网络信号质量相对应的范围构建数据;和/或,根据所述移动速度,确定与所述移动速度相对应的范围构建数据。In a possible implementation manner, the positioning information further includes the network signal quality of the first electronic device and/or the moving speed of the first electronic device, and the determining the range construction data includes: according to the network signal quality, and determine the range construction data corresponding to the network signal quality; and/or, according to the movement speed, determine the range construction data corresponding to the movement speed.
在一种可能的实现方式中,所述根据所述第一电子设备的位置信息及所述范围构建数据,确定所述待加载范围,包括:根据所述第一电子设备的位置信息及所述范围构建数据,确定初始待加载范围;确定位置信息位于所述初始待加载范围内的AR资源的数量;根据所述AR资源的数量调整所述范围构建数据,得到调整后的范围构建数据;根据所述调整后的范围构建数据及所述第一电子设备的位置信息,确定所述待加载范围。In a possible implementation manner, the determining the to-be-loaded range according to the location information of the first electronic device and the range construction data includes: according to the location information of the first electronic device and the range construction data range construction data, determine the initial range to be loaded; determine the number of AR resources whose location information is within the initial range to be loaded; adjust the range construction data according to the number of AR resources to obtain the adjusted range construction data; The adjusted range construction data and the location information of the first electronic device determine the to-be-loaded range.
在一种可能的实现方式中,所述根据所述第一电子设备的位置信息从增强现实AR资源中确定待加载AR资源,包括:确定各AR资源的位置信息与所述第一电子设备的位置信息之间的距离;将各AR资源按照距离由小到大进行排序后,将前预置数量个AR资源确定为所述待加载AR资源。In a possible implementation manner, the determining the AR resource to be loaded from the augmented reality AR resource according to the location information of the first electronic device includes: determining the location information of each AR resource and the location information of the first electronic device. The distance between the location information; after sorting the AR resources according to the distance from small to large, the first preset number of AR resources are determined as the AR resources to be loaded.
在一种可能的实现方式中,所述定位信息中包括所述第一电子设备所在的环境图像,所述根据所述定位信息确定所述第一电子设备的位置信息,包括:根据第一电子设备所在的环境图像对所述第一电子设备进行视觉定位,得到所述第一电子设备的位置信息。In a possible implementation manner, the positioning information includes an image of an environment where the first electronic device is located, and the determining the position information of the first electronic device according to the positioning information includes: according to the first electronic device The image of the environment where the device is located visually locates the first electronic device to obtain location information of the first electronic device.
根据本公开实施例的一方面,提供了一种资源加载装置,应用于第一电子设备,所述装置包括:According to an aspect of the embodiments of the present disclosure, there is provided a resource loading apparatus, which is applied to a first electronic device, and the apparatus includes:
发送模块,用于向第二电子设备发送定位信息,所述定位信息用于使所述第二电子设备根据所述定位信息确定所述第一电子设备的位置信息,并根据所述第一电子设备的位置信息确定待加载增强现实AR资源;A sending module, configured to send positioning information to a second electronic device, where the positioning information is used to enable the second electronic device to determine the position information of the first electronic device according to the positioning information, and to determine the position information of the first electronic device according to the positioning information The location information of the device determines the augmented reality AR resources to be loaded;
接收模块,用于接收所述第二电子设备发送的所述待加载AR资源,并对所述待加载AR资源进行相应展示。A receiving module, configured to receive the AR resource to be loaded sent by the second electronic device, and to display the AR resource to be loaded accordingly.
在一种可能的实现方式中,所述接收模块,还用于:接收所述第二电子设备发送的所述待加载AR资源的标识信息;从所述待加载AR资源的标识信息中,确定目标AR资源的标识信息;In a possible implementation manner, the receiving module is further configured to: receive the identification information of the AR resource to be loaded sent by the second electronic device; determine from the identification information of the AR resource to be loaded Identification information of the target AR resource;
将所述目标AR资源的标识信息携带于AR资源获取请求,并向所述第二电子设备发送AR资源获取请求,所述AR资源获取请求用于使所述第二电子设备响应于所述AR资源获取请求获取所述目标AR资源的标识信息对应的目标AR资源;接收并展示所述第二电子设备发送的所述目标AR资源。Carrying the identification information of the target AR resource in the AR resource acquisition request, and sending an AR resource acquisition request to the second electronic device, where the AR resource acquisition request is used to make the second electronic device respond to the AR The resource acquisition request acquires the target AR resource corresponding to the identification information of the target AR resource; and receives and displays the target AR resource sent by the second electronic device.
在一种可能的实现方式中,所述接收模块,还用于:接收所述第二电子设备发送的所述待加载AR资源;从所述待加载AR资源中确定目标AR资源;展示所述目标AR资源。In a possible implementation manner, the receiving module is further configured to: receive the AR resource to be loaded sent by the second electronic device; determine the target AR resource from the AR resource to be loaded; display the AR resource to be loaded; Target AR resource.
在一种可能的实现方式中,所述发送模块,还用于响应于以下任一种情况,向第二电子设备发送定位信息:在时间周期内,所述第一电子设备移动的距离大于距离阈值;在所述时间周期内,所述第一电子设备的实时位置信息位于定位区域外;在上一时间周期结束,开始新一时间周期;其中,所述定位区域为以所述第一电子设备在所述时间周期初始时刻对应的位置信息为中心的区域。In a possible implementation manner, the sending module is further configured to send positioning information to the second electronic device in response to any one of the following conditions: within a time period, the distance moved by the first electronic device is greater than the distance threshold; within the time period, the real-time location information of the first electronic device is located outside the positioning area; when the previous time period ends, a new time period starts; wherein, the positioning area is based on the first electronic device The location information corresponding to the device at the initial moment of the time period is the center of the area.
在一种可能的实现方式中,所述待加载AR资源的标识信息包括AR资源标识及AR资源版本信息,所述接收模块还用于:针对任一待加载AR资源的标识信息,在本地未缓存所述AR资源标识对应的AR资源的情况下,或者在本地缓存的所述AR资源标识对应的AR资源的AR资源版本信息,与所述AR资源版本信息不一致的情况下,确定所述待加载AR资源的标识信息为目标AR资源的标识信息。In a possible implementation manner, the identification information of the AR resource to be loaded includes the AR resource identification and the AR resource version information, and the receiving module is further configured to: for any identification information of the AR resource to be loaded, the identification information of the AR resource to be loaded is not stored locally. If the AR resource corresponding to the AR resource identifier is cached, or if the locally cached AR resource version information of the AR resource corresponding to the AR resource identifier is inconsistent with the AR resource version information, determine the pending AR resource. The identification information of the loaded AR resource is the identification information of the target AR resource.
在一种可能的实现方式中,所述定位信息中包括所述第一电子设备所在的环境图像,所述环境图像用于使所述第二电子设备根据所述环境图像确定所述第一电子设备的位置信息。In a possible implementation manner, the positioning information includes an environment image where the first electronic device is located, and the environment image is used to enable the second electronic device to determine the first electronic device according to the environment image Location information of the device.
根据本公开实施例的一方面,提供了一种资源加载装置,应用于第二电子设备,所述装置包括:According to an aspect of the embodiments of the present disclosure, there is provided a resource loading apparatus, which is applied to a second electronic device, and the apparatus includes:
接收模块,用于接收第一电子设备发送的定位信息;a receiving module, configured to receive the positioning information sent by the first electronic device;
第一确定模块,用于根据所述定位信息确定所述第一电子设备的位置信息;a first determining module, configured to determine the location information of the first electronic device according to the location information;
第二确定模块,用于根据所述第一电子设备的位置信息从增强现实AR资源中,确定待加载AR资源;a second determining module, configured to determine the AR resource to be loaded from the augmented reality AR resource according to the location information of the first electronic device;
发送模块,用于向所述第一电子设备发送所述待加载AR资源,其中,所述待加载AR资源展示于所述第一电子设备中。A sending module, configured to send the AR resource to be loaded to the first electronic device, wherein the AR resource to be loaded is displayed in the first electronic device.
在一种可能的实现方式中,所述发送模块,还用于:In a possible implementation manner, the sending module is further configured to:
向所述第一电子设备发送所述待加载AR资源的标识信息,其中,所述待加载AR资源的标识信息用于使所述第一电子设备从所述待加载AR资源的标识信息中确定目标AR资源的标识信息;接收所述第一电子设备发送的AR资源获取请求,所述AR资源获取请求中携带所述目标AR资源的标识信息;响应于所述AR资源获取请求,获取所述目标AR资源的标识信息对应的目标AR资源,并向所述第一电子设备发送所述目标AR资源,其中,所述目标AR资源展示于所述第一电子设备中。Sending the identification information of the AR resource to be loaded to the first electronic device, where the identification information of the AR resource to be loaded is used to enable the first electronic device to determine from the identification information of the AR resource to be loaded identification information of the target AR resource; receiving an AR resource acquisition request sent by the first electronic device, the AR resource acquisition request carrying the identification information of the target AR resource; in response to the AR resource acquisition request, acquiring the AR resource acquisition request The target AR resource corresponding to the identification information of the target AR resource, and the target AR resource is sent to the first electronic device, wherein the target AR resource is displayed in the first electronic device.
在一种可能的实现方式中,所述第二确定模块,还用于:根据所述第一电子设备的 位置信息确定待加载范围;针对任一AR资源,在所述AR资源对应的位置信息位于所述待加载范围内的情况下,确定所述AR资源为所述待加载AR资源。In a possible implementation manner, the second determining module is further configured to: determine the to-be-loaded range according to the location information of the first electronic device; for any AR resource, the location information corresponding to the AR resource In the case of being within the to-be-loaded range, the AR resource is determined to be the to-be-loaded AR resource.
在一种可能的实现方式中,所述第二确定模块,还用于:确定范围构建数据;根据所述第一电子设备的位置信息及所述范围构建数据,确定所述待加载范围。In a possible implementation manner, the second determining module is further configured to: determine range construction data; and determine the to-be-loaded range according to the location information of the first electronic device and the range construction data.
在一种可能的实现方式中,所述定位信息中还包括所述第一电子设备的网络信号质量和/或所述第一电子设备的移动速度,所述第二确定模块,还用于:根据所述网络信号质量,确定与所述网络信号质量相对应的范围构建数据;和/或,根据所述移动速度,确定与所述移动速度相对应的范围构建数据。In a possible implementation manner, the positioning information further includes the network signal quality of the first electronic device and/or the moving speed of the first electronic device, and the second determining module is further configured to: According to the network signal quality, range construction data corresponding to the network signal quality is determined; and/or, based on the movement speed, range construction data corresponding to the movement speed is determined.
在一种可能的实现方式中,所述第二确定模块,还用于:根据所述第一电子设备的位置信息及所述范围构建数据,确定初始待加载范围;确定位置信息位于所述初始待加载范围内的AR资源的数量;根据所述AR资源的数量调整所述范围构建数据,得到调整后的范围构建数据;根据所述调整后的范围构建数据及所述第一电子设备的位置信息,确定所述待加载范围。In a possible implementation manner, the second determining module is further configured to: determine an initial range to be loaded according to the location information of the first electronic device and the range construction data; determine that the location information is located in the initial range the number of AR resources in the range to be loaded; adjust the range construction data according to the number of AR resources to obtain the adjusted range construction data; according to the adjusted range construction data and the position of the first electronic device information to determine the to-be-loaded range.
在一种可能的实现方式中,所述第二确定模块,还用于:确定各AR资源的位置信息与所述第一电子设备的位置信息之间的距离;将各AR资源按照距离由小到大进行排序后,将前预置数量个AR资源确定为所述待加载AR资源。In a possible implementation manner, the second determining module is further configured to: determine the distance between the location information of each AR resource and the location information of the first electronic device; After sorting to the largest, the first preset number of AR resources are determined as the AR resources to be loaded.
在一种可能的实现方式中,所述定位信息中包括所述第一电子设备所在的环境图像,所述第一确定模块,还用于:根据第一电子设备所在的环境图像对所述第一电子设备进行视觉定位,得到所述第一电子设备的位置信息。In a possible implementation manner, the positioning information includes an image of the environment where the first electronic device is located, and the first determining module is further configured to: determine the first electronic device according to the image of the environment where the first electronic device is located. An electronic device performs visual positioning to obtain location information of the first electronic device.
根据本公开实施例的一方面,提供了一种电子设备,包括:处理器;用于存储处理器可执行指令的存储器;其中,所述处理器被配置为调用所述存储器存储的指令,以执行上述方法。According to an aspect of the embodiments of the present disclosure, there is provided an electronic device, comprising: a processor; a memory for storing instructions executable by the processor; wherein the processor is configured to call the instructions stored in the memory to Perform the above method.
根据本公开实施例的一方面,提供了一种计算机可读存储介质,其上存储有计算机程序指令,所述计算机程序指令被处理器执行时实现上述方法。According to an aspect of the embodiments of the present disclosure, there is provided a computer-readable storage medium having computer program instructions stored thereon, the computer program instructions implementing the above method when executed by a processor.
本公开实施例提供一种计算机程序,包括计算机可读代码,当所述计算机可读代码在电子设备中运行时,所述电子设备中的处理器执行用于实现上述方法。An embodiment of the present disclosure provides a computer program, including computer-readable code, when the computer-readable code is executed in an electronic device, the processor in the electronic device executes the above method.
在本公开实施例中,第一电子设备可以向第二电子设备发送定位信息,所述定位信息用于使得所述第二电子设备根据所述定位信息确定所述第一电子设备的位置信息,并根据所述第一电子设备的位置信息确定待加载增强现实AR资源,进而第一电子设备可以接收所述第二电子设备发送的所述待加载AR资源,并对所述待加载AR资源进行相应展示。根据本公开实施例提供的资源加载方法及装置、电子设备和存储介质及程序,可以根据第一电子设备的位置信息确定并加载对应的待加载AR资源,缓解了下载AR应用程序时,打包下载全部的AR资源所导致的AR应用程序的安装包过大的问题,使得AR应用程序的安装包轻便,在不影响用户使用的情况下,提高了AR应用程序的下载安装效率。In this embodiment of the present disclosure, the first electronic device may send positioning information to the second electronic device, where the positioning information is used to enable the second electronic device to determine the position information of the first electronic device according to the positioning information, and determine the augmented reality AR resource to be loaded according to the location information of the first electronic device, and then the first electronic device can receive the AR resource to be loaded sent by the second electronic device, and perform the AR resource to be loaded. Display accordingly. According to the resource loading method and device, electronic device, storage medium and program provided by the embodiments of the present disclosure, the corresponding AR resource to be loaded can be determined and loaded according to the location information of the first electronic device, which alleviates the need to package and download an AR application when downloading an AR application. The problem that the installation package of the AR application is too large caused by all the AR resources makes the installation package of the AR application lightweight, and improves the download and installation efficiency of the AR application without affecting the user's use.
应当理解的是,以上的一般描述和后文的细节描述仅是示例性和解释性的,而非限制本公开。根据下面参考附图对示例性实施例的详细说明,本公开实施例的其它特征及方面将变得清楚。It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. Other features and aspects of embodiments of the present disclosure will become apparent from the following detailed description of exemplary embodiments with reference to the accompanying drawings.
附图说明Description of drawings
此处的附图被并入说明书中并构成本说明书的一部分,这些附图示出了符合本公开实施例的实施例,并与说明书一起用于说明本公开实施例的技术方案。The accompanying drawings herein are incorporated into and constitute a part of the specification, and these drawings illustrate embodiments consistent with the embodiments of the present disclosure, and together with the description, serve to explain the technical solutions of the embodiments of the present disclosure.
图1示出根据本公开实施例的资源加载方法的示意图;FIG. 1 shows a schematic diagram of a resource loading method according to an embodiment of the present disclosure;
图2示出根据本公开实施例的资源加载方法的流程图;FIG. 2 shows a flowchart of a resource loading method according to an embodiment of the present disclosure;
图3示出根据本公开实施例的资源加载方法的流程图;3 shows a flowchart of a resource loading method according to an embodiment of the present disclosure;
图4示出根据本公开实施例的资源加载方法的示意图;FIG. 4 shows a schematic diagram of a resource loading method according to an embodiment of the present disclosure;
图5示出根据本公开实施例的资源加载方法的示意图;FIG. 5 shows a schematic diagram of a resource loading method according to an embodiment of the present disclosure;
图6示出根据本公开实施例的资源加载装置的框图;FIG. 6 shows a block diagram of a resource loading apparatus according to an embodiment of the present disclosure;
图7示出根据本公开实施例的资源加载装置的框图;FIG. 7 shows a block diagram of a resource loading apparatus according to an embodiment of the present disclosure;
图8示出根据本公开实施例的一种电子设备800的框图;FIG. 8 shows a block diagram of an electronic device 800 according to an embodiment of the present disclosure;
图9示出根据本公开实施例的一种电子设备1900的框图。FIG. 9 shows a block diagram of an electronic device 1900 according to an embodiment of the present disclosure.
具体实施方式Detailed ways
以下将参考附图详细说明本公开的各种示例性实施例、特征和方面。附图中相同的附图标记表示功能相同或相似的元件。尽管在附图中示出了实施例的各种方面,但是除非特别指出,不必按比例绘制附图。Various exemplary embodiments, features and aspects of the present disclosure will be described in detail below with reference to the accompanying drawings. The same reference numbers in the figures denote elements that have the same or similar functions. While various aspects of the embodiments are shown in the drawings, the drawings are not necessarily drawn to scale unless otherwise indicated.
在这里专用的词“示例性”意为“用作例子、实施例或说明性”。这里作为“示例性”所说明的任何实施例不必解释为优于或好于其它实施例。The word "exemplary" is used exclusively herein to mean "serving as an example, embodiment, or illustration." Any embodiment described herein as "exemplary" is not necessarily to be construed as preferred or advantageous over other embodiments.
本文中术语“和/或”,仅仅是一种描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B这三种情况。另外,本文中术语“至少一种”表示多种中的任意一种或多种中的至少两种的任意组合,例如,包括A、B、C中的至少一种,可以表示包括从A、B和C构成的集合中选择的任意一个或多个元素。The term "and/or" in this article is only an association relationship to describe the associated objects, indicating that there can be three kinds of relationships, for example, A and/or B, it can mean that A exists alone, A and B exist at the same time, and A and B exist independently B these three cases. In addition, the term "at least one" herein refers to any combination of any one of the plurality or at least two of the plurality, for example, including at least one of A, B, and C, and may mean including from A, B, and C. Any one or more elements selected from the set of B and C.
另外,为了更好地说明本公开,在下文的具体实施方式中给出了众多的具体细节。本领域技术人员应当理解,没有某些具体细节,本公开同样可以实施。在一些实例中,对于本领域技术人员熟知的方法、手段、元件和电路未作详细描述,以便于凸显本公开的主旨。In addition, in order to better illustrate the present disclosure, numerous specific details are set forth in the following detailed description. It will be understood by those skilled in the art that the present disclosure may be practiced without certain specific details. In some instances, methods, means, components and circuits well known to those skilled in the art have not been described in detail so as not to obscure the subject matter of the present disclosure.
用户在应用AR应用程序之前,需要将AR应用程序下载到终端设备中,若下载AR应用程序时,将AR应用程序中涉及的AR资源同时打包下载的话,会导致AR应用程序的安装包过大,若在下载安装AR应用程序后,从云端服务器加载全部AR资源的话,网络传输会过久。Users need to download the AR application to the terminal device before applying the AR application. If the AR resources involved in the AR application are packaged and downloaded at the same time when downloading the AR application, the installation package of the AR application will be too large. , If all AR resources are loaded from the cloud server after downloading and installing the AR application, the network transmission will take too long.
为了解决上述技术问题,本公开实施例提供了一种资源加载方法,可以通过VPS(Visual Positioning Service,视觉定位系统)视觉定位确定终端设备的位置信息,进而根据终端设备的位置信息进行AR资源的加载。在一些实施例中,参照图1,AR应用程序安装包中不包括AR资源或者包含部分AR资源,终端设备在下载安装AR应用程序后,使用AR程序的过程中可以逐步根据终端设备的位置信息加载AR资源。例如:终端设备在位置1的时候加载(AR资源1、AR资源2和AR资源3),在位置2的时候加载(AR资源4、AR资源5和AR资源6)。这样,可以使得AR应用程序的安装包轻便,进而提高AR应用程序的下载安装效率。In order to solve the above technical problems, the embodiments of the present disclosure provide a resource loading method, which can determine the position information of a terminal device through VPS (Visual Positioning Service, visual positioning system) visual positioning, and then perform AR resource loading according to the position information of the terminal device. load. In some embodiments, referring to FIG. 1 , the AR application installation package does not include AR resources or includes some AR resources. After the terminal device downloads and installs the AR application program, the AR program can be used step by step according to the location information of the terminal device. Load AR resources. For example, the terminal device loads (AR resource 1, AR resource 2, and AR resource 3) at position 1, and loads (AR resource 4, AR resource 5, and AR resource 6) at position 2. In this way, the installation package of the AR application can be made lightweight, thereby improving the download and installation efficiency of the AR application.
图2示出根据本公开实施例的资源加载方法的流程图,所述资源加载方法可以由终端设备(以下称为第一电子设备)执行,终端设备可以为用户设备(User Equipment,UE)、移动设备、用户终端、终端、蜂窝电话、无绳电话、个人数字处理(Personal Digital Assistant,PDA)、手持设备、计算设备、车载设备、可穿戴设备等,所述方法可以通过处理器调用存储器中存储的计算机可读指令的方式来实现。2 shows a flowchart of a resource loading method according to an embodiment of the present disclosure. The resource loading method may be executed by a terminal device (hereinafter referred to as a first electronic device), and the terminal device may be a user equipment (User Equipment, UE), Mobile device, user terminal, terminal, cellular phone, cordless phone, Personal Digital Assistant (PDA), handheld device, computing device, vehicle-mounted device, wearable device, etc., the method can be stored in the memory by calling the processor implemented by means of computer readable instructions.
如图2所示,所述资源加载方法可以包括:As shown in Figure 2, the resource loading method may include:
在步骤S21中,向第二电子设备发送定位信息,定位信息用于使所述第二电子设备根据所述定位信息确定所述第一电子设备的位置信息,并根据所述第一电子设备的位置信息确定待加载增强现实AR资源;In step S21, the positioning information is sent to the second electronic device, where the positioning information is used to enable the second electronic device to determine the position information of the first electronic device according to the positioning information, and according to the positioning information of the first electronic device The location information determines the augmented reality AR resource to be loaded;
在步骤S22中,接收所述第二电子设备发送的所述待加载AR资源,并对所述待加载AR资源进行相应展示。In step S22, the AR resource to be loaded sent by the second electronic device is received, and the AR resource to be loaded is displayed accordingly.
本公开实施例中,上述第二电子设备可例如包括云端服务器等。第一电子设备可以 向第二电子设备发送定位信息,该定位信息可以包括第一电子设备的位置信息(第一电子设备进行定位操作,得到位置信息),第二电子设备可以从定位信息中获取第一电子设备的位置信息。In the embodiment of the present disclosure, the above-mentioned second electronic device may include, for example, a cloud server or the like. The first electronic device may send positioning information to the second electronic device, where the positioning information may include the position information of the first electronic device (the first electronic device performs a positioning operation to obtain the position information), and the second electronic device may obtain the position information from the positioning information Location information of the first electronic device.
在一种可能的实现方式中,定位信息中可以包括第一电子设备所处的环境图像,所述环境图像用于使所述第二电子设备根据所述环境图像确定所述第一电子设备的位置信息。In a possible implementation manner, the positioning information may include an environment image where the first electronic device is located, and the environment image is used to enable the second electronic device to determine the location of the first electronic device according to the environment image. location information.
举例来说,可以预先通过空间重建技术对空间进行重建,例如通过SFM(Structure from Motion,运动恢复结构)空间重建技术,进行空间重建,得到空间的三维模型。第一电子设备可以采集所在的环境图像,并向第二电子设备发送包括该环境图像的定位信息。第二电子设备接收到该定位信息后,可以根据该环境图像及三维模型对第一电子设备进行视觉定位,得到第一电子设备的位置信息。For example, the space can be reconstructed in advance by using a spatial reconstruction technology, for example, by using an SFM (Structure from Motion, motion recovery structure) spatial reconstruction technology, the spatial reconstruction is performed to obtain a three-dimensional model of the space. The first electronic device may collect an image of the environment where it is located, and send positioning information including the environment image to the second electronic device. After the second electronic device receives the positioning information, it can visually locate the first electronic device according to the environment image and the three-dimensional model to obtain the position information of the first electronic device.
第二电子设备得到第一电子设备的位置信息后,可以根据第一电子设备的位置信息,从全部AR资源中确定待加载AR资源(在AR应用程序的安装包中包括部分AR资源的情况下,可以从剩余未封装到安装包中的AR资源中确定待加载AR资源),并可以将待加载AR资源发送至第一电子设备。After the second electronic device obtains the location information of the first electronic device, it can determine the AR resources to be loaded from all AR resources according to the location information of the first electronic device (in the case that the installation package of the AR application includes some AR resources) , the AR resource to be loaded may be determined from the remaining AR resources that are not packaged into the installation package), and the AR resource to be loaded may be sent to the first electronic device.
在一些实施例中,第二电子设备在得到第一电子设备的位置信息后,可以确定位置信息与第一电子设备的位置信息满足加载条件的AR资源为待加载AR资源。例如:在AR资源的位置信息与第一电子设备的位置信息之间的距离在距离阈值内时,可以确定其满足加载条件,将该AR资源确定为待加载AR资源。或者,可以根据第一电子设备的位置信息确定一个待加载范围(例如以第一电子设备的位置信息为中心确定一个区域,该区域为待加载范围),在AR资源的位置信息位于该待加载范围内时,可以确定该AR资源为待加载AR资源。In some embodiments, after obtaining the location information of the first electronic device, the second electronic device may determine that the AR resource whose location information and the location information of the first electronic device satisfy the loading condition is the AR resource to be loaded. For example, when the distance between the location information of the AR resource and the location information of the first electronic device is within the distance threshold, it may be determined that the AR resource satisfies the loading condition, and the AR resource is determined as the AR resource to be loaded. Alternatively, a range to be loaded can be determined according to the position information of the first electronic device (for example, an area is determined with the position information of the first electronic device as the center, and the area is the range to be loaded), and the position information of the AR resource is located in the to-be-loaded range. When it is within the range, it can be determined that the AR resource is the AR resource to be loaded.
第一电子设备接收待加载AR资源后,可以对待加载AR资源进行相应展示。例如:对第一电子设备本地未加载过的待加载AR资源进行展示,或者对于本地已加载过但进行了版本更新的待加载AR资源,显示其对应的加载提示信息,该加载提示信息可以用于询问用户是否对该待加载AR资源进行更新,并可以响应于用户针对加载提示信息的确认操作,进行对应的显示。例如:响应于针对加载的确认操作,加载并显示待加载AR资源,并删除本地缓存版本,或者响应于针对不加载的确认操作,不加载该待加载AR资源,显示待加载AR资源在本地的缓存版本。After receiving the AR resource to be loaded, the first electronic device may display the AR resource to be loaded accordingly. For example: display the AR resources to be loaded that have not been loaded locally on the first electronic device, or display the corresponding loading prompt information for the AR resources to be loaded that have been loaded locally but have been updated. It asks the user whether to update the AR resource to be loaded, and can display correspondingly in response to the user's confirmation operation for the loading prompt information. For example: in response to the confirmation operation for loading, load and display the AR resource to be loaded, and delete the local cached version, or in response to the confirmation operation for not loading, do not load the AR resource to be loaded, and display the local AR resource to be loaded. cached version.
这样,第一电子设备可以向第二电子设备发送定位信息,所述定位信息用于使得所述第二电子设备根据所述定位信息确定所述第一电子设备的位置信息,并根据所述第一电子设备的位置信息确定待加载增强现实AR资源,进而第一电子设备可以接收所述第二电子设备发送的所述待加载AR资源,并对所述待加载AR资源进行相应展示。根据本公开实施例提供的资源加载方法,可以根据第一电子设备的位置信息确定并加载对应的待加载AR资源,缓解了下载AR应用程序时打包下载全部的AR资源所导致的AR应用程序的安装包过大的问题,使得AR应用程序的安装包轻便,在不影响用户使用的情况下,提高了AR应用程序的下载安装效率。In this way, the first electronic device can send positioning information to the second electronic device, where the positioning information is used to enable the second electronic device to determine the position information of the first electronic device according to the positioning information, and The location information of an electronic device determines the AR resource to be loaded, and then the first electronic device can receive the AR resource to be loaded sent by the second electronic device, and display the AR resource to be loaded accordingly. According to the resource loading method provided by the embodiment of the present disclosure, the corresponding AR resource to be loaded can be determined and loaded according to the location information of the first electronic device, which alleviates the AR application caused by packaging and downloading all AR resources when downloading the AR application. The problem that the installation package is too large makes the installation package of the AR application lightweight, which improves the download and installation efficiency of the AR application without affecting the user's use.
在一种可能的实现方式中,所述接收所述第二电子设备发送的所述待加载AR资源,并对所述待加载AR资源进行相应展示,可以包括:In a possible implementation manner, the receiving the AR resource to be loaded sent by the second electronic device, and correspondingly displaying the AR resource to be loaded, may include:
接收所述第二电子设备发送的所述待加载AR资源的标识信息。Receive the identification information of the AR resource to be loaded sent by the second electronic device.
从所述待加载AR资源的标识信息中确定目标AR资源的标识信息;Determine the identification information of the target AR resource from the identification information of the AR resource to be loaded;
将所述目标AR资源的标识信息携带于AR资源获取请求,并向所述第二电子设备发送AR资源获取请求,所述AR资源获取请求用于使使所述第二电子设备响应于所述AR资源获取请求获取所述目标AR资源的标识信息对应的目标AR资源;Carrying the identification information of the target AR resource in an AR resource acquisition request, and sending an AR resource acquisition request to the second electronic device, where the AR resource acquisition request is used to make the second electronic device respond to the The AR resource acquisition request acquires the target AR resource corresponding to the identification information of the target AR resource;
接收并展示所述第二电子设备发送的所述目标AR资源。receiving and displaying the target AR resource sent by the second electronic device.
举例来说,第二电子设备可以根据第一电子设备的位置信息从全部AR资源中确定待加载AR资源,并获取待加载AR资源的标识信息,其中待加载AR资源的标识信息可以用于标识待加载AR资源。例如:待加载AR资源的标识信息可以包括待加载AR资源的ID、名称,还可以包括待加载AR资源的版本信息等。For example, the second electronic device may determine the AR resources to be loaded from all AR resources according to the location information of the first electronic device, and obtain identification information of the AR resources to be loaded, where the identification information of the AR resources to be loaded may be used to identify the AR resources to be loaded. AR resource to be loaded. For example, the identification information of the AR resource to be loaded may include the ID and name of the AR resource to be loaded, and may also include version information of the AR resource to be loaded, and the like.
第一电子设备可以根据本地缓存的AR资源的标识信息与待加载AR资源的标识信息,从待加载AR资源的标识信息中确定目标AR资源的标识信息。The first electronic device may determine the identification information of the target AR resource from the identification information of the AR resource to be loaded according to the identification information of the locally cached AR resource and the identification information of the AR resource to be loaded.
在一种可能的实现方式中,所述待加载AR资源的标识信息包括AR资源标识及AR资源版本信息,所述从所述待加载AR资源的标识信息中确定目标AR资源的标识信息,包括:In a possible implementation manner, the identification information of the AR resource to be loaded includes AR resource identification and AR resource version information, and the identification information of the target AR resource is determined from the identification information of the AR resource to be loaded, including :
针对任一待加载AR资源的标识信息,在本地未缓存所述AR资源标识对应的AR资源的情况下,或者在本地缓存的所述AR资源标识对应的AR资源的AR资源版本信息,与所述AR资源版本信息不一致的情况下,确定所述待加载AR资源的标识信息为目标AR资源的标识信息。For the identification information of any AR resource to be loaded, if the AR resource corresponding to the AR resource identifier is not cached locally, or the locally cached AR resource version information of the AR resource corresponding to the AR resource identifier is the same as the AR resource version information of the AR resource. In the case that the AR resource version information is inconsistent, it is determined that the identification information of the AR resource to be loaded is the identification information of the target AR resource.
举例来说,针对任一待加载AR资源的标识信息,在本地缓存的AR资源对应的AR资源标识中不存在该待加载AR资源的标识信息中包含的AR资源标识时,确定本地未缓存该待加载AR资源,则可以将该待加载AR资源的标识信息确定为目标AR资源的标识信息。或者,在本地缓存的AR资源对应的AR资源标识中存在该待加载AR资源的标识信息中包含的AR资源标识,但本地缓存的该AR资源标识对应的AR资源版本信息与待加载AR资源的标识信息中包括的AR资源版本信息不一致时,可以确定该待加载AR资源进行了版本更新,故可以将该待加载AR资源的标识信息确定为目标AR资源的标识信息。For example, for the identification information of any AR resource to be loaded, when the AR resource identification included in the identification information of the AR resource to be loaded does not exist in the AR resource identification corresponding to the locally cached AR resource, it is determined that the AR resource is not cached locally. For the AR resource to be loaded, the identification information of the AR resource to be loaded may be determined as the identification information of the target AR resource. Alternatively, the AR resource identifier included in the identifier information of the AR resource to be loaded exists in the AR resource identifier corresponding to the locally cached AR resource, but the AR resource version information corresponding to the AR resource identifier stored locally is the same as the AR resource identifier to be loaded. When the AR resource version information included in the identification information is inconsistent, it can be determined that the version of the AR resource to be loaded has been updated, so the identification information of the AR resource to be loaded can be determined as the identification information of the target AR resource.
在确定目标AR资源后,第一电子设备可以根据目标AR资源的标识信息向第二电子设备发送AR资源获取请求。第二电子设备接收到该AR资源获取请求后,可以根据目标AR资源的标识信息获取对应的目标AR资源,并向第一电子设备发送目标AR资源。After determining the target AR resource, the first electronic device may send an AR resource acquisition request to the second electronic device according to the identification information of the target AR resource. After receiving the AR resource acquisition request, the second electronic device may acquire the corresponding target AR resource according to the identification information of the target AR resource, and send the target AR resource to the first electronic device.
第一电子设备可以接收第二电子设备发送的目标AR资源,并在第一电子设备的显示界面上展示该目标AR资源。需要说明的是,在第一电子设备缓存过目标AR资源的不同版本时,可以将缓存的历史版本删除,并缓存第二电子设备发送的目标AR资源。例如:AR资源为AR广告牌1,本地缓存的版本为1.0版本,第二电子设备发送的版本为2.0版本,则可以将本地缓存的1.0版本的AR广告牌1删除,缓存第二电子设备发送的2.0版本的AR广告牌1。The first electronic device may receive the target AR resource sent by the second electronic device, and display the target AR resource on the display interface of the first electronic device. It should be noted that when the first electronic device has cached different versions of the target AR resource, the cached historical version may be deleted, and the target AR resource sent by the second electronic device may be cached. For example, if the AR resource is AR billboard 1, the locally cached version is version 1.0, and the version sent by the second electronic device is version 2.0, then the locally cached version 1.0 of AR billboard 1 can be deleted, and the cached version sent by the second electronic device is version 2.0. Version 2.0 of AR Billboard 1.
这样,可以根据第一电子设备的位置信息逐步的加载AR资源,可以使得AR应用程序的安装包轻便,并能够在加载AR资源的过程中,提高加载精度和效率。In this way, the AR resource can be loaded step by step according to the location information of the first electronic device, which can make the installation package of the AR application lightweight, and can improve the loading accuracy and efficiency in the process of loading the AR resource.
在一种可能的实现方式中,所述接收所述第二电子设备发送的所述待加载AR资源,并对所述待加载AR资源进行相应展示,可以包括:In a possible implementation manner, the receiving the AR resource to be loaded sent by the second electronic device, and correspondingly displaying the AR resource to be loaded, may include:
接收所述第二电子设备发送的所述待加载AR资源;receiving the AR resource to be loaded sent by the second electronic device;
从所述待加载AR资源中确定目标AR资源;Determine the target AR resource from the AR resource to be loaded;
展示所述目标AR资源。Display the target AR resource.
举例来说,第二电子设备可以将待加载AR资源发送给第一电子设备,第一电子设备接收到待加载AR资源后,可以从待加载AR资源中确定目标AR资源,并加载展示目标AR资源,其中,确定目标AR资源的方式可以参照前述实施例,本公开实施例在此不再赘述。For example, the second electronic device may send the AR resource to be loaded to the first electronic device, and after receiving the AR resource to be loaded, the first electronic device may determine the target AR resource from the AR resource to be loaded, and load the AR resource for display Resource, wherein, for the method of determining the target AR resource, reference may be made to the foregoing embodiments, and details are not described herein again in this embodiment of the present disclosure.
在一种可能的实现方式中,响应于以下任一种情况,所述向第二电子设备发送定位信息,可以包括:In a possible implementation manner, in response to any of the following situations, the sending the positioning information to the second electronic device may include:
在时间周期内,在所述第一电子设备移动的距离大于距离阈值的情况下,向所述第二电子设备发送定位信息;In a time period, when the distance moved by the first electronic device is greater than a distance threshold, sending positioning information to the second electronic device;
在时间周期内,在所述第一电子设备的实时位置信息位于定位区域外的情况下,向所述第二电子设备发送所述定位信息;In a time period, when the real-time location information of the first electronic device is located outside the location area, sending the location information to the second electronic device;
或者,or,
在上一时间周期结束,开始新一时间周期的情况下,向所述第二电子设备发送定位信息;其中,所述定位区域为以所述第一电子设备在所述时间周期初始时刻对应的位置信息为中心的区域。When the previous time period ends and a new time period starts, the positioning information is sent to the second electronic device; wherein, the positioning area is the area corresponding to the first electronic device at the initial moment of the time period. The location information is the center of the area.
举例来说,第一电子设备可以每间隔一个时间周期T向第二电子设备发送一次定位信息,该时间周期T可以预先设定,也可以根据第一电子设备的移动速度进行确定,例如:当第一电子设备的移动速度较快时,可以相应的设定较小的时间周期T,在第一电子设备移动的速度较慢时,可以相应的设定较大的时间周期T。或者在时间周期内时,可以以第一电子设备在时间周期初始时刻对应的位置信息为中心,预设一个定位区域,在第一电子设备的实时位置位于定位区域外时,向第二电子设备发送定位信息,以减少与第二电子设备的交互流程,提高资源利用率。For example, the first electronic device may send positioning information to the second electronic device every time period T, and the time period T may be preset or determined according to the moving speed of the first electronic device, for example: when When the moving speed of the first electronic device is relatively fast, a relatively small time period T can be set accordingly, and when the moving speed of the first electronic device is relatively slow, a relatively large time period T can be set accordingly. Or within the time period, a positioning area can be preset with the position information corresponding to the first electronic device at the initial moment of the time period as the center, and when the real-time position of the first electronic device is outside the positioning area, the second electronic device can be sent to the second electronic device. The positioning information is sent to reduce the interaction process with the second electronic device and improve resource utilization.
图3示出根据本公开实施例的资源加载方法的流程图,该资源加载方法可以应用于云端服务器(以下称为第二电子设备)执行,参照图3,本公开实施例提供的资源加载方法可以包括:FIG. 3 shows a flowchart of a resource loading method according to an embodiment of the present disclosure. The resource loading method can be applied to a cloud server (hereinafter referred to as a second electronic device) for execution. Referring to FIG. 3 , the resource loading method provided by an embodiment of the present disclosure Can include:
在步骤S31中,接收第一电子设备发送的定位信息;In step S31, receiving the positioning information sent by the first electronic device;
在步骤S32中,根据所述定位信息确定所述第一电子设备的位置信息;In step S32, the location information of the first electronic device is determined according to the location information;
在步骤S33中,根据所述第一电子设备的位置信息从增强现实AR资源中确定待加载AR资源;In step S33, determining the AR resource to be loaded from the augmented reality AR resource according to the location information of the first electronic device;
在步骤S34中,向所述第一电子设备发送所述待加载AR资源,其中,所述待加载AR资源展示于所述第一电子设备中。In step S34, the AR resource to be loaded is sent to the first electronic device, wherein the AR resource to be loaded is displayed in the first electronic device.
举例来说,第一电子设备可以进行定位操作,并在得到第一电子设备的位置信息后,向第二电子设备发送定位信息,该定位信息中可以包括第一电子设备的位置信息。第二电子设备接收到定位信息后,可以从定位信息中获取第一电子设备的位置信息。For example, the first electronic device may perform a positioning operation, and after obtaining the position information of the first electronic device, send the positioning information to the second electronic device, where the positioning information may include the position information of the first electronic device. After receiving the positioning information, the second electronic device may acquire the position information of the first electronic device from the positioning information.
或者,在一种可能的实现方式中,所述定位信息中包括所述第一电子设备所在的环境图像,所述根据所述定位信息确定所述第一电子设备的位置信息,可以包括:Or, in a possible implementation manner, the positioning information includes an image of an environment where the first electronic device is located, and the determining the position information of the first electronic device according to the positioning information may include:
根据第一电子设备所在的环境图像对所述第一电子设备进行视觉定位,得到所述第一电子设备的位置信息。Visually locate the first electronic device according to an image of the environment where the first electronic device is located to obtain location information of the first electronic device.
举例来说,第一电子设备可以向第二电子设备发送包括第一电子设备所在的环境图像的定位信息(具体过程可以参照前述实施例,本公开实施例对此不再赘述)。第二电子设备接收到定位请求后,根据环境图像及与预先对空间进行重建得到的三维模型对第一电子设备进行视觉定位,得到第一电子设备的位置信息,本公开实施例对视觉定位的具体过程不作限定,任一视觉定位方式均可。For example, the first electronic device may send positioning information including an image of the environment where the first electronic device is located to the second electronic device (for a specific process, refer to the foregoing embodiment, which is not repeated in this embodiment of the present disclosure). After the second electronic device receives the positioning request, it visually locates the first electronic device according to the environment image and the three-dimensional model obtained by reconstructing the space in advance, and obtains the position information of the first electronic device. The specific process is not limited, and any visual positioning method can be used.
在第二电子设备得到第一电子设备的位置信息后,第二电子设备可以根据第一电子设备的位置信息及各AR资源的位置信息,从AR资源中确定待加载AR资源。在一些实施例中,第二电子设备可以确定位置信息与第一电子设备的位置信息满足加载条件的AR资源为待加载AR资源。例如:在AR资源的位置信息与第一电子设备的位置信息之间的距离在距离阈值内时,可以确定其满足加载条件,将该AR资源确定为待加载AR资源,或者,可以根据第一电子设备的位置信息确定一个待加载范围(例如以第一电子设备的位置信息为中心确定一个区域,该区域为待加载范围),在AR资源的位置信息位于该待加载范围内时,可以确定该AR资源为待加载AR资源。After the second electronic device obtains the location information of the first electronic device, the second electronic device may determine the AR resource to be loaded from the AR resources according to the location information of the first electronic device and the location information of each AR resource. In some embodiments, the second electronic device may determine that the AR resource whose location information and the location information of the first electronic device satisfy the loading condition is the AR resource to be loaded. For example: when the distance between the location information of the AR resource and the location information of the first electronic device is within the distance threshold, it may be determined that the AR resource satisfies the loading condition, and the AR resource may be determined as the AR resource to be loaded, or, according to the first The location information of the electronic device determines a to-be-loaded range (for example, an area is determined with the location information of the first electronic device as the center, and the area is the to-be-loaded range). When the location information of the AR resource is within the to-be-loaded range, it can be determined that The AR resource is the AR resource to be loaded.
第二电子设备确定待加载AR资源后,可以获取待加载AR资源并将待加载AR资源发送给第一电子设备,以使得第一电子设备可以根据AR资源的缓存情况对待加载AR资源进行加载展示。例如:在第一电子设备未缓存该待加载AR资源或者缓存的待加载AR资源的AR资源版本信息与该待加载AR资源的AR资源版本信息不一致的情况下,加载展示该待加载AR资源。After the second electronic device determines the AR resources to be loaded, it can obtain the AR resources to be loaded and send the AR resources to be loaded to the first electronic device, so that the first electronic device can load and display the AR resources to be loaded according to the cache situation of the AR resources . For example, when the first electronic device does not cache the AR resource to be loaded or the cached AR resource version information of the AR resource to be loaded is inconsistent with the AR resource version information of the AR resource to be loaded, the AR resource to be loaded is loaded and displayed.
这样,第二电子设备可以接收所述第一电子设备发送的定位信息,并根据所述定位信息确定所述第一电子设备的位置信息。第二电子设备可以根据所述第一电子设备的位置信息从增强现实AR资源中确定待加载AR资源,并向所述第一电子设备发送所述待加载AR资源,以使得所述第一电子设备对所述待加载AR资源进行相应展示。根据本公开实施例提供的资源加载方法,可以根据第一电子设备的位置信息逐步加载AR资源,缓解了下载AR应用程序时打包下载全部的AR资源所导致的AR应用程序的安装包过大的问题,使得AR应用程序的安装包轻便,在不影响用户使用的情况下,提高了AR应用程序的下载安装效率。In this way, the second electronic device can receive the positioning information sent by the first electronic device, and determine the position information of the first electronic device according to the positioning information. The second electronic device may determine the AR resource to be loaded from the augmented reality AR resource according to the location information of the first electronic device, and send the AR resource to be loaded to the first electronic device, so that the first electronic device The device displays the AR resource to be loaded accordingly. According to the resource loading method provided by the embodiments of the present disclosure, the AR resources can be loaded gradually according to the location information of the first electronic device, which alleviates the problem that the installation package of the AR application is too large due to downloading all the AR resources when downloading the AR application. The problem makes the installation package of the AR application lightweight, and improves the download and installation efficiency of the AR application without affecting the user's use.
在一种可能的实现方式中,所述向所述第一电子设备发送所述待加载AR资源,可以包括:In a possible implementation manner, the sending the AR resource to be loaded to the first electronic device may include:
向所述第一电子设备发送所述待加载AR资源的标识信息,所述待加载AR资源的标识信息用于使所述第一电子设备从所述待加载AR资源的标识信息中确定目标AR资源的标识信息;Send the identification information of the AR resource to be loaded to the first electronic device, where the identification information of the AR resource to be loaded is used to enable the first electronic device to determine the target AR from the identification information of the AR resource to be loaded Identification information of the resource;
接收所述第一电子设备发送的AR资源获取请求,所述AR资源获取请求中携带所述目标AR资源的标识信息;receiving an AR resource acquisition request sent by the first electronic device, where the AR resource acquisition request carries the identification information of the target AR resource;
响应于所述AR资源获取请求,获取所述目标AR资源的标识信息对应的目标AR资源,并向所述第一电子设备发送所述目标AR资源,其中,所述目标AR资源展示于所述第一电子设备。In response to the AR resource acquisition request, acquire the target AR resource corresponding to the identification information of the target AR resource, and send the target AR resource to the first electronic device, wherein the target AR resource is displayed on the first electronic device.
举例来说,第二电子设备在确定待加载AR资源后,可以获取待加载AR资源的标识信息,并将待加载AR资源的标识信息发送至第一电子设备。第一电子设备可以根据本地缓存的AR资源的情况,从待加载AR资源的标识信息中确定目标AR资源的标识信息(具体过程可以参照前述实施例,本公开实施例对此不作赘述)。For example, after determining the AR resource to be loaded, the second electronic device may acquire identification information of the AR resource to be loaded, and send the identification information of the AR resource to be loaded to the first electronic device. The first electronic device may determine the identification information of the target AR resource from the identification information of the AR resource to be loaded according to the situation of the locally cached AR resource (for the specific process, refer to the foregoing embodiment, which is not repeated in this embodiment of the present disclosure).
第一电子设备在确定目标AR资源的标识信息后,可以向第二电子设备发送包括目标AR资源的标识信息的AR资源获取请求。第二电子设备接收到该AR资源获取请求后,可根据目标AR资源的标识信息获取对应的目标AR资源,并将目标AR资源发送至第一电子设备进行缓存及展示。这样,可以根据第一电子设备的位置信息逐步的加载AR资源,可以使得AR应用程序的安装包轻便,并能够在加载AR资源的过程中,提高加载精度和效率。After determining the identification information of the target AR resource, the first electronic device may send an AR resource acquisition request including the identification information of the target AR resource to the second electronic device. After receiving the AR resource acquisition request, the second electronic device can acquire the corresponding target AR resource according to the identification information of the target AR resource, and send the target AR resource to the first electronic device for caching and display. In this way, the AR resource can be loaded step by step according to the location information of the first electronic device, which can make the installation package of the AR application lightweight, and can improve the loading accuracy and efficiency in the process of loading the AR resource.
在一种可能的实现方式中,所述根据所述第一电子设备的位置信息从增强现实AR资源中确定待加载AR资源,可以包括:In a possible implementation manner, the determining the AR resource to be loaded from the augmented reality AR resource according to the location information of the first electronic device may include:
根据所述第一电子设备的位置信息确定待加载范围;Determine the to-be-loaded range according to the location information of the first electronic device;
针对任一AR资源,在所述AR资源对应的位置信息位于所述待加载范围内的情况下,确定所述AR资源为待加载AR资源。For any AR resource, if the location information corresponding to the AR resource is located within the to-be-loaded range, the AR resource is determined to be the to-be-loaded AR resource.
举例来说,可以以第一电子设备的位置信息为基准点,确定一个待加载范围。例如:以第一电子设备的位置信息为中心点,确定一个圆形、矩形或者多边形的区域,该区域即为待加载范围,该区域的大小可以预设,也可以动态的确定,本公开实施例对此不做具体限定。For example, a range to be loaded may be determined by using the position information of the first electronic device as a reference point. For example: take the position information of the first electronic device as the center point, determine a circular, rectangular or polygonal area, this area is the to-be-loaded area, the size of this area can be preset or dynamically determined, this disclosure implements The example does not specifically limit this.
第二电子设备可以将位置信息位于该待加载范围内的AR资源,确定为待加载AR资源。举例来说,参照图4,可以以第一电子设备的位置信息P0为中心点,确定一个圆形区域为待加载范围,则位于该待加载范围内的AR资源1、AR资源2和AR资源3即可以确定为目标AR资源。The second electronic device may determine the AR resource whose location information is within the to-be-loaded range as the to-be-loaded AR resource. For example, referring to FIG. 4 , the position information P0 of the first electronic device can be used as the center point to determine a circular area as the range to be loaded, and then the AR resource 1, AR resource 2 and AR resource located in the to-be-loaded range 3 can be determined as the target AR resource.
在一种可能的实现方式中,所述根据所述第一电子设备的位置信息确定待加载范围,可以包括:In a possible implementation manner, the determining the range to be loaded according to the location information of the first electronic device may include:
确定范围构建数据;Determining the scope to build the data;
根据所述第一电子设备的位置信息及所述范围构建数据,确定待加载范围。The to-be-loaded range is determined according to the location information of the first electronic device and the range construction data.
举例来说,上述范围构建数据可以为用于限定待加载范围的面积的参数。例如:在待加载范围为圆形区域时,上述范围构建数据可以为该圆形区域的半径;在待加载范围为矩形时,上述范围构建数据可以包括该矩形区域的长和宽等两项数据。该范围构建数据的大小可以预先设定,或者也可以根据加载需求进行确定,例如:在要求加载速度较快时,范围构建数据可以设置的小一点。For example, the above range construction data may be parameters for defining the area of the range to be loaded. For example: when the range to be loaded is a circular area, the above range construction data may be the radius of the circular area; when the range to be loaded is a rectangle, the above range construction data may include the length and width of the rectangular area. . The size of the range construction data can be preset, or can also be determined according to the loading requirements. For example, when the loading speed is required to be fast, the range construction data can be set smaller.
根据范围构建数据及第一电子设备的位置信息,可以确定待加载范围。例如:在待加载范围为圆形区域时,可以将第一电子设备的位置P0作为圆心,以范围构建数据为半径构建一个圆形区域,得到待加载范围。或者,在待加载范围为矩形时,可以将第一电子设备的位置P0作为中心,以范围构建数据为长和宽构建一个矩形区域,得到待加载范围。According to the range construction data and the position information of the first electronic device, the range to be loaded can be determined. For example, when the range to be loaded is a circular area, the position P0 of the first electronic device can be used as the center of the circle, and the range construction data is used as the radius to construct a circular area to obtain the range to be loaded. Alternatively, when the range to be loaded is a rectangle, the position P0 of the first electronic device may be taken as the center, and a rectangular area may be constructed with the range construction data as the length and width to obtain the range to be loaded.
需要说明的是,上述待加载范围为圆形区域或者矩形区域为本公开实施例中待加载范围的一种示例,实际上,待加载范围可以呈现任意形状,本公开实施例不对待加载范围所呈现的形状做任何限定。It should be noted that the above-mentioned range to be loaded is a circular area or a rectangular area, which is an example of the range to be loaded in the embodiment of the present disclosure. In fact, the range to be loaded may have any shape, and the embodiment of the present disclosure does not define the range to be loaded. The shape presented does not make any restrictions.
在一种可能的实现方式中,所述定位请求中还可以包括所述第一电子设备的网络信号质量和/或所述第一电子设备的移动速度,所述确定范围构建数据,可以包括:In a possible implementation manner, the positioning request may further include the network signal quality of the first electronic device and/or the moving speed of the first electronic device, and the determining the range construction data may include:
根据所述网络信号质量,确定与所述网络信号质量相对应的范围构建数据;和/或,determining, according to the network signal quality, range construction data corresponding to the network signal quality; and/or,
根据所述移动速度,确定与所述移动速度相对应的范围构建数据。Based on the moving speed, range construction data corresponding to the moving speed is determined.
举例来说,第一电子设备在发送定位信息时,可以检测第一电子设备的网络信号质量和/或确定第一电子设备的移动速度(可以包括速度、加速度等数据),并将第一电子设备的网络信号质量和/或第一电子设备的移动速度通过定位信息发送至第二电子设备。For example, when the first electronic device sends the positioning information, it may detect the network signal quality of the first electronic device and/or determine the moving speed of the first electronic device (which may include data such as speed, acceleration, etc.), and send the first electronic device to the network. The network signal quality of the device and/or the moving speed of the first electronic device are sent to the second electronic device through the positioning information.
在一些实施例中,可以将网络信号质量划分为多个等级,例如:划分为优质、良好、较差等等级(本公开实施例中不对网络信号质量的等级划分方式及等级划分层次进行限定),其中,网络信号质量为优质时,对应的范围构建数据为第一范围构建数据,网络信号质量为良好时,对应的范围构建数据为第二范围构建数据,网络信号质量为较差时,对应的范围构建数据为第三范围构建数据,第一范围构建数据大于第二范围构建数据,第二范围构建数据大于第三范围构建数据。In some embodiments, the network signal quality can be divided into multiple levels, for example: divided into high quality, good, poor and other levels (the network signal quality level and level are not limited in the embodiments of the present disclosure) , where, when the network signal quality is high quality, the corresponding range construction data is the first range construction data, when the network signal quality is good, the corresponding range construction data is the second range construction data, and when the network signal quality is poor, the corresponding range construction data The range construction data is the third range construction data, the first range construction data is larger than the second range construction data, and the second range construction data is larger than the third range construction data.
第二电子设备可以根据第一电子设备的网络信号质量,确定与网络信号质量相对应的范围构建数据,以能够在网络信号质量较好时设置较大一些的范围构建数据,进而扩大待加载范围,以使得第一电子设备多加载一些AR资源,在网络信号质量较差时设置较小一些的范围构建数据,进而缩小待加载范围,以少加载一些AR资源。这样一来,使得第一电子设备可以根据网络信号质量适应性的进行AR资源的加载,可以带来更好的用户体验。The second electronic device can determine the range construction data corresponding to the network signal quality according to the network signal quality of the first electronic device, so as to be able to set larger range construction data when the network signal quality is good, thereby expanding the to-be-loaded range , so that the first electronic device loads more AR resources, sets a smaller range construction data when the network signal quality is poor, and further narrows the to-be-loaded range to load less AR resources. In this way, the first electronic device can adaptively load the AR resource according to the quality of the network signal, which can bring better user experience.
在一些实施例中,还可以将移动速度划分为多个速度范围,例如:将0到1m/s划分为第一速度范围,将1m/s到2m/s划分为第二速度范围(不包括1m/s),将大于2m/s的速度划分为第三速度范围,其中,第一速度范围对应第四范围构建数据,第二速度范围对应第五范围构建数据,第三速度范围对应第六范围构建数据,第四范围构建数据小于第五范围构建数据,第五范围构建数据小于第六范围构建数据。In some embodiments, the moving speed can also be divided into multiple speed ranges, for example: 0 to 1m/s is divided into a first speed range, 1m/s to 2m/s is divided into a second speed range (excluding 1m/s), the speed greater than 2m/s is divided into the third speed range, wherein the first speed range corresponds to the fourth range construction data, the second speed range corresponds to the fifth range construction data, and the third speed range corresponds to the sixth range. The range construction data, the fourth range construction data is smaller than the fifth range construction data, and the fifth range construction data is smaller than the sixth range construction data.
第二电子设备可以根据第一电子设备的移动速度,确定与移动速度对应的范围构建数据,例如:第一电子设备的移动速度在第一速度范围内时,可以确定范围构建数据为第四范围构建数据。这样一来,可以根据第一电子设备的移动速度动态的确定范围构建数据,以在第一电子设备移动速度较快时设置较大一些的范围构建数据,进而扩大待加载范围,以使得第一电子设备多加载一些AR资源;在第一电子设备移动速度较慢时设置较小一些的范围构建数据,进而缩小待加载范围,以使得第一电子设备少加载一些AR资源。这样一来,可以使得AR资源的加载过程与第一电子设备的移动过程相适应,缓解由于第一电子设备移动速度较快,导致第一电子设备尚未加载第一电子设备所处位置的AR 资源的问题,可以带来更好的用户体验。The second electronic device may determine the range construction data corresponding to the movement speed according to the movement speed of the first electronic device. For example, when the movement speed of the first electronic device is within the first speed range, the range construction data may be determined as the fourth range Build data. In this way, the range construction data can be dynamically determined according to the moving speed of the first electronic device, so as to set a larger range construction data when the moving speed of the first electronic device is fast, thereby expanding the to-be-loaded range, so that the first electronic device moves faster. The electronic device loads more AR resources; when the moving speed of the first electronic device is slow, a smaller range construction data is set, thereby narrowing the to-be-loaded range, so that the first electronic device loads less AR resources. In this way, the loading process of the AR resources can be adapted to the moving process of the first electronic device, and the AR resources at the location of the first electronic device have not been loaded by the first electronic device due to the fast moving speed of the first electronic device. problems, which can lead to a better user experience.
在一种可能的实现方式中,所述根据所述第一电子设备的位置信息及所述范围构建数据,确定待加载范围,可以包括:In a possible implementation manner, the determining the range to be loaded according to the location information of the first electronic device and the range construction data may include:
根据所述第一电子设备的位置信息及所述范围构建数据,确定初始待加载范围;determining an initial to-be-loaded range according to the location information of the first electronic device and the range construction data;
确定位置信息位于所述初始待加载范围内的AR资源的数量;determining the number of AR resources whose location information is within the initial to-be-loaded range;
根据所述AR资源的数量调整所述范围构建数据,得到调整后的范围构建数据;Adjust the scope construction data according to the quantity of the AR resources to obtain the adjusted scope construction data;
根据所述调整后的范围构建数据及所述第一电子设备的位置信息,确定待加载范围。The to-be-loaded range is determined according to the adjusted range construction data and the position information of the first electronic device.
举例来说,第二电子设备在确定出范围构建数据后,可以根据范围构建数据及第一电子设备的位置信息,确定一个初始待加载范围,例如:可以将第一电子设备的位置信息作为圆心,以范围构建数据为半径,构建一个圆形的初始待加载范围。确定位于该初始待加载范围内的AR资源的数量,在位于该初始待加载范围内的AR资源的数量较大时(例如:大于第一阈值时),可以按照预置调整策略缩小范围构建数据,或者,在位于该初始待加载范围内的AR资源的数量较小时(例如:小于第二阈值时),可以按照预置调整策略增大范围构建数据,并可以根据调整后的范围构建数据及第一电子设备的位置信息,确定待加载范围(具体过程可以参照前述实施例,本公开实施例在此不再赘述)。这样一来,第二电子设备可以动态的调整待加载范围,进而调整第一电子设备加载的AR资源的数量,可以保证加载速度,缓解用户由于加载AR资源进行等待的问题,提高用户体验。For example, after determining the range construction data, the second electronic device can determine an initial range to be loaded according to the range construction data and the position information of the first electronic device, for example, the position information of the first electronic device can be used as the center of the circle , with the range construction data as the radius, construct a circular initial range to be loaded. Determine the number of AR resources within the initial to-be-loaded range, and when the number of AR resources within the initial to-be-loaded range is large (for example, greater than the first threshold), the data can be constructed by narrowing down the range according to the preset adjustment strategy , or, when the number of AR resources located in the initial to-be-loaded range is small (for example, when it is less than the second threshold), the range construction data can be increased according to the preset adjustment strategy, and the range construction data and data can be constructed according to the adjusted range. The location information of the first electronic device is used to determine the to-be-loaded range (for the specific process, reference may be made to the foregoing embodiment, which is not repeated here in this embodiment of the present disclosure). In this way, the second electronic device can dynamically adjust the range to be loaded, and then adjust the number of AR resources loaded by the first electronic device, which can ensure the loading speed, alleviate the problem of users waiting due to loading AR resources, and improve user experience.
在一种可能的实现方式中,所述根据所述第一电子设备的位置信息从增强现实AR资源中确定待加载AR资源,可以包括:In a possible implementation manner, the determining the AR resource to be loaded from the augmented reality AR resource according to the location information of the first electronic device may include:
确定各AR资源的位置信息与所述第一电子设备的位置信息之间的距离;determining the distance between the location information of each AR resource and the location information of the first electronic device;
将各AR资源按照距离由小到大进行排序后,将前预置数量个AR资源确定为待加载AR资源。After sorting the AR resources according to the distance from small to large, the first preset number of AR resources are determined as the AR resources to be loaded.
举例来说,可以分别确定各AR资源的位置信息与第一电子设备的位置信息之间的距离,并将各AR资源按照距离进行由小到大的排序,将序列中前预置数量个AR资源确定为待加载AR资源(或者,可以将各AR资源按照距离进行由大到小的排序,将序列中后预置数量个AR资源确定为待加载AR资源),该预置数量可以为预先设置的数值。例如:预置数量设置为5,则可以将序列中排在前5位的5个AR资源确定为待加载AR资源。这样一来,可以保证AR资源的加载速度,提高用户体验。For example, the distance between the location information of each AR resource and the location information of the first electronic device can be determined respectively, and the AR resources can be sorted according to the distance from small to large, and the first preset number of AR resources in the sequence can be sorted. The resource is determined as the AR resource to be loaded (or, the AR resources can be sorted from large to small according to the distance, and the last preset number of AR resources in the sequence can be determined as the AR resource to be loaded), and the preset number can be the preset number of AR resources. set value. For example, if the preset number is set to 5, the top 5 AR resources in the sequence can be determined as the AR resources to be loaded. In this way, the loading speed of AR resources can be guaranteed and the user experience can be improved.
为使本领域技术人员更好的理解本公开实施例,以下通过具体示例对本公开实施例加以说明。In order to make those skilled in the art better understand the embodiments of the present disclosure, the following describes the embodiments of the present disclosure through specific examples.
参照图5,第一电子设备可以采集当前所处的环境图像,并根据环境图像向第二电子设备发送定位信息。第二电子设备接收到定位信息后,可以根据第一电子设备所处的环境图像进行视觉定位,得到第一电子设备的位置信息。第二电子设备可以确定范围构建数据,并以第一电子设备的位置信息为中心点,构建待加载范围。获取位于该待加载范围内的所有AR资源的AR资源的标识信息(AR资源名、AR资源版本信息),将获取到的AR资源的标识信息作为待加载AR资源的标识信息发送至第一电子设备。Referring to FIG. 5 , the first electronic device may collect an image of the current environment, and send positioning information to the second electronic device according to the environment image. After receiving the positioning information, the second electronic device can perform visual positioning according to an image of the environment where the first electronic device is located, so as to obtain the position information of the first electronic device. The second electronic device may determine the range construction data, and use the position information of the first electronic device as a center point to construct the range to be loaded. Obtain the identification information (AR resource name, AR resource version information) of the AR resources of all AR resources located in the range to be loaded, and send the obtained identification information of the AR resource as the identification information of the AR resource to be loaded to the first electronic device equipment.
第一电子设备接收到待加载AR资源的标识信息后,与本地缓存的AR资源进行对比,在本地未缓存待加载AR资源的标识信息所标识的AR资源,或者本地缓存的待加载AR资源的版本信息与待加载AR资源的AR资源版本信息不一致时,可以确定该待加载AR资源的标识信息为目标AR资源的标识信息,并根据目标AR资源的标识信息向第二电子设备发送获取资源请求。After receiving the identification information of the AR resource to be loaded, the first electronic device compares it with the locally cached AR resource, and the AR resource identified by the identification information of the AR resource to be loaded is not cached locally, or the locally cached AR resource identified by the identification information of the AR resource to be loaded is not cached locally. When the version information is inconsistent with the AR resource version information of the AR resource to be loaded, it may be determined that the identification information of the AR resource to be loaded is the identification information of the target AR resource, and a resource acquisition request is sent to the second electronic device according to the identification information of the target AR resource .
第二电子设备根据获取资源请求获取目标AR资源,并将目标AR资源发送至第一电子设备。第一电子设备接收缓存并展示目标AR资源,并在时间周期T后或者第一电子设备移动的距离超过距离阈值时,再次循环上述流程。The second electronic device acquires the target AR resource according to the resource acquisition request, and sends the target AR resource to the first electronic device. The first electronic device receives the cache and displays the target AR resource, and after the time period T or when the distance moved by the first electronic device exceeds the distance threshold, the above process is repeated.
本公开实施例提供的资源加载方法,可以根据第一电子设备的位置信息加载对应的目标AR资源,缓解了下载AR应用程序时打包下载全部的AR资源所导致的AR应用程序的安装包过大的问题。在一些实施例中,在AR游戏应用程序或者AR导航应用程序启动后,用户不需要等待所有AR资源都更新完成即可开启AR游戏或者AR导航,并在游戏或者导航的过程中逐渐根据第一电子设备的位置信息加载AR资源,提高了用户体验。The resource loading method provided by the embodiment of the present disclosure can load the corresponding target AR resource according to the location information of the first electronic device, which alleviates the excessively large installation package of the AR application caused by packaging and downloading all the AR resources when downloading the AR application. The problem. In some embodiments, after the AR game application or AR navigation application is started, the user does not need to wait for all AR resources to be updated to complete the AR game or AR navigation. The location information of the electronic device loads AR resources, which improves the user experience.
可以理解,本公开提及的上述各个方法实施例,在不违背原理逻辑的情况下,均可以彼此相互结合形成结合后的实施例,限于篇幅,本公开不再赘述。本领域技术人员可以理解,在具体实施方式的上述方法中,各步骤的具体执行顺序应当以其功能和可能的内在逻辑确定。It can be understood that the above method embodiments mentioned in the present disclosure can be combined with each other to form combined embodiments without violating the principle and logic. Due to space limitations, the present disclosure will not repeat them. Those skilled in the art can understand that, in the above method of the specific embodiment, the specific execution order of each step should be determined by its function and possible internal logic.
此外,本公开还提供了资源加载装置、电子设备、计算机可读存储介质、程序,上述均可用来实现本公开提供的任一种资源加载方法,相应技术方案和描述和参见方法部分的相应记载,不再赘述。In addition, the present disclosure also provides resource loading apparatuses, electronic devices, computer-readable storage media, and programs, all of which can be used to implement any resource loading method provided by the present disclosure. For corresponding technical solutions and descriptions, refer to the corresponding records in the method section. ,No longer.
图6示出根据本公开实施例的资源加载装置的框图,所述装置应用于第一电子设备,如图6所示,所述装置包括:发送模块61,可以用于向第二电子设备发送定位信息,所述定位信息用于使所述第二电子设备根据所述定位信息确定所述第一电子设备的位置信息,并根据所述第一电子设备的位置信息确定待加载增强现实AR资源;接收模块62,可以用于接收所述第二电子设备发送的所述待加载AR资源,并对所述待加载AR资源进行相应展示。FIG. 6 shows a block diagram of a resource loading apparatus according to an embodiment of the present disclosure. The apparatus is applied to a first electronic device. As shown in FIG. 6 , the apparatus includes: a sending module 61, which can be configured to send to a second electronic device Positioning information, where the positioning information is used to enable the second electronic device to determine the position information of the first electronic device according to the positioning information, and to determine the augmented reality AR resource to be loaded according to the position information of the first electronic device ; The receiving module 62 may be configured to receive the AR resource to be loaded sent by the second electronic device, and to display the AR resource to be loaded accordingly.
这样,第一电子设备可以向第二电子设备发送定位信息,以使得所述第二电子设备根据所述定位信息确定所述第一电子设备的位置信息,并根据所述第一电子设备的位置信息确定待加载增强现实AR资源,进而第一电子设备可以接收所述第二电子设备发送的所述待加载AR资源,并对所述待加载AR资源进行相应展示。根据本公开实施例提供的资源加载装置,可以根据第一电子设备的位置信息确定并加载对应的待加载AR资源,缓解了下载AR应用程序时打包下载全部的AR资源所导致的AR应用程序的安装包过大的问题,使得AR应用程序的安装包轻便,在不影响用户使用的情况下,提高了AR应用程序的下载安装效率。In this way, the first electronic device can send positioning information to the second electronic device, so that the second electronic device determines the position information of the first electronic device according to the positioning information, and determines the position information of the first electronic device according to the position of the first electronic device. The information determines the AR resource to be loaded, and then the first electronic device may receive the AR resource to be loaded sent by the second electronic device, and display the AR resource to be loaded accordingly. According to the resource loading apparatus provided by the embodiment of the present disclosure, the corresponding AR resource to be loaded can be determined and loaded according to the location information of the first electronic device, which alleviates the AR application caused by packaging and downloading all AR resources when downloading the AR application. The problem that the installation package is too large makes the installation package of the AR application lightweight, which improves the download and installation efficiency of the AR application without affecting the user's use.
在一种可能的实现方式中,所述接收模块,还可以用于:接收所述第二电子设备发送的所述待加载AR资源的标识信息;从所述待加载AR资源的标识信息中,确定目标AR资源的标识信息;将所述目标AR资源的标识信息携带于AR资源获取请求,并向所述第二电子设备发送所述AR资源获取请求,所述AR资源获取请求用于使所述第二电子设备根据所述AR资源获取请求获取所述目标AR资源的标识信息对应的目标AR资源;接收并展示所述第二电子设备发送的所述目标AR资源。In a possible implementation manner, the receiving module may be further configured to: receive the identification information of the AR resource to be loaded sent by the second electronic device; from the identification information of the AR resource to be loaded, Determine the identification information of the target AR resource; carry the identification information of the target AR resource in the AR resource acquisition request, and send the AR resource acquisition request to the second electronic device, and the AR resource acquisition request is used to make the AR resource acquisition request The second electronic device acquires the target AR resource corresponding to the identification information of the target AR resource according to the AR resource acquisition request; and receives and displays the target AR resource sent by the second electronic device.
在一种可能的实现方式中,所述接收模块,还可以用于:接收所述第二电子设备发送的所述待加载AR资源;从所述待加载AR资源中确定目标AR资源;展示所述目标AR资源。In a possible implementation manner, the receiving module may be further configured to: receive the AR resource to be loaded sent by the second electronic device; determine the target AR resource from the AR resource to be loaded; display the AR resource to be loaded; Describe the target AR resource.
在一种可能的实现方式中,所述发送模块,还可以用于响应于以下任一种情况,向第二电子设备发送定位信息:在时间周期内,所述第一电子设备移动的距离大于距离阈值;在所述时间周期内,所述第一电子设备的实时位置信息位于定位区域外;在上一时间周期结束,开始新一时间周期;其中,所述定位区域为以所述第一电子设备在所述时间周期初始时刻对应的位置信息为中心的区域。In a possible implementation manner, the sending module may also be configured to send positioning information to the second electronic device in response to any of the following conditions: within a time period, the distance moved by the first electronic device is greater than distance threshold; within the time period, the real-time location information of the first electronic device is located outside the positioning area; when the previous time period ends, a new time period starts; wherein, the positioning area is based on the first time period The position information corresponding to the electronic device at the initial moment of the time period is the center area.
在一种可能的实现方式中,所述待加载AR资源的标识信息包括AR资源标识及AR资源版本信息,所述接收模块还可以用于:针对任一待加载AR资源的标识信息,在本地未缓存所述AR资源标识对应的AR资源的情况下,或者在本地缓存的所述AR资源标识对应的AR资源的AR资源版本信息,与所述AR资源版本信息不一致的情况下,确定所述待加载AR资源的标识信息为目标AR资源的标识信息。In a possible implementation manner, the identification information of the AR resource to be loaded includes AR resource identification and AR resource version information, and the receiving module may also be used to: for any identification information of the AR resource to be loaded, in the local If the AR resource corresponding to the AR resource identifier is not cached, or if the locally cached AR resource version information of the AR resource corresponding to the AR resource identifier is inconsistent with the AR resource version information, determine the AR resource. The identification information of the AR resource to be loaded is the identification information of the target AR resource.
在一种可能的实现方式中,所述定位信息中可以包括所述第一电子设备所在的环境图像,所述环境图像用于使所述第二电子设备根据所述环境图像确定所述第一电子设备的位置信息。In a possible implementation manner, the positioning information may include an environment image where the first electronic device is located, and the environment image is used to enable the second electronic device to determine the first electronic device according to the environment image. Location information of electronic devices.
图7示出根据本公开实施例的资源加载装置的框图,所述装置应用于第二电子设备,如图7所示,所述装置包括:接收模块71,可以用于接收第一电子设备发送的定位信息;第一确定模块72,可以用于根据所述定位信息确定所述第一电子设备的位置信息;第二确定模块73,可以用于根据所述第一电子设备的位置信息从增强现实AR资源中确定待加载AR资源;发送模块74,可以用于向所述第一电子设备发送所述待加载AR资源,其中,所述待加载AR资源展示于所述第一电子设备中。Fig. 7 shows a block diagram of a resource loading apparatus according to an embodiment of the present disclosure. The apparatus is applied to a second electronic device. As shown in Fig. 7 , the apparatus includes: a receiving module 71, which can be configured to receive data sent by the first electronic device The first determining module 72 can be used to determine the location information of the first electronic device according to the positioning information; the second determining module 73 can be used to determine the location information of the first electronic device from the enhanced The AR resource to be loaded is determined from the actual AR resource; the sending module 74 may be configured to send the AR resource to be loaded to the first electronic device, wherein the AR resource to be loaded is displayed in the first electronic device.
这样,第二电子设备可以接收所述第一电子设备发送的定位信息,并根据所述定位信息确定所述第一电子设备的位置信息。第二电子设备可以根据所述第一电子设备的位置信息从增强现实AR资源中确定待加载AR资源,并向所述第一电子设备发送所述待加载AR资源,以使得所述第一电子设备对所述待加载AR资源进行相应展示。根据本公开实施例提供的资源加载装置,可以根据第一电子设备的位置信息逐步加载AR资源,缓解了下载AR应用程序时打包下载全部的AR资源所导致的AR应用程序的安装包过大的问题,使得AR应用程序的安装包轻便,在不影响用户使用的情况下,提高了AR应用程序的下载安装效率。In this way, the second electronic device can receive the positioning information sent by the first electronic device, and determine the position information of the first electronic device according to the positioning information. The second electronic device may determine the AR resource to be loaded from the augmented reality AR resource according to the location information of the first electronic device, and send the AR resource to be loaded to the first electronic device, so that the first electronic device The device displays the AR resource to be loaded accordingly. According to the resource loading device provided by the embodiment of the present disclosure, AR resources can be loaded gradually according to the location information of the first electronic device, which alleviates the problem of excessively large installation packages of AR applications caused by downloading all AR resources when downloading AR applications. The problem makes the installation package of the AR application lightweight, and improves the download and installation efficiency of the AR application without affecting the user's use.
在一种可能的实现方式中,所述发送模块,还可以用于:向所述第一电子设备发送所述待加载AR资源的标识信息,其中,所述待加载AR资源的标识信息用于使得所述第一电子设备从所述待加载AR资源的标识信息中确定目标AR资源的标识信息;接收所述第一电子设备发送的AR资源获取请求,所述AR资源获取请求中携带所述目标AR资源的标识信息;响应于所述AR资源获取请求,获取所述目标AR资源的标识信息对应的目标AR资源,并向所述第一电子设备发送所述目标AR资源,,其中,所述目标AR资源展示于所述第一电子设备中。In a possible implementation manner, the sending module may be further configured to: send the identification information of the AR resource to be loaded to the first electronic device, where the identification information of the AR resource to be loaded is used for Make the first electronic device determine the identification information of the target AR resource from the identification information of the AR resource to be loaded; receive an AR resource acquisition request sent by the first electronic device, where the AR resource acquisition request carries the identification information of the target AR resource; in response to the AR resource acquisition request, acquire the target AR resource corresponding to the identification information of the target AR resource, and send the target AR resource to the first electronic device, wherein the The target AR resource is displayed in the first electronic device.
在一种可能的实现方式中,所述第二确定模块,还可以用于:根据所述第一电子设备的位置信息确定待加载范围;针对任一AR资源,在所述AR资源对应的位置信息位于所述待加载范围内的情况下,确定所述AR资源为待加载AR资源。In a possible implementation manner, the second determining module may be further configured to: determine the to-be-loaded range according to the location information of the first electronic device; for any AR resource, at the location corresponding to the AR resource When the information is within the to-be-loaded range, it is determined that the AR resource is the to-be-loaded AR resource.
在一种可能的实现方式中,所述第二确定模块,还可以用于:确定范围构建数据;根据所述第一电子设备的位置信息及所述范围构建数据,确定所述待加载范围。In a possible implementation manner, the second determining module may be further configured to: determine range construction data; and determine the to-be-loaded range according to the location information of the first electronic device and the range construction data.
在一种可能的实现方式中,所述定位信息中还包括所述第一电子设备的网络信号质量和/或所述第一电子设备的移动速度,所述第二确定模块,还可以用于:根据所述网络信号质量,确定与所述网络信号质量相对应的范围构建数据;和/或,根据所述移动速度,确定与所述移动速度相对应的范围构建数据。In a possible implementation manner, the positioning information further includes the network signal quality of the first electronic device and/or the moving speed of the first electronic device, and the second determining module may also be used for : determining range construction data corresponding to the network signal quality according to the network signal quality; and/or determining range construction data corresponding to the movement speed according to the movement speed.
在一种可能的实现方式中,所述第二确定模块,还可以用于:根据所述第一电子设备的位置信息及所述范围构建数据,确定初始待加载范围;确定位置信息位于所述初始待加载范围内的AR资源的数量;根据所述AR资源的数量调整所述范围构建数据,得到调整后的范围构建数据;根据所述调整后的范围构建数据及所述第一电子设备的位置信息,确定所述待加载范围。In a possible implementation manner, the second determining module may be further configured to: determine the initial range to be loaded according to the location information of the first electronic device and the range construction data; determine that the location information is located in the The number of AR resources in the range to be loaded initially; the range construction data is adjusted according to the number of AR resources to obtain the adjusted range construction data; the range construction data is adjusted according to the adjusted range construction data and the first electronic device. location information, to determine the to-be-loaded range.
在一种可能的实现方式中,所述第二确定模块,还可以用于:确定各AR资源的位置信息与所述第一电子设备的位置信息之间的距离;将各AR资源按照距离由小到大进行排序后,将前预置数量个AR资源确定为待加载AR资源。In a possible implementation manner, the second determining module may be further configured to: determine the distance between the location information of each AR resource and the location information of the first electronic device; After sorting from small to large, the first preset number of AR resources are determined as AR resources to be loaded.
在一种可能的实现方式中,所述定位信息中包括所述第一电子设备所在的环境图像,所述第一确定模块,还可以用于:根据第一电子设备所在的环境图像对所述第一电子设备进行视觉定位,得到所述第一电子设备的位置信息。In a possible implementation manner, the positioning information includes an image of the environment where the first electronic device is located, and the first determining module may be further configured to: determine the The first electronic device performs visual positioning to obtain location information of the first electronic device.
在一些实施例中,本公开实施例提供的装置具有的功能或包含的模块可以用于执行 上文方法实施例描述的方法,其具体实现可以参照上文方法实施例的描述,为了简洁,这里不再赘述。In some embodiments, the functions or modules included in the apparatuses provided in the embodiments of the present disclosure may be used to execute the methods described in the above method embodiments. For specific implementation, reference may be made to the descriptions of the above method embodiments. For brevity, here No longer.
本公开实施例还提出一种计算机可读存储介质,其上存储有计算机程序指令,所述计算机程序指令被处理器执行时实现上述方法。计算机可读存储介质可以是非易失性计算机可读存储介质。Embodiments of the present disclosure further provide a computer-readable storage medium, on which computer program instructions are stored, and when the computer program instructions are executed by a processor, the foregoing method is implemented. The computer-readable storage medium may be a non-volatile computer-readable storage medium.
本公开实施例还提出一种电子设备,包括:处理器;用于存储处理器可执行指令的存储器;其中,所述处理器被配置为调用所述存储器存储的指令,以执行上述方法。An embodiment of the present disclosure further provides an electronic device, including: a processor; a memory for storing instructions executable by the processor; wherein the processor is configured to invoke the instructions stored in the memory to execute the above method.
本公开实施例还提供了一种计算机程序产品,包括计算机可读代码,当计算机可读代码在设备上运行时,设备中的处理器执行用于实现如上任一实施例提供的资源加载方法的指令。Embodiments of the present disclosure also provide a computer program product, including computer-readable codes. When the computer-readable codes are run on a device, a processor in the device executes a method for implementing the resource loading method provided by any of the above embodiments. instruction.
本公开实施例还提供了另一种计算机程序产品,用于存储计算机可读指令,指令被执行时使得计算机执行上述任一实施例提供的资源加载方法的操作。Embodiments of the present disclosure further provide another computer program product for storing computer-readable instructions, which, when executed, cause a computer to perform operations of the resource loading method provided by any of the foregoing embodiments.
电子设备可以被提供为终端、服务器或其它形态的设备。The electronic device may be provided as a terminal, server or other form of device.
图8示出根据本公开实施例的一种电子设备800的框图。例如,电子设备800可以是移动电话,计算机,数字广播终端,消息收发设备,游戏控制台,平板设备,医疗设备,健身设备,个人数字助理等终端。FIG. 8 shows a block diagram of an electronic device 800 according to an embodiment of the present disclosure. For example, electronic device 800 may be a mobile phone, computer, digital broadcast terminal, messaging device, game console, tablet device, medical device, fitness device, personal digital assistant, etc. terminal.
参照图8,电子设备800可以包括以下一个或多个组件:处理组件802,存储器804,电源组件806,多媒体组件808,音频组件810,输入/输出(I/O)的接口812,传感器组件814,以及通信组件816。8, an electronic device 800 may include one or more of the following components: a processing component 802, a memory 804, a power supply component 806, a multimedia component 808, an audio component 810, an input/output (I/O) interface 812, a sensor component 814 , and the communication component 816 .
处理组件802通常控制电子设备800的整体操作,诸如与显示,电话呼叫,数据通信,相机操作和记录操作相关联的操作。处理组件802可以包括一个或多个处理器820来执行指令,以完成上述的方法的全部或部分步骤。此外,处理组件802可以包括一个或多个模块,便于处理组件802和其他组件之间的交互。例如,处理组件802可以包括多媒体模块,以方便多媒体组件808和处理组件802之间的交互。The processing component 802 generally controls the overall operation of the electronic device 800, such as operations associated with display, phone calls, data communications, camera operations, and recording operations. The processing component 802 can include one or more processors 820 to execute instructions to perform all or some of the steps of the methods described above. Additionally, processing component 802 may include one or more modules that facilitate interaction between processing component 802 and other components. For example, processing component 802 may include a multimedia module to facilitate interaction between multimedia component 808 and processing component 802.
存储器804被配置为存储各种类型的数据以支持在电子设备800的操作。这些数据的示例包括用于在电子设备800上操作的任何应用程序或方法的指令,联系人数据,电话簿数据,消息,图片,视频等。存储器804可以由任何类型的易失性或非易失性存储设备或者它们的组合实现,如静态随机存取存储器(SRAM),电可擦除可编程只读存储器(EEPROM),可擦除可编程只读存储器(EPROM),可编程只读存储器(PROM),只读存储器(ROM),磁存储器,快闪存储器,磁盘或光盘。 Memory 804 is configured to store various types of data to support operation at electronic device 800 . Examples of such data include instructions for any application or method operating on electronic device 800, contact data, phonebook data, messages, pictures, videos, and the like. Memory 804 may be implemented by any type of volatile or nonvolatile storage device or combination thereof, such as static random access memory (SRAM), electrically erasable programmable read only memory (EEPROM), erasable Programmable Read Only Memory (EPROM), Programmable Read Only Memory (PROM), Read Only Memory (ROM), Magnetic Memory, Flash Memory, Magnetic or Optical Disk.
电源组件806为电子设备800的各种组件提供电力。电源组件806可以包括电源管理系统,一个或多个电源,及其他与为电子设备800生成、管理和分配电力相关联的组件。 Power supply assembly 806 provides power to various components of electronic device 800 . Power supply components 806 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power to electronic device 800 .
多媒体组件808包括在所述电子设备800和用户之间的提供一个输出接口的屏幕。在一些实施例中,屏幕可以包括液晶显示器(LCD)和触摸面板(TP)。如果屏幕包括触摸面板,屏幕可以被实现为触摸屏,以接收来自用户的输入信号。触摸面板包括一个或多个触摸传感器以感测触摸、滑动和触摸面板上的手势。所述触摸传感器可以不仅感测触摸或滑动动作的边界,而且还检测与所述触摸或滑动操作相关的持续时间和压力。在一些实施例中,多媒体组件808包括一个前置摄像头和/或后置摄像头。当电子设备800处于操作模式,如拍摄模式或视频模式时,前置摄像头和/或后置摄像头可以接收外部的多媒体数据。每个前置摄像头和后置摄像头可以是一个固定的光学透镜系统或具有焦距和光学变焦能力。 Multimedia component 808 includes a screen that provides an output interface between the electronic device 800 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from a user. The touch panel includes one or more touch sensors to sense touch, swipe, and gestures on the touch panel. The touch sensor may not only sense the boundaries of a touch or swipe action, but also detect the duration and pressure associated with the touch or swipe action. In some embodiments, the multimedia component 808 includes a front-facing camera and/or a rear-facing camera. When the electronic device 800 is in an operation mode, such as a shooting mode or a video mode, the front camera and/or the rear camera may receive external multimedia data. Each of the front and rear cameras can be a fixed optical lens system or have focal length and optical zoom capability.
音频组件810被配置为输出和/或输入音频信号。例如,音频组件810包括一个麦克风(MIC),当电子设备800处于操作模式,如呼叫模式、记录模式和语音识别模式时,麦克风被配置为接收外部音频信号。所接收的音频信号可以被进一步存储在存储器804或经由通信组件816发送。在一些实施例中,音频组件810还包括一个扬声器,用于输出音频 信号。 Audio component 810 is configured to output and/or input audio signals. For example, audio component 810 includes a microphone (MIC) that is configured to receive external audio signals when electronic device 800 is in operating modes, such as calling mode, recording mode, and voice recognition mode. The received audio signal may be further stored in memory 804 or transmitted via communication component 816 . In some embodiments, audio component 810 also includes a speaker for outputting audio signals.
I/O接口812为处理组件802和外围接口模块之间提供接口,上述外围接口模块可以是键盘,点击轮,按钮等。这些按钮可包括但不限于:主页按钮、音量按钮、启动按钮和锁定按钮。The I/O interface 812 provides an interface between the processing component 802 and a peripheral interface module, which may be a keyboard, a click wheel, a button, or the like. These buttons may include, but are not limited to: home button, volume buttons, start button, and lock button.
传感器组件814包括一个或多个传感器,用于为电子设备800提供各个方面的状态评估。例如,传感器组件814可以检测到电子设备800的打开/关闭状态,组件的相对定位,例如所述组件为电子设备800的显示器和小键盘,传感器组件814还可以检测电子设备800或电子设备800一个组件的位置改变,用户与电子设备800接触的存在或不存在,电子设备800方位或加速/减速和电子设备800的温度变化。传感器组件814可以包括接近传感器,被配置用来在没有任何的物理接触时检测附近物体的存在。传感器组件814还可以包括光传感器,如互补金属氧化物半导体(CMOS)或电荷耦合装置(CCD)图像传感器,用于在成像应用中使用。在一些实施例中,该传感器组件814还可以包括加速度传感器,陀螺仪传感器,磁传感器,压力传感器或温度传感器。 Sensor assembly 814 includes one or more sensors for providing status assessment of various aspects of electronic device 800 . For example, the sensor assembly 814 can detect the on/off state of the electronic device 800, the relative positioning of the components, such as the display and the keypad of the electronic device 800, the sensor assembly 814 can also detect the electronic device 800 or one of the electronic device 800 Changes in the position of components, presence or absence of user contact with the electronic device 800 , orientation or acceleration/deceleration of the electronic device 800 and changes in the temperature of the electronic device 800 . Sensor assembly 814 may include a proximity sensor configured to detect the presence of nearby objects in the absence of any physical contact. Sensor assembly 814 may also include a light sensor, such as a complementary metal oxide semiconductor (CMOS) or charge coupled device (CCD) image sensor, for use in imaging applications. In some embodiments, the sensor assembly 814 may also include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
通信组件816被配置为便于电子设备800和其他设备之间有线或无线方式的通信。电子设备800可以接入基于通信标准的无线网络,如无线网络(WiFi),第二代移动通信技术(2G)或第三代移动通信技术(3G),或它们的组合。在一个示例性实施例中,通信组件816经由广播信道接收来自外部广播管理系统的广播信号或广播相关信息。在一个示例性实施例中,所述通信组件816还包括近场通信(NFC)模块,以促进短程通信。例如,在NFC模块可基于射频识别(RFID)技术,红外数据协会(IrDA)技术,超宽带(UWB)技术,蓝牙(BT)技术和其他技术来实现。 Communication component 816 is configured to facilitate wired or wireless communication between electronic device 800 and other devices. The electronic device 800 may access a wireless network based on a communication standard, such as wireless network (WiFi), second generation mobile communication technology (2G) or third generation mobile communication technology (3G), or a combination thereof. In one exemplary embodiment, the communication component 816 receives broadcast signals or broadcast related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 816 also includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module may be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology and other technologies.
在示例性实施例中,电子设备800可以被一个或多个应用专用集成电路(ASIC)、数字信号处理器(DSP)、数字信号处理设备(DSPD)、可编程逻辑器件(PLD)、现场可编程门阵列(FPGA)、控制器、微控制器、微处理器或其他电子元件实现,用于执行上述方法。In an exemplary embodiment, electronic device 800 may be implemented by one or more application specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable A programmed gate array (FPGA), controller, microcontroller, microprocessor or other electronic component implementation is used to perform the above method.
在示例性实施例中,还提供了一种非易失性计算机可读存储介质,例如包括计算机程序指令的存储器804,上述计算机程序指令可由电子设备800的处理器820执行以完成上述方法。In an exemplary embodiment, a non-volatile computer-readable storage medium, such as a memory 804 comprising computer program instructions executable by the processor 820 of the electronic device 800 to perform the above method is also provided.
图9示出根据本公开实施例的一种电子设备1900的框图。例如,电子设备1900可以被提供为一服务器。参照图9,电子设备1900包括处理组件1922,其进一步包括一个或多个处理器,以及由存储器1932所代表的存储器资源,用于存储可由处理组件1922的执行的指令,例如应用程序。存储器1932中存储的应用程序可以包括一个或一个以上的每一个对应于一组指令的模块。此外,处理组件1922被配置为执行指令,以执行上述方法。FIG. 9 shows a block diagram of an electronic device 1900 according to an embodiment of the present disclosure. For example, the electronic device 1900 may be provided as a server. 9, electronic device 1900 includes processing component 1922, which further includes one or more processors, and a memory resource represented by memory 1932 for storing instructions executable by processing component 1922, such as applications. An application program stored in memory 1932 may include one or more modules, each corresponding to a set of instructions. Additionally, the processing component 1922 is configured to execute instructions to perform the above-described methods.
电子设备1900还可以包括一个电源组件1926被配置为执行电子设备1900的电源管理,一个有线或无线网络接口1950被配置为将电子设备1900连接到网络,和一个输入输出(I/O)接口1958。电子设备1900可以操作基于存储在存储器1932的操作系统,例如微软服务器操作系统(Windows Server TM),苹果公司推出的基于图形用户界面操作系统(Mac OS X TM),多用户多进程的计算机操作系统(Unix TM),自由和开放原代码的类Unix操作系统(Linux TM),开放原代码的类Unix操作系统(FreeBSD TM)或类似。 The electronic device 1900 may also include a power supply assembly 1926 configured to perform power management of the electronic device 1900, a wired or wireless network interface 1950 configured to connect the electronic device 1900 to a network, and an input output (I/O) interface 1958 . The electronic device 1900 can operate based on an operating system stored in the memory 1932, such as a Microsoft server operating system (Windows Server ), a graphical user interface based operating system (Mac OS X ) introduced by Apple, a multi-user multi-process computer operating system (Unix ), Free and Open Source Unix-like Operating System (Linux ), Open Source Unix-like Operating System (FreeBSD ) or the like.
在示例性实施例中,还提供了一种非易失性计算机可读存储介质,例如包括计算机程序指令的存储器1932,上述计算机程序指令可由电子设备1900的处理组件1922执行以完成上述方法。In an exemplary embodiment, a non-volatile computer-readable storage medium is also provided, such as memory 1932 comprising computer program instructions executable by processing component 1922 of electronic device 1900 to perform the above-described method.
本公开可以是系统、方法和/或计算机程序产品。计算机程序产品可以包括计算机可读存储介质,其上载有用于使处理器实现本公开实施例的各个方面的计算机可读程序指令。The present disclosure may be a system, method and/or computer program product. The computer program product may include a computer-readable storage medium having computer-readable program instructions loaded thereon for causing a processor to implement various aspects of the embodiments of the present disclosure.
计算机可读存储介质可以是可以保持和存储由指令执行设备使用的指令的有形设 备。计算机可读存储介质例如可以是(但不限于)电存储设备、磁存储设备、光存储设备、电磁存储设备、半导体存储设备或者上述的任意合适的组合。计算机可读存储介质的更具体的例子(非穷举的列表)包括:便携式计算机盘、硬盘、随机存取存储器(RAM)、只读存储器(ROM)、可擦式可编程只读存储器(EPROM或闪存)、静态随机存取存储器(SRAM)、便携式压缩盘只读存储器(CD-ROM)、数字多功能盘(DVD)、记忆棒、软盘、机械编码设备、例如其上存储有指令的打孔卡或凹槽内凸起结构、以及上述的任意合适的组合。这里所使用的计算机可读存储介质不被解释为瞬时信号本身,诸如无线电波或者其他自由传播的电磁波、通过波导或其他传输媒介传播的电磁波(例如,通过光纤电缆的光脉冲)、或者通过电线传输的电信号。A computer-readable storage medium may be a tangible device that can hold and store instructions for use by the instruction execution device. The computer-readable storage medium may be, for example, but not limited to, an electrical storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, or any suitable combination of the foregoing. More specific examples (non-exhaustive list) of computer readable storage media include: portable computer disks, hard disks, random access memory (RAM), read only memory (ROM), erasable programmable read only memory (EPROM) or flash memory), static random access memory (SRAM), portable compact disk read only memory (CD-ROM), digital versatile disk (DVD), memory sticks, floppy disks, mechanically coded devices, such as printers with instructions stored thereon Hole cards or raised structures in grooves, and any suitable combination of the above. Computer-readable storage media, as used herein, are not to be construed as transient signals per se, such as radio waves or other freely propagating electromagnetic waves, electromagnetic waves propagating through waveguides or other transmission media (eg, light pulses through fiber optic cables), or through electrical wires transmitted electrical signals.
这里所描述的计算机可读程序指令可以从计算机可读存储介质下载到各个计算/处理设备,或者通过网络、例如因特网、局域网、广域网和/或无线网下载到外部计算机或外部存储设备。网络可以包括铜传输电缆、光纤传输、无线传输、路由器、防火墙、交换机、网关计算机和/或边缘服务器。每个计算/处理设备中的网络适配卡或者网络接口从网络接收计算机可读程序指令,并转发该计算机可读程序指令,以供存储在各个计算/处理设备中的计算机可读存储介质中。The computer readable program instructions described herein may be downloaded to various computing/processing devices from a computer readable storage medium, or to an external computer or external storage device over a network such as the Internet, a local area network, a wide area network, and/or a wireless network. The network may include copper transmission cables, fiber optic transmission, wireless transmission, routers, firewalls, switches, gateway computers, and/or edge servers. A network adapter card or network interface in each computing/processing device receives computer-readable program instructions from a network and forwards the computer-readable program instructions for storage in a computer-readable storage medium in each computing/processing device .
用于执行本公开操作的计算机程序指令可以是汇编指令、指令集架构(ISA)指令、机器指令、机器相关指令、微代码、固件指令、状态设置数据、或者以一种或多种编程语言的任意组合编写的源代码或目标代码,所述编程语言包括面向对象的编程语言—诸如Smalltalk、C++等,以及常规的过程式编程语言—诸如“C”语言或类似的编程语言。计算机可读程序指令可以完全地在用户计算机上执行、部分地在用户计算机上执行、作为一个独立的软件包执行、部分在用户计算机上部分在远程计算机上执行、或者完全在远程计算机或服务器上执行。在涉及远程计算机的情形中,远程计算机可以通过任意种类的网络—包括局域网(LAN)或广域网(WAN)—连接到用户计算机,或者,可以连接到外部计算机(例如利用因特网服务提供商来通过因特网连接)。在一些实施例中,通过利用计算机可读程序指令的状态信息来个性化定制电子电路,例如可编程逻辑电路、现场可编程门阵列(FPGA)或可编程逻辑阵列(PLA),该电子电路可以执行计算机可读程序指令,从而实现本公开实施例的各个方面。Computer program instructions for carrying out operations of the present disclosure may be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-dependent instructions, microcode, firmware instructions, state setting data, or instructions in one or more programming languages. Source or object code, written in any combination, including object-oriented programming languages, such as Smalltalk, C++, etc., and conventional procedural programming languages, such as the "C" language or similar programming languages. The computer readable program instructions may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer, or entirely on the remote computer or server implement. In the case of a remote computer, the remote computer may be connected to the user's computer through any kind of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (eg, using an Internet service provider through the Internet connect). In some embodiments, custom electronic circuits, such as programmable logic circuits, field programmable gate arrays (FPGAs), or programmable logic arrays (PLAs), can be personalized by utilizing state information of computer readable program instructions. Computer readable program instructions are executed to implement various aspects of the embodiments of the present disclosure.
这里参照根据本公开实施例的方法、装置(系统)和计算机程序产品的流程图和/或框图描述了本公开实施例的各个方面。应当理解,流程图和/或框图的每个方框以及流程图和/或框图中各方框的组合,都可以由计算机可读程序指令实现。Aspects of embodiments of the present disclosure are described herein with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the disclosure. It will be understood that each block of the flowchart illustrations and/or block diagrams, and combinations of blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer readable program instructions.
这些计算机可读程序指令可以提供给通用计算机、专用计算机或其它可编程数据处理装置的处理器,从而生产出一种机器,使得这些指令在通过计算机或其它可编程数据处理装置的处理器执行时,产生了实现流程图和/或框图中的一个或多个方框中规定的功能/动作的装置。也可以把这些计算机可读程序指令存储在计算机可读存储介质中,这些指令使得计算机、可编程数据处理装置和/或其他设备以特定方式工作,从而,存储有指令的计算机可读介质则包括一个制造品,其包括实现流程图和/或框图中的一个或多个方框中规定的功能/动作的各个方面的指令。These computer readable program instructions may be provided to a processor of a general purpose computer, special purpose computer or other programmable data processing apparatus to produce a machine that causes the instructions when executed by the processor of the computer or other programmable data processing apparatus , resulting in means for implementing the functions/acts specified in one or more blocks of the flowchart and/or block diagrams. These computer readable program instructions can also be stored in a computer readable storage medium, these instructions cause a computer, programmable data processing apparatus and/or other equipment to operate in a specific manner, so that the computer readable medium on which the instructions are stored includes An article of manufacture comprising instructions for implementing various aspects of the functions/acts specified in one or more blocks of the flowchart and/or block diagrams.
也可以把计算机可读程序指令加载到计算机、其它可编程数据处理装置、或其它设备上,使得在计算机、其它可编程数据处理装置或其它设备上执行一系列操作步骤,以产生计算机实现的过程,从而使得在计算机、其它可编程数据处理装置、或其它设备上执行的指令实现流程图和/或框图中的一个或多个方框中规定的功能/动作。Computer readable program instructions can also be loaded onto a computer, other programmable data processing apparatus, or other equipment to cause a series of operational steps to be performed on the computer, other programmable data processing apparatus, or other equipment to produce a computer-implemented process , thereby causing instructions executing on a computer, other programmable data processing apparatus, or other device to implement the functions/acts specified in one or more blocks of the flowcharts and/or block diagrams.
附图中的流程图和框图显示了根据本公开实施例的多个实施例的系统、方法和计算机程序产品的可能实现的体系架构、功能和操作。在这点上,流程图或框图中的每个方框可以代表一个模块、程序段或指令的一部分,所述模块、程序段或指令的一部分包含一个或多个用于实现规定的逻辑功能的可执行指令。在有些作为替换的实现中,方框中 所标注的功能也可以以不同于附图中所标注的顺序发生。例如,两个连续的方框实际上可以基本并行地执行,它们有时也可以按相反的顺序执行,这依所涉及的功能而定。也要注意的是,框图和/或流程图中的每个方框、以及框图和/或流程图中的方框的组合,可以用执行规定的功能或动作的专用的基于硬件的系统来实现,或者可以用专用硬件与计算机指令的组合来实现。The flowchart and block diagrams in the Figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of instructions, which comprises one or more functions for implementing the specified logical function(s) executable instructions. In some alternative implementations, the functions noted in the blocks may occur out of the order noted in the figures. For example, two blocks in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It is also noted that each block of the block diagrams and/or flowchart illustrations, and combinations of blocks in the block diagrams and/or flowchart illustrations, can be implemented in dedicated hardware-based systems that perform the specified functions or actions , or can be implemented in a combination of dedicated hardware and computer instructions.
该计算机程序产品可以具体通过硬件、软件或其结合的方式实现。在一个可选实施例中,所述计算机程序产品具体体现为计算机存储介质,在另一个可选实施例中,计算机程序产品具体体现为软件产品,例如软件开发包(Software Development Kit,SDK)等等。The computer program product can be specifically implemented by hardware, software or a combination thereof. In an optional embodiment, the computer program product is embodied as a computer storage medium, and in another optional embodiment, the computer program product is embodied as a software product, such as a software development kit (Software Development Kit, SDK), etc. Wait.
以上已经描述了本公开实施例的各实施例,上述说明是在一些实施例中,并非穷尽性的,并且也不限于所披露的各实施例。在不偏离所说明的各实施例的范围和精神的情况下,对于本技术领域的普通技术人员来说许多修改和变更都是显而易见的。本文中所用术语的选择,旨在最好地解释各实施例的原理、实际应用或对市场中的技术的改进,或者使本技术领域的其它普通技术人员能理解本文披露的各实施例。Various embodiments of the embodiments of the present disclosure have been described above, and the above descriptions are in some embodiments, not exhaustive, and not limited to the disclosed embodiments. Numerous modifications and variations will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the described embodiments. The terminology used herein was chosen to best explain the principles of the various embodiments, the practical application or improvement over the technology in the marketplace, or to enable others of ordinary skill in the art to understand the various embodiments disclosed herein.
工业实用性Industrial Applicability
本公开提供了一种资源加载方法及装置、电子设备和存储介质及程序,其中,向第二电子设备发送定位信息,所述定位信息用于使所述第二电子设备根据所述定位信息确定所述第一电子设备的位置信息,并根据所述第一电子设备的位置信息确定待加载增强现实AR资源;接收所述第二电子设备发送的所述待加载AR资源,并对所述待加载AR资源进行相应展示。The present disclosure provides a resource loading method and apparatus, an electronic device, a storage medium and a program, wherein positioning information is sent to a second electronic device, where the positioning information is used to enable the second electronic device to determine according to the positioning information the location information of the first electronic device, and determine the augmented reality AR resource to be loaded according to the location information of the first electronic device; receive the AR resource to be loaded sent by the second electronic device, and Load AR resources for corresponding display.

Claims (19)

  1. 一种资源加载方法,其中,应用于第一电子设备,包括:A resource loading method, wherein, applied to a first electronic device, includes:
    向第二电子设备发送定位信息,所述定位信息用于使所述第二电子设备根据所述定位信息确定所述第一电子设备的位置信息,并根据所述第一电子设备的位置信息确定待加载增强现实AR资源;Sending positioning information to the second electronic device, where the positioning information is used to enable the second electronic device to determine the position information of the first electronic device according to the positioning information, and determine the position information according to the position information of the first electronic device Augmented reality AR resources to be loaded;
    接收所述第二电子设备发送的所述待加载AR资源,并对所述待加载AR资源进行相应展示。Receive the AR resource to be loaded sent by the second electronic device, and display the AR resource to be loaded accordingly.
  2. 根据权利要求1所述的方法,其中,所述接收所述第二电子设备发送的所述待加载AR资源,并对所述待加载AR资源进行相应展示,包括:The method according to claim 1, wherein the receiving the AR resource to be loaded sent by the second electronic device, and correspondingly displaying the AR resource to be loaded, comprises:
    接收所述第二电子设备发送的所述待加载AR资源的标识信息;receiving the identification information of the AR resource to be loaded sent by the second electronic device;
    从所述待加载AR资源的标识信息中,确定目标AR资源的标识信息;From the identification information of the AR resource to be loaded, determine the identification information of the target AR resource;
    将所述目标AR资源的标识信息携带于AR资源获取请求,并向所述第二电子设备发送所述AR资源获取请求,所述AR资源获取请求用于使所述第二电子设备响应于所述AR资源获取请求获取所述目标AR资源的标识信息对应的目标AR资源;Carry the identification information of the target AR resource in the AR resource acquisition request, and send the AR resource acquisition request to the second electronic device, where the AR resource acquisition request is used to make the second electronic device respond to the requested AR resource. The AR resource acquisition request acquires the target AR resource corresponding to the identification information of the target AR resource;
    接收并展示所述第二电子设备发送的所述目标AR资源。receiving and displaying the target AR resource sent by the second electronic device.
  3. 根据权利要求1所述的方法,其中,所述接收所述第二电子设备发送的所述待加载AR资源,并对所述待加载AR资源进行相应展示,包括:The method according to claim 1, wherein the receiving the AR resource to be loaded sent by the second electronic device, and correspondingly displaying the AR resource to be loaded, comprises:
    接收所述第二电子设备发送的所述待加载AR资源;receiving the AR resource to be loaded sent by the second electronic device;
    从所述待加载AR资源中确定目标AR资源;Determine the target AR resource from the AR resource to be loaded;
    展示所述目标AR资源。Display the target AR resource.
  4. 根据权利要求1至3中任一项所述的方法,其中,响应于以下任一种情况,所述向第二电子设备发送定位信息,包括:The method according to any one of claims 1 to 3, wherein, in response to any one of the following conditions, the sending the positioning information to the second electronic device comprises:
    在时间周期内,所述第一电子设备移动的距离大于距离阈值;Within a time period, the distance moved by the first electronic device is greater than a distance threshold;
    在所述时间周期内,所述第一电子设备的实时位置信息位于定位区域外;During the time period, the real-time location information of the first electronic device is located outside the positioning area;
    在上一时间周期结束,开始新一时间周期;At the end of the previous time period, start a new time period;
    其中,所述定位区域为以所述第一电子设备在所述时间周期初始时刻对应的位置信息为中心的区域。The positioning area is an area centered on the location information corresponding to the first electronic device at the initial moment of the time period.
  5. 根据权利要求2所述的方法,其中,所述待加载AR资源的标识信息包括AR资源标识及AR资源版本信息,所述从所述待加载AR资源的标识信息中,确定目标AR资源的标识信息,包括:The method according to claim 2, wherein the identification information of the AR resource to be loaded includes an AR resource identification and AR resource version information, and the identification of the target AR resource is determined from the identification information of the AR resource to be loaded information, including:
    针对任一待加载AR资源的标识信息,在本地未缓存所述AR资源标识对应的AR资源的情况下,或者在本地缓存的所述AR资源标识对应的AR资源的AR资源版本信息,与所述AR资源版本信息不一致的情况下,确定所述待加载AR资源的标识信息为所述目标AR资源的标识信息。For the identification information of any AR resource to be loaded, if the AR resource corresponding to the AR resource identifier is not cached locally, or the locally cached AR resource version information of the AR resource corresponding to the AR resource identifier is the same as the AR resource version information of the AR resource. If the version information of the AR resource is inconsistent, it is determined that the identification information of the AR resource to be loaded is the identification information of the target AR resource.
  6. 根据权利要求1至5中任一项所述的方法,其中,所述定位信息中包括所述第一电子设备所在的环境图像,所述环境图像用于使所述第二电子设备根据所述环境图像确定所述第一电子设备的位置信息。The method according to any one of claims 1 to 5, wherein the positioning information includes an environment image where the first electronic device is located, and the environment image is used to make the second electronic device locate according to the The environmental image determines location information of the first electronic device.
  7. 一种资源加载方法,其中,应用于第二电子设备,包括:A resource loading method, wherein, applied to a second electronic device, comprising:
    接收第一电子设备发送的定位信息;receiving the positioning information sent by the first electronic device;
    根据所述定位信息确定所述第一电子设备的位置信息;Determine location information of the first electronic device according to the location information;
    根据所述第一电子设备的位置信息,从增强现实AR资源中确定待加载AR资源;determining the AR resource to be loaded from the augmented reality AR resource according to the location information of the first electronic device;
    向所述第一电子设备发送所述待加载AR资源,其中,所述待加载AR资源展示于所 述第一电子设备中。Sending the AR resource to be loaded to the first electronic device, wherein the AR resource to be loaded is displayed in the first electronic device.
  8. 根据权利要求7所述的方法,其中,所述向所述第一电子设备发送所述待加载AR资源,包括:The method according to claim 7, wherein the sending the AR resource to be loaded to the first electronic device comprises:
    向所述第一电子设备发送所述待加载AR资源的标识信息,其中,所述待加载AR资源的标识信息用于使所述第一电子设备从所述待加载AR资源的标识信息中确定目标AR资源的标识信息;Sending the identification information of the AR resource to be loaded to the first electronic device, where the identification information of the AR resource to be loaded is used to enable the first electronic device to determine from the identification information of the AR resource to be loaded Identification information of the target AR resource;
    接收所述第一电子设备发送的AR资源获取请求,所述AR资源获取请求中携带所述目标AR资源的标识信息;receiving an AR resource acquisition request sent by the first electronic device, where the AR resource acquisition request carries the identification information of the target AR resource;
    响应于所述AR资源获取请求,获取所述目标AR资源的标识信息对应的目标AR资源,并向所述第一电子设备发送所述目标AR资源,其中,所述目标AR资源展示于所述第一电子设备中。In response to the AR resource acquisition request, acquire the target AR resource corresponding to the identification information of the target AR resource, and send the target AR resource to the first electronic device, wherein the target AR resource is displayed on the in the first electronic device.
  9. 根据权利要求7或8所述的方法,其中,所述根据所述第一电子设备的位置信息,从增强现实AR资源中确定待加载AR资源,包括:The method according to claim 7 or 8, wherein the determining the AR resource to be loaded from the augmented reality AR resource according to the location information of the first electronic device comprises:
    根据所述第一电子设备的位置信息确定待加载范围;Determine the to-be-loaded range according to the location information of the first electronic device;
    针对任一AR资源,在所述AR资源对应的位置信息位于所述待加载范围内的情况下,确定所述AR资源为待加载AR资源。For any AR resource, if the location information corresponding to the AR resource is located within the to-be-loaded range, the AR resource is determined to be the to-be-loaded AR resource.
  10. 根据权利要求9所述的方法,其中,所述根据所述第一电子设备的位置信息确定待加载范围,包括:The method according to claim 9, wherein the determining the range to be loaded according to the location information of the first electronic device comprises:
    确定范围构建数据;Determining the scope to build the data;
    根据所述第一电子设备的位置信息及所述范围构建数据,确定所述待加载范围。The to-be-loaded range is determined according to the location information of the first electronic device and the range construction data.
  11. 根据权利要求10所述的方法,其中,所述定位信息中还包括所述第一电子设备的网络信号质量和/或所述第一电子设备的移动速度,所述确定范围构建数据,包括:The method according to claim 10, wherein the positioning information further includes the network signal quality of the first electronic device and/or the moving speed of the first electronic device, and the determining the range construction data includes:
    根据所述网络信号质量,确定与所述网络信号质量相对应的范围构建数据;和/或,determining, according to the network signal quality, range construction data corresponding to the network signal quality; and/or,
    根据所述移动速度,确定与所述移动速度相对应的范围构建数据。Based on the moving speed, range construction data corresponding to the moving speed is determined.
  12. 根据权利要求10或11所述的方法,其中,所述根据所述第一电子设备的位置信息及所述范围构建数据,确定所述待加载范围,包括:The method according to claim 10 or 11, wherein the determining the to-be-loaded range according to the location information of the first electronic device and the range construction data comprises:
    根据所述第一电子设备的位置信息及所述范围构建数据,确定初始待加载范围;determining an initial to-be-loaded range according to the location information of the first electronic device and the range construction data;
    确定位置信息位于所述初始待加载范围内的AR资源的数量;determining the number of AR resources whose location information is within the initial to-be-loaded range;
    根据所述AR资源的数量调整所述范围构建数据,得到调整后的范围构建数据;Adjust the scope construction data according to the quantity of the AR resources to obtain the adjusted scope construction data;
    根据所述调整后的范围构建数据及所述第一电子设备的位置信息,确定所述待加载范围。The to-be-loaded range is determined according to the adjusted range construction data and the location information of the first electronic device.
  13. 根据权利要求7所述的方法,其中,所述根据所述第一电子设备的位置信息,从增强现实AR资源中确定待加载AR资源,包括:The method according to claim 7, wherein the determining the AR resource to be loaded from the augmented reality AR resource according to the location information of the first electronic device comprises:
    确定各AR资源的位置信息与所述第一电子设备的位置信息之间的距离;determining the distance between the location information of each AR resource and the location information of the first electronic device;
    将各AR资源按照距离由小到大进行排序后,将前预置数量个AR资源确定为所述待加载AR资源。After sorting the AR resources according to the distance from small to large, the first preset number of AR resources are determined as the AR resources to be loaded.
  14. 根据权利要求7所述的方法,其中,所述定位信息中包括所述第一电子设备所在的环境图像,所述根据所述定位信息确定所述第一电子设备的位置信息,包括:The method according to claim 7, wherein the positioning information includes an image of an environment where the first electronic device is located, and the determining the position information of the first electronic device according to the positioning information comprises:
    根据第一电子设备所在的环境图像对所述第一电子设备进行视觉定位,得到所述第一电子设备的位置信息。Visually locate the first electronic device according to an image of the environment where the first electronic device is located to obtain location information of the first electronic device.
  15. 一种资源加载装置,其中,应用于第一电子设备,所述装置包括:A resource loading apparatus, wherein, applied to a first electronic device, the apparatus includes:
    发送模块,用于向第二电子设备发送定位信息,所述定位信息用于使所述第二电子设备根据所述定位信息确定所述第一电子设备的位置信息,并根据所述第一电子设备的位置信息确定待加载增强现实AR资源;A sending module, configured to send positioning information to a second electronic device, where the positioning information is used to enable the second electronic device to determine the position information of the first electronic device according to the positioning information, and to determine the position information of the first electronic device according to the positioning information The location information of the device determines the augmented reality AR resources to be loaded;
    接收模块,用于接收所述第二电子设备发送的所述待加载AR资源,并对所述待加载 AR资源进行相应展示。A receiving module, configured to receive the AR resource to be loaded sent by the second electronic device, and to display the AR resource to be loaded accordingly.
  16. 一种资源加载装置,其中,应用于第二电子设备,所述装置包括:A resource loading apparatus, wherein, applied to a second electronic device, the apparatus includes:
    接收模块,用于接收第一电子设备发送的定位信息;a receiving module, configured to receive the positioning information sent by the first electronic device;
    第一确定模块,用于根据所述定位信息确定所述第一电子设备的位置信息;a first determining module, configured to determine the location information of the first electronic device according to the location information;
    第二确定模块,用于根据所述第一电子设备的位置信息从增强现实AR资源中确定待加载AR资源;a second determining module, configured to determine the AR resource to be loaded from the augmented reality AR resource according to the location information of the first electronic device;
    发送模块,用于向所述第一电子设备发送所述待加载AR资源,其中,所述待加载AR资源展示于所述第一电子设备中。A sending module, configured to send the AR resource to be loaded to the first electronic device, wherein the AR resource to be loaded is displayed in the first electronic device.
  17. 一种电子设备,其中,包括:An electronic device comprising:
    处理器;processor;
    用于存储处理器可执行指令的存储器;memory for storing processor-executable instructions;
    其中,所述处理器被配置为调用所述存储器存储的指令,以执行权利要求1至6中任意一项所述的方法;或者,所述处理器被配置为调用所述存储器存储的指令,以执行权利要求7至14中任意一项所述的方法。wherein the processor is configured to invoke the memory-stored instructions to perform the method of any one of claims 1 to 6; or the processor is configured to invoke the memory-stored instructions, to perform the method of any one of claims 7 to 14.
  18. 一种计算机可读存储介质,其上存储有计算机程序指令,其中,所述计算机程序指令被处理器执行时实现权利要求1至6中任意一项所述的方法;或者,所述计算机程序指令被处理器执行时实现权利要求7至14中任意一项所述的方法。A computer-readable storage medium on which computer program instructions are stored, wherein, when the computer program instructions are executed by a processor, the method of any one of claims 1 to 6 is implemented; or, the computer program instructions The method of any one of claims 7 to 14 is implemented when executed by a processor.
  19. 一种计算机程序,包括计算机可读代码,当所述计算机可读代码在电子设备中运行时,所述电子设备中的处理器执行用于实现权利要求1至6中任意一项所述的方法;或者,所述电子设备中的处理器执行用于实现权利要求7至14中任意一项所述的方法。A computer program comprising computer readable code, when the computer readable code is executed in an electronic device, a processor in the electronic device executes the method for implementing any one of claims 1 to 6 ; or, the processor in the electronic device executes the method for implementing any one of claims 7 to 14.
PCT/CN2021/098335 2020-11-27 2021-06-04 Resource loading method and apparatus, electronic device, storage medium, and program WO2022110754A1 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
KR1020217043247A KR20220007171A (en) 2020-11-27 2021-06-04 Resource loading method and apparatus, electronic device and storage medium and program
JP2021567017A JP7450641B2 (en) 2020-11-27 2021-06-04 Resource loading method, device, electronic device, storage medium and program

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202011357349.2 2020-11-27
CN202011357349.2A CN112437090B (en) 2020-11-27 2020-11-27 Resource loading method and device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
WO2022110754A1 true WO2022110754A1 (en) 2022-06-02

Family

ID=74698515

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/098335 WO2022110754A1 (en) 2020-11-27 2021-06-04 Resource loading method and apparatus, electronic device, storage medium, and program

Country Status (2)

Country Link
CN (1) CN112437090B (en)
WO (1) WO2022110754A1 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112437090B (en) * 2020-11-27 2022-11-04 深圳市商汤科技有限公司 Resource loading method and device, electronic equipment and storage medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104991947A (en) * 2015-07-13 2015-10-21 小米科技有限责任公司 Map display method and apparatus
CN107678715A (en) * 2016-08-02 2018-02-09 北京康得新创科技股份有限公司 The sharing method of virtual information, device and system
CN109831518A (en) * 2019-03-06 2019-05-31 珠海金山网络游戏科技有限公司 A kind of map datum method for down loading and device calculate equipment and storage medium
US20200259931A1 (en) * 2017-12-29 2020-08-13 Tencent Technology (Shenzhen) Company Limited Multimedia information sharing method, related apparatus, and system
CN112437090A (en) * 2020-11-27 2021-03-02 深圳市商汤科技有限公司 Resource loading method and device, electronic equipment and storage medium
CN112539757A (en) * 2020-12-08 2021-03-23 北京嘀嘀无限科技发展有限公司 Target map determination method, system, device, equipment and readable storage medium

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107123013B (en) * 2017-03-01 2020-09-01 阿里巴巴集团控股有限公司 Offline interaction method and device based on augmented reality
CN107085526A (en) * 2017-04-12 2017-08-22 深圳市创想天空科技股份有限公司 The resource loading method and device of AR applications
CN111913566A (en) * 2019-05-10 2020-11-10 阿里巴巴集团控股有限公司 Data processing method and device, electronic equipment and computer storage medium
CN111638796A (en) * 2020-06-05 2020-09-08 浙江商汤科技开发有限公司 Virtual object display method and device, computer equipment and storage medium
CN111815779A (en) * 2020-06-29 2020-10-23 浙江商汤科技开发有限公司 Object display method and device, positioning method and device and electronic equipment

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104991947A (en) * 2015-07-13 2015-10-21 小米科技有限责任公司 Map display method and apparatus
CN107678715A (en) * 2016-08-02 2018-02-09 北京康得新创科技股份有限公司 The sharing method of virtual information, device and system
US20200259931A1 (en) * 2017-12-29 2020-08-13 Tencent Technology (Shenzhen) Company Limited Multimedia information sharing method, related apparatus, and system
CN109831518A (en) * 2019-03-06 2019-05-31 珠海金山网络游戏科技有限公司 A kind of map datum method for down loading and device calculate equipment and storage medium
CN112437090A (en) * 2020-11-27 2021-03-02 深圳市商汤科技有限公司 Resource loading method and device, electronic equipment and storage medium
CN112539757A (en) * 2020-12-08 2021-03-23 北京嘀嘀无限科技发展有限公司 Target map determination method, system, device, equipment and readable storage medium

Also Published As

Publication number Publication date
CN112437090A (en) 2021-03-02
CN112437090B (en) 2022-11-04

Similar Documents

Publication Publication Date Title
US10891031B2 (en) Method and device for displaying task management interface
US20200007944A1 (en) Method and apparatus for displaying interactive attributes during multimedia playback
US11741583B2 (en) Face image processing method and apparatus, electronic device, and storage medium
WO2022043741A1 (en) Network training method and apparatus, person re-identification method and apparatus, storage medium, and computer program
WO2017113666A1 (en) Application interface switching method and device
US20180307819A1 (en) Terminal control method and terminal, storage medium
CN109783183B (en) Request processing method and device, electronic equipment and storage medium
WO2022188305A1 (en) Information presentation method and apparatus, and electronic device, storage medium and computer program
EP3147802A1 (en) Method and apparatus for processing information
CN105763552B (en) Transmission method, device and system in remote control
WO2022110754A1 (en) Resource loading method and apparatus, electronic device, storage medium, and program
WO2022134390A1 (en) Labeling method and apparatus, electronic device, and storage medium
CN112925788A (en) Data set management method, system, device, electronic equipment and storage medium
CN117244249A (en) Multimedia data generation method and device, readable medium and electronic equipment
CN112035691A (en) Method, device, equipment and medium for displaying cell labeling data of slice image
WO2023056925A1 (en) Document content updating method and apparatus, and electronic device
CN111275607A (en) Interface display method and device, computer equipment and storage medium
CN107864332B (en) Image display method, device, terminal and computer readable storage medium
WO2022134416A1 (en) Video data processing method and apparatus, electronic device, and storage medium
CN109407942B (en) Model processing method and device, control client and storage medium
JP7450641B2 (en) Resource loading method, device, electronic device, storage medium and program
CN110196716B (en) Graphic display method, graphic display device, electronic equipment and storage medium
CN113342697A (en) Simulation test system and method for flash translation layer
KR20170038316A (en) Electronic device and operating mehtod thereof
US20200019305A1 (en) Method for altering display ratio of application, and electronic device that realises same

Legal Events

Date Code Title Description
ENP Entry into the national phase

Ref document number: 2021567017

Country of ref document: JP

Kind code of ref document: A

ENP Entry into the national phase

Ref document number: 20217043247

Country of ref document: KR

Kind code of ref document: A

NENP Non-entry into the national phase

Ref country code: DE

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 13.09.2023).

122 Ep: pct application non-entry in european phase

Ref document number: 21896263

Country of ref document: EP

Kind code of ref document: A1