[go: up one dir, main page]

CN108684027A - Method and device for implementing a multifunctional iBeacon - Google Patents

Method and device for implementing a multifunctional iBeacon Download PDF

Info

Publication number
CN108684027A
CN108684027A CN201810460824.5A CN201810460824A CN108684027A CN 108684027 A CN108684027 A CN 108684027A CN 201810460824 A CN201810460824 A CN 201810460824A CN 108684027 A CN108684027 A CN 108684027A
Authority
CN
China
Prior art keywords
service
information
broadcast
attribute
service information
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201810460824.5A
Other languages
Chinese (zh)
Inventor
孙岩
罗红
唐煜
黄俊飞
林昭文
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing University of Posts and Telecommunications
Original Assignee
Beijing University of Posts and Telecommunications
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 Beijing University of Posts and Telecommunications filed Critical Beijing University of Posts and Telecommunications
Priority to CN201810460824.5A priority Critical patent/CN108684027A/en
Publication of CN108684027A publication Critical patent/CN108684027A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/80Services using short range communication, e.g. near-field communication [NFC], radio-frequency identification [RFID] or low energy communication
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/50Queue scheduling
    • H04L47/56Queue scheduling implementing delay-aware scheduling
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/50Queue scheduling
    • H04L47/62Queue scheduling characterised by scheduling criteria
    • H04L47/622Queue service order
    • H04L47/6225Fixed service order, e.g. Round Robin
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W28/00Network traffic management; Network resource management
    • H04W28/02Traffic management, e.g. flow control or congestion control
    • H04W28/10Flow control between communication endpoints
    • H04W28/14Flow control between communication endpoints using intermediate storage

Landscapes

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

Abstract

本发明实施例提供了一种多功能iBeacon信标的实现方法,涉及无线通信技术领域,可以解决iBeacon信标要为终端设备提供多个服务时,造成的资源浪费的现象。本发明的方案包括:广播第一服务信息,当广播第一服务信息的时长达到第一服务对应的轮换周期时,暂停广播第一服务信息,开始广播第二服务信息,当广播第二服务信息的时长达到第二服务对应的轮换周期时,暂停广播第二服务信息,按照上述方法轮流广播服务队列中每个服务的信息,直至服务队列中的最后一个服务的信息被广播,且广播最后一个服务的信息的时长达到最后一个服务对应的轮换周期时,循环执行上述步骤。

The embodiment of the present invention provides a method for implementing a multifunctional iBeacon, which relates to the technical field of wireless communication, and can solve the phenomenon of resource waste caused when the iBeacon needs to provide multiple services for terminal equipment. The solution of the present invention includes: broadcasting the first service information, when the duration of broadcasting the first service information reaches the rotation cycle corresponding to the first service, suspending the broadcast of the first service information, and starting to broadcast the second service information, when the broadcasting of the second service information When the duration reaches the rotation cycle corresponding to the second service, the broadcast of the second service information will be suspended, and the information of each service in the service queue will be broadcast in turn according to the above method until the information of the last service in the service queue is broadcast, and the last When the duration of the service information reaches the rotation cycle corresponding to the last service, the above steps are executed cyclically.

Description

一种多功能iBeacon信标的实现方法及装置Method and device for implementing a multifunctional iBeacon

技术领域technical field

本发明涉及无线通信技术领域,特别是涉及一种多功能iBeacon信标的实现方法及装置。The invention relates to the technical field of wireless communication, in particular to a method and device for realizing a multifunctional iBeacon.

背景技术Background technique

iBeacon技术在2013年的全球开发者大会上被正式提出,目前已被广泛应用。依据iBeacon协议研发的iBeacon信标可以发出广播信号,支持蓝牙的终端设备可以监听来自iBeacon信标的广播信号,并作出响应,进而实现了iBeacon设备为终端设备提供服务。The iBeacon technology was officially proposed at the Global Developers Conference in 2013 and has been widely used. The iBeacon beacon developed according to the iBeacon protocol can send out broadcast signals, and the Bluetooth-enabled terminal device can monitor the broadcast signal from the iBeacon beacon and respond, thereby realizing the iBeacon device to provide services for the terminal device.

目前,当iBeacon信标需要为终端设备提供服务时,可发送携带该服务ID的广播信号,而当iBeacon信标要为终端设备提供多个服务时,会同时广播携带各个服务ID的广播信号,然而终端设备在一个时刻只能接收并识别一个来自该iBeacon信标的广播信号,iBeacon信标发送的其他广播信号不能被终端设备响应,而iBeacon信标发送这些广播信号时也会占用带宽等资源,会造成资源浪费。Currently, when an iBeacon needs to provide a service for a terminal device, it can send a broadcast signal carrying the service ID, and when the iBeacon needs to provide multiple services for the terminal device, it will broadcast the broadcast signal carrying each service ID at the same time. However, a terminal device can only receive and recognize one broadcast signal from the iBeacon at a time, and other broadcast signals sent by the iBeacon cannot be responded to by the terminal device, and the iBeacon will also occupy bandwidth and other resources when sending these broadcast signals. It will cause waste of resources.

发明内容Contents of the invention

本发明实施例的目的在于提供一种多功能iBeacon信标的实现方法及装置,以解决现有技术中iBeacon信标要为终端设备提供多个服务时,造成的资源浪费的现象。The purpose of the embodiments of the present invention is to provide a method and device for implementing a multi-functional iBeacon, so as to solve the phenomenon of waste of resources caused when an iBeacon needs to provide multiple services for a terminal device in the prior art.

具体技术方案如下:The specific technical scheme is as follows:

第一方面,本发明的实施例提供一种多功能iBeacon信标的实现方法,该方法包括:In the first aspect, embodiments of the present invention provide a method for implementing a multifunctional iBeacon, the method comprising:

广播第一服务信息,所述第一服务信息为服务队列中的第一个服务的信息;broadcasting first service information, where the first service information is the information of the first service in the service queue;

当广播第一服务信息的时长达到所述第一服务对应的轮换周期时,暂停广播所述第一服务信息;When the duration of broadcasting the first service information reaches the rotation period corresponding to the first service, suspend broadcasting the first service information;

广播第二服务信息,所述第二服务信息为服务队列中的第二个服务的信息;broadcasting second service information, where the second service information is the information of the second service in the service queue;

当广播第二服务信息的时长达到所述第二服务对应的轮换周期时,暂停广播所述第二服务信息;When the duration of broadcasting the second service information reaches the rotation period corresponding to the second service, suspend broadcasting the second service information;

按照上述方法轮流广播所述服务队列中每个服务的信息,直至所述服务队列中的最后一个服务的信息被广播,且广播所述最后一个服务的信息的时长达到所述最后一个服务对应的轮换周期时,循环执行上述步骤。According to the above method, the information of each service in the service queue is broadcast in turn until the information of the last service in the service queue is broadcast, and the duration of broadcasting the information of the last service reaches the corresponding time of the last service When the cycle is rotated, the above steps are performed cyclically.

在一种可能的设计中,在所述暂停广播所述第一服务信息之后,所述方法还包括:In a possible design, after the suspension of broadcasting the first service information, the method further includes:

将广播内容由所述第一服务信息修改为所述第二服务信息;modifying the broadcast content from the first service information to the second service information;

将轮换周期由所述第一服务对应的轮换周期修改为所述第二服务对应的轮换周期;modifying the rotation period from the rotation period corresponding to the first service to the rotation period corresponding to the second service;

将接收信号强度指示RSSI校准值由所述第一服务对应的RSSI校准值修改为所述第二服务对应的RSSI校准值。Modifying the received signal strength indicator RSSI calibration value from the RSSI calibration value corresponding to the first service to the RSSI calibration value corresponding to the second service.

在一种可能的设计中,所述方法还包括:In a possible design, the method also includes:

