Broadcasting method and device, electronic equipment and storage medium

By setting priority according to the data source type in the BLE broadcast protocol and storing the data in the corresponding section, the problem of poor BLE broadcast support capabilities of different platforms and hardware is solved, the demand for multiple services to broadcast simultaneously is realized, and the BLE broadcast capability is maximized.

CN119893445APending Publication Date: 2025-04-25BEIJING XIAOMI MOBILE SOFTWARE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311394941.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-10-25
Publication Date
2025-04-25

AI Technical Summary

Technical Problem

In the prior art, there are differences in the support capabilities of BLE broadcasts between different platforms and hardware manufacturers, especially the Windows platform has poor support for BLE extended broadcasts, which leads to the inability to perform effective BLE broadcasts.

Method used

By determining the source type and data length of the data to be broadcast, the attribute information is stored in the corresponding section of the broadcast protocol, and the data to be broadcast is stored in the section corresponding to the source type according to the data length, and the target broadcast data carrying the data to be broadcast is obtained. Different source types in the target broadcast data have different broadcast priority and broadcast according to these priority.

Benefits of technology

Different priority levels are set through source types, and data can be carried as much as possible according to priority levels, which maximizes the need for data broadcasting, and maximizes the use of BLE broadcasting capabilities, avoids waste of resources.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119893445A_ABST
    Figure CN119893445A_ABST
Patent Text Reader

Abstract

The invention relates to a broadcasting method and device, electronic equipment and a storage medium. The broadcasting method comprises the steps of determining a source type and a data length of to-be-broadcasted data; according to the data length, storing attribute information in a corresponding section of a broadcast protocol, and according to the data length, storing the to-be-broadcasted data in a section corresponding to the source type of the broadcast protocol to obtain target broadcast data carrying the to-be-broadcasted data, different source types in the target broadcast data have different broadcast priorities; and broadcasting the target broadcast data according to the broadcast priority. In this way, different priorities are set according to the source types, data are carried as much as possible according to the priorities, the requirement for data broadcasting is met to the maximum extent, and the BLE broadcasting capacity is utilized to the maximum extent.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of communication technology, and in particular to a broadcasting method, device, electronic device and storage medium. Background Art

[0002] BLE (Bluetooth Low Energy) broadcasting is a wireless technology that allows devices to connect to each other. Bluetooth signals can be sent from a specific device, and devices around the specific device receive and process the Bluetooth signals, thereby simply realizing connection and communication between Bluetooth devices.

[0003] BLE broadcasting is divided into two types: classic broadcasting and extended broadcasting. The latter can carry more broadcasting data. According to research, different platforms and hardware manufacturers have slightly different capabilities in supporting BLE broadcasting. For example, the Windows platform has poor support for BLE extended broadcasting, and different Android platforms support different BLE broadcasting data lengths, which makes it impossible to perform effective BLE broadcasting. Summary of the invention

[0004] In order to overcome the problems existing in the related art, the present disclosure provides a broadcasting method, device, electronic device and storage medium.

[0005] According to a first aspect of an embodiment of the present disclosure, a broadcasting method is provided, including:

[0006] Determine the source type and data length of the data to be broadcast;

[0007] The attribute information is stored in a corresponding section of the broadcast protocol, and according to the data length, the data to be broadcast is stored in a section corresponding to the source type of the broadcast protocol, to obtain target broadcast data carrying the data to be broadcast, wherein different source types in the target broadcast data have different broadcast priorities;

[0008] The target broadcast data is broadcast according to the broadcast priority.

[0009] Optionally, storing the data to be broadcast in a section corresponding to the source type of the broadcast protocol according to the data length includes:

[0010] Determine a target storage location according to the data length of the data to be broadcast and the standard occupied length of the corresponding data of the source type in the broadcast protocol, wherein the target storage location is located in a service extension area in the broadcast protocol and has a one-to-one correspondence with the source type;

[0011] The to-be-broadcasted data is stored in the target storage location corresponding to the source type.

[0012] Optionally, storing the to-be-broadcasted data in the target storage location corresponding to the source type includes:

[0013] Adding the service number corresponding to the data to be broadcast to the target list corresponding to the source type in the service extension area;

[0014] Adding the service number corresponding to the data to be broadcast to the data storage area corresponding to the target list in the service extension area;

[0015] The to-be-broadcasted data is stored in the target storage location corresponding to the data storage area.

[0016] Optionally, broadcasting the target broadcast data according to the broadcast priority includes:

[0017] Determining the list broadcast priority of the data to be broadcast according to the source type corresponding to the target list;

[0018] Determining, according to the service type of the data to be broadcasted, the service broadcast priority of the data to be broadcasted in the target list;

[0019] The target broadcast data is broadcast according to the list broadcast priority, the service broadcast priority and the maximum broadcast data length.

[0020] Optionally, broadcasting the target broadcast data according to the list broadcast priority, the service broadcast priority and the maximum broadcast data length includes:

[0021] Determining whether the data to be broadcast meets a broadcast condition according to the list broadcast priority, the service broadcast priority, and the maximum broadcast data length;

[0022] In a case where the data to be broadcast meets the broadcast condition, the target broadcast data carrying the data to be broadcast is broadcast.

[0023] Optionally, the broadcast condition is: the sum of the data length occupied by broadcast data greater than the list broadcast priority and the service broadcast priority of the data to be broadcast, the data length occupied by the device information of the broadcasting device, the data length occupied by the target list, the data length occupied by the source type and the data length of the data to be broadcast is less than or equal to the maximum broadcast data length; or

[0024] The broadcast conditions are: the data length occupied by the broadcast data that is greater than the list broadcast priority and the service broadcast priority of the data to be broadcast, the data length occupied by the device information of the broadcast device, and the sum of the data length occupied by the source type and the data length of the data to be broadcast is less than or equal to the maximum broadcast data length.

[0025] Optionally, determining the target storage location according to the data length of the data to be broadcast and a standard occupied length of the corresponding source type of data in the broadcast protocol includes:

[0026] In the case where the data length of the data to be broadcast is less than or equal to the standard occupied length of the corresponding source type in the broadcast protocol, determining the target storage location to be a broadcast segment in the service extension area; or

[0027] In a case where the data length of the data to be broadcast is greater than the standard occupied length of the corresponding source type in the broadcast protocol, the target storage location is determined to be a broadcast extension segment in the service extension area, wherein the broadcast extension segment and the broadcast segment are in different data segments in the broadcast protocol and the data length stored in the broadcast extension segment is greater than that of the broadcast segment.

[0028] Optionally, the attribute information includes user account information logged in to the broadcasting device and device information of the broadcasting device, and storing the attribute information in a corresponding section of the broadcasting protocol includes:

[0029] The user account information is stored in the account area of ​​the broadcast protocol, and the device information of the broadcast device is stored in the device information extension area of ​​the broadcast protocol.

[0030] According to a second aspect of an embodiment of the present disclosure, a broadcasting device is provided, including:

[0031] A determination module, configured to determine a source type and a data length of the data to be broadcast;

[0032] A generating module is configured to store the attribute information in a corresponding section of the broadcast protocol, and store the data to be broadcast in a section corresponding to the source type of the broadcast protocol according to the data length, to obtain target broadcast data carrying the data to be broadcast, wherein different source types in the target broadcast data have different broadcast priorities;

[0033] The broadcast module is configured to broadcast the target broadcast data according to the broadcast priority.

[0034] According to a third aspect of an embodiment of the present disclosure, there is provided an electronic device, including:

[0035] processor;

[0036] a memory for storing processor-executable instructions;

[0037] Wherein, the processor is configured to:

[0038] Determine the source type and data length of the data to be broadcast;

[0039] The attribute information is stored in a corresponding section of the broadcast protocol, and according to the data length, the data to be broadcast is stored in a section corresponding to the source type of the broadcast protocol, to obtain target broadcast data carrying the data to be broadcast, wherein different source types in the target broadcast data have different broadcast priorities;

[0040] The target broadcast data is broadcast according to the broadcast priority.

[0041] According to a fourth aspect of an embodiment of the present disclosure, there is provided a computer-readable storage medium having computer program instructions stored thereon, which, when executed by a processor, implement the steps of any one of the methods described in the first aspect.

[0042] The technical solution provided by the embodiments of the present disclosure may include the following beneficial effects: determining the source type and data length of the data to be broadcast; storing the attribute information in the corresponding section of the broadcast protocol, and storing the data to be broadcast in the section corresponding to the source type of the broadcast protocol according to the data length, obtaining the target broadcast data carrying the data to be broadcast, and different source types in the target broadcast data have different broadcast priorities; broadcasting the target broadcast data according to the broadcast priority. In this way, different priorities are set by source type, and data is carried as much as possible according to the priority, which maximizes the realization of the data broadcast demand and maximizes the use of BLE broadcast capabilities.

[0043] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS

[0044] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the present disclosure.

[0045] Figure 1 The figure is a flowchart of a broadcasting method according to an exemplary embodiment.

[0046] Figure 2 An implementation according to an exemplary embodiment is shown Figure 1 Flowchart of step S12 in FIG.

[0047] Figure 3 An implementation according to an exemplary embodiment is shown Figure 4 Flowchart of step S122 in FIG.

[0048] Figure 4 An implementation according to an exemplary embodiment is shown Figure 1 Flowchart of step S13 in FIG.

[0049] Figure 5 An implementation according to an exemplary embodiment is shown Figure 7 Flowchart of step S133 in FIG.

[0050] Figure 6 The invention is a block diagram of a broadcasting device according to an exemplary embodiment.

[0051] Figure 7 It is a block diagram of a device for broadcasting according to an exemplary embodiment. DETAILED DESCRIPTION

[0052] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present disclosure. Instead, they are merely examples of devices and methods consistent with some aspects of the present disclosure as detailed in the appended claims.

[0053] It should be noted that all actions of acquiring signals, information or data in the present disclosure are carried out in compliance with the relevant data protection laws and policies of the country where the device is located and with the authorization given by the owner of the corresponding device.

