Disclosure of Invention
In view of the above, embodiments of the present invention provide a method, an apparatus, an electronic device, and a storage medium for acquiring recommendation information, which can acquire recommendation information required by a user under the condition that resource usage rights are limited, thereby effectively improving user experience.
In a first aspect, an embodiment of the present invention provides a method for acquiring recommendation information, including: accessing a resource file of a preset type under the condition that the use permission of the target resource is forbidden; acquiring target information from the resource file, wherein the target information comprises information types which can be acquired through the target resource; and generating or acquiring recommendation information corresponding to the target information according to the target information.
Optionally, the obtaining the target information from the resource file includes: screening out target files from the resource files according to a preset strategy; and acquiring the target information according to the preset attribute information of the target file.
Optionally, the screening the target file from the resource file according to the preset policy includes: screening files in an open state from the resource files to obtain alternative files; and determining the target file according to the candidate file.
Optionally, the screening the target file from the resource file according to the preset policy includes: determining the generation time of the resource file; screening the resource files with the generation time within a preset time range as the candidate files; and determining the target file according to the candidate file.
Optionally, the determining the target file according to the candidate file includes: determining the manufacturing equipment of the candidate file; detecting whether the manufacturing equipment has a preset relation with currently used equipment, wherein the preset relation comprises the same or related relation; determining the candidate file as the target file under the condition of the preset relation; and refusing to determine the candidate file as the target file under the condition that the candidate file does not have the preset relation.
Optionally, the target information is written into the resource file when the resource file is generated, wherein an application generating the resource file has the use authority of the target resource.
Optionally, the preset type includes a photo type and/or a video type.
Optionally, the target information includes geographic location information; the target resource includes a resource that implements a positioning operation.
Optionally, the recommended information includes weather information and/or travel service information corresponding to time information and geographic location information in the target information.
Optionally, after the generating or acquiring the recommendation information corresponding to the target information, the method further includes: updating the user service according to the recommendation information, wherein the updating the user service comprises: adjusting the display effect of the corresponding photo according to the weather information; and/or visually presenting the travel service information to a user.
Optionally, the generating or obtaining the recommendation information corresponding to the target information according to the target information includes: and sending the target information to a server, and receiving recommendation information generated by the server according to the target information.
In a second aspect, an embodiment of the present invention further provides an apparatus for acquiring recommendation information, including: an access unit, configured to access a resource file of a preset type in a case where the use authority of the target resource is prohibited; a target information obtaining unit, configured to obtain target information from the resource file, where the target information includes an information category that is available through the target resource; and the recommendation information acquisition unit is used for generating or acquiring recommendation information corresponding to the target information according to the target information.
Optionally, the acquiring unit includes: the screening module is used for screening out target files from the resource files according to a preset strategy; and the acquisition module is used for acquiring the target information according to the preset attribute information of the target file.
Optionally, the screening module includes: the screening sub-module is used for screening files in an open state from the resource files to obtain alternative files; and the target determining submodule is used for determining the target file according to the candidate file.
Optionally, the screening module includes: a time determining submodule, configured to determine a generation time of the resource file; the screening sub-module is used for screening the resource files with the generation time in a preset time range as the candidate files; and the target determining submodule is used for determining the target file according to the candidate file.
Optionally, the target determination submodule is configured to: determining the manufacturing equipment of the candidate file; detecting whether the manufacturing equipment has a preset relation with currently used equipment, wherein the preset relation comprises the same or related relation; determining the candidate file as the target file under the condition of the preset relation; and refusing to determine the candidate file as the target file under the condition that the candidate file does not have the preset relation.
Optionally, the target information is written into the resource file when the resource file is generated, wherein an application generating the resource file has the use authority of the target resource.
Optionally, the preset type includes a photo type and/or a video type.
Optionally, the target information includes geographic location information; the target resource includes a resource that implements a positioning operation.
Optionally, the recommended information includes weather information and/or travel service information corresponding to time information and geographic location information in the target information.
Optionally, the device further comprises an updating unit, configured to update the user service according to the recommendation information after generating or acquiring the recommendation information corresponding to the target information according to the target information; wherein the updating unit includes: the adjusting module is used for adjusting the display effect of the corresponding photo according to the weather information; and/or a display module for visually displaying the travel service information to the user.
Optionally, the recommendation information obtaining unit is specifically configured to send the target information to a server, and receive recommendation information generated by the server according to the target information.
In a third aspect, embodiments of the present invention further provide an electronic device, including: the device comprises a shell, a processor, a memory, a circuit board and a power circuit, wherein the circuit board is arranged in a space surrounded by the shell, and the processor and the memory are arranged on the circuit board; a power supply circuit for supplying power to each circuit or device of the electronic apparatus; the memory is used for storing executable program codes; the processor executes a program corresponding to the executable program code by reading the executable program code stored in the memory, for executing any one of the recommended information acquisition methods provided by the embodiments of the present invention.
In a fourth aspect, embodiments of the present invention further provide a computer-readable storage medium storing one or more programs executable by one or more processors to implement any of the recommendation information obtaining methods provided by the embodiments of the present invention.
According to the recommendation information acquisition method, device, electronic equipment and storage medium provided by the embodiment of the invention, a resource file of a preset type can be accessed under the condition that the use permission of a target resource is forbidden, target information is acquired from the resource file, the target information is sent to a server, and recommendation information generated by the server according to the target information is received. Because the target information comprises the information types which can be acquired through the target resources, even if the target resources cannot be used, the target information corresponding to the target resources can be acquired by accessing the resource files of the preset types, and the recommendation information corresponding to the target information can be generated or acquired according to the target information, so that the required recommendation information can be acquired for the user under the condition of limited resource use permission, and the user experience is effectively improved.
Detailed Description
Embodiments of the present invention will be described in detail below with reference to the accompanying drawings.
It should be understood that the described embodiments are merely some, but not all, embodiments of the invention. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
In a first aspect, an embodiment of the present invention provides a method for acquiring recommendation information, which can acquire recommendation information required by a user under the condition that resource usage rights are limited, thereby effectively improving user experience.
As shown in fig. 1, the method for acquiring recommendation information provided in the embodiment of the present invention may include:
s11, accessing a resource file of a preset type under the condition that the use authority of the target resource is forbidden;
alternatively, in an embodiment of the present invention, the target resource may include various relatively independent functional units disposed on the terminal, for example, a camera, a microphone, bluetooth, GPS, etc. may be the target resource. Specifically, various types of applications installed on the terminal can help the user to conduct social, shopping, financial investment, travel and other activities. The terminal often needs to use resources on the terminal when performing the operation activities, for example, when chatting, the terminal may require the use permission of a microphone and a camera, when paying, the terminal may need to scan a code with the use permission of the camera, the terminal may need to use fingerprint permission to confirm payment, and when using a calling service, the terminal may need to use permission of a GPS to guide a service vehicle to travel to a destination. When these resources are disabled, the corresponding service will not complete successfully.
In this step, when the usage rights of one or more target resources are prohibited, the file of the preset type, that is, the resource file, may be accessed in turn, in an attempt to obtain information corresponding to the target resource by bypassing the resource file.
S12, acquiring target information from the resource file, wherein the target information comprises information types which can be acquired through the target resource;
optionally, the resource file may record the available information category corresponding to the target resource in the file body or the file auxiliary information. For example, the resource file received through bluetooth or network may record the file acquisition path as target resources such as bluetooth, browser, weChat, etc. in the form of file auxiliary information, and may further record the name of bluetooth device, the download address of browser, the information category that can be acquired by target resources such as file sender of WeChat, etc. For another example, the resource file shot by the camera may record, through exif information, information such as shooting time, shooting place, shooting device, etc. of a photo or video, which is a category of information that can be acquired by the resource such as the camera. In this step, the acquired target information may contain information of these information categories.
S13, generating or acquiring corresponding recommendation information according to the target information.
After the target information is obtained from the resource file of the preset type, corresponding recommended information can be generated according to the target information, and the recommended information corresponding to the target information can be indirectly obtained in other modes.
Alternatively, the target information may be any information that can be obtained by using the target resource, for example, geographical location information that can be obtained by using the GPS resource, bluetooth pairing information that can be obtained by using the bluetooth resource, website information that can be obtained by using the network resource, and the like.
According to the recommendation information acquisition method provided by the embodiment of the invention, the resource file of the preset type can be accessed under the condition that the use permission of the target resource is forbidden, the target information is acquired from the resource file, and the recommendation information corresponding to the target information is generated or acquired according to the target information. Because the target information comprises the information types which can be acquired through the target resources, even if the target resources cannot be used, the target information corresponding to the target resources can be acquired by accessing the resource files of the preset types, and the recommendation information corresponding to the target information can be generated or acquired according to the target information, so that the required recommendation information can be provided for the user under the condition of limited resource use permission, and the user experience is effectively improved.
Optionally, in an embodiment of the present invention, in a case where the target resource is disabled, acquiring the target information from the resource file in step S12 may specifically include:
screening out target files from the resource files according to a preset strategy;
and acquiring the target information according to the preset attribute information of the target file.
Alternatively, the preset type may include any file type in which target information is recorded. The target information may include geographic location information and the target resources may include resources capable of performing positioning operations, such as GPS and the like. In one embodiment of the present invention, the resource file of the preset type may be, for example, a file of a photo type and/or a video type, and the target information may be geographical location information, such as GPS coordinates, and the target information may be recorded in exif (Exchangeable image file format ) information of the photo or the video.
Exif is an image file format whose data storage is the same as the JPEG format. The Exif format is information in which a digital photograph is inserted into a JPEG format header, and includes various photographing conditions such as aperture, shutter, white balance, ISO, focal length, date and time, and the like at the time of photographing, and camera brands, models, color codes, sounds recorded at the time of photographing, GPS global positioning system data, thumbnails, and the like.
Alternatively, the target information may be written to the resource file when the resource file is generated, where the application that generates the resource file has the usage rights of the target resource. For example, camera related applications can generate photos or videos, also with GPS usage rights.
In this embodiment, when related information needs to be obtained through a target resource, if the target resource cannot be used or is not allowed to be used, a resource file of a preset type may be accessed, and the required information is obtained by means of the resource file. Optionally, the resource file may include one or more types of files, where each type of file may include multiple file individuals, and each file individual may carry its own related information. In order to determine what information to use as the target information, the target files may be selected from the resource files according to a preset policy, and the target information may be obtained from the target files.
Optionally, in the embodiment of the present invention, the screening of the target file may be performed by using multiple preset policies, for example, the target file may be screened from the resource files according to the file generation time, the file generation device, the file editing user, the file location state, and the like.
Specifically, in one embodiment of the present invention, the screening the target file from the resource file according to a preset policy may specifically include:
screening files in an open state from the resource files to obtain alternative files;
and determining the target file according to the candidate file.
That is, in the present embodiment, if there are one or more files that have been opened in the resource file of the preset type, these files that have been opened may be taken as candidate files, and the target file may be determined from the candidate files. For example, in one embodiment of the present invention, assuming that the resource file of the preset type is a file of the photo type, and there are currently 3 photos in an open state, it may be determined that the 3 photos are candidate files, and a target file may be further selected from the candidate files, for example, if the photo P1 is shown in the foreground and the photos P2 and P3 are hidden in the background, the photo P1 may be taken as the target file.
Optionally, in another embodiment of the present invention, the screening the target file from the resource file according to a preset policy may specifically include:
determining the generation time of the resource file;
screening the resource files with the generation time within a preset time range as the candidate files;
and determining the target file according to the candidate file.
That is, in this embodiment, a resource file whose generation time is within a preset time range may be used as an alternative file, for example, a resource file whose file generation time is within 24 hours from the current time may be used as an alternative file, or a resource file generated in the past week may be used as an alternative file. The target file is then further determined from the candidate file.
The candidate files may include locally generated files or files transmitted to the local from other devices. In order to provide the user with recommendation information more in accordance with the user's needs, in one embodiment of the invention, determining the target file according to the candidate file may further include:
determining the manufacturing equipment of the candidate file;
detecting whether the manufacturing equipment has a preset relation with currently used equipment, wherein the preset relation comprises the same or related relation;
determining the candidate file as the target file under the condition of the preset relation;
and refusing to determine the candidate file as the target file under the condition that the candidate file does not have the preset relation.
Alternatively, in one embodiment of the present invention, it is possible to obtain, from the attribute information of the candidate files, which device each candidate file is created from, for example, it is possible to know, from the attribute information of the candidate files, that a video file is created from the IPHONE11, that a photograph is created from the HORNOR 20, and so on. If the production device of one candidate file is the currently used device or has an association relationship with the currently used device, the candidate file can be determined as the target file, otherwise, the candidate device is refused to be determined as the target file.
Optionally, the association relationship may include, for example, that the production device and the currently used device log on the same account, or that the frequency of file transfer or communication in the last period of time is greater than a preset threshold, or that the time under the same wireless lan exceeds a preset duration, etc. The embodiments of the present invention are not limited in this regard. By confirming the manufacturing equipment of the alternative equipment, files from the irrelevant equipment can be prevented from being confirmed as target files, and other information is prevented from interfering with the demands of users, so that the target information from the target files meets the potential demands of the users, and the user experience is further improved.
After the target information is acquired, recommendation information corresponding to the target information may be generated or acquired according to the target information in step S13. Alternatively, in case of locally generating the target information using the target information, for example, in one embodiment of the present invention, if the video shooting location is obtained from the target file of the video type as the japanese north sea channel academic conference center, a corresponding piece of recommended information may be generated, and for example, all photos and/or videos shot in the japanese north sea channel academic conference center stored in the current device may be included in the recommended information, and displayed in order according to shooting time, so that the user can quickly lock the required photos and/or videos in the massive photos and/or video information through the recommended information.
Alternatively, in another embodiment of the present invention, the recommendation information may be generated not directly locally, but by other devices, and the recommendation information may be obtained from the devices. For example, in one embodiment of the present invention, a corresponding server may be designated according to a specific type of the target information, and corresponding recommendation information may be obtained from the server, for example, the target information may be sent to the server, and the recommendation information generated by the server according to the target information may be received. For example, in one embodiment of the present invention, if the target information is time information and location information, a certain weather service network may be designated as a corresponding server, and weather information corresponding to the time and location may be acquired from the weather service network.
Alternatively, the server-generated recommendation information may be based on the target information or various types of information related to the target information. For example, in the above embodiment, the recommended information may include weather information corresponding to time information and geographical position information in the target information. Based on this, in one embodiment of the present invention, after generating or acquiring the recommendation information corresponding thereto according to the target information, the recommendation information acquiring method provided by the embodiment of the present invention may further include: updating the user service according to the recommendation information, wherein the updating the user service can comprise, for example: and adjusting the display effect of the corresponding photo according to the weather information. For example, in one embodiment of the present invention, the current illumination may be obtained according to the weather information such as the amount of ultraviolet light and the air temperature of the day, so as to recommend a suitable photo color temperature to the user, or directly update the photo color temperature and display the photo color temperature to the user.
Alternatively, in another embodiment of the present invention, the recommendation information may include travel service information corresponding to time information and geographic location information in the target information, and based on this, the updating the user service may include, for example: the travel service information is visually presented to the user. For example, if the target file is a photograph of a tour of Fuji mountain in 2018, 3, 17, then the user may be visually presented with Fuji mountain related scenic spots, traffic routes, accommodation information, food culture, etc.
The various recommended information and recommended services may be used alone or in combination with each other, and the embodiment of the present invention is not limited thereto.
The method for acquiring the recommended information provided by the embodiment of the invention is described in detail below through a specific embodiment.
As shown in fig. 2, the method for acquiring recommendation information provided by the embodiment of the present invention may include:
s201, an application program B requests the geographic position information of a current user from a GPS so as to report the current geographic position information to a server;
s202, the GPS access authority of an application program B is limited, GPS resources cannot be called, and geographic position information cannot be acquired;
s203, the application program B accesses a local photo type resource file;
s204, the application program B screens files F1, F2 and F3 which are currently in an open state from the resource files to serve as alternative files; wherein F1 and F3 are in the background and F2 is displayed in the foreground;
s205, the application program B determines the foreground candidate file F2 as a target file;
s206, the application program B reads exif information of the target file F2, and takes the geographic position information as target information, wherein the target information can be street number of the Beijing city lake area of China;
s207, the application program B sends target information to a server;
s208, the application program B receives recommendation information generated by the server according to the target information, for example, universities, food products, etc. near street, in beijing city, lake area, china.
It should be noted that, in this embodiment, the target file is determined from the resource file by the open state of the file, but embodiments of the present invention are not limited thereto. Similar to the flow of the present embodiment, the foregoing details have been described, and will not be repeated here.
In a second aspect, an embodiment of the present invention further provides a recommendation information acquiring apparatus, which can acquire required recommendation information for a user under the condition that resource usage rights are limited, thereby effectively improving user experience.
As shown in fig. 3, the apparatus for acquiring recommendation information provided by the embodiment of the present invention may include:
an access unit 31 for accessing a resource file of a preset type in the case where the use authority of the target resource is prohibited;
a target information obtaining unit 32, configured to obtain target information from the resource file, where the target information includes an information category that is available through the target resource;
and a recommendation information obtaining unit 33, configured to generate or obtain recommendation information corresponding to the target information according to the target information.
The recommendation information acquisition device provided by the embodiment of the invention can access a resource file of a preset type under the condition that the use authority of the target resource is forbidden, acquire the target information from the resource file, and generate or acquire the recommendation information corresponding to the target information according to the target information. Because the target information comprises the information types which can be acquired through the target resources, even if the target resources cannot be used, the target information corresponding to the target resources can be acquired by accessing the resource files of the preset types, and the recommendation information corresponding to the target information can be generated or acquired according to the target information, so that the required recommendation information can be acquired for the user under the condition of limited resource use permission, and the user experience is effectively improved.
Alternatively, the acquisition unit 32 may include:
the screening module is used for screening out target files from the resource files according to a preset strategy;
and the acquisition module is used for acquiring the target information according to the preset attribute information of the target file.
Optionally, the screening module may include:
the screening sub-module is used for screening files in an open state from the resource files to obtain alternative files;
and the target determining submodule is used for determining the target file according to the candidate file.
Optionally, the screening module may include:
a time determining submodule, configured to determine a generation time of the resource file;
the screening sub-module is used for screening the resource files with the generation time in a preset time range as the candidate files;
and the target determining submodule is used for determining the target file according to the candidate file.
Optionally, the target determination submodule may be specifically configured to:
determining the manufacturing equipment of the candidate file;
detecting whether the manufacturing equipment has a preset relation with currently used equipment, wherein the preset relation comprises the same or related relation;
determining the candidate file as the target file under the condition of the preset relation;
and refusing to determine the candidate file as the target file under the condition that the candidate file does not have the preset relation.
Optionally, the target information is written into the resource file when the resource file is generated, wherein an application generating the resource file has the use authority of the target resource.
Optionally, the preset type includes a photo type and/or a video type.
Optionally, the target information includes geographic location information; the target resource includes a resource that implements a positioning operation.
Optionally, the recommended information includes weather information and/or travel service information corresponding to time information and geographic location information in the target information.
Optionally, the device may further include an updating unit, configured to update the user service according to the recommendation information after generating or acquiring the recommendation information corresponding to the target information according to the target information; the updating unit may specifically include:
the adjusting module is used for adjusting the display effect of the corresponding photo according to the weather information;
and/or
And the display module is used for displaying the travel service information to the user in a visual mode.
Alternatively, the recommended information obtaining unit 33 may specifically be configured to send the target information to a server, and receive recommended information generated by the server according to the target information.
In a third aspect, the embodiment of the invention further provides an electronic device, which can obtain required recommendation information for a user under the condition that the resource use permission is limited, so that user experience is effectively improved.
As shown in fig. 4, an electronic device provided by an embodiment of the present invention may include: the processor 52 and the memory 53 are arranged on the circuit board 54, wherein the circuit board 54 is arranged in a space surrounded by the shell 51; a power supply circuit 55 for supplying power to the respective circuits or devices of the above-described electronic apparatus; the memory 53 is for storing executable program code; the processor 52 executes a program corresponding to the executable program code by reading the executable program code stored in the memory 53 for executing the recommendation information acquiring method provided in any of the foregoing embodiments.
The specific implementation of the above steps by the processor 52 and the further implementation of the steps by the processor 52 through the execution of the executable program code may be referred to the description of the foregoing embodiments, and will not be repeated here.
Such electronic devices exist in a variety of forms including, but not limited to:
(1) A mobile communication device: such devices are characterized by mobile communication capabilities and are primarily aimed at providing voice, data communications. Such terminals include: smart phones (e.g., iPhone), multimedia phones, functional phones, and low-end phones, etc.
(2) Ultra mobile personal computer device: such devices are in the category of personal computers, having computing and processing functions, and generally also having mobile internet access characteristics. Such terminals include: PDA, MID, and UMPC devices, etc., such as iPad.
(3) Portable entertainment device: such devices may display and play multimedia content. The device comprises: audio, video players (e.g., iPod), palm game consoles, electronic books, and smart toys and portable car navigation devices.
(4) And (3) a server: the configuration of the server includes a processor, a hard disk, a memory, a system bus, and the like, and the server is similar to a general computer architecture, but is required to provide highly reliable services, and thus has high requirements in terms of processing capacity, stability, reliability, security, scalability, manageability, and the like.
(5) Other electronic devices with data interaction functions.
Accordingly, an embodiment of the present invention further provides a computer readable storage medium, where one or more programs are stored, where the one or more programs may be executed by one or more processors, so as to implement any one of the methods for acquiring recommendation information provided in the foregoing embodiments, and thus, the foregoing embodiments may also implement corresponding technical effects, which have been described in detail and are not repeated herein.
It is noted that relational terms such as first and second, and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Moreover, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises an element.
In this specification, each embodiment is described in a related manner, and identical and similar parts of each embodiment are all referred to each other, and each embodiment mainly describes differences from other embodiments.
In particular, for the device embodiments, since they are substantially similar to the method embodiments, the description is relatively simple, and reference is made to the description of the method embodiments in part.
For convenience of description, the above apparatus is described as being functionally divided into various units/modules, respectively. Of course, the functions of the various elements/modules may be implemented in the same piece or pieces of software and/or hardware when implementing the present invention.
Those skilled in the art will appreciate that implementing all or part of the above-described methods in accordance with the embodiments may be accomplished by way of a computer program stored on a computer readable storage medium, which when executed may comprise the steps of the embodiments of the methods described above. The storage medium may be a magnetic disk, an optical disk, a Read-Only Memory (ROM), a random access Memory (Random Access Memory, RAM), or the like.
The foregoing is merely illustrative of the present invention, and the present invention is not limited thereto, and any changes or substitutions easily contemplated by those skilled in the art within the scope of the present invention should be included in the present invention. Therefore, the protection scope of the invention is subject to the protection scope of the claims.