若确定发生连接断开事件,则保存当前系统参数。If it is determined that a disconnection event occurs, the current system parameters are saved.

在一种可能的设计中,所述方法还包括:In a possible design, the method also includes:

若确定发生写休眠属性事件,则获取休眠属性值;If it is determined that a write dormancy attribute event occurs, then obtain the dormancy attribute value;

若所述休眠属性值不为第一预设值,则保存当前系统状态参数,并切换至休眠状态;If the dormant attribute value is not the first preset value, then save the current system state parameters and switch to the dormant state;

若所述休眠属性值为第一预设值,则读取休眠前保存的系统状态参数,根据休眠前保存的系统状态参数切换至休眠前的状态。If the dormancy attribute value is the first preset value, read the system state parameters saved before dormancy, and switch to the state before dormancy according to the system state parameters saved before dormancy.

在一种可能的设计中,所述方法还包括:In a possible design, the method also includes:

若确定发生写RSSI校准值属性事件,则获取写入的RSSI校准值;If it is determined that a write RSSI calibration value attribute event occurs, then obtain the written RSSI calibration value;

若所述RSSI校准值属性为第二预设值,则控制蜂鸣器振动;If the RSSI calibration value attribute is a second preset value, then control the vibration of the buzzer;

若所述RSSI校准值属性为第三预设值,则控制蜂鸣器停止振动。If the RSSI calibration value attribute is the third preset value, the buzzer is controlled to stop vibrating.

第二方面,本发明的实施例提供一种多功能iBeacon信标的实现装置,该方法包括:In a second aspect, an embodiment of the present invention provides a device for implementing a multifunctional iBeacon, the method including:

广播模块,用于广播第一服务信息,所述第一服务信息为服务队列中的第一个服务的信息;A broadcast module, configured to broadcast first service information, where the first service information is the information of the first service in the service queue;

处理模块,用于当所述广播模块广播第一服务信息的时长达到所述第一服务对应的轮换周期时,控制所述广播模块暂停广播所述第一服务信息;A processing module, configured to control the broadcast module to suspend broadcasting the first service information when the duration of broadcasting the first service information by the broadcast module reaches the rotation period corresponding to the first service;

所述广播模块,还用于广播第二服务信息,所述第二服务信息为服务队列中的第二个服务的信息;The broadcast module is also used to broadcast second service information, where the second service information is the information of the second service in the service queue;

所述处理模块,还用于当所述广播模块广播第二服务信息的时长达到所述第二服务对应的轮换周期时,控制所述广播模块暂停广播所述第二服务信息;The processing module is further configured to control the broadcast module to suspend broadcasting the second service information when the duration of the broadcast module broadcasting the second service information reaches the rotation period corresponding to the second service;

所述处理模块,还用于控制所述广播模块轮流广播所述服务队列中每个服务的信息,直至所述服务队列中的最后一个服务的信息被广播,且所述广播模块广播所述最后一个服务的信息的时长达到所述最后一个服务对应的轮换周期时,控制所述广播模块从所述服务队列中的第一服务信息开始,循环广播所述服务队列中的每个服务的信息。The processing module is further configured to control the broadcast module to broadcast the information of each service in the service queue in turn until the information of the last service in the service queue is broadcast, and the broadcast module broadcasts the last When the duration of the information of a service reaches the rotation period corresponding to the last service, the broadcast module is controlled to cyclically broadcast the information of each service in the service queue starting from the first service information in the service queue.

在一种可能的设计中,所述处理模块,还用于将广播内容由所述第一服务信息修改为所述第二服务信息;将轮换周期由所述第一服务对应的轮换周期修改为所述第二服务对应的轮换周期;将接收信号强度指示RSSI校准值由所述第一服务对应的RSSI校准值修改为所述第二服务对应的RSSI校准值。In a possible design, the processing module is further configured to modify the broadcast content from the first service information to the second service information; modify the rotation period from the rotation period corresponding to the first service to The rotation period corresponding to the second service: modifying the received signal strength indicator RSSI calibration value from the RSSI calibration value corresponding to the first service to the RSSI calibration value corresponding to the second service.

在一种可能的设计中,所述处理模块,还用于若确定发生连接断开事件,则保存当前系统参数。In a possible design, the processing module is further configured to save current system parameters if it is determined that a disconnection event occurs.

在一种可能的设计中,所述处理模块,还用于若确定发生写休眠属性事件,则获取休眠属性值;若所述休眠属性值不为第一预设值,则保存当前系统状态参数,并切换至休眠状态;若所述休眠属性值为第一预设值,则读取休眠前保存的系统状态参数,根据休眠前保存的系统状态参数切换至休眠前的状态。In a possible design, the processing module is further configured to obtain the dormancy attribute value if it is determined that a write dormancy attribute event occurs; if the dormancy attribute value is not the first preset value, save the current system state parameter , and switch to the dormancy state; if the dormancy attribute value is the first preset value, read the system state parameters saved before dormancy, and switch to the state before dormancy according to the system state parameters saved before dormancy.

在一种可能的设计中,所述处理模块,还用于若确定发生写RSSI校准值属性事件,则获取写入的RSSI校准值;若所述RSSI校准值属性为第二预设值,则控制蜂鸣器振动;若所述RSSI校准值属性为第三预设值,则控制蜂鸣器停止振动。In a possible design, the processing module is further configured to obtain the written RSSI calibration value if it is determined that an event of writing the RSSI calibration value attribute occurs; if the RSSI calibration value attribute is a second preset value, then Control the buzzer to vibrate; if the RSSI calibration value attribute is the third preset value, control the buzzer to stop vibrating.

第三方面,本发明实施例还提供了一种包含指令的计算机程序产品,当其在计算机上运行时,使得计算机执行上述第一方面所述的多功能iBeacon信标的实现方法。In the third aspect, the embodiment of the present invention also provides a computer program product containing instructions, which, when run on a computer, causes the computer to execute the implementation method of the multifunctional iBeacon described in the first aspect above.

第四方面,本发明实施例还提供了一种计算机可读存储介质,所述计算机可读存储介质内存储有计算机程序,所述计算机程序被处理器执行上述第一方面所述的多功能iBeacon信标的实现方法。In the fourth aspect, the embodiment of the present invention also provides a computer-readable storage medium, where a computer program is stored in the computer-readable storage medium, and the computer program is executed by a processor to execute the multifunctional iBeacon described in the first aspect above. The beacon implementation method.

本发明实施例还提供了一种一种iBeacon信标,包括处理器和机器可读存储介质,所述机器可读存储介质存储有能够被所述处理器执行的机器可执行指令,所述处理器被所述机器可执行指令促使:实现上述第一方面所述的方法步骤。An embodiment of the present invention also provides an iBeacon, including a processor and a machine-readable storage medium, the machine-readable storage medium stores machine-executable instructions that can be executed by the processor, and the processing The device is prompted by the machine-executable instructions to implement the method steps described in the first aspect above.

本发明的实施例提供的多功能iBeacon信标的实现方法及装置,当iBeacon信标为终端设备提供多个服务时,可以通过增添ID号的轮换功能,轮流广播每个服务的信息,各服务的信息不会发生冲突,可以实现在一个时间段内同时提供多种服务,无需重复部署信标,也可避免一个iBeacon信标同时广播携带各个服务ID的广播号而导致的资源浪费的情况。The implementation method and device of the multifunctional iBeacon provided by the embodiment of the present invention, when the iBeacon provides multiple services for the terminal equipment, the information of each service can be broadcast in turn by adding the rotation function of the ID number, and the information of each service can be broadcast in turn. Information will not conflict, and multiple services can be provided at the same time within a period of time, without repeated deployment of beacons, and it can also avoid the waste of resources caused by an iBeacon broadcasting the broadcast number carrying each service ID at the same time.