[0054] Before introducing a broadcast method, device, electronic device and storage medium provided by the present disclosure, the prior art and existing technical defects are briefly introduced. In the related art, BLE broadcast data is performed through the following BLE broadcast protocol:

[0055] Service Data: UUID, fixed data;

[0056] Header: Header information, 1 byte, including 3-bit version number, 4-bit length and 1 reserved bit;

[0057] LTV: Specific data carried by BLE broadcast and TLV format encoding.

[0058] Salt: salt value, 3 bytes, changes dynamically with Identity;

[0059] Identity: used to identify account and device information, 1 to 14 bytes;

[0060] TX Power: transmit power, used for BLE ranging, 2 bytes;

[0061] Intents: core data used to identify the content of the broadcast, which can contain up to 6 Intents. Each Intent contains 1 byte of Action and 1 byte of Data.

[0062] It can be seen from the BLE broadcast protocol that the BLE broadcast protocol can only allow up to 6 services to broadcast data at the same time, and cannot support more services. The number of broadcast services is very limited; and each service can only broadcast 2 bytes of data, 1 byte of Action and 1 byte of Data, and cannot carry more data. The size of data carried by a single service is very limited; in addition, only one service is broadcast at the same time, and the data that the service can carry can only be 2 bytes, which wastes space.

[0063] In the related art, the manufacturer specific data is also used to distinguish CM0, CM1 to CM n , which allows BLE broadcast to carry multiple services at the same time, and each service occupies at least 2 bytes (1 byte of Type, 1 byte of Length). From the actual packet capture, it is found that each BLE broadcast only carries the data of one service. Multiple services are broadcast simultaneously in the form of multicast. Moreover, if the service does not need to carry data and only needs to broadcast its existence, it also takes up 2 bytes of space, resulting in space waste; there is also an upper limit on the number of BLE multicasts, and the more the number, the greater the power consumption; in addition, the BLE broadcast contains information such as the device unique identifier, device type, and device name, which needs to be synchronized from the cloud, making it difficult to copy or promote.

[0064] In view of the above technical problems, the present disclosure provides a broadcast method, which aims to avoid wasting broadcast resources and can carry data of multiple services at the same time.

[0065] Figure 1 is a flowchart of a broadcasting method according to an exemplary embodiment. Figure 1 As shown, the broadcast method can be used for a terminal configured with a BLE function, and includes the following steps.

[0066] In step S11, the source type and data length of the data to be broadcast are determined.

[0067] The data to be broadcast is data to be broadcast corresponding to the service in the terminal, so the source type of the data to be broadcast can be determined according to the service number.

[0068] Each service may have data that needs to be broadcast. Each service is configured with a service ID (Identity document, ID), and the source type of the data to be broadcast can be determined by the service ID. The source type may include a system source corresponding to the operating system of the terminal and a non-system source corresponding to the non-operating system. In other words, services may include system services and third-party services. System services are services corresponding to the operating system, and the source type of the data to be broadcast is a system source. Third-party services are not services corresponding to the operating system, and the source type of the data to be broadcast is a third-party source.

[0069] In the embodiment of the present disclosure, when multiple services are running at the same time, the to-be-broadcast data corresponding to the multiple services can be broadcasted simultaneously through BLE.

[0070] In step S12, the attribute information is stored in a corresponding section of the broadcast protocol, and according to the data length, the data to be broadcast is stored in a section corresponding to the source type of the broadcast protocol to obtain target broadcast data carrying the data to be broadcast.

[0071] Wherein, different source types in the target broadcast data have different broadcast priorities. In the embodiment of the present disclosure, the attribute information and the data to be broadcast in the broadcast protocol are stored in different extension areas respectively, and the data length that can be stored in each extension area is limited by the protocol.

[0072] In one embodiment of the present disclosure, corresponding lists are configured for services of different source types in the broadcast protocol, and different lists have different broadcast priorities, so that the to-be-broadcasted data of different source types in the target broadcast data have different broadcast priorities. For example, the broadcast priority of the list corresponding to the system service is higher than the broadcast priority of the list corresponding to the third-party service. Therefore, the broadcast priority of the to-be-broadcasted data stored in the list of the system service is higher than the broadcast priority of the to-be-broadcasted data stored in the list of the third-party service. Moreover, services of different service types in the same list also have different broadcast priorities. For example, in the list of system services, the broadcast priority of networking services and distributed services is higher than the broadcast priority of other services.

[0073] In the disclosed embodiment, the attribute information may include: the unique identifier of the broadcasting device, the device type, the device name, and the user account information logged in to the broadcasting device, the connection types supported by the broadcasting device and the list of supported services. For example, the connection type supported by the broadcasting device may be support for BLE Bluetooth connection, and the list of supported services includes a system service list and a third-party service list.

[0074] In one embodiment of the present disclosure, the above data can be divided into two categories: data of fixed length and data of non-fixed length, wherein the unique identifier of the broadcasting device, the device type, the user account information, and the supported connection types can be data of fixed length, while the device name, the list of supported services, and the data to be broadcast can be data of non-fixed length.

[0075] In some embodiments of the present disclosure, fields with different meanings can be distinguished by different items in the broadcast protocol, and each field is distinguished by the corresponding type and the data length occupied. For example, the broadcast protocol may include fields of multiple items such as the public data area, the account area, the service extension area, and the device information extension area, among which the system service list and system service data, the third-party service list and third-party service data are all in the service extension area, and the header extension area and the device name are all in the device information extension area.

[0076] In the disclosed embodiment, the type type of the header extension data is represented by a string, and the type type of the device name can also be represented by a string. It can be understood that the string representing the type type of the header extension data is different from the string representing the type type of the device name, but the encoding rules can be the same. For example, the header extension data of 0000XXXX, 0000 is the type that occupies 4 bits, and XXXX is the data length that identifies the 4-bit type. For another example, the system service list of 0001XXXX, 0001 is the type that occupies 4 bits, and XXXX is the data length that identifies the 4-bit type. For another example, the system service data of 101XXXXX can be calculated to obtain the service identifier after parsing according to 8 bits.

[0077] Among them, the priority of the header extension data is higher than the priority of the system service list, the priority of the system service list is higher than the priority of the device name, and the priority of the device name is higher than the priority of the third-party service list.

[0078] It can be understood that the target broadcast data may include one or more to-be-broadcast data of a service, or may include multiple services. Moreover, when the target broadcast data includes to-be-broadcast data corresponding to multiple services, it may include multiple services corresponding to system services and multiple services corresponding to third-party services.

[0079] In some embodiments of the present disclosure, the system service list in the target broadcast data may correspond to system service data 1, system service data 2, and system service data n, and the three-party service list may correspond to three-party service data 1, three-party service data 2, and three-party service data n. Therefore, multiple data to be broadcasted can be obtained in one broadcast.

[0080] Among them, system services and third-party services can be divided into levels 0-15, so as to determine the target priority of the service corresponding to the broadcast data. If the number of services in the system service list is greater than 32, the system extension service list mark bit will be enabled in the broadcast protocol to facilitate the receiver to know that there are more than 32 system services. Similarly, if the number of services in the third-party service list is greater than 64, the system extension service list mark bit will be enabled in the broadcast protocol to facilitate the receiver to know that there are more than 64 third-party services. Among them, the system service Type value supports a maximum of 96 system services, and the third-party service Type value supports a maximum of 128 third-party services.

[0081] In step S13, the target broadcast data is broadcast according to the broadcast priority.

[0082] In one embodiment of the present disclosure, according to the broadcast priority, the to-be-broadcast data corresponding to the service with a higher priority in the target broadcast data may be broadcast, and the to-be-broadcast data corresponding to the service with a lower priority in the target broadcast data may be ignored and not broadcast.

[0083] The above technical solution determines the source type and data length of the data to be broadcast; stores the attribute information in the corresponding section of the broadcast protocol, and according to the data length, stores the data to be broadcast in the section corresponding to the source type of the broadcast protocol, and obtains the target broadcast data carrying the data to be broadcast. Different source types in the target broadcast data have different broadcast priorities; according to the broadcast priority, the target broadcast data is broadcast. In this way, different priorities are set by source type, and data is carried as much as possible according to the priority, which maximizes the realization of data broadcast needs and maximizes the use of BLE broadcast capabilities.

[0084] Alternatively, see Figure 2 As shown, in step S12, storing the data to be broadcast in a section corresponding to the source type of the broadcast protocol according to the data length includes:

[0085] In step S121, a target storage location is determined according to the data length of the data to be broadcast and the standard occupied length of the corresponding source type of data in the broadcast protocol.

[0086] The target storage location is located in the service extension area in the broadcast protocol and has a one-to-one correspondence with the source type.

[0087] Among them, if the source type of the data to be broadcast is system service, the target storage location is located at the position corresponding to the system service list in the service extension area in the broadcast protocol; if the source type of the data to be broadcast is a third-party service, the target storage location is located at the position corresponding to the third-party service list in the service extension area in the broadcast protocol.

[0088] It can be explained that the service data in the service extension area corresponding to the system service list and the third-party service list have a standard occupied length, wherein the standard occupied length of the service data in the system service list and the third-party service list can be the same or different, for example, the standard occupied length can be 4 bits, that is to say, based on the size relationship between the data length of the data to be broadcast and 4 bits, the target storage position of the data to be broadcast in the service extension area in the broadcast protocol can be determined.

[0089] In step S122, the to-be-broadcasted data is stored in the target storage location corresponding to the source type.

[0090] The service number corresponding to the data to be broadcasted will also be stored in the segment corresponding to the source type and occupy a certain data length, and the data to be broadcasted will be stored in the corresponding target storage location.

[0091] Alternatively, see Figure 3 As shown, in step S122, storing the to-be-broadcasted data in the target storage location corresponding to the source type includes:

[0092] In step S1221, the service number corresponding to the to-be-broadcasted data is added to a target list corresponding to the source type in the service extension area.

