CN109275125B - Resource sharing method, device, equipment and storage medium - Google Patents

Resource sharing method, device, equipment and storage medium Download PDF

Info

Publication number
CN109275125B
CN109275125B CN201810896925.7A CN201810896925A CN109275125B CN 109275125 B CN109275125 B CN 109275125B CN 201810896925 A CN201810896925 A CN 201810896925A CN 109275125 B CN109275125 B CN 109275125B
Authority
CN
China
Prior art keywords
music
resource
adjacent
devices
neighboring
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.)
Active
Application number
CN201810896925.7A
Other languages
Chinese (zh)
Other versions
CN109275125A (en
Inventor
胡亚东
柯世兴
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangdong Oppo Mobile Telecommunications Corp Ltd
Original Assignee
Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guangdong Oppo Mobile Telecommunications Corp Ltd filed Critical Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority to CN201810896925.7A priority Critical patent/CN109275125B/en
Publication of CN109275125A publication Critical patent/CN109275125A/en
Application granted granted Critical
Publication of CN109275125B publication Critical patent/CN109275125B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/70Services for machine-to-machine communication [M2M] or machine type communication [MTC]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/60Scheduling or organising the servicing of application requests, e.g. requests for application data transmissions using the analysis and optimisation of the required network resources
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W76/00Connection management
    • H04W76/10Connection setup
    • H04W76/14Direct-mode setup

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

The application discloses a resource sharing method and a related device, which are applied to electronic equipment, wherein the electronic equipment and a plurality of adjacent equipment establish connection of a Neighbor Awareness Network (NAN), and the method comprises the following steps: sending music resource acquisition requests to the plurality of nearby devices, wherein the acquisition requests comprise identification information of the electronic devices; receiving feedback information from the plurality of neighboring devices, wherein the feedback information comprises identification information of the neighboring devices and related information of the music resource; and acquiring the music resource from at least one of the plurality of adjacent devices according to the feedback information. The method and the device are beneficial to the electronic equipment to obtain the music resources from the adjacent equipment through the NAN network, and the resource obtaining efficiency is improved.

Description

Resource sharing method, device, equipment and storage medium
Technical Field
The present application relates to the field of electronic technologies, and in particular, to a resource sharing method, apparatus, device, and storage medium.
Background
With the widespread use of electronic devices (such as mobile phones, tablet computers, and the like), the electronic devices have more and more applications and more powerful functions, and the electronic devices are developed towards diversification and personalization, and become indispensable electronic products in the life of target objects. A Neighbor Awareness Network (NAN) is applied between electronic devices, where the NAN is a local area network in which NAN devices are directly or indirectly connected together, information may directly circulate, and multiple devices are connected to each other, and may share resources among the multiple devices.
Disclosure of Invention
The embodiment of the application provides a resource sharing method and a related device, which are beneficial for electronic equipment to simultaneously acquire music resources from a plurality of adjacent equipment through a NAN network and improve the resource acquisition efficiency.
In a first aspect, an embodiment of the present application provides a resource sharing method, which is applied to an electronic device, where the electronic device and a plurality of neighboring devices establish a neighbor awareness network NAN connection, and the method includes:
sending music resource acquisition requests to the plurality of nearby devices, wherein the acquisition requests comprise identification information of the electronic devices;
receiving feedback information from the plurality of neighboring devices, wherein the feedback information comprises identification information of the neighboring devices and related information of the music resource;
and acquiring the music resource from at least one of the plurality of adjacent devices according to the feedback information.
In a second aspect, an embodiment of the present application provides a resource sharing apparatus applied to an electronic device, where the electronic device and a plurality of neighboring devices establish a neighbor awareness network NAN connection, the resource sharing apparatus includes a sending unit, a receiving unit, and a processing unit, where,
the sending unit is configured to send a music resource acquisition request to the plurality of nearby devices, where the acquisition request includes identification information of the electronic device;
the receiving unit is configured to receive feedback information from the plurality of neighboring devices, where the feedback information includes identification information of the neighboring devices and related information of the music resource;
the processing unit is configured to acquire the music resource from at least one of the plurality of neighboring devices according to the feedback information.
In a third aspect, an embodiment of the present application provides an electronic device, including a processor, a memory, a communication interface, and one or more programs, where the one or more programs are stored in the memory and configured to be executed by the processor, and the program includes instructions for executing steps in any method of the first aspect of the embodiment of the present application.
In a fourth aspect, the present application provides a computer-readable storage medium, where the computer-readable storage medium stores a computer program for electronic data exchange, where the computer program makes a computer perform part or all of the steps described in any one of the methods of the first aspect of the present application.
It can be seen that, in this embodiment of the present application, an electronic device first sends a music resource acquisition request to the multiple nearby devices, where the acquisition request includes identification information of the electronic device, then receives feedback information from the multiple nearby devices, where the feedback information includes identification information of the nearby devices and information related to the music resource, and finally acquires the music resource from at least one of the multiple nearby devices according to the feedback information. The electronic equipment can send music resource acquisition requests to the plurality of adjacent equipment in the adjacent perception network, and determines at least one adjacent equipment in the plurality of adjacent equipment, which stores the music resource, according to the feedback information sent by the plurality of adjacent equipment, so that the music resource can be acquired from the at least one adjacent equipment at the same time, and the efficiency and the safety of acquiring the music resource are improved.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments or the background art of the present application, the drawings required to be used in the embodiments or the background art of the present application will be described below.
FIG. 1A is a schematic diagram of a program runtime space of a smart phone;
FIG. 1B is a system architecture diagram of an android system;
fig. 1C is a network architecture diagram of a NAN according to an embodiment of the present application;
fig. 1D is a schematic view of a scenario for starting a network function according to an embodiment of the present application;
fig. 2 is a schematic flowchart of a resource sharing method according to an embodiment of the present application;
fig. 3 is a schematic flowchart of another resource sharing method provided in an embodiment of the present application;
fig. 4 is a schematic flowchart of another resource sharing method provided in an embodiment of the present application;
fig. 5 is a schematic structural diagram of an electronic device provided in an embodiment of the present application;
fig. 6 is a block diagram illustrating functional units of a resource sharing apparatus according to an embodiment of the present disclosure.
Detailed description of the invention
In order to make the technical solutions better understood by those skilled in the art, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only partial embodiments of the present application, but not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
The following are detailed below.
The terms "first," "second," "third," and "fourth," etc. in the description and claims of this application and in the accompanying drawings are used for distinguishing between different objects and not for describing 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 elements is not limited to only those steps or elements listed, but may alternatively include other steps or elements not listed, or inherent to such process, method, article, or apparatus.
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.
As shown in fig. 1A, currently, electronic devices such as smart phones are generally provided with a program running space, where the program running space includes a user space and an operating system space, where the user space runs one or more application programs, and the one or more application programs are third-party application programs installed in the electronic devices.
The electronic device can specifically run an Android system, a mobile operating system iOS developed by apple Inc., and the like, and the electronic device is not limited herein. As shown in fig. 1B, for example that the electronic device runs an Android system, the corresponding user space includes an Application layer (Applications) in the Android system, and the operating system space may include an Application Framework layer (Application Framework) in the Android system, a system Runtime library layer (including system Runtime Libraries and Android Runtime runtimes), and a Linux Kernel layer (Linux Kernel). The application layer comprises various application programs which are directly interacted with the user or service programs which are written by Java language and run in the background. For example, programs that implement common basic functions on smartphones, such as Short Messaging Service (SMS) SMS, phone dialing, picture viewer, calendar, games, maps, World Wide Web (Web) browser, and other applications developed by developers. The application framework layer provides a series of class libraries required by Android application development, can be used for reusing components, and can also realize personalized extension through inheritance. And the system operation library layer is a support of an application program framework and provides services for each component in the Android system. The system operation library layer is composed of a system class library and Android operation. The Android runtime comprises two parts, namely a core library and a Dalvik virtual machine. The Linux kernel layer is used for realizing core functions such as hardware device driving, process and memory management, a network protocol stack, power management, wireless communication and the like.
Electronic devices may include various handheld devices, vehicle-mounted devices, wearable devices (e.g., smartwatches, smartbands, pedometers, etc.), computing devices or other processing devices connected to wireless modems, as well as various forms of User Equipment (UE), Mobile Stations (MS), terminal Equipment (terminal device), and so forth, having wireless communication capabilities. For convenience of description, the above-mentioned devices are collectively referred to as electronic devices.
A Neighbor Awareness Network (NAN), also called a Wireless Fidelity (Wi-Fi) awareness network, is described in the embodiments of the present application by using the NAN. The NAN function is mainly used for realizing a real-time efficient discovery mechanism, so that the Wi-Fi function is expanded, and the application experience at the moment is improved. The device and the service are continuously discovered in the Wi-Fi range before connection is established, the device does not need to be connected to a mobile broadband network or a Wi-Fi infrastructure network, and a fast awareness networking mode of a component NAN can be achieved. The social application created by the new technology can be adopted, for example, people can be helped to find nearby friends, information or services meeting the requirements of the people, small-section information can be exchanged under the condition of no connection, for example, position information is carried in a discovery frame discover beacon, information exchange is carried out through interaction of the discovery frame, and the like. In addition, the environment sensing function is improved. Because the terminals do not need to rely on network connection to inform the surrounding experience of the users to the users through the NAN, as long as the Wi-Fi Aware discovers the terminals which also support the NAN function, the Wi-Fi Direct or infrastructure connection can be established, and then multiple experiences are provided. Thus, the NAN functionality may help users complete more tasks using the information they receive, from discovering information to eventual activities, supplementing the proximity-based experience.
Referring to fig. 1C, fig. 1C is a network architecture diagram of a NAN according to an embodiment of the present disclosure, where the network architecture diagram includes an electronic device, a first neighboring device, a second neighboring device, and a third neighboring device. And the electronic equipment and the adjacent equipment in the NAN both support the NAN function, and the NAN function is started before the application is run. The NAN function may be triggered by similar actions like turning on a Wi-Fi switch or turning on a button for controlling the NAN function, as shown in fig. 1D, the neighbor awareness network and the wired network are in an on state, and the wireless network is in an off state; and the system can also be automatically started when the operation parameters meet certain conditions, wherein: the operating parameter may be a current location of the electronic device, for example: parking area, market, highway etc. the operating parameter also can be electronic equipment's foreground application, for example: applications including location services, applications involving neighboring networks, and the like, are not limited herein. When the proximity sensing network, the wireless network and the wired network are all started, which network is specifically used by the electronic equipment can be determined according to a preset priority order.
The following describes embodiments of the present application in detail.
Referring to fig. 2, fig. 2 is a flowchart illustrating a resource sharing method applied to an electronic device, where the electronic device and a plurality of neighboring devices establish a neighbor aware network NAN connection. The resource sharing method comprises the following steps:
s201, the electronic device sends music resource acquisition requests to the plurality of nearby devices, wherein the acquisition requests include identification information of the electronic device.
The electronic device can send music resource acquisition requests to a plurality of adjacent devices in the adjacent perception NAN network, the music resources can be resources of a plurality of music tracks in a song list or resources of a music track, and the electronic device does not have the music resources, so that the electronic device can request the plurality of adjacent devices in the NAN to acquire the music resources, the acquisition requests include identification information of the electronic device, and the identification information is used for uniquely identifying the electronic device and informing the adjacent devices of the identification information of the devices needing to acquire the music resources.
S202, the electronic device receives feedback information from the plurality of adjacent devices, wherein the feedback information comprises the identification information of the adjacent devices and the related information of the music resource.
The electronic device receives feedback information sent by a plurality of adjacent devices, wherein the feedback information comprises identification information of the adjacent devices and related information of the music resource, so that the electronic device can determine which adjacent devices have the music resource and which adjacent devices do not have the music resource.
S203, the electronic equipment acquires the music resource from at least one of the plurality of adjacent equipment according to the feedback information.
The electronic equipment selects at least one adjacent device and obtains the music resource from the adjacent device according to the feedback information sent by the adjacent devices, and the music resource is distributed to each adjacent device in the adjacent devices after being split, so that the music resource can be obtained from the adjacent devices in parallel, and the processing efficiency is improved.
It can be seen that, in this embodiment of the present application, an electronic device first sends a music resource acquisition request to the multiple nearby devices, where the acquisition request includes identification information of the electronic device, then receives feedback information from the multiple nearby devices, where the feedback information includes identification information of the nearby devices and information related to the music resource, and finally acquires the music resource from at least one of the multiple nearby devices according to the feedback information. The electronic equipment can send music resource acquisition requests to the plurality of adjacent equipment in the adjacent perception network, and determines at least one adjacent equipment in the plurality of adjacent equipment, which stores the music resource, according to the feedback information sent by the plurality of adjacent equipment, so that the music resource can be acquired from the at least one adjacent equipment at the same time, and the efficiency and the safety of acquiring the music resource are improved.
In one possible example, the obtaining the music resource from at least one neighboring device according to the feedback information includes: determining at least one adjacent device which stores the music resource in the plurality of adjacent devices according to the related information of the music resource in the feedback information; the music assets are simultaneously acquired from the at least one proximate device.
After receiving a music resource acquisition request sent by the electronic device, the neighboring device detects whether the local music resource library contains the music resource, and sends feedback information to the electronic device, where the feedback information includes identification information of the neighboring device and related information of the music resource, and the related information of the music resource may be a local music song list that may include the neighboring resource, so as to determine whether the neighboring device includes the music resource according to the local music song list, or directly feed back a search result of the neighboring device for the music resource.
The electronic equipment determines at least one adjacent equipment storing the music resource in the plurality of adjacent equipment according to the related information of the music resource sent by the plurality of adjacent equipment, and can acquire the music resource from the at least one adjacent equipment at the same time.
It can be seen that, in this example, according to the feedback information sent by the multiple neighboring apparatuses, it is determined which neighboring apparatuses in the neighboring apparatuses have the music resource and which neighboring apparatuses do not have the music resource, and at least one neighboring apparatus having the music resource is selected to perform, in parallel, acquiring the music resource from at least one neighboring apparatus, which is beneficial to improving the efficiency of acquiring the music resource.
In one possible example, the music resource is a target music song, the target music song including a plurality of music tracks; the simultaneously acquiring the music resource from the at least one neighboring device comprises: determining a data transmission speed of the electronic device and the at least one neighboring device; determining target adjacent equipment corresponding to each music track in the plurality of music tracks according to the data transmission speed, wherein the target adjacent equipment is adjacent equipment in the at least one adjacent equipment; and acquiring the music tracks corresponding to each target adjacent device to obtain the plurality of music tracks.
The electronic equipment firstly determines the data transmission speed of each adjacent device in at least one adjacent device, determines the target adjacent device corresponding to each music track according to the transmission speed, acquires the music track corresponding to each target adjacent device, obtains each music track in the target music list and realizes the acquisition of the music resource.
For example, in one possible scenario, the target music menu includes music track 1, music track 2, and music track 3, and the at least one neighboring device includes neighboring device a and neighboring device B, since the data transmission speed between the electronic device and the neighboring device a is greater than the data transmission speed between the electronic device and the neighboring device B, since it can be determined that two music tracks, such as music track 1 and music track 2, are obtained from the neighboring device a, and one music track, such as music track 3, is obtained from the neighboring device B.
In another possible case, the target music menu includes music track 1, music track 2, music track 3, the at least one neighboring device includes neighboring device a, neighboring device B, neighboring device C, and neighboring device D, and the relationship of the data transfer speed between each neighboring device and the electronic device is detected as: a > B > D > C, the neighboring device C may be in a standby state because it may be determined to retrieve a music track from the neighboring device a, such as music track 1, a music track from the neighboring device B, such as music track 2, and a music track from the neighboring device D, such as music track 3.
In another possible case, the target music menu includes music track 1, music track 2, music track 3, at least one of the neighboring devices includes neighboring device a, neighboring device B, and neighboring device C, it is detected that the data amount of music track 1 is larger than the data amount of music track 2, the data amount of music track 2 is larger than the data amount of music track 3, and the relationship of the data transfer speed between each of the neighboring devices and the electronic device is a > C > B, so it is determined to acquire music track 1 from neighboring device a, acquire music track 2 from neighboring device C, and acquire music track 3 from neighboring device B, which are distance descriptions of the above cases, which are not limited in this case.
In this example, when the music resource is a plurality of music tracks in the target music song list, the target neighboring device corresponding to each music track is determined according to the data transmission speed between each neighboring device in the at least one neighboring device and the electronic device, and the corresponding music track is obtained from the target neighboring device, so that different music tracks in the target music song list can be obtained from the at least one neighboring device at the same time, and the obtaining efficiency is improved.
In one possible example, the music resource is a target music track; the simultaneously acquiring the music resource from the at least one neighboring device comprises: determining a data transmission speed of the electronic device and the at least one neighboring device; splitting the target music track according to the data transmission speed to obtain multiple pieces of music data, wherein each piece of music data corresponds to one adjacent device; and acquiring the plurality of pieces of music data from the at least one device to obtain the target music track.
When the music resource is a target music track, namely the target music track is only a music track, but the electronic device acquires the data transmission speed of each adjacent device in at least one adjacent device, splits the target music track according to the data transmission speed, splits the target music track into multiple sections with different sizes to obtain multiple pieces of music data, marks each piece of music data, enables each piece of music data to correspond to one adjacent device, acquires multiple pieces of music data from at least one device at the same time when the data transmission speed of the electronic device is high and the data volume of the music data is large, and integrates the acquired multiple pieces of music data to obtain a complete target music track.
For example, the electronic device obtains a target music track from 3 neighboring devices, splits the target music track into three segments, the total data volume is 6 megabits, the size of three split music data is 3 megabits, 2 megabits and 1 megabits respectively, marks each music data, and the relationship of data transmission speeds in the three neighboring devices is: a > B > C, therefore, the electronic equipment acquires 3 million of music data from the adjacent equipment A, 2 million of music data from the adjacent equipment B and 1 million of music data from the adjacent equipment C, and the electronic equipment integrates the acquired 3 pieces of music data according to the mark of each piece of music data to acquire a complete target music track.
It can be seen that, in this example, when it is detected that the music resource that needs to be acquired by the electronic device is a target music track, the target music track may be split according to the data transmission speed of the electronic device and the at least one neighboring device, and multiple pieces of music data are acquired from different neighboring devices, so that the target music track may be acquired from multiple neighboring devices at the same time, which is beneficial to increasing the download speed of the target music track.
In one possible example, the sending of the music resource acquisition request to the plurality of nearby devices includes: acquiring a connection record between the adjacent equipment and the electronic equipment in the adjacent perception network; determining an affinity value between the proximity device and the electronic device from the connection record; and sending the music resource acquisition request to a plurality of adjacent devices of which the affinity values are greater than a preset threshold value.
When the electronic device sends a music resource acquisition request to a plurality of adjacent devices in a plurality of NANs, the electronic device may acquire connection records between the plurality of adjacent devices in the NANs and the electronic device, determine affinity values between the adjacent devices and the electronic device according to the connection records, the connection records include records of whether the adjacent devices are connected with the electronic device and perform data transmission, and connection times, and the electronic device may select the plurality of adjacent devices whose affinity values are greater than a preset threshold value and send the music resource acquisition request to the plurality of adjacent devices.
As can be seen, in this example, the electronic device may obtain affinity values between the plurality of neighboring devices in the NAN and select the plurality of neighboring devices having affinity values greater than a preset threshold, so that the music resource acquisition request may be sent to the plurality of neighboring devices, and since the affinity values between the plurality of neighboring devices and the electronic device are higher, the plurality of neighboring devices are reliable and secure neighboring devices, which is beneficial to improving the security and reliability of the output transmission process.
In one possible example, the receiving feedback information sent from the plurality of neighboring devices includes: determining distances and data transmission speeds between the electronic device and the plurality of neighboring devices; and receiving feedback information sent by the plurality of adjacent devices when the adjacent devices with the distance within the preset range and the data transmission speed higher than the preset speed are detected.
The electronic device can acquire the distance between the electronic device and the plurality of adjacent devices and the data transmission speed, and when the distance between the electronic device and the adjacent devices is detected to be within a preset range and the output transmission speed is higher than the preset speed, the feedback information sent by the plurality of adjacent devices is received, so that the adjacent devices sending the feedback information are screened, and the data transmission efficiency is improved.
As can be seen, in this example, the distance between the neighboring device that sends the feedback information and the electronic device is within the preset range, and the data transmission speed between the electronic device and the neighboring device is greater than the preset speed, so that the stability of the communication connection between the electronic device and the neighboring device can be ensured, which is beneficial to improving the reliability of data transmission in the data transmission process.
In one possible example, after the music resource is acquired from at least one neighboring device according to the feedback information, the method further includes: updating a local music song list of the electronic equipment according to the music resource; sharing the updated local music song list to neighboring devices in the neighbor awareness network.
After the electronic equipment acquires the music resource from at least one piece of adjacent equipment, the local music resource library can be updated according to the music resource to obtain an updated music song list, and meanwhile, the electronic equipment can share the music song list of the electronic equipment to the adjacent equipment in the NAN, so that other adjacent equipment can view the music song list of the electronic equipment.
As can be seen, in this example, after the electronic device acquires the music resource, the electronic device may update the local music song list according to the music resource, and since the electronic device is also a neighboring device with respect to other neighboring devices in the NAN, the electronic device shares the song list with the other neighboring devices in the NAN, which is beneficial for the other neighboring devices to view the song list, so that a music resource acquisition request may be sent to the electronic device, and music resource sharing is achieved.
Referring to fig. 3, fig. 3 is a flowchart illustrating a resource sharing method according to an embodiment of the present application, and the method is applied to an electronic device, where the electronic device and a plurality of neighboring devices establish a neighbor aware network NAN connection. As shown in the figure, the resource sharing method includes:
s301, the electronic device sends music resource acquisition requests to the plurality of nearby devices, wherein the acquisition requests include identification information of the electronic device.
S302, the electronic device determines the distances between the electronic device and the plurality of adjacent devices and the data transmission speed.
S303, when detecting a neighboring device whose distance is within a preset range and whose data transmission speed is greater than a preset speed, the electronic device receives feedback information sent from the multiple neighboring devices, where the feedback information includes identification information of the neighboring device and related information of the music resource.
S304, the electronic equipment acquires the music resource from at least one of the plurality of adjacent equipment according to the feedback information.
It can be seen that, in this embodiment of the present application, an electronic device first sends a music resource acquisition request to the multiple nearby devices, where the acquisition request includes identification information of the electronic device, then receives feedback information from the multiple nearby devices, where the feedback information includes identification information of the nearby devices and information related to the music resource, and finally acquires the music resource from at least one of the multiple nearby devices according to the feedback information. The electronic equipment can send music resource acquisition requests to the plurality of adjacent equipment in the adjacent perception network, and determines at least one adjacent equipment in the plurality of adjacent equipment, which stores the music resource, according to the feedback information sent by the plurality of adjacent equipment, so that the music resource can be acquired from the at least one adjacent equipment at the same time, and the efficiency and the safety of acquiring the music resource are improved.
In addition, the distance between the adjacent equipment for sending the feedback information and the electronic equipment is within a preset range, and the data transmission speed between the adjacent equipment and the electronic equipment is greater than the preset speed, so that the stability of communication connection between the electronic equipment and the adjacent equipment can be ensured, and the reliability of data transmission in the data transmission process can be improved.
Referring to fig. 4, fig. 4 is a flowchart illustrating a resource sharing method according to an embodiment of the present application, and the method is applied to an electronic device, where the electronic device and a plurality of neighboring devices establish a neighbor aware network NAN connection. As shown in the figure, the resource sharing method includes:
s401, the electronic device sends music resource acquisition requests to the plurality of nearby devices, wherein the acquisition requests include identification information of the electronic device.
S402, the electronic equipment determines the distances between the electronic equipment and the plurality of adjacent equipment and the data transmission speed.
S403, when detecting a neighboring device whose distance is within a preset range and whose data transmission speed is greater than a preset speed, the electronic device receives feedback information sent from the multiple neighboring devices, where the feedback information includes identification information of the neighboring device and related information of the music resource.
S404, the electronic device determines at least one adjacent device, in the plurality of adjacent devices, storing the music resource according to the related information of the music resource in the feedback information.
S405, the electronic equipment simultaneously acquires the music resources from the at least one adjacent equipment.
It can be seen that, in this embodiment of the present application, an electronic device first sends a music resource acquisition request to the multiple nearby devices, where the acquisition request includes identification information of the electronic device, then receives feedback information from the multiple nearby devices, where the feedback information includes identification information of the nearby devices and information related to the music resource, and finally acquires the music resource from at least one of the multiple nearby devices according to the feedback information. The electronic equipment can send music resource acquisition requests to the plurality of adjacent equipment in the adjacent perception network, and determines at least one adjacent equipment in the plurality of adjacent equipment, which stores the music resource, according to the feedback information sent by the plurality of adjacent equipment, so that the music resource can be acquired from the at least one adjacent equipment at the same time, and the efficiency and the safety of acquiring the music resource are improved.
In addition, the distance between the adjacent equipment for sending the feedback information and the electronic equipment is within a preset range, and the data transmission speed between the adjacent equipment and the electronic equipment is greater than the preset speed, so that the stability of communication connection between the electronic equipment and the adjacent equipment can be ensured, and the reliability of data transmission in the data transmission process can be improved.
In addition, according to the feedback information sent by the plurality of adjacent devices, which adjacent devices in the adjacent devices have the music resource and which adjacent devices do not have the music resource are determined, and at least one adjacent device having the music resource is selected to execute the music resource acquisition from the at least one adjacent device in parallel, which is beneficial to improving the efficiency of music resource acquisition.
Consistent with the embodiments shown in fig. 2, fig. 3, and fig. 4, please refer to fig. 5, fig. 5 is a schematic structural diagram of an electronic device 500 provided in the embodiments of the present application, where the electronic device 500 runs one or more application programs and an operating system, as shown in the figure, the electronic device 500 includes a processor 510, a memory 520, a communication interface 530, and one or more programs 521, where the one or more programs 521 are stored in the memory 520 and configured to be executed by the processor 510, and the one or more programs 521 include instructions for performing the following steps;
sending music resource acquisition requests to the plurality of nearby devices, wherein the acquisition requests comprise identification information of the electronic devices;
receiving feedback information from the plurality of neighboring devices, wherein the feedback information comprises identification information of the neighboring devices and related information of the music resource;
and acquiring the music resource from at least one of the plurality of adjacent devices according to the feedback information.
It can be seen that, in this embodiment of the present application, an electronic device first sends a music resource acquisition request to the multiple nearby devices, where the acquisition request includes identification information of the electronic device, then receives feedback information from the multiple nearby devices, where the feedback information includes identification information of the nearby devices and information related to the music resource, and finally acquires the music resource from at least one of the multiple nearby devices according to the feedback information. The electronic equipment can send music resource acquisition requests to the plurality of adjacent equipment in the adjacent perception network, and determines at least one adjacent equipment in the plurality of adjacent equipment, which stores the music resource, according to the feedback information sent by the plurality of adjacent equipment, so that the music resource can be acquired from the at least one adjacent equipment at the same time, and the efficiency and the safety of acquiring the music resource are improved.
In one possible example, in the aspect of obtaining the music resource from at least one neighboring device according to the feedback information, the instructions in the program are specifically configured to: determining at least one adjacent device which stores the music resource in the plurality of adjacent devices according to the related information of the music resource in the feedback information; the music assets are simultaneously acquired from the at least one proximate device.
In one possible example, the music resource is a target music song, the target music song including a plurality of music tracks; in respect of said simultaneous acquisition of said music resources from said at least one neighbouring device, the instructions in said program are specifically adapted to perform the following operations: determining a data transmission speed of the electronic device and the at least one neighboring device; determining target adjacent equipment corresponding to each music track in the plurality of music tracks according to the data transmission speed, wherein the target adjacent equipment is adjacent equipment in the at least one adjacent equipment; and acquiring the music tracks corresponding to each target adjacent device to obtain the plurality of music tracks.
In one possible example, the music resource is a target music track; in respect of said simultaneous acquisition of said music resources from said at least one neighbouring device, the instructions in said program are specifically adapted to perform the following operations: determining a data transmission speed of the electronic device and the at least one neighboring device; splitting the target music track according to the data transmission speed to obtain multiple pieces of music data, wherein each piece of music data corresponds to one adjacent device; and acquiring the plurality of pieces of music data from the at least one device to obtain the target music track.
In one possible example, in the sending of the music resource acquisition request to the plurality of proximate devices, the instructions in the program are specifically configured to: acquiring a connection record between the adjacent equipment and the electronic equipment in the adjacent perception network; determining an affinity value between the proximity device and the electronic device from the connection record; and sending the music resource acquisition request to a plurality of adjacent devices of which the affinity values are greater than a preset threshold value.
In one possible example, in the aspect of receiving the feedback information sent from the plurality of neighboring devices, the instructions in the program are specifically configured to: determining distances and data transmission speeds between the electronic device and the plurality of neighboring devices; and receiving feedback information sent by the plurality of adjacent devices when the adjacent devices with the distance within the preset range and the data transmission speed higher than the preset speed are detected.
In a possible example, after the music resource is acquired from at least one neighboring device according to the feedback information, the instructions in the program are specifically configured to: updating a local music song list of the electronic equipment according to the music resource; sharing the updated local music song list to neighboring devices in the neighbor awareness network.
The above embodiments mainly introduce the scheme of the embodiments of the present application from the perspective of the method-side implementation process. It is understood that the electronic device comprises corresponding hardware structures and/or software modules for performing the respective functions in order to realize the above-mentioned functions. Those of skill in the art would readily appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as hardware or combinations of hardware and computer software. Whether a function is performed as hardware or computer software drives hardware depends upon the particular application and design constraints imposed on the solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
In the embodiment of the present application, the electronic device may be divided into the functional units according to the method example, for example, each functional unit may be divided corresponding to each function, or two or more functions may be integrated into one processing unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit. It should be noted that the division of the unit in the embodiment of the present application is schematic, and is only a logic function division, and there may be another division manner in actual implementation.
The following is an embodiment of the apparatus of the present invention, which is used to perform the method implemented by the embodiment of the method of the present invention. The resource sharing apparatus 600 shown in fig. 6 is applied to the electronic device, the electronic device includes a microphone, the resource sharing apparatus includes a transmitting unit 601, a receiving unit 602 and a processing unit 603, wherein,
the sending unit 601 is configured to send a music resource acquisition request to the multiple nearby devices, where the acquisition request includes identification information of the electronic device;
the receiving unit 602 is configured to receive feedback information from the multiple neighboring devices, where the feedback information includes identification information of the neighboring devices and related information of the music resource;
the processing unit 603 is configured to obtain the music resource from at least one of the plurality of neighboring devices according to the feedback information.
The resource sharing apparatus may further include a storage unit 604 for storing program codes and data of the electronic device. The transmitting unit 601, the receiving unit 602, and the processing unit 603 may be processors, and the storage unit 604 may be a memory.
It can be seen that, in this embodiment of the present application, an electronic device first sends a music resource acquisition request to the multiple nearby devices, where the acquisition request includes identification information of the electronic device, then receives feedback information from the multiple nearby devices, where the feedback information includes identification information of the nearby devices and information related to the music resource, and finally acquires the music resource from at least one of the multiple nearby devices according to the feedback information. The electronic equipment can send music resource acquisition requests to the plurality of adjacent equipment in the adjacent perception network, and determines at least one adjacent equipment in the plurality of adjacent equipment, which stores the music resource, according to the feedback information sent by the plurality of adjacent equipment, so that the music resource can be acquired from the at least one adjacent equipment at the same time, and the efficiency and the safety of acquiring the music resource are improved.
In one possible example, in terms of the acquiring the music resource from at least one neighboring device according to the feedback information, the processing unit 603 is specifically configured to: determining at least one adjacent device which stores the music resource in the plurality of adjacent devices according to the related information of the music resource in the feedback information; and for simultaneously acquiring the music assets from the at least one proximate device.
In one possible example, the music resource is a target music song, the target music song including a plurality of music tracks; in respect to said obtaining the music resource from the at least one neighboring device simultaneously, the processing unit 603 is specifically configured to: determining a data transmission speed of the electronic device and the at least one neighboring device; the target adjacent device corresponding to each music track in the plurality of music tracks is determined according to the data transmission speed, and the target adjacent device is an adjacent device in the at least one adjacent device; and the music tracks are used for acquiring the music tracks corresponding to each target adjacent device to obtain the plurality of music tracks.
In one possible example, the music resource is a target music track; in respect to said obtaining the music resource from the at least one neighboring device simultaneously, the processing unit 603 is specifically configured to: determining a data transmission speed of the electronic device and the at least one neighboring device; the data transmission device is used for splitting the target music track according to the data transmission speed to obtain a plurality of pieces of music data, and each piece of music data corresponds to one adjacent device; and the music data acquisition module is used for acquiring the plurality of pieces of music data from the at least one device to obtain the target music track.
In one possible example, in terms of the sending of the music resource acquisition request to the multiple nearby devices, the sending unit 601 is specifically configured to: acquiring a connection record between the adjacent equipment and the electronic equipment in the adjacent perception network; and means for determining an affinity value between the proximity device and the electronic device from the connection record; and the server is used for sending the music resource acquisition request to a plurality of adjacent devices of which the affinity values are greater than a preset threshold value.
In one possible example, in terms of the receiving feedback information sent from the multiple neighboring devices, the receiving unit 602 is specifically configured to: determining distances and data transmission speeds between the electronic device and the plurality of neighboring devices; and the data transmission device is used for receiving feedback information sent by the plurality of adjacent devices when the adjacent devices with the distance within the preset range and the data transmission speed greater than the preset speed are detected.
In a possible example, after the music resource is acquired from at least one neighboring device according to the feedback information, the processing unit 603 is further configured to: updating a local music song list of the electronic equipment according to the music resource; and means for sharing the updated local music song list to a neighboring device in the proximity-aware network.
Embodiments of the present application also provide a computer storage medium, where the computer storage medium stores a computer program for electronic data exchange, the computer program enabling a computer to execute part or all of the steps of any one of the methods described in the above method embodiments, and the computer includes an electronic device.
Embodiments of the present application also provide a computer program product comprising a non-transitory computer readable storage medium storing a computer program operable to cause a computer to perform some or all of the steps of any of the methods as described in the above method embodiments. The computer program product may be a software installation package, the computer comprising an electronic device.
It should be noted that, for simplicity of description, the above-mentioned method embodiments are described as a series of acts or combination of acts, but those skilled in the art will recognize that the present application is not limited by the order of acts described, as some steps may occur in other orders or concurrently depending on the application. Further, those skilled in the art should also appreciate that the embodiments described in the specification are preferred embodiments and that the acts and modules referred to are not necessarily required in this application.
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.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus may be implemented in other manners. For example, the above-described embodiments of the apparatus are merely illustrative, and for example, the above-described division of the units is only one type of division of logical functions, and other divisions may be realized in practice, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection of some interfaces, devices or units, and may be an electric or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated unit may be stored in a computer readable memory if it is implemented in the form of a software functional unit and sold or used as a stand-alone product. Based on such understanding, the technical solution of the present application may be substantially implemented or a part of or all or part of the technical solution contributing to the prior art may be embodied in the form of a software product stored in a memory, and including several instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the above-mentioned method of the embodiments of the present application. And the aforementioned memory comprises: a U-disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a removable hard disk, a magnetic or optical disk, and other various media capable of storing program codes.
Those skilled in the art will appreciate that all or part of the steps in the methods of the above embodiments may be implemented by associated hardware instructed by a program, which may be stored in a computer-readable memory, which may include: flash Memory disks, Read-Only memories (ROMs), Random Access Memories (RAMs), magnetic or optical disks, and the like.
The foregoing detailed description of the embodiments of the present application has been presented to illustrate the principles and implementations of the present application, and the above description of the embodiments is only provided to help understand the method and the core concept of the present application; meanwhile, for a person 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 (9)

1. A resource sharing method is applied to an electronic device, the electronic device and a plurality of adjacent devices are connected through a Neighbor Awareness Network (NAN), and the method comprises the following steps:
sending music resource acquisition requests to the plurality of adjacent devices, wherein the acquisition requests comprise identification information of the electronic device;
receiving feedback information from the plurality of neighboring devices, wherein the feedback information comprises identification information of the neighboring devices and related information of the music resource;
determining at least one adjacent device which stores the music resource in the plurality of adjacent devices according to the related information of the music resource in the feedback information;
the music assets are simultaneously acquired from the at least one proximate device.
2. The method of claim 1, wherein the music resource is a target music song, the target music song comprising a plurality of music tracks; the simultaneously acquiring the music resource from the at least one neighboring device comprises:
determining a data transmission speed of the electronic device and the at least one neighboring device;
determining target adjacent equipment corresponding to each music track in the plurality of music tracks according to the data transmission speed, wherein the target adjacent equipment is adjacent equipment in the at least one adjacent equipment;
and acquiring the music tracks corresponding to each target adjacent device to obtain the plurality of music tracks.
3. The method of claim 1, wherein the music resource is a target music track; the simultaneously acquiring the music resource from the at least one neighboring device comprises:
determining a data transmission speed of the electronic device and the at least one neighboring device;
splitting the target music track according to the data transmission speed to obtain multiple pieces of music data, wherein each piece of music data corresponds to one adjacent device;
and acquiring the plurality of pieces of music data from the at least one device to obtain the target music track.
4. The method of claim 1, wherein the sending music resource acquisition requests to the plurality of neighboring devices comprises:
acquiring a connection record between the adjacent equipment and the electronic equipment in the adjacent perception network;
determining an affinity value between the proximity device and the electronic device from the connection record;
and sending the music resource acquisition request to a plurality of adjacent devices of which the affinity values are greater than a preset threshold value.
5. The method of claim 1, wherein the receiving feedback information sent from the plurality of neighboring devices comprises:
determining distances and data transmission speeds between the electronic device and the plurality of neighboring devices;
and receiving feedback information sent by the plurality of adjacent devices when the adjacent devices with the distance within the preset range and the data transmission speed higher than the preset speed are detected.
6. The method according to any one of claims 1-5, wherein after the music resource is obtained from at least one neighboring device according to the feedback information, the method further comprises:
updating a local music song list of the electronic equipment according to the music resource;
sharing the updated local music song list to neighboring devices in the neighbor awareness network.
7. A resource sharing apparatus applied to an electronic device, the electronic device and a plurality of neighboring devices establishing a Neighbor Awareness Network (NAN) connection, the resource sharing apparatus comprising a transmitting unit, a receiving unit and a processing unit, wherein,
the sending unit is configured to send a music resource acquisition request to the plurality of neighboring devices, where the acquisition request includes identification information of the electronic device;
the receiving unit is configured to receive feedback information from the plurality of neighboring devices, where the feedback information includes identification information of the neighboring devices and related information of the music resource;
the processing unit is configured to acquire the music resource from at least one of the plurality of neighboring devices according to the feedback information, wherein the processing unit is further configured to determine at least one of the plurality of neighboring devices that stores the music resource according to the information related to the music resource in the feedback information, and acquire the music resource from the at least one neighboring device at the same time.
8. An electronic device comprising a processor, a memory, a communication interface coupled to the processor and the memory, respectively, and one or more programs stored in the memory and configured to be executed by the processor, the programs for performing the steps in the method of any of claims 1-6.
9. A computer-readable storage medium, characterized in that a computer program for electronic data exchange is stored, wherein the computer program causes a computer to perform the method according to any one of claims 1-6.
CN201810896925.7A 2018-08-08 2018-08-08 Resource sharing method, device, equipment and storage medium Active CN109275125B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810896925.7A CN109275125B (en) 2018-08-08 2018-08-08 Resource sharing method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810896925.7A CN109275125B (en) 2018-08-08 2018-08-08 Resource sharing method, device, equipment and storage medium

Publications (2)

Publication Number Publication Date
CN109275125A CN109275125A (en) 2019-01-25
CN109275125B true CN109275125B (en) 2021-04-09

Family

ID=65153204

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810896925.7A Active CN109275125B (en) 2018-08-08 2018-08-08 Resource sharing method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN109275125B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110049531B (en) * 2019-04-22 2021-05-04 Oppo广东移动通信有限公司 Network resource sharing method and related device
CN113194197A (en) * 2021-04-27 2021-07-30 深圳传音控股股份有限公司 Interaction method, terminal and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104737560A (en) * 2012-10-19 2015-06-24 索尼公司 Communication apparatus, service providing apparatus, server and storage medium
CN106465092A (en) * 2014-06-02 2017-02-22 高通股份有限公司 Peer discovery in neighbor awareness networking (nan) aided data link networks
CN106507437A (en) * 2016-11-08 2017-03-15 北京小米移动软件有限公司 Smart machine networking method and device
CN106982423A (en) * 2016-01-19 2017-07-25 佳能株式会社 Communicator and control method
CN108029075A (en) * 2015-07-02 2018-05-11 高通股份有限公司 Service discovery and topology management

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104737560A (en) * 2012-10-19 2015-06-24 索尼公司 Communication apparatus, service providing apparatus, server and storage medium
CN106465092A (en) * 2014-06-02 2017-02-22 高通股份有限公司 Peer discovery in neighbor awareness networking (nan) aided data link networks
CN108029075A (en) * 2015-07-02 2018-05-11 高通股份有限公司 Service discovery and topology management
CN106982423A (en) * 2016-01-19 2017-07-25 佳能株式会社 Communicator and control method
CN106507437A (en) * 2016-11-08 2017-03-15 北京小米移动软件有限公司 Smart machine networking method and device

Also Published As

Publication number Publication date
CN109275125A (en) 2019-01-25

Similar Documents

Publication Publication Date Title
JP7184922B2 (en) Method, Apparatus, and System for Configuring Policy for UE
CN101208932B (en) System and method for updating wireless applications
CN109040213B (en) File downloading method and related product
CN109743783B (en) Data transmission control method and related product
CN104838696A (en) System and method for network selection
CN108781473B (en) Method and equipment for sharing files among different terminals
CN112119673B (en) Electronic device supporting multiple wireless communication protocols and method thereof
KR20160138170A (en) System and method to enhance the user experience of applications for proximity-based peer-to-peer mobile computing
US11889568B2 (en) Systems and methods for paging over WiFi for mobile terminating calls
JP2020512734A (en) Communication method and communication device
US20190335343A1 (en) Systems and methods for identifying a cell type and cell communication capabilities from cellular broadcast data
CN109275125B (en) Resource sharing method, device, equipment and storage medium
CN107950005B (en) Service element host selection
CN105530684A (en) Method, device and system for network access
US9386411B2 (en) Radio access system, controlling apparatus, and terminal apparatus
CN113949705B (en) Communication method and communication device
WO2014187601A1 (en) Device to device communication
CN108990039B (en) Data transmission method and related device
EP2842356B1 (en) Updating subscription information
CN109168158B (en) Resource downloading method and related device
CN105978789B (en) Message pushing system and method
CN105722192B (en) Network connection method, electronic equipment and system
US10003659B2 (en) Efficient group communications leveraging LTE-D discovery for application layer contextual communication
CN114258102A (en) Method, device, terminal equipment and network equipment for transmitting service data
JP2016184817A (en) Terminal device, communication session establishment method, and program

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