当然,实施本发明的任一产品或方法并不一定需要同时达到以上所述的所有优点。Of course, implementing any product or method of the present invention does not necessarily need to achieve all the above-mentioned advantages at the same time.

附图说明Description of drawings

为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following will briefly introduce the drawings that need to be used in the description of the embodiments or the prior art. Obviously, the accompanying drawings in the following description are only These are some embodiments of the present invention. Those skilled in the art can also obtain other drawings based on these drawings without creative work.

图1为本发明的实施例提供的一种多功能iBeacon信标的实现方法的流程图;Fig. 1 is the flowchart of the implementation method of a kind of multifunctional iBeacon beacon that the embodiment of the present invention provides;

图2为本发明的实施例提供的另一种多功能iBeacon信标的实现方法的流程图;Fig. 2 is a flow chart of another implementation method of a multifunctional iBeacon provided by an embodiment of the present invention;

图3为本发明的实施例提供的另一种多功能iBeacon信标的实现方法的流程图;Fig. 3 is a flow chart of another implementation method of a multifunctional iBeacon provided by an embodiment of the present invention;

图4为本发明的实施例提供的另一种多功能iBeacon信标的实现方法的流程图;FIG. 4 is a flow chart of another implementation method of a multifunctional iBeacon provided by an embodiment of the present invention;

图5为本发明的实施例提供的另一种多功能iBeacon信标的实现方法的流程图;FIG. 5 is a flow chart of another implementation method of a multifunctional iBeacon provided by an embodiment of the present invention;

图6为本发明的实施例提供的另一种多功能iBeacon信标的实现方法的流程图;FIG. 6 is a flowchart of another implementation method of a multifunctional iBeacon provided by an embodiment of the present invention;

图7为本发明的实施例提供的另一种多功能iBeacon信标的实现方法的流程图;FIG. 7 is a flowchart of another implementation method of a multifunctional iBeacon provided by an embodiment of the present invention;

图8为本发明的实施例提供的另一种多功能iBeacon信标的实现方法的流程图;FIG. 8 is a flowchart of another implementation method of a multifunctional iBeacon provided by an embodiment of the present invention;

图9为本发明的实施例提供的另一种多功能iBeacon信标的实现方法的流程图;FIG. 9 is a flowchart of another implementation method of a multifunctional iBeacon provided by an embodiment of the present invention;

图10为本发明的实施例提供的一种多功能iBeacon信标的实现装置的结构示意图;FIG. 10 is a schematic structural diagram of an implementation device for a multifunctional iBeacon provided by an embodiment of the present invention;

图11本发明的实施例提供的一种iBeacon信标的结构示意图。FIG. 11 is a schematic structural diagram of an iBeacon provided by an embodiment of the present invention.

具体实施方式Detailed ways

下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。The following will clearly and completely describe the technical solutions in the embodiments of the present invention with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only some, not all, embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by persons of ordinary skill in the art without making creative efforts belong to the protection scope of the present invention.

为了实现iBeacon信标为终端设备提供多个服务,本发明的实施例提供一种多功能iBeacon信标的实现方法,如图1所示,图1所示的方法流程由iBeacon信标执行,以服务队列中只存在第一服务和第二服务为例进行说明,该方法包括:In order to realize that iBeacon beacons provide multiple services for terminal devices, embodiments of the present invention provide a method for implementing multifunctional iBeacon beacons, as shown in Figure 1, the method flow shown in Figure 1 is executed by iBeacon beacons to serve Only the first service and the second service exist in the queue as an example, the method includes:

S101、广播第一服务信息。S101. Broadcast first service information.

其中,第一服务信息为服务队列中的第一个服务的信息。Wherein, the first service information is the information of the first service in the service queue.

当服务队列中存在至少两个服务时,iBeacon信标可轮换广播服务队列中的服务对应的信息,假设第一服务对应的ID为ID1,则可将广播内容初始化为ID1对应的信息,此时广播内容(也可以理解为第一服务信息)中包括:第一服务对应的通用唯一识别码(Universally Unique Identifier,UUID)1、MAJOR1和MINOR1,初始化完成后,即可开始广播第一服务信息。When there are at least two services in the service queue, the iBeacon can alternately broadcast the information corresponding to the service in the service queue. Assuming that the ID corresponding to the first service is ID1, the broadcast content can be initialized to the information corresponding to ID1. At this time The broadcast content (which can also be understood as the first service information) includes: Universally Unique Identifier (UUID) 1, MAJOR1, and MINOR1 corresponding to the first service. After the initialization is completed, the broadcast of the first service information can begin.

S102、当广播第一服务信息的时长达到第一服务对应的轮换周期时,暂停广播第一服务信息。S102. When the duration of broadcasting the first service information reaches a rotation period corresponding to the first service, suspend broadcasting the first service information.

其中,每个服务对应一个轮换周期,在一种可能的实现方式中,在开始广播第一服务信息的同时,可以启动一个定时器,并将第一服务的轮换周期的时长设置为该定时器的超时值,当定时器超时时,即可暂停广播第一服务信息。Each service corresponds to a rotation cycle. In a possible implementation, a timer may be started while broadcasting the first service information, and the duration of the rotation cycle of the first service may be set as the timer The timeout value, when the timer expires, the broadcast of the first service information can be suspended.

S103、广播第二服务信息。S103. Broadcast the second service information.

其中,第二服务信息为服务队列中的第二个服务的信息。Wherein, the second service information is the information of the second service in the service queue.

在iBeacon信标广播第二服务信息之前,将广播内容由第一服务信息修改为第二服务信息,且将轮换周期由第一服务对应的轮换周期修改为第二服务对应的轮换周期,并将接收信号强度指示(Received Signal Strength Indicator,RSSI)校准值由第一服务对应的RSSI校准值修改为第二服务对应的RSSI校准值。Before the iBeacon beacon broadcasts the second service information, modify the broadcast content from the first service information to the second service information, and modify the rotation cycle from the rotation cycle corresponding to the first service to the rotation cycle corresponding to the second service, and The received signal strength indicator (Received Signal Strength Indicator, RSSI) calibration value is modified from the RSSI calibration value corresponding to the first service to the RSSI calibration value corresponding to the second service.

修改广播内容的方法可参考图2,在iBeacon信标处于连接状态的情况下,可判断是否有写ID的事件发生,若否则继续监测是否有写ID的事件发生,若是则获取写入的ID,假设第二服务信息对应的ID为ID2,则写入的ID为ID2,然后iBeacon信标根据ID2更新广播内容,更新后的广播内容(也可以理解为第二服务信息)中包括:第二服务对应的UUID2、MAJOR1和MINOR1,初始化广播后即可开始广播第二服务信息,并继续监测是否有写ID的事件发生。The method of modifying the broadcast content can refer to Figure 2. When the iBeacon is in the connected state, it can be judged whether there is an event to write the ID. If not, continue to monitor whether there is an event to write the ID. If so, obtain the written ID. , assuming that the ID corresponding to the second service information is ID2, the written ID is ID2, and then the iBeacon updates the broadcast content according to ID2, and the updated broadcast content (which can also be understood as the second service information) includes: the second The UUID2, MAJOR1, and MINOR1 corresponding to the service can start broadcasting the second service information after the broadcast is initialized, and continue to monitor whether there is an event of writing the ID.

修改广播RSSI校准值的方法可参考图3,在iBeacon信标处于连接状态的情况下,判断是否有写入RSSI校准值事件,若否,则继续监测是否有写入RSSI校准值的事件,若是则获取RSSI校准值属性,并更新系统RSSI校准值参数,之后初始化广播后继续监测是否有写入RSSI校准值事件。The method of modifying the broadcast RSSI calibration value can refer to Figure 3. When the iBeacon is in the connected state, judge whether there is an event of writing the RSSI calibration value. If not, continue to monitor whether there is an event of writing the RSSI calibration value. If it is Then get the RSSI calibration value attribute, and update the system RSSI calibration value parameter, and then continue to monitor whether there is an event of writing the RSSI calibration value after initializing the broadcast.

