Emergency broadcast message platform broadcast method, system, device and equipment
By using queue whitelists or matching methods of location, IP address and MAC address in emergency broadcasting systems, combined with KNN algorithm and load balancing, the client device automatically connects to the target message queue to receive broadcast messages, solving the problems of service performance avalanche and inefficiency, and achieving efficient broadcasting.
Patent Information
- Application Number
- CN202310871448.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-07-14
- Publication Date
- 2025-07-29
- Estimated Expiration
- 2043-07-14
AI Technical Summary
In the existing emergency broadcast system, client devices repeatedly request broadcast messages due to network and system unreliability, which can easily cause service performance avalanche and low broadcasting efficiency.
The client device matches the message queue within the preset area based on the queue whitelist or based on the location, IP address and MAC address, and uses KNN algorithm and load balancing to determine the target message queue, establish a connection to receive broadcast messages, and avoid active requests.
It effectively avoids repeated requests from client devices, improves broadcast success rate and efficiency, reduces data peaks, and ensures the stability and performance of the system.
Smart Images

Figure CN116827467B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of communication technology, and in particular to a broadcasting method, system, device and equipment for an emergency broadcast message platform. Background Art
[0002] Emergency broadcasting refers to the use of broadcast systems to disseminate information related to emergencies to the public. Typically, an emergency broadcast system consists of an emergency broadcast message platform, message receiving equipment, a transmission coverage network, and client devices. Emergency broadcast messages are data transmitted between dispatch control platforms at all levels, between dispatch control platforms and broadcast platforms, and between broadcast platforms and clients.
[0003] Emergency broadcast message platforms typically broadcast messages using a method where the client (client) actively requests the server (server, such as a forwarding platform or broadcasting platform) to obtain broadcast messages using a broadcast code via the HyperText Transfer Protocol (HTTP). In this approach, the client is required to actively obtain broadcast messages at a regular frequency. However, due to network and system unreliability, there is a certain probability that some terminals will repeatedly retry or request messages, exacerbating data spikes and potentially causing service performance avalanches. Summary of the Invention
[0004] The present invention provides an emergency broadcast message platform broadcasting method, system, device and equipment to solve the defects in the prior art that easily cause service performance avalanche, and realize an emergency broadcast message platform broadcasting method that does not require client devices to actively obtain broadcast messages.
[0005] The present invention provides an emergency broadcast message platform broadcast method, comprising:
[0006] In the case where the client device has a queue whitelist, determining a target message queue based on the queue whitelist; establishing a connection with a server of an emergency broadcast message platform corresponding to the target message queue;
[0007] If the client device does not have a queue whitelist, the target message queue is obtained by matching the target information of the client device with multiple message queues within a preset area, and a connection is established with the server of the emergency broadcast message platform corresponding to the target message queue; the target information includes at least one of the following: the location, IP address and MAC address of the client device;
[0008] The server receiving the emergency broadcast message platform sends a broadcast message based on the target message queue.
[0009] An emergency broadcast message platform broadcast method provided by the present invention, wherein the target information of the client device is matched with a plurality of message queues within a preset area range to obtain a target message queue, including:
[0010] Based on the target information of the client device and a plurality of message queues within a preset area range, use the trained scheduling model to determine the target message queue;
[0011] Among them, the scheduling model is established based on the K-Nearest Neighbor (KNN) algorithm, and the training process of the scheduling model includes: using the pre-established scheduling model to obtain N message queues with the smallest distance from the client device; determining the target message queue among the N message queues according to the size of the distance; updating the parameters of the scheduling model according to the broadcast completion degree of the broadcast messages in the target message queue; N is an integer greater than 0.
[0012] An emergency broadcast message platform broadcast method provided by the present invention, wherein determining the target message queue among the N message queues according to the size of the distance includes:
[0013] Based on the load of the servers corresponding to each of the N message queues and the size of the distance, determine the target message queue.
[0014] An emergency broadcast message platform broadcast method provided by the present invention, wherein at least one of the broadcast monitoring program and the broadcast process of the client device is in an active state.
[0015] The present invention also provides an emergency broadcast message system, including:
[0016] A client device, a first server, and a second server;
[0017] Among them, the first server communicates with the second server through a long connection; the second server communicates with the client device through a long connection;
[0018] The client device is used to execute the emergency broadcast message platform broadcast method as described in any one of the foregoing;
[0019] The first server is used to obtain the broadcast messages sent by the server of the superior emergency broadcast message platform and transmit the broadcast messages to the message queue of the second server;
[0020] The second server is used to send the broadcast messages in the message queue to the client device.
[0021] According to an emergency broadcast message system provided by the present invention, the second server is further used for:
[0022] When the broadcast message in the message queue reaches the message threshold, calculate the popularity value of the broadcast message using the following formula (1) or formula (2);
[0023] Perform elimination processing on the broadcast messages in the message queue according to the popularity value;
[0024] S = [(St / (t + 2) g )+ h] (1)
[0025] where S is the popularity value of the broadcast message, St is the historical popularity value of the broadcast message, t is the time interval between the historical broadcast time and the current time, g is the gravity factor, and h is the initial popularity value of the broadcast message;
[0026] (2)
[0027] where H is the popularity value of the broadcast message, is the current time, is the historical broadcast time, is the time interval between the historical broadcast time and the current time, and k is the cooling coefficient.
[0028] According to an emergency broadcast message system provided by the present invention, the second server is further configured to:
[0029] Receive the message request sent by the client device, where the message request is sent after the client device receives the broadcast message and is used to request the attachment data corresponding to the attachment information in the broadcast message;
[0030] If the attachment data requested by the client device is not obtained, filter the message request of the client device.
[0031] The present invention also provides an emergency broadcast message platform broadcast device, including:
[0032] A processing module, configured to, when the client device has a queue whitelist, determine a target message queue based on the queue whitelist; establish a connection with the server of the emergency broadcast message platform corresponding to the target message queue;
[0033] The processing module is further configured to, when the client device does not have a queue whitelist, match the target information of the client device with multiple message queues within a preset area range to obtain a target message queue, and establish a connection with the server of the emergency broadcast message platform corresponding to the target message queue; the target information includes at least one of the following: the location, IP address, and MAC address of the client device;
[0034] A receiving module, configured to receive the broadcast message sent by the server of the emergency broadcast message platform based on the target message queue.
[0035] The present invention further provides an electronic device, including a memory, a processor, and a computer program stored on the memory and executable on the processor. When the processor executes the program, the emergency broadcast message platform broadcast method described in any one of the above is implemented.
[0036] The present invention further provides a non-transitory computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the emergency broadcast message platform broadcast method described in any one of the above is implemented.
[0037] The present invention further provides a computer program product, including a computer program. When the computer program is executed by a processor, the emergency broadcast message platform broadcast method described in any one of the above is implemented.
[0038] For the emergency broadcast message platform broadcast method, system, device and equipment provided by the present invention, the client device determines the target message queue based on the queue whitelist, or matches at least one of the location, IP address and MAC address of the client device with multiple message queues within the preset area range to obtain the target message queue, and establishes a connection with the emergency broadcast message platform corresponding to the target message queue, and then receives the broadcast message sent by the emergency broadcast message platform. There is no need for the client device to actively obtain the broadcast message, avoiding the problem that the client device repeatedly retries or requests, which is likely to form a data peak and cause the service performance to avalanche, and can effectively improve the broadcast success rate and broadcast efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] In order to more clearly illustrate the technical solutions in the present invention or the prior art, the following will briefly introduce the drawings required for the description of the embodiments or the prior art. Obviously, the drawings in the following description are some embodiments of the present invention. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.
[0040] Figure 1 is one of the schematic flowcharts of the emergency broadcast message platform broadcast method provided by the present invention;
[0041] Figure 2 is one of the schematic system architectures of the emergency broadcast message platform broadcast method provided by the present invention;
[0042] Figure 3 is one of the schematic diagrams of the broadcast principle of the emergency broadcast message platform broadcast method provided by the present invention;
[0043] Figure 4It is a schematic diagram of the message popularity of the emergency broadcast message platform broadcast method provided by the present invention;
[0044] Figure 5 It is a schematic structural diagram of the emergency broadcast message platform broadcast device provided by the present invention;
[0045] Figure 6 It is a schematic structural diagram of the electronic device provided by the present invention. Detailed implementation manners
[0046] To make the objectives, technical solutions and advantages of the present invention clearer, the technical solutions in the present invention will be clearly and completely described below with reference to the accompanying drawings in the present invention. Obviously, the described embodiments are some but not all of the embodiments of the present invention. All other embodiments obtained by those of ordinary skill in the art based on the embodiments in the present invention without making creative efforts shall fall within the protection scope of the present invention.
[0047] First, the application scenarios related to the embodiments of the present invention will be introduced:
[0048] There are mainly two means for the emergency broadcast message platform to broadcast messages: one is the means of actively pulling broadcast messages between B terminals (server terminals, such as forwarding platforms, broadcast platforms, etc.) through the HyperText Transfer Protocol (HTTP) according to timestamps, and the other is the means for the C terminal (client) to actively request the B terminal to obtain messages according to the broadcast code through HTTP. Among them, the implementation between B terminals is relatively simple. It only requires the downstream platform to poll and pull data at a certain time granularity according to a certain timestamp. After the B terminal gets the data, it preferentially parses it, and the parsed data is stored in a database or flushed into a cache in a certain data structure. This operation needs to be passed down layer by layer between multiple systems of the B terminal. The C terminal needs to actively obtain the result regularly at a certain frequency to obtain data.
[0049] In the above solution, due to the constraints of network and system unreliability, the C terminal will cause some terminals to retry or request repeatedly with a certain probability, thus aggravating the formation of data peaks and easily causing service performance avalanches.
[0050] The following will be combined with Figures 1-6 Specific embodiments will be used to describe in detail the technical solutions of the embodiments of the present invention. These specific embodiments below can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments.
[0051] Figure 1 It is one of the flow schematic diagrams of the emergency broadcast message platform broadcast method provided by the present invention. The method of this embodiment can be applied to a client device. As Figure 1As shown in the figure, the method provided in this embodiment includes:
[0052] Step 101: When the client device has a queue whitelist, based on the queue whitelist, determine the target message queue; establish a connection with the server of the emergency broadcast message platform corresponding to the target message queue;
[0053] Specifically, in the emergency broadcast scenario, it is necessary to use the emergency broadcast message system to publish information related to emergencies to the public, which is characterized by being sudden, real-time, and urgent. The purpose is to quickly broadcast and deliver the message data of the emergency broadcast message platform that produces emergency broadcast messages to each end. The content of the broadcast message includes at least one of the following: text, pictures, and audio-video information.
[0054] As Figure 2 shown, optionally, the superior emergency broadcast message platform transmits the broadcast means, broadcast conditions, and scope of application to the emergency broadcast message forwarding platform in real time.
[0055] For example, the broadcast means is implemented by the upstream actively notifying and invoking the downstream interface. The two parties are based on the Simple Object Access Protocol (SOAP) and agree on fields in advance to ensure data consistency.
[0056] The emergency broadcast message platform broadcasts emergency broadcast messages under certain broadcast conditions. The broadcast conditions can be, for example, that the number of messages in the message queue does not exceed a certain quantity threshold, the load of the server is less than the preset threshold, and the link conditions between emergency broadcast message platforms at all levels, etc.
[0057] The scope of application, for example, refers to the geographical area range where the broadcast message is broadcast, the range of users to whom the broadcast is made (such as users of a certain operator), etc.
[0058] To reduce message latency, a connection can be established with the server of the emergency broadcast message platform after the client device is powered on. Optionally, the client device and the server can maintain a long connection state.
[0059] Step 102: When the client device does not have a queue whitelist, match the target information of the client device with multiple message queues within the preset area range to obtain the target message queue, and establish a connection with the server of the emergency broadcast message platform corresponding to the target message queue; the target information includes at least one of the following: the location, IP address, and MAC address of the client device;
[0060] Specifically, establishing a connection can control the broadcast success rate in a segmented manner. The segmented control includes two parts of judgment, that is, judging whether the user of the client device has specified a queue whitelist in advance. If so, it is directly allocated according to the queue whitelist. For example, the MAC address of the client device corresponds one-to-one with the queue whitelist, that is, the client device can receive the broadcast message from the server of the emergency broadcast message platform corresponding to the message queue in the queue whitelist. Otherwise, at least one of the location, regional IP, and MAC address of the client device will be matched with multiple message queues within the preset area range. For example, the location, regional IP, and MAC address of the server of the emergency broadcast message platform corresponding to the message queue are matched with the location, regional IP, and MAC address of the client device. For example, an AI model can be used for matching.
[0061] The AI model can be obtained by training with training data. The AI model is established based on, for example, the K-Nearest Neighbors (KNN) algorithm, neural network algorithm, etc.
[0062] Step 103: Receive the broadcast message sent by the server of the emergency broadcast message platform based on the target message queue.
[0063] Specifically, after establishing the connection, the server of the emergency broadcast message platform transmits the broadcast message to the client device through the message queue without the client device actively requesting.
[0064] In the method of this embodiment, the client device determines the target message queue based on the queue whitelist, or matches at least one of the location, IP address, and MAC address of the client device with multiple message queues within the preset area range to obtain the target message queue, and establishes a connection with the emergency broadcast message platform corresponding to the target message queue, and then receives the broadcast message sent by the emergency broadcast message platform, without the client device actively obtaining the broadcast message, avoiding the problem that the client device repeatedly retries or requests, which is likely to form a data peak and cause a service performance avalanche, and can effectively improve the broadcast success rate and broadcast efficiency.
[0065] Optionally, "matching at least one of the target information of the client device with multiple message queues within the preset area range to obtain the target message queue" in step 102 can be implemented in the following manner:
[0066] Based on the target information of the client device and multiple message queues within the preset area range, use the trained scheduling model to determine the target message queue;
[0067] Among them, the scheduling model is established based on the K-Nearest Neighbor (KNN) algorithm. The training process of the scheduling model includes: using the pre-established scheduling model to obtain N message queues with the smallest distance from the client device; determining the target message queue among the N message queues according to the size of the distance; updating the parameters of the scheduling model according to the broadcast completion degree of the broadcast messages in the target message queue; N is an integer greater than 0.
[0068] Specifically, the scheduling model is used to allocate the optimal message queue.
[0069] For example, the allocation of message queues for client devices is not real-time. Instead, when the client device is powered on, the user automatically requests classification scheduling to obtain the message queue. This mode supports horizontal infinite expansion of the broadcast capacity and ensures the broadcast speed of emergency broadcast messages in the emergency broadcast message system. When the user powers on the device, the embedded SDK is called to transmit information such as location, IP address, and MAC address. The SDK will perform proximity matching based on the above information and specify a message queue within a certain area range, such as specifying an area queue number. The introduction of this mode can enable the overall system architecture to expand the broadcast capacity of the system infinitely horizontally without being restricted by the growth of the number of users.
[0070] For example, in actual application scenarios, often X regions share Y message queues, and the message queues often expand and contract due to changes in the number of users. At this time, the effect of using the whitelist to allocate message queues will be limited, and the allocated message queue may not be the optimal one, and the broadcast effect will be greatly affected.
[0071] The target message queue is allocated through the scheduling model. For example, using the K-Nearest Neighbor (KNN) algorithm, calculate the message queue with the smallest Euclidean distance from the client device. If there is only one message queue, directly specify this message queue as the target message queue. If there are multiple message queues, divide them into multiple groups according to a certain ratio, re-allocate the broadcast tasks from high to low according to the distance, and at the same time, motivate the scheduling model according to the broadcast completion degree index, that is, update the parameters of the scheduling model, and then determine the target message queue based on the updated scheduling model, so as to automatically achieve the optimal system performance. Even if the system expands and contracts later, the system will automatically adjust to the best state.
[0072] Optionally, during the process of using the scheduling model for matching, if the parameters of the scheduling model, such as weights, are updated, do not recalculate the message queues that have been matched. Continue to match the remaining other message queues with the current scheduling model, which can reduce system overhead.
[0073] For example, the client devices of video applications on small-screen terminals are generally connected to the Internet. The particularity of Internet TV services lies in the diversification of their models, which may be the Over The Top (OTT) model or the Internet Protocol Television (IPTV) model. Therefore, when accurately positioning users, it is often impossible to rely on a single dimension. So, in the queue allocation stage, an AI scheduling model can be used to match the user's location and regional IP. By combining the Geographic Information System (GIS) to match multiple message queues within the range of the client device and the region, the top 100 queues with the highest matching degree are obtained, and the queue with the lowest load is obtained as the only message receiving queue according to the queue status, making full use of the queue resources and effectively improving the broadcast success rate and broadcast effect.
[0074] Optionally, based on the load of the servers corresponding to each of the N message queues and the magnitude of the distance, the target message queue is determined.
[0075] Specifically, for example, if the AI model obtains multiple message queues with the highest matching degree, such as the top 100 message queues with the highest matching degree, then further, the target message queue can be determined according to the server status of the emergency broadcast message platform corresponding to the message queue. For example, according to the load of the server, the message queue of the server with the lowest load is used as the only message receiving queue, that is, the target message queue.
[0076] In one embodiment, at least one of the broadcast monitoring program and the broadcast process of the client device is in an active state.
[0077] Specifically, when the server of the emergency broadcast message platform broadcasts messages to the client device through the message queue, a segmented regional broadcast mechanism is adopted, and the broadcast process is always in an active state to ensure the reliability of the client device. Optionally, the broadcast process can be located in the Launcher channel to prevent the process from being accidentally killed by the system. However, if the user jumps into a certain Android Package (APK), there is still a certain probability that the Launcher channel will be killed due to hardware problems. At this time, the broadcast monitoring program and the broadcast channel keep-alive mechanism (i.e., located in the Launcher channel) need to supervise each other, and when any one of them is accidentally killed, the other will immediately pull it up to maximize the availability of the channel. Compared with the traditional broadcast method, the effective broadcast completion rate of this mechanism is increased by 7.7%, and the broadcast success rate is increased by 39.2% and can reach 94.75%.
[0078] Therefore, in the embodiments of the present invention, when the client device broadcasts, it is necessary to ensure that there is a priority broadcast channel. The priority broadcast channel needs to be established on the Launcher and maintain a long connection, rather than at the APK layer, to prevent the process from being killed by the system and thus unable to receive real-time messages. In addition, a channel keep-alive mechanism needs to be introduced, that is, a broadcast monitoring program is required to activate the broadcast process in a timely manner when it is in an inactive state, to solve the situation where the Launcher may also be accidentally killed in some scenarios.
[0079] The embodiments of the present invention further provide an emergency broadcast message system, which includes:
[0080] A client device, as well as a first server and a second server;
[0081] Wherein, the first server communicates with the second server through a long connection; the second server communicates with the client device through a long connection;
[0082] The client device is used to execute the emergency broadcast message platform broadcast method described in any of the foregoing embodiments;
[0083] The first server is used to obtain the broadcast message sent by the server of the superior emergency broadcast message platform and transmit the broadcast message to the message queue of the second server;
[0084] The second server is used to send the broadcast message in the message queue to the client device.
[0085] Specifically, the first server may be the server of the emergency broadcast message forwarding platform, which forwards the broadcast message sent by the server of the superior emergency broadcast message platform to the server of the inferior emergency broadcast message platform. For example, there may be one or more servers of the emergency broadcast message forwarding platform;
[0086] The second server may be the server for the emergency broadcast message broadcast platform, which is connected to the client device and sends the broadcast message sent by the server of the superior emergency broadcast message platform to the message queue to the client device.
[0087] Exemplarily, the emergency broadcast message system of the embodiments of the present invention is a service architecture model for real-time broadcasting messages from the server side to the client device based on multiple layers of long connections.
[0088] Optionally, as Figure 2 、 Figure 3As shown in the figure, after the emergency broadcast message platform obtains a message from the long connection queue, it will delimit the parsing scope to the area code (that is, one area range corresponds to one area code, and one area code corresponds to multiple message queues), and then match the provincial queue scope according to the area code and send it in the form of multicast. During this period, it is ensured that each queue on the provincial side can receive the message.
[0089] Similarly, the provincial broadcast queue will also delimit the parsing scope to the area code, then match the city and county-level queue scope, and send it in the form of multicast. During this period, it is ensured that each queue on the corresponding city and county side can receive the message.
[0090] For example, after the emergency broadcast message platform conducts a preliminary selection of the area code, it broadcasts to the provincial queue by means of long connection; after the provincial queue receives the broadcast message from the upstream queue, it screens according to the area code and transmits the eligible broadcasts to the cities and counties by means of long connection. Since it is necessary to ensure the overall broadcast timeliness, the number of queue levels for the broadcast platform to broadcast downstream should not be too many, preferably no more than three levels, and the overall broadcast time is controlled within 2 seconds; the city and county-level queues will broadcast messages according to the terminals that establish long connections in this queue according to the broadcast strategy, collect the broadcast data of each terminal, and then upload the feedback level by level.
[0091] Figure 2 Among them, the top-level emergency broadcast message production platform is used for message production, broadcast synchronization, broadcast statistics, etc.
[0092] The emergency broadcast message forwarding platform is used for broadcast reception, push strategy, data management, queue management, broadcast statistics and statistical reporting, etc.
[0093] The emergency broadcast message broadcast platform is used for broadcast management, area management, attachment management (the attachment is the attachment of the broadcast message), queue management, queue monitoring, callback management and broadcast push, etc.
[0094] The broadcast SDK is an application program embedded in the client device. The client device includes, for example, mobile devices (such as mobile phones, tablets, smart watches, etc.) and TV terminals, etc.
[0095] In order to broadcast messages accurately and quickly to the user side (that is, the client device), the emergency broadcast message broadcast platform mainly conducts through three aspects, namely hierarchical queues, priority notification channels (that is, Launcher channels) and classification scheduling. In the hierarchical queue, in order to increase the broadcast capacity, it can be divided into three layers to transmit the broadcast, namely the emergency broadcast message broadcast platform queue, the provincial queue and the city and county-level queue. The specific broadcast method is as follows:
[0096] After the emergency broadcast message distribution platform queue receives a broadcast message, it will conduct a preliminary screening based on the broadcast message area code. For provincial queues that meet the conditions, the broadcast message will be pushed and transmitted. One province can have multiple queues.
[0097] After the provincial queue receives the broadcast message from the upstream emergency broadcast message distribution platform, it will screen according to the area code and push and transmit the broadcast message to the city and county-level queues that meet the conditions. One city and county-level can have multiple queues.
[0098] After receiving the message, the city and county-level queue will broadcast the message according to the play strategy to the client devices that establish long connections with the server corresponding to this queue, and collect the play data of each client device (such as the completion status of the broadcast), and then upload it level by level.
[0099] Classification and scheduling, for example, dividing the emergency broadcast messages into multiple types, the message types include full-screen broadcast messages and pop-up broadcast messages, etc., and the message levels are divided into: extremely urgent messages, urgent messages, and ordinary messages.
[0100] Optionally, the second server is further configured to:
[0101] When the broadcast message in the message queue reaches the message threshold, calculate the heat value of the broadcast message using the following formula (1) or formula (2);
[0102] Perform elimination processing on the broadcast messages in the message queue according to the heat value;
[0103] S = [(St / (t + 2) g )+ h] (1)
[0104] Where S is the heat value of the broadcast message, St is the historical heat value of the broadcast message, t is the time interval between the historical broadcast time and the current time, g is the gravity factor, and h is the initial heat value of the broadcast message;
[0105] (2)
[0106] Where H is the heat value of the broadcast message, is the current time, is the historical broadcast time, is the time interval between the historical broadcast time and the current time, and k is the cooling coefficient.
[0107] Specifically, when the emergency broadcast message system encounters a bottleneck, the system will eliminate bad broadcast messages according to the elimination mechanism to ensure the maximized broadcast effect. There are two characteristics in the daily emergency message broadcast. One is that the broadcast speed is extremely fast and it is difficult to receive a large amount of positive feedback data from client users in a short time. The other is the long-tail effect. The number of high-priority messages is small and the range of broadcast users is narrow, while the number of low-priority messages is large and the number of broadcast users is wide. And because of the broadcast characteristics of low-priority messages, it is easy to reach the bottleneck of the message queue at a certain time node, that is, the number of messages in the message queue reaches the preset threshold. At this time, it is necessary to start the message elimination algorithm for screening to ensure that data with a high channel heat value is processed with high weight, and messages with good broadcast effects are retained for data with a low channel heat value. Optionally, the heat value can be calculated based on formula (1) or (2), and based on the heat value of the broadcast message, the broadcast message with a lower heat value is eliminated. For example, the broadcast message with a heat value lower than the preset threshold is eliminated, so as to eliminate bad broadcast messages when the broadcast cluster encounters a bottleneck to ensure the maximized broadcast effect.
[0108] Among them, h is the initial heat value (which can also be called the current heat value. For example, the size of the heat value is judged based on the number of users of the client device corresponding to the broadcast message. The more users, the larger the heat value).
[0109] In formula (1), adding 2 to time t is to prevent the denominator from being too small (the reason for choosing 2 is to refer to the two time units of the original algorithm as the content release time). The larger the gravity factor g value, the steeper the heat value curve, and the faster the heat value drops as time t increases. g can take values such as 1.5, 1.8, or 2. As Figure 4 shown, when g is 1.8, it is a schematic diagram of the change of the heat value with time t, where the historical heat values of curves a, b, and c are different.
[0110] To ensure the accuracy of the formula (2) algorithm, each calculation can take as a fixed time period, for example, 0.01 seconds. If it is greater than the fixed time period, first calculate the historical heat value before, and then calculate the current heat value.
[0111] In the above implementation manner, eliminating bad broadcast messages when the broadcast cluster encounters a bottleneck can ensure the maximized broadcast effect, that is, broadcast messages with a high channel heat value are processed with high weight and given priority to be broadcast, and broadcast messages with a low channel heat value retain messages with good broadcast effects, which can automatically balance broadcast resources.
[0112] Optionally, the second server is further used for:
[0113] Receive the message request sent by the client device. The message request is sent after the client device receives the broadcast message and is used to request the attachment data corresponding to the attachment information in the broadcast message.
[0114] If the attachment data requested by the client device is not obtained, filter the message request of the client device.
[0115] Specifically, when the client device receives a broadcast message, if the broadcast message has attachment information, it can first obtain the attachment data from the edge node of the emergency broadcast message system (such as the server of the emergency broadcast message platform directly connected to the client device). If the edge node obtains the attachment data, it directly returns the result. When it cannot be obtained, it obtains it from the server of the upper-level emergency broadcast message platform, updates the cache of the edge node after obtaining it, and returns the result to the client device. To prevent attacks, when the attachment data requested by the client device is not obtained, or the attachment data cannot be obtained multiple times, the subsequent message requests of the client device can be filtered. For example, a Bloom filter is used for the first-level interception, avoiding the problems of cache penetration and cache breakdown.
[0116] When the client device finishes playing the emergency broadcast message, it is necessary to feedback and report the completion situation of the broadcast. The edge node will sort it out and report it layer by layer; the reported data will be used for sample training of the AI model, and at the same time, the second-level broadcast platform will finally summarize the broadcast results and count the broadcast rate, which is convenient for operators to adjust the parameter indicators in a timely manner.
[0117] Next, the emergency broadcast message platform broadcast device provided by the present invention will be described. The emergency broadcast message platform broadcast device described below can be mutually corresponding and referred to with the emergency broadcast message platform broadcast method described above.
[0118] Figure 5 It is one of the structural schematic diagrams of the emergency broadcast message platform broadcast device provided by the present invention. As Figure 5 shown, the emergency broadcast message platform broadcast device provided in this embodiment is applied to a client device. The emergency broadcast message platform broadcast device includes:
[0119] A processing module 110, configured to, when the client device has a queue whitelist, determine a target message queue based on the queue whitelist; establish a connection with the server of the emergency broadcast message platform corresponding to the target message queue;
[0120] The processing module 110 is further configured to, when the client device does not have a queue whitelist, match the target information of the client device with multiple message queues within a preset area range to obtain a target message queue, and establish a connection with a server of an emergency broadcast message platform corresponding to the target message queue; the target information includes at least one of the following: the location, IP address, and MAC address of the client device.
[0121] The receiving module 120 is configured to receive a broadcast message sent by the server of the emergency broadcast message platform based on the target message queue.
[0122] Optionally, the processing module 110 is specifically configured to:
[0123] Determine the target message queue by using a trained scheduling model based on the target information of the client device and multiple message queues within a preset area range.
[0124] Wherein, the scheduling model is established based on the K-Nearest Neighbor (KNN) algorithm, and the training process of the scheduling model includes: using a pre-established scheduling model to obtain N message queues with the smallest distance from the client device; determining the target message queue among the N message queues according to the magnitude of the distance; updating the parameters of the scheduling model according to the broadcast completion degree of the broadcast messages in the target message queue; N is an integer greater than 0.
[0125] Optionally, the processing module 110 is specifically configured to:
[0126] Determine the target message queue based on the load of the servers corresponding to each of the N message queues and the magnitude of the distance.
[0127] Optionally, at least one of the broadcast monitoring program and the broadcast process of the client device is in an active state.
[0128] The device according to an embodiment of the present invention is used to execute the method in any of the foregoing method embodiments, and its implementation principle and technical effects are similar, and will not be described in detail here.
[0129] Figure 6 Illustrates a schematic physical structure diagram of an electronic device, as Figure 6As shown, the electronic device may include: a processor 610, a communications interface 620, a memory 630, and a communication bus 640. Among them, the processor 610, the communications interface 620, and the memory 630 complete their mutual communication through the communication bus 640. The processor 610 may call the logical instructions in the memory 630 to execute the emergency broadcast message platform broadcast method, which includes: when the client device has a queue whitelist, based on the queue whitelist, determine the target message queue; establish a connection with the server of the emergency broadcast message platform corresponding to the target message queue;
[0130] When the client device does not have a queue whitelist, then match the target information of the client device with multiple message queues within a preset area range to obtain the target message queue, and establish a connection with the server of the emergency broadcast message platform corresponding to the target message queue; the target information includes at least one of the following: the location, IP address, and MAC address of the client device;
[0131] Receive the broadcast message sent by the server of the emergency broadcast message platform based on the target message queue.
[0132] In addition, when the logical instructions in the above-mentioned memory 630 can be implemented in the form of software functional units and sold or used as an independent product, they can be stored in a computer-readable storage medium. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or a part of this technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in various embodiments of the present invention. And the foregoing storage medium includes: various media such as USB flash drives, mobile hard disks, read-only memories (ROM, Read-Only Memory), random access memories (RAM, Random Access Memory), magnetic disks, or optical discs that can store program codes.
[0133] On the other hand, the present invention also provides a computer program product. The computer program product includes a computer program. The computer program can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer can execute the emergency broadcast message platform broadcast method provided by the above-mentioned various methods. The method includes: when the client device has a queue whitelist, based on the queue whitelist, determine the target message queue; establish a connection with the server of the emergency broadcast message platform corresponding to the target message queue;
[0134] In the case that the client device does not have a queue whitelist, match the target information of the client device with multiple message queues within the preset area range to obtain a target message queue, and establish a connection with the server of the emergency broadcast message platform corresponding to the target message queue; the target information includes at least one of the following: the location, IP address, and MAC address of the client device;
[0135] Receive the broadcast message sent by the server of the emergency broadcast message platform based on the target message queue.
[0136] In another aspect, the present invention also provides a non-transitory computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, it is used to execute the emergency broadcast message platform broadcast method provided by the above various methods. The method includes: in the case that the client device has a queue whitelist, determine the target message queue based on the queue whitelist; establish a connection with the server of the emergency broadcast message platform corresponding to the target message queue;
[0137] In the case that the client device does not have a queue whitelist, match the target information of the client device with multiple message queues within the preset area range to obtain a target message queue, and establish a connection with the server of the emergency broadcast message platform corresponding to the target message queue; the target information includes at least one of the following: the location, IP address, and MAC address of the client device;
[0138] Receive the broadcast message sent by the server of the emergency broadcast message platform based on the target message queue.
[0139] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place, or may be distributed to multiple network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the solution of this embodiment. Those of ordinary skill in the art can understand and implement it without creative efforts.
[0140] Through the description of the above embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware. Based on such an understanding, the essence of the above technical solution, or the part that contributes to the prior art, can be embodied in the form of a software product. The computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.
[0141] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that they can still modify the technical solutions recorded in the foregoing embodiments, or perform equivalent replacements for some of the technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for broadcasting emergency broadcast messages on a platform, characterized in that, including: When the client device has a queue whitelist, determining a target message queue based on the queue whitelist; Establishing a connection with the server of the emergency broadcast message platform corresponding to the target message queue; When the client device does not have a queue whitelist, matching the target information of the client device with multiple message queues within a preset area range to obtain a target message queue, and establishing a connection with the server of the emergency broadcast message platform corresponding to the target message queue; the target information includes at least one of the following: the location, IP address, and MAC address of the client device; Receiving a broadcast message sent by the server of the emergency broadcast message platform based on the target message queue; Among them, the server of the emergency broadcast message platform includes a second server, and the second server is used for: when the broadcast message of the message queue reaches a message threshold, calculating the heat value of the broadcast message using the following formula (1) or formula (2), and performing a deletion process on the broadcast message in the message queue according to the heat value; S = [(St / (t + 2) g )+ h] (1) Among them, S is the heat value of the broadcast message, St is the historical heat value of the broadcast message, t is the time interval between the historical broadcast time and the current time, g is the gravity factor, and h is the initial heat value of the broadcast message; (2) Among them, H is the popularity value of the broadcast message, is the current time, is the historical broadcast time, is the interval time between the historical broadcast time and the current time, and k is the cooling coefficient.
2. The emergency broadcast message platform broadcast method according to claim 1, characterized in that, The matching the target information of the client device with multiple message queues within a preset area range to obtain a target message queue includes: Determining the target message queue using a trained scheduling model based on the target information of the client device and multiple message queues within a preset area range; Among them, the scheduling model is established based on the K-Nearest Neighbor (KNN) algorithm, and the training process of the scheduling model includes: using a pre-established scheduling model to obtain N message queues with the smallest distance from the client device; determining the target message queue among the N message queues according to the size of the distance; updating the parameters of the scheduling model according to the broadcast completion degree of the broadcast message in the target message queue; N is an integer greater than 0.
3. The emergency broadcast message platform broadcast method according to claim 2, wherein, The determining the target message queue among the N message queues according to the size of the distance includes: Determining the target message queue based on the load of the server corresponding to each of the N message queues and the size of the distance.
4. The emergency broadcast message platform broadcast method according to any one of claims 1-3, characterized in that, At least one of the broadcast monitoring program and the broadcast process of the client device is in an active state.
5. An emergency broadcast message system, characterized in that, including: A client device, a first server, and a second server; Among them, the first server communicates with the second server through a long connection; the second server communicates with the client device through a long connection; The client device is used to execute the emergency broadcast message platform broadcast method according to any one of claims 1-4; The first server is used to obtain a broadcast message sent by the server of the superior emergency broadcast message platform and transmit the broadcast message to the message queue of the second server; The second server is used to send the broadcast message in the message queue to the client device; The second server is further used for: When the broadcast message in the message queue reaches the message threshold, calculate the heat value of the broadcast message using the following formula (1) or formula (2); Perform elimination processing on the broadcast messages in the message queue according to the heat value; S = [(St / (t + 2) g )+ h] (1) where S is the heat value of the broadcast message, St is the historical heat value of the broadcast message, t is the time interval between the historical broadcast time and the current time, g is the gravity factor, and h is the initial heat value of the broadcast message; (2) Among them, H is the heat value of the broadcast message, is the current time, For the historical broadcast time, is the interval between the historical broadcast time and the current time, and k is the cooling coefficient.
6. The emergency broadcast message system according to claim 5, wherein, The second server is further configured to: Receive the message request sent by the client device, where the message request is sent after the client device receives the broadcast message and is used to request the attachment data corresponding to the attachment information in the broadcast message; If the attachment data requested by the client device is not obtained, filter the message request of the client device.
7. An emergency broadcast message platform broadcast device, characterized in that, including: A processing module, configured to determine a target message queue based on the queue whitelist when the client device has a queue whitelist; Establish a connection with the server of the emergency broadcast message platform corresponding to the target message queue; The processing module is further configured to, when the client device does not have a queue whitelist, match the target information of the client device with multiple message queues within a preset area range to obtain a target message queue, and establish a connection with the server of the emergency broadcast message platform corresponding to the target message queue; the target information includes at least one of the following: the location, IP address, and MAC address of the client device; A receiving module, configured to receive the broadcast message sent by the server of the emergency broadcast message platform based on the target message queue; wherein, the server of the emergency broadcast message platform includes a second server, and the second server is configured to: when the broadcast message in the message queue reaches the message threshold, calculate the heat value of the broadcast message using the following formula (1) or formula (2), and perform elimination processing on the broadcast messages in the message queue according to the heat value; S = [(St / (t + 2) g )+ h] (1) where S is the heat value of the broadcast message, St is the historical heat value of the broadcast message, t is the time interval between the historical broadcast time and the current time, g is the gravity factor, and h is the initial heat value of the broadcast message; (2) Among them, H is the heat value of the broadcast message, is the current time, is the historical broadcast time, is the time interval between the historical broadcast time and the current time, and k is the cooling coefficient.
8. An electronic device, comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, wherein, When the processor executes the program, it implements the emergency broadcast message platform broadcast method according to any one of claims 1 to 4.
9. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the emergency broadcast message platform broadcast method according to any one of claims 1 to 4.
Citation Information
Patent Citations
Message pushing method and device, computer equipment and storage medium
CN110300050A
Broadcasting method and device for emergency broadcast message, and smart home equipment
CN114650111A
Information pushing method and device, storage medium and electronic equipment
CN114996571A