Summary of the invention
The embodiment of the present application provides a kind of resource sharing method, device and electronic equipment, right in the prior art to solve
In the solution of scene that more people scan the two-dimensional code simultaneously not enough optimizes the problem of.
In order to solve the above technical problems, the embodiment of the present application is achieved in that
In a first aspect, proposing a kind of resource sharing method, the method is applied to first terminal, which comprises
Broadcast data is obtained, includes terminal iidentification and resource identification in the broadcast data;
Second terminal corresponding with the terminal iidentification establishes connection;
Receive resource content corresponding with the resource identification.
Second aspect, proposes a kind of resource sharing method, and the method is applied to second terminal, which comprises
Broadcast data is sent, includes the terminal iidentification and resource identification of the second terminal in the broadcast data;
The connection request for receiving first terminal, establishes connection with the first terminal;
Resource content corresponding with the resource identification is sent to the first terminal.
The third aspect proposes a kind of resource sharing device, comprising:
Acquiring unit obtains broadcast data, includes terminal iidentification and resource identification in the broadcast data;
Connection unit, second terminal corresponding with the terminal iidentification establish connection;
Receiving unit receives resource content corresponding with the resource identification.
Fourth aspect proposes a kind of resource sharing device, comprising:
First transmission unit sends broadcast data, include in the broadcast data second terminal terminal iidentification and
Resource identification;
Receiving unit receives the connection request of first terminal, establishes connection with the first terminal;
Second transmission unit sends resource content corresponding with the resource identification to the first terminal.
5th aspect, proposes a kind of electronic equipment, which includes:
Processor;And
It is arranged to the memory of storage computer executable instructions, the executable instruction makes the place when executed
It manages device and executes following operation:
Broadcast data is obtained, includes terminal iidentification and resource identification in the broadcast data;
Second terminal corresponding with the terminal iidentification establishes connection;
Receive resource content corresponding with the resource identification.
6th aspect, proposes a kind of computer readable storage medium, the computer-readable recording medium storage one
Or multiple programs, one or more of programs are when the electronic equipment for being included multiple application programs executes, so that the electricity
Sub- equipment executes following operation:
Broadcast data is obtained, includes terminal iidentification and resource identification in the broadcast data;
Second terminal corresponding with the terminal iidentification establishes connection;
Receive resource content corresponding with the resource identification.
7th aspect, proposes a kind of electronic equipment, which includes:
Processor;And
It is arranged to the memory of storage computer executable instructions, the executable instruction makes the place when executed
It manages device and executes following operation:
Broadcast data is sent, includes the terminal iidentification and resource identification of the second terminal in the broadcast data;
The connection request for receiving first terminal, establishes connection with the first terminal;
Resource content corresponding with the resource identification is sent to the first terminal.
Eighth aspect proposes a kind of computer readable storage medium, the computer-readable recording medium storage one
Or multiple programs, one or more of programs are when the electronic equipment for being included multiple application programs executes, so that the electricity
Sub- equipment executes following operation:
Broadcast data is sent, includes the terminal iidentification and resource identification of the second terminal in the broadcast data;
The connection request for receiving first terminal, establishes connection with the first terminal;
Resource content corresponding with the resource identification is sent to the first terminal.
The embodiment of the present application at least can achieve following technical effects by adopting the above technical scheme:
It when multiple users need to obtain a certain resource simultaneously, for example scans the two-dimensional code, since first terminal can be first
Broadcast data is first obtained, includes terminal iidentification and resource identification in the broadcast data, it then can corresponding with terminal iidentification the
Two terminals establish connection, can finally receive resource content corresponding with resource identification.One in this way in multiple users
User to two dimensional code and after obtaining corresponding two dimensional code code value, can pass through the terminal of the user by terminal device scans
Equipment sends broadcast data, the terminal iidentification of the terminal device including the user and the two dimensional code scanned in the broadcast data
Mark, other users can obtain the broadcast data, and establish connection with the terminal device for sending broadcast data, to obtain
Two dimensional code code value corresponding with the mark of two dimensional code provides greatly so as to avoid waiting in line to scan the two-dimensional code for user
Convenience.
It when multiple users need to obtain a certain resource simultaneously, for example scans the two-dimensional code, since second terminal can be sent out
Broadcast data is sent, includes the terminal iidentification and resource identification of second terminal in the broadcast data, then can receive first terminal
Connection request, establish connection with first terminal, can finally be sent in corresponding with resource identification resource to first terminal
Hold.A user in this way in multiple users pass through terminal device scans to two dimensional code and obtain corresponding two dimensional code code value it
Afterwards, broadcast data can be sent by the terminal device of the user, include the terminal device of the user in the broadcast data
The mark of terminal iidentification and the two dimensional code scanned, other users can obtain the broadcast data, and broadcast number with sending
According to terminal device establish connection, to obtain corresponding with the mark of two dimensional code two dimensional code code value, so as to avoid waiting in line
It scans the two-dimensional code, is provided a great convenience for user.
Specific embodiment
To keep the purposes, technical schemes and advantages of the application clearer, below in conjunction with the application specific embodiment and
Technical scheme is clearly and completely described in corresponding attached drawing.Obviously, described embodiment is only the application one
Section Example, instead of all the embodiments.Based on the embodiment in the application, those of ordinary skill in the art are not doing
Every other embodiment obtained under the premise of creative work out, shall fall in the protection scope of this application.
Below in conjunction with attached drawing, the technical scheme provided by various embodiments of the present application will be described in detail.
To solve a kind of resource sharing method, device and electronic equipment, to solve in the prior art to sweep more people simultaneously
The problem of solution of the scene of two dimensional code not enough optimizes is retouched, this specification embodiment provides a kind of resource sharing method.This
The executing subject for the resource sharing method that specification embodiment provides can be, but not limited to mobile phone, tablet computer, PC etc.
It can be configured as executing at least one of this method user terminal provided in an embodiment of the present invention, alternatively, this method is held
Row main body, can also be and be able to carry out client of this method itself.
For ease of description, hereafter executing subject in this way is to be able to carry out for the terminal device of this method, to this
The embodiment of method is introduced.It is appreciated that it is that one kind is illustratively said that the executing subject of this method, which is terminal device,
It is bright, it is not construed as the restriction to this method.
Specifically, a kind of implementation process schematic diagram for resource sharing method that this specification one or more embodiment provides
As shown in Figure 1, this method is applied to first terminal, comprising:
Step 110, broadcast data is obtained, includes terminal iidentification and resource identification in broadcast data;
By taking multiple users flock together the scene that scans the two-dimensional code as an example, in order to avoid apart from two dimensional code user farther out
It is difficult to the problem of scanning two dimensional code, the embodiment of the present invention can be to outgoing using the version of bluetooth 4.0 or 4.0 or more bluetooth
The function of broadcast data is sent, to solve the above problems.Optionally, broadcast data is obtained, comprising: lead to firstly, bluetooth is opened in search
The terminal device of letter;Then, if searching the second terminal of broadcast resource, the broadcast data of second terminal is obtained, the broadcast
It include the terminal iidentification and resource identification of second terminal in data.
It should be understood that first terminal before obtaining broadcast data, should open function of Bluetooth communication, and scan neighbouring unlatching
The terminal device (i.e. bluetooth equipment) of Bluetooth communication, scanning near bluetooth equipment when, apart from first terminal preset range
Bluetooth equipment can be shown in first terminal in the form of a list.It not only will include the terminal mark of each bluetooth equipment in the list
Know, the resource identification that can be also broadcasted comprising the bluetooth equipment of broadcast resource, user can be obtained by checking search result
The resource identification of the terminal iidentification of the bluetooth equipment of broadcast resource and its broadcast.
Step 120, second terminal corresponding with terminal iidentification establishes connection;
It should be understood that obtain resource content corresponding to the resource identification for including in second terminal broadcast data, then it can be with
Second terminal corresponding with terminal iidentification establishes connection, to obtain the corresponding resource content of resource identification.Optionally, with terminal mark
Know corresponding second terminal establish connection can with firstly, to second terminal corresponding with terminal iidentification send Bluetooth connection request;
Then, bluetooth connection is established with second terminal.Wherein, after sending Bluetooth connection request to second terminal, second terminal can
With in response to the Bluetooth connection request, to establish bluetooth connection with first terminal.
Step 130, resource content corresponding with resource identification is received.
Optionally, resource content corresponding with resource identification is received, Bluetooth communication reception and resource specifically can be then passed through
Identify corresponding resource content.By taking resource is two dimensional code as an example, then it can receive two dimensional code code value corresponding with two dimensional code mark.
Below by taking Fig. 2 as an example, describe in detail to resource sharing method provided in an embodiment of the present invention.Such as
Shown in Fig. 2, the flow diagram in actual scene is applied for resource sharing method provided in an embodiment of the present invention,
The scene is the scene that more people scan the two-dimensional code simultaneously, including user A mobile phone and user's B mobile phone, and wherein user A mobile phone is this
The terminal device of two dimensional code is arrived in scanning in scape, and user's B mobile phone is to be scanned farther out and not apart from two-dimension code image to two dimension
The terminal device of code.That is, Fig. 2 is that user A mobile phone analyzes the two dimensional code scanned to the scene signal of user's B mobile phone
Figure, including following key steps:
Step 211, user A mobile phone open scans application program, scans the two-dimensional code;
Step 212, user A mobile phone opens bluetooth, is sent out broadcast data, includes user A mobile phone in the broadcast data
Terminal iidentification and two dimensional code mark;
Step 213, user B mobile phone opens bluetooth, searches for neighbouring bluetooth equipment;
Step 214, bluetooth equipment of the user B mobile phone searching to transmission broadcast data;
User B mobile phone can check whether that other terminal devices are sharing two dimension by the bluetooth equipment near searching for
Code, after searching the bluetooth equipment for sending broadcast data, the terminal iidentification that includes in the available broadcast data and
Two dimensional code mark.
Step 215, user B mobile phone initiates bluetooth connection to the bluetooth equipment for sending broadcast data;
User B mobile phone sends blue to terminal device (i.e. bluetooth equipment) corresponding with the terminal iidentification for including in broadcast data
Tooth connection request.
Step 216, user A mobile phone receives the Bluetooth connection request that user B mobile phone is sent, and asks in response to the bluetooth connection
It asks, establishes bluetooth connection with user's B mobile phone;
Step 217, user A mobile phone sends two dimensional code code value to user's B mobile phone;
Step 218, user B mobile phone receives two dimensional code code value;
Step 219, after user's B mobile phone gets two dimensional code code value, to improve information security, user's B mobile phone can
To disconnect the bluetooth connection with user A mobile phone.
It when multiple users need to obtain a certain resource simultaneously, for example scans the two-dimensional code, since first terminal can be first
Broadcast data is first obtained, includes terminal iidentification and resource identification in the broadcast data, it then can corresponding with terminal iidentification the
Two terminals establish connection, can finally receive resource content corresponding with resource identification.One in this way in multiple users
User to two dimensional code and after obtaining corresponding two dimensional code code value, can pass through the terminal of the user by terminal device scans
Equipment sends broadcast data, the terminal iidentification of the terminal device including the user and the two dimensional code scanned in the broadcast data
Mark, other users can obtain the broadcast data, and establish connection with the terminal device for sending broadcast data, to obtain
Two dimensional code code value corresponding with the mark of two dimensional code provides greatly so as to avoid waiting in line to scan the two-dimensional code for user
Convenience.
Fig. 3 is the implementation process schematic diagram for another resource sharing method that one embodiment of this specification provides.Such as
Shown in Fig. 3, including following key steps:
Step 310, broadcast data is sent, includes the terminal iidentification and resource identification of second terminal in the broadcast data;
Optionally, broadcast data is sent, specifically broadcast data can be sent by Bluetooth communication.It should be understood that passing through bluetooth
After communication sends broadcast data, other terminal devices apart from second terminal preset range open function of Bluetooth communication it
Afterwards, the broadcast data can be received, and can get the second terminal for including in the broadcast data terminal iidentification and
Resource identification.
Step 320, the connection request of first terminal is received;
Optionally, the connection request of first terminal is received, it specifically can be firstly, the bluetooth connection for receiving first terminal be asked
It asks;Then, in response to the Bluetooth connection request of first terminal, bluetooth connection is established with first terminal.
Step 330, resource content corresponding with resource identification is sent to first terminal.
The specific implementation of embodiment illustrated in fig. 3 correlation step can refer to the specific of step corresponding in embodiment illustrated in fig. 1
It realizes, details are not described herein for this specification one or more embodiment.
It when multiple users need to obtain a certain resource simultaneously, for example scans the two-dimensional code, since second terminal can be sent out
Broadcast data is sent, includes the terminal iidentification and resource identification of second terminal in the broadcast data, then can receive first terminal
Connection request, establish connection with first terminal, can finally be sent in corresponding with resource identification resource to first terminal
Hold.A user in this way in multiple users pass through terminal device scans to two dimensional code and obtain corresponding two dimensional code code value it
Afterwards, broadcast data can be sent by the terminal device of the user, include the terminal device of the user in the broadcast data
The mark of terminal iidentification and the two dimensional code scanned, other users can obtain the broadcast data, and broadcast number with sending
According to terminal device establish connection, to obtain corresponding with the mark of two dimensional code two dimensional code code value, so as to avoid waiting in line
It scans the two-dimensional code, is provided a great convenience for user.
Fig. 4 is the structural schematic diagram for the resource sharing device 400 that this specification provides.Referring to FIG. 4, real in a kind of software
It applies in mode, resource sharing device 400 may include acquiring unit 401, connection unit 402, in which:
Acquiring unit 401 obtains broadcast data, includes terminal iidentification and resource identification in the broadcast data;
Connection unit 402, second terminal corresponding with the terminal iidentification establish connection;
Receiving unit 403 receives resource content corresponding with the resource identification.
Optionally, in one embodiment, the acquiring unit 401,
The terminal device of Bluetooth communication is opened in search;
If searching the second terminal of broadcast resource, the broadcast data of the second terminal, the broadcast data are obtained
In include the second terminal terminal iidentification and resource identification.
Optionally, in one embodiment, the connection unit 402,
Bluetooth connection request is sent to second terminal corresponding with the terminal iidentification;
Bluetooth connection is established with the second terminal.
Optionally, in one embodiment, the resource includes two dimensional code.
The method that resource sharing device 400 can be realized the embodiment of the method for FIG. 1 to FIG. 2 specifically refers to real shown in Fig. 1
The resource sharing method for applying example, repeats no more.
Fig. 5 is the structural schematic diagram for the resource sharing device 500 that this specification provides.Referring to FIG. 5, real in a kind of software
It applies in mode, resource sharing device 500 may include the first transmission unit 501, receiving unit 502 and the second transmission unit 503,
In:
First transmission unit 501, sends broadcast data, includes the terminal iidentification of the second terminal in the broadcast data
And resource identification;
Receiving unit 502 receives the connection request of first terminal;
Second transmission unit 503 sends resource content corresponding with the resource identification to the first terminal.
Optionally, in one embodiment, first transmission unit 501,
Broadcast data is sent by Bluetooth communication.
Optionally, in one embodiment, the receiving unit 502, is used for:
Receive the Bluetooth connection request of the first terminal;
In response to the Bluetooth connection request of the first terminal, bluetooth connection is established with the first terminal.
Optionally, in one embodiment, the resource includes two dimensional code.
The method that resource sharing device 500 can be realized the embodiment of the method for Fig. 3, specifically refers to embodiment illustrated in fig. 3
Resource sharing method, repeat no more.
Fig. 6 is the structural schematic diagram for the electronic equipment that one embodiment of this specification provides.Referring to FIG. 6, in hardware
Level, the electronic equipment include processor, optionally further comprising internal bus, network interface, memory.Wherein, memory can
It can include memory, such as high-speed random access memory (Random-Access Memory, RAM), it is also possible to further include non-easy
The property lost memory (non-volatile memory), for example, at least 1 magnetic disk storage etc..Certainly, which is also possible to
Including hardware required for other business.
Processor, network interface and memory can be connected with each other by internal bus, which can be ISA
(Industry Standard Architecture, industry standard architecture) bus, PCI (Peripheral
Component Interconnect, Peripheral Component Interconnect standard) bus or EISA (Extended Industry Standard
Architecture, expanding the industrial standard structure) bus etc..The bus can be divided into address bus, data/address bus, control always
Line etc..Only to be indicated with a four-headed arrow in Fig. 6, it is not intended that an only bus or a type of convenient for indicating
Bus.
Memory, for storing program.Specifically, program may include program code, and said program code includes calculating
Machine operational order.Memory may include memory and nonvolatile memory, and provide instruction and data to processor.
Processor is from the then operation into memory of corresponding computer program is read in nonvolatile memory, in logical layer
Resource sharing device is formed on face.Processor executes the program that memory is stored, and is specifically used for executing following operation:
Broadcast data is obtained, includes terminal iidentification and resource identification in the broadcast data;
Second terminal corresponding with the terminal iidentification establishes connection;
Receive resource content corresponding with the resource identification.
Resource sharing method disclosed in the above-mentioned embodiment illustrated in fig. 1 such as this specification can be applied in processor, or
It is realized by processor.Processor may be a kind of IC chip, the processing capacity with signal.During realization, on
Each step for stating method can be completed by the integrated logic circuit of the hardware in processor or the instruction of software form.It is above-mentioned
Processor can be general processor, including central processing unit (Central Processing Unit, CPU), network processes
Device (Network Processor, NP) etc.;Can also be digital signal processor (Digital Signal Processor,
DSP), specific integrated circuit (Application Specific Integrated Circuit, ASIC), field programmable gate
Array (Field-Programmable Gate Array, FPGA) either other programmable logic device, discrete gate or crystalline substance
Body pipe logical device, discrete hardware components.It may be implemented or execute and is in this specification one or more embodiment disclosed
Each method, step and logic diagram.General processor can be microprocessor or the processor be also possible to it is any conventional
Processor etc..The step of method in conjunction with disclosed in this specification one or more embodiment, can be embodied directly in hardware decoding
Processor executes completion, or in decoding processor hardware and software module combination execute completion.Software module can position
In random access memory, flash memory, read-only memory, programmable read only memory or electrically erasable programmable memory, register
In the storage medium of equal this fields maturation.The storage medium is located at memory, and processor reads the information in memory, in conjunction with it
Hardware completes the step of above method.
The electronic equipment can also carry out the determination resource sharing method of FIG. 1 to FIG. 2, and details are not described herein for this specification.
Certainly, other than software realization mode, other implementations are not precluded in the electronic equipment of this specification, such as
Logical device or the mode of software and hardware combining etc., that is to say, that the executing subject of following process flow is not limited to each
Logic unit is also possible to hardware or logical device.
Fig. 7 is the structural schematic diagram of one embodiment electronic equipment of this specification.Referring to FIG. 7, in hardware view, it should
Electronic equipment includes processor, optionally further comprising internal bus, network interface, memory.Wherein, memory may be comprising interior
It deposits, such as high-speed random access memory (Random-Access Memory, RAM), it is also possible to further include non-volatile memories
Device (non-volatile memory), for example, at least 1 magnetic disk storage etc..Certainly, which is also possible that other
Hardware required for business.
Processor, network interface and memory can be connected with each other by internal bus, which can be ISA
(Industry Standard Architecture, industry standard architecture) bus, PCI (Peripheral
Component Interconnect, Peripheral Component Interconnect standard) bus or EISA (Extended Industry Standard
Architecture, expanding the industrial standard structure) bus etc..The bus can be divided into address bus, data/address bus, control always
Line etc..Only to be indicated with a four-headed arrow in Fig. 7, it is not intended that an only bus or a type of convenient for indicating
Bus.
Memory, for storing program.Specifically, program may include program code, and said program code includes calculating
Machine operational order.Memory may include memory and nonvolatile memory, and provide instruction and data to processor.
Processor is from the then operation into memory of corresponding computer program is read in nonvolatile memory, in logical layer
Resource sharing device is formed on face.Processor executes the program that memory is stored, and is specifically used for executing following operation:
Broadcast data is sent, includes the terminal iidentification and resource identification of the second terminal in the broadcast data;
Receive the connection request of first terminal;
Resource content corresponding with the resource identification is sent to the first terminal.
Resource sharing method disclosed in the above-mentioned embodiment illustrated in fig. 3 such as this specification can be applied in processor, or
It is realized by processor.Processor may be a kind of IC chip, the processing capacity with signal.During realization, on
Each step for stating method can be completed by the integrated logic circuit of the hardware in processor or the instruction of software form.It is above-mentioned
Processor can be general processor, including central processing unit (Central Processing Unit, CPU), network processes
Device (Network Processor, NP) etc.;Can also be digital signal processor (Digital Signal Processor,
DSP), specific integrated circuit (Application Specific Integrated Circuit, ASIC), field programmable gate
Array (Field-Programmable Gate Array, FPGA) either other programmable logic device, discrete gate or crystalline substance
Body pipe logical device, discrete hardware components.It may be implemented or execute and is in this specification one or more embodiment disclosed
Each method, step and logic diagram.General processor can be microprocessor or the processor be also possible to it is any conventional
Processor etc..The step of method in conjunction with disclosed in this specification one or more embodiment, can be embodied directly in hardware decoding
Processor executes completion, or in decoding processor hardware and software module combination execute completion.Software module can position
In random access memory, flash memory, read-only memory, programmable read only memory or electrically erasable programmable memory, register
In the storage medium of equal this fields maturation.The storage medium is located at memory, and processor reads the information in memory, in conjunction with it
Hardware completes the step of above method.
The electronic equipment can also carry out the resource sharing method of Fig. 3, and details are not described herein for this specification.
Certainly, other than software realization mode, other implementations are not precluded in the electronic equipment of this specification, such as
Logical device or the mode of software and hardware combining etc., that is to say, that the executing subject of following process flow is not limited to each
Logic unit is also possible to hardware or logical device.
In short, being not intended to limit the protection of this specification the foregoing is merely the preferred embodiment of this specification
Range.With within principle, made any modification, changes equivalent replacement all spirit in this specification one or more embodiment
Into etc., it should be included within the protection scope of this specification one or more embodiment.
System, device, module or the unit that above-described embodiment illustrates can specifically realize by computer chip or entity,
Or it is realized by the product with certain function.It is a kind of typically to realize that equipment is computer.Specifically, computer for example may be used
Think personal computer, laptop computer, cellular phone, camera phone, smart phone, personal digital assistant, media play
It is any in device, navigation equipment, electronic mail equipment, game console, tablet computer, wearable device or these equipment
The combination of equipment.
Computer-readable medium includes permanent and non-permanent, removable and non-removable media can be by any method
Or technology come realize information store.Information can be computer readable instructions, data structure, the module of program or other data.
The example of the storage medium of computer includes, but are not limited to phase change memory (PRAM), static random access memory (SRAM), moves
State random access memory (DRAM), other kinds of random access memory (RAM), read-only memory (ROM), electric erasable
Programmable read only memory (EEPROM), flash memory or other memory techniques, read-only disc read only memory (CD-ROM) (CD-ROM),
Digital versatile disc (DVD) or other optical storage, magnetic cassettes, tape magnetic disk storage or other magnetic storage devices
Or any other non-transmission medium, can be used for storage can be accessed by a computing device information.As defined in this article, it calculates
Machine readable medium does not include temporary computer readable media (transitory media), such as the data-signal and carrier wave of modulation.
It should also be noted that, the terms "include", "comprise" or its any other variant are intended to nonexcludability
It include so that the process, method, commodity or the equipment that include a series of elements not only include those elements, but also to wrap
Include other elements that are not explicitly listed, or further include for this process, method, commodity or equipment intrinsic want
Element.In the absence of more restrictions, the element limited by sentence "including a ...", it is not excluded that including described want
There is also other identical elements in the process, method of element, commodity or equipment.
All the embodiments in this specification are described in a progressive manner, same and similar portion between each embodiment
Dividing may refer to each other, and each embodiment focuses on the differences from other embodiments.Especially for system reality
For applying example, since it is substantially similar to the method embodiment, so being described relatively simple, related place is referring to embodiment of the method
Part explanation.