S104、当广播第二服务信息的时长达到第二服务对应的轮换周期时,暂停广播第二服务信息。S104. When the duration of broadcasting the second service information reaches the rotation period corresponding to the second service, suspend broadcasting the second service information.

其中,在广播第二服务信息之前,会将第一服务对应的轮换周期修改为第二服务对应的轮换周期,可选地,在开始广播第二服务信息的同时,可以启动定时器,并将第二服务对应的额轮换周期的时长设定为该定时器的超时值,当定时器超时时,即可暂停广播第二服务信息。Wherein, before broadcasting the second service information, the rotation cycle corresponding to the first service will be modified to the rotation cycle corresponding to the second service, and optionally, a timer can be started while starting to broadcast the second service information, and the The duration of the rotation cycle corresponding to the second service is set as the timeout value of the timer, and when the timer times out, the broadcast of the second service information can be suspended.

以服务队列中只包括第一服务和第二服务为例,暂停广播第二服务信息之后,可返回S101,重新开始广播第一信息。Taking the service queue including only the first service and the second service as an example, after suspending the broadcast of the second service information, it may return to S101 and start broadcasting the first information again.

可以理解的是,重新广播第一信息之前,可以将广播内容由第二服务信息修改为第一服务信息,且将轮换周期由第二服务对应的轮换周期修改为第一服务对应的轮换周期,并将RSSI校准值由第二服务对应的RSSI校准值修改为第一服务对应的RSSI校准值。It can be understood that, before rebroadcasting the first information, the broadcast content may be modified from the second service information to the first service information, and the rotation cycle may be modified from the rotation cycle corresponding to the second service to the rotation cycle corresponding to the first service, And modify the RSSI calibration value from the RSSI calibration value corresponding to the second service to the RSSI calibration value corresponding to the first service.

本发明的实施例提供的多功能iBeacon信标的实现方法,当iBeacon信标为终端设备提供多个服务时,可以通过增添ID号的轮换功能,轮流广播每个服务的信息,各服务的信息不会发生冲突,可以实现在一个时间段内同时提供多种服务,无需重复部署信标,也可避免一个iBeacon信标同时广播携带各个服务ID的广播号而导致的资源浪费的情况。The implementation method of the multi-functional iBeacon provided by the embodiment of the present invention, when the iBeacon provides multiple services for the terminal device, the information of each service can be broadcast in turn by adding the rotation function of the ID number, and the information of each service is different. There will be conflicts, and multiple services can be provided at the same time within a period of time, without the need to repeatedly deploy beacons, and it can also avoid the waste of resources caused by an iBeacon broadcasting the broadcast number carrying each service ID at the same time.

本发明实施例的iBeacon信标还可以实现掉电保存功能,如图4所示,首先,将系统默认参数写入flash中,然后iBeacon信标上电,并读取flash,获取系统参数,之后判断是否有连接断开的事件发生;若否,则继续监测是否有连接断开的事件发生;若是,则将当前的系统参数写入flash中,并继续监测是否有连接断开的事件发生。The iBeacon beacon in the embodiment of the present invention can also realize the power-down saving function, as shown in Figure 4, first, write the system default parameters into the flash, then the iBeacon beacon is powered on, and read the flash to obtain the system parameters, and then Determine whether there is an event of disconnection; if not, continue to monitor whether there is an event of disconnection; if so, write the current system parameters into the flash, and continue to monitor whether there is an event of disconnection.

此外,本发明实施例的iBeacon信标还可以实现掉电保存功能,若iBeacon信标确定发生写休眠属性事件,则获取休眠属性值,若休眠属性值不为第一预设值,则保存当前系统状态参数,并切换至休眠状态;若休眠属性值为第一预设值,则读取休眠前保存的系统状态参数,根据休眠前保存的系统状态参数切换至休眠前的状态。In addition, the iBeacon in the embodiment of the present invention can also realize the power-down saving function. If the iBeacon determines that a write dormancy attribute event occurs, the dormancy attribute value is obtained. If the dormancy attribute value is not the first preset value, the current dormancy attribute value is saved. System state parameters, and switch to the dormant state; if the dormancy attribute value is the first preset value, then read the system state parameters saved before dormancy, and switch to the state before dormancy according to the system state parameters saved before dormancy.

其中,当前系统状态参数包括当前服务的UUID号、MAJOR号、MINOR号、广播轮换周期属性、RSSI校准值属性、发射功率属性、广播频率属性、轮换周期等。示例性地,第一预设值可以为0。Among them, the current system state parameters include UUID number, MAJOR number, MINOR number of the current service, broadcast rotation period attribute, RSSI calibration value attribute, transmission power attribute, broadcast frequency attribute, rotation period, etc. Exemplarily, the first preset value may be 0.

休眠唤醒的功能可参考图5,首先判断是否有写休眠属性事件,若否,则继续监测是否有写休眠属性事件;若是,则获取休眠属性,然后判断休眠属性是否为0,若休眠属性不为0,则将当前系统状态参数写入flash,并切换至休眠状态,即将发射功率设置为-20db、广播频率设置为2s、MAJOR号和MINOR号都设置为0;若休眠属性为0,说明此时要从休眠状态切换至工作状态,则从flash中读取休眠前的系统状态参数,还原系统状态。The sleep wake-up function can refer to Figure 5. First, judge whether there is a write sleep attribute event. If not, continue to monitor whether there is a write sleep attribute event; If it is 0, write the current system status parameters into the flash and switch to the dormant state, that is, set the transmission power to -20db, the broadcast frequency to 2s, and both the MAJOR number and MINOR number to 0; if the dormant attribute is 0, it means To switch from the dormant state to the working state at this time, read the system state parameters before dormancy from the flash, and restore the system state.

本发明实施例的iBeacon信标还可以通过写入RSSI校准值属性来实现位置发现功能,iBeacon信标若确定发生写RSSI校准值属性事件,则获取写入的RSSI校准值属性,若RSSI校准值属性为第二预设值,则控制蜂鸣器振动;若RSSI校准值属性为第三预设值,则控制蜂鸣器停止振动。示例性地,第二预设值可以为1,第三预设值可以为0。具体流程可参考图6,在iBeacon信标进入连接状态后,可以判断是否发生写RSSI校准值属性事件,若否,则继续监测是否发生写RSSI校准值属性事件;若是,则获取写入的RSSI校准值属性,然后判断该RSSI校准值属性值是否为1,若为1,则控制蜂鸣器振动;若不为1,则判断该RSSI属性值是否为0,若为0,则控制蜂鸣器停止振动,若不为0,则继续监测是否发生写RSSI校准值属性事件。The iBeacon in the embodiment of the present invention can also realize the location discovery function by writing the RSSI calibration value attribute. If the iBeacon beacon determines that an event of writing the RSSI calibration value attribute occurs, the written RSSI calibration value attribute is obtained. If the RSSI calibration value If the property is the second preset value, the buzzer is controlled to vibrate; if the RSSI calibration value property is the third preset value, the buzzer is controlled to stop vibrating. Exemplarily, the second preset value may be 1, and the third preset value may be 0. The specific process can refer to Figure 6. After the iBeacon enters the connection state, it can be judged whether the event of writing the RSSI calibration value attribute occurs. If not, continue to monitor whether the event of writing the RSSI calibration value attribute occurs; if so, obtain the written RSSI Calibration value attribute, and then judge whether the RSSI calibration value attribute value is 1, if it is 1, control the buzzer vibration; if not 1, then judge whether the RSSI attribute value is 0, if it is 0, control the buzzer The device stops vibrating, if it is not 0, then continue to monitor whether the write RSSI calibration value attribute event occurs.

除了上述描述的功能之外,本发明实施例的iBeacon信标还具有验证访问功能、发射功率属性配置功能以及广播频率功率配置功能,以下将分别进行介绍。In addition to the functions described above, the iBeacon in the embodiment of the present invention also has functions of verifying access, transmitting power attribute configuration, and broadcast frequency power configuration, which will be introduced separately below.

验证访问的方法可参考图7,可以创建两个属性,分别是原密码和新密码,可选的,原密码和新密码均可设置为6位,用户可通过设置新密码来修改原密码,修改流程可参考图1,在iBeacon信标进入连接状态后,可判断预设时间内是否有原密码输入,可选地,预设时间可以为2秒,用户可通过具有对iBeacon信标进行配置的权限的终端输入新密码。然后,若确定预设时间内没有原密码输入,则断开连接;若确定预设时间内有原密码输入,则判断原密码是否输入正确,若正确,则判断是否有新密码输入,若无新密码输入则继续监测是否有新密码输入;若有新密码输入,则获取新密码,并将原密码更新为新密码。The method of verifying access can refer to Figure 7. Two attributes can be created, namely the original password and the new password. Optionally, both the original password and the new password can be set to 6 digits. The user can modify the original password by setting a new password. The modification process can refer to Figure 1. After the iBeacon enters the connection state, it can be judged whether there is an original password input within the preset time. Optionally, the preset time can be 2 seconds. The user can configure the iBeacon with Enter the new password for the terminal with permissions. Then, if it is determined that there is no original password input within the preset time, then disconnect; If the new password is input, continue to monitor whether there is a new password input; if there is a new password input, then obtain the new password, and update the original password to the new password.

发射功率属性配置的方法可参考图8,iBeacon信标具备7种发射功率,分别是-20db、-16db、-12db、-8db、-4db、0db和4db。目前具有直接修改iBeacon信标发射功率的应用编程接口(Application Programming Interface,API),但通过该API输入的参数必须是负数,且在发射功率对应的属性配置协议中,只支持8位无符号类型的数据,比如-20dB是无法直接写入属性中的,基于此,本发明实施例提供了发射功率的映射关系表,如表1所示。The method of transmitting power attribute configuration can refer to Figure 8. The iBeacon beacon has 7 kinds of transmitting power, which are -20db, -16db, -12db, -8db, -4db, 0db and 4db. At present, there is an application programming interface (Application Programming Interface, API) for directly modifying the transmission power of iBeacon beacons, but the parameters input through this API must be negative numbers, and in the attribute configuration protocol corresponding to the transmission power, only 8-bit unsigned types are supported The data, such as -20dB, cannot be directly written into the attribute. Based on this, the embodiment of the present invention provides a mapping relationship table of transmission power, as shown in Table 1.

表1Table 1

智能终端发射功率参数Intelligent terminal transmit power parameters 3030 2626 22twenty two 1818 1414 00 44 发射功率属性Transmit Power Properties -20-20 -16-16 -12-12 -8-8 -4-4 00 44 发射功率实际值Actual value of transmit power -20db-20db -16dB-16dB -12dB-12dB -8dB-8dB -4dB-4dB 0dB0dB 4dB4dB

基于表1,发射功率属性的配置方法如图8所示,在iBeacon信标进入连接状态后,可以判断是否有写发射功率属性的事件发生,若没有写发射功率属性的事件发生,则继续监测是否有写发射功率属性的事件发生;若有写发射功率属性的事件发生,则获取写入的发射功率属性值,然后根据发射功率的映射关系表(即上述表1),将发射功率属性值转换为发射功率实际值,然后根据发射功率实际值更新系统发射功率参数,进而修改发射功率,在修改完成之后,继续监测是否有写发射功率属性的事件发生。Based on Table 1, the configuration method of the transmission power attribute is shown in Figure 8. After the iBeacon enters the connection state, it can be judged whether there is an event to write the transmission power attribute. If there is no event to write the transmission power attribute, continue monitoring Whether there is an event to write the transmission power attribute; if there is an event to write the transmission power attribute, then obtain the written transmission power attribute value, and then according to the mapping relationship table of the transmission power (that is, the above table 1), the transmission power attribute value Convert to the actual value of the transmission power, and then update the system transmission power parameters according to the actual value of the transmission power, and then modify the transmission power. After the modification is completed, continue to monitor whether there is an event to write the transmission power attribute.

广播频率属性的配置方法可参考图9,具备6种常用的广播频率,分别是100ms、300ms、500ms、750ms、1s和2s,目前具有直接修改iBeacon信标的广播频率的API,但通过该API输入的参数必须是负数,且广播频率对应的属性配置协议只支持8位无符号类型的数据,并且用于修改广播频率的API接收的参数是以0.625ms为单位的,比如100ms是无法直接写入属性中的,基于此,本发明实施例提供了广播频率的映射关系表,可以在属性协议的两端使用,具体可参考表2。Refer to Figure 9 for the configuration method of the broadcast frequency attribute. There are 6 commonly used broadcast frequencies, namely 100ms, 300ms, 500ms, 750ms, 1s and 2s. Currently, there is an API for directly modifying the broadcast frequency of iBeacon beacons, but through this API input The parameter must be a negative number, and the attribute configuration protocol corresponding to the broadcast frequency only supports 8-bit unsigned data, and the parameters received by the API for modifying the broadcast frequency are in units of 0.625ms. For example, 100ms cannot be directly written In the attribute, based on this, the embodiment of the present invention provides a broadcast frequency mapping relationship table, which can be used at both ends of the attribute protocol. For details, refer to Table 2.

表2Table 2

智能终端的广播频率参数Broadcast frequency parameters of smart terminals 1010 3030 5050 7575 100100 200200 广播频率属性值Broadcast frequency attribute value 160160 480480 800800 12001200 16001600 32003200 广播频率实际值Broadcast frequency actual value 100ms100ms 300ms300ms 500ms500ms 750ms750ms 1s1s 2s2s

基于表2,广播频率属性的配置方法如图9所示,在iBeacon信标进入连接状态后,可以判断是否有写广播频率属性的事件发生,若没有写广播频率属性的事件发生,则继续监测是否有写广播频率属性的事件发生;若有写广播频率属性的事件发生,则获取写入的广播频率属性值,然后根据广播频率的映射关系表(即上述表2),将广播频率属性值转换为广播频率实际值,然后根据广播频率实际值更新系统广播频率参数,进而初始化广播,之后继续监测是否有写广播频率属性的事件发生。Based on Table 2, the configuration method of the broadcast frequency attribute is shown in Figure 9. After the iBeacon enters the connection state, it can be judged whether there is an event to write the broadcast frequency attribute. If there is no event to write the broadcast frequency attribute, continue monitoring Whether there is an event to write the broadcast frequency attribute; if there is an event to write the broadcast frequency attribute, then obtain the written broadcast frequency attribute value, and then according to the broadcast frequency mapping relationship table (ie, the above table 2), the broadcast frequency attribute value Convert to the actual value of the broadcast frequency, and then update the system broadcast frequency parameters according to the actual value of the broadcast frequency, and then initialize the broadcast, and then continue to monitor whether there is an event to write the broadcast frequency attribute.

对应于上述方法实施例,本发明实施例提供了一种多功能iBeacon信标的实现装置,如图10所示,该装置100包括:广播模块1001和处理模块1002;可选地,装置100还可以包括存储模块1003,存储模块1003可用于存储计算机程序。Corresponding to the above-mentioned method embodiment, the embodiment of the present invention provides a device for implementing a multifunctional iBeacon. As shown in FIG. 10, the device 100 includes: a broadcast module 1001 and a processing module 1002; optionally, the device 100 can also Including a storage module 1003, the storage module 1003 can be used to store computer programs.

广播模块101,用于广播第一服务信息,第一服务信息为服务队列中的第一个服务的信息;The broadcast module 101 is configured to broadcast first service information, where the first service information is the information of the first service in the service queue;