[0093] Among them, whether a service exists in the BLE broadcast data can be represented by 1 bit. For example, whether a service exists can be represented by 0 and 1. 0 indicates that the service does not exist on the broadcasting device, and 1 indicates that the service exists on the device and is running. In the disclosed embodiment, data of 31 system services corresponding to the system service list can be carried, and data of 63 third-party services corresponding to the third-party service list can be carried. The actual occupied length depends on the number of services in the service list that needs to be broadcast and the data length of the data to be broadcast for each service. In addition, there is a 1 bit in the service list to indicate whether there are more services. If it is 1, it means that there are more services on the device, and the complete service list can be obtained after connecting to the device. When there is no system service or third-party service, the data is not carried in the BLE broadcast data.

[0094] In the embodiment of the present disclosure, the service ID is a 32-bit hexadecimal data.

[0095] In step S1222, the service number corresponding to the to-be-broadcasted data is added to the data storage area in the service extension area corresponding to the target list.

[0096] In one embodiment, when the source of the data to be broadcast is a system service, the service number corresponding to the data to be broadcast is added to the type Type of the system service data. When the source of the data to be broadcast is a third-party service, the service number corresponding to the data to be broadcast is added to the type Type of the third-party service data.

[0097] In step S1223, the to-be-broadcasted data is stored in the target storage location corresponding to the data storage area.

[0098] Alternatively, see Figure 4 As shown, in step S13, broadcasting the target broadcast data according to the broadcast priority includes:

[0099] In step S131, the list broadcast priority of the data to be broadcast is determined according to the source type corresponding to the target list.

[0100] In the disclosed embodiment, the list broadcast priority of the system service list is higher than the list broadcast priority of the third-party service list, that is, the list broadcast priority of the data to be broadcast corresponding to all list services is higher than the list broadcast priority of the data to be broadcast corresponding to the third-party service.

[0101] In step S132, the service broadcast priority of the data to be broadcast in the target list is determined according to the service type of the data to be broadcast.

[0102] In the embodiment of the present disclosure, the to-be-broadcasted data of the same service type may have different or the same service broadcast priorities.

[0103] In step S133, the target broadcast data is broadcast according to the list broadcast priority, the service broadcast priority and the maximum broadcast data length.

[0104] In the disclosed embodiment, the maximum broadcast data length indicates the maximum broadcast data length that can be carried in each broadcast. Therefore, the maximum broadcast data length includes the total data length occupied by the account area, the data extension area and the device information extension area.

[0105] First, it is necessary to ensure the data length occupied by the header extension data, and then determine how many system service lists corresponding to the system service data are carried. If the maximum broadcast data length has not been reached, carry the device name. Furthermore, if the maximum broadcast data length has not been reached, determine how many third-party service lists corresponding to the third-party service data are carried.

[0106] In the above technical solution, different priorities are set for services, and service data is carried as much as possible according to the priority, so as to maximize the demand for simultaneous broadcast of multiple services and maximize the use of BLE broadcast data.

[0107] Alternatively, see Figure 5 As shown, in step S133, broadcasting the target broadcast data according to the list broadcast priority, the service broadcast priority and the maximum broadcast data length includes:

[0108] In step S1331, it is determined whether the data to be broadcast meets the broadcast condition according to the list broadcast priority, the service broadcast priority and the maximum broadcast data length.

[0109] It is understandable that each broadcast target broadcast data cannot exceed the maximum broadcast data length. Therefore, the data length occupied by the data can be determined in turn according to the list broadcast priority and the service broadcast priority, and then as much data as possible can be broadcast. In other words, under the premise of not exceeding the maximum broadcast data length, first determine whether the data to be broadcasted can be carried according to the list broadcast priority, and then determine whether the data to be broadcasted can be carried according to the service broadcast priority.

[0110] In step S1332, when the data to be broadcast meets the broadcast condition, the target broadcast data carrying the data to be broadcast is broadcast.

[0111] It is understandable that, when the data to be broadcast meets the broadcast condition, the data in the target broadcast data that meets the broadcast condition is broadcast. For example, if the current data to be broadcast is third-party service data, and the header extension data and system service data just occupy all the maximum broadcast data lengths, then only the header extension data and the system service data are broadcast, and all the data in the third-party service list are ignored and not broadcast.

[0112] Optionally, the broadcast condition is: the sum of the data length occupied by the broadcast data greater than the list broadcast priority and the service broadcast priority of the data to be broadcast, the data length occupied by the device information of the broadcasting device, the data length occupied by the target list, the data length occupied by the source type and the data length of the data to be broadcast is less than or equal to the maximum broadcast data length;

[0113] The broadcast conditions are: the data length occupied by the broadcast data that is greater than the list broadcast priority and the service broadcast priority of the data to be broadcast, the data length occupied by the device information of the broadcasting device, and the sum of the data length occupied by the source type and the data length of the data to be broadcast is less than or equal to the maximum broadcast data length.

