CN113242314A - Cross-terminal resource access method and device, storage medium and electronic equipment - Google Patents
Cross-terminal resource access method and device, storage medium and electronic equipment Download PDFInfo
- Publication number
- CN113242314A CN113242314A CN202110594362.8A CN202110594362A CN113242314A CN 113242314 A CN113242314 A CN 113242314A CN 202110594362 A CN202110594362 A CN 202110594362A CN 113242314 A CN113242314 A CN 113242314A
- Authority
- CN
- China
- Prior art keywords
- resource
- cross
- access
- identifier
- target
- Prior art date
- Legal status (The legal status 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 status listed.)
- Granted
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/50—Network services
- H04L67/60—Scheduling or organising the servicing of application requests, e.g. requests for application data transmissions using the analysis and optimisation of the required network resources
- H04L67/63—Routing a service request depending on the request content or context
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/14—Session management
- H04L67/141—Setup of application sessions
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
- Information Transfer Between Computers (AREA)
Abstract
The application discloses a cross-terminal resource access method, a cross-terminal resource access device, a storage medium and electronic equipment, wherein the method comprises the following steps: and responding to a first operation aiming at the target resource to generate a resource access request, wherein the resource access request carries a resource identifier, judging whether the accessed target resource is a cross-end resource or not according to the resource identifier, if so, analyzing the resource identifier to determine an access address of the cross-end equipment, establishing connection with the cross-end equipment through the access address, accessing the target resource and receiving a return result of the cross-end equipment. According to the method and the device, the resources do not need to be shared through manual selection equipment, the efficiency is greatly improved when the resources are accessed, and cross-end access can be performed on more kinds of resources.
Description
Technical Field
The present application belongs to the technical field of data processing, and in particular, to a cross-end resource access method, apparatus, storage medium, and electronic device.
Background
With the rapid development of internet software and hardware in recent years, electronic devices with different functions surround users, such as mobile phones, flat panels, televisions, electronic watches, and the like. The technology for accessing resources among devices can enable the connection among the devices to be tighter, and is an important technical means for realizing the strategic goal of mutual integration of everything.
In the Android system, regarding cross-device access of resources or based on file resources in devices, the main processing flow of the functions of sharing files such as NFC and bluetooth of each mobile phone manufacturer can be summarized as the following three steps: 1. selecting files to be shared, such as pictures, documents and the like; 2. selecting a sharing mode, such as NFC, Bluetooth and the like; 3. and selecting the devices to be shared from the discovered device list, and sharing. However, the applicant finds that resources which can be shared by the existing scheme are file resources, but some non-file resources, such as application icons, application labels, picture information and the like, are not supported, and a user needs to actively and manually select some resources to share other devices, so that the user has an obvious device separation feeling due to complex operation, and the efficiency of resource access is greatly reduced.
Disclosure of Invention
The application provides a cross-terminal resource access method, a cross-terminal resource access device, a storage medium and electronic equipment, which can access more types of cross-terminal resources and effectively improve the efficiency of resource access.
In a first aspect, an embodiment of the present application provides a cross-end resource access method, including:
responding to a first operation aiming at a target resource to generate a resource access request, wherein the resource access request carries a resource identifier;
judging whether the accessed target resource is a cross-end resource or not according to the resource identifier;
if the resource is a cross-end resource, analyzing the resource identifier to determine an access address of the cross-end equipment;
and establishing connection with the cross-end equipment through the access address, accessing the target resource and receiving a return result of the cross-end equipment.
In a second aspect, an embodiment of the present application provides a cross-end resource access apparatus, including:
the system comprises a receiving module, a processing module and a processing module, wherein the receiving module is used for responding to a first operation aiming at a target resource to generate a resource access request, and the resource access request carries a resource identifier;
the judging module is used for judging whether the accessed target resource is a cross-end resource or not according to the resource identifier;
the determining module is used for analyzing the resource identifier to determine an access address of the cross-end equipment when the judging module judges that the resource identifier is positive;
and the access module is used for establishing connection with the cross-end equipment through the access address, accessing the target resource and receiving a return result of the cross-end equipment.
In a third aspect, an embodiment of the present application provides a storage medium, on which a computer program is stored, and when the computer program runs on a computer, the computer is caused to execute the cross-end resource access method described above.
In a fourth aspect, an embodiment of the present application provides an electronic device, including a processor and a memory, where the memory stores a plurality of instructions, and the processor loads the instructions in the memory to perform the following steps:
responding to a first operation aiming at a target resource to generate a resource access request, wherein the resource access request carries a resource identifier;
judging whether the accessed target resource is a cross-end resource or not according to the resource identifier;
if the resource is a cross-end resource, analyzing the resource identifier to determine an access address of the cross-end equipment;
and establishing connection with the cross-end equipment through the access address, accessing the target resource and receiving a return result of the cross-end equipment.
The cross-terminal resource access method provided by the embodiment of the application can respond to a first operation aiming at a target resource to generate a resource access request, wherein the resource access request carries a resource identifier, whether the accessed target resource is a cross-terminal resource is judged according to the resource identifier, if the accessed target resource is the cross-terminal resource, the resource identifier is analyzed to determine an access address of cross-terminal equipment, connection is established with the cross-terminal equipment through the access address, the target resource is accessed, and a return result of the cross-terminal equipment is received. According to the method and the device, the resources do not need to be shared through manual selection equipment, the efficiency is greatly improved when the resources are accessed, and cross-end access can be performed on more kinds of resources.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
Fig. 1 is a schematic flowchart of a cross-end resource access method provided in an embodiment of the present application.
Fig. 2 is a schematic general structural diagram of a distributed device according to an embodiment of the present application.
Fig. 3 is another schematic flow chart of the cross-end resource access method according to the embodiment of the present application.
Fig. 4 is a schematic structural diagram of a cross-peer resource access device according to an embodiment of the present application.
Fig. 5 is another schematic structural diagram of a cross-end resource access device according to an embodiment of the present application.
Fig. 6 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Fig. 7 is another schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
Referring to the drawings, wherein like reference numbers refer to like elements, the principles of the present application are illustrated as being implemented in a suitable computing environment. The following description is based on illustrated embodiments of the application and should not be taken as limiting the application with respect to other embodiments that are not detailed herein.
In the description that follows, specific embodiments of the present application will be described with reference to steps and symbols executed by one or more computers, unless otherwise indicated. Accordingly, these steps and operations will be referred to, several times, as being performed by a computer, the computer performing operations involving a processing unit of the computer in electronic signals representing data in a structured form. This operation transforms the data or maintains it at locations in the computer's memory system, which may be reconfigured or otherwise altered in a manner well known to those skilled in the art. The data maintains a data structure that is a physical location of the memory that has particular characteristics defined by the data format. However, while the principles of the application have been described in language specific to above, it is not intended to be limited to the specific form set forth herein, and it will be recognized by those of ordinary skill in the art that various of the steps and operations described below may be implemented in hardware.
The terms "first", "second", and "third", etc. in this application are used to distinguish between different objects and not to describe a particular order. Furthermore, the terms "include" and "have," as well as any variations thereof, are intended to cover non-exclusive inclusions. For example, a process, method, system, article, or apparatus that comprises a list of steps or modules is not limited to only those steps or modules listed, but rather, some embodiments may include other steps or modules not listed or inherent to such process, method, article, or apparatus.
At present, intelligent devices are diversified, and the existing technical scheme cannot reasonably apply the advantages of distributed intelligent devices to reasonably and effectively access cross-terminal resources. The patent provides a cross-terminal resource access mode in a distributed multi-device scene.
Referring to fig. 1, fig. 1 is a schematic flowchart of a cross-peer resource access method according to an embodiment of the present disclosure. The cross-terminal resource access method provided by the embodiment of the application is applied to the electronic equipment, and the specific flow can be as follows:
step 101, responding to a first operation aiming at a target resource to generate a resource access request, wherein the resource access request carries a resource identifier.
It should be noted that the cross-end resource access method provided in the embodiment of the present application is applied to distributed electronic devices, for example, a user has a device a (mobile phone), a device B (computer), a device C (television/tablet), and the like, where cross-end resource access refers to cross-end access performed between these devices, for example, a mobile phone may access resources in a computer/tablet.
Based on this, the target resource in the embodiment of the present application is a resource in each device in a distributed multi-device scenario, and is not a resource outside the distributed multi-device scenario. Correspondingly, the cross-end device to be accessed subsequently refers to other devices in the distributed multi-device scenario, but not devices outside the distributed multi-device scenario.
In the embodiment of the application, when a user needs to access a target resource, the electronic device may be operated to generate a resource access request, where the target resource may include a file resource or an application resource, where the file resource may include music, video, pictures, and the like, and the application resource may include an application installation package, an application icon, an application tag, and the like. The resource access request carries a resource identifier, and the resource identifier can indicate a target resource.
For example, when a user desires to access a resource using the electronic device a, a resource access request may be triggered for the resource, so that the resource system service acquires the resource access request. The identification information of the target resource to be accessed may be a one-to-one unique identification configured for each resource stored in the resource system service in advance. Resources maintained in the resource system services may include, but are not limited to, file resources, application resources, and the like.
In an embodiment, the resource access request carrying the resource identifier may also be used to characterize identity information of an initiator of the resource access request. The identity information of the initiator may be attribute information of a hardware device that initiates the resource access request, that is, a network address, a unique device identifier, and the like of the electronic device a, or may be a user name of the user. For example, the network address of the hardware device carrying the access request in the resource identifier, that is, the electronic device a, may return the target resource to the electronic device a through the network address after the other device receives the resource access request.
In this embodiment of the present application, after a resource access request is generated, it is further necessary to further determine whether a target resource requested by the user is a local resource or a cross-end resource, if the target resource is a cross-end resource, step 103 may be continuously performed, and if the target resource is determined not to be a cross-end resource, that is, a local resource, the target resource may be directly accessed and obtained from a resource system service of the current electronic device, and a result is returned to present to the user.
For example, in an embodiment, the resource in the device may be identified in advance, and a field of the identification may be expanded, where the expanded field may be used to represent whether the resource is a local resource or a cross-end resource. And then after a resource access request is generated, judging whether the target resource is a cross-end resource or not according to an expansion field in a resource identifier carried by the resource access request.
In another embodiment, the current local resource of the electronic device may also be searched according to the resource identifier, and if a resource with the same resource identifier is found, the target resource is determined to be the local resource, and if a resource with the same resource identifier is not found, the target resource may be determined to be the cross-end resource. Furthermore, the type of the target resource can be determined before searching, for example, the resource access request carries the resource identifier which can represent the type information of the target resource, and then the target resource is searched in the same local resource of the type in the electronic device, so that the searching efficiency can be greatly improved. For example, if the target resource is a piece of music, the resource identifier carried in the resource access request generated for the target resource may include song name information, and then the target resource may be searched for the local music of the current electronic device according to the song name information, without searching for other types of resources, so that the speed of searching for the resource may be increased.
And 103, resolving the resource identifier to determine the access address of the cross-end equipment.
In the embodiment of the present application, the cross-end resource access method is applied to distributed electronic devices, for example, a distributed system may include a plurality of electronic devices, and the plurality of electronic devices may all have cross-end access.
In an embodiment, the resource identification may be parsed to determine the access address of the cross-end device. Specifically, the resource identifier is subjected to field expansion in advance to represent whether the resource is a local resource or a cross-end resource, wherein when the field expansion is performed, fields such as an identifier representing cross-end equipment and a special separator can be added to the identifier of the cross-end resource, and the identifier of the cross-end equipment can include an access address of the cross-end equipment. Therefore, the extension field in the resource identifier can be analyzed, and the access address of the cross-end device can be obtained according to the field.
In another embodiment, the Identifier of the cross-end device may further include a Universal Unique Identifier (UUID). The universal unique identification code can enable all elements in the distributed system to have unique identification information, and the identification information does not need to be specified through a central control terminal. The universal unique identification code is generated based on data calculation such as the current time, a counter and a hardware identifier (generally, a MAC address of a wireless network card), can be independently created by anyone, and has a repetition probability of almost zero. Alternatively, the universal unique identifier generation algorithm may include a time-based universal unique identifier generation algorithm, a name-based generation algorithm, a Distributed Computing Environment (DCE) security-based generation algorithm, a random number-based generation algorithm, and the like. In this embodiment, the unique identifier generated by the universal unique identification code generation algorithm is set as the identity code of the device. Further, after the resource identifier is analyzed and the universal unique identification code of the cross-end device is obtained, the cross-end device corresponding to the universal unique identification code can be searched in the distributed system and the access address of the cross-end device can be obtained.
And step 104, establishing connection with the cross-end equipment through the access address, accessing the target resource and receiving a return result of the cross-end equipment.
In an embodiment, when the connection is established with the cross-end device, the cross-end device can access the resource system service, and find the target resource according to the resource identifier, so as to return the target resource to the sender, that is, the request-end device, and the request-end device can further store the target resource as the local resource after receiving the target resource.
Further, after the connection is established between the cross-end devices and before the target resource returned by the cross-end devices is received, the cross-end devices can also perform permission check on the request-end devices to judge whether the request-end devices have permission to access the target resource. In an embodiment, the resource identifier carried in the resource access request may be used to represent identity information of an initiator of the resource access request, so that the authority may be verified through the identity information, and before step S101 is executed, the corresponding relationship between a plurality of identity information and the identity information of the resource may be obtained in advance. The corresponding relation may be pre-stored locally or remotely. Acquired by the device that needs to verify access rights.
In the corresponding relationship, one identity information may correspond to the identification information of one or more resources, and after the corresponding relationship exists, the identity information represents that the user represented by the identity information has the right to access the resource represented by the identification information having the corresponding relationship with the identity information.
For example, for the user a, in the correspondence, the identity information corresponding to the user a corresponds to the resource a and the resource b, respectively, and then the user a has the right to access the resource a and the resource b; for other resources within the resource system service except resource a and resource b, for example resource c, user a does not have the right to access other resources because the identity information corresponding to user a does not correspond to other resources. On this basis, after the cross-terminal device acquires the identification information of the target resource and the identity information of the initiator, the corresponding relationship can be inquired according to the identity information of the initiator, so that whether the initiator has the right to access the target resource is determined. If the identity information of the initiator corresponds to the identification information of the target resource, the initiator has the authority of accessing the target resource, otherwise, the initiator does not have the authority of accessing the target resource. When the initiator does not have the authority of accessing the target resource, the cross-terminal equipment can directly refuse the resource access request of the initiator and can also return access error information, and if the user is required to grant the authority, the user needs to pop up a frame for confirmation. After the authority passes the verification, the initiating terminal equipment can access the target resource and receive the return result of the cross terminal equipment.
As can be seen from the above, the cross-end resource access method provided in this embodiment of the present application may generate a resource access request in response to a first operation on a target resource, where the resource access request carries a resource identifier, determine whether the target resource to be accessed is a cross-end resource according to the resource identifier, if the target resource is a cross-end resource, analyze the resource identifier to determine an access address of the cross-end device, establish a connection with the cross-end device through the access address, access the target resource, and receive a return result of the cross-end device. According to the method and the device, the resources do not need to be shared through manual selection equipment, the efficiency is greatly improved when the resources are accessed, and cross-end access can be performed on more kinds of resources.
It should be noted that the cross-end resource access method provided in the embodiment of the present application is applied to a distributed electronic device, for example, a distributed system may include a plurality of electronic devices, such as device a, device B, device C, and the like, and the plurality of electronic devices may all perform cross-end resource access, for example, a mobile phone may access a resource on a tablet or a personal computer. It is understood that the target resource in the present application is also a resource on a device in the above-mentioned distributed system, and not a general cross-end resource, for example, an application program requesting a resource from a server is also accessing a cross-end resource, but is not accessing a resource on another device in the distributed system by the current device in the embodiment of the present application. Referring to fig. 2 in detail, fig. 2 is a schematic diagram of an overall structure of a distributed device according to an embodiment of the present disclosure. Taking an Android system as an example, the purpose of cross-terminal resource access can be achieved by only adding cross-terminal resource proxy service to the original Android device, wherein the cross-terminal resource proxy service comprises the following modules:
a cross-end resource management module: receiving all cross-terminal resource access requests, firstly inquiring whether a local cache has cross-terminal resources, and if not, forwarding the resource requests to cross-terminal equipment.
A resource access module: and receiving a resource access request of the cross-end equipment, accessing the local resource through the resource system service and returning a result.
And the authority checking module: and the authority management service is used for judging whether the resource request program has the authority to access the cross-terminal resources.
A connecting module: and acquiring an access address of the cross-terminal equipment according to the resource request, and calling an RPC module interface to send the request.
A resource change monitoring module: and managing the monitoring requests of all cross-end equipment, and sending a change message to the cross-end equipment when the monitored resources change.
The cross-end resource access method of the present application will be further described below on the basis of the method described in the above embodiments. Referring to fig. 3, fig. 3 is another schematic flow chart of a cross-peer resource access method provided in the embodiment of the present application, where the cross-peer resource access method includes:
In one embodiment, the first type of resource may include a file resource and an application resource. Wherein the file resources may include music, video, pictures, etc., and the application resources may include application installation packages, application icons, application tags, etc. For example, in the Android system, resources in a device can be generally marked in two ways, and for file resources, a Uniform Resource Identifier (URI) can be used for marking. For application resources, the tagging may be by application package name and resource ID. And after marking, obtaining the initial resource identification of the resource. That is, the step of generating the initial resource identifier of the resource according to the first type may include:
if the resource is a file resource, generating an initial resource identifier according to a uniform resource identifier of the file resource;
and if the resource is an application resource, generating an initial resource identifier according to the package name and the ID of the application resource.
In an embodiment of the application, the second type of resource includes a local resource and a cross-end resource. In order to further distinguish the resource identifiers, the field of the original resource identifier can be further expanded, and the expanded field can be an identifier representing a cross-end device, a special separator and the like. The identifier of the cross-end device may include a device ID, a device access address, and the like. That is, the step of expanding the field of the initial resource identifier according to the second type may include:
and if the resource is a cross-end resource, expanding the field of the initial resource identification according to the equipment identification and the separator corresponding to the cross-end resource.
In the embodiment of the application, when a user needs to access a target resource, the electronic device can be operated to generate a resource access request. The resource access request carries a resource identifier, and the resource identifier can indicate a target resource.
For example, when a user desires to access a resource using the electronic device a, a resource access request may be triggered for the resource, so that the resource system service acquires the resource access request. The identification information of the target resource to be accessed may be a one-to-one unique identification configured for each resource stored in the resource system service in advance. Resources maintained in the resource system services may include, but are not limited to, file resources, application resources, and the like.
In this embodiment of the present application, after the resource access request is generated, it is further necessary to further determine whether the target resource requested by the user is a local resource or a cross-end resource, if the target resource is a cross-end resource, step 205 may be continuously performed, and if the target resource is determined not to be a cross-end resource, that is, to be a local resource, the target resource may be directly accessed to a resource system service of the current electronic device and acquired, and a result is returned to present to the user. Specifically, after the resource access request is generated, whether the target resource is a cross-end resource or not can be judged according to an expansion field in the resource identifier carried by the resource access request.
In the embodiment of the application, when the accessed target resource is judged to be the cross-end resource, the resource access request can be sent to the cross-end resource management module, whether the cross-end resource exists in the local cache is retrieved through the resource identifier, and if the cross-end resource exists in the local cache, the target resource in the local cache can be directly called to return. If the target resource is not included, proceed to step 206.
Specifically, the resource identifier is subjected to field expansion in advance to represent whether the resource is a local resource or a cross-end resource, wherein when the field expansion is performed, fields such as an identifier representing cross-end equipment and a special separator can be added to the identifier of the cross-end resource, and the identifier of the cross-end equipment can include an access address of the cross-end equipment. Therefore, the extension field in the resource identifier can be analyzed, and the access address of the cross-end device can be obtained according to the field.
After the access address of the cross-end device is determined, an interface of a Remote Procedure Call (RPC) module may be called to send the resource access request. In the embodiments of the present application, the program can utilize other programs or computer processing processes through remote procedure calls. Client/server mode computing combines remote procedure calls with other technologies (e.g., messaging) as a mechanism for intersystem communication.
And step 208, receiving the permission verification result returned by the cross-end equipment, and if the permission verification result is verified to be passed, accessing the target resource and receiving the return result of the cross-end equipment.
In an embodiment, after receiving the resource access request, the cross-end device may establish a connection with the request-end device, and before receiving the target resource returned by the cross-end device, the cross-end device may further perform permission check on the request-end device to determine whether the request-end device has a permission to access the target resource. In an embodiment, the resource identifier carried in the resource access request may be used to represent identity information of an initiator of the resource access request, the cross-end device verifies the identity information, and returns a verification result to the request-end device, and if the permission verification result is that verification is passed, the request-end device accesses the target resource and receives a return result of the cross-end device.
Furthermore, if the returned result is a resource such as a file, a picture, an icon and the like, the content of the file needs to be returned, the requesting terminal equipment firstly stores the content as a local file after receiving the content, returns a file descriptor, and then stores the result and a cross-terminal resource identifier into a cache.
As can be seen from the above, the cross-end resource access method provided in this embodiment of the present application may obtain a first type of a resource in a system, generate an initial resource identifier of the resource according to the first type, obtain a second type of the resource, expand a field of the initial resource identifier according to the second type to obtain a final resource identifier, generate a resource access request in response to a first operation on a target resource, where the resource access request carries the resource identifier, determine whether the target resource is a cross-end resource according to the resource identifier, if so, retrieve a local cache according to the resource identifier to determine whether the local cache includes the target resource, if not, parse the resource identifier to determine an access address of a cross-end device, send the resource access request to the access address of the cross-end device through a remote procedure call interface, and receiving a permission verification result returned by the cross-end equipment, and if the permission verification result is that the verification is passed, accessing the target resource and receiving a return result of the cross-end equipment. According to the method and the device, the resources do not need to be shared through manual selection equipment, the efficiency is greatly improved when the resources are accessed, and cross-end access can be performed on more kinds of resources.
Referring to fig. 4, fig. 4 is a schematic structural diagram of a cross-peer resource access device according to an embodiment of the present disclosure. Wherein the cross-end resource access device 30 comprises:
a receiving module 301, configured to generate a resource access request in response to a first operation on a target resource, where the resource access request carries a resource identifier;
a determining module 302, configured to determine whether the accessed target resource is a cross-end resource according to the resource identifier;
a determining module 303, configured to, when the determining module 302 determines that the resource identifier is the access address of the cross-end device, parse the resource identifier to determine the access address of the cross-end device;
an accessing module 304, configured to establish a connection with the cross-end device through the access address, access the target resource, and receive a return result of the cross-end device.
In an embodiment, please refer to fig. 5, wherein the cross-end resource access device 30 may further include:
a retrieving module 305, configured to, when the determining module 302 determines that the local cache includes the target resource, retrieve a local cache according to the resource identifier to determine whether the target resource is included in the local cache;
a processing module 306, configured to, when the retrieving module 305 determines that the target resource is included, call the target resource in the local cache to return;
the determining module 303 is specifically configured to, when the retrieving module 305 determines that the target resource is not included, parse the resource identifier to determine an access address of the cross-end device.
In an embodiment, the access module 304 may specifically include:
a sending submodule 3041, configured to send the resource access request to an access address of the cross-end device through a remote procedure call interface;
a receiving submodule 3042, configured to receive an authority verification result returned by the cross-end device;
the accessing submodule 3043 is configured to, when the permission verification result is that the permission verification passes, access the target resource and receive a return result of the cross-end device.
As can be seen from the above, the cross-end resource access device 30 in the embodiment of the present application may generate a resource access request in response to the first operation on the target resource, where the resource access request carries a resource identifier, determine whether the accessed target resource is a cross-end resource according to the resource identifier, if the accessed target resource is a cross-end resource, analyze the resource identifier to determine an access address of the cross-end device, establish a connection with the cross-end device through the access address, access the target resource, and receive a return result of the cross-end device. According to the method and the device, the resources do not need to be shared through manual selection equipment, the efficiency is greatly improved when the resources are accessed, and cross-end access can be performed on more kinds of resources.
In the embodiment of the present application, the cross-end resource access device and the cross-end resource access method in the above embodiments belong to the same concept, and any method provided in the cross-end resource access method embodiment may be run on the cross-end resource access device, and a specific implementation process thereof is detailed in the embodiment of the cross-end resource access method, and is not described herein again.
The term "module" as used herein may be considered a software object executing on the computing system. The different components, modules, engines, and services described herein may be considered as implementation objects on the computing system. The apparatus and method described herein may be implemented in software, but may also be implemented in hardware, and are within the scope of the present application.
The embodiment of the present application further provides a storage medium, on which a computer program is stored, and when the computer program runs on a computer, the computer is caused to execute the above cross-end resource access method.
The embodiment of the application also provides an electronic device, such as a tablet computer, a mobile phone and the like. The processor in the electronic device loads instructions corresponding to processes of one or more application programs into the memory according to the following steps, and the processor runs the application programs stored in the memory, so that various functions are realized:
responding to a first operation aiming at a target resource to generate a resource access request, wherein the resource access request carries a resource identifier;
judging whether the accessed target resource is a cross-end resource or not according to the resource identifier;
if the resource is a cross-end resource, analyzing the resource identifier to determine an access address of the cross-end equipment;
and establishing connection with the cross-end equipment through the access address, accessing the target resource and receiving a return result of the cross-end equipment.
Reference herein to "an embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment can be included in at least one embodiment of the application. The appearances of the phrase in various places in the specification are not necessarily all referring to the same embodiment, nor are separate or alternative embodiments mutually exclusive of other embodiments. It is explicitly and implicitly understood by one skilled in the art that the embodiments described herein can be combined with other embodiments.
Referring to fig. 6, the electronic device 400 includes a processor 401 and a memory 402. The processor 401 is electrically connected to the memory 402.
The processor 400 is a control center of the electronic device 400, connects various parts of the entire electronic device using various interfaces and lines, performs various functions of the electronic device 400 by running or loading a computer program stored in the memory 402 and calling data stored in the memory 402, and processes the data, thereby monitoring the electronic device 400 as a whole.
The memory 402 may be used to store software programs and modules, and the processor 401 executes various functional applications and data processing by operating the computer programs and modules stored in the memory 402. The memory 402 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, a computer program required by at least one function (such as a sound playing function, an image playing function, etc.), and the like; the storage data area may store data created according to use of the electronic device, and the like. Further, the memory 402 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid state storage device. Accordingly, the memory 402 may also include a memory controller to provide the processor 401 access to the memory 402.
In this embodiment, the processor 401 in the electronic device 400 loads instructions corresponding to one or more processes of the computer program into the memory 402 according to the following steps, and the processor 401 runs the computer program stored in the memory 402, so as to implement various functions, as follows:
responding to a first operation aiming at a target resource to generate a resource access request, wherein the resource access request carries a resource identifier;
judging whether the accessed target resource is a cross-end resource or not according to the resource identifier;
if the resource is a cross-end resource, analyzing the resource identifier to determine an access address of the cross-end equipment;
and establishing connection with the cross-end equipment through the access address, accessing the target resource and receiving a return result of the cross-end equipment.
Referring also to fig. 7, in some embodiments, the electronic device 400 may further include: a display 403, radio frequency circuitry 404, audio circuitry 405, and a power supply 406. The display 403, the rf circuit 404, the audio circuit 405, and the power source 406 are electrically connected to the processor 401.
The display 403 may be used to display information entered by or provided to the user as well as various graphical user interfaces, which may be made up of graphics, text, icons, video, and any combination thereof. The Display 403 may include a Display panel, and in some embodiments, the Display panel may be configured in the form of a Liquid Crystal Display (LCD), an Organic Light-Emitting Diode (OLED), or the like.
The rf circuit 404 may be used for transceiving rf signals to establish wireless communication with a network device or other electronic devices through wireless communication, and for transceiving signals with the network device or other electronic devices. In general, radio frequency circuit 501 includes, but is not limited to, an antenna, at least one Amplifier, a tuner, one or more oscillators, a Subscriber Identity Module (SIM) card, a transceiver, a coupler, a Low Noise Amplifier (LNA), a duplexer, and the like.
The audio circuit 405 may be used to provide an audio interface between the user and the electronic device through a speaker, microphone. The audio circuit 506 may convert the received audio data into an electrical signal, transmit the electrical signal to a speaker, and convert the electrical signal to an audio signal for output by the speaker.
The power supply 406 may be used to power various components of the electronic device 400. In some embodiments, power supply 406 may be logically coupled to processor 401 via a power management system, such that functions to manage charging, discharging, and power consumption management are performed via the power management system. The power supply 406 may also include any component of one or more dc or ac power sources, recharging systems, power failure detection circuitry, power converters or inverters, power status indicators, and the like.
Although not shown in fig. 7, the electronic device 400 may further include a camera, a bluetooth module, and the like, which are not described in detail herein.
In the embodiment of the present application, the storage medium may be a magnetic disk, an optical disk, a Read Only Memory (ROM), a Random Access Memory (RAM), or the like.
In the foregoing embodiments, the descriptions of the respective embodiments have respective emphasis, and for parts that are not described in detail in a certain embodiment, reference may be made to related descriptions of other embodiments.
It should be noted that, for the cross-end resource access method in the embodiment of the present application, it can be understood by a person with ordinary skill in the art that all or part of the process for implementing the cross-end resource access method in the embodiment of the present application can be completed by controlling the relevant hardware through a computer program, where the computer program can be stored in a computer-readable storage medium, such as a memory of an electronic device, and executed by at least one processor in the electronic device, and the process of executing the process can include, for example, the process of the embodiment of the cross-end resource access method. The storage medium may be a magnetic disk, an optical disk, a read-only memory, a random access memory, etc.
For the cross-end resource access device in the embodiment of the present application, each functional module may be integrated in one processing chip, or each module may exist alone physically, or two or more modules are integrated in one module. The integrated module can be realized in a hardware mode, and can also be realized in a software functional module mode. The integrated module, if implemented in the form of a software functional module and sold or used as a stand-alone product, may also be stored in a computer readable storage medium, such as a read-only memory, a magnetic or optical disk, or the like.
The foregoing describes in detail a cross-end resource access method, apparatus, storage medium, and electronic device provided in the embodiments of the present application, and a specific example is applied in the present application to explain the principles and implementations of the present application, and the description of the foregoing embodiments is only used to help understand the method and core ideas of the present application; meanwhile, for those skilled in the art, according to the idea of the present application, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present application.
Claims (10)
1. A cross-end resource access method, the method comprising the steps of:
responding to a first operation aiming at a target resource to generate a resource access request, wherein the resource access request carries a resource identifier;
judging whether the accessed target resource is a cross-end resource or not according to the resource identifier;
if the resource is a cross-end resource, analyzing the resource identifier to determine an access address of the cross-end equipment;
and establishing connection with the cross-end equipment through the access address, accessing the target resource and receiving a return result of the cross-end equipment.
2. The cross-end resource access method of claim 1, wherein after determining that the target resource is a cross-end resource, the method further comprises:
retrieving a local cache according to the resource identifier to judge whether the target resource is included in the local cache;
if the target resource is included, calling the target resource in the local cache to return;
and if the target resource is not included, analyzing the resource identifier to determine the access address of the cross-end equipment.
3. The cross-end resource access method according to claim 1, wherein the step of establishing a connection with the cross-end device through the access address comprises:
sending the resource access request to an access address of the cross-end equipment through a remote procedure call interface;
receiving an authority verification result returned by the cross-terminal equipment;
and if the permission verification result is that the verification is passed, executing the step of accessing the target resource and receiving the return result of the cross-end equipment.
4. The cross-terminal resource access method of claim 1, wherein prior to generating a resource access request in response to a first operation on a target resource, the method further comprises:
acquiring a first type of resources in a system, and generating an initial resource identifier of the resources according to the first type, wherein the first type of the resources comprises file resources and application resources;
and acquiring a second type of the resource, and expanding the field of the initial resource identifier according to the second type to obtain a final resource identifier, wherein the second type of the resource comprises a local resource and a cross-terminal resource.
5. The cross-end resource access method of claim 4, wherein generating the initial resource identification of the resource according to the first type comprises:
if the resource is a file resource, generating an initial resource identifier according to a uniform resource identifier of the file resource;
if the resource is an application resource, generating an initial resource identifier according to the package name and the ID of the application resource;
the expanding the field of the initial resource identifier according to the second type comprises the following steps:
and if the resource is a cross-end resource, expanding the field of the initial resource identification according to the equipment identification and the separator corresponding to the cross-end resource.
6. An apparatus for cross-end resource access, the apparatus comprising:
the system comprises a receiving module, a processing module and a processing module, wherein the receiving module is used for responding to a first operation aiming at a target resource to generate a resource access request, and the resource access request carries a resource identifier;
the judging module is used for judging whether the accessed target resource is a cross-end resource or not according to the resource identifier;
the determining module is used for analyzing the resource identifier to determine an access address of the cross-end equipment when the judging module judges that the resource identifier is positive;
and the access module is used for establishing connection with the cross-end equipment through the access address, accessing the target resource and receiving a return result of the cross-end equipment.
7. The cross-end resource access device of claim 6, wherein the device further comprises:
the retrieval module is used for retrieving the local cache according to the resource identifier when the judgment module judges that the local cache comprises the target resource;
the processing module is used for calling the target resource in the local cache to return when the retrieval module determines that the target resource is included;
the determining module is specifically configured to, when the retrieving module determines that the target resource is not included, parse the resource identifier to determine an access address of the cross-end device.
8. The cross-end resource access device of claim 6, wherein the access module specifically comprises:
the sending submodule is used for sending the resource access request to an access address of the cross-end equipment through a remote procedure call interface;
the receiving submodule is used for receiving the authority verification result returned by the cross-terminal equipment;
and the access sub-module is used for accessing the target resource and receiving a return result of the cross-end equipment when the permission verification result is that the permission verification passes.
9. A storage medium having stored thereon a computer program, which, when run on a computer, causes the computer to perform a cross-end resource access method as claimed in any one of claims 1 to 5.
10. An electronic device comprising a processor and a memory, the memory storing a plurality of instructions, wherein the instructions in the memory are loaded by the processor for performing the steps of:
responding to a first operation aiming at a target resource to generate a resource access request, wherein the resource access request carries a resource identifier;
judging whether the accessed target resource is a cross-end resource or not according to the resource identifier;
if the resource is a cross-end resource, analyzing the resource identifier to determine an access address of the cross-end equipment;
and establishing connection with the cross-end equipment through the access address, accessing the target resource and receiving a return result of the cross-end equipment.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110594362.8A CN113242314B (en) | 2021-05-28 | 2021-05-28 | Cross-terminal resource access method and device, storage medium and electronic equipment |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110594362.8A CN113242314B (en) | 2021-05-28 | 2021-05-28 | Cross-terminal resource access method and device, storage medium and electronic equipment |
Publications (2)
Publication Number | Publication Date |
---|---|
CN113242314A true CN113242314A (en) | 2021-08-10 |
CN113242314B CN113242314B (en) | 2023-06-13 |
Family
ID=77135620
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202110594362.8A Active CN113242314B (en) | 2021-05-28 | 2021-05-28 | Cross-terminal resource access method and device, storage medium and electronic equipment |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN113242314B (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2023051096A1 (en) * | 2021-09-29 | 2023-04-06 | 华为技术有限公司 | Method for accessing resources, and electronic device |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101771707A (en) * | 2010-02-08 | 2010-07-07 | 中兴通讯股份有限公司 | Method for realizing resource share among terminals, resource processing system and terminals |
US20140047048A1 (en) * | 2012-08-08 | 2014-02-13 | Samsung Electronics Co., Ltd. | Method and device for resource sharing between devices |
CN103973638A (en) * | 2013-01-28 | 2014-08-06 | 联想(北京)有限公司 | Access control method, electronic equipment and server |
US20160212095A1 (en) * | 2013-10-14 | 2016-07-21 | Korea Electronics Technology Institute | Method and system for accessing resource and system applying the same |
CN108076084A (en) * | 2016-11-10 | 2018-05-25 | 杭州海康威视数字技术股份有限公司 | A kind of resource share method, apparatus and system |
-
2021
- 2021-05-28 CN CN202110594362.8A patent/CN113242314B/en active Active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101771707A (en) * | 2010-02-08 | 2010-07-07 | 中兴通讯股份有限公司 | Method for realizing resource share among terminals, resource processing system and terminals |
US20140047048A1 (en) * | 2012-08-08 | 2014-02-13 | Samsung Electronics Co., Ltd. | Method and device for resource sharing between devices |
CN103973638A (en) * | 2013-01-28 | 2014-08-06 | 联想(北京)有限公司 | Access control method, electronic equipment and server |
US20160212095A1 (en) * | 2013-10-14 | 2016-07-21 | Korea Electronics Technology Institute | Method and system for accessing resource and system applying the same |
CN108076084A (en) * | 2016-11-10 | 2018-05-25 | 杭州海康威视数字技术股份有限公司 | A kind of resource share method, apparatus and system |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2023051096A1 (en) * | 2021-09-29 | 2023-04-06 | 华为技术有限公司 | Method for accessing resources, and electronic device |
Also Published As
Publication number | Publication date |
---|---|
CN113242314B (en) | 2023-06-13 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN113347242B (en) | Cross-device resource access method and device, storage medium and electronic device | |
US10304461B2 (en) | Remote electronic service requesting and processing method, server, and terminal | |
US9807218B2 (en) | Method for filtering spam in electronic device and the electronic device | |
CN107784221B (en) | Authority control method, service providing method, device and system and electronic equipment | |
CN107635027B (en) | Domain name resolution method, medium, device and computing equipment | |
US20210235260A1 (en) | Service-based communication method, unit, and system, and storage medium | |
CN110781373B (en) | List updating method and device, readable medium and electronic equipment | |
CN114679610B (en) | Screen throwing method, device and system for continuously playing video | |
US11736149B2 (en) | Data transmission method for Bluetooth card reader and electronic device | |
EP4318239A1 (en) | Methods and apparatuses for calling application program, storage medium, and electronic device | |
CN113242314B (en) | Cross-terminal resource access method and device, storage medium and electronic equipment | |
US11706301B2 (en) | Server node selection method and terminal device | |
CN111475230B (en) | Application function configuration method and device and electronic equipment | |
MX2014009375A (en) | Application installation method, apparatus and device. | |
US9449152B2 (en) | License acquisition scheme indication method and mobile terminal therefor | |
US20230216732A1 (en) | Network Configuration Method and Device | |
CN113824675B (en) | Method and device for managing login state | |
CN115225966A (en) | Application starting method and device, terminal equipment and storage medium | |
CN111460020B (en) | Method, device, electronic equipment and medium for resolving message | |
CN113746909A (en) | Network connection method, device, electronic equipment and computer readable storage medium | |
KR102072003B1 (en) | Method and device for resource sharing between devices | |
US8798588B2 (en) | Terminal and method for providing zone-based service outside of service zone | |
RU2465637C2 (en) | System and method for improving operation of media server | |
US12041139B2 (en) | Apparatus, method and computer readable medium for ranking network function service producers | |
CN110619195B (en) | Authority application processing method, device, equipment and storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |