Group management method and device for trunking communication system
By adopting state machine management group processes in the cluster communication system, the problem of mutual interference between different processes when group management processes are concurrent is solved, the normal operation of functions and state machines is realized, and the structure is simplified.
Patent Information
- Application Number
- CN202310879117.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-07-17
- Publication Date
- 2025-01-17
AI Technical Summary
In the existing cluster communication system, different processes interfere with each other when the group management process is concurrent, resulting in abnormal functions and unable to meet functional stability and business needs.
The process of different group is managed in a state machine, the messages of their respective concerns are processed under different group states, and the state transfer is realized through messages to prevent mutual interference between processes.
Through the management method of state machine, the structure is simplified, the interference between processes is prevented, and the problem of mutual interference between different processes when group management processes are concurrent is solved, ensuring the normal operation of functions and state machine.
Smart Images

Figure CN119325067A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of communications, and in particular to a group management method and device for a cluster communication system. Background Art
[0002] In the trunking communication of broadband trunking (B-TrunC), the group is one of the most important resources. The core network allocates corresponding group resources to each terminal user and synchronizes these group resources to the terminal user through specific processes and messages. For the convenience of users, B-TrunC divides groups into three categories: speed dial group, scan group and ordinary group. The speed dial group is the group that the terminal initiates calls by default; the scan group is the group that the terminal monitors for paging. The terminal can set one, multiple or all groups as scan groups to form a scan group list. When the terminal sets only one group as a scan group, the scan group is the speed dial group; groups other than the speed dial group and the scan group are collectively referred to as ordinary groups. To achieve the above operations, B-TrunC defines three basic processes for group management, namely active group update, passive group update, and scan group setting. Among them, active group update means that the user actively sends a group update request to the network side to update the group; passive group update means that when the information such as the terminal's belonging group changes on the system side, the system side actively sends a group update indication to the terminal, and the terminal updates the group after receiving the indication; setting a scan group means setting a group list that can monitor group calls.
[0003] In trunking communications, groups are the most used service and are widely used in public security, airports, railroads, and emergency communications, with a wide variety of customer usage scenarios. However, there is currently no good solution for the process management of active group updates, passive group updates, and setting scan groups, especially the process management when they are concurrent. Existing solutions all handle a certain process in a single manner without considering the correlation between processes, resulting in mutual interference between different processes, which ultimately causes abnormalities in group functions and affects normal use. On the other hand, with the development of B-TrunC, group functions are becoming more and more abundant, and different business processes overlap, resulting in mutual dependence and complex implementation structures. Existing solutions can no longer meet functional stability and business needs.
[0004] Therefore, there is no good solution to the problem of mutual interference between different processes when group management processes are concurrent in related technologies. Summary of the invention
[0005] The embodiments of the present application provide a group management method and device for a cluster communication system, so as to at least solve the problem of mutual interference between different processes when group management processes are concurrent in the related art.
[0006] According to an embodiment of the present application, a group management method of a cluster communication system is provided, the method comprising: obtaining a group status of a group to which a terminal in the cluster communication system belongs; obtaining a group message initiated by the terminal or the system; determining whether the group status matches a message type of the group message; and if the determination result is yes, performing a group management operation according to the group message, wherein the group management operation comprises at least one of the following: group update, group read, scan group setting, and group status transfer.
[0007] According to another embodiment of the present application, a group management device of a cluster communication system is provided, the device comprising:
[0008] A first acquisition module, used to acquire the group status of the group to which the terminal belongs in the cluster communication system;
[0009] A second acquisition module, used to acquire a group message initiated by the terminal or system;
[0010] A judging module, used to judge whether the group status matches the message type of the group message;
[0011] The management module is used to perform a group management operation according to the group message when the judgment result is yes, wherein the group management operation includes at least one of the following: group update, group read, scan group setting and group status transfer.
[0012] According to another embodiment of the present application, a computer-readable storage medium is provided, in which a computer program is stored, wherein the computer program executes the steps of any of the above method embodiments when executed by a processor.
[0013] According to another embodiment of the present application, an electronic device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.
[0014] Through the embodiments of the present application, the management of different group processes is implemented in the form of a state machine, and messages of concern to each group state are processed in different group states and state transfer is achieved using messages. The implementation structure is simpler, and mutual interference between processes can be prevented, thereby solving the problem of mutual interference between different processes when group management processes are concurrent in related technologies. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] Figure 1 is a hardware structure block diagram of the group management method of an embodiment of the present application;
[0016] Figure 2is a flow chart of a group management method of a cluster communication system according to an embodiment of the present application;
[0017] Figure 3 is a schematic diagram of a message flow between a terminal and a system according to an embodiment of the present application;
[0018] Figure 4 is a schematic diagram of state transition in an active group update process according to an embodiment of the present application;
[0019] Figure 5 is a schematic diagram of state transition in a passive group update process according to an embodiment of the present application;
[0020] Figure 6 is a schematic diagram of state transition in a process of setting a scan group according to an embodiment of the present application;
[0021] Figure 7 4 is a block diagram of a group management device of a cluster communication system according to an embodiment of the present application. DETAILED DESCRIPTION
[0022] The embodiments of the present application will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.
[0023] It should be noted that the terms "first", "second", etc. in the specification and claims of this application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence.
[0024] The method embodiments provided in the embodiments of the present application can be executed in a mobile terminal, a computer terminal or a similar computing device. Taking running on a mobile terminal as an example, Figure 1 is a hardware structure block diagram of the group management method of the embodiment of the present application, such as Figure 1 As shown, the hardware board may include one or more ( Figure 1 Only one is shown in the figure) a processor 12 (the processor 12 may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device) and a memory 14 for storing data, wherein the mobile terminal may also include a transmission device 16 and an input / output device 18 for communication functions. It can be understood by those skilled in the art that Figure 1 The structure shown is only for illustration and does not limit the structure of the mobile terminal. Figure 1 More or fewer components as shown, or with Figure 1 Different configurations shown.
[0025] The memory 14 can be used to store computer programs, for example, software programs and modules of application software, such as the computer program corresponding to the group management method of the cluster communication system in the embodiment of the present application. The processor 12 executes various functional applications and the group management method of the cluster communication system by running the computer program stored in the memory 14, that is, implementing the above method. The memory 14 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 14 may further include a memory remotely arranged relative to the processor 12, and these remote memories may be connected to the mobile terminal via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0026] The transmission device 16 is used to receive or send data via a network. The specific example of the above network may include a wireless network provided by a communication provider. In one example, the transmission device 16 includes a network adapter (Network Interface Controller, referred to as NIC), which can be connected to other network devices through a base station so as to communicate with the Internet. In one example, the transmission device 16 can be a radio frequency (Radio Frequency, referred to as RF) module, which is used to communicate with the Internet wirelessly.
[0027] In one embodiment of the present application, a group management method of a cluster communication system is provided. The method can be applied to a terminal of the cluster communication system to manage the group to which the terminal belongs.
[0028] Figure 2 is a flow chart of a group management method of a cluster communication system according to an embodiment of the present application. Figure 2 As shown, the process includes the following steps:
[0029] Step S202, obtaining the group status of the group to which the terminal belongs in the trunking communication system;
[0030] Step S204, obtaining a group message initiated by the terminal or the system;
[0031] Step S206, determining whether the group status matches the message type of the group message;
[0032] Step S208: If the judgment result is yes, perform group management operations according to the group message.
[0033] In this embodiment, the group management operation in step S208 includes at least one of the following: group update, group read, scan group setting, and group status transfer.
[0034] In this embodiment, the scanning group is a group for which the terminal monitors paging. The terminal can set one, multiple or all groups as scanning groups to form a scanning group list.
[0035] In an embodiment of the present application, management of different group processes is achieved by adopting a state machine approach, and corresponding group management operations are performed when the group state matches the message type of the group message, thereby achieving processing of messages of concern to each state in different group states and using messages to achieve state transfer, thereby ensuring normal functions and group state machines, and solving the problem of mutual interference between different processes when group management processes are concurrent in related technologies.
[0036] In some embodiments, the group status in step S202 may include at least one of the following: a group idle status, a group update status, a group read status, and a scan group setting status.
[0037] In some embodiments, step S204 may include at least one of the following:
[0038] Obtaining a group update message initiated by the system;
[0039] Acquire a group read message initiated by the terminal, wherein the group read message is triggered by a user operation, or the group read message is initiated by the terminal when the group state is transferred from the group update state to the group read state;
[0040] Acquire a group response message initiated by the system, wherein the group response message is obtained by the system after completing group reading;
[0041] Acquire a scan group setting message initiated by the terminal, wherein the scan group setting message is triggered by a user operation, or the scan group setting message is initiated by the terminal when the group state is transferred from the group reading state to the scan group setting state;
[0042] A scan group setting response message initiated by the system is obtained, wherein the scan group setting response message is obtained by the system after completing the scan group setting.
[0043] In this embodiment, the group response message and the set scan group response message are response messages generated during the execution of the group management process and cannot be triggered separately. The group update message is actively initiated by the system, and the group read message and the set scan group message can be actively initiated by the terminal or as part of other management processes.
[0044] The embodiment of the present application is designed based on the three basic processes of group management defined in the broadband cluster, and the basic processes include active group update, passive group update, and scan group setting. Active group update is triggered at the terminal according to user operation (i.e., group read message), passive group update is initiated by the system and notified to the terminal (i.e., group update message), and scan group setting can also be triggered at the terminal according to user operation, or automatically triggered after the group is updated (i.e., setting the scan group message). However, the present application is not limited to this, and the message type of the group status and the corresponding group message can be designed in combination with the actual process.
[0045] In the embodiment of the present application, each complete group management process needs to be processed multiple times in a loop according to step S202 to step S208 and perform corresponding group management operations to implement the active group update process, the passive group update process or the scan group setting process. The group management method in the embodiment of the present application is designed based on the association relationship between each process, which can effectively prevent mutual interference between different processes.
[0046] In some embodiments, step S206 of determining whether the group status matches the message type of the group message may include:
[0047] Step S2061, when the group state is the group idle state, if the group message is a group update message, a group read message or a set scan group message, it is determined that the group state matches the message type of the group message; otherwise, it is determined that the group state does not match the message type of the group message.
[0048] In some embodiments, if the judgment result in step S208 is yes, performing group management operations according to the group message may include:
[0049] Step S2081, when the group state is the group idle state and the group message is the group update message, transferring the group state from the group idle state to the group update state to achieve group state transfer;
[0050] Step S2082, when the group state is the group idle state and the group message is the group read message, transferring the group state from the group idle state to the group read state to achieve group state transfer;
[0051] Step S2083, when the group state is the group idle state and the group message is the set scan group message, the group state is transferred from the group idle state to the scan group set state to achieve group state transfer.
[0052] In this embodiment, steps S2081 to S2083 can be performed after step S2061 is successfully matched. In the group idle state, only group update messages, group read messages and scan group setting messages need to be paid attention to, and other messages are ignored and can be directly discarded.
[0053] In some embodiments, step S206 of determining whether the group status matches the message type of the group message may include:
[0054] Step S2062, when the group state is the group update state, if the group message is a group update message, determine that the group state matches the message type of the group message; otherwise, determine that the group state does not match the message type of the group message.
[0055] In some embodiments, if the judgment result in step S208 is yes, performing a group management operation according to the group message may include:
[0056] Step S2084, when the group state is the group update state, determine whether the group update message is reported completely, or determine whether a preset first timer is triggered, wherein the number of the group update messages is greater than or equal to one; when the judgment result is yes, transfer the group state from the group update state to the group read state to achieve group state transfer; when the judgment result is no, continue to receive the group update message.
[0057] In this embodiment, step S2084 may be performed after step S2062 is successfully matched. In the group update state, only the group update message needs to be paid attention to, and other messages are not concerned and can be directly discarded.
[0058] In some embodiments, the preset first timer may be started when the first group update message is received, and stopped after the group update message reporting is completed.
[0059] In the embodiment of the present application, by setting the first timer in the group update state, the anomaly caused by the message reporting on the system side can be compatible, thereby ensuring the normal function of the group management process.
[0060] In some embodiments, step S206 of determining whether the group status matches the message type of the group message may include:
[0061] Step S2063, when the group state is the group read state, if the group message is a group update message, a group read message or a group response message, it is determined that the group state matches the message type of the group message; otherwise, it is determined that the group state does not match the message type of the group message.
[0062] In some embodiments, if the judgment result in step S208 is yes, performing a group management operation according to the group message may include:
[0063] Step S2085, when the group state is the group read state and the group message is the group update message, transferring the group state from the group read state to the group update state to achieve group state transfer;
[0064] Step S2086, when the group state is the group read state and the group message is the group read message, sending a group read request to the system to implement group read, wherein the system is used to feed back the corresponding group response message to the terminal according to the group read request in the group read state;
[0065] Step S2087, when the group state is the group read state and the group message is the group response message, determine whether the group response message has been reported, wherein the number of the group response messages is greater than or equal to one; when the judgment result is yes, filter out a scan group list to be set according to the group response message, and transfer the group state from the group read state to the scan group setting state to achieve group state transfer.
[0066] In some embodiments, sending a group read request to the system in step S2086 may also be the terminal directly forwarding a group read message to the system. The group read request and the group read message may be the same.
[0067] In some embodiments, after determining whether the group response message has been reported, step S2087 may further include: if the determination result is no, determining whether a preset second timer is triggered; if the preset second timer is not triggered, continuing to receive the group response message; if the preset second timer is triggered, resending the group read request to the system to implement group read.
[0068] Furthermore, the number of retries may be set. When the number of times the group read request is resent is greater than the number of retries, the group state is transferred from the group read state to the group idle state, and the current group management process ends.
[0069] In this embodiment, steps S2085 to S2087 can be performed after step S2063 is successfully matched. In the group reading state, only group update messages, group reading messages and group response messages need to be paid attention to, and other messages are not paid attention to and can be directly discarded.
[0070] In some embodiments, the preset second timer may be started when the group read request is sent to the system, and stopped after the group response message is reported.
[0071] In the embodiment of the present application, by setting the second timer in the group reading state, the anomaly caused by the message reporting on the system side can be compatible, thereby ensuring the normal function of the group management process.
[0072] In some embodiments, step S206 of determining whether the group status matches the message type of the group message may further include:
[0073] Step S2064, when the group state is the scan group setting state, if the group message is a set scan group message or a set scan group response message, it is determined that the group state matches the message type of the group message; otherwise, it is determined that the group state does not match the message type of the group message.
[0074] In some embodiments, if the judgment result is yes, step S208 performs group management operations according to the group message, and may further include:
[0075] Step S2088, when the group state is the scan group setting state and the group message is the scan group setting message, sending a scan group setting request to the system to implement scan group setting, wherein the scan group setting request carries a scan group list to be set;
[0076] Step S2089, when the group state is the scan group setting state and the group message is the set scan group response message, logically process the set scan group response message and transfer the group state from the scan group setting state to the group idle state to achieve group state transfer.
[0077] In some embodiments, the step S2088 of sending the set scan group request to the system may also be that the terminal directly forwards the set scan group message to the system. The set scan group request and the set scan group message may be the same.
[0078] In this embodiment, steps S2088 to S2089 can be performed after step S2065 successfully matches. In the scan group setting state, only the setting scan group message and the setting scan group response message need to be paid attention to. Different from the group state in the previous embodiment, the scan group setting state is the last state in the three basic management processes, and it will be converted to the group idle state after the processing is completed. Therefore, if a group update message or a group read message is received in the scan group setting state, the group update message or the group read message can be queued and wait until the current process ends and is processed in the next process. The group response message can be discarded directly.
[0079] In some embodiments, the method may further include: starting a preset third timer when sending the set scan group request to the system, and stopping the preset third timer when obtaining the set scan group response message initiated by the system; when the preset third timer is triggered, resending the set scan group request to the system to implement the scan group setting; when the number of times the set scan group request is resent is greater than the preset number of retries, transferring the group state from the scan group setting state to the group idle state to implement the group state transfer.
[0080] In the embodiment of the present application, by setting the third timer in the scanning group setting state, the anomaly caused by the message reporting on the system side can be compatible, and the function of the group management process is guaranteed to be normal. The first timer, the second timer and the third timer can be set to the same or different timing times, and the present application does not limit this.
[0081] Figure 3 is a schematic diagram of a message flow between a terminal and a system according to an embodiment of the present application, such as Figure 3 As shown in the figure, the typical group management process includes the following three:
[0082] Passive update process, active update process and setting scan group process.
[0083] In this embodiment, the scanning group setting process may be used as a part of the active update process, and the active update process may be used as a part of the passive update process.
[0084] In this embodiment, the scanning group setting process may include:
[0085] Step S304, the terminal side sends a set scan group message (SetScanGroupMsg) to the system side;
[0086] Step S305: the system side sends a set scan group response message (SetScanGroupRspMsg) to the terminal side.
[0087] In this embodiment, the active update process may include:
[0088] Step S302, the terminal side sends a group read message (ReadGroupMsg) to the system side;
[0089] Step S303, the system side sends a group response message (GroupRspMsg) to the terminal side;
[0090] Step S304, the terminal side sends a set scan group message (SetScanGroupMsg) to the system side;
[0091] Step S305: the system side sends a set scan group response message (SetScanGroupRspMsg) to the terminal side.
[0092] In this embodiment, the passive update process may include:
[0093] Step S301, the system side sends a group update message (GroupUpdateMsg) to the terminal side;
[0094] Step S302, the terminal side sends a group read message (ReadGroupMsg) to the system side;
[0095] Step S303, the system side sends a group response message (GroupRspMsg) to the terminal side;
[0096] Step S304, the terminal side sends a set scan group message (SetScanGroupMsg) to the system side;
[0097] Step S305: the system side sends a set scan group response message (SetScanGroupRspMsg) to the terminal side.
[0098] In some embodiments, the Set Scan Group message may be replaced with a Set Scan Group Request; the Group Read message may be replaced with a Group Read Request.
[0099] In this embodiment, the group status may include four types: group idle status (GroupStatusNormal), group update status (GroupStatusUpdate), group read status (GroupStatusRead) and scan group set status (GroupStatusSetScan).
[0100] In this embodiment, four group states and the message types to be processed in each state are shown in Table 1 below.
[0101] Table 1:
[0102]
[0103]
[0104] In this embodiment, the active group update process in the B-TrunC cluster management process refers to actively initiating a group update to the core network (ie, the system side) through a user operating terminal.
[0105] Figure 4 is a schematic diagram of state transition in the active group update process according to an embodiment of the present application, such as Figure 4 As shown, in the active group update process, the group state switches between the group idle state, the group read state and the scan group setting state.
[0106] In this embodiment, the active group update process may include the following steps:
[0107] Step S401: In the group idle state, the terminal actively initiates a group update, and the group state is converted from the group idle state to the group reading state.
[0108] Step S402, in the group read state, sends a group read message ReadGroupMsg (i.e., group read request) to the system side, and waits for receiving and processing the group response message GroupRspMsg sent by the system side. The message may be one or more messages, and the parameters carried by the message can be used to determine whether it is the last message. If it is the last message, it is considered that the group information reporting is completed and the group information is processed to filter out the scan group list ScanGroupLi st that needs to be set, and enter the scan group setting state; if it is not the last message, continue to wait for the next message.
[0109] Furthermore, in order to be compatible with the scenario where the system misses or loses messages, the terminal uses a timer mechanism to handle exceptions. After the timer is triggered, the terminal considers this update to be abnormal and reenters step S402. The terminal sets a reasonable number of retries. If the number of retries is exceeded, it proceeds to step S404.
[0110] Step S403, in the scan group setting state, send a scan group setting message SetScanGroupMsg to the system side, which carries the scan group list ScanGroupList. After the setting is completed, wait for the scan group setting response message SetScanGroupRspMsg sent by the system side in this state, and perform corresponding logical processing after receiving the scan group setting response message sent by the system side.
[0111] Furthermore, in order to be compatible with the scenario of missing or losing messages on the system side, the terminal uses a timer mechanism to handle exceptions. After the timer is triggered, the scanning group process is set abnormally this time, and step S403 is re-executed. The terminal will set a reasonable number of retries. If the number of retries is exceeded, step S404 is entered.
[0112] Step S404, entering the group idle state, and the active group update process is completed.
[0113] In this embodiment, the passive group update process in the B-TrunC cluster management process occurs in a scenario where the group information to which the terminal belongs changes on the system side. After the system side modifies the group information to which the terminal belongs, it notifies the terminal to perform group update.
[0114] Figure 5 is a schematic diagram of state transition in a passive group update process according to an embodiment of the present application, such as Figure 5 As shown, in the passive group update process, the group state switches between the group idle state, the group update state, the group read state and the scan group setting state.
[0115] In this embodiment, the passive group update process may include the following steps:
[0116] Step S501: The terminal receives a group update message GroupUpdateMsg sent by the system side in the group idle state. After receiving the message, the terminal enters the group update state and processes the GroupUpdateMsg message in this state. The message may be one or more messages, and the parameters carried by the message can be used to determine whether it is the last message. If it is the last message, it is considered that the group update message reporting is completed, and step S502 is entered; if it is not the last message, continue to wait for the next message.
[0117] Furthermore, in order to be compatible with the scenario where the system misses or loses messages, the terminal may perform exception processing through a timer mechanism and enter step S502 after the timer is triggered.
[0118] Step S502, after receiving the group update notification message, the process of reading the group and setting the scan group is entered, so the subsequent steps are the same as the active group update process (ie, the above steps S401 to S404), which will not be repeated here.
[0119] In this embodiment, the difference between the passive group update process and the active group update process is that the passive group update process has an additional step of the core network (ie, the system side) notifying the terminal of the update.
[0120] In this embodiment, in addition to the process of setting the scan group involved in the above active / passive group update process, the B-TrunC cluster terminal also supports the user to directly set the scan group by operating the terminal. The former is imperceptible to the user, and the latter is actively triggered by the user.
[0121] Figure 6 is a schematic diagram of state transition in the process of setting a scan group according to an embodiment of the present application, such as Figure 6 As shown, in the scanning group setting process, the group state switches between the group idle state and the scanning group setting state.
[0122] In this embodiment, the scanning group setting process may include the following steps:
[0123] Step S601: In the group idle state, the user selects a scan group list ScanGroupList to be set to the system, and the state is transferred to the scan group setting state.
[0124] Step S602, in the scan group setting state, a scan group setting message SetScanGroupMsg is sent to the system side. After the setting is completed, the system side is waited for a scan group setting response message SetScanGroupRspMsg sent by the system side in this state, and corresponding logic processing is performed after receiving the scan group setting response message sent by the system side.
[0125] Furthermore, in order to be compatible with the scenario of missing or losing messages on the system side, the terminal uses a timer mechanism to handle exceptions. After the timer is triggered, the scanning group process is set abnormally this time, and step S602 is re-executed. The terminal will set a reasonable number of retries. If the number of retries is exceeded, step S603 is entered.
[0126] Step S603, entering the group idle state, and completing the scanning group setting process.
[0127] According to the steps in any of the above method embodiments, the group management method in this application can be perfectly handled in various abnormal scenarios. When the terminal user needs to set up a scan group or needs to read group information, there is no need to consider the complex processes and states within the group update and scan group setting, nor to worry about abnormalities caused by process concurrency. It can be achieved by directly calling the interface provided by the group management method.
[0128] According to another aspect of the embodiments of the present application, a group management device of a cluster communication system is further provided. The device can be applied to a terminal of the cluster communication system to execute the steps of any of the above method embodiments.
[0129] Figure 7 is a block diagram of a group management device of a cluster communication system according to an embodiment of the present application, such as Figure 7As shown, the device includes the following structure:
[0130] A first acquisition module 72, configured to acquire a group status of a group to which a terminal belongs in a cluster communication system;
[0131] A second acquisition module 74, used to acquire a group message initiated by the terminal or system;
[0132] A determination module 76, configured to determine whether the group status matches the message type of the group message;
[0133] The management module 78 is used to perform a group management operation according to the group message when the judgment result is yes, wherein the group management operation includes at least one of the following: group update, group read, scan group setting and group status transfer.
[0134] In this embodiment, the management of different group processes is achieved by adopting a state machine method. When the group state matches the message type of the group message, the corresponding group management operation is performed, thereby processing the messages of concern to each state in different group states and using the messages to achieve state transfer, ensuring the normal functions and group state machines, and solving the problem of mutual interference between different processes when the group management processes are concurrent in the related technology.
[0135] In some embodiments, the group status may include at least one of the following: a group idle status, a group update status, a group read status, and a scan group setting status.
[0136] In some embodiments, the second acquisition module 74 may be used to acquire a group update message initiated by the system.
[0137] In some embodiments, the second acquisition module 74 can be used to obtain a group read message initiated by the terminal, wherein the group read message is triggered by a user operation, or the group read message is initiated by the terminal when the group state is transferred from the group update state to the group read state.
[0138] In some embodiments, the second acquisition module 74 may be used to acquire a group response message initiated by the system, wherein the group response message is acquired by the system after completing group reading.
[0139] In some embodiments, the second acquisition module 74 can be used to obtain a scan group setting message initiated by the terminal, wherein the scan group setting message is triggered by a user operation, or the scan group setting message is initiated by the terminal when the group state is transferred from the group reading state to the scan group setting state.
[0140] In some embodiments, the second acquisition module 74 may be used to acquire a set scan group response message initiated by the system, wherein the set scan group response message is acquired by the system after completing the scan group setting.
[0141] In the above embodiment, the group response message and the set scan group response message are response messages generated during the execution of the group management process and cannot be triggered separately. The group update message is actively initiated by the system, and the group read message and the set scan group message can be actively initiated by the terminal or as part of other management processes.
[0142] The embodiment of the present application is designed based on the three basic processes of group management defined in the broadband cluster, and the basic processes include active group update, passive group update, and scan group setting. Active group update is triggered at the terminal according to user operation (i.e., group read message), passive group update is initiated by the system and notified to the terminal (i.e., group update message), and scan group setting can also be triggered at the terminal according to user operation, or automatically triggered after the group is updated (i.e., setting the scan group message). However, the present application is not limited to this, and the message type of the group status and the corresponding group message can be designed in combination with the actual process.
[0143] In some embodiments, the determination module 76 may include at least one of the following structures:
[0144] The first judgment unit is used to judge, when the group state is the group idle state, that if the group message is a group update message, a group read message or a set scan group message, that the group state matches the message type of the group message; otherwise, judge that the group state does not match the message type of the group message.
[0145] The second judgment unit is used for, when the group state is the group update state, if the group message is a group update message, judging that the group state matches the message type of the group message; otherwise, judging that the group state does not match the message type of the group message.
[0146] The third judgment unit is used to judge, when the group state is the group read state, that if the group message is a group update message, a group read message or a group response message, that the group state matches the message type of the group message; otherwise, judge that the group state does not match the message type of the group message.
[0147] The fourth judgment unit is used to judge, when the group state is the scan group setting state, that if the group message is a scan group setting message or a scan group setting response message, that the group state matches the message type of the group message; otherwise, judge that the group state does not match the message type of the group message.
[0148] In some embodiments, the management module 78 may include the following structures:
[0149] A first management unit is configured to transfer the group state from the group idle state to the group update state to achieve group state transfer when the group state is the group idle state and the group message is the group update message;
[0150] A second management unit is configured to transfer the group state from the group idle state to the group read state to realize group state transfer when the group state is the group idle state and the group message is the group read message;
[0151] The third management unit is used for transferring the group state from the group idle state to the scan group setting state to realize group state transfer when the group state is the group idle state and the group message is the scan group setting message.
[0152] In some embodiments, the management module 78 may include the following structures:
[0153] A fourth management unit is used to determine whether the reporting of the group update message is completed, or to determine whether a preset first timer is triggered, when the group state is the group update state, wherein the number of the group update messages is greater than or equal to one; if the judgment result is yes, transfer the group state from the group update state to the group read state to achieve group state transfer; if the judgment result is no, continue to receive the group update message.
[0154] In some embodiments, the management module 78 may include the following structures:
[0155] a fifth management unit, configured to, when the group state is the group read state and the group message is the group update message, transfer the group state from the group read state to the group update state to achieve group state transfer;
[0156] a sixth management unit, configured to, when the group state is the group read state and the group message is the group read message, send a group read request to the system to implement group read, wherein the system is configured to feed back the corresponding group response message to the terminal according to the group read request in the group read state;
[0157] The seventh management unit is used to determine whether the reporting of the group response message is completed when the group state is the group reading state and the group message is the group response message, wherein the number of the group response messages is greater than or equal to one; when the judgment result is yes, filter out a scan group list to be set according to the group response message, and transfer the group state from the group reading state to the scan group setting state to realize the group state transfer.
[0158] In some embodiments, the seventh management unit is also used to determine whether a preset second timer is triggered if the judgment result is no; if the preset second timer is not triggered, continue to receive the group response message; if the preset second timer is triggered, re-send the group read request to the system to implement group reading.
[0159] In some embodiments, the management module 78 may include the following structures:
[0160] an eighth management unit, configured to, when the group state is the scan group setting state and the group message is the scan group setting message, send a scan group setting request to the system to implement scan group setting, wherein the scan group setting request carries a scan group list to be set;
[0161] The ninth management unit is used to perform logical processing on the set scan group response message when the group state is the scan group setting state and the group message is the set scan group response message, and transfer the group state from the scan group setting state to the group idle state to realize group state transfer.
[0162] In some embodiments, the ninth management unit is also used to start a preset third timer when sending the set scan group request to the system, and stop the preset third timer when obtaining the set scan group response message initiated by the system; when the preset third timer is triggered, re-send the set scan group request to the system to implement the scan group setting; when the number of times the set scan group request is resent is greater than the preset number of retries, transfer the group state from the scan group setting state to the group idle state to implement the group state transfer.
[0163] The group state management process structure in the embodiment of the present application is clearer, and the behaviors related to a specific state can be localized into a group state, and the behaviors of different states can be separated. The responsibilities of each state are clear, which can avoid actions that do not belong to the state, thereby solving the problem of mutual interference between different processes when the group management processes in related technologies are concurrent.
[0164] An embodiment of the present application further provides a computer-readable storage medium, in which a computer program is stored, wherein the computer program executes the steps of any of the above method embodiments when executed by a processor.
[0165] In an exemplary embodiment, the computer-readable storage medium may include, but is not limited to, various media that can store computer programs, such as a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk or an optical disk.
[0166] An embodiment of the present application further provides an electronic device, including a memory and a processor, wherein a computer program is stored in the memory, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.
[0167] In an exemplary embodiment, the electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor, and the input / output device is connected to the processor.
[0168] For specific examples in this embodiment, reference may be made to the examples described in the above embodiments and exemplary implementation modes, and this embodiment will not be described in detail herein.
[0169] Obviously, those skilled in the art should understand that the above modules or steps of the present application can be implemented by a general computing device, they can be concentrated on a single computing device, or distributed on a network composed of multiple computing devices, they can be implemented by a program code executable by a computing device, so that they can be stored in a storage device and executed by the computing device, and in some cases, the steps shown or described can be executed in a different order from that herein, or they can be made into individual integrated circuit modules, or multiple modules or steps therein can be made into a single integrated circuit module for implementation. Thus, the present application is not limited to any specific combination of hardware and software.
[0170] The above description is only the preferred embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the present application may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the principles of the present application shall be included in the protection scope of the present application.
Claims
1. A group management method for a cluster communication system, characterized in that: The method comprises: Obtaining the group status of the group to which the terminal belongs in the trunking communication system; Obtaining a group message initiated by the terminal or system; Determining whether the group status matches the message type of the group message; If the judgment result is yes, a group management operation is performed according to the group message, wherein the group management operation includes at least one of the following: group update, group read, scan group setting, and group status transfer.
2. The method according to claim 1, characterized in that The group status includes at least one of the following: a group idle state, a group update state, a group read state, and a scan group setting state.
3. The method according to claim 2, characterized in that Acquiring a group message initiated by the terminal or system includes at least one of the following: Obtaining a group update message initiated by the system; Acquire a group read message initiated by the terminal, wherein the group read message is triggered by a user operation, or the group read message is initiated by the terminal when the group state is transferred from the group update state to the group read state; Acquire a group response message initiated by the system, wherein the group response message is obtained by the system after completing group reading; Acquire a scan group setting message initiated by the terminal, wherein the scan group setting message is triggered by a user operation, or the scan group setting message is initiated by the terminal when the group state is transferred from the group reading state to the scan group setting state; A scan group setting response message initiated by the system is obtained, wherein the scan group setting response message is obtained by the system after completing the scan group setting.
4. The method according to claim 3, characterized in that Determining whether the group status matches the message type of the group message includes: When the group state is the group idle state, if the group message is a group update message, a group read message or a set scan group message, it is determined that the group state matches the message type of the group message; otherwise, it is determined that the group state does not match the message type of the group message.
5. The method according to claim 4, characterized in that If the result of the judgment is yes, performing a group management operation according to the group message includes: When the group state is the group idle state and the group message is the group update message, transferring the group state from the group idle state to the group update state to achieve group state transfer; When the group state is the group idle state and the group message is the group read message, the group state is transferred from the group idle state to the group read state to realize the group state transfer; When the group state is the group idle state and the group message is the set scan group message, the group state is transferred from the group idle state to the scan group set state to achieve group state transfer.
6. The method according to claim 3, characterized in that Determining whether the group status matches the message type of the group message includes: In the case where the group state is the group update state, if the group message is a group update message, it is determined that the group state matches the message type of the group message; otherwise, it is determined that the group state does not match the message type of the group message.
7. The method according to claim 6, characterized in that If the result of the judgment is yes, performing a group management operation according to the group message includes: In the case where the group state is the group update state, determining whether the reporting of the group update message is completed, or determining whether a preset first timer is triggered, wherein the number of the group update messages is greater than or equal to one; If the judgment result is yes, the group state is transferred from the group update state to the group read state to achieve group state transfer; When the judgment result is no, continue to receive the group update message.
8. The method according to claim 3, characterized in that Determining whether the group status matches the message type of the group message includes: When the group state is the group read state, if the group message is a group update message, a group read message or a group response message, it is determined that the group state matches the message type of the group message; otherwise, it is determined that the group state does not match the message type of the group message.
9. The method according to claim 8, characterized in that If the result of the judgment is yes, performing a group management operation according to the group message includes: When the group state is the group read state and the group message is the group update message, the group state is transferred from the group read state to the group update state to achieve group state transfer; When the group state is the group read state and the group message is the group read message, a group read request is sent to the system to implement group read, wherein the system is used to feed back the corresponding group response message to the terminal according to the group read request in the group read state; When the group state is the group reading state and the group message is the group response message, determining whether reporting of the group response message is completed, wherein the number of the group response messages is greater than or equal to one; If the judgment result is yes, a scan group list to be set is screened out according to the group response message, and the group state is transferred from the group reading state to the scan group setting state to realize group state transfer.
10. The method according to claim 9, characterized in that After determining whether the group response message has been reported, the method further includes: If the judgment result is no, determining whether the preset second timer is triggered; When the preset second timer is not triggered, continue to receive the group response message; When the preset second timer is triggered, the group read request is resent to the system to implement group read.
11. The method according to claim 3, characterized in that Determining whether the group status matches the message type of the group message includes: When the group state is the scan group setting state, if the group message is a scan group setting message or a scan group setting response message, it is determined that the group state matches the message type of the group message; otherwise, it is determined that the group state does not match the message type of the group message.
12. The method according to claim 11, characterized in that If the result of the judgment is yes, performing a group management operation according to the group message includes: When the group state is the scan group setting state and the group message is the scan group setting message, a scan group setting request is sent to the system to implement the scan group setting, wherein the scan group setting request carries a scan group list to be set; When the group state is the scan group setting state and the group message is the set scan group response message, the set scan group response message is logically processed and the group state is transferred from the scan group setting state to the group idle state to achieve group state transfer.
13. The method according to claim 12, characterized in that The method further comprises: When the setting scan group request is sent to the system, a preset third timer is started, and when the setting scan group response message initiated by the system is obtained, the preset third timer is stopped; When the preset third timer is triggered, resending the scan group setting request to the system to implement scan group setting; In a case where the number of times the scan group setting request is resent is greater than a preset number of retries, the group state is transferred from the scan group setting state to the group idle state to achieve group state transfer.
14. A group management device for a cluster communication system, characterized in that: The device comprises: A first acquisition module, used to acquire the group status of the group to which the terminal belongs in the cluster communication system; A second acquisition module, used to acquire a group message initiated by the terminal or system; A judging module, used to judge whether the group status matches the message type of the group message; The management module is used to perform a group management operation according to the group message when the judgment result is yes, wherein the group management operation includes at least one of the following: group update, group read, scan group setting and group status transfer.
15. A computer-readable storage medium, characterized in that: The storage medium stores a computer program, wherein the computer program executes the method described in any one of claims 1 to 14 when executed by a processor.
16. An electronic device comprising a memory and a processor, characterized in that: A computer program is stored in the memory, and the processor is configured to run the computer program to perform the method according to any one of claims 1 to 14.