[0114] In the disclosed embodiment, if all services that need to be broadcasted currently carry data, the service list can be ignored in the broadcast data. If the service data is encountered during parsing, it also indicates that the service is available and running on the device. In this way, more useful data can be carried, that is, the data length occupied by the service list is used to carry more data.

[0115] Optionally, in step S121, determining the target storage location according to the data length of the data to be broadcast and the standard occupied length of the corresponding source type of data in the broadcast protocol includes:

[0116] In the case where the data length of the data to be broadcast is less than or equal to the standard occupied length of the corresponding source type in the broadcast protocol, determining the target storage location to be a broadcast segment in the service extension area;

[0117] In a case where the data length of the data to be broadcast is greater than the standard occupied length of the corresponding source type in the broadcast protocol, the target storage location is determined to be a broadcast extension segment in the service extension area, wherein the broadcast extension segment and the broadcast segment are in different data segments in the broadcast protocol and the data length stored in the broadcast extension segment is greater than that of the broadcast segment.

[0118] Each broadcast segment can carry no more than 4 bits of data, and each broadcast extension segment can carry no more than 15 bytes of data. For example, if the data length of system service data 1 does not exceed 4 bits, it can be stored in the broadcast segment, and if the data length of system service data 1 exceeds 4 bits and does not exceed 15 bytes, it can be stored in the broadcast extension segment.

[0119] Optionally, the attribute information includes user account information logged in to the broadcasting device and device information of the broadcasting device, and storing the attribute information in a corresponding section of the broadcasting protocol includes:

[0120] The user account information is stored in the account area of ​​the broadcast protocol, and the device information of the broadcast device is stored in the device information extension area of ​​the broadcast protocol.

[0121] The account area may store account data corresponding to the user account information, wherein the account data may occupy a corresponding data length, wherein the occupied data length may be included in the maximum broadcast data length in bytes.

[0122] The present disclosure also provides a broadcasting device. Figure 6 As shown, the broadcasting device comprises:

[0123] The determination module 910 is configured to determine the source type and data length of the data to be broadcast;

[0124] The generating module 920 is configured to store the attribute information in a corresponding section of the broadcast protocol, and store the data to be broadcast in a section corresponding to the source type of the broadcast protocol according to the data length, to obtain target broadcast data carrying the data to be broadcast, wherein different source types in the target broadcast data have different broadcast priorities;

[0125] The broadcast module 930 is configured to broadcast the target broadcast data according to the broadcast priority.

[0126] Optionally, the generating module 920 is configured to:

[0127] Determine a target storage location according to the data length of the data to be broadcast and the standard occupied length of the corresponding data of the source type in the broadcast protocol, wherein the target storage location is located in a service extension area in the broadcast protocol and has a one-to-one correspondence with the source type;

[0128] The to-be-broadcasted data is stored in the target storage location corresponding to the source type.

[0129] Optionally, the generating module 920 is configured to:

[0130] Adding the service number corresponding to the data to be broadcast to the target list corresponding to the source type in the service extension area;

[0131] Adding the service number corresponding to the data to be broadcast to the data storage area corresponding to the target list in the service extension area;

[0132] The to-be-broadcasted data is stored in the target storage location corresponding to the data storage area.

[0133] Optionally, the broadcast module 930 is configured to:

[0134] Determining the list broadcast priority of the data to be broadcast according to the source type corresponding to the target list;

[0135] Determining, according to the service type of the data to be broadcasted, the service broadcast priority of the data to be broadcasted in the target list;

[0136] The target broadcast data is broadcast according to the list broadcast priority, the service broadcast priority and the maximum broadcast data length.

[0137] Optionally, the broadcast module 930 is configured to:

[0138] Determining whether the data to be broadcast meets a broadcast condition according to the list broadcast priority, the service broadcast priority, and the maximum broadcast data length;

[0139] In a case where the data to be broadcast meets the broadcast condition, the target broadcast data carrying the data to be broadcast is broadcast.

[0140] Optionally, the broadcast condition is: the sum of the data length occupied by broadcast data greater than the list broadcast priority and the service broadcast priority of the data to be broadcast, the data length occupied by the device information of the broadcasting device, the data length occupied by the target list, the data length occupied by the source type and the data length of the data to be broadcast is less than or equal to the maximum broadcast data length; or

[0141] The broadcast conditions are: the data length occupied by the broadcast data that is greater than the list broadcast priority and the service broadcast priority of the data to be broadcast, the data length occupied by the device information of the broadcast device, and the sum of the data length occupied by the source type and the data length of the data to be broadcast is less than or equal to the maximum broadcast data length.

[0142] Optionally, the generating module 920 is configured to:

[0143] In the case where the data length of the data to be broadcast is less than or equal to the standard occupied length of the corresponding source type in the broadcast protocol, determining the target storage location to be a broadcast segment in the service extension area; or

[0144] In the case where the data length of the data to be broadcast is greater than the standard occupied length of the corresponding data type information in the broadcast protocol, the target storage location is determined to be a broadcast extension segment in the service extension area, wherein the broadcast extension segment and the broadcast segment are in different data segments in the broadcast protocol and the data length stored in the broadcast extension segment is greater than that of the broadcast segment.

[0145] Optionally, the attribute information includes user account information logged in to the broadcasting device and device information of the broadcasting device, and the generating module 920 is configured to:

[0146] The user account information is stored in the account area of ​​the broadcast protocol, and the device information of the broadcast device is stored in the device information extension area of ​​the broadcast protocol.

[0147] Regarding the device in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated here.

[0148] The present disclosure also provides an electronic device, including:

[0149] processor;

[0150] a memory for storing processor-executable instructions;

[0151] Wherein, the processor is configured to:

[0152] Determine the source type and data length of the data to be broadcast;

[0153] The attribute information is stored in a corresponding section of the broadcast protocol, and according to the data length, the data to be broadcast is stored in a section corresponding to the source type of the broadcast protocol, to obtain target broadcast data carrying the data to be broadcast, wherein different source types in the target broadcast data have different broadcast priorities;

[0154] The target broadcast data is broadcast according to the broadcast priority.

[0155] It can be explained that the processor can be configured to execute executable instructions stored in the memory to implement the broadcasting method in any one of the aforementioned embodiments.

[0156] The embodiments of the present disclosure further provide a computer-readable storage medium having computer program instructions stored thereon, which implement the steps of the method described in any one of the aforementioned embodiments when the program instructions are executed by a processor.

[0157] Figure 7 8 is a block diagram of a broadcasting apparatus 800 according to an exemplary embodiment. For example, the apparatus 800 may be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, a fitness device, a personal digital assistant, etc.

[0158] Reference Figure 7 , the device 800 may include one or more of the following components: a processing component 802 , a memory 804 , a power component 806 , a multimedia component 808 , an audio component 810 , an input / output interface 812 , a sensor component 814 , and a communication component 816 .

[0159] The processing component 802 generally controls the overall operation of the device 800, such as operations associated with display, phone calls, data communications, camera operations, and recording operations. The processing component 802 may include one or more processors 820 to execute instructions to complete all or part of the steps of the above-mentioned broadcasting method. In addition, the processing component 802 may include one or more modules to facilitate the interaction between the processing component 802 and other components. For example, the processing component 802 may include a multimedia module to facilitate the interaction between the multimedia component 808 and the processing component 802.

[0160] The memory 804 is configured to store various types of data to support operations on the device 800. Examples of such data include instructions for any application or method operating on the device 800, contact data, phone book data, messages, pictures, videos, etc. The memory 804 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk.

[0161] The power supply component 806 provides power to the various components of the device 800. The power supply component 806 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power for the device 800.

[0162] The multimedia component 808 includes a screen that provides an output interface between the device 800 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundaries of the touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 808 includes a front camera and / or a rear camera. When the device 800 is in an operating mode, such as a shooting mode or a video mode, the front camera and / or the rear camera may receive external multimedia data. Each front camera and rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.

[0163] The audio component 810 is configured to output and / or input audio signals. For example, the audio component 810 includes a microphone (MIC), and when the device 800 is in an operating mode, such as a call mode, a recording mode, and a speech recognition mode, the microphone is configured to receive an external audio signal. The received audio signal can be further stored in the memory 804 or sent via the communication component 816. In some embodiments, the audio component 810 also includes a speaker for outputting audio signals.

[0164] The input / output interface 812 provides an interface between the processing component 802 and the peripheral interface modules, which may be keyboards, click wheels, buttons, etc. These buttons may include but are not limited to: a home button, a volume button, a start button, and a lock button.

[0165] The sensor assembly 814 includes one or more sensors for providing various aspects of the status assessment of the device 800. For example, the sensor assembly 814 can detect the open / closed state of the device 800, the relative positioning of components, such as the display and keypad of the device 800, and the sensor assembly 814 can also detect the position change of the device 800 or a component of the device 800, the presence or absence of user contact with the device 800, the orientation or acceleration / deceleration of the device 800, and the temperature change of the device 800. The sensor assembly 814 may include a proximity sensor configured to detect the presence of a nearby object without any physical contact. The sensor assembly 814 may also include an optical sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 814 may also include an accelerometer, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.

[0166] The communication component 816 is configured to facilitate wired or wireless communication between the device 800 and other devices. The device 800 can access a wireless network based on a communication standard, such as WiFi, 2G or 3G, or a combination thereof. In an exemplary embodiment, the communication component 816 receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 816 also includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology and other technologies.

[0167] In an exemplary embodiment, the apparatus 800 may be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors or other electronic components to perform the above-described broadcasting method.

[0168] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory 804 including instructions, and the instructions can be executed by the processor 820 of the device 800 to perform the above method. For example, the non-transitory computer-readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc.

[0169] Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the specification and practicing the present disclosure. The present disclosure is intended to cover any variations, uses or adaptations of the present disclosure that follow the general principles of the present disclosure and include common knowledge or customary techniques in the art that are not disclosed in the present disclosure. The description and examples are to be considered as exemplary only, and the true scope and spirit of the present disclosure are indicated by the following claims.