处理模块102,用于当广播模块101广播第一服务信息的时长达到第一服务对应的轮换周期时,控制广播模块101暂停广播第一服务信息;The processing module 102 is configured to control the broadcast module 101 to suspend the broadcast of the first service information when the duration of broadcasting the first service information by the broadcast module 101 reaches the rotation period corresponding to the first service;

广播模块101,还用于广播第二服务信息,第二服务信息为服务队列中的第二个服务的信息;The broadcast module 101 is further configured to broadcast second service information, where the second service information is the information of the second service in the service queue;

处理模块102,还用于当广播模块101广播第二服务信息的时长达到第二服务对应的轮换周期时,控制广播模块101暂停广播第二服务信息;The processing module 102 is further configured to control the broadcasting module 101 to suspend broadcasting the second service information when the duration of broadcasting the second service information by the broadcasting module 101 reaches the rotation period corresponding to the second service;

处理模块102,还用于控制广播模块101轮流广播服务队列中每个服务的信息,直至服务队列中的最后一个服务的信息被广播,且广播模块101广播最后一个服务的信息的时长达到最后一个服务对应的轮换周期时,控制广播模块101从服务队列中的第一服务信息开始,循环广播服务队列中的每个服务的信息。The processing module 102 is also used to control the broadcast module 101 to broadcast the information of each service in the service queue in turn until the information of the last service in the service queue is broadcast, and the duration of broadcasting the information of the last service by the broadcast module 101 reaches the last During the rotation period corresponding to the service, the control broadcast module 101 starts from the first service information in the service queue, and cyclically broadcasts the information of each service in the service queue.

在一种可能的实现方式中,处理模块102,用于将广播内容由第一服务信息修改为第二服务信息;将轮换周期由第一服务对应的轮换周期修改为第二服务对应的轮换周期;将接收信号强度指示RSSI校准值由第一服务对应的RSSI校准值修改为第二服务对应的RSSI校准值。In a possible implementation manner, the processing module 102 is configured to modify the broadcast content from the first service information to the second service information; modify the rotation cycle from the rotation cycle corresponding to the first service to the rotation cycle corresponding to the second service ; Modify the received signal strength indicator RSSI calibration value from the RSSI calibration value corresponding to the first service to the RSSI calibration value corresponding to the second service.

在一种可能的实现方式中,处理模块102,还用于若确定发生连接断开事件,则保存当前系统参数。In a possible implementation manner, the processing module 102 is further configured to save current system parameters if it is determined that a disconnection event occurs.

在一种可能的实现方式中,处理模块102,还用于若确定发生写休眠属性事件,则获取休眠属性值;若休眠属性值不为第一预设值,则保存当前系统状态参数,并切换至休眠状态;若休眠属性值为第一预设值,则读取休眠前保存的系统状态参数,根据休眠前保存的系统状态参数切换至休眠前的状态。In a possible implementation, the processing module 102 is further configured to obtain the dormancy attribute value if it is determined that a write dormancy attribute event occurs; if the dormancy attribute value is not the first preset value, save the current system state parameter, and Switch to the dormant state; if the dormant attribute value is the first preset value, read the system state parameters saved before dormancy, and switch to the state before dormancy according to the system state parameters saved before dormancy.

在一种可能的实现方式中,处理模块102,还用于若确定发生写RSSI校准值属性事件,则获取写入的RSSI校准值;若RSSI校准值属性为第二预设值,则控制蜂鸣器振动;若RSSI校准值属性为第三预设值,则控制蜂鸣器停止振动。In a possible implementation, the processing module 102 is further configured to obtain the written RSSI calibration value if it is determined that an event of writing the RSSI calibration value attribute occurs; if the RSSI calibration value attribute is the second preset value, the control bee The buzzer vibrates; if the RSSI calibration value attribute is the third preset value, the buzzer is controlled to stop vibrating.

本发明实施例还提供了一种iBeacon信标,如图11所示,包括处理器1101、通信接口1102、存储器1103和通信总线1104,其中,处理器1101,通信接口1102,存储器1103通过通信总线1104完成相互间的通信,The embodiment of the present invention also provides an iBeacon, as shown in Figure 11, including a processor 1101, a communication interface 1102, a memory 1103, and a communication bus 1104, wherein the processor 1101, the communication interface 1102, and the memory 1103 pass through the communication bus 1104 completing mutual communication,

存储器1103,用于存放计算机程序;memory 1103, for storing computer programs;

处理器1101,用于执行存储器1103上所存放的程序时,实现上述图1至图9中的方法步骤。The processor 1101 is configured to execute the program stored in the memory 1103 to implement the method steps in the above-mentioned FIG. 1 to FIG. 9 .

上述提到的通信总线可以是外设部件互连标准(Peripheral ComponentInterconnect,PCI)总线或扩展工业标准结构(Extended Industry StandardArchitecture,EISA)总线等。该通信总线可以分为地址总线、数据总线、控制总线等。为便于表示,图中仅用一条粗线表示,但并不表示仅有一根总线或一种类型的总线。The aforementioned communication bus may be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (Extended Industry Standard Architecture, EISA) bus or the like. The communication bus can be divided into an address bus, a data bus, a control bus, and the like. For ease of representation, only one thick line is used in the figure, but it does not mean that there is only one bus or one type of bus.

通信接口用于上述iBeacon信标与其他设备之间的通信。The communication interface is used for communication between the above-mentioned iBeacon and other devices.

存储器可以包括随机存取存储器(Random Access Memory,RAM),也可以包括非易失性存储器(Non-Volatile Memory,NVM),例如至少一个磁盘存储器。可选的,存储器还可以是至少一个位于远离前述处理器的存储装置。The memory may include a random access memory (Random Access Memory, RAM), and may also include a non-volatile memory (Non-Volatile Memory, NVM), such as at least one disk memory. Optionally, the memory may also be at least one storage device located far away from the aforementioned processor.

