WO2016145610A1 - 特征码处理方法、设备和系统 - Google Patents

特征码处理方法、设备和系统 Download PDF

Info

Publication number
WO2016145610A1
WO2016145610A1 PCT/CN2015/074372 CN2015074372W WO2016145610A1 WO 2016145610 A1 WO2016145610 A1 WO 2016145610A1 CN 2015074372 W CN2015074372 W CN 2015074372W WO 2016145610 A1 WO2016145610 A1 WO 2016145610A1
Authority
WO
WIPO (PCT)
Prior art keywords
terminal
feature code
shared
signature
broadcast
Prior art date
Application number
PCT/CN2015/074372
Other languages
English (en)
French (fr)
Inventor
邓强
张万强
吴义壮
Original Assignee
华为技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 华为技术有限公司 filed Critical 华为技术有限公司
Priority to PCT/CN2015/074372 priority Critical patent/WO2016145610A1/zh
Priority to CN201580042690.XA priority patent/CN106576213A/zh
Publication of WO2016145610A1 publication Critical patent/WO2016145610A1/zh

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor

Definitions

  • the present invention relates to the field of communications technologies, and in particular, to a feature code processing method, device, and system.
  • the short-range wireless communication technology refers to a technology in which data is directly transmitted between terminals without being transited through the network.
  • the terminals use the short-range wireless communication technology to communicate, the terminal does not need to pass through the base station, thereby saving the wireless resources between the terminal and the base station.
  • the first terminal Before the first terminal and the second terminal communicate by using the short-range wireless communication technology, the first terminal sends a discovery request to the neighboring service function entity, where the discovery request includes the application user identifier and the terminal identifier of the first terminal.
  • the application user identifier includes an application identifier and a user identifier, where the application identifier is used to determine which application is used by the first terminal, and may be an application name, an application serial number, etc., and the user identifier is used to determine the first
  • the user who is logged in to the application on the terminal is the user account, the user nickname, etc. that is used to log in to the application.
  • the terminal identifier is used to determine which terminal the first terminal is, and may be the hardware device identifier of the first terminal.
  • the neighboring service function entity allocates a feature code to the first terminal according to the discovery request, and the first terminal broadcasts the feature code; the second terminal sets the application user identifier of the terminal to be monitored (that is, the application user identifier of the first terminal) Sending to the neighboring service function entity, the neighboring service function entity sends the feature code assigned to the first terminal to the second terminal, so that the second terminal listens to the feature code.
  • the feature code monitored by the second terminal is the same as the feature code broadcast by the first terminal, short-range wireless communication technology may be used to communicate with the first terminal.
  • the neighboring service function entity allocates multiple identical feature codes to the first terminal, and the first terminal independently broadcasts corresponding applications.
  • the feature code has the problem that the same feature code is repeatedly broadcast, resulting in waste of wireless resources.
  • the embodiment of the present invention provides a feature code processing method, device and system.
  • the technical solution is as follows:
  • a feature code processing method comprising:
  • the discovery response includes a shared identifier, where the shared identifier is used to indicate that at least two applications of the terminal use one shared signature.
  • the discovery response further includes at least one of: a shared feature code and a lifetime of the shared feature code;
  • the duration of the survival is used to indicate the length of time that the terminal broadcasts the shared signature.
  • the common identifier is represented by a specified bit in the shared signature, or by using the shared signature
  • the extended bit is represented.
  • the method before the sending the discovery response to the terminal according to the first discovery request, the method further includes:
  • the assigning the shared feature code to the terminal according to the first discovery request includes:
  • an application correspondence relationship of the terminal where the application correspondence relationship includes a correspondence between at least one application user identifier of the terminal and the shared feature code, if the application corresponds to the application And obtaining, in the relationship, the shared feature code corresponding to the application user identifier included in the first discovery request, and then assigning the shared feature code to the terminal; or if not obtained in the application correspondence relationship
  • the signature corresponding to the application user identifier included in the first discovery request the signature corresponding to any application user identifier in the application correspondence is allocated to the terminal, and the first discovery request is The corresponding relationship between the included application user identifier and the acquired feature code is saved in the application correspondence.
  • the method before the sending the discovery response to the terminal, the method further includes:
  • the shared signature is carried in the discovery response.
  • the method before the receiving the first discovery request, the method further includes:
  • the shared signature is allocated to the terminal and sent to the terminal.
  • a feature code processing method comprising:
  • the terminal sends a first discovery request to the neighboring service function entity, where the first discovery request includes the terminal identifier of the terminal;
  • the discovery response sent by the neighboring service function entity according to the first discovery request, where the discovery response includes a common identifier, where the common identifier is used to indicate that at least two applications of the terminal use one shared signature ;
  • the terminal If the terminal is broadcasting the shared feature code on the first radio resource, and the discovery response includes the common identifier, the terminal continues to broadcast the shared feature code on the first radio resource.
  • the discovery response further includes at least one of: the shared feature code and a lifetime of the shared feature code, where the lifetime is used And indicating a length of time during which the terminal broadcasts the shared signature.
  • the common identifier is represented by a specified bit in the shared signature, or by using the shared signature
  • the extended bit is represented.
  • the discovery response includes the lifetime duration, and the broadcasting continues to be performed on the first radio resource Signature code, including:
  • the terminal After the terminal passes the first broadcast duration of the shared signature, the terminal stops broadcasting the shared special Signature.
  • the discovery response does not include the shared signature
  • the method further includes:
  • the terminal uses the acquired feature code as the shared feature code.
  • the terminal acquires, after receiving the discovery response message, the neighboring service function entity is last allocated and sent to the The feature code of the terminal, including:
  • the method further includes:
  • the terminal If the terminal does not broadcast the shared feature code, the terminal broadcasts the shared feature code on the second wireless resource.
  • the terminal broadcasts the shared signature on the second radio resource, including:
  • the terminal requests the second radio resource from the base station, and broadcasts the shared feature code based on the requested second radio resource, or
  • the terminal selects the second radio resource from a radio resource pool that is pre-allocated by the base station to the terminal, and broadcasts the shared feature code based on the second radio resource.
  • a feature code processing method comprising:
  • the terminal sends a discovery request to the neighboring service function entity, where the discovery request includes the terminal identifier of the terminal;
  • the terminal Receiving, by the terminal, the discovery response sent by the neighboring service function entity according to the discovery request, where the discovery response includes a first feature code allocated by the neighboring service function entity to the terminal;
  • the terminal is broadcasting the second feature code, determining whether the first feature code is the same as the second feature code being broadcast by the terminal;
  • the terminal continues to broadcast the second Signature code
  • the terminal broadcasts the first feature code and continues to broadcast the second feature code.
  • the method further includes:
  • the terminal does not broadcast the feature code, the first feature code is broadcasted.
  • the discovery response further includes a lifetime of the first signature, where the lifetime is used to indicate that the first The length of the feature code;
  • the method further includes:
  • the first feature code is different from the second feature code, the first feature code is broadcasted within the lifetime, and the first feature code is stopped after the survival time is exceeded.
  • the broadcasting, by the terminal, the first feature code includes:
  • the terminal requests a radio resource from the base station, and broadcasts the first feature code based on the requested radio resource, or
  • the terminal selects a radio resource from a radio resource pool pre-assigned by the base station to the terminal, and broadcasts the first feature code based on the selected radio resource.
  • a feature code processing apparatus comprising:
  • a first request receiving module configured to receive a first discovery request sent by the terminal, where the first discovery request includes a terminal identifier of the terminal;
  • a sending module configured to send a discovery response to the terminal according to the first discovery request, where the discovery response includes a shared identifier, where the shared identifier is used to indicate that at least two applications of the terminal use one shared feature code.
  • the discovery response further includes at least one of: the shared feature code and a lifetime of the shared feature code;
  • the duration of the survival is used to indicate the length of time that the terminal broadcasts the shared signature.
  • the common identifier is represented by a specified bit in the shared signature, or by using the shared signature
  • the extended bit is represented.
  • the device further includes:
  • an allocating module configured to allocate the shared feature code to the terminal according to the first discovery request.
  • a first allocation unit configured to obtain the shared feature code according to the correspondence between the terminal identifier and the terminal identifier and the feature code, and allocate the shared feature code to the terminal;
  • a second allocation unit configured to acquire, according to the terminal identifier, an application correspondence relationship of the terminal, where the application correspondence relationship includes a correspondence between at least one application user identifier of the terminal and the shared signature code And if the shared feature code corresponding to the application user identifier included in the first discovery request is obtained in the application correspondence, the shared feature code is allocated to the terminal; or, if If the feature code corresponding to the application user identifier included in the first discovery request is not obtained, the feature code corresponding to any application user identifier in the application correspondence relationship is allocated to the terminal, and The correspondence between the application user identifier and the acquired feature code included in the first discovery request is saved in the application correspondence.
  • the device further includes:
  • a state determining module configured to determine a state of the shared signature according to a lifetime of the shared signature last allocated to the terminal and an allocation time of the shared signature before receiving the first discovery request ;
  • the signature processing module is configured to carry the shared signature in the discovery response if the state of the shared signature is invalid.
  • the device further includes:
  • a second request receiving module configured to receive a second discovery request sent by the terminal, where the second discovery request includes a terminal identifier of the terminal;
  • the allocating module is configured to allocate the shared feature code to the terminal according to the second discovery request, and send the shared feature code to the terminal.
  • a feature code processing apparatus comprising:
  • a request sending module configured to send a first discovery request to a neighboring service function entity, where the first discovery request includes a terminal identifier of the device;
  • a receiving module configured to receive a discovery response sent by the neighboring service function entity according to the first discovery request, where the discovery response includes a common identifier, where the common identifier is used to indicate that at least two applications of the device use one share Signature code
  • a first broadcast module configured to continue to broadcast the shared feature code on the first radio resource if the shared feature code is being broadcast on the first radio resource, and the discovery response includes the common identifier.
  • the discovery response further includes at least one of: a shared feature code and a lifetime of the shared feature code, where the lifetime is used Indicates the length of time that the device broadcasts the shared signature.
  • the common identifier is represented by a specified bit in the shared signature, or by using the shared signature
  • the extended bit is represented.
  • the discovery response includes the lifetime duration
  • the first broadcast module is configured to include, according to the discovery response Determining the first broadcast duration of the shared signature according to the remaining duration and the remaining duration of the signature being broadcast by the device; stopping broadcasting the shared feature after the first broadcast duration of the shared signature is passed code.
  • the discovery response does not include the shared signature
  • the device further includes:
  • an obtaining module configured to acquire a feature code that is last allocated and sent by the neighboring service function entity to the device before receiving the discovery response; and using the acquired feature code as the shared feature code.
  • the acquiring module is further configured to acquire, according to the historical broadcast record, a feature of the last broadcast before receiving the discovery response
  • the code is used as the shared feature code.
  • the device further includes:
  • a second broadcast module configured to broadcast the shared feature code on the second radio resource if the shared feature code is not broadcast.
  • the second broadcast module is configured to request, by the base station, the second radio resource, based on the requested The second radio resource broadcasts the shared feature code, or selects the second radio resource from a radio resource pool pre-allocated by the base station to the device, and broadcasts the shared feature code based on the second radio resource.
  • a feature code processing apparatus comprising:
  • a request sending module configured to send a discovery request to a neighboring service function entity, where the discovery request includes a terminal identifier of the device
  • a receiving module configured to receive a discovery response sent by the neighboring service function entity according to the discovery request, where the discovery response includes a first feature code allocated by the neighboring service function entity to the device;
  • a determining module configured to determine, if the device is broadcasting a second feature code, whether the first feature code is the same as a second feature code being broadcast by the device;
  • a second broadcast module configured to broadcast the first feature code if the first feature code is different from the second feature code, and continue to broadcast the second feature code.
  • the device further includes:
  • a third broadcast module configured to broadcast the first feature code if the device does not broadcast the feature code.
  • the discovery response further includes a duration of the first signature, where the lifetime is used to indicate that the first The length of the feature code;
  • the first broadcast module is configured to determine, according to the survival time length included in the discovery response and the remaining duration of the second feature code, if the first feature code is the same as the second feature code Broadcasting duration of the second feature code, and stopping broadcasting the second feature code after passing the broadcast duration of the second feature code;
  • the second broadcast module is configured to: when the first feature code is different from the second feature code, broadcast the first feature code within the lifetime, and stop the broadcast after the survival time Narrative A signature.
  • the second broadcast module is further configured to: request a radio resource from the base station, and broadcast the first feature according to the requested radio resource. a code, or selecting a radio resource from a radio resource pool pre-assigned by the base station to the device, and broadcasting the first feature code based on the selected radio resource;
  • the third broadcast module is further configured to: request a radio resource from the base station, broadcast the first feature code based on the requested radio resource, or select a radio resource from a radio resource pool pre-assigned by the base station to the device. And broadcasting the first feature code based on the selected radio resource.
  • a seventh aspect provides a proximity service function entity, where the proximity service function entity includes: a network interface, a memory, and a processor, wherein the network interface and the memory are respectively connected to the processor, and the memory is stored Program code, the processor is used to call the program code, and performs the following operations:
  • the discovery response includes a shared identifier, where the shared identifier is used to indicate that at least two applications of the terminal use one shared signature.
  • a terminal comprising: a receiver, a transmitter, a memory, and a processor, wherein the receiver, the transmitter, and the memory are respectively connected to the processor, the memory Stored with program code, the processor is used to call the program code, and performs the following operations:
  • the discovery response includes a common identifier, where the common identifier is used to indicate that at least two applications of the terminal use one shared feature code;
  • the discovery response includes the common identifier, continuing to broadcast the shared signature on the first radio resource.
  • a system comprising: a proximity service function entity and a terminal;
  • the terminal is configured to send a first discovery request to the neighboring service function entity, where the first discovery request includes a terminal identifier of the terminal;
  • the neighboring service function entity is configured to receive the first discovery request, and send a discovery response to the terminal according to the first discovery request, where the discovery response includes a shared identifier, where the shared identifier is used to indicate the terminal At least two applications use a common signature.
  • the terminal is further configured to receive the discovery response that is sent by the neighboring service function entity according to the first discovery request, if the terminal is broadcasting the shared feature code on a first radio resource, and the discovery response includes And the sharing identifier, the terminal continues to broadcast the shared feature code on the first radio resource.
  • a terminal comprising: a receiver, a transmitter, a memory, and a processor, wherein the receiver, the transmitter, and the memory are respectively connected to the processor, the memory Stored with program code, the processor is used to call the program code, and performs the following operations:
  • the terminal sends a discovery request to the neighboring service function entity, where the discovery request includes the terminal identifier of the terminal;
  • the terminal Receiving, by the terminal, the discovery response sent by the neighboring service function entity according to the discovery request, where the discovery response includes a first feature code allocated by the neighboring service function entity to the terminal;
  • the terminal is broadcasting the second feature code, determining whether the first feature code is the same as the second feature code being broadcast by the terminal;
  • the terminal continues to broadcast the second feature code
  • the terminal broadcasts the first feature code and continues to broadcast the second feature code.
  • a system comprising: a proximity service function entity and a terminal;
  • the terminal is configured to send a discovery request to the neighboring service function entity, where the discovery request includes a terminal identifier of the terminal;
  • the neighboring service function entity is configured to send a discovery response to the terminal according to the discovery request, where the discovery response includes a first feature code allocated by the neighboring service function entity to the terminal;
  • the terminal is further configured to receive the discovery response, if the terminal is broadcasting the second signature, determining whether the first signature is the same as the second signature being broadcast by the terminal;
  • the feature code is the same as the second feature code, the terminal continues to broadcast the second feature code; if the first feature code is different from the second feature code, the terminal broadcasts the first feature Code and continue to broadcast the second feature code.
  • the common identifier can indicate that at least two applications of the terminal use a common signature, and the terminal is informed by the common identifier
  • the feature code assigned to the terminal by the neighboring service function entity is the same as the feature code allocated by the neighboring service function entity to other applications of the terminal, so that the terminal continues to broadcast the shared feature code when the shared feature code is currently being broadcasted, thereby avoiding
  • FIG. 1 is a schematic diagram of a network architecture of an implementation environment according to an embodiment of the present invention.
  • FIG. 2 is a schematic diagram of another network architecture of an implementation environment according to an embodiment of the present invention.
  • FIG. 3 is a flowchart of a method for processing a feature code according to an embodiment of the present invention.
  • FIG. 4 is a flowchart of another method for processing a feature code according to an embodiment of the present invention.
  • FIG. 5 is a flowchart of another method for processing a feature code according to an embodiment of the present invention.
  • FIG. 6 is a schematic diagram of a survival time provided by an embodiment of the present invention.
  • FIG. 7 is a flowchart of another method for processing a feature code according to an embodiment of the present invention.
  • FIG. 8 is a flowchart of another method for processing a feature code according to an embodiment of the present invention.
  • FIG. 9 is a schematic structural diagram of a feature code processing apparatus according to an embodiment of the present invention.
  • FIG. 10 is a schematic structural diagram of a feature code processing apparatus according to an embodiment of the present invention.
  • FIG. 11 is a schematic structural diagram of another feature code processing apparatus according to an embodiment of the present invention.
  • FIG. 12 is a schematic structural diagram of a proximity service function entity according to an embodiment of the present invention.
  • FIG. 13 is a schematic structural diagram of a terminal according to an embodiment of the present disclosure.
  • FIG. 14 is a schematic structural diagram of a system according to an embodiment of the present invention.
  • FIG. 15 is a schematic structural diagram of another terminal according to an embodiment of the present disclosure.
  • FIG. 16 is a schematic structural diagram of another system according to an embodiment of the present invention.
  • FIG. 1 is a schematic diagram of a network architecture of an implementation environment according to an embodiment of the present invention.
  • the implementation environment includes: a terminal 101, a neighboring service function entity 102, and a base station 103.
  • the proximity service function entity 102 is configured to provide the terminal 101 with a short-range communication service.
  • the neighboring service function entity is configured to allocate a feature code to the first terminal, and the first terminal is configured to broadcast the feature code allocated by the neighboring service function entity 102.
  • the neighboring service function entity 102 is further configured to send the feature code of the first terminal to the second terminal, and the second terminal monitors the feature code broadcast by the first terminal.
  • the short-range wireless communication technology may be used to communicate with the first terminal.
  • the base station 103 is configured to allocate radio resources to the terminal 101, and the terminal 101 is configured to broadcast a feature code based on the radio resources allocated by the base station 103.
  • the terminal 101 transmits a discovery request to the neighboring service function entity 102, the discovery request including the terminal identity of the terminal 101.
  • the proximity service function entity 102 sends a discovery response to the terminal 101 after receiving the discovery request sent by the terminal 101.
  • the discovery response may carry the signature assigned to the terminal 101 or carry the indication that the neighboring service function entity 102 allocates the terminal 101.
  • the indication information of the feature code The terminal 101 determines the feature code assigned to the terminal 101 by the proximity service function entity 102 based on the information carried by the discovery response.
  • the terminal 101 After determining the feature code allocated by the neighboring service function entity 102 to the terminal 101, the terminal 101 broadcasts the determined feature code based on the radio resource allocated by the base station 103 to the terminal 101, so that other terminals can monitor the feature code and according to the monitored
  • the feature code acquires the terminal identifier of the terminal 101 from the neighboring service function entity 102, and further communicates with the terminal 101 based on the acquired terminal identifier of the terminal 101.
  • the terminal identifier is used to identify a terminal, and may be a device number of the terminal, which is not limited in this embodiment of the present invention.
  • 2 is a schematic diagram of a network architecture of another implementation environment according to an embodiment of the present invention. Referring to FIG. 2, the implementation environment may include: an application server, a subscription management entity, a mobility management entity, a service gateway, a public data gateway, and access. Network, neighboring service function entities, and terminal 1 and terminal 2.
  • An application server is a server that has been contracted with a neighboring business function entity.
  • the neighboring service function entity can interact with the terminal that uses the application associated with the application server, so that the terminal that subsequently uses the application can assign the feature code to the terminal according to the neighboring service function entity. , communicating with other terminals that use the application.
  • the terminal 1 and the terminal 2 are installed with an application associated with the application server. After the application is registered by the application, the application server allocates an application user identifier for the terminal 1 and the terminal 2. Both the terminal 1 and the terminal 2 can obtain the application user identifier from the application server corresponding to the installed application through the installed application.
  • the obtained application user identifier may include an application identifier and a user identifier, where the application identifier may be used to identify an application, which may be an application name or an application version name, and the user identifier is used to identify a user, and may be a user account.
  • the user nickname or the user number and the like are not limited in the embodiment of the present invention.
  • FIG. 3 is a flowchart of a method for processing a feature code according to an embodiment of the present invention.
  • an executor of the embodiment of the present invention is a neighboring service function entity, and the method includes:
  • the first discovery request may be used to request to assign a signature to the terminal.
  • the discovery response includes a shared identifier, where the shared identifier is used to indicate that at least two applications of the terminal use one shared signature.
  • the discovery response may further include at least one of the following: the shared signature and the lifetime of the shared signature; wherein the lifetime is used to indicate the length of time that the terminal broadcasts the shared signature.
  • the shared signature may include the common identifier.
  • the common identifier may be represented by a specified bit in the shared signature, for example, the designated bit may be one or more bits of all the bits of the signature, and the designated bit may also be Is a bit located at a preset position of the signature, such as a first bit, a first two bits, etc.; the common identifier may also be represented by an extended bit of the shared signature, for example, in the sharing The front or back of the signature is extended by one or more bits to represent.
  • the method provided by the embodiment of the present invention sends a discovery response to the terminal according to the received first discovery request sent by the terminal, where the discovery response includes a shared identifier, and the shared identifier can indicate that at least two applications of the terminal use one shared signature.
  • the terminal learns that the feature code assigned by the neighboring service function entity to the terminal and the neighboring service function entity are allocated to other applications of the terminal.
  • the feature codes are the same, so that the terminal continues to broadcast the shared feature code when the shared feature code is currently being broadcasted, thereby avoiding the problem that the same terminal simultaneously broadcasts the same feature code on different wireless resources in the prior art, thereby avoiding wireless Waste of resources.
  • the method further includes:
  • the shared feature code is allocated to the terminal.
  • the allocating the shared feature code to the terminal according to the first discovery request includes:
  • the shared signature is assigned to the terminal.
  • the terminal identifier may be searched in the correspondence, and the feature code corresponding to the terminal identifier is obtained.
  • the first discovery request further includes an application user identifier of the terminal, and the sharing the feature code to the terminal according to the first discovery request includes:
  • an application correspondence relationship of the terminal where the application correspondence relationship includes a correspondence between at least one application user identifier of the terminal and the shared signature code;
  • the shared feature code corresponding to the application user identifier included in the first discovery request can be obtained in the application correspondence, the shared feature code is allocated to the terminal; or.
  • the feature code corresponding to the application user identifier included in the first discovery request is not obtained in the application correspondence, the feature code corresponding to any application user identifier in the application correspondence relationship is assigned to the terminal, and The correspondence between the application user identifier included in the first discovery request and the acquired signature is saved in the application correspondence.
  • the application user identifier included in the first discovery request is searched in the application correspondence, and the shared feature code corresponding to the application user identifier included in the first discovery request is obtained.
  • the method before the sending the discovery response to the terminal in step 302, the method further includes:
  • the shared signature is carried in the discovery response.
  • the duration of the lifetime may be used to indicate the length of time that the terminal broadcasts the shared signature.
  • the method before the first discovery request sent by the receiving terminal, the method further includes:
  • the shared signature is allocated to the terminal and sent to the terminal.
  • the method further includes: establishing a correspondence between the terminal identifier and the shared signature.
  • the second discovery request may be used to request to assign a signature to the terminal.
  • FIG. 4 is a flowchart of another method for processing a feature code according to an embodiment of the present invention.
  • an execution body of the embodiment of the present invention is a terminal, and the method includes:
  • the terminal sends a first discovery request to the neighboring service function entity, where the first discovery request includes the terminal identifier of the terminal.
  • the first discovery request may be used to request the neighboring service function entity to assign a signature to the terminal.
  • the terminal receives the discovery response sent by the neighboring service function entity according to the first discovery request, where the discovery response includes a common identifier, where the common identifier is used to indicate that at least two applications of the terminal use one shared feature code.
  • the discovery response may further include at least one of: the shared signature and the lifetime of the shared signature, wherein the lifetime is used to indicate the length of time that the terminal broadcasts the shared signature.
  • the terminal is broadcasting the shared signature on the first radio resource, and the terminal determines that the discovery response includes the common identifier, then continuing to broadcast the shared signature on the first radio resource.
  • the first radio resource may be an air interface resource that is allocated to the terminal, and belongs to the prior art, and details are not described herein again.
  • the terminal sends a first discovery request to the neighboring service function entity, and the discovery response returned by the neighboring service function entity includes a shared identifier, where the shared identifier can indicate that at least two applications of the terminal use one shared signature. If the terminal is broadcasting the shared signature on the first radio resource, and the terminal determines that the discovery response includes the common identifier, continuing to broadcast the shared signature on the first radio resource without being on other radio resources.
  • the feature code assigned to the terminal by the neighboring service function entity is broadcasted again, thereby avoiding repeated broadcast of the feature code and waste of the wireless resource.
  • the continuing to broadcast the shared signature on the first radio resource in step 403 may include:
  • the terminal After the terminal passes the first broadcast duration of the shared signature, the terminal stops broadcasting the shared signature.
  • the method further includes:
  • the terminal uses the acquired feature code as the shared feature code.
  • the acquiring the shared signature assigned to the terminal according to the discovery response includes:
  • the feature code that was last broadcasted by the terminal before receiving the discovery response is obtained as the shared feature code.
  • the method further includes:
  • the terminal If the terminal does not broadcast the shared signature, the terminal broadcasts the shared signature on the second radio resource.
  • the second radio resource may be the same as or different from the first radio resource.
  • the terminal broadcasts the shared signature on the second radio resource, including:
  • the terminal requests the second radio resource from the base station, and broadcasts the shared feature code based on the requested second radio resource, or
  • the terminal selects the second radio resource from the radio resource pool that the base station pre-allocates to the terminal, and broadcasts the shared feature code based on the selected second radio resource.
  • FIG. 5 is a flowchart of another method for processing a feature code according to an embodiment of the present invention.
  • the interaction entity in the embodiment of the present invention is a terminal and a neighboring service function entity, and the method includes:
  • the terminal sends a first discovery request to the neighboring service function entity, where the first discovery request includes an application user identifier of the terminal and a terminal identifier of the terminal.
  • the feature code needs to be broadcast first, and in order to broadcast the feature code, the terminal first sends a discovery request to the neighboring service function entity, and the discovery request is used to request the proximity.
  • the service function entity assigns a signature to the terminal.
  • the discovery request may be triggered by an instruction of the broadcast signature.
  • the terminal receives the instruction to broadcast the signature, the terminal sends the discovery request to the neighboring service function entity, and the discovery request may also start an application by the terminal.
  • the operation is triggered by default or triggered in other manners, which is not limited by the embodiment of the present invention.
  • the discovery request sent by the terminal is used as an example for the first discovery request, and the processing procedure of the discovery request sent by the terminal is similar to the processing procedure of the first discovery request, and details are not described herein again.
  • the terminal may be a device such as a mobile phone or a computer.
  • the terminal identifier is used to uniquely determine the terminal, and may be a mobile phone number, a device number, and the like of the terminal, which is not limited in this embodiment of the present invention.
  • the terminal may carry the terminal identifier in the first discovery request before sending the first discovery request.
  • the terminal may install a plurality of applications. For each application, the terminal may register a user identifier on an application server associated with the application by using the application, and the application server according to the application identifier and the terminal The registered user identifier is assigned to the terminal by the application user identifier, where the application user identifier includes the application identifier and the user identifier, and the terminal can log in to the application server based on the application user identifier.
  • the application used by the terminal may be a plurality of applications such as an instant messaging application and a payment application.
  • the application server may be a plurality of servers such as an instant messaging server or a payment server.
  • the application identifier may be a name, a version number, or the like of the application, and the user identifier may be a user account, a user nickname, a user number, and the like, which are not limited in this embodiment of the present invention.
  • the user Tom can register the user identifier "Tom” on the server 1 of the application "application1”, and obtain the application user identifier Tom@application1.com.
  • the user Tom can log in to the terminal based on the application user identifier "Tom@application1.com”.
  • Server 1 the user Tom can register the user identifier "Tom” on the server 2 of the application "application2”, and obtain the application user identifier Tom@application2.com, and the user Tom can log in based on the application user identifier "Tom@application2.com” on the terminal.
  • Server 2 the user Tom can register the user identifier "Tom” on the server 1 of the application "application1”, and obtain the application user identifier Tom@application1.com.
  • the user Tom can log in to the terminal based on the application user identifier "Tom@application1.com”.
  • Server 2 the user Tom can register the user identifier "Tom” on the server 2 of the application "application2”, and obtain the application user identifier Tom@application2.com
  • the terminal may send the first discovery request to the neighboring service function entity by using a different application, and the terminal may be configured to facilitate the neighboring service function entity to know which application is currently used by the terminal.
  • the application user identifier that is currently used is obtained, and the application user identifier is carried in the first discovery request, and the application identifier is included in the first discovery request.
  • the application involved in the foregoing process refers to an application supporting the short-range wireless communication technology, and only the terminal that uses the application supporting the short-range wireless communication technology can pass the verification of the neighboring service function entity, and the neighboring service function entity The signature will be assigned to the terminal.
  • the application server can sign with the neighboring business function entity, after signing the contract, The short-range wireless communication technology is supported, and the terminal sends the first discovery request to the neighboring service function entity by using the application, where the first discovery request includes the application user identifier, and the neighboring service function entity receives the first discovery request.
  • the application identifier included in the application user identifier the terminal is verified to pass, and the signature is assigned to the terminal, and the terminal can use short-range wireless communication technology to communicate with other terminals.
  • the neighboring service function entity can also open the short-range wireless communication technology to all applications, and the neighboring service function entity can assign the feature code to the terminal regardless of which application the terminal sends the first discovery request.
  • the first discovery request sent by the terminal to the neighboring service function entity may not include the application user identifier.
  • the embodiment of the present invention does not limit whether the first discovery request includes the application user identifier of the terminal.
  • the neighboring service function entity obtains the shared feature code corresponding to the terminal identifier according to the correspondence between the terminal identifier and the terminal identifier and the feature code, and the shared feature corresponding to the terminal identifier.
  • the code is assigned to the terminal.
  • the method further includes: the neighboring service function entity receiving a second discovery request sent by the terminal, where the second discovery request includes a terminal identifier of the terminal; and the neighboring service function entity is configured according to the The second discovery request allocates the shared signature to the terminal, and establishes a correspondence between the terminal identifier and the shared signature.
  • the proximity service function entity receives the discovery request sent by the terminal for the first time as the second discovery request, and in the subsequent process, the discovery request sent by the terminal is the first discovery request.
  • the neighboring service function entity when receiving the discovery request of the terminal, queries the correspondence between the established terminal identifier and the feature code according to the terminal identifier included in the discovery request, if not found.
  • the shared signature corresponding to the terminal identifier of the terminal determines that the discovery request of the terminal is received for the first time, and the terminal has not been assigned a signature before. If the shared signature corresponding to the terminal identifier of the terminal is queried, it is determined that the shared signature is previously assigned to the terminal.
  • the proximity service function entity receives the discovery request of the terminal for the first time, the shared feature code is allocated to the terminal, and the correspondence between the terminal identifier included in the discovery request and the shared feature code is established.
  • the shared signature is queried by using the terminal identifier of the terminal as an index.
  • the terminal does not need to allocate a new signature code to the terminal, but can directly query the established terminal identifier and the feature code according to the terminal identifier of the terminal. Corresponding relationship between the two, obtaining a shared signature corresponding to the identifier of the terminal, The quotation code is assigned to the terminal.
  • the same terminal is prevented from occupying multiple signature codes, and the signature resource is saved.
  • the embodiment of the present invention is only described by taking the correspondence between the terminal identifier of the terminal and the shared signature assigned to the terminal by the neighboring service function entity.
  • the terminal may use different applications.
  • the neighboring service function entity sends a discovery request, where the discovery request includes the terminal identifier of the terminal and the application user identifier.
  • the neighboring service function entity may also establish a correspondence between the application user identifier of the terminal and the shared feature code, so as to query the shared feature code by using the application user identifier of the terminal as an index.
  • the neighboring service function entity when the neighboring service function entity receives the second discovery request sent by the terminal for the first time, acquiring the terminal identifier and the application user identifier included in the second discovery request, and assigning the shared feature code to the terminal, and according to the The terminal identifier of the terminal establishes an application correspondence relationship of the terminal, where the application correspondence relationship includes a correspondence between the application user identifier and a shared signature code allocated by the neighboring service function entity to the terminal.
  • the neighboring service function entity subsequently receives the first discovery request sent by the terminal, acquiring the application correspondence relationship of the terminal according to the terminal identifier included in the first discovery request, according to the application correspondence relationship and the first discovery
  • the application user identifier included in the request obtains the shared signature corresponding to the application user identifier included in the first discovery request, and the shared signature is allocated to the terminal.
  • the application user identifier included in the first discovery request is different from the application user identifier in the second discovery request, and the neighboring service function entity
  • the established application correspondence relationship may not include the feature code corresponding to the application user identifier included in the first discovery request, and the neighboring service function entity is based on the application correspondence relationship and the application user identifier included in the first discovery request. The corresponding signature code cannot be obtained.
  • the neighboring service function entity may allocate a new feature code different from the shared feature code to the terminal, and establish a correspondence between the application user identifier included in the first discovery request and the new feature code, and The correspondence is saved in the application correspondence of the terminal, and the new signature is allocated to the terminal.
  • the neighboring service function entity allocates different feature codes for different applications of the terminal, which causes waste of the feature code resources, and the terminal acquires the radio resources of the base station through different applications, and broadcasts different features based on different wireless resources.
  • the code also causes a waste of wireless resources.
  • the neighboring service function entity may allocate the same for different applications on the same terminal. Signature.
  • the neighboring service function entity obtains the feature code corresponding to the application user identifier included in the first discovery request according to the application correspondence relationship of the terminal and the application user identifier included in the first discovery request
  • the neighboring service function entity acquires the feature code corresponding to the application user identifier included in the first discovery request.
  • Applying a feature code corresponding to any application user identifier in the corresponding relationship where the feature code is a signature code that the neighboring service function entity once assigned to the terminal, and the neighboring service function entity may correspond to any application user identifier.
  • the feature code is allocated to the terminal, and the correspondence between the application user identifier included in the first discovery request and the acquired feature code is saved in the application correspondence relationship, thereby ensuring different applications in the application correspondence relationship.
  • the user identifier corresponds to the same signature, and the neighboring service function entity can assign the signature to the terminal regardless of which application is used by the terminal, thereby avoiding waste of resources.
  • the application correspondence of the terminal can be as shown in Table 1 below.
  • the application correspondence is indexed by the terminal identifier "188XXXX8903" of the terminal.
  • the three application user identifiers used by the terminal are "Tom@application1.com”, “Tom@application2.com”, and "Tom”.
  • the feature codes corresponding to .app3" are all "code1".
  • the neighboring service function entity sends a discovery response to the terminal, where the discovery response includes the shared signature and the shared identifier.
  • the shared feature code allocated by the neighboring service function entity to the terminal is determined by the correspondence between the terminal identifier of the terminal and the feature code, that is, the shared feature code allocated by the neighboring service function entity to the terminal.
  • the signature code that was last allocated and sent to the terminal before the proximity service function entity receives the first discovery request is the same.
  • the neighboring service function entity may carry the shared identifier in the discovery response, where the shared identifier is used to indicate that the terminal broadcasts using a shared signature that is last allocated by the neighboring service function entity and sent to the terminal.
  • the neighboring service function entity may assign the same feature code to different applications of the terminal, and may also assign different feature codes. If the neighboring service function entity allocates different applications for different applications on the terminal a signature code, the signature code that the neighboring service function entity last allocated and sent to the terminal before receiving the first discovery request, and the signature code assigned to the terminal by the neighboring service function entity according to the first discovery request different. For distinguishing, the feature code of the neighboring service function entity that is last allocated and sent to the terminal before receiving the first discovery request is called a first feature code, and the neighboring service function entity is allocated according to the first discovery request.
  • the feature code for the terminal is referred to as a second feature code
  • the neighboring service function entity may acquire the first feature code after determining the second feature code to the terminal, and determine the second feature code and the first feature. Whether the codes are the same, if they are the same, the common identifier is carried in the discovery response, and if different, the common identifier does not need to be carried in the discovery response.
  • the neighboring service function entity allocates the same feature code to different applications of the terminal, the feature code assigned by the neighboring service function entity to the terminal and the feature last allocated and sent to the terminal before receiving the first discovery request The code is the same, and the neighboring service function entity can directly carry the shared identifier in the discovery response.
  • the manner in which the neighboring service function entity carries the shared identifier in the discovery response may include at least one of the following manners (1) and (2):
  • the neighboring service function entity generates a discovery response and sets the value of the common identification field of the discovery response to a preset value. After the terminal receives the discovery response and determines that the value of the common identifier field of the discovery response is a preset value, it may be determined that the discovery response includes the shared identifier.
  • the neighboring service function entity reserves a common identifier field in the discovery response, where the value of the common identifier field is a preset value, indicating that the discovery response includes a common identifier, and the value of the common identifier field is not the preset value, indicating that the discovery response is Does not include a shared logo.
  • the neighboring service function entity first assigns a signature to the terminal, or the signature assigned to the terminal is last allocated and sent to the terminal before receiving the first discovery request.
  • the value of the common identification field of the discovery response may be set to a value other than the preset value. Subsequently, when the terminal determines that the value of the common identifier field of the discovery response is not the preset value, it may be determined that the discovery response does not include the shared identifier.
  • the neighboring service function entity generates a feature code including a plurality of bits according to a preset rule, so that the value on the specified bit of the feature code conforms to the preset rule, that is, the feature code includes the shared identifier, and
  • the generated signature is assigned to the terminal. Then, when the terminal receives the discovery response returned by the neighboring service function entity, the value on the specified bit of the signature may be determined to meet the preset.
  • the rule it is determined that the discovery response includes the shared identifier.
  • the neighboring service function entity first assigns a signature to the terminal, or the signature assigned to the terminal is last allocated and sent to the terminal before receiving the first discovery request.
  • the feature codes are different, the feature code on the specified bit that does not meet the preset rule may be assigned to the terminal. Then, when the terminal receives the discovery response returned by the neighboring service function entity and determines that the value on the specified bit of the signature does not meet the preset rule, it may be determined that the discovery response does not include the common identifier.
  • the designated bit may be one or more bits of all the bits of the signature, and the designated bit may be located at a preset position of the signature, such as the first bit and the first two bits.
  • the preset rule may specify an arrangement of values on a plurality of designated bits, or specify a number of even values in a plurality of specified bits, etc., the specified bit and the preset rule are both It can be determined by the neighboring service function entity and the terminal, which is not limited by the embodiment of the present invention.
  • the neighboring service function entity may set the common identifier by using one or both of the foregoing two manners. Which method is specifically adopted may be determined by the neighboring service function entity and the terminal. Of course, the neighboring service function entity may also set the common identifier in other manners, which is not limited in this embodiment of the present invention.
  • the neighboring service function entity may carry the shared feature code allocated to the terminal in the discovery response, so that the discovery response includes the shared feature code, and the terminal may The feature code included in the discovery response learns the signature assigned to the terminal by the neighboring service function entity.
  • the discovery response includes the common identifier.
  • the terminal may determine, according to the historical broadcast record, which feature code the feature code of the neighboring service function entity is last allocated and sent to the terminal, thereby determining that the neighboring service function entity is assigned to The signature of the terminal.
  • the history broadcast record is generated by the terminal each time the feature code is broadcasted, and the history broadcast record may include a broadcast feature code, a time when the feature code starts to be broadcasted, a broadcast duration, and the like, which are not limited in this embodiment of the present invention.
  • the terminal determines that the common identifier is included in the discovery response, and when the feature code that is last allocated and sent by the neighboring service function entity to the terminal is being broadcasted, the neighboring service function entity may be determined according to the currently broadcasted feature code.
  • the signature of the terminal may be determined according to the currently broadcasted feature code.
  • the terminal may determine, according to the shared identifier, a signature that is allocated to the terminal by the neighboring service function entity, and the neighboring service function entity does not need to carry the signature assigned to the terminal to the discovery response, that is, the discovery response.
  • the common identifier may be included in the present invention without including a signature.
  • the embodiment of the present invention does not limit whether the discovery response includes a signature assigned to the terminal.
  • the neighboring service function entity allocates the shared feature code to the terminal for the last time before receiving the first discovery request
  • the lifetime of the shared feature code may be set, and the allocation time of the shared feature code is recorded.
  • the duration of the lifetime is used to indicate the length of time that the terminal broadcasts the shared signature.
  • the neighboring service function entity sends the discovery response to the terminal according to the first discovery request, according to the lifetime of the shared signature that is last allocated to the terminal before receiving the first discovery request, and the shared signature
  • the allocation time determines the state of the shared signature.
  • the status of the shared signature includes failure and non-failure.
  • the neighboring service function entity determines that the shared signature has expired, and the sharing is performed.
  • the signature is carried in the discovery response. If the time interval between the current time and the allocated time of the shared feature code does not exceed the lifetime, indicating that the terminal has not stopped broadcasting the shared feature code, the neighboring service function entity determines that the shared feature code has not expired, and does not need to The shared signature is carried in the discovery response.
  • the neighboring service function entity may further set a lifetime duration for the signature assigned to the terminal to indicate the length of time that the terminal broadcasts the signature.
  • the neighboring service function entity carries the lifetime duration in the discovery response, so that the discovery response includes the lifetime duration, and the terminal can process the broadcast process of the feature code according to the lifetime of the feature code.
  • the neighboring service function entity may set the same lifetime duration for all the signatures assigned to the terminal, and may also set different lifetimes for the signatures assigned to the terminal by different applications, and the embodiment of the present invention does not do this. limited.
  • the application identifier included in the application user identifier may be determined according to the application user identifier of the terminal, and the application identifier is determined according to the application identifier.
  • the duration of the signature of the terminal, and the lifetime of the neighboring service function entity is different for different application identifiers.
  • the manner in which the neighboring service function entity determines the lifetime of the service is not limited in the embodiment of the present invention.
  • the terminal determines that the discovery response includes the common identifier. If the terminal is broadcasting the shared signature on the first radio resource, continuing to broadcast the shared signature on the first radio resource.
  • the first radio resource is an air interface resource allocated to the terminal, and details are not described herein.
  • the common identifier indicates that the signature assigned by the neighboring service function entity to the terminal is the same as the shared signature that the neighboring service function entity last allocated and sent to the terminal. If the terminal is broadcasting the shared signature, the terminal may determine that the signature assigned by the neighboring service function entity to the terminal is the same as the shared signature being broadcasted according to the common identifier, and the terminal does not need to broadcast the proximity service again.
  • the feature code assigned to the terminal by the function entity only needs to continue to broadcast the shared feature code, thereby avoiding waste of resources caused by broadcasting the feature code allocated by the neighboring service function entity to the terminal.
  • the terminal determines the first broadcast duration of the shared signature according to the lifetime and the remaining duration of the shared signature being broadcast by the terminal, the terminal After the first broadcast duration of the shared signature is passed, the sharing of the shared signature is stopped.
  • the remaining duration indicates the remaining length of time of the signature being broadcast by the terminal.
  • the terminal determines a length of time between the lifetime duration included in the discovery response and the remaining duration of the signature code being broadcast by the terminal, as the first broadcast duration of the shared signature, the terminal continues to broadcast the The shared signature code stops broadcasting the shared signature after passing the first broadcast duration of the shared signature.
  • the terminal calculates a sum of the lifetime duration included in the discovery response and the remaining duration of the signature code being broadcast by the terminal, as the first broadcast duration of the shared signature, the terminal continues to broadcast the shared signature, After the first broadcast duration of the shared signature is passed, the sharing of the shared signature is stopped.
  • the terminal starts broadcasting code1 at time t0, ready to stop broadcasting at time t2. If the terminal receives the discovery response of the neighboring service function entity at time t1, the discovery response includes the shared identifier, code2 allocated to the terminal by the neighboring service function entity, and the lifetime duration ⁇ t of the code2, where the remaining code1 is The duration is t2-t1, and the terminal determines that code2 is the same as code1 according to the common identifier, and then continues to broadcast code1, and determines that the broadcast duration of code1 is t2-t1+ ⁇ t, that is, the broadcast code1 is stopped at time t3.
  • the terminal if the terminal is broadcasting the feature code on the first radio resource, after the terminal determines the feature code allocated by the neighboring service function entity to the terminal, the feature code broadcasted by the terminal and the neighboring service function entity are allocated to the terminal. Whether the signature of the terminal is the same, the terminal still broadcasts the signature assigned by the neighboring service function entity to the terminal based on another radio resource allocated by the base station to the terminal.
  • the terminal when the shared feature code allocated by the neighboring service function entity to the terminal is the same as the shared feature code that the terminal is broadcasting, the terminal only extends the broadcast of the shared feature code. The length of time does not re-broadcast the shared signature based on another radio resource, thereby avoiding waste of radio resources.
  • the common response is included in the discovery response, and the terminal is currently broadcasting the shared feature code as an example.
  • at least one of the following two situations may be included:
  • Case 2 the terminal does not broadcast the shared signature when receiving the discovery response
  • the method may further comprise at least one of the following steps:
  • the terminal obtains the sharing allocated by the neighboring service function entity to the terminal according to the discovery response, regardless of whether the discovery response includes the shared identifier.
  • the feature code broadcasts the shared feature code.
  • the terminal acquires the signature assigned by the neighboring service function entity to the terminal as a shared signature. Specifically, if the discovery response includes the common identifier and the signature assigned by the neighboring service function entity to the terminal, the signature assigned to the terminal by the proximity service function entity is obtained from the discovery response as a common signature. And if the discovery response includes the shared identifier but does not include the signature assigned by the neighboring service function entity to the terminal, determining the signature assigned by the neighboring service function entity to the terminal and before the terminal receives the discovery response.
  • the shared feature code of the last broadcast is the same, and the terminal can obtain the feature code last broadcasted by the terminal before receiving the discovery response as the shared feature code according to the historical broadcast record of the terminal.
  • the terminal After the terminal acquires the shared signature, the terminal broadcasts the shared signature. Specifically, the terminal may request a radio resource from the base station, and the base station allocates the radio resource to the terminal, and the terminal broadcasts the radio resource based on the radio resource allocated by the base station to the terminal. Shared signature.
  • the base station is allocated in advance to the terminal radio resource pool, where the radio resource pool includes multiple radio resources allocated to the terminal, and if the terminal does not broadcast the shared feature code when receiving the discovery response, the radio base station may The radio resource is selected in the resource pool, and the shared feature code is broadcasted based on the selected radio resource.
  • the radio resource allocated to the terminal by the base station is an air interface resource of the base station, and the terminal may broadcast the shared feature code on the air interface based on the air interface resource allocated by the base station, and other terminals may monitor the shared feature code in the air interface.
  • the discovery response further includes a lifetime of the shared signature assigned to the terminal by the neighboring service function entity, and the terminal broadcasts the shared signature in the lifetime based on the radio resource. After the lifetime is long, the sharing of the shared signature is stopped. That is, the terminal may determine the stop broadcast time of the shared feature code according to the current time and the lifetime duration, and stop broadcasting the shared feature code when the determined stop broadcast time is reached.
  • the terminal is to broadcast the signature assigned to the terminal by the neighboring service function entity regardless of whether the terminal is currently broadcasting the signature.
  • the discovery response does not include the shared identifier, but includes a signature assigned by the neighboring service function entity to the terminal, and the terminal may determine that the signature is different from the last time the neighboring service function entity allocates and sends the signature to the terminal.
  • the feature code included in the discovery response is broadcast regardless of whether the terminal is broadcasting the feature code.
  • the terminal broadcasts the signature within the lifetime of the radio resource allocated by the base station to the terminal, and stops broadcasting the signature after the duration of the lifetime. That is, the terminal may determine the stop broadcast time of the feature code according to the current time and the lifetime duration, and stop broadcasting the feature code when the determined stop broadcast time is reached.
  • the terminal continues to broadcast the first feature code on the first radio resource. And broadcasting, according to the second radio resource allocated by the base station to the terminal, a second signature that is included in the discovery response and allocated by the neighboring service function entity to the terminal. That is, the terminal broadcasts the two feature codes in parallel, and determines the stop broadcast time of each feature code according to the lifetime of each feature code and the time of starting the broadcast, respectively, when the stop of the first feature code is stopped. At the moment, the terminal stops broadcasting the first feature code. When the stop broadcast time of the second feature code is reached, the terminal stops broadcasting the second feature code, and the broadcast process of the two feature codes does not affect each other.
  • the terminal may first determine whether the discovery response includes the shared identifier, and if the discovery response includes the shared identifier, determine that the terminal receives the discovery response. Whether the feature code is being broadcast, whether the terminal is broadcasting the feature code when receiving the discovery response, and if the terminal is broadcasting the feature code when receiving the discovery response, and determining whether the discovery response includes the common identifier, This embodiment of the present invention does not limit this.
  • a new proximity service protocol layer is added to the terminal, and when the terminal obtains the signature assigned to the terminal from the neighboring service function entity, the neighboring service protocol layer is constructed.
  • a discovery message includes the signature.
  • the neighboring service protocol layer sends the discovery message to the access layer, and the access layer acquires the radio resource of the base station for the message, so as to broadcast the feature code in the discovery message in the air interface, when the feature code survives. Time to If the remaining duration of the signature is 0, the neighboring service protocol layer indicates to the access layer to stop broadcasting the signature, and the access layer no longer broadcasts the signature.
  • the other terminal may obtain the terminal identifier of the terminal, and send a monitoring request to the neighboring service function entity to request the terminal identifier to be monitored. Then, the neighboring service function entity sends the signature corresponding to the terminal identifier to the other identifier. The terminal, the other terminal monitors the feature code on the air interface, and when the feature code broadcast by the terminal is monitored, the feature code is sent to the neighboring service function entity, and the neighboring service function entity returns the terminal identifier corresponding to the feature code. At this time, the other terminal can use the short-range wireless communication technology to communicate with the terminal.
  • the method when receiving the first discovery request of the terminal, obtaining the feature code corresponding to the terminal identifier according to the correspondence between the terminal identifier and the terminal identifier and the feature code, and corresponding to the terminal identifier
  • the feature code is allocated to the terminal, and the discovery response is sent to the terminal, where the discovery response includes a common identifier, and the shared identifier indicates that the terminal uses the shared feature code that the neighboring service function entity last allocated and sends to the terminal to broadcast, by using the common identifier.
  • the shared identifier prompts the terminal, so that the terminal knows that the signature code assigned by the neighboring service function entity to the terminal is the same as the shared signature code that the neighboring service function entity last allocated and sent to the terminal, and is currently broadcasting the sharing feature.
  • the code continues to broadcast the shared feature code without re-broadcasting the feature code assigned to the terminal by the neighboring service function entity, thereby avoiding repeated broadcast of the feature code. Further, it is no longer necessary to broadcast the feature code allocated to the terminal by the neighboring service function entity based on the radio resource allocated by the base station to the terminal, thereby saving radio resources and avoiding waste of radio resources.
  • the neighboring service function entity allocates the same feature code that is the last time the feature code is last allocated and sent to the terminal before receiving the first discovery request, and carries the shared identifier to the terminal.
  • the terminal determines that the discovery response includes the shared identifier, the terminal can know that the signature code assigned by the neighboring service function entity to the terminal and the last assignment of the neighboring service function entity before receiving the first discovery request. And the signature code sent to the terminal is the same.
  • the terminal may determine, by the terminal, the signature code assigned by the neighboring service function entity to the terminal and the last assignment of the neighboring service function entity. Whether the shared signature sent to the terminal is the same. For details, refer to the following embodiments.
  • FIG. 7 is a flowchart of another method for processing a feature code according to an embodiment of the present invention.
  • the execution body of the embodiment of the present invention is a terminal, and the method includes:
  • the terminal sends a discovery request to the neighboring service function entity, where the discovery request includes the terminal identifier of the terminal.
  • the discovery request is used to request the neighboring service function entity to allocate a signature.
  • the terminal receives a discovery response sent by the neighboring service function entity according to the discovery request, where the discovery response includes a first feature code allocated by the neighboring service function entity to the terminal.
  • step 703. If the terminal is broadcasting the second feature code, determine whether the first feature code is the same as the second feature code that the terminal is broadcasting. If yes, go to step 704. If no, go to step 705.
  • the terminal continues to broadcast the second feature code and ends.
  • the terminal broadcasts the first feature code, and continues to broadcast the second feature code, and ends.
  • the terminal sends a discovery request to the neighboring service function entity, and if the terminal receives the discovery response sent by the neighboring service function entity according to the discovery request, the discovery response includes the neighboring service function entity being allocated to the a first feature code of the terminal, and the terminal is broadcasting the second feature code, first determining whether the second feature code currently being broadcast is the same as the first feature code allocated by the neighboring service function entity to the terminal, if the first feature The code is the same as the second feature code, and the terminal continues to broadcast the second feature code without re-broadcasting the first feature code, thereby avoiding repeated broadcast of the feature code and avoiding waste of wireless resources.
  • the method further includes:
  • the terminal does not broadcast the signature, the first signature is broadcast.
  • the discovery response further includes a lifetime of the first signature, where the duration is used to indicate a length of time for broadcasting the first signature.
  • the method also includes:
  • the first feature code is the same as the second feature code, determining a broadcast duration of the second feature code according to the lifetime duration included in the discovery response and the remaining duration of the second feature code being broadcast by the terminal, And after the broadcast duration of the second signature is passed, stopping broadcasting the second signature;
  • the first feature code is different from the second feature code, the first feature code is broadcasted during the lifetime, and the first feature code is stopped after the lifetime is exceeded.
  • the broadcasting the first signature by the terminal includes:
  • the terminal requests a radio resource from the base station, and broadcasts the first feature code based on the requested radio resource, or
  • the terminal selects a radio resource from a radio resource pool that the base station pre-allocates to the terminal, and broadcasts the first feature code based on the selected radio resource.
  • FIG. 8 is a flowchart of another method for processing a feature code according to an embodiment of the present invention.
  • the interaction entity in the embodiment of the present invention is a terminal and a neighboring service function entity, and the method includes:
  • the terminal sends a discovery request to a neighboring service function entity, where the discovery request includes an application user identifier and a terminal identifier.
  • Step 801 is similar to step 501, and details are not described herein again.
  • the neighboring service function entity allocates the first feature code to the terminal when receiving the discovery request.
  • the discovery request is used to request the neighboring service function entity to assign a feature code to the terminal, and when the proximity service function entity receives the discovery request, obtain the terminal identifier according to the correspondence between the terminal identifier and the terminal identifier and the feature code.
  • the signature is assigned to the terminal.
  • the terminal may also be assigned a feature code different from the feature code corresponding to the terminal identifier.
  • the specific process for the neighboring service function entity to assign the feature code to the terminal is similar to the step 502, and details are not described herein again.
  • the neighboring service function entity sends a discovery response to the terminal, where the discovery response includes a first feature code allocated by the neighboring service function entity to the terminal.
  • the discovery response may also include the lifetime of the first signature set by the neighboring service function entity, and details are not described herein.
  • the terminal when receiving the discovery response, may first determine whether the terminal is broadcasting a signature, and if the terminal is broadcasting the second signature, the terminal first determines the second signature and the Whether the first signature assigned to the terminal by the neighboring service function entity is the same.
  • the first feature code and the second feature code each include a plurality of bits, and the terminal compares each bit of the first feature code and the second feature code bit by bit, when the terminal determines the first A value on each bit in a signature is the same as a value on a corresponding bit in the second signature, and then determining that the first signature is the same as the second signature. Determining the first feature code and the second feature when the terminal determines that a value on at least one bit of the first feature code is different from a value on a corresponding bit bit in the second feature code The code is different.
  • the difference between the embodiment of the present invention and the embodiment shown in FIG. 5 is that the proximity response sent by the neighboring service function entity to the terminal does not include the shared identifier, and for the terminal, when the terminal receives the discovery response, Unable to determine, according to whether the discovery response includes the common identifier, a signature assigned to the terminal by the neighboring service function entity and a signature code last assigned to the terminal before the proximity service function entity receives the discovery request (ie, the terminal is Whether the broadcast signature is the same, therefore, the terminal can first determine whether the signature being broadcast is the same as the signature assigned to the terminal by the neighboring service function entity.
  • the terminal continues to broadcast the second feature code and ends.
  • the terminal continues to broadcast the second feature code without broadcasting the first feature code.
  • the terminal continues to broadcast the second signature, and determines the broadcast of the second signature according to the lifetime and the remaining duration of the second signature.
  • the duration after passing the broadcast duration of the second signature, stops broadcasting the second signature.
  • the remaining duration represents the remaining length of time of the second signature.
  • the terminal determines a length of time between the lifetime duration included in the discovery response and the remaining duration of the second signature code that the terminal is broadcasting. As the broadcast duration of the second signature, the terminal continues to broadcast. The second feature code stops broadcasting the second feature code after the broadcast duration. Alternatively, the terminal calculates a sum of the lifetime duration and the remaining duration of the second signature in the discovery response, and the terminal continues to broadcast the second signature as the broadcast duration of the second signature The broadcast of the second feature code is stopped after the broadcast duration.
  • the terminal broadcasts the first feature code, and continues to broadcast the second feature code, and ends.
  • the terminal not only continues to broadcast the second feature code, but also broadcasts the first feature code.
  • the terminal requests the radio resource from the base station, and broadcasts the first feature code based on the requested radio resource, or the terminal selects a radio resource from the radio resource pool pre-allocated by the base station to the terminal, based on the selected radio resource.
  • the first signature is broadcast.
  • the terminal broadcasts the first signature during the lifetime, and stops broadcasting the first signature after the duration of the lifetime. That is, The terminal determines a stop broadcast time of the first feature code according to the current time and the lifetime duration, and stops broadcasting the first feature code when the determined stop broadcast time is reached.
  • the terminal does not broadcast the feature code when the terminal receives the discovery response, the terminal broadcasts the first feature code and ends.
  • the terminal requests the radio resource from the base station, and broadcasts the first feature code based on the requested radio resource, or the terminal selects a radio resource from the radio resource pool pre-allocated by the base station to the terminal, based on the selected radio resource.
  • the first signature is broadcast.
  • the terminal broadcasts the first signature during the lifetime, and stops broadcasting the first signature after the duration of the lifetime. That is, the terminal determines the stop broadcast time of the first feature code according to the current time and the lifetime duration, and stops broadcasting the first feature code when the determined stop broadcast time is reached.
  • the terminal sends a discovery request to the neighboring service function entity, requesting the neighboring service function entity to assign a feature code to the terminal, and if the terminal receives the discovery response returned by the neighboring service function entity, the terminal is broadcasting.
  • the terminal determines, by the second feature code, whether the second feature code being broadcast is the same as the first feature code allocated by the neighboring service function entity to the terminal included in the discovery response, if the first feature code is the same as the second feature code
  • the terminal continues to broadcast the second feature code without re-broadcasting the first feature code, avoiding repeated broadcast of the feature code, and eliminating the need to broadcast the first feature code based on the radio resource allocated by the base station to the terminal, thereby saving wireless Resources, avoiding the waste of wireless resources.
  • FIG. 9 is a schematic structural diagram of a feature code processing apparatus according to an embodiment of the present invention.
  • the apparatus includes:
  • the first request receiving module 901 is configured to receive a first discovery request sent by the terminal, where the first discovery request includes a terminal identifier of the terminal;
  • the sending module 902 is configured to send a discovery response to the terminal according to the first discovery request, where the discovery response includes a shared identifier, where the shared identifier is used to indicate that at least two applications of the terminal use one shared signature.
  • the device provided by the embodiment of the present invention sends a discovery response to the terminal according to the received first discovery request sent by the terminal, where the discovery response includes a shared identifier, and the shared identifier can indicate that at least two applications of the terminal use one shared signature.
  • the terminal knows that the signature assigned to the terminal is the same as the signature assigned to other applications of the terminal, so that the terminal is currently widely
  • the shared feature code is continuously broadcasted, which avoids the problem that the same terminal simultaneously broadcasts the same feature code on different wireless resources in the prior art, thereby avoiding waste of wireless resources.
  • the discovery response further includes at least one of: the shared signature and the lifetime of the shared signature;
  • the duration of the lifetime is used to indicate the length of time that the terminal broadcasts the shared signature.
  • the common identifier is represented by a specified bit in the shared signature, or by an extended bit of the shared signature.
  • the device further includes:
  • an allocating module configured to allocate the shared feature code to the terminal according to the first discovery request.
  • the allocation module includes:
  • a first allocation unit configured to obtain the shared feature code according to the correspondence between the terminal identifier and the terminal identifier and the feature code, and allocate the shared feature code to the terminal;
  • a second allocation unit configured to acquire an application correspondence relationship of the terminal according to the terminal identifier, where the application correspondence relationship includes a correspondence between at least one application user identifier of the terminal and the shared signature code, if the application is in the application If the shared feature code corresponding to the application user identifier included in the first discovery request is obtained in the corresponding relationship, the shared feature code is allocated to the terminal; or if the first feature is not obtained in the application correspondence relationship And the signature corresponding to the application user identifier in the application correspondence is allocated to the terminal, and the application user identifier included in the first discovery request is acquired by the identifier. The correspondence between the obtained signatures is saved in the application correspondence.
  • the device further includes:
  • a state determining module configured to determine a state of the shared signature according to a lifetime of the shared signature last allocated to the terminal and an allocation time of the shared signature before receiving the first discovery request
  • the signature processing module is configured to carry the shared signature in the discovery response if the state of the shared signature is invalid.
  • the device further includes:
  • a second request receiving module configured to receive a second discovery request sent by the terminal, where the second discovery request includes a terminal identifier of the terminal;
  • the allocating module is configured to allocate the shared feature code to the terminal according to the second discovery request, and send the shared feature code to the terminal.
  • FIG. 10 is a schematic structural diagram of a feature code processing apparatus according to an embodiment of the present invention.
  • the device includes:
  • the request sending module 1001 is configured to send a first discovery request to the neighboring service function entity, where the first discovery request includes a terminal identifier of the device;
  • the receiving module 1002 is configured to receive a discovery response sent by the neighboring service function entity according to the first discovery request, where the discovery response includes a common identifier, where the common identifier is used to indicate that at least two applications of the device use one shared feature code;
  • the first broadcast module 1003 is configured to continue to broadcast the shared feature code on the first radio resource if the shared feature code is being broadcast on the first radio resource, and the discovery response includes the common identifier.
  • the device by sending a first discovery request to a neighboring service function entity, the discovery response returned by the neighboring service function entity includes a shared identifier, and the shared identifier can indicate that at least two applications of the device use one shared feature code. If the device is broadcasting the shared signature on the first radio resource, and the device determines that the discovery response includes the common identifier, continuing to broadcast the shared signature on the first radio resource without being on other radio resources.
  • the feature code assigned to the device by the neighboring service function entity is broadcasted again, which avoids repeated broadcast of the feature code and waste of wireless resources.
  • the discovery response further includes at least one of: the shared feature code and a lifetime of the shared feature code, wherein the lifetime is used to indicate a length of time that the device broadcasts the shared feature code.
  • the common identifier is represented by a specified bit in the shared signature, or by an extended bit of the shared signature.
  • the discovery response includes the lifetime duration
  • the first broadcast module 1003 is configured to determine, according to the lifetime duration included in the discovery response and the remaining duration of the feature code that the device is broadcasting, determining the first of the shared signatures. Broadcast duration; after the first broadcast duration of the shared signature is passed, the sharing of the shared signature is stopped.
  • the discovery response does not include the shared signature
  • the device further includes:
  • an obtaining module configured to acquire a feature code that is last allocated and sent by the neighboring service function entity to the device before receiving the discovery response; using the acquired feature code as the shared feature code.
  • the acquiring module is further configured to obtain, according to the historical broadcast record, a feature code that was last broadcasted before receiving the discovery response as the shared feature code.
  • the device further includes:
  • the second broadcast module is configured to broadcast the shared feature code on the second radio resource if the shared feature code is not broadcast.
  • the second broadcast module is configured to request the second radio resource from the base station, broadcast the shared feature code based on the requested second radio resource, or pre-allocate from the base station to the radio resource pool of the device. Selecting the second radio resource, and broadcasting the shared feature code based on the second radio resource.
  • FIG. 11 is a schematic structural diagram of another feature code processing apparatus according to an embodiment of the present invention.
  • the device includes:
  • the request sending module 1101 is configured to send a discovery request to the neighboring service function entity, where the discovery request includes a terminal identifier of the device;
  • the receiving module 1102 is configured to receive a discovery response sent by the neighboring service function entity according to the discovery request, where the discovery response includes a first feature code allocated by the neighboring service function entity to the device;
  • the determining module 1103 is configured to determine, if the device is broadcasting the second feature code, whether the first feature code is the same as the second feature code being broadcast by the device;
  • the first broadcast module 1104 is configured to continue to broadcast the second feature code if the first feature code is the same as the second feature code;
  • the second broadcast module 1105 is configured to: if the first feature code is different from the second feature code, broadcast the first feature code, and continue to broadcast the second feature code.
  • the device provided by the embodiment of the present invention sends a discovery request to the neighboring service function entity, and if the discovery response sent by the neighboring service function entity according to the discovery request is received, the discovery response includes the first service function entity that is allocated to the device. a feature code, and the device is broadcasting the second feature code, first determining whether the second feature code currently being broadcast is the same as the first feature code assigned to the device by the neighboring service function entity, if the first feature code and the first feature code If the two feature codes are the same, the second feature code is continuously broadcasted without re-broadcasting the first feature code, thereby avoiding repeated broadcast of the feature code.
  • the device further includes:
  • the third broadcast module is configured to broadcast the first feature code if the device does not broadcast the feature code.
  • the discovery response further includes a lifetime of the first signature, where the duration is used to indicate a length of time for broadcasting the first signature.
  • the first broadcast module 1104 is configured to: if the first feature code is the same as the second feature code, determine the second feature code according to the lifetime duration included in the discovery response and the remaining duration of the second feature code. Broadcast duration, and after the broadcast duration of the second signature is passed, stopping broadcasting the second signature;
  • the second broadcast module 1105 is configured to: when the first feature code is different from the second feature code, broadcast the first feature code within the lifetime, and stop broadcasting the first feature code after the lifetime is exceeded.
  • the second broadcast module 1105 is further configured to: request a radio resource from the base station, broadcast the first feature code based on the requested radio resource, or select a radio from a radio resource pool that the base station pre-allocates to the device.
  • the resource broadcasts the first feature code based on the selected radio resource;
  • the third broadcast module is further configured to: request a radio resource from the base station, broadcast the first feature code based on the requested radio resource, or select a radio resource from a radio resource pool that the base station pre-allocates to the device, based on the selected The wireless resource broadcasts the first signature.
  • FIG. 12 is a schematic structural diagram of a neighboring service function entity according to an embodiment of the present invention.
  • the neighboring service function entity includes: the neighboring service function entity includes: a network interface 1201, a memory 1202, and a processor 1203.
  • the interface 1201 and the memory 1202 are respectively connected to the processor 1203.
  • the memory 1202 stores program code
  • the processor 1203 is configured to invoke the program code to perform the following operations:
  • the discovery response includes a shared identifier, where the shared identifier is used to indicate that at least two applications of the terminal use one shared signature.
  • the discovery response further includes at least one of: the shared signature and the lifetime of the shared signature;
  • the duration of the lifetime is used to indicate the length of time that the terminal broadcasts the shared signature.
  • the common identifier is represented by a specified bit in the shared signature, or by an extended bit of the shared signature.
  • processor 1203 is further configured to invoke the program code, and perform the following operations:
  • the shared feature code is allocated to the terminal.
  • processor 1203 is further configured to invoke the program code, and perform the following operations:
  • an application correspondence relationship of the terminal where the application correspondence relationship includes a correspondence between the at least one application user identifier of the terminal and the shared signature, and if the application correspondence is obtained, If the shared signature corresponding to the application user identifier included in the first discovery request is used, the shared signature is allocated to the terminal; or if the application user included in the first discovery request is not obtained in the application correspondence Identifying the corresponding feature code, assigning a feature code corresponding to any application user identifier in the application correspondence relationship to the terminal, and between the application user identifier included in the first discovery request and the acquired feature code The correspondence is saved in the application correspondence.
  • processor 1203 is further configured to invoke the program code, and perform the following operations:
  • the shared signature is carried in the discovery response.
  • processor 1203 is further configured to invoke the program code, and perform the following operations:
  • the shared signature is allocated to the terminal and sent to the terminal.
  • FIG. 13 is a schematic structural diagram of a terminal according to an embodiment of the present invention.
  • the terminal includes: a receiver 1301, a transmitter 1302, a memory 1303, and a processor 1304.
  • the receiver 1301, the transmitter 1302, and the The memory 1303 is respectively connected to the processor 1304.
  • the memory 1303 stores program code
  • the processor 1304 is configured to call the program code to perform the following operations:
  • the discovery response includes a common identifier, where the common identifier is used to indicate that at least two applications of the terminal use one shared feature code;
  • the terminal is broadcasting the shared signature on the first radio resource, and the discovery response includes the common identifier, continuing to broadcast the shared signature on the first radio resource.
  • the discovery response further includes at least one of: the shared feature code and a lifetime of the shared feature code, wherein the lifetime is used to indicate a length of time that the terminal broadcasts the shared feature code.
  • the common identifier is represented by a specified bit in the shared signature, or by an extended bit of the shared signature.
  • processor 1304 is further configured to invoke the program code to perform the following operations:
  • processor 1304 is further configured to invoke the program code to perform the following operations:
  • the acquired feature code is taken as the shared feature code.
  • processor 1304 is further configured to invoke the program code to perform the following operations:
  • the feature code last broadcasted before receiving the discovery response is obtained as the shared feature code.
  • processor 1304 is further configured to invoke the program code to perform the following operations:
  • the shared signature is broadcast on the second radio resource.
  • processor 1304 is further configured to invoke the program code to perform the following operations:
  • FIG. 14 is a schematic structural diagram of a system according to an embodiment of the present invention.
  • the system includes: a neighboring functional entity 1401 and a terminal 1402.
  • the terminal 1402 is configured to send a first discovery request to the neighboring service function entity 1401, where the first discovery request includes a terminal identifier of the terminal 1402.
  • the proximity service function entity 1401 is configured to receive the first discovery request, and send a discovery response to the terminal 1402 according to the first discovery request, where the discovery response includes a common identifier, where the common identifier is used to indicate at least two of the terminal 1402.
  • the application uses a shared signature.
  • the terminal 1402 is further configured to receive the discovery response sent by the neighboring service function entity 1401 according to the first discovery request, if the terminal 1402 is broadcasting a shared feature code on the first radio resource, and the The discovery response includes the shared identifier, and the terminal 1402 continues to broadcast the shared signature on the first radio resource.
  • the discovery response further includes at least one of: the shared signature and the lifetime of the shared signature;
  • the duration of the lifetime is used to indicate the length of time that the terminal 1402 broadcasts the shared signature.
  • the common identifier is represented by a specified bit in the shared signature, or by an extended bit of the shared signature.
  • the neighboring function entity 1401 is further configured to allocate the shared feature code to the terminal 1402 according to the first discovery request.
  • the neighboring function entity 1401 is further configured to obtain the shared feature code according to the correspondence between the identifier of the terminal 1402 and the identifier of the terminal 1402 and the feature code, and assign the shared feature code to the terminal 1402; or, according to The terminal 1402 identifies that the application correspondence relationship of the terminal 1402 is obtained, where the application correspondence relationship includes a correspondence between at least one application user identifier of the terminal 1402 and the shared feature code, and can be obtained in the application correspondence relationship.
  • the shared signature code corresponding to the application user identifier included in the first discovery request is allocated to the terminal 1402; or if the first discovery request is not obtained in the application correspondence relationship And applying the signature corresponding to the application user identifier to the terminal 1402, and the application user identifier included in the first discovery request and the acquired feature.
  • the correspondence between the codes is saved in the application correspondence.
  • the neighboring function entity 1401 is further configured to determine, according to a lifetime of the shared signature that is last allocated to the terminal 1402 and an allocation time of the shared signature before receiving the first discovery request, determining the shared signature. a state; if the state of the shared signature is invalid, the shared signature is carried in the discovery response.
  • the neighboring function entity 1401 is further configured to receive a second discovery request sent by the terminal 1402, where the second discovery request includes the identifier of the terminal 1402 of the terminal 1402, and allocate the sharing to the terminal 1402 according to the second discovery request.
  • the signature is sent to the terminal 1402.
  • the terminal 1402 is further configured to determine, according to the lifetime duration included in the discovery response and the remaining duration of the feature code that the terminal 1402 is broadcasting, determining a first broadcast duration of the shared signature; after the common signature is passed After the first broadcast duration, the broadcast of the shared signature is stopped.
  • the terminal 1402 is further configured to acquire a feature code that is last allocated by the neighboring service function entity 1401 and sent to the terminal 1402 before receiving the discovery response; For this shared feature code.
  • the terminal 1402 is further configured to obtain, according to the historical broadcast record of the terminal 1402, a feature code that was last broadcasted before receiving the discovery response as the shared feature code.
  • the terminal 1402 is further configured to broadcast the shared feature code on the second radio resource if the shared feature code is not broadcast.
  • the terminal 1402 is further configured to request the second radio resource from the base station, broadcast the shared feature code based on the requested second radio resource, or pre-allocate from the base station to the radio resource pool of the terminal 1402. Selecting the second radio resource, and broadcasting the shared feature code based on the second radio resource.
  • FIG. 15 is a schematic structural diagram of another terminal according to an embodiment of the present invention.
  • the terminal includes: a receiver 1501, a transmitter 1502, a memory 1503, and a processor 1504.
  • the receiver 1501, the transmitter 1502, and The memory 1503 is respectively connected to the processor 1504.
  • the memory 1503 stores program code, and the processor 1504 is configured to call the program code to perform the following operations:
  • the terminal is broadcasting the second feature code, determining whether the first feature code is the same as the second feature code being broadcast by the terminal;
  • the first signature is different from the second signature, the first signature is broadcasted and the second signature is continued to be broadcast.
  • processor 1504 is further configured to invoke the program code to perform the following operations:
  • the terminal does not broadcast the signature, the first signature is broadcast.
  • the discovery response further includes a lifetime of the first signature, where the duration is used to indicate a length of time for broadcasting the first signature.
  • the processor 1504 is further configured to call the program code and perform the following operations:
  • the first feature code is the same as the second feature code, determining a broadcast duration of the second feature code according to the lifetime duration included in the discovery response and the remaining duration of the second feature code being broadcast by the terminal, And after the broadcast duration of the second signature is passed, stopping broadcasting the second signature;
  • the code stops broadcasting the first feature code after the survival time.
  • processor 1504 is further configured to invoke the program code to perform the following operations:
  • FIG. 16 is a schematic structural diagram of another system according to an embodiment of the present invention.
  • the system includes: a neighboring functional entity 1601 and a terminal 1602.
  • the terminal 1602 is configured to send a discovery request to the neighboring service function entity 1601, where the discovery request includes the terminal 1602 identifier of the terminal 1602.
  • the proximity service function entity 1601 is configured to send a discovery response to the terminal 1602 according to the discovery request, where the discovery response includes a first feature code allocated by the neighboring service function entity 1601 for the terminal 1602;
  • the terminal 1602 is further configured to receive the discovery response. If the terminal 1602 is broadcasting the second feature code, determine whether the first feature code is the same as the second feature code that the terminal 1602 is broadcasting; if the first feature code is If the second feature code is the same, the terminal 1602 continues to broadcast the second feature code; if the first feature code is different from the second feature code, the terminal 1602 broadcasts the first feature code and continues to broadcast the second feature code. Signature.
  • the terminal 1602 is further configured to broadcast the first feature code if the feature code is not broadcast.
  • the discovery response further includes a lifetime of the first signature, where the duration is used to indicate a length of time for broadcasting the first signature.
  • the terminal 1602 is further configured to: according to the first feature code and the second feature code, according to the lifetime duration included in the discovery response and the remaining duration of the second feature code being broadcast by the terminal 1602 Determining a broadcast duration of the second signature, and stopping broadcasting the second signature after passing the broadcast duration of the second signature; if the first signature is different from the second signature, The first feature code is broadcasted within the duration, and the first feature code is stopped after the duration of the lifetime.
  • the terminal 1602 is further configured to: request a radio resource from the base station, broadcast the first feature code according to the requested radio resource, or select a radio resource from the radio resource pool that the base station pre-allocates to the terminal 1602, based on The selected wireless resource broadcasts the first signature.
  • the completion of the hardware may also be performed by a program to instruct related hardware.
  • the program may be stored in a computer readable storage medium.
  • the storage medium mentioned above may be a read only memory, a magnetic disk or an optical disk.

Landscapes

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

Abstract

本发明实施例提供了一种特征码处理方法、设备和系统,涉及通信技术领域,所述方法包括:接收终端发送的第一发现请求,所述第一发现请求包括所述终端的终端标识;根据所述第一发现请求,向所述终端发送发现响应,所述发现响应包括共用标识,所述共用标识用于指示所述终端的至少两个应用使用一个共用特征码。本发明通过该共用标识该终端获知该邻近业务功能实体分配给该终端的特征码与该邻近业务功能实体分配给该终端其它应用的特征码相同,从而使得该终端在当前正在广播共用特征码时会继续广播该共用特征码,避免了现有技术中存在同一终端同时在不同的无线资源上广播同一特征码的问题,进而避免无线资源的浪费。

Description

特征码处理方法、设备和系统 技术领域
本发明涉及通信技术领域,特别涉及一种特征码处理方法、设备和系统。
背景技术
近距离无线通信技术是指数据不经过网络中转而直接在终端之间传输的技术,终端之间采用近距离无线通信技术进行通信时,无需经过基站,节省了终端到基站之间的无线资源。
第一终端和第二终端在采用近距离无线通信技术进行通信之前,要进行以下操作:第一终端向邻近业务功能实体发送发现请求,该发现请求包括该第一终端的应用用户标识和终端标识,该应用用户标识包括应用标识和用户标识,该应用标识用于确定该第一终端使用的应用为哪一个应用,可以为应用名称、应用序列号等,该用户标识用于确定在该第一终端上登录该应用的用户为哪一个用户,可以为登录该应用的用户账号、用户昵称等,该终端标识用于确定该第一终端是哪一个终端,可以为该第一终端的硬件设备标识,如该第一终端的设备编号或者电话号码等。该邻近业务功能实体根据该发现请求,为第一终端分配一个特征码,第一终端广播该特征码;第二终端将待监听终端的应用用户标识(也即是该第一终端的应用用户标识)发送给该邻近业务功能实体,该邻近业务功能实体将为第一终端分配的特征码发送给第二终端,以便第二终端监听该特征码。当第二终端监听到的特征码与第一终端所广播的特征码相同时,可以采用近距离无线通信技术,与该第一终端进行通信。
在现有技术中,当第一终端使用不同的应用发送了多个发现请求时,邻近业务功能实体为第一终端分配多个相同的特征码,第一终端会独立地广播每个应用对应的特征码,存在相同特征码重复广播的问题,造成无线资源的浪费。
发明内容
为了解决相同特征码重复广播的问题,本发明实施例提供了一种特征码处理方法、设备和系统。所述技术方案如下:
第一方面,提供了一种特征码处理方法,所述方法包括:
接收终端发送的第一发现请求,所述第一发现请求包括所述终端的终端标识;
根据所述第一发现请求,向所述终端发送发现响应,所述发现响应包括共用标识,所述共用标识用于指示所述终端的至少两个应用使用一个共用特征码。
结合第一方面,在第一方面的第一种可能实现方式中,所述发现响应还包括以下至少一个:所述共用特征码和所述共用特征码的生存时长;
其中,所述生存时长用于表示所述终端广播所述共用特征码的时间长度。
结合第一方面的第一种可能实现方式,在第一方面的第二种可能实现方式中,所述共用标识通过所述共用特征码中的指定比特位来表示,或者通过所述共用特征码的扩展比特位来表示。
结合上述任一可能实现方式,在第一方面的第三种可能实现方式中,在所述根据所述第一发现请求,向所述终端发送发现响应之前,所述方法还包括:
根据所述第一发现请求,将所述共用特征码分配给所述终端。
结合第一方面的第三种可能实现方式,在第一方面的第四种可能实现方式中,所述根据所述第一发现请求,将所述共用特征码分配给所述终端,包括:
根据所述终端标识和终端标识与特征码之间的对应关系,获得所述共用特征码,并将所述共用特征码分配给所述终端;或者,
根据所述终端标识,获取所述终端的应用对应关系,其中,所述应用对应关系包括所述终端的至少一个应用用户标识与所述共用特征码之间的对应关系,若在所述应用对应关系中能够获得与所述第一发现请求中包括的应用用户标识对应的所述共用特征码,则将所述共用特征码分配给所述终端;或者,若在所述应用对应关系中未获得与所述第一发现请求中包括的应用用户标识对应的特征码,则将所述应用对应关系中任一应用用户标识对应的特征码分配给所述终端,并将所述第一发现请求中包括的应用用户标识与所述获取到的特征码之间的对应关系保存到所述应用对应关系中。
结合第一方面,在第一方面的第五种可能实现方式中,在所述向所述终端发送发现响应之前,所述方法还包括:
根据在接收所述第一发现请求之前最后一次分配给所述终端的所述共用特征码的生存时长和所述共用特征码的分配时间,确定所述共用特征码的状 态;
若所述共用特征码的状态为失效,则将所述共用特征码携带在所述发现响应中。
结合上述任一种可能实现方式,在第一方面的第六种可能实现方式中,所述接收终端发送的第一发现请求之前,所述方法还包括:
接收所述终端发送的第二发现请求,所述第二发现请求包括所述终端的终端标识;
根据所述第二发现请求,为所述终端分配所述共用特征码,并发送给所述终端。
第二方面,提供了一种特征码处理方法,所述方法包括:
终端向邻近业务功能实体发送第一发现请求,所述第一发现请求包括所述终端的终端标识;
所述终端接收所述邻近业务功能实体根据所述第一发现请求发送的发现响应,所述发现响应包含共用标识,所述共用标识用于指示所述终端的至少两个应用使用一个共用特征码;
若所述终端正在第一无线资源上广播所述共用特征码,且所述发现响应包含所述共用标识,则所述终端在所述第一无线资源上继续广播所述共用特征码。
结合第二方面,在第二方面的第一种可能实现方式中,所述发现响应还包括以下至少一个:所述共用特征码和所述共用特征码的生存时长,其中,所述生存时长用于表示所述终端广播所述共用特征码的时间长度。
结合第二方面的第一种可能实现方式,在第二方面的第二种可能实现方式中,所述共用标识通过所述共用特征码中的指定比特位来表示,或者通过所述共用特征码的扩展比特位来表示。
结合第二方面的第一种可能实现方式,在第二方面的第三种可能实现方式中,所述发现响应包括所述生存时长,所述在所述第一无线资源上继续广播所述共用特征码,包括:
所述终端根据所述发现响应中包括的所述生存时长和所述终端正在广播的特征码的剩余时长,确定所述共用特征码的第一广播时长;
所述终端在经过所述共用特征码的第一广播时长后,停止广播所述共用特 征码。
结合第二方面,在第二方面的第四种可能实现方式中,所述发现响应不包括所述共用特征码,所述方法还包括:
所述终端获取在接收所述发现响应之前所述邻近业务功能实体最后一次分配并发送给所述终端的特征码;
所述终端将所述获取的特征码作为所述共用特征码。
结合第二方面的第四种可能实现方式,在第二方面的第五种可能实现方式中,所述终端获取在接收所述发现响应消息之前所述邻近业务功能实体最后一次分配并发送给所述终端的特征码,包括:
根据所述终端的历史广播记录,获取所述终端接收到所述发现响应之前最后一次广播的特征码作为所述共用特征码。
结合上述任一种可能实现方式,在第二方面的第六种可能实现方式中,所述方法还包括:
若所述终端不在广播所述共用特征码,则所述终端在第二无线资源上广播所述共用特征码。
结合第二方面的第六种可能实现方式,在第二方面的第七种可能实现方式中,
所述终端在第二无线资源上广播所述共用特征码,包括:
所述终端向基站请求所述第二无线资源,基于请求到的所述第二无线资源广播所述共用特征码,或者,
所述终端从所述基站预先分配给所述终端的无线资源池中选取所述第二无线资源,基于所述第二无线资源广播所述共用特征码。
第三方面,提供了一种特征码处理方法,所述方法包括:
终端向邻近业务功能实体发送发现请求,所述发现请求包括所述终端的终端标识;
所述终端接收所述邻近业务功能实体根据所述发现请求发送的发现响应,所述发现响应包括所述邻近业务功能实体为所述终端分配的第一特征码;
若所述终端正在广播第二特征码,则确定所述第一特征码与所述终端正在广播的第二特征码是否相同;
若所述第一特征码与所述第二特征码相同,则所述终端继续广播所述第二 特征码;
若所述第一特征码与所述第二特征码不同,则所述终端广播所述第一特征码,并继续广播所述第二特征码。
结合第三方面,在第三方面的第一种可能实现方式中,所述方法还包括:
若所述终端未广播特征码,则广播所述第一特征码。
结合上述任一种可能实现方式,在第三方面的第二种可能实现方式中,所述发现响应还包括所述第一特征码的生存时长,所述生存时长用于指示广播所述第一特征码的时间长度;
所述方法还包括:
若所述第一特征码与所述第二特征码相同,则根据所述发现响应中包括的所述生存时长和所述终端正在广播的所述第二特征码的剩余时长,确定所述第二特征码的广播时长,并在经过所述第二特征码的广播时长后,停止广播所述第二特征码;
若所述第一特征码与所述第二特征码不同,则在所述生存时长内广播所述第一特征码,在经过所述生存时长后停止广播所述第一特征码。
结合上述任一种可能实现方式,在第三方面的第三种可能实现方式中,所述终端广播所述第一特征码包括:
所述终端向基站请求无线资源,基于请求到的无线资源广播所述第一特征码,或者,
所述终端从所述基站预先分配给所述终端的无线资源池中选取无线资源,基于选取的无线资源广播所述第一特征码。
第四方面,提供了一种特征码处理装置,所述装置包括:
第一请求接收模块,用于接收终端发送的第一发现请求,所述第一发现请求包括所述终端的终端标识;
发送模块,用于根据所述第一发现请求,向所述终端发送发现响应,所述发现响应包括共用标识,所述共用标识用于指示所述终端的至少两个应用使用一个共用特征码。
结合第四方面,在第四方面的第一种可能实现方式中,所述发现响应还包括以下至少一个:所述共用特征码和所述共用特征码的生存时长;
其中,所述生存时长用于表示所述终端广播所述共用特征码的时间长度。
结合第四方面的第一种可能实现方式,在第四方面的第二种可能实现方式中,所述共用标识通过所述共用特征码中的指定比特位来表示,或者通过所述共用特征码的扩展比特位来表示。
结合上述任一种可能实现方式,在第四方面的第三种可能实现方式中,所述装置还包括:
分配模块,用于根据所述第一发现请求,将所述共用特征码分配给所述终端。
结合第四方面的第三种可能实现方式,在第四方面的第四种可能实现方式中,所述分配模块包括:
第一分配单元,用于根据所述终端标识和终端标识与特征码之间的对应关系,获得所述共用特征码,并将所述共用特征码分配给所述终端;或者,
第二分配单元,用于根据所述终端标识,获取所述终端的应用对应关系,其中,所述应用对应关系包括所述终端的至少一个应用用户标识与所述共用特征码之间的对应关系,若在所述应用对应关系中能够获得与所述第一发现请求中包括的应用用户标识对应的所述共用特征码,则将所述共用特征码分配给所述终端;或者,若在所述应用对应关系中未获得与所述第一发现请求中包括的应用用户标识对应的特征码,则将所述应用对应关系中任一应用用户标识对应的特征码分配给所述终端,并将所述第一发现请求中包括的应用用户标识与所述获取到的特征码之间的对应关系保存到所述应用对应关系中。
结合第四方面,在第四方面的第五种可能实现方式中,所述装置还包括:
状态确定模块,用于根据在接收所述第一发现请求之前最后一次分配给所述终端的所述共用特征码的生存时长和所述共用特征码的分配时间,确定所述共用特征码的状态;
特征码处理模块,用于若所述共用特征码的状态为失效,则将所述共用特征码携带在所述发现响应中。
结合上述任一种可能实现方式,在第四方面的第六种可能实现方式中,所述装置还包括:
第二请求接收模块,用于接收所述终端发送的第二发现请求,所述第二发现请求包括所述终端的终端标识;
所述分配模块,用于根据所述第二发现请求,为所述终端分配所述共用特征码,并发送给所述终端。
第五方面,提供了一种特征码处理装置,所述装置包括:
请求发送模块,用于向邻近业务功能实体发送第一发现请求,所述第一发现请求包括所述装置的终端标识;
接收模块,用于接收所述邻近业务功能实体根据所述第一发现请求发送的发现响应,所述发现响应包含共用标识,所述共用标识用于指示所述装置的至少两个应用使用一个共用特征码;
第一广播模块,用于若正在第一无线资源上广播所述共用特征码,且所述发现响应包含所述共用标识,则在所述第一无线资源上继续广播所述共用特征码。
结合第五方面,在第五方面的第一种可能实现方式中,所述发现响应还包括以下至少一个:所述共用特征码和所述共用特征码的生存时长,其中,所述生存时长用于表示所述装置广播所述共用特征码的时间长度。
结合第五方面的第一种可能实现方式,在第五方面的第二种可能实现方式中,所述共用标识通过所述共用特征码中的指定比特位来表示,或者通过所述共用特征码的扩展比特位来表示。
结合第五方面的第一种可能实现方式,在第五方面的第三种可能实现方式中,所述发现响应包括所述生存时长,所述第一广播模块用于根据所述发现响应中包括的所述生存时长和所述装置正在广播的特征码的剩余时长,确定所述共用特征码的第一广播时长;在经过所述共用特征码的第一广播时长后,停止广播所述共用特征码。
结合第五方面,在第五方面的第四种可能实现方式中,所述发现响应不包括所述共用特征码,所述装置还包括:
获取模块,用于获取在接收所述发现响应之前所述邻近业务功能实体最后一次分配并发送给所述装置的特征码;将所述获取的特征码作为所述共用特征码。
结合第五方面的第四种可能实现方式,在第五方面的第五种可能实现方式中,所述获取模块还用于根据历史广播记录,获取接收到所述发现响应之前最后一次广播的特征码作为所述共用特征码。
结合上述任一种可能实现方式,在第五方面的第六种可能实现方式中,所述装置还包括:
第二广播模块,用于若不在广播所述共用特征码,则在第二无线资源上广播所述共用特征码。
结合第五方面的第六种可能实现方式,在第五方面的第七种可能实现方式中,所述第二广播模块用于向基站请求所述第二无线资源,基于请求到的所述第二无线资源广播所述共用特征码,或者,从所述基站预先分配给所述装置的无线资源池中选取所述第二无线资源,基于所述第二无线资源广播所述共用特征码。
第六方面,提供了一种特征码处理装置,所述装置包括:
请求发送模块,用于向邻近业务功能实体发送发现请求,所述发现请求包括所述装置的终端标识;
接收模块,用于接收所述邻近业务功能实体根据所述发现请求发送的发现响应,所述发现响应包括所述邻近业务功能实体为所述装置分配的第一特征码;
确定模块,用于若所述装置正在广播第二特征码,则确定所述第一特征码与所述装置正在广播的第二特征码是否相同;
第一广播模块,用于若所述第一特征码与所述第二特征码相同,则继续广播所述第二特征码;
第二广播模块,用于若所述第一特征码与所述第二特征码不同,则广播所述第一特征码,并继续广播所述第二特征码。
结合第六方面,在第六方面的第一种可能实现方式中,所述装置还包括:
第三广播模块,用于若所述装置未广播特征码,则广播所述第一特征码。
结合上述任一种可能实现方式,在第六方面的第二种可能实现方式中,所述发现响应还包括所述第一特征码的生存时长,所述生存时长用于指示广播所述第一特征码的时间长度;
所述第一广播模块,用于若所述第一特征码与所述第二特征码相同,则根据所述发现响应中包括的所述生存时长和所述第二特征码的剩余时长,确定所述第二特征码的广播时长,并在经过所述第二特征码的广播时长后,停止广播所述第二特征码;
所述第二广播模块,用于若所述第一特征码与所述第二特征码不同,则在所述生存时长内广播所述第一特征码,在经过所述生存时长后停止广播所述第 一特征码。
结合上述任一种可能实现方式,在第六方面的第三种可能实现方式中,所述第二广播模块,还用于向基站请求无线资源,基于请求到的无线资源广播所述第一特征码,或者,从所述基站预先分配给所述装置的无线资源池中选取无线资源,基于选取的无线资源广播所述第一特征码;
所述第三广播模块,还用于向基站请求无线资源,基于请求到的无线资源广播所述第一特征码,或者,从所述基站预先分配给所述装置的无线资源池中选取无线资源,基于选取的无线资源广播所述第一特征码。
第七方面,提供了一种邻近业务功能实体,所述邻近业务功能实体包括:网络接口、存储器和处理器,所述网络接口和所述存储器分别与所述处理器连接,所述存储器存储有程序代码,所述处理器用于调用所述程序代码,执行以下操作:
接收终端发送的第一发现请求,所述第一发现请求包括所述终端的终端标识;
根据所述第一发现请求,向所述终端发送发现响应,所述发现响应包括共用标识,所述共用标识用于指示所述终端的至少两个应用使用一个共用特征码。
第八方面,提供了一种终端,所述终端包括:接收器、发射器、存储器和处理器,所述接收器、所述发射器和所述存储器分别与所述处理器连接,所述存储器存储有程序代码,所述处理器用于调用所述程序代码,执行以下操作:
向邻近业务功能实体发送第一发现请求,所述第一发现请求包括所述终端的终端标识;
接收所述邻近业务功能实体根据所述第一发现请求发送的发现响应,所述发现响应包含共用标识,所述共用标识用于指示所述终端的至少两个应用使用一个共用特征码;
若正在第一无线资源上广播所述共用特征码,且所述发现响应包含所述共用标识,则在所述第一无线资源上继续广播所述共用特征码。
第九方面,提供了一种系统,所述系统包括:邻近业务功能实体和终端;
所述终端用于向所述邻近业务功能实体第一发现请求,所述第一发现请求包括所述终端的终端标识;
所述邻近业务功能实体用于接收所述第一发现请求,根据所述第一发现请求,向所述终端发送发现响应,所述发现响应包括共用标识,所述共用标识用于指示所述终端的至少两个应用使用一个共用特征码。
所述终端还用于接收所述邻近业务功能实体根据所述第一发现请求发送的所述发现响应,若所述终端正在第一无线资源上广播所述共用特征码,且所述发现响应包含所述共用标识,则所述终端在所述第一无线资源上继续广播所述共用特征码。
第十方面,提供了一种终端,所述终端包括:接收器、发射器、存储器和处理器,所述接收器、所述发射器和所述存储器分别与所述处理器连接,所述存储器存储有程序代码,所述处理器用于调用所述程序代码,执行以下操作:
终端向邻近业务功能实体发送发现请求,所述发现请求包括所述终端的终端标识;
所述终端接收所述邻近业务功能实体根据所述发现请求发送的发现响应,所述发现响应包括所述邻近业务功能实体为所述终端分配的第一特征码;
若所述终端正在广播第二特征码,则确定所述第一特征码与所述终端正在广播的第二特征码是否相同;
若所述第一特征码与所述第二特征码相同,则所述终端继续广播所述第二特征码;
若所述第一特征码与所述第二特征码不同,则所述终端广播所述第一特征码,并继续广播所述第二特征码。
第十一方面,提供了一种系统,所述系统包括:邻近业务功能实体和终端;
所述终端用于向所述邻近业务功能实体发送发现请求,所述发现请求包括所述终端的终端标识;
所述邻近业务功能实体用于根据所述发现请求,向所述终端发送发现响应,所述发现响应包括所述邻近业务功能实体为所述终端分配的第一特征码;
所述终端还用于接收所述发现响应,若所述终端正在广播第二特征码,则确定所述第一特征码与所述终端正在广播的第二特征码是否相同;若所述第一 特征码与所述第二特征码相同,则所述终端继续广播所述第二特征码;若所述第一特征码与所述第二特征码不同,则所述终端广播所述第一特征码,并继续广播所述第二特征码。
本发明实施例提供的技术方案的有益效果是:
根据接收到的终端发送的第一发现请求,向终端发送发现响应,该发现响应包括共用标识,该共用标识能够指示该终端的至少两个应用使用一个共用特征码,通过该共用标识该终端获知该邻近业务功能实体分配给该终端的特征码与该邻近业务功能实体分配给该终端其它应用的特征码相同,从而使得该终端在当前正在广播共用特征码时会继续广播该共用特征码,避免了现有技术中存在同一终端同时在不同的无线资源上广播同一特征码的问题,进而避免无线资源的浪费。
附图说明
为了更清楚地说明本发明实施例中的技术方案,下面将对实施例描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。
图1是本发明实施例所涉及的实施环境的网络架构示意图;
图2是本发明实施例所涉及的实施环境的另一网络架构示意图;
图3是本发明实施例提供的一种特征码处理方法的流程图;
图4是本发明实施例提供的另一种特征码处理方法的流程图;
图5是本发明实施例提供的另一种特征码处理方法的流程图;
图6是本发明实施例提供的生存时长示意图;
图7是本发明实施例提供的另一种特征码处理方法的流程图;
图8是本发明实施例提供的另一种特征码处理方法的流程图;
图9是本发明实施例提供的一种特征码处理装置的结构示意图;
图10是本发明实施例提供的一种特征码处理装置的结构示意图;
图11是本发明实施例提供的另一种特征码处理装置的结构示意图;
图12是本发明实施例提供的一种邻近业务功能实体的结构示意图;
图13是本发明实施例提供的一种终端的结构示意图;
图14是本发明实施例提供的一种系统的结构示意图;
图15是本发明实施例提供的另一种终端的结构示意图;
图16是本发明实施例提供的另一种系统的结构示意图。
具体实施方式
为使本发明的目的、技术方案和优点更加清楚,下面将结合附图对本发明实施方式作进一步地详细描述。
图1是本发明实施例所涉及的一种实施环境的网络架构示意图,参见图1,该实施环境包括:终端101、邻近业务功能实体102和基站103。
其中,邻近业务功能实体102用于为终端101提供近距离通信服务。该邻近业务功能实体用于为第一终端分配特征码,第一终端用于广播该邻近业务功能实体102分配的特征码。该邻近业务功能实体102还用于将该第一终端的特征码发送给第二终端,由第二终端监听该第一终端广播的特征码。当第二终端监听到第一终端所广播的特征码时,可以采用近距离无线通信技术,与该第一终端进行通信。另外,基站103用于为终端101分配无线资源,终端101用于基于基站103分配的无线资源广播特征码。
终端101向邻近业务功能实体102发送发现请求,该发现请求包括终端101的终端标识。邻近业务功能实体102在接收终端101发送的发现请求后,向终端101发送发现响应,该发现响应可以携带分配给终端101的特征码,或者携带用于指示邻近业务功能实体102为终端101分配的特征码的指示信息。终端101根据该发现响应携带的信息确定邻近业务功能实体102分配给终端101的特征码。
终端101在确定邻近业务功能实体102分配给终端101的特征码之后,基于基站103分配给终端101的无线资源,广播确定的特征码,以便其他终端能够监听到该特征码,并根据监听到的特征码从邻近业务功能实体102获取终端101的终端标识,进而基于获取的终端101的终端标识与终端101进行通信。
其中,终端标识用于标识一个终端,具体可以为终端的设备编号,本发明实施例对此不做限定。图2是本发明实施例所涉及的另一种实施环境的网络架构示意图,参见图2,该实施环境可以包括:应用服务器、签约管理实体、移动管理实体、服务网关、公共数据网关、接入网络、邻近业务功能实体以及终端1和终端2。应用服务器是指已与邻近业务功能实体签约的服务器,该应用 服务器与该邻近业务功能实体签约之后,该邻近业务功能实体可以与使用该应用服务器所关联应用的终端进行交互,使得后续使用该应用的终端能够根据该邻近业务功能实体为该终端分配的特征码,与其他使用该应用的终端进行通信。
终端1和终端2安装了应用服务器关联的应用,通过该应用,在该应用服务器进行注册,则该应用服务器为终端1和终端2分配应用用户标识。终端1和终端2均可以通过安装的应用,从安装的应用所对应的应用服务器获取应用用户标识。其中,获取的应用用户标识可以包括应用标识和用户标识,该应用标识可以用于标识一个应用,具体可以为应用名称或应用版本名称等,该用户标识用于标识一个用户,具体可以为用户账号、用户昵称或用户编号等,本发明实施例对此均不做限定。
图3是本发明实施例提供的一种特征码处理方法的流程图,参见图3,本发明实施例的执行主体为邻近业务功能实体,该方法包括:
301、接收终端发送的第一发现请求,该第一发现请求包括该终端的终端标识。
其中,该第一发现请求可以用于请求分配特征码给该终端。
302、根据该第一发现请求,向该终端发送发现响应,该发现响应包括共用标识,该共用标识用于指示该终端的至少两个应用使用一个共用特征码。
其中,该发现响应还可以包括以下至少一个:该共用特征码和该共用特征码的生存时长;其中,该生存时长用于表示该终端广播该共用特征码的时间长度。
进一步地,该共用特征码可以包含该共用标识。具体地,该共用标识可以通过该共用特征码中的指定比特位来表示,例如,该指定比特位可以为该特征码的所有比特位中的一位或多位,且该指定比特位还可以是位于该特征码的预设位置的比特位,如第一个比特位、前两个比特位等等;该共用标识也可以通过该共用特征码的扩展比特位来表示,例如,在该共用特征码的前或后扩展一个或多个比特位来表示。
本发明实施例提供的方法,根据接收到的终端发送的第一发现请求,向终端发送发现响应,该发现响应包括共用标识,该共用标识能够指示该终端的至少两个应用使用一个共用特征码,通过该共用标识该终端获知该邻近业务功能实体分配给该终端的特征码与该邻近业务功能实体分配给该终端其它应用的 特征码相同,从而使得该终端在当前正在广播共用特征码时会继续广播该共用特征码,避免了现有技术中存在同一终端同时在不同的无线资源上广播同一特征码的问题,进而避免无线资源的浪费。
可选地,在步骤302之前,该方法还包括:
根据该第一发现请求,将该共用特征码分配给该终端。
可选地,该根据该第一发现请求,将该共用特征码分配给该终端,包括:
根据该终端标识和终端标识与特征码之间的对应关系,获得该共用特征码;
将该共用特征码分配给该终端。
具体地,可以在该对应关系中查找该终端标识,获得与该终端标识对应的特征码。
可选地,该第一发现请求还包括该终端的应用用户标识,该根据该第一发现请求,将共用特征码分配给该终端,包括:
根据该终端标识,获取该终端的应用对应关系,其中,该应用对应关系包括该终端的至少一个应用用户标识与该共用特征码之间的对应关系;
若在该应用对应关系中能够获得与该第一发现请求中包括的应用用户标识对应的该共用特征码,则将该共用特征码分配给该终端;或者。
若在该应用对应关系中未获得与该第一发现请求中包括的应用用户标识对应的特征码,则将该应用对应关系中的任一应用用户标识对应的特征码分配给该终端,并将该第一发现请求中包括的应用用户标识与该获取到的特征码之间的对应关系保存到该应用对应关系中。
具体地,在该应用对应关系中查找该第一发现请求中包括的应用用户标识,获得与该第一发现请求中包括的应用用户标识对应的该共用特征码。
可选地,在步骤302中向该终端发送发现响应之前,该方法还包括:
根据在接收该第一发现请求之前最后一次分配给该终端的该共用特征码的生存时长和该共用特征码的分配时间,确定该共用特征码的状态;
若该共用特征码的状态为失效,则将该共用特征码携带在该发现响应中。
其中,该生存时长可以用于表示该终端广播该共用特征码的时间长度。
可选地,该接收终端发送的第一发现请求之前,该方法还包括:
接收该终端发送的第二发现请求,该第二发现请求包括该终端的终端标识;
根据该第二发现请求,为该终端分配该共用特征码,并发送给该终端。
进一步可选地,在根据该第二发现请求,为该终端分配该共用特征码之后,上述方法还包括:建立该终端标识与该共用特征码之间的对应关系。
其中,该第二发现请求可以用于请求分配特征码给该终端。
上述所有可选技术方案,可以采用任意结合形成本发明的可选实施例,在此不再一一赘述。
图4是本发明实施例提供的另一种特征码处理方法的流程图,参见图4,本发明实施例的执行主体为终端,该方法包括:
401、终端向邻近业务功能实体发送第一发现请求,该第一发现请求包括该终端的终端标识。
其中,该第一发现请求可以用于请求该邻近业务功能实体为该终端分配特征码。
402、该终端接收该邻近业务功能实体根据该第一发现请求发送的发现响应,该发现响应包含共用标识,该共用标识用于指示该终端的至少两个应用使用一个共用特征码。
其中,该发现响应还可以包括以下至少一个:该共用特征码和该共用特征码的生存时长,其中,该生存时长用于表示该终端广播该共用特征码的时间长度。
403、若该终端正在第一无线资源上广播该共用特征码,且该终端确定该发现响应包含该共用标识,则在该第一无线资源上继续广播该共用特征码。
其中,该第一无线资源具体可以是分配给该终端的空口资源,属于现有技术,此处不再赘述。
本发明实施例提供的方法,终端向邻近业务功能实体发送第一发现请求,邻近业务功能实体返回的发现响应包括共用标识,该共用标识能够指示该终端的至少两个应用使用一个共用特征码,若该终端正在第一无线资源上广播该共用特征码,且该终端确定该发现响应包含该共用标识,则在该第一无线资源上继续广播该共用特征码,而无需在其它的无线资源上再广播该邻近业务功能实体分配给该终端的特征码,避免了特征码的重复广播以及无线资源的浪费。
可选地,当该发现响应包括该生存时长时,步骤403中在该第一无线资源上继续广播该共用特征码,可以包括:
该终端根据该发现响应中包括的该生存时长和该终端正在广播的特征码的剩余时长,确定该共用特征码的第一广播时长;
该终端在经过该共用特征码的第一广播时长后,停止广播该共用特征码。
可选地,当该发现响应不包括该共用特征码,该方法还包括:
该终端获取在接收该发现响应之前该邻近业务功能实体最后一次分配并发送给该终端的特征码;
该终端将该获取的特征码作为该共用特征码。
可选地,该根据该发现响应获取分配给该终端的共用特征码,包括:
根据该终端的历史广播记录,获取该终端接收到该发现响应之前最后一次广播的特征码作为该共用特征码。
可选地,该方法还包括:
若该终端不在广播该共用特征码,则该终端在第二无线资源上广播该共用特征码。
其中,该第二无线资源可以与该第一无线资源相同,也可以不同。
可选地,该终端在第二无线资源上广播该共用特征码,包括:
该终端向基站请求该第二无线资源,基于请求到的该第二无线资源广播该共用特征码,或者,
该终端从该基站预先分配给该终端的无线资源池中选取该第二无线资源,基于选取的该第二无线资源广播该共用特征码。
上述所有可选技术方案,可以采用任意结合形成本发明的可选实施例,在此不再一一赘述。
图5是本发明实施例提供的另一种特征码处理方法的流程图,参见图5,本发明实施例的交互主体为终端和邻近业务功能实体,该方法包括:
501、终端向邻近业务功能实体发送第一发现请求,该第一发现请求包括该终端的应用用户标识和该终端的终端标识。
如果该终端要采用近距离无线通信技术与其他终端进行通信,则需要先广播特征码,而为了广播特征码,该终端要先向邻近业务功能实体发送发现请求,该发现请求用于请求该邻近业务功能实体分配特征码给该终端。其中,该发现请求可以由广播特征码的指令触发,当该终端接收到广播特征码的指令时,向邻近业务功能实体发送该发现请求,该发现请求还可以由该终端启动某一应用 的操作默认触发或者采用其他方式触发,本发明实施例对此不做限定。
本发明实施例仅以终端发送的发现请求为第一发现请求为例进行说明,而该终端每次发送的发现请求的处理过程与该第一发现请求的处理过程类似,在此不再赘述。
其中,该终端可以为手机、电脑等设备,该终端标识用于唯一确定该终端,可以为该终端的手机号码、设备编号等,本发明实施例对此不做限定。为了便于该邻近业务功能实体确定该终端,在发送该第一发现请求之前,该终端可以将该终端标识携带在该第一发现请求中。
在实际应用过程中,该终端可以安装多种应用,对于每种应用来说,该终端可以通过该应用,在该应用关联的应用服务器上注册用户标识,该应用服务器根据该应用标识和该终端注册的用户标识,将应用用户标识分配给该终端,该应用用户标识包括该应用标识和该用户标识,该终端可以基于该应用用户标识登录该应用服务器。
该终端使用的应用可以为即时通信应用、支付应用等多种应用,相应的,该应用服务器可以为即时通信服务器或者支付服务器等多种服务器。该应用标识可以为该应用的名称、版本号等,该用户标识可以为用户账号、用户昵称、用户编号等,本发明实施例对此均不做限定。
例如,用户Tom可以在应用“application1”的服务器1上注册用户标识“Tom”,得到应用用户标识Tom@application1.com,用户Tom可以在终端上基于应用用户标识“Tom@application1.com”登录该服务器1,用户Tom可以在应用“application2”的服务器2上注册用户标识“Tom”,得到应用用户标识Tom@application2.com,用户Tom可以在终端上基于应用用户标识“Tom@application2.com”登录服务器2。
在本发明实施例中,该终端可以通过不同的应用向该邻近业务功能实体发送该第一发现请求,则为了便于该邻近业务功能实体获知该终端当前使用的应用是哪一个应用,该终端可以先获取当前所使用的应用用户标识,将该应用用户标识携带在该第一发现请求中,则该第一发现请求中包括该应用用户标识。
需要说明的是,上述过程中涉及的应用是指支持近距离无线通信技术的应用,仅有使用支持近距离无线通信技术的应用的终端才能通过该邻近业务功能实体的验证,该邻近业务功能实体才会将特征码分配给该终端。那么,对于任一应用服务器来说,该应用服务器可以与该邻近业务功能实体签约,签约之后 即可支持近距离无线通信技术,该终端通过该应用向该邻近业务功能实体发送该第一发现请求,该第一发现请求包括该应用用户标识,该邻近业务功能实体接收到该第一发现请求,根据该应用用户标识中包含的应用标识确定该终端验证通过,将特征码分配给该终端,该终端即可采用近距离无线通信技术,与其他终端进行通信。
当然,该邻近业务功能实体还可以将近距离无线通信技术开放给所有的应用,不论该终端通过哪一个应用发送该第一发现请求,该邻近业务功能实体均可将特征码分配给该终端。那么,该终端向该邻近业务功能实体发送的第一发现请求可以不包括该应用用户标识,本发明实施例对该第一发现请求是否包括该终端的应用用户标识不做限定。
502、该邻近业务功能实体接收到该第一发现请求时,根据该终端标识和终端标识与特征码之间的对应关系,获得该终端标识对应的共用特征码,将该终端标识对应的共用特征码分配给该终端。
可选地,在该步骤502之前,该方法还包括:该邻近业务功能实体接收该终端发送的第二发现请求,该第二发现请求包括该终端的终端标识;该邻近业务功能实体根据该第二发现请求为该终端分配该共用特征码,并建立该终端标识与该共用特征码之间的对应关系。
本发明实施例以该邻近业务功能实体第一次接收到该终端发送的发现请求为第二发现请求,后续过程中再次接收到该终端发送的发现请求为该第一发现请求为例进行说明,而在实际应用时,该邻近业务功能实体每次接收到该终端的发现请求时,根据该发现请求包括的终端标识,查询已建立的终端标识与特征码之间的对应关系,如果未查询到该终端的终端标识所对应的共用特征码,则确定第一次接收到该终端的发现请求,之前还未给该终端分配过特征码。而如果查询到了该终端的终端标识所对应的共用特征码,则确定之前曾给该终端分配过该共用特征码。
进一步地,当该邻近业务功能实体第一次接收到该终端的发现请求时,为该终端分配该共用特征码,建立该发现请求包括的终端标识与该共用特征码之间的对应关系,便于以该终端的终端标识为索引查询到该共用特征码。后续过程中,当该邻近业务功能实体再次接收到该终端的发现请求时,无需再为该终端分配新的特征码,而可以直接根据该终端的终端标识,查询已建立的终端标识与特征码之间的对应关系,获得该终端标识对应的共用特征码,将该共用特 征码分配给该终端。
通过每次为该终端分配相同的特征码,避免了同一终端占用多个特征码,节省了特征码资源。
本发明实施例仅以该邻近业务功能实体建立终端的终端标识与分配给该终端的共用特征码之间的对应关系为例进行说明,而在实际应用过程中,终端可能会通过不同的应用向该邻近业务功能实体发送发现请求,发现请求中包括该终端的终端标识和应用用户标识。为了对该终端使用的应用进行区分,该邻近业务功能实体还可以建立终端的应用用户标识与该共用特征码之间的对应关系,以便以终端的应用用户标识为索引查询该共用特征码。
具体地,该邻近业务功能实体第一次接收到该终端发送的第二发现请求时,获取该第二发现请求包括的终端标识和应用用户标识,将共用特征码分配给该终端,并根据该终端的终端标识,建立该终端的应用对应关系,该应用对应关系中包括该应用用户标识与该邻近业务功能实体分配给该终端的共用特征码之间的对应关系。那么,当该邻近业务功能实体后续接收到该终端发送的第一发现请求时,根据该第一发现请求包括的终端标识,获取该终端的应用对应关系,根据该应用对应关系以及该第一发现请求中包括的应用用户标识,获得与该第一发现请求中包括的应用用户标识对应的该共用特征码,将该共用特征码分配给该终端。
如果该终端通过不同的应用发送该第一发现请求和该第二发现请求,则该第一发现请求中包括的应用用户标识与该第二发现请求中的应用用户标识不同,该邻近业务功能实体所建立的应用对应关系中可能不包括该第一发现请求中包括的应用用户标识所对应的特征码,该邻近业务功能实体根据该应用对应关系和该第一发现请求中包括的应用用户标识,不能获得对应的特征码。
此时,该邻近业务功能实体可以为该终端分配一个与该共用特征码不同的新特征码,建立该第一发现请求中的包括的应用用户标识与该新特征码之间的对应关系,并将该对应关系保存到该终端的应用对应关系中,将该新特征码分配给该终端。
然而,该邻近业务功能实体为该终端的不同应用分配不同的特征码会造成特征码资源的浪费,且该终端会通过不同的应用获取基站的无线资源,基于不同的无线资源来广播不同的特征码,还会造成无线资源的浪费。为了避免不必要的资源浪费,该邻近业务功能实体可以为同一终端上的不同应用分配相同的 特征码。
为此,当该邻近业务功能实体根据该终端的应用对应关系以及该第一发现请求中包括的应用用户标识,未获得该第一发现请求中包括的应用用户标识对应的特征码时,获取该应用对应关系中的任一应用用户标识对应的特征码,该特征码即为该邻近业务功能实体曾经分配给该终端的特征码,则该邻近业务功能实体可以将该任一应用用户标识对应的特征码分配给该终端,并将该第一发现请求中包括的应用用户标识与该获取到的特征码之间的对应关系保存到该应用对应关系中,保证了该应用对应关系中不同的应用用户标识对应于相同的特征码,无论该终端使用哪一个应用,该邻近业务功能实体均可以将该特征码分配给该终端,避免了资源浪费。
例如,该终端的应用对应关系可以如下表1所示。该应用对应关系以该终端的终端标识“188XXXX8903”为索引,在该应用对应关系中,该终端使用的三个应用用户标识“Tom@application1.com”、“Tom@application2.com”、“Tom.app3”所对应的特征码均为“code1”。
表1
Figure PCTCN2015074372-appb-000001
503、该邻近业务功能实体向该终端发送发现响应,该发现响应包括该共用特征码以及共用标识。
在本发明实施例中,该邻近业务功能实体为该终端分配的共用特征码由该终端的终端标识与特征码之间的对应关系确定,即该邻近业务功能实体分配给该终端的共用特征码与该邻近业务功能实体接收到该第一发现请求之前最后一次分配并发送给该终端的特征码相同。该邻近业务功能实体可以将共用标识携带在该发现响应中,该共用标识用于指示该终端采用邻近业务功能实体最后一次分配并发送给该终端的共用特征码进行广播。
该邻近业务功能实体可以为该终端的不同应用分配相同的特征码,也可以分配不同的特征码。如果该邻近业务功能实体为该终端上的不同应用分配不同 的特征码,则该邻近业务功能实体在接收到该第一发现请求之前最后一次分配并发送给该终端的特征码与该邻近业务功能实体根据该第一发现请求分配给该终端的特征码可能不同。为了便于区分,将该邻近业务功能实体在接收到该第一发现请求之前最后一次分配并发送给该终端的特征码称为第一特征码,将该邻近业务功能实体根据该第一发现请求分配给该终端的特征码称为第二特征码,则该邻近业务功能实体可以在将第二特征码分配给该终端后,获取该第一特征码,判断该第二特征码与该第一特征码是否相同,如果相同,将该共用标识携带在该发现响应中,如果不同,则无需将该共用标识携带在该发现响应中。
如果该邻近业务功能实体为该终端的不同应用分配相同的特征码,那么该邻近业务功能实体分配给该终端的特征码与接收到该第一发现请求之前最后一次分配并发送给该终端的特征码相同,该邻近业务功能实体可以直接将该共用标识携带在该发现响应中。
需要说明的是,在本实施例以及上述各实施例中,该邻近业务功能实体将该共用标识携带在该发现响应中的方式可以包括以下方式(1)和(2)中的至少一种:
(1)该邻近业务功能实体生成发现响应,并将该发现响应的共用标识字段的值设置为预设值。后续该终端接收到该发现响应,确定该发现响应的共用标识字段的值为预设值时,即可确定该发现响应包括该共用标识。
该邻近业务功能实体在发现响应中预留一个共用标识字段,该共用标识字段的值为预设值表示发现响应中包括共用标识,该共用标识字段的值不是该预设值则表示发现响应中不包括共用标识。
在另一实施方式中,如果该邻近业务功能实体第一次将特征码分配给该终端,或者分配给该终端的特征码与接收到该第一发现请求之前最后一次分配并发送给该终端的特征码不同时,可以将该发现响应的共用标识字段的值设置为除该预设值以外的值。后续当该终端确定该发现响应的共用标识字段的值不是该预设值时,即可确定该发现响应不包括该共用标识。
(2)该邻近业务功能实体按照预设规则,生成包括多个比特位的特征码,使得该特征码的指定比特位上的值符合该预设规则,即特征码中包含上述共用标识,将生成的特征码分配给终端。那么,当该终端接收到该邻近业务功能实体返回的该发现响应时,可以在确定该特征码的指定比特位上的值符合该预设 规则时,确定该发现响应包括该共用标识。
在另一实施方式中,如果该邻近业务功能实体第一次将特征码分配给该终端,或者分配给该终端的特征码与接收到该第一发现请求之前最后一次分配并发送给该终端的特征码不同时,可以将指定比特位上的值不符合该预设规则的特征码分配给该终端。那么,当该终端接收到该邻近业务功能实体返回的该发现响应,并确定该特征码的指定比特位上的值不符合该预设规则时,即可确定该发现响应不包括该共用标识。
其中,该指定比特位可以为该特征码的所有比特位中的一位或多位,且该指定比特位可以位于该特征码的预设位置,如第一个比特位、前两个比特位等等,该预设规则可以规定多个指定比特位上的值的排列方式,或者规定多个指定比特位上的值中偶数值的个数等等,该指定比特位和该预设规则均可以由该邻近业务功能实体与终端协商确定,本发明实施例对此不做限定。
需要说明的是,该邻近业务功能实体可以采用上述两种方式的其中一种或两种来设置该共用标识。具体采用哪种方式可以由该邻近业务功能实体与终端协商确定。当然,该邻近业务功能实体还可以采用其他的方式设置该共用标识,本发明实施例对此不做限定。
另外,本发明实施例中该邻近业务功能实体在发送该发现响应之前,可以将分配给该终端的共用特征码携带在该发现响应中,使得该发现响应包括该共用特征码,该终端可以根据该发现响应中包括的特征码获知该邻近业务功能实体分配给该终端的特征码。
在实际应用中,如果该邻近业务功能实体分配给该终端的特征码与接收到该第一发现请求之前最后一次分配并发送给该终端的特征码相同,该发现响应中包括该共用标识。该终端确定该发现响应中包括该共用标识后,可以根据历史广播记录确定该邻近业务功能实体最后一次分配并发送给该终端的特征码是哪一个特征码,从而确定该邻近业务功能实体分配给该终端的特征码。其中,该历史广播记录由该终端每次广播特征码时生成,该历史广播记录可以包括广播的特征码、该特征码开始广播的时间、广播时长等,本发明实施例对此不做限定。
或者,该终端确定该发现响应中包括该共用标识,且正在广播该邻近业务功能实体最后一次分配并发送给该终端的特征码时,可以根据当前广播的特征码确定该邻近业务功能实体分配给该终端的特征码。
也即是,该终端可以根据该共用标识确定该邻近业务功能实体分配给该终端的特征码,该邻近业务功能实体无需将该分配给该终端的特征码携带该发现响应中,即该发现响应中可以包括该共用标识而不包括特征码,本发明实施例对该发现响应是否包括分配给该终端的特征码不做限定。
进一步地,该邻近业务功能实体在接收到该第一发现请求之前最后一次为该终端分配该共用特征码时,可以设置该共用特征码的生存时长,并记录该共用特征码的分配时间。其中,该生存时长用于表示该终端广播该共用特征码的时间长度。则该邻近业务功能实体根据该第一发现请求向该终端发送该发现响应之前,可以根据在接收该第一发现请求之前最后一次分配给该终端的该共用特征码的生存时长和该共用特征码的分配时间,确定该共用特征码的状态。该共用特征码的状态包括失效和未失效。如果当前时间与该共用特征码的分配时间之间的时间间隔已超出该生存时长,表示该终端已停止广播该共用特征码,则该邻近业务功能实体确定该共用特征码已失效,将该共用特征码携带在该发现响应中。如果当前时间与该共用特征码的分配时间之间的时间间隔未超出该生存时长,表示该终端还未停止广播该共用特征码,则该邻近业务功能实体确定该共用特征码未失效,无需将该共用特征码携带在该发现响应中。
该邻近业务功能实体接收到该第一发现请求之后,还可以为分配给该终端的特征码设置生存时长,以表示该终端广播该特征码的时间长度。该邻近业务功能实体将该生存时长携带在该发现响应中,使得该发现响应包括该生存时长,该终端能够根据该特征码的生存时长,对特征码的广播过程进行处理。
其中,该邻近业务功能实体可以为所有分配给该终端的特征码设置相同的生存时长,也可以为通过不同应用分配给该终端的特征码设置不同的生存时长,本发明实施例对此不做限定。该邻近业务功能实体为通过不同应用分配给该终端的特征码设置不同的生存时长时,可以根据该终端的应用用户标识确定该应用用户标识中包括的应用标识,根据该应用标识确定分配给该终端的特征码的生存时长,对于不同的应用标识,该邻近业务功能实体所确定的生存时长不同。本发明实施例对该邻近业务功能实体确定生存时长的方式不做限定。
504、该终端接收到该发现响应时,确定该发现响应包括该共用标识,如果该终端正在第一无线资源上广播共用特征码,则在该第一无线资源上继续广播该共用特征码。
其中,该第一无线资源是分配给该终端的空口资源,不再赘述。
如果该发现响应中包括该共用标识,表示该邻近业务功能实体分配给该终端的特征码与该邻近业务功能实体最后一次分配并发送给该终端的共用特征码相同。如果该终端正在广播该共用特征码,则该终端根据该共用标识可以确定该邻近业务功能实体分配给该终端的特征码与正在广播的共用特征码相同,此时该终端无需再广播该邻近业务功能实体分配给该终端的特征码,只需继续广播该共用特征码即可,避免了广播该邻近业务功能实体分配给该终端的特征码所造成的资源浪费。
进一步地,如果该发现响应中不仅包括该共用标识还包括生存时长,该终端根据该生存时长和该终端正在广播的共用特征码的剩余时长,确定该共用特征码的第一广播时长,该终端在经过该共用特征码的第一广播时长后,停止广播该共用特征码。其中,该剩余时长表示该终端正在广播的特征码的剩余的时间长度。
具体地,该终端确定该发现响应中包括的该生存时长和该终端正在广播的特征码的剩余时长之中较大的时长,作为该共用特征码的第一广播时长,则该终端继续广播该共用特征码,在经过该共用特征码的第一广播时长后停止广播该共用特征码。或者,该终端计算该发现响应中包括的该生存时长和该终端正在广播的特征码的剩余时长之和,作为该共用特征码的第一广播时长,则该终端继续广播该共用特征码,在经过该共用特征码的第一广播时长后停止广播该共用特征码。
参见图6,该终端在t0时刻开始广播code1,准备在t2时刻停止广播。如果该终端在t1时刻接收到该邻近业务功能实体的发现响应,该发现响应包括该共用标识、该邻近业务功能实体分配给该终端的code2以及该code2的生存时长△t,此时code1的剩余时长为t2-t1,该终端根据该共用标识确定code2与code1相同,则继续广播code1,并确定code1的广播时长为t2-t1+△t,也即是在时刻t3才停止广播code1。
相关技术中如果终端正在第一无线资源上广播特征码,在该终端确定了该邻近业务功能实体分配给该终端的特征码后,无论终端正在广播的特征码与该邻近业务功能实体分配给该终端的特征码是否相同,该终端仍然会基于基站分配给该终端的另一无线资源广播该邻近业务功能实体分配给该终端的特征码。而本发明实施例中,在该邻近业务功能实体分配给该终端的共用特征码与该终端正在广播的共用特征码相同的情况下,该终端仅是延长了广播该共用特征码 的时间长度,并未基于另一无线资源重新广播该共用特征码,避免了无线资源的浪费。
本发明实施例仅以情况1:该发现响应中包括该共用标识且该终端当前正在广播共用特征码为例进行说明,而在实际应用中,还可以包括以下两种情况中的至少一种:
情况2:该终端接收到该发现响应时不在广播该共用特征码;
情况3:该发现响应不包括该共用标识。
对于上述两种情况2和3,该方法还可以包括以下步骤中的至少一项:
(1)若该终端接收到该发现响应时不在广播该共用特征码,则无论该发现响应是否包括该共用标识,该终端均根据该发现响应,获取该邻近业务功能实体分配给该终端的共用特征码,广播该共用特征码。
若该终端接收到该发现响应时不在广播该共用特征码,该终端获取该邻近业务功能实体分配给该终端的特征码,作为共用特征码。具体地,若该发现响应包含该共用标识和该邻近业务功能实体分配给该终端的特征码,将从该发现响应中获取该邻近业务功能实体分配给该终端的特征码,作为共用特征码,而若该发现响应包含该共用标识,但不包含该邻近业务功能实体分配给该终端的特征码,则可以确定该邻近业务功能实体分配给该终端的特征码与该终端接收到该发现响应之前最后一次广播的共用特征码相同,该终端可以根据该终端的历史广播记录,获取该终端接收到该发现响应之前最后一次广播的特征码作为该共用特征码。
该终端获取到该共用特征码后广播该共用特征码,具体地,该终端可以向基站请求无线资源,基站将无线资源分配给该终端,该终端基于基站分配给该终端的无线资源,广播该共用特征码。或者,该基站预先分配给该终端无线资源池,该无线资源池中包括分配给该终端的多个无线资源,则若该终端接收到该发现响应时不在广播该共用特征码,可以从该无线资源池中选取无线资源,基于选取的无线资源广播该共用特征码。
其中,该基站分配给该终端的无线资源为该基站的空口资源,该终端可以基于该基站分配的空口资源,在空口广播该共用特征码,其他终端可以在空口监听该共用特征码。
该发现响应还包括该邻近业务功能实体分配给该终端的共用特征码的生存时长时,该终端基于无线资源,在该生存时长内广播该共用特征码,在经过 该生存时长后停止广播该共用特征码。也即是,该终端可以根据当前时刻和该生存时长,确定该共用特征码的停止广播时刻,当到达该确定的停止广播时刻时,停止广播该共用特征码。
(2)若该发现响应不包括该共用标识,则无论该终端当前是否正在广播特征码,该终端均为要广播该邻近业务功能实体分配给该终端的特征码。
该发现响应不包括该共用标识,而包括该邻近业务功能实体分配给该终端的特征码,则该终端可以确定该特征码与该邻近业务功能实体最后一次分配并发送给该终端的特征码不同,此时,无论该终端是否在广播特征码,都要广播该发现响应中包括的特征码。
该发现响应还包括该特征码的生存时长时,该终端基于基站分配给该终端的无线资源,在该生存时长内广播该特征码,在经过该生存时长后停止广播该特征码。也即是,该终端可以根据当前时刻和该生存时长,确定该特征码的停止广播时刻,当到达该确定的停止广播时刻时,停止广播该特征码。
其中需要说明的是,在该发现响应不包括该共用标识而该终端正在第一无线资源上广播第一特征码的情况下,该终端会继续在该第一无线资源上广播该第一特征码,并基于该基站分配给该终端的第二无线资源,广播该发现响应中包括的、该邻近业务功能实体分配给该终端的第二特征码。也即是该终端会并行地广播这两个特征码,分别根据每个特征码的生存时长和开始广播的时刻,确定每个特征码的停止广播时刻,当到达该第一特征码的停止广播时刻时,该终端停止广播该第一特征码,当到达该第二特征码的停止广播时刻时,该终端停止广播该第二特征码,两个特征码的广播过程互不影响。
在判断该终端属于上述情况1-3中的哪一种情况时,该终端可以先判断该发现响应是否包括该共用标识,如果该发现响应包括该共用标识,再判断该终端接收到该发现响应时是否正在广播特征码,也可以先判断该终端接收到该发现响应时是否正在广播特征码,如果该终端接收到该发现响应时正在广播特征码,再判断该发现响应是否包括该共用标识,本发明实施例对此不做限定。
在实际应用过程中,为了支持近距离无线通信业务,该终端中新增邻近业务协议层,当该终端从该邻近业务功能实体获得分配给该终端的特征码时,将在邻近业务协议层构造发现消息,该发现消息包括该特征码。发现消息构造完成后,邻近业务协议层将该发现消息传入接入层,接入层为该消息获取基站的无线资源,以便在空口广播该发现消息中的特征码,当该特征码的生存时长到 期,即该特征码的剩余时长为0时,邻近业务协议层向接入层指示停止广播该特征码,则接入层不再广播该特征码。
在后续过程中,其他终端可以获取该终端的终端标识,向该邻近业务功能实体发送监听请求,请求对该终端标识进行监听,则该邻近业务功能实体将该终端标识对应的特征码发送该其他终端,该其他终端在空口监听该特征码,当监听到该终端广播的特征码时,将该特征码发送给该邻近业务功能实体,由该邻近业务功能实体返回该特征码对应的终端标识,此时该其他终端即可采用近距离无线通信技术,与该终端进行通信。
本发明实施例提供的方法,通过接收到终端的第一发现请求时,根据该终端标识和终端标识与特征码之间的对应关系,获得该终端标识对应的特征码,将该终端标识对应的特征码分配给该终端,向该终端发送发现响应,该发现响应包括共用标识,该共用标识指示该终端采用该邻近业务功能实体最后一次分配并发送给该终端的共用特征码进行广播,通过该共用标识对该终端进行提示,使得该终端获知该邻近业务功能实体分配给该终端的特征码与该邻近业务功能实体最后一次分配并发送给该终端的共用特征码相同,在当前正在广播共用特征码时继续广播该共用特征码而无需再广播该邻近业务功能实体分配给该终端的特征码,避免了特征码的重复广播。进一步地,无需再基于基站分配给该终端的无线资源广播该邻近业务功能实体分配给该终端的特征码,节省了无线资源,避免了无线资源的浪费。
上述实施例中,该邻近业务功能实体将与接收到该第一发现请求之前最后一次分配并发送给该终端的特征码相同的特征码分配给了该终端,并将共用标识携带在向该终端返回的发现响应中,该终端确定该发现响应包括该共用标识时,即可获知该邻近业务功能实体分配给该终端的特征码与该邻近业务功能实体接收到该第一发现请求之前最后一次分配并发送给该终端的特征码相同。
另外,除了由该邻近业务功能实体将共用标识携带在发现响应中的方式以外,还可以由该终端来判断该邻近业务功能实体分配给该终端的特征码与该邻近业务功能实体最后一次分配并发送给该终端的共用特征码是否相同,具体过程详见下述实施例。
图7是本发明实施例提供的另一种特征码处理方法的流程图,参见图7,本发明实施例的执行主体为终端,该方法包括:
701、终端向邻近业务功能实体发送发现请求,该发现请求包括该终端的终端标识。
其中,该发现请求用于请求该邻近业务功能实体分配特征码。
702、该终端接收该邻近业务功能实体根据该发现请求发送的发现响应,该发现响应包括该邻近业务功能实体为该终端分配的第一特征码。
703、若该终端正在广播第二特征码,则确定该第一特征码与该终端正在广播的第二特征码是否相同,如果是,执行步骤704,如果否,执行步骤705。
704、该终端继续广播该第二特征码,结束。
705、该终端广播该第一特征码,并继续广播该第二特征码,结束。
本发明实施例提供的方法中,终端向邻近业务功能实体发送发现请求,如果该终端接收到邻近业务功能实体根据该发现请求发送的发现响应,该发现响应中包括该邻近业务功能实体分配给该终端的第一特征码,且该终端正在广播第二特征码,则先判断当前正在广播的第二特征码与该邻近业务功能实体分配给该终端的第一特征码是否相同,如果第一特征码与第二特征码相同,则该终端继续广播该第二特征码而无需再广播该第一特征码,避免了特征码的重复广播,避免了无线资源的浪费。
可选地,该方法还包括:
若该终端未广播特征码,则广播该第一特征码。
可选地,该发现响应还包括该第一特征码的生存时长,该生存时长用于指示广播该第一特征码的时间长度;
该方法还包括:
若该第一特征码与该第二特征码相同,则根据该发现响应中包括的该生存时长和该终端正在广播的该第二特征码的剩余时长,确定该第二特征码的广播时长,并在经过该第二特征码的广播时长后,停止广播该第二特征码;
若该第一特征码与该第二特征码不同,则在该生存时长内广播该第一特征码,在经过该生存时长后停止广播该第一特征码。
可选地,该终端广播该第一特征码包括:
该终端向基站请求无线资源,基于请求到的无线资源广播该第一特征码,或者,
该终端从该基站预先分配给该终端的无线资源池中选取无线资源,基于选取的无线资源广播该第一特征码。
上述所有可选技术方案,可以采用任意结合形成本发明的可选实施例,在此不再一一赘述。
图8是本发明实施例提供的另一种特征码处理方法的流程图,参见图8,本发明实施例的交互主体为终端和邻近业务功能实体,该方法包括:
801、该终端向邻近业务功能实体发送发现请求,该发现请求包括应用用户标识和终端标识。
步骤801与步骤501类似,在此不再赘述。
802、该邻近业务功能实体接收到该发现请求时,为该终端分配第一特征码。
该发现请求用于请求该邻近业务功能实体为该终端分配特征码,该邻近业务功能实体接收到该发现请求时,根据该终端标识和终端标识与特征码之间的对应关系,获得该终端标识对应的特征码,将该特征码分配给该终端。还可以为该终端分配一个与该终端标识对应的特征码不同的特征码。该邻近业务功能实体为该终端分配特征码的具体过程与步骤502类似,在此不再赘述。
803、该邻近业务功能实体向该终端发送发现响应,该发现响应包括该邻近业务功能实体分配给该终端的第一特征码。当然,该发现响应也可以包括该邻近业务功能实体设置的该第一特征码的生存时长,在此不再赘述。
804、该终端接收到该发现响应时,确定是否正在广播特征码,执行步骤805或808。
805、如果该终端接收到该发现响应时正在广播第二特征码,确定正在广播的第二特征码与该邻近业务功能实体分配给该终端的第一特征码是否相同,执行步骤806或807。
在本发明实施例中,该终端接收到该发现响应时,可以先确定该终端是否正在广播特征码,如果该终端正在广播第二特征码,则该终端要先确定该第二特征码与该邻近业务功能实体分配给该终端的第一特征码是否相同。具体地,该第一特征码和该第二特征码均包括多个比特位,则该终端逐位比较该第一特征码与该第二特征码的每一比特位,当该终端确定该第一特征码中的每个比特位上的值与该第二特征码中对应的比特位上的值均相同,则确定该第一特征码与该第二特征码相同。当该终端确定该第一特征码中至少有一个比特位上的值与该第二特征码中对应比特位上的值不同,则确定该第一特征码与该第二特征 码不同。
本发明实施例与图5所示的实施例的区别在于,该邻近业务功能实体向该终端发送的发现响应中不包括共用标识,则对于该终端来说,该终端接收到该发现响应时,无法根据该发现响应是否包括该共用标识来确定该邻近业务功能实体分配给该终端的特征码与该邻近业务功能实体接收到该发现请求之前最后一次分配给该终端的特征码(即该终端正在广播的特征码)是否相同,因此,该终端可以先确定正在广播的特征码与该邻近业务功能实体分配给该终端的特征码是否相同。
806、如果该第一特征码与该第二特征码相同,则该终端继续广播该第二特征码,结束。
如果该第一特征码与该第二特征码相同,则为了避免特征码的重复广播,该终端继续广播该第二特征码,而不再广播该第一特征码。
如果该发现响应中还包括该第一特征码的生存时长,则该终端继续广播该第二特征码,并根据该生存时长和该第二特征码的剩余时长,确定该第二特征码的广播时长,在经过该第二特征码的广播时长后,停止广播该第二特征码。其中,该剩余时长表示该第二特征码剩余的时间长度。
具体地,该终端确定该发现响应中包括的该生存时长和该终端正在广播的第二特征码的剩余时长之中较大的时长,作为该第二特征码的广播时长,则该终端继续广播该第二特征码,在经过该广播时长后停止广播该第二特征码。或者,该终端计算该发现响应中包括的该生存时长和该第二特征码的剩余时长之和,作为该第二特征码的广播时长,则该终端继续广播该第二特征码,在经过该广播时长后停止广播该第二特征码。
807、如果该第一特征码与该第二特征码不同,则该终端广播该第一特征码,并继续广播该第二特征码,结束。
如果该第一特征码与该第二特征码不同,则该终端不仅要继续广播该第二特征码,而且要广播该第一特征码。
具体地,该终端向基站请求无线资源,基于请求到的无线资源广播该第一特征码,或者,该终端从该基站预先分配给该终端的无线资源池中选取无线资源,基于选取的无线资源广播该第一特征码。
如果该发现响应中还包括该第一特征码的生存时长,则该终端在该生存时长内广播该第一特征码,在经过该生存时长后停止广播该第一特征码。也即是, 该终端根据当前时刻和该生存时长,确定该第一特征码的停止广播时刻,当到达该确定的停止广播时刻时,停止广播该第一特征码。
808、如果该终端该终端接收到该发现响应时未广播特征码,则该终端广播该第一特征码,结束。
具体地,该终端向基站请求无线资源,基于请求到的无线资源广播该第一特征码,或者,该终端从该基站预先分配给该终端的无线资源池中选取无线资源,基于选取的无线资源广播该第一特征码。
如果该发现响应中还包括该第一特征码的生存时长,则该终端在该生存时长内广播该第一特征码,在经过该生存时长后停止广播该第一特征码。也即是,该终端根据当前时刻和该生存时长,确定该第一特征码的停止广播时刻,当到达该确定的停止广播时刻时,停止广播该第一特征码。
本发明实施例提供的方法中,该终端向邻近业务功能实体发送发现请求,请求该邻近业务功能实体为该终端分配特征码,如果该终端接收到该邻近业务功能实体返回的发现响应时正在广播第二特征码,则先确定正在广播的第二特征码与该发现响应中包括的该邻近业务功能实体分配给该终端的第一特征码是否相同,如果第一特征码与第二特征码相同,该终端继续广播该第二特征码而无需再广播该第一特征码,避免了特征码的重复广播,且无需再基于基站分配给该终端的无线资源广播该第一特征码,节省了无线资源,避免了无线资源的浪费。
图9是本发明实施例提供的一种特征码处理装置的结构示意图,参见图9,该装置包括:
第一请求接收模块901,用于接收终端发送的第一发现请求,该第一发现请求包括该终端的终端标识;
发送模块902,用于根据该第一发现请求,向该终端发送发现响应,该发现响应包括共用标识,该共用标识用于指示该终端的至少两个应用使用一个共用特征码。
本发明实施例提供的装置,根据接收到的终端发送的第一发现请求,向终端发送发现响应,该发现响应包括共用标识,该共用标识能够指示该终端的至少两个应用使用一个共用特征码,通过该共用标识该终端获知分配给该终端的特征码与分配给该终端其它应用的特征码相同,从而使得该终端在当前正在广 播共用特征码时会继续广播该共用特征码,避免了现有技术中存在同一终端同时在不同的无线资源上广播同一特征码的问题,进而避免无线资源的浪费。
可选地,该发现响应还包括以下至少一个:该共用特征码和该共用特征码的生存时长;
其中,该生存时长用于表示该终端广播该共用特征码的时间长度。
可选地,该共用标识通过该共用特征码中的指定比特位来表示,或者通过该共用特征码的扩展比特位来表示。
可选地,该装置还包括:
分配模块,用于根据该第一发现请求,将该共用特征码分配给该终端。
可选地,该分配模块包括:
第一分配单元,用于根据该终端标识和终端标识与特征码之间的对应关系,获得该共用特征码,并将该共用特征码分配给该终端;或者,
第二分配单元,用于根据该终端标识,获取该终端的应用对应关系,其中,该应用对应关系包括该终端的至少一个应用用户标识与该共用特征码之间的对应关系,若在该应用对应关系中能够获得与该第一发现请求中包括的应用用户标识对应的该共用特征码,则将该共用特征码分配给该终端;或者,若在该应用对应关系中未获得与该第一发现请求中包括的应用用户标识对应的特征码,则将该应用对应关系中任一应用用户标识对应的特征码分配给该终端,并将该第一发现请求中包括的应用用户标识与该获取到的特征码之间的对应关系保存到该应用对应关系中。
可选地,该装置还包括:
状态确定模块,用于根据在接收该第一发现请求之前最后一次分配给该终端的该共用特征码的生存时长和该共用特征码的分配时间,确定该共用特征码的状态;
特征码处理模块,用于若该共用特征码的状态为失效,则将该共用特征码携带在该发现响应中。
可选地,该装置还包括:
第二请求接收模块,用于接收该终端发送的第二发现请求,该第二发现请求包括该终端的终端标识;
该分配模块,用于根据该第二发现请求,为该终端分配该共用特征码,并发送给该终端。
上述所有可选技术方案,可以采用任意结合形成本发明的可选实施例,在此不再一一赘述。
图10是本发明实施例提供的一种特征码处理装置的结构示意图,参见图10,该装置包括:
请求发送模块1001,用于向邻近业务功能实体发送第一发现请求,该第一发现请求包括该装置的终端标识;
接收模块1002,用于接收该邻近业务功能实体根据该第一发现请求发送的发现响应,该发现响应包含共用标识,该共用标识用于指示该装置的至少两个应用使用一个共用特征码;
第一广播模块1003,用于若正在第一无线资源上广播该共用特征码,且该发现响应包含该共用标识,则在该第一无线资源上继续广播该共用特征码。
本发明实施例提供的装置,通过向邻近业务功能实体发送第一发现请求,邻近业务功能实体返回的发现响应包括共用标识,该共用标识能够指示该装置的至少两个应用使用一个共用特征码,若该装置正在第一无线资源上广播该共用特征码,且该装置确定该发现响应包含该共用标识,则在该第一无线资源上继续广播该共用特征码,而无需在其它的无线资源上再广播该邻近业务功能实体分配给该装置的特征码,避免了特征码的重复广播以及无线资源的浪费。
可选地,该发现响应还包括以下至少一个:该共用特征码和该共用特征码的生存时长,其中,该生存时长用于表示该装置广播该共用特征码的时间长度。
可选地,该共用标识通过该共用特征码中的指定比特位来表示,或者通过该共用特征码的扩展比特位来表示。
可选地,该发现响应包括该生存时长,该第一广播模块1003用于根据该发现响应中包括的该生存时长和该装置正在广播的特征码的剩余时长,确定该共用特征码的第一广播时长;在经过该共用特征码的第一广播时长后,停止广播该共用特征码。
可选地,该发现响应不包括该共用特征码,该装置还包括:
获取模块,用于获取在接收该发现响应之前该邻近业务功能实体最后一次分配并发送给该装置的特征码;将该获取的特征码作为该共用特征码。
可选地,该获取模块还用于根据历史广播记录,获取接收到该发现响应之前最后一次广播的特征码作为该共用特征码。
可选地,该装置还包括:
第二广播模块,用于若不在广播该共用特征码,则在第二无线资源上广播该共用特征码。
可选地,该第二广播模块用于向基站请求该第二无线资源,基于请求到的该第二无线资源广播该共用特征码,或者,从该基站预先分配给该装置的无线资源池中选取该第二无线资源,基于该第二无线资源广播该共用特征码。
上述所有可选技术方案,可以采用任意结合形成本发明的可选实施例,在此不再一一赘述。
图11是本发明实施例提供的另一种特征码处理装置的结构示意图,参见图11,该装置包括:
请求发送模块1101,用于向邻近业务功能实体发送发现请求,该发现请求包括该装置的终端标识;
接收模块1102,用于接收该邻近业务功能实体根据该发现请求发送的发现响应,该发现响应包括该邻近业务功能实体为该装置分配的第一特征码;
确定模块1103,用于若该装置正在广播第二特征码,则确定该第一特征码与该装置正在广播的第二特征码是否相同;
第一广播模块1104,用于若该第一特征码与该第二特征码相同,则继续广播该第二特征码;
第二广播模块1105,用于若该第一特征码与该第二特征码不同,则广播该第一特征码,并继续广播该第二特征码。
本发明实施例提供的装置,通过向邻近业务功能实体发送发现请求,如果接收到邻近业务功能实体根据该发现请求发送的发现响应,该发现响应中包括该邻近业务功能实体分配给该装置的第一特征码,且该装置正在广播第二特征码,则先判断当前正在广播的第二特征码与该邻近业务功能实体分配给该装置的第一特征码是否相同,如果第一特征码与第二特征码相同,则继续广播该第二特征码而无需再广播该第一特征码,避免了特征码的重复广播。
可选地,该装置还包括:
第三广播模块,用于若该装置未广播特征码,则广播该第一特征码。
可选地,该发现响应还包括该第一特征码的生存时长,该生存时长用于指示广播该第一特征码的时间长度;
该第一广播模块1104,用于若该第一特征码与该第二特征码相同,则根据该发现响应中包括的该生存时长和该第二特征码的剩余时长,确定该第二特征码的广播时长,并在经过该第二特征码的广播时长后,停止广播该第二特征码;
该第二广播模块1105,用于若该第一特征码与该第二特征码不同,则在该生存时长内广播该第一特征码,在经过该生存时长后停止广播该第一特征码。
可选地,该第二广播模块1105,还用于向基站请求无线资源,基于请求到的无线资源广播该第一特征码,或者,从该基站预先分配给该装置的无线资源池中选取无线资源,基于选取的无线资源广播该第一特征码;
该第三广播模块,还用于向基站请求无线资源,基于请求到的无线资源广播该第一特征码,或者,从该基站预先分配给该装置的无线资源池中选取无线资源,基于选取的无线资源广播该第一特征码。
上述所有可选技术方案,可以采用任意结合形成本发明的可选实施例,在此不再一一赘述。
图12是本发明实施例提供的一种邻近业务功能实体的结构示意图,参见图12,该邻近业务功能实体包括:该邻近业务功能实体包括:网络接口1201、存储器1202和处理器1203,该网络接口1201和该存储器1202分别与该处理器1203连接,该存储器1202存储有程序代码,该处理器1203用于调用该程序代码,执行以下操作:
接收终端发送的第一发现请求,该第一发现请求包括该终端的终端标识;
根据该第一发现请求,向该终端发送发现响应,该发现响应包括共用标识,该共用标识用于指示该终端的至少两个应用使用一个共用特征码。
可选地,该发现响应还包括以下至少一个:该共用特征码和该共用特征码的生存时长;
其中,该生存时长用于表示该终端广播该共用特征码的时间长度。
可选地,该共用标识通过该共用特征码中的指定比特位来表示,或者通过该共用特征码的扩展比特位来表示。
可选地,该处理器1203还用于调用该程序代码,执行以下操作:
根据该第一发现请求,将该共用特征码分配给该终端。
可选地,该处理器1203还用于调用该程序代码,执行以下操作:
根据该终端标识和终端标识与特征码之间的对应关系,获得该共用特征 码,并将该共用特征码分配给该终端;或者,
根据该终端标识,获取该终端的应用对应关系,其中,该应用对应关系包括该终端的至少一个应用用户标识与该共用特征码之间的对应关系,若在该应用对应关系中能够获得与该第一发现请求中包括的应用用户标识对应的该共用特征码,则将该共用特征码分配给该终端;或者,若在该应用对应关系中未获得与该第一发现请求中包括的应用用户标识对应的特征码,则将该应用对应关系中任一应用用户标识对应的特征码分配给该终端,并将该第一发现请求中包括的应用用户标识与该获取到的特征码之间的对应关系保存到该应用对应关系中。
可选地,该处理器1203还用于调用该程序代码,执行以下操作:
根据在接收该第一发现请求之前最后一次分配给该终端的该共用特征码的生存时长和该共用特征码的分配时间,确定该共用特征码的状态;
若该共用特征码的状态为失效,则将该共用特征码携带在该发现响应中。
可选地,该处理器1203还用于调用该程序代码,执行以下操作:
接收该终端发送的第二发现请求,该第二发现请求包括该终端的终端标识;
根据该第二发现请求,为该终端分配该共用特征码,并发送给该终端。
图13是本发明实施例提供的一种终端的结构示意图,参见图13,该终端包括:接收器1301、发射器1302、存储器1303和处理器1304,该接收器1301、该发射器1302和该存储器1303分别与该处理器1304连接,该存储器1303存储有程序代码,该处理器1304用于调用该程序代码,执行以下操作:
向邻近业务功能实体发送第一发现请求,该第一发现请求包括该终端的终端标识;
接收该邻近业务功能实体根据该第一发现请求发送的发现响应,该发现响应包含共用标识,该共用标识用于指示该终端的至少两个应用使用一个共用特征码;
若该终端正在第一无线资源上广播该共用特征码,且该发现响应包含该共用标识,则在该第一无线资源上继续广播该共用特征码。
可选地,该发现响应还包括以下至少一个:该共用特征码和该共用特征码的生存时长,其中,该生存时长用于表示该终端广播该共用特征码的时间长度。
可选地,该共用标识通过该共用特征码中的指定比特位来表示,或者通过该共用特征码的扩展比特位来表示。
可选地,该处理器1304还用于调用该程序代码,执行以下操作:
根据该发现响应中包括的该生存时长和该终端正在广播的特征码的剩余时长,确定该共用特征码的第一广播时长;
在经过该共用特征码的第一广播时长后,停止广播该共用特征码。
可选地,该处理器1304还用于调用该程序代码,执行以下操作:
获取在接收该发现响应之前该邻近业务功能实体最后一次分配并发送给该终端的特征码;
将该获取的特征码作为该共用特征码。
可选地,该处理器1304还用于调用该程序代码,执行以下操作:
根据该终端的历史广播记录,获取接收到该发现响应之前最后一次广播的特征码作为该共用特征码。
可选地,该处理器1304还用于调用该程序代码,执行以下操作:
若该终端不在广播该共用特征码,则在第二无线资源上广播该共用特征码。
可选地,该处理器1304还用于调用该程序代码,执行以下操作:
向基站请求该第二无线资源,基于请求到的该第二无线资源广播该共用特征码,或者,
从该基站预先分配给该终端的无线资源池中选取该第二无线资源,基于该第二无线资源广播该共用特征码。
图14是本发明实施例提供的一种系统的结构示意图,参见图14,该系统包括:邻近功能实体1401和终端1402。
该终端1402用于向该邻近业务功能实体1401第一发现请求,该第一发现请求包括该终端1402的终端标识;
该邻近业务功能实体1401用于接收该第一发现请求,根据该第一发现请求,向该终端1402发送发现响应,该发现响应包括共用标识,该共用标识用于指示该终端1402的至少两个应用使用一个共用特征码。
该终端1402还用于接收该邻近业务功能实体1401根据该第一发现请求发送的该发现响应,若该终端1402正在第一无线资源上广播共用特征码,且该 发现响应包含该共用标识,则该终端1402在该第一无线资源上继续广播该共用特征码。
可选地,该发现响应还包括以下至少一个:该共用特征码和该共用特征码的生存时长;
其中,该生存时长用于表示该终端1402广播该共用特征码的时间长度。
可选地,该共用标识通过该共用特征码中的指定比特位来表示,或者通过该共用特征码的扩展比特位来表示。
可选地,邻近功能实体1401还用于根据该第一发现请求,将该共用特征码分配给该终端1402。
可选地,邻近功能实体1401还用于根据该终端1402标识和终端1402标识与特征码之间的对应关系,获得该共用特征码,并将该共用特征码分配给该终端1402;或者,根据该终端1402标识,获取该终端1402的应用对应关系,其中,该应用对应关系包括该终端1402的至少一个应用用户标识与该共用特征码之间的对应关系,若在该应用对应关系中能够获得与该第一发现请求中包括的应用用户标识对应的该共用特征码,则将该共用特征码分配给该终端1402;或者,若在该应用对应关系中未获得与该第一发现请求中包括的应用用户标识对应的特征码,则将该应用对应关系中任一应用用户标识对应的特征码分配给该终端1402,并将该第一发现请求中包括的应用用户标识与该获取到的特征码之间的对应关系保存到该应用对应关系中。
可选地,邻近功能实体1401还用于根据在接收该第一发现请求之前最后一次分配给该终端1402的该共用特征码的生存时长和该共用特征码的分配时间,确定该共用特征码的状态;若该共用特征码的状态为失效,则将该共用特征码携带在该发现响应中。
可选地,邻近功能实体1401还用于接收该终端1402发送的第二发现请求,该第二发现请求包括该终端1402的终端1402标识;根据该第二发现请求,为该终端1402分配该共用特征码,并发送给该终端1402。
可选地,该终端1402还用于根据该发现响应中包括的该生存时长和该终端1402正在广播的特征码的剩余时长,确定该共用特征码的第一广播时长;在经过该共用特征码的第一广播时长后,停止广播该共用特征码。
可选地,该终端1402还用于获取在接收该发现响应之前该邻近业务功能实体1401最后一次分配并发送给该终端1402的特征码;将该获取的特征码作 为该共用特征码。
可选地,该终端1402还用于根据该终端1402的历史广播记录,获取接收到该发现响应之前最后一次广播的特征码作为该共用特征码。
可选地,该终端1402还用于若不在广播该共用特征码,则在第二无线资源上广播该共用特征码。
可选地,该终端1402还用于向基站请求该第二无线资源,基于请求到的该第二无线资源广播该共用特征码,或者,从该基站预先分配给该终端1402的无线资源池中选取该第二无线资源,基于该第二无线资源广播该共用特征码。
图15是本发明实施例提供的另一种终端的结构示意图,参见图15,该终端包括:接收器1501、发射器1502、存储器1503和处理器1504,该接收器1501、该发射器1502和该存储器1503分别与该处理器1504连接,该存储器1503存储有程序代码,该处理器1504用于调用该程序代码,执行以下操作:
向邻近业务功能实体发送发现请求,该发现请求包括该终端的终端标识;
接收该邻近业务功能实体根据该发现请求发送的发现响应,该发现响应包括该邻近业务功能实体为该终端分配的第一特征码;
若该终端正在广播第二特征码,则确定该第一特征码与该终端正在广播的第二特征码是否相同;
若该第一特征码与该第二特征码相同,则继续广播该第二特征码;
若该第一特征码与该第二特征码不同,则广播该第一特征码,并继续广播该第二特征码。
可选地,该处理器1504还用于调用该程序代码,执行以下操作:
若该终端未广播特征码,则广播该第一特征码。
可选地,该发现响应还包括该第一特征码的生存时长,该生存时长用于指示广播该第一特征码的时间长度;
该处理器1504还用于调用该程序代码,执行以下操作:
若该第一特征码与该第二特征码相同,则根据该发现响应中包括的该生存时长和该终端正在广播的该第二特征码的剩余时长,确定该第二特征码的广播时长,并在经过该第二特征码的广播时长后,停止广播该第二特征码;
若该第一特征码与该第二特征码不同,则在该生存时长内广播该第一特征 码,在经过该生存时长后停止广播该第一特征码。
可选地,该处理器1504还用于调用该程序代码,执行以下操作:
向基站请求无线资源,基于请求到的无线资源广播该第一特征码,或者,
从该基站预先分配给该终端的无线资源池中选取无线资源,基于选取的无线资源广播该第一特征码。
图16是本发明实施例提供的另一种系统的结构示意图,参见图16,该系统包括:邻近功能实体1601和终端1602。
该终端1602用于向该邻近业务功能实体1601发送发现请求,该发现请求包括该终端1602的终端1602标识;
该邻近业务功能实体1601用于根据该发现请求,向该终端1602发送发现响应,该发现响应包括该邻近业务功能实体1601为该终端1602分配的第一特征码;
该终端1602还用于接收该发现响应,若该终端1602正在广播第二特征码,则确定该第一特征码与该终端1602正在广播的第二特征码是否相同;若该第一特征码与该第二特征码相同,则该终端1602继续广播该第二特征码;若该第一特征码与该第二特征码不同,则该终端1602广播该第一特征码,并继续广播该第二特征码。
可选地,该终端1602还用于若未广播特征码,则广播该第一特征码。
可选地,该发现响应还包括该第一特征码的生存时长,该生存时长用于指示广播该第一特征码的时间长度;
可选地,该终端1602还用于若该第一特征码与该第二特征码相同,则根据该发现响应中包括的该生存时长和该终端1602正在广播的该第二特征码的剩余时长,确定该第二特征码的广播时长,并在经过该第二特征码的广播时长后,停止广播该第二特征码;若该第一特征码与该第二特征码不同,则在该生存时长内广播该第一特征码,在经过该生存时长后停止广播该第一特征码。
可选地,该终端1602还用于向基站请求无线资源,基于请求到的无线资源广播该第一特征码,或者,从该基站预先分配给该终端1602的无线资源池中选取无线资源,基于选取的无线资源广播该第一特征码。
本领域普通技术人员可以理解实现上述实施例的全部或部分步骤可以通 过硬件来完成,也可以通过程序来指令相关的硬件完成,所述的程序可以存储于一种计算机可读存储介质中,上述提到的存储介质可以是只读存储器,磁盘或光盘等。
以上所述仅为本发明的较佳实施例,并不用以限制本发明,凡在本发明的精神和原则之内,所作的任何修改、等同替换、改进等,均应包含在本发明的保护范围之内。

Claims (43)

  1. 一种特征码处理方法,其特征在于,所述方法包括:
    接收终端发送的第一发现请求,所述第一发现请求包括所述终端的终端标识;
    根据所述第一发现请求,向所述终端发送发现响应,所述发现响应包括共用标识,所述共用标识用于指示所述终端的至少两个应用使用一个共用特征码。
  2. 根据权利要求1所述的方法,其特征在于,所述发现响应还包括以下至少一个:所述共用特征码和所述共用特征码的生存时长;
    其中,所述生存时长用于表示所述终端广播所述共用特征码的时间长度。
  3. 根据权利要求2所述的方法,其特征在于,所述共用标识通过所述共用特征码中的指定比特位来表示,或者通过所述共用特征码的扩展比特位来表示。
  4. 根据权利要求1-3任一项所述的方法,其特征在于,在所述根据所述第一发现请求,向所述终端发送发现响应之前,所述方法还包括:
    根据所述第一发现请求,将所述共用特征码分配给所述终端。
  5. 根据权利要求4所述的方法,其特征在于,所述根据所述第一发现请求,将所述共用特征码分配给所述终端,包括:
    根据所述终端标识和终端标识与特征码之间的对应关系,获得所述共用特征码,并将所述共用特征码分配给所述终端;或者,
    根据所述终端标识,获取所述终端的应用对应关系,其中,所述应用对应关系包括所述终端的至少一个应用用户标识与所述共用特征码之间的对应关系,若在所述应用对应关系中能够获得与所述第一发现请求中包括的应用用户标识对应的所述共用特征码,则将所述共用特征码分配给所述终端;或者,若在所述应用对应关系中未获得与所述第一发现请求中包括的应用用户标识对应的特征码,则将所述应用对应关系中任一应用用户标识对应的特征码分配给所述终端,并将所述第一发现请求中包括的应用用户标识与所述获取到的特征码之间的对应关系保存到所述应用对应关系中。
  6. 根据权利要求1所述的方法,其特征在于,在所述向所述终端发送发现响应之前,所述方法还包括:
    根据在接收所述第一发现请求之前最后一次分配给所述终端的所述共用特征码的生存时长和所述共用特征码的分配时间,确定所述共用特征码的状态;
    若所述共用特征码的状态为失效,则将所述共用特征码携带在所述发现响应中。
  7. 根据权利要求1-6任一项所述的方法,其特征在于,所述接收终端发送的第一发现请求之前,所述方法还包括:
    接收所述终端发送的第二发现请求,所述第二发现请求包括所述终端的终端标识;
    根据所述第二发现请求,为所述终端分配所述共用特征码,并发送给所述终端。
  8. 一种特征码处理方法,其特征在于,所述方法包括:
    终端向邻近业务功能实体发送第一发现请求,所述第一发现请求包括所述终端的终端标识;
    所述终端接收所述邻近业务功能实体根据所述第一发现请求发送的发现响应,所述发现响应包含共用标识,所述共用标识用于指示所述终端的至少两个应用使用一个共用特征码;
    若所述终端正在第一无线资源上广播共用特征码,且所述发现响应包含所述共用标识,则所述终端在所述第一无线资源上继续广播所述共用特征码。
  9. 根据权利要求8所述的方法,其特征在于,所述发现响应还包括以下至少一个:所述共用特征码和所述共用特征码的生存时长,其中,所述生存时长用于表示所述终端广播所述共用特征码的时间长度。
  10. 根据权利要求9所述的方法,其特征在于,所述共用标识通过所述共用特征码中的指定比特位来表示,或者通过所述共用特征码的扩展比特位来表示。
  11. 根据权利要求9所述的方法,其特征在于,所述发现响应包括所述生存时长,所述在所述第一无线资源上继续广播所述共用特征码,包括:
    所述终端根据所述发现响应中包括的所述生存时长和所述终端正在广播的特征码的剩余时长,确定所述共用特征码的第一广播时长;
    所述终端在经过所述共用特征码的第一广播时长后,停止广播所述共用特征码。
  12. 根据权利要求8所述的方法,其特征在于,所述发现响应不包括所述共用特征码,所述方法还包括:
    所述终端获取在接收所述发现响应之前所述邻近业务功能实体最后一次分配并发送给所述终端的特征码;
    所述终端将所述获取的特征码作为所述共用特征码。
  13. 根据权利要求12所述的方法,其特征在于,所述终端获取在接收所述发现响应消息之前所述邻近业务功能实体最后一次分配并发送给所述终端的特征码,包括:
    根据所述终端的历史广播记录,获取所述终端接收到所述发现响应之前最后一次广播的特征码作为所述共用特征码。
  14. 根据权利要求8-13任一项所述的方法,其特征在于,所述方法还包括:
    若所述终端不在广播所述共用特征码,则所述终端在第二无线资源上广播所述共用特征码。
  15. 根据权利要求14所述的方法,其特征在于,所述终端在第二无线资源上广播所述共用特征码,包括:
    所述终端向基站请求所述第二无线资源,基于请求到的所述第二无线资源广播所述共用特征码,或者,
    所述终端从所述基站预先分配给所述终端的无线资源池中选取所述第二无线资源,基于所述第二无线资源广播所述共用特征码。
  16. 一种特征码处理方法,其特征在于,所述方法包括:
    终端向邻近业务功能实体发送发现请求,所述发现请求包括所述终端的终端标识;
    所述终端接收所述邻近业务功能实体根据所述发现请求发送的发现响应,所述发现响应包括所述邻近业务功能实体为所述终端分配的第一特征码;
    若所述终端正在广播第二特征码,则确定所述第一特征码与所述终端正在广播的第二特征码是否相同;
    若所述第一特征码与所述第二特征码相同,则所述终端继续广播所述第二特征码;
    若所述第一特征码与所述第二特征码不同,则所述终端广播所述第一特征码,并继续广播所述第二特征码。
  17. 根据权利要求16所述的方法,其特征在于,所述方法还包括:
    若所述终端未广播特征码,则广播所述第一特征码。
  18. 根据权利要求16或17所述的方法,其特征在于,所述发现响应还包括所述第一特征码的生存时长,所述生存时长用于指示广播所述第一特征码的时间长度;
    所述方法还包括:
    若所述第一特征码与所述第二特征码相同,则根据所述发现响应中包括的所述生存时长和所述终端正在广播的所述第二特征码的剩余时长,确定所述第二特征码的广播时长,并在经过所述第二特征码的广播时长后,停止广播所述第二特征码;
    若所述第一特征码与所述第二特征码不同,则在所述生存时长内广播所述第一特征码,在经过所述生存时长后停止广播所述第一特征码。
  19. 根据权利要求16-18任一项所述的方法,其特征在于,所述终端广播所述第一特征码包括:
    所述终端向基站请求无线资源,基于请求到的无线资源广播所述第一特征码,或者,
    所述终端从所述基站预先分配给所述终端的无线资源池中选取无线资源, 基于选取的无线资源广播所述第一特征码。
  20. 一种特征码处理装置,其特征在于,所述装置包括:
    第一请求接收模块,用于接收终端发送的第一发现请求,所述第一发现请求包括所述终端的终端标识;
    发送模块,用于根据所述第一发现请求,向所述终端发送发现响应,所述发现响应包括共用标识,所述共用标识用于指示所述终端的至少两个应用使用一个共用特征码。
  21. 根据权利要求20所述的装置,其特征在于,所述发现响应还包括以下至少一个:所述共用特征码和所述共用特征码的生存时长;
    其中,所述生存时长用于表示所述终端广播所述共用特征码的时间长度。
  22. 根据权利要求21所述的装置,其特征在于,所述共用标识通过所述共用特征码中的指定比特位来表示,或者通过所述共用特征码的扩展比特位来表示。
  23. 根据权利要求20-22任一项所述的装置,其特征在于,所述装置还包括:
    分配模块,用于根据所述第一发现请求,将所述共用特征码分配给所述终端。
  24. 根据权利要求23所述的装置,其特征在于,所述分配模块包括:
    第一分配单元,用于根据所述终端标识和终端标识与特征码之间的对应关系,获得所述共用特征码,并将所述共用特征码分配给所述终端;或者,
    第二分配单元,用于根据所述终端标识,获取所述终端的应用对应关系,其中,所述应用对应关系包括所述终端的至少一个应用用户标识与所述共用特征码之间的对应关系,若在所述应用对应关系中能够获得与所述第一发现请求中包括的应用用户标识对应的所述共用特征码,则将所述共用特征码分配给所述终端;或者,若在所述应用对应关系中未获得与所述第一发现请求中包括的应用用户标识对应的特征码,则将所述应用对应关系中任一应用用户标识对应的特征码分配给所述终端,并将所述第一发现请求中包括的应用用户标识与所 述获取到的特征码之间的对应关系保存到所述应用对应关系中。
  25. 根据权利要求20所述的装置,其特征在于,所述装置还包括:
    状态确定模块,用于根据在接收所述第一发现请求之前最后一次分配给所述终端的所述共用特征码的生存时长和所述共用特征码的分配时间,确定所述共用特征码的状态;
    特征码处理模块,用于若所述共用特征码的状态为失效,则将所述共用特征码携带在所述发现响应中。
  26. 根据权利要求20-25任一项所述的装置,其特征在于,所述装置还包括:
    第二请求接收模块,用于接收所述终端发送的第二发现请求,所述第二发现请求包括所述终端的终端标识;
    所述分配模块,用于根据所述第二发现请求,为所述终端分配所述共用特征码,并发送给所述终端。
  27. 一种特征码处理装置,其特征在于,所述装置包括:
    请求发送模块,用于向邻近业务功能实体发送第一发现请求,所述第一发现请求包括所述装置的终端标识;
    接收模块,用于接收所述邻近业务功能实体根据所述第一发现请求发送的发现响应,所述发现响应包含共用标识,所述共用标识用于指示所述装置的至少两个应用使用一个共用特征码;
    第一广播模块,用于若正在第一无线资源上广播共用特征码,且所述发现响应包含所述共用标识,则在所述第一无线资源上继续广播所述共用特征码。
  28. 根据权利要求27所述的装置,其特征在于,所述发现响应还包括以下至少一个:所述共用特征码和所述共用特征码的生存时长,其中,所述生存时长用于表示所述装置广播所述共用特征码的时间长度。
  29. 根据权利要求28所述的装置,其特征在于,所述共用标识通过所述共用特征码中的指定比特位来表示,或者通过所述共用特征码的扩展比特位来表示。
  30. 根据权利要求28所述的装置,其特征在于,所述发现响应包括所述生存时长,所述第一广播模块用于根据所述发现响应中包括的所述生存时长和所述装置正在广播的特征码的剩余时长,确定所述共用特征码的第一广播时长;在经过所述共用特征码的第一广播时长后,停止广播所述共用特征码。
  31. 根据权利要求27所述的装置,其特征在于,所述发现响应不包括所述共用特征码,所述装置还包括:
    获取模块,用于获取在接收所述发现响应之前所述邻近业务功能实体最后一次分配并发送给所述装置的特征码;将所述获取的特征码作为所述共用特征码。
  32. 根据权利要求31所述的装置,其特征在于,所述获取模块还用于根据历史广播记录,获取接收到所述发现响应之前最后一次广播的特征码作为所述共用特征码。
  33. 根据权利要求27-32任一项所述的装置,其特征在于,所述装置还包括:
    第二广播模块,用于若不在广播所述共用特征码,则在第二无线资源上广播所述共用特征码。
  34. 根据权利要求33所述的装置,其特征在于,所述第二广播模块用于向基站请求所述第二无线资源,基于请求到的所述第二无线资源广播所述共用特征码,或者,从所述基站预先分配给所述装置的无线资源池中选取所述第二无线资源,基于所述第二无线资源广播所述共用特征码。
  35. 一种特征码处理装置,其特征在于,所述装置包括:
    请求发送模块,用于向邻近业务功能实体发送发现请求,所述发现请求包括所述装置的终端标识;
    接收模块,用于接收所述邻近业务功能实体根据所述发现请求发送的发现响应,所述发现响应包括所述邻近业务功能实体为所述装置分配的第一特征码;
    确定模块,用于若所述装置正在广播第二特征码,则确定所述第一特征码 与所述装置正在广播的第二特征码是否相同;
    第一广播模块,用于若所述第一特征码与所述第二特征码相同,则继续广播所述第二特征码;
    第二广播模块,用于若所述第一特征码与所述第二特征码不同,则广播所述第一特征码,并继续广播所述第二特征码。
  36. 根据权利要求35所述的装置,其特征在于,所述装置还包括:
    第三广播模块,用于若所述装置未广播特征码,则广播所述第一特征码。
  37. 根据权利要求35或36所述的装置,其特征在于,所述发现响应还包括所述第一特征码的生存时长,所述生存时长用于指示广播所述第一特征码的时间长度;
    所述第一广播模块,用于若所述第一特征码与所述第二特征码相同,则根据所述发现响应中包括的所述生存时长和所述第二特征码的剩余时长,确定所述第二特征码的广播时长,并在经过所述第二特征码的广播时长后,停止广播所述第二特征码;
    所述第二广播模块,用于若所述第一特征码与所述第二特征码不同,则在所述生存时长内广播所述第一特征码,在经过所述生存时长后停止广播所述第一特征码。
  38. 根据权利要求35-37任一项所述的装置,其特征在于,所述第二广播模块,还用于向基站请求无线资源,基于请求到的无线资源广播所述第一特征码,或者,从所述基站预先分配给所述装置的无线资源池中选取无线资源,基于选取的无线资源广播所述第一特征码;
    所述第三广播模块,还用于向基站请求无线资源,基于请求到的无线资源广播所述第一特征码,或者,从所述基站预先分配给所述装置的无线资源池中选取无线资源,基于选取的无线资源广播所述第一特征码。
  39. 一种邻近业务功能实体,其特征在于,所述邻近业务功能实体包括:网络接口、存储器和处理器,所述网络接口和所述存储器分别与所述处理器连接,所述存储器存储有程序代码,所述处理器用于调用所述程序代码,执行以 下操作:
    接收终端发送的第一发现请求,所述第一发现请求包括所述终端的终端标识;
    根据所述第一发现请求,向所述终端发送发现响应,所述发现响应包括共用标识,所述共用标识用于指示所述终端的至少两个应用使用一个共用特征码。
  40. 一种终端,其特征在于,所述终端包括:接收器、发射器、存储器和处理器,所述接收器、所述发射器和所述存储器分别与所述处理器连接,所述存储器存储有程序代码,所述处理器用于调用所述程序代码,执行以下操作:
    向邻近业务功能实体发送第一发现请求,所述第一发现请求包括所述终端的终端标识;
    接收所述邻近业务功能实体根据所述第一发现请求发送的发现响应,所述发现响应包含共用标识,所述共用标识用于指示所述终端的至少两个应用使用一个共用特征码;
    若正在第一无线资源上广播共用特征码,且所述发现响应包含所述共用标识,则在所述第一无线资源上继续广播所述共用特征码。
  41. 一种系统,其特征在于,所述系统包括:邻近业务功能实体和终端;
    所述终端用于向所述邻近业务功能实体第一发现请求,所述第一发现请求包括所述终端的终端标识;
    所述邻近业务功能实体用于接收所述第一发现请求,根据所述第一发现请求,向所述终端发送发现响应,所述发现响应包括共用标识,所述共用标识用于指示所述终端的至少两个应用使用一个共用特征码。
    所述终端还用于接收所述邻近业务功能实体根据所述第一发现请求发送的所述发现响应,若所述终端正在第一无线资源上广播共用特征码,且所述发现响应包含所述共用标识,则所述终端在所述第一无线资源上继续广播所述共用特征码。
  42. 一种终端,其特征在于,所述终端包括:接收器、发射器、存储器和处理器,所述接收器、所述发射器和所述存储器分别与所述处理器连接,所述存储器存储有程序代码,所述处理器用于调用所述程序代码,执行以下操作:
    终端向邻近业务功能实体发送发现请求,所述发现请求包括所述终端的终端标识;
    所述终端接收所述邻近业务功能实体根据所述发现请求发送的发现响应,所述发现响应包括所述邻近业务功能实体为所述终端分配的第一特征码;
    若所述终端正在广播第二特征码,则确定所述第一特征码与所述终端正在广播的第二特征码是否相同;
    若所述第一特征码与所述第二特征码相同,则所述终端继续广播所述第二特征码;
    若所述第一特征码与所述第二特征码不同,则所述终端广播所述第一特征码,并继续广播所述第二特征码。
  43. 一种系统,其特征在于,所述系统包括:邻近业务功能实体和终端;
    所述终端用于向所述邻近业务功能实体发送发现请求,所述发现请求包括所述终端的终端标识;
    所述邻近业务功能实体用于根据所述发现请求,向所述终端发送发现响应,所述发现响应包括所述邻近业务功能实体为所述终端分配的第一特征码;
    所述终端还用于接收所述发现响应,若所述终端正在广播第二特征码,则确定所述第一特征码与所述终端正在广播的第二特征码是否相同;若所述第一特征码与所述第二特征码相同,则所述终端继续广播所述第二特征码;若所述第一特征码与所述第二特征码不同,则所述终端广播所述第一特征码,并继续广播所述第二特征码。
PCT/CN2015/074372 2015-03-17 2015-03-17 特征码处理方法、设备和系统 WO2016145610A1 (zh)

Priority Applications (2)

Application Number Priority Date Filing Date Title
PCT/CN2015/074372 WO2016145610A1 (zh) 2015-03-17 2015-03-17 特征码处理方法、设备和系统
CN201580042690.XA CN106576213A (zh) 2015-03-17 2015-03-17 特征码处理方法、设备和系统

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2015/074372 WO2016145610A1 (zh) 2015-03-17 2015-03-17 特征码处理方法、设备和系统

Publications (1)

Publication Number Publication Date
WO2016145610A1 true WO2016145610A1 (zh) 2016-09-22

Family

ID=56920226

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2015/074372 WO2016145610A1 (zh) 2015-03-17 2015-03-17 特征码处理方法、设备和系统

Country Status (2)

Country Link
CN (1) CN106576213A (zh)
WO (1) WO2016145610A1 (zh)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103379469A (zh) * 2012-04-13 2013-10-30 华为技术有限公司 近距离信息的注册方法、查询方法和用户设备
WO2014107902A1 (zh) * 2013-01-14 2014-07-17 华为技术有限公司 用户设备的注册方法、近距离业务服务器和移动管理实体
CN104066070A (zh) * 2013-03-20 2014-09-24 中兴通讯股份有限公司 终端注册方法、终端发现方法、终端及装置
US20140344578A1 (en) * 2013-05-16 2014-11-20 Samsung Electronics Co., Ltd. Method and apparatus for performing discovery for device-to-device communication

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103379469A (zh) * 2012-04-13 2013-10-30 华为技术有限公司 近距离信息的注册方法、查询方法和用户设备
WO2014107902A1 (zh) * 2013-01-14 2014-07-17 华为技术有限公司 用户设备的注册方法、近距离业务服务器和移动管理实体
CN104066070A (zh) * 2013-03-20 2014-09-24 中兴通讯股份有限公司 终端注册方法、终端发现方法、终端及装置
US20140344578A1 (en) * 2013-05-16 2014-11-20 Samsung Electronics Co., Ltd. Method and apparatus for performing discovery for device-to-device communication

Also Published As

Publication number Publication date
CN106576213A (zh) 2017-04-19

Similar Documents

Publication Publication Date Title
EP3739851A1 (en) Address management method, device and system
EP3742785B1 (en) Session management method and device
US20140295815A1 (en) Method and apparatus for routing proximity-based service message in wireless communication system
CN111314464A (zh) 应用于边缘计算场景的通信方法、介质及电子设备
JP2018518917A (ja) リソース割り当て方法、ue、及び基地局
WO2015027455A1 (zh) 一种无线通信网络数据传输的控制方法及装置
WO2016086659A1 (zh) 一种业务消息的传输方法、装置及系统
CN105472597B (zh) 应用的注册方法及装置
TW201737753A (zh) 一種網路接入方法、相關設備和系統
WO2020057333A1 (zh) 测量配置信息、测量报告信息的发送方法及装置
WO2017045454A1 (zh) 一种实现终端接入的方法、装置和系统
CN114615272B (zh) 媒体数据转发服务器调度方法和系统
WO2016145610A1 (zh) 特征码处理方法、设备和系统
WO2022001732A1 (zh) Cdn调度方法、接入设备、cdn调度器及存储介质
CN105191460B (zh) 一种信息传输方法、设备及系统
CN114845350A (zh) 一种路由选择方法及装置
US11272357B2 (en) Method and device for determining SIM card information
CN111083795B (zh) 一种报文转发方法及装置
CN111294740B (zh) 一种组通信方法、装置及设备
WO2022127568A1 (zh) 基站与网管设备间通信链路建立方法、系统、基站及网管设备
WO2016054824A1 (zh) 用户发现方法、用户设备以及接近业务功能实体
WO2023087242A1 (zh) 标识分配方法、标识上报方法、装置、设备及存储介质
RU2656248C2 (ru) Способ и устройство передачи сообщения, и устройство шлюза
KR101910582B1 (ko) 네트워크장치 및 네트워크장치의 동작 방법
CN117749765A (zh) 一种ip地址的分配方法、装置、设备及存储介质

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 15884993

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 15884993

Country of ref document: EP

Kind code of ref document: A1