[0170] It should be understood that the present disclosure is not limited to the exact structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.

Claims

1. A broadcasting method, characterized in that: include: Determine the source type and data length of the data to be broadcast; The attribute information is stored in a corresponding section of the broadcast protocol, and according to the data length, the data to be broadcast is stored in a section corresponding to the source type of the broadcast protocol, to obtain target broadcast data carrying the data to be broadcast, wherein different source types in the target broadcast data have different broadcast priorities; The target broadcast data is broadcast according to the broadcast priority.

2. The method according to claim 1, characterized in that According to the data length, storing the data to be broadcast in a section corresponding to the source type of the broadcast protocol includes: Determine a target storage location according to the data length of the data to be broadcast and the standard occupied length of the corresponding data of the source type in the broadcast protocol, wherein the target storage location is located in a service extension area in the broadcast protocol and has a one-to-one correspondence with the source type; The to-be-broadcasted data is stored in the target storage location corresponding to the source type.

3. The method according to claim 2, characterized in that The storing the to-be-broadcasted data in the target storage location corresponding to the source type comprises: Adding the service number corresponding to the data to be broadcast to the target list corresponding to the source type in the service extension area; Adding the service number corresponding to the to-be-broadcasted data to the data storage area corresponding to the target list in the service extension area; The to-be-broadcasted data is stored in the target storage location corresponding to the data storage area.

4. The method according to claim 3, characterized in that The step of broadcasting the target broadcast data according to the broadcast priority includes: Determining the list broadcast priority of the data to be broadcast according to the source type corresponding to the target list; Determining, according to the service type of the data to be broadcasted, the service broadcast priority of the data to be broadcasted in the target list; The target broadcast data is broadcast according to the list broadcast priority, the service broadcast priority and the maximum broadcast data length.

5. The method according to claim 4, characterized in that The method of broadcasting the target broadcast data according to the list broadcast priority, the service broadcast priority and the maximum broadcast data length includes: Determining whether the data to be broadcast meets a broadcast condition according to the list broadcast priority, the service broadcast priority, and the maximum broadcast data length; In a case where the data to be broadcast meets the broadcast condition, the target broadcast data carrying the data to be broadcast is broadcast.

6. The method according to claim 5, characterized in that The broadcast condition is: the sum of the data length occupied by the broadcast data greater than the list broadcast priority and the service broadcast priority of the data to be broadcast, the data length occupied by the device information of the broadcasting device, the data length occupied by the target list, the data length occupied by the source type and the data length of the data to be broadcast is less than or equal to the maximum broadcast data length; or The broadcast conditions are: the data length occupied by the broadcast data that is greater than the list broadcast priority and the service broadcast priority of the data to be broadcast, the data length occupied by the device information of the broadcast device, and the sum of the data length occupied by the source type and the data length of the data to be broadcast is less than or equal to the maximum broadcast data length.

7. The method according to any one of claims 2 to 6, characterized in that: The determining of the target storage location according to the data length of the data to be broadcast and the standard occupied length of the corresponding source type of data in the broadcast protocol includes: In the case where the data length of the data to be broadcast is less than or equal to the standard occupied length of the corresponding source type in the broadcast protocol, determining the target storage location to be a broadcast segment in the service extension area; or In a case where the data length of the data to be broadcast is greater than the standard occupied length of the corresponding source type in the broadcast protocol, the target storage location is determined to be a broadcast extension segment in the service extension area, wherein the broadcast extension segment and the broadcast segment are in different data segments in the broadcast protocol and the data length stored in the broadcast extension segment is greater than that of the broadcast segment.

8. The method according to claim 1, characterized in that: The attribute information includes user account information logged in to the broadcasting device and device information of the broadcasting device, and the storing of the attribute information in a corresponding section of the broadcasting protocol includes: The user account information is stored in the account area of ​​the broadcast protocol, and the device information of the broadcast device is stored in the device information extension area of ​​the broadcast protocol.

9. A broadcasting device, characterized in that: include: A determination module, configured to determine a source type and a data length of the data to be broadcast; A generating module is configured to store the attribute information in a corresponding section of the broadcast protocol, and store the data to be broadcast in a section corresponding to the source type of the broadcast protocol according to the data length, to obtain target broadcast data carrying the data to be broadcast, wherein different source types in the target broadcast data have different broadcast priorities; A broadcast module, configured to broadcast the target broadcast data according to the broadcast priority 。 10. An electronic device, characterized in that: include: processor; a memory for storing processor-executable instructions; Wherein, the processor is configured to: Determine the source type and data length of the data to be broadcast; The attribute information is stored in a corresponding section of the broadcast protocol, and according to the data length, the data to be broadcast is stored in a section corresponding to the source type of the broadcast protocol, to obtain target broadcast data carrying the data to be broadcast, wherein different source types in the target broadcast data have different broadcast priorities; The target broadcast data is broadcast according to the broadcast priority.

11. A computer-readable storage medium having computer program instructions stored thereon, characterized in that: When the program instructions are executed by a processor, the steps of the method described in any one of claims 1 to 8 are implemented.