上述的处理器可以是通用处理器,包括中央处理器(Central Processing Unit,CPU)、网络处理器(Network Processor,NP)等;还可以是数字信号处理器(Digital SignalProcessing,DSP)、专用集成电路(Application Specific Integrated Circuit,ASIC)、现场可编程门阵列(Field-Programmable Gate Array,FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件。Above-mentioned processor can be general-purpose processor, comprises central processing unit (Central Processing Unit, CPU), network processor (Network Processor, NP) etc.; Can also be Digital Signal Processor (Digital Signal Processing, DSP), ASIC (Application Specific Integrated Circuit, ASIC), Field-Programmable Gate Array (Field-Programmable Gate Array, FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.

在本发明提供的又一实施例中,还提供了一种计算机可读存储介质,该计算机可读存储介质内存储有计算机程序,所述计算机程序被处理器执行时实现上述任一多功能iBeacon信标的实现方法的步骤。In yet another embodiment provided by the present invention, a computer-readable storage medium is also provided, and a computer program is stored in the computer-readable storage medium, and when the computer program is executed by a processor, any of the above-mentioned multifunctional iBeacon The steps of the implementation method of the beacon.

在本发明提供的又一实施例中,还提供了一种包含指令的计算机程序产品,当其在计算机上运行时,使得计算机执行上述实施例中任一多功能iBeacon信标的实现方法方法。In yet another embodiment provided by the present invention, a computer program product containing instructions is also provided, and when it is run on a computer, it causes the computer to execute any method for implementing a multifunctional iBeacon in the above embodiments.

在上述实施例中,可以全部或部分地通过软件、硬件、固件或者其任意组合来实现。当使用软件实现时,可以全部或部分地以计算机程序产品的形式实现。所述计算机程序产品包括一个或多个计算机指令。在计算机上加载和执行所述计算机程序指令时,全部或部分地产生按照本发明实施例所述的流程或功能。所述计算机可以是通用计算机、专用计算机、计算机网络、或者其他可编程装置。所述计算机指令可以存储在计算机可读存储介质中,或者从一个计算机可读存储介质向另一个计算机可读存储介质传输,例如,所述计算机指令可以从一个网站站点、计算机、服务器或数据中心通过有线(例如同轴电缆、光纤、数字用户线(DSL))或无线(例如红外、无线、微波等)方式向另一个网站站点、计算机、服务器或数据中心进行传输。所述计算机可读存储介质可以是计算机能够存取的任何可用介质或者是包含一个或多个可用介质集成的服务器、数据中心等数据存储设备。所述可用介质可以是磁性介质,(例如,软盘、硬盘、磁带)、光介质(例如,DVD)、或者半导体介质(例如固态硬盘Solid State Disk(SSD))等。In the above embodiments, all or part of them may be implemented by software, hardware, firmware or any combination thereof. When implemented using software, it may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on the computer, the processes or functions according to the embodiments of the present invention will be generated in whole or in part. The computer can be a general purpose computer, a special purpose computer, a computer network, or other programmable devices. The computer instructions may be stored in or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions may be transmitted from a website, computer, server or data center Transmission to another website site, computer, server, or data center by wired (eg, coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (eg, infrared, wireless, microwave, etc.). The computer-readable storage medium may be any available medium that can be accessed by a computer, or a data storage device such as a server or a data center integrated with one or more available media. The available medium may be a magnetic medium (for example, a floppy disk, a hard disk, or a magnetic tape), an optical medium (for example, DVD), or a semiconductor medium (for example, a Solid State Disk (SSD)).

需要说明的是,在本文中,诸如第一和第二等之类的关系术语仅仅用来将一个实体或者操作与另一个实体或操作区分开来,而不一定要求或者暗示这些实体或操作之间存在任何这种实际的关系或者顺序。而且,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者设备所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括所述要素的过程、方法、物品或者设备中还存在另外的相同要素。It should be noted that in this article, relational terms such as first and second are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply that there is a relationship between these entities or operations. There is no such actual relationship or order between them. Furthermore, the term "comprises", "comprises" or any other variation thereof is intended to cover a non-exclusive inclusion such that a process, method, article or apparatus comprising a set of elements includes not only those elements, but also includes elements not expressly listed. other elements of or also include elements inherent in such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of additional identical elements in the process, method, article or apparatus comprising said element.

本说明书中的各个实施例均采用相关的方式描述,各个实施例之间相同相似的部分互相参见即可,每个实施例重点说明的都是与其他实施例的不同之处。尤其,对于装置实施例而言,由于其基本相似于方法实施例,所以描述的比较简单,相关之处参见方法实施例的部分说明即可。Each embodiment in this specification is described in a related manner, the same and similar parts of each embodiment can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and for relevant parts, please refer to part of the description of the method embodiment.

以上所述仅为本发明的较佳实施例而已,并非用于限定本发明的保护范围。凡在本发明的精神和原则之内所作的任何修改、等同替换、改进等,均包含在本发明的保护范围内。The above descriptions are only preferred embodiments of the present invention, and are not intended to limit the protection scope of the present invention. Any modification, equivalent replacement, improvement, etc. made within the spirit and principles of the present invention are included in the protection scope of the present invention.

Claims (10)

1.一种多功能iBeacon信标的实现方法,其特征在于,包括:1. A method for realizing a multifunctional iBeacon beacon, characterized in that, comprising: 广播第一服务信息,所述第一服务信息为服务队列中的第一个服务的信息;broadcasting first service information, where the first service information is the information of the first service in the service queue; 当广播第一服务信息的时长达到所述第一服务对应的轮换周期时,暂停广播所述第一服务信息;When the duration of broadcasting the first service information reaches the rotation period corresponding to the first service, suspend broadcasting the first service information; 广播第二服务信息,所述第二服务信息为服务队列中的第二个服务的信息;broadcasting second service information, where the second service information is the information of the second service in the service queue; 当广播第二服务信息的时长达到所述第二服务对应的轮换周期时,暂停广播所述第二服务信息;When the duration of broadcasting the second service information reaches the rotation period corresponding to the second service, suspend broadcasting the second service information; 按照上述方法轮流广播所述服务队列中每个服务的信息,直至所述服务队列中的最后一个服务的信息被广播,且广播所述最后一个服务的信息的时长达到所述最后一个服务对应的轮换周期时,循环执行上述步骤。According to the above method, the information of each service in the service queue is broadcast in turn until the information of the last service in the service queue is broadcast, and the duration of broadcasting the information of the last service reaches the corresponding time of the last service When the cycle is changed, the above steps are executed cyclically. 2.根据权利要求1所述的方法,其特征在于,在所述暂停广播所述第一服务信息之后,所述方法还包括:2. The method according to claim 1, characterized in that after the suspension of broadcasting the first service information, the method further comprises: 将广播内容由所述第一服务信息修改为所述第二服务信息;modifying the broadcast content from the first service information to the second service information; 将轮换周期由所述第一服务对应的轮换周期修改为所述第二服务对应的轮换周期;modifying the rotation period from the rotation period corresponding to the first service to the rotation period corresponding to the second service; 将接收信号强度指示RSSI校准值由所述第一服务对应的RSSI校准值修改为所述第二服务对应的RSSI校准值。Modifying the received signal strength indicator RSSI calibration value from the RSSI calibration value corresponding to the first service to the RSSI calibration value corresponding to the second service. 3.根据权利要求1或2所述的方法,其特征在于,所述方法还包括:3. The method according to claim 1 or 2, characterized in that the method further comprises: 若确定发生连接断开事件,则保存当前系统参数。If it is determined that a disconnection event occurs, the current system parameters are saved. 4.根据权利要求3所述的方法,其特征在于,所述方法还包括:4. method according to claim 3, is characterized in that, described method also comprises: 若确定发生写休眠属性事件,则获取休眠属性值;If it is determined that a write dormancy attribute event occurs, then obtain the dormancy attribute value; 若所述休眠属性值不为第一预设值,则保存当前系统状态参数,并切换至休眠状态;If the dormant attribute value is not the first preset value, then save the current system state parameters and switch to the dormant state; 若所述休眠属性值为第一预设值,则读取休眠前保存的系统状态参数,根据休眠前保存的系统状态参数切换至休眠前的状态。If the dormancy attribute value is the first preset value, read the system state parameters saved before dormancy, and switch to the state before dormancy according to the system state parameters saved before dormancy. 5.根据权利要求4所述的方法,其特征在于,所述方法还包括:5. method according to claim 4, is characterized in that, described method also comprises: 若确定发生写RSSI校准值属性事件,则获取写入的RSSI校准值;If it is determined that a write RSSI calibration value attribute event occurs, then obtain the written RSSI calibration value; 若所述RSSI校准值属性为第二预设值,则控制蜂鸣器振动;If the RSSI calibration value attribute is a second preset value, then control the vibration of the buzzer; 若所述RSSI校准值属性为第三预设值,则控制蜂鸣器停止振动。If the RSSI calibration value attribute is the third preset value, the buzzer is controlled to stop vibrating. 6.一种多功能iBeacon信标的实现装置,其特征在于,包括:6. A device for implementing a multifunctional iBeacon, characterized in that it comprises: 广播模块,用于广播第一服务信息,所述第一服务信息为服务队列中的第一个服务的信息;A broadcast module, configured to broadcast first service information, where the first service information is the information of the first service in the service queue; 处理模块,用于当所述广播模块广播第一服务信息的时长达到所述第一服务对应的轮换周期时,控制所述广播模块暂停广播所述第一服务信息;A processing module, configured to control the broadcast module to suspend broadcasting the first service information when the duration of broadcasting the first service information by the broadcast module reaches the rotation period corresponding to the first service; 所述广播模块,还用于广播第二服务信息,所述第二服务信息为服务队列中的第二个服务的信息;The broadcast module is also used to broadcast second service information, where the second service information is the information of the second service in the service queue; 所述处理模块,还用于当所述广播模块广播第二服务信息的时长达到所述第二服务对应的轮换周期时,控制所述广播模块暂停广播所述第二服务信息;The processing module is further configured to control the broadcast module to suspend broadcasting the second service information when the duration of the broadcast module broadcasting the second service information reaches the rotation period corresponding to the second service; 所述处理模块,还用于控制所述广播模块轮流广播所述服务队列中每个服务的信息,直至所述服务队列中的最后一个服务的信息被广播,且所述广播模块广播所述最后一个服务的信息的时长达到所述最后一个服务对应的轮换周期时,控制所述广播模块从所述服务队列中的第一服务信息开始,循环广播所述服务队列中的每个服务的信息。The processing module is further configured to control the broadcast module to broadcast the information of each service in the service queue in turn until the information of the last service in the service queue is broadcast, and the broadcast module broadcasts the last When the duration of the information of a service reaches the rotation period corresponding to the last service, the broadcast module is controlled to cyclically broadcast the information of each service in the service queue starting from the first service information in the service queue. 7.根据权利要求6所述的装置,其特征在于,7. The device of claim 6, wherein: 所述处理模块,用于将广播内容由所述第一服务信息修改为所述第二服务信息;将轮换周期由所述第一服务对应的轮换周期修改为所述第二服务对应的轮换周期;将接收信号强度指示RSSI校准值由所述第一服务对应的RSSI校准值修改为所述第二服务对应的RSSI校准值。The processing module is configured to modify the broadcast content from the first service information to the second service information; modify the rotation cycle from the rotation cycle corresponding to the first service to the rotation cycle corresponding to the second service ; Modify the received signal strength indicator RSSI calibration value from the RSSI calibration value corresponding to the first service to the RSSI calibration value corresponding to the second service. 8.根据权利要求6或7所述的装置,其特征在于,8. Apparatus according to claim 6 or 7, characterized in that 所述处理模块,还用于若确定发生连接断开事件,则保存当前系统参数。The processing module is further configured to save current system parameters if it is determined that a disconnection event occurs. 9.根据权利要求8所述的装置,其特征在于,9. The device of claim 8, wherein: 所述处理模块,还用于若确定发生写休眠属性事件,则获取休眠属性值;若所述休眠属性值不为第一预设值,则保存当前系统状态参数,并切换至休眠状态;若所述休眠属性值为第一预设值,则读取休眠前保存的系统状态参数,根据休眠前保存的系统状态参数切换至休眠前的状态。The processing module is further configured to obtain the dormancy attribute value if it is determined that a write dormancy attribute event occurs; if the dormancy attribute value is not the first preset value, save the current system state parameters and switch to the dormancy state; if If the dormancy attribute value is the first preset value, the system state parameters saved before dormancy are read, and the state before dormancy is switched according to the system state parameters saved before dormancy. 10.根据权利要求9所述的装置,其特征在于,10. The apparatus of claim 9, wherein: 所述处理模块,还用于若确定发生写RSSI校准值属性事件,则获取写入的RSSI校准值;若所述RSSI校准值属性为第二预设值,则控制蜂鸣器振动;若所述RSSI校准值属性为第三预设值,则控制蜂鸣器停止振动。The processing module is also used to obtain the written RSSI calibration value if it is determined that the event of writing the RSSI calibration value attribute occurs; if the RSSI calibration value attribute is the second preset value, then control the vibration of the buzzer; if the If the RSSI calibration value attribute is the third preset value, the buzzer is controlled to stop vibrating.
CN201810460824.5A 2018-05-15 2018-05-15 Method and device for implementing a multifunctional iBeacon Pending CN108684027A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810460824.5A CN108684027A (en) 2018-05-15 2018-05-15 Method and device for implementing a multifunctional iBeacon

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810460824.5A CN108684027A (en) 2018-05-15 2018-05-15 Method and device for implementing a multifunctional iBeacon

Publications (1)

Publication Number Publication Date
CN108684027A true CN108684027A (en) 2018-10-19

Family

ID=63806117

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810460824.5A Pending CN108684027A (en) 2018-05-15 2018-05-15 Method and device for implementing a multifunctional iBeacon

Country Status (1)

Country Link
CN (1) CN108684027A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113015101A (en) * 2021-02-18 2021-06-22 上海慧寻网络科技有限公司 Safe Bluetooth beacon data sending method

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1441559A (en) * 2002-01-30 2003-09-10 株式会社Ntt都科摩 Communication terminal, server, relay device, broadcast communication system, method and program
CN102123495A (en) * 2011-01-13 2011-07-13 山东大学 Centroid location algorithm based on RSSI (Received Signal Strength Indication) correction for wireless sensor network
CN104066148A (en) * 2013-03-19 2014-09-24 华为技术有限公司 Service Discovery Methods, Access Points, and Sites
CN107251508A (en) * 2014-10-14 2017-10-13 瑞迪厄思网络公司 Interleaving Multiple Bluetooth Low Energy Announcements

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1441559A (en) * 2002-01-30 2003-09-10 株式会社Ntt都科摩 Communication terminal, server, relay device, broadcast communication system, method and program
CN102123495A (en) * 2011-01-13 2011-07-13 山东大学 Centroid location algorithm based on RSSI (Received Signal Strength Indication) correction for wireless sensor network
CN104066148A (en) * 2013-03-19 2014-09-24 华为技术有限公司 Service Discovery Methods, Access Points, and Sites
CN107251508A (en) * 2014-10-14 2017-10-13 瑞迪厄思网络公司 Interleaving Multiple Bluetooth Low Energy Announcements

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113015101A (en) * 2021-02-18 2021-06-22 上海慧寻网络科技有限公司 Safe Bluetooth beacon data sending method
CN113015101B (en) * 2021-02-18 2022-04-12 上海慧寻网络科技有限公司 Safe Bluetooth beacon data sending method

Similar Documents

Publication Publication Date Title
US11240198B2 (en) Session management method and apparatus
CN108647089A (en) Resource allocation method, device, terminal and storage medium
CN109542614B (en) Resource allocation method, device, terminal and storage medium
KR20140012988A (en) Peer-to-peer group with renegotiation of group owner
WO2019144742A1 (en) Binding method for user terminal and device, apparatus, and system
CN110324193B (en) A terminal upgrade management method and device
WO2017088498A1 (en) Method, apparatus and system for reporting user equipment capability information
US20220312517A1 (en) D2d communication method, apparatus, and system
WO2019080719A1 (en) Data processing method and device, storage medium, processor, and system
CN105916100A (en) Heartbeat packet agency method, device and communication system
WO2021204131A1 (en) Communication method and device for multicast/broadcast service
CN110635957B (en) Method and device for network distribution of Internet of things equipment and mobile terminal
CN110267296B (en) State detection method and device
CN114710549A (en) A method, system and service node for dynamic management of network card in container platform
CN109936506A (en) Data transmission method, equipment and system
CN107979863A (en) A WiFi automatic connection method, system and terminal equipment
CN112565390B (en) Service distribution method, device, electronic device and storage medium
CN107968848B (en) A method, terminal device and storage medium for obtaining IP address
CN108900607A (en) A kind of processing method, device and the server of SMB agreement request
CN110213789B (en) Bluetooth connection method, terminal device, Bluetooth device, and computer storage medium
CN109347994B (en) Internet protocol IP address obtaining method and device, storage medium and electronic equipment
CN110475296B (en) Service quality negotiation method and device
CN114900387A (en) Cross-platform fusion access method, system, gateway and storage medium of equipment
CN108684027A (en) Method and device for implementing a multifunctional iBeacon
CN110392012A (en) Method and apparatus for rebooting in a lightweight machine-to-machine system

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20181019