Detailed Description
In order to make the aforementioned objects, features and advantages of the present invention comprehensible, embodiments accompanied with figures are described in further detail below.
The video networking is an important milestone for network development, is a real-time network, can realize high-definition video real-time transmission, and pushes a plurality of internet applications to high-definition video, and high-definition faces each other.
The video networking adopts a real-time high-definition video exchange technology, can integrate required services such as dozens of services of video, voice, pictures, characters, communication, data and the like on a system platform on a network platform, such as high-definition video conference, video monitoring, intelligent monitoring analysis, emergency command, digital broadcast television, delayed television, network teaching, live broadcast, VOD on demand, television mail, Personal Video Recorder (PVR), intranet (self-office) channels, intelligent video broadcast control, information distribution and the like, and realizes high-definition quality video broadcast through a television or a computer.
To better understand the embodiments of the present invention, the following description refers to the internet of view:
some of the technologies applied in the video networking are as follows:
network technology (network technology)
Network technology innovation in video networking has improved the traditional Ethernet (Ethernet) to face the potentially huge first video traffic on the network. Unlike pure network Packet Switching (Packet Switching) or network Circuit Switching (Circuit Switching), the Packet Switching is adopted by the technology of the video networking to meet the Streaming requirement. The video networking technology has the advantages of flexibility, simplicity and low price of packet switching, and simultaneously has the quality and safety guarantee of circuit switching, thereby realizing the seamless connection of the whole network switching type virtual circuit and the data format.
Switching Technology (Switching Technology)
The video network adopts two advantages of asynchronism and packet switching of the Ethernet, eliminates the defects of the Ethernet on the premise of full compatibility, has end-to-end seamless connection of the whole network, is directly communicated with a user terminal, and directly bears an IP data packet. The user data does not require any format conversion across the entire network. The video networking is a higher-level form of the Ethernet, is a real-time exchange platform, can realize the real-time transmission of the whole-network large-scale high-definition video which cannot be realized by the existing Internet, and pushes a plurality of network video applications to high-definition and unification.
Server technology (Servertechnology)
The server technology on the video networking and unified video platform is different from the traditional server, the streaming media transmission of the video networking and unified video platform is established on the basis of connection orientation, the data processing capacity of the video networking and unified video platform is independent of flow and communication time, and a single network layer can contain signaling and data transmission. For voice and video services, the complexity of video networking and unified video platform streaming media processing is much simpler than that of data processing, and the efficiency is greatly improved by more than one hundred times compared with that of a traditional server.
Storage Technology (Storage Technology)
The super-high speed storage technology of the unified video platform adopts the most advanced real-time operating system in order to adapt to the media content with super-large capacity and super-large flow, the program information in the server instruction is mapped to the specific hard disk space, the media content is not passed through the server any more, and is directly sent to the user terminal instantly, and the general waiting time of the user is less than 0.2 second. The optimized sector distribution greatly reduces the mechanical motion of the magnetic head track seeking of the hard disk, the resource consumption only accounts for 20% of that of the IP internet of the same grade, but concurrent flow which is 3 times larger than that of the traditional hard disk array is generated, and the comprehensive efficiency is improved by more than 10 times.
Network Security Technology (Network Security Technology)
The structural design of the video network completely eliminates the network security problem troubling the internet structurally by the modes of independent service permission control each time, complete isolation of equipment and user data and the like, generally does not need antivirus programs and firewalls, avoids the attack of hackers and viruses, and provides a structural carefree security network for users.
Service Innovation Technology (Service Innovation Technology)
The unified video platform integrates services and transmission, and is not only automatically connected once whether a single user, a private network user or a network aggregate. The user terminal, the set-top box or the PC are directly connected to the unified video platform to obtain various multimedia video services in various forms. The unified video platform adopts a menu type configuration table mode to replace the traditional complex application programming, can realize complex application by using very few codes, and realizes infinite new service innovation.
Networking of the video network is as follows:
the video network is a centralized control network structure, and the network can be a tree network, a star network, a ring network and the like, but on the basis of the centralized control node, the whole network is controlled by the centralized control node in the network.
As shown in fig. 1, the video network is divided into an access network and a metropolitan network.
The devices of the access network part can be mainly classified into 3 types: node server, access switch, terminal (including various set-top boxes, coding boards, memories, etc.). The node server is connected to an access switch, which may be connected to a plurality of terminals and may be connected to an ethernet network.
The node server is a node which plays a centralized control function in the access network and can control the access switch and the terminal. The node server can be directly connected with the access switch or directly connected with the terminal.
Similarly, devices of the metropolitan network portion may also be classified into 3 types: a metropolitan area server, a node switch and a node server. The metro server is connected to a node switch, which may be connected to a plurality of node servers.
The node server is a node server of the access network part, namely the node server belongs to both the access network part and the metropolitan area network part.
The metropolitan area server is a node which plays a centralized control function in the metropolitan area network and can control a node switch and a node server. The metropolitan area server can be directly connected with the node switch or directly connected with the node server.
Therefore, the whole video network is a network structure with layered centralized control, and the network controlled by the node server and the metropolitan area server can be in various structures such as tree, star and ring.
The access network part can form a unified video platform (the part in the dotted circle), and a plurality of unified video platforms can form a video network; each unified video platform may be interconnected via metropolitan area and wide area video networking.
Video networking device classification
1.1 devices in the video network of the embodiment of the present invention can be mainly classified into 3 types: server, exchanger (including Ethernet protocol conversion gateway), terminal (including various set-top boxes, code board, memory, etc.). The video network as a whole can be divided into a metropolitan area network (or national network, global network, etc.) and an access network.
1.2 wherein the devices of the access network part can be mainly classified into 3 types: node server, access exchanger (including Ethernet protocol conversion gateway), terminal (including various set-top boxes, coding board, memory, etc.).
The specific hardware structure of each access network device is as follows:
a node server:
as shown in fig. 2, the system mainly includes a network interface module 201, a switching engine module 202, a CPU module 203, and a disk array module 204;
the network interface module 201, the CPU module 203, and the disk array module 204 all enter the switching engine module 202; the switching engine module 202 performs an operation of looking up the address table 205 on the incoming packet, thereby obtaining the direction information of the packet; and stores the packet in a queue of the corresponding packet buffer 206 based on the packet's steering information; if the queue of the packet buffer 206 is nearly full, it is discarded; the switching engine module 202 polls all packet buffer queues for forwarding if the following conditions are met: 1) the port send buffer is not full; 2) the queue packet counter is greater than zero. The disk array module 204 mainly implements control over the hard disk, including initialization, read-write, and other operations on the hard disk; the CPU module 203 is mainly responsible for protocol processing with an access switch and a terminal (not shown in the figure), configuring an address table 205 (including a downlink protocol packet address table, an uplink protocol packet address table, and a data packet address table), and configuring the disk array module 204.
The access switch:
as shown in fig. 3, the network interface module mainly includes a network interface module (a downlink network interface module 301 and an uplink network interface module 302), a switching engine module 303 and a CPU module 304;
wherein, the packet (uplink data) coming from the downlink network interface module 301 enters the packet detection module 305; the packet detection module 305 detects whether the Destination Address (DA), the Source Address (SA), the packet type, and the packet length of the packet meet the requirements, and if so, allocates a corresponding stream identifier (stream-code) and enters the switching engine module 303, otherwise, discards the stream-code; the packet (downstream data) coming from the upstream network interface module 302 enters the switching engine module 303; the incoming data packet of the CPU module 304 enters the switching engine module 303; the switching engine module 303 performs an operation of looking up the address table 306 on the incoming packet, thereby obtaining the direction information of the packet; if a packet entering the switching engine module 303 is destined for an upstream network interface from a downstream network interface, the packet is stored in a queue of the corresponding packet buffer 307 in association with a stream identifier (stream-code); if the queue of the packet buffer 307 is nearly full, it is discarded; if the packet entering the switching engine module 303 is not from the downlink network interface to the uplink network interface, the data packet is stored in the queue of the corresponding packet buffer 307 according to the guiding information of the packet; if the queue of the packet buffer 307 is nearly full, it is discarded.
The switching engine module 303 polls all packet buffer queues and may include two cases:
if the queue is from the downlink network interface to the uplink network interface, the following conditions are met for forwarding: 1) the port send buffer is not full; 2) the queued packet counter is greater than zero; 3) obtaining a token generated by a code rate control module;
if the queue is not from the downlink network interface to the uplink network interface, the following conditions are met for forwarding: 1) the port send buffer is not full; 2) the queue packet counter is greater than zero.
The rate control module 308 is configured by the CPU module 304, and generates tokens for packet buffer queues from all downstream network interfaces to upstream network interfaces at programmable intervals to control the rate of upstream forwarding.
The CPU module 304 is mainly responsible for protocol processing with the node server, configuration of the address table 306, and configuration of the code rate control module 308.
Ethernet protocol conversion networkClosing device:
As shown in fig. 4, the apparatus mainly includes a network interface module (a downlink network interface module 401 and an uplink network interface module 402), a switching engine module 403, a CPU module 404, a packet detection module 405, a rate control module 408, an address table 406, a packet buffer 407, a MAC adding module 409, and a MAC deleting module 410.
Wherein, the data packet coming from the downlink network interface module 401 enters the packet detection module 405; the packet detection module 405 detects whether the ethernet MAC DA, the ethernet MAC SA, the ethernet length or frame type, the video network destination address DA, the video network source address SA, the video network packet type, and the packet length of the packet meet the requirements, and if so, allocates a corresponding stream identifier (stream-code); then, the MAC deletion module 410 subtracts MAC DA, MAC SA, length or frame type (2byte) and enters the corresponding receiving buffer, otherwise, discards it;
the downlink network interface module 401 detects the sending buffer of the port, and if there is a packet, obtains the ethernet MAC DA of the corresponding terminal according to the destination address DA of the packet, adds the ethernet MAC DA of the terminal, the MAC SA of the ethernet protocol gateway, and the ethernet length or frame type, and sends the packet.
The other modules in the ethernet protocol gateway function similarly to the access switch.
A terminal:
the system mainly comprises a network interface module, a service processing module and a CPU module; for example, the set-top box mainly comprises a network interface module, a video and audio coding and decoding engine module and a CPU module; the coding board mainly comprises a network interface module, a video and audio coding engine module and a CPU module; the memory mainly comprises a network interface module, a CPU module and a disk array module.
1.3 devices of the metropolitan area network part can be mainly classified into 2 types: node server, node exchanger, metropolitan area server. The node switch mainly comprises a network interface module, a switching engine module and a CPU module; the metropolitan area server mainly comprises a network interface module, a switching engine module and a CPU module.
2. Video networking packet definition
2.1 Access network packet definition
The data packet of the access network mainly comprises the following parts: destination Address (DA), Source Address (SA), reserved bytes, payload (pdu), CRC.
As shown in the following table, the data packet of the access network mainly includes the following parts:
| DA
|
SA
|
Reserved
|
Payload
|
CRC |
wherein:
the Destination Address (DA) is composed of 8 bytes (byte), the first byte represents the type of the data packet (such as various protocol packets, multicast data packets, unicast data packets, etc.), there are 256 possibilities at most, the second byte to the sixth byte are metropolitan area network addresses, and the seventh byte and the eighth byte are access network addresses;
the Source Address (SA) is also composed of 8 bytes (byte), defined as the same as the Destination Address (DA);
the reserved byte consists of 2 bytes;
the payload part has different lengths according to different types of datagrams, and is 64 bytes if the datagram is various types of protocol packets, and is 32+1024 or 1056 bytes if the datagram is a unicast packet, of course, the length is not limited to the above 2 types;
the CRC consists of 4 bytes and is calculated in accordance with the standard ethernet CRC algorithm.
2.2 metropolitan area network packet definition
The topology of a metropolitan area network is a graph and there may be 2, or even more than 2, connections between two devices, i.e., there may be more than 2 connections between a node switch and a node server, a node switch and a node switch, and a node switch and a node server. However, the metro network address of the metro network device is unique, and in order to accurately describe the connection relationship between the metro network devices, parameters are introduced in the embodiment of the present invention: a label to uniquely describe a metropolitan area network device.
In this specification, the definition of the Label is similar to that of the Label of MPLS (Multi-Protocol Label Switch), and assuming that there are two connections between the device a and the device B, there are 2 labels for the packet from the device a to the device B, and 2 labels for the packet from the device B to the device a. The label is classified into an incoming label and an outgoing label, and assuming that the label (incoming label) of the packet entering the device a is 0x0000, the label (outgoing label) of the packet leaving the device a may become 0x 0001. The network access process of the metro network is a network access process under centralized control, that is, address allocation and label allocation of the metro network are both dominated by the metro server, and the node switch and the node server are both passively executed, which is different from label allocation of MPLS, and label allocation of MPLS is a result of mutual negotiation between the switch and the server.
As shown in the following table, the data packet of the metro network mainly includes the following parts:
| DA
|
SA
|
Reserved
|
label (R)
|
Payload
|
CRC |
Namely Destination Address (DA), Source Address (SA), Reserved byte (Reserved), tag, payload (pdu), CRC. The format of the tag may be defined by reference to the following: the tag is 32 bits with the upper 16 bits reserved and only the lower 16 bits used, and its position is between the reserved bytes and payload of the packet.
Based on the characteristics of the video-networking, one of the core concepts of the application is provided, in a video-networking GIS system, aiming at each piece of alarm information sent by a received video-networking streaming media server, the alarm information is sent to a user terminal held by a GIS user for processing the alarm information according to an administrative division code of the alarm information, and the administrative division code identifies a regional jurisdiction, so that the alarm information sent by each jurisdiction is processed in the jurisdiction, further the alarm information can be effectively shunted in a wide geographic range, and the processing efficiency of the alarm information is improved.
Referring to fig. 5, an application environment diagram of an alarm information processing method according to an embodiment of the present invention is shown, and in fig. 5, taking province a as an example, a video networking GIS system applied by the alarm information processing method is located in province a and is responsible for processing each alarm information occurring in province a. The video networking GIS system comprises a GIS server and a plurality of user terminals, and is provided with a database. The video networking GIS system is in communication connection with a plurality of alarm clients through a video networking streaming media server, specifically, the video networking streaming media server is in communication connection with the plurality of alarm clients, and the GIS server is in communication connection with the video networking streaming media server. The video networking streaming media server, the GIS server and the plurality of alarm clients can communicate by adopting a video networking protocol.
The video network streaming media server is specifically used for receiving first alarm information sent by a plurality of alarm clients in different jurisdictions of province A. The first alarm information may specifically be information that the alarm client considers in practice that the information needs to be processed by administrative department personnel in time. In practice, the alarm client may be an APP that can be installed on an intelligent device for alarming, the APP has alarm functions of supporting compiling alarm content, selecting an alarm type, uploading an alarm picture and an alarm recording, and a user of the alarm client (hereinafter referred to as an alarm person) can send alarm information through the alarm client, and in practice, the alarm information may be picture information, audio/video information or text information.
The user terminal can be understood as a terminal which is in communication connection with the GIS server, and can be intelligent equipment such as a mobile phone, a computer, a tablet and the like, each user terminal corresponds to a different GIS user, and the GIS users can be called as police-receiving personnel who register in the video-networking GIS system in advance and can process alarm. When the alarm is actually processed, the GIS user can log in the video network GIS system to process alarm receiving according to the alarm information.
Because the video networking GIS system is positioned in the video networking, the GIS server and a plurality of user terminals can be registered in the video networking server in the video networking in advance to obtain the video networking number distributed by the video networking server, the video networking number is equivalent to the identity address identification of the GIS server and the user terminals in the video networking, and further the video networking communication can be carried out through a video networking protocol, so that the alarm system information processing method of the embodiment of the invention is realized by utilizing the characteristics of high transmission speed and high network safety of the video networking.
Referring to fig. 6, a flowchart illustrating steps of the alert information processing method in the application environment shown in fig. 5 is shown, specifically, the following steps may be performed by the video networking GIS system for each first alert information received by the video networking streaming media server:
step S61, receiving the first alarm information sent by the video network streaming media server, and reading a first administrative region code from the first alarm information.
In practice, a Forward service layer of the GIS server may receive each first alarm message sent by the video-networking streaming media server, where the Forward service layer is an interface for the video-networking GIS system to externally receive the first alarm message. During specific implementation, a Forward service layer of the GIS server may periodically receive first alarm information periodically sent by the video network streaming media server. For example, the video networking streaming media server can send the first alarm information received within the preset time to the GIS server of the video networking GIS system at preset time intervals.
The following information may be included in the first alert information sent by the alert client, but is not limited to: the system comprises a video network number of an alarm client, an alarm client identifier, user information of the alarm client and a first administrative region code. The first administrative district code is an organization structure code of a district where the alarm client is located when the alarm client sends first alarm information. For example, if the alarm client sends a piece of first alarm information currently in village D of town C of city B, province a, the first administrative division code is the administrative division code of village D, for example: 510811100210, the first administrative district code of the first alarm information is 510811100210.
Step S62, obtaining a plurality of first user IDs on the same administrative level as the first administrative division code from the database.
In practice, the database may be a mySQL database, in which a plurality of pieces of user information are stored, and each piece of user information may include an administrative division code corresponding to a jurisdiction in which the user information is responsible for performing alarm processing, where the plurality of pieces of user information may have the same administrative division code, that is, a plurality of GIS users may be responsible for processing alarm transactions in the same administrative jurisdiction. If there are 2 GIS users in charge of handling the D village police-receiving transaction, the 2 GIS users have the same administrative division code 510811100210, which is the administrative division code of D village.
In a specific implementation, the plurality of first user IDs at the same level as the first administrative division code may be understood as first user IDs included in the plurality of user information having the first administrative division code. Specifically, the MyBatis (a persistent layer framework supporting customized SQL, stored procedures, and advanced mapping sets) technical framework layer of the GIS server may first query a plurality of user information with the first administrative division code from the mySQL database, and then read the first user ID carried by each user information. The user ID is the ID which is distributed by the video networking GIS system to uniquely identify the GIS user when the GIS user registers in the video networking GIS system. If the assigned ID is 0157 when the GIS user is registered in the GIS system of the video network, the user ID is 0157.
Illustratively, taking 510811100210 with the first administrative division code of D village as an example, the multiple user information with the administrative division code of D village may be queried according to the administrative division code 51081110210 of D village among the multiple user information included in the mySQL database. For example, among a plurality of pieces of user information in the database, four pieces of user information having administrative division codes of D village are queried: the first user IDs of the four pieces of user information are respectively: 0501,0502,0503,0504.
Step S63, packaging each first user ID into the first alarm information to obtain second alarm information, where the second alarm information includes a first ID array corresponding to each first user ID.
In practice, in step S62, the multiple first user IDs acquired from the database as the data set of user IDs, and the specific process of packaging each first user ID into the first alarm information may be: the data set of the first user ID is packaged into a user ID array, and then the ID array is added to the designated field of the first alarm information, so that second alarm information is formed, the first ID array corresponding to each first user ID can be included in the second alarm information, and therefore after the first ID array is packaged into the first alarm information to obtain the second alarm information, each second alarm information determines the user terminal aimed by the user terminal, and the sending end information is marked for the second alarm information through the first ID array included by the user terminal.
For example, if the queried first user IDs are 0501,0502,0503,0504, respectively, the corresponding read user ID data set is { user0501, user0502, user0503, user0504}, the encapsulated user ID array is {0501,0502,0503,0504}, and then the ID array {0501,0502,0503,0504} is encapsulated in the parameter of the first alarm information, so as to obtain the second alarm information, where the second alarm information includes the user ID information, and the carried first ID arrays are 0501,0502,0503,0504 (corresponding to the first user IDs, respectively).
Step S64, determining, based on each first ID array, a plurality of first user terminals to which the second alarm information is directed.
Step S65, sending the second alarm information to the plurality of first user terminals, respectively.
In the embodiment of the present invention, the GIS server may determine, according to each first ID array included in the second alarm information, a first user terminal corresponding to each first ID array. Specifically, the user ID included in each of the plurality of pieces of user information may be compared with the first ID array in the designated field in the second alarm information, and if the user ID included in each of the plurality of pieces of user information is included in the first ID array in the second alarm information, the user terminal corresponding to the user information is determined as the first user terminal, otherwise, the user terminal is not determined as the first user terminal.
Therefore, when the GIS server processes a large amount of first alarm information, new second alarm information can be formed according to each first alarm information and a plurality of inquired first user IDs, the first user terminals corresponding to the second alarm information are determined in a plurality of currently logged-in user terminals through the designated fields of the second alarm information, and the efficiency of sending the second alarm information is improved. Each first user terminal is an object for processing the second alarm information, and thus, each piece of first alarm information is sent to the first user terminal at the same level as the first administrative region code of the first user terminal, so that the first user terminal at the same level processes the piece of first alarm information.
Illustratively, the second alarm information includes information corresponding to the first user ID: 0501,0502,0503,0504, the corresponding first ID array, in the first user terminal corresponding to the first ID array determined from the plurality of currently logged-in user terminals, the GIS user of each first user terminal is the GIS user for processing the alarm information of D village, so that the first alarm information sent from the alarm client of D village can be processed by the GIS user for processing D village. The alarm information processing in the embodiment of the invention can mean that the GIS user of the first user terminal carries out alarm receiving click operation on the displayed alarm information on the video networking GIS system interface.
It should be noted that the actual work authority of the GIS user of each first user terminal is to process the alarm transaction of the D village, and does not represent that the actual geographic location of the GIS user is necessarily located in the D village, and in practice, the geographic location of the GIS user may be located in the D village, or may be located in another area of the province a, or may be located in another province.
In practice, the first user terminal may be configured to display the second alarm information on the interface of the video networking GIS system, specifically, the first user terminal may display the second alarm information on the interface of the video networking GIS system through an HTML front end rendering technology of the web front end, and a GIS user of the first user terminal may log in the video networking GIS system through a browser, so as to view and process the second alarm information on the interface of the video networking GIS system.
According to the embodiment of the invention, the GIS server of the video-networking GIS system can determine the first user ID corresponding to the first administrative division code according to the first administrative division code included in each first alarm message sent by the video-networking streaming media server, and then the first user ID and the first alarm message are adopted to produce the second alarm message, so that the GIS server can determine each first user terminal to be sent according to the first ID array included in the second alarm message, and finally the first alarm message is processed by the GIS user belonging to the same jurisdiction as the alarm client side sending the first alarm message.
Because each first alarm information is sent to the GIS user at the same level for processing, the alarm information sent by different jurisdictions can be processed by the GIS user processing the local affair in advance in a wide region, in practice, the effects that the GIS user at the current level can see the alarm information and the GIS users at different levels can not see the alarm information are achieved, each alarm information is sent to the GIS user appointed by the jurisdiction, the network bandwidth occupied by each alarm information is further reduced, and the transmission efficiency of the alarm information is improved. Meanwhile, the embodiment of the invention integrally carries out shunt sending on numerous alarm information according to administrative divisions, realizes hierarchical processing, further integrally improves the processing efficiency of the video networking GIS system on the alarm information, achieves the effect that the alarm information sent out by the jurisdiction can be solved preferentially in the jurisdiction, and constructs an operation mechanism for effectively processing remote alarm.
With reference to the foregoing embodiment, in an optional implementation manner, the step S65 may specifically include the following steps:
in step S651, at least one second user terminal currently logged in is determined among the plurality of first user terminals.
In practice, different first user terminals have different logging conditions in the GIS system, and some first user terminals do not log in and some first user terminals log in, when sending the second alarm information, the second alarm information can be sent to the logged user terminals, so that waste of network bandwidth resources caused by sending the second alarm information to all the first user terminals is avoided.
For example, in each of the determined first user terminals, if the GIS users whose first user IDs are 0503 and 0501 are not logged in, the respective first user IDs of the determined currently logged-in first user terminals are: 0502. 0504, finally sending the second alarm information to the second user terminal with user ID 0502 and 0504. Therefore, the bandwidth resource waste caused by sending the second alarm information to the unregistered user terminal can be avoided, and the work load of the GIS server is further reduced.
And step S652, sending the second alarm information to each second user terminal through a websocket channel.
In this embodiment, when the GIS user logs in, the corresponding user terminal establishes a WebSocket (web socket protocol) channel with the GIS server, and then the GIS server can send the second alarm information to the second logged-in user terminal through the WebSocket channel. The WebSocket channel can be understood as a communication channel which is established between the GIS server and the user terminal and can transmit and receive data through the WebSocket. The WebSocket protocol supports full duplex communication between the client and the remote host, and can send some instruction information while sending data, so that more efficient data information interaction is carried out between the client and the host.
Referring to fig. 7, a flowchart of the steps of an alarm information processing method in an alternative embodiment is shown, where the alternative alarm information processing method includes the above steps S61 to S65, and specifically includes the following steps:
and step S60, binding a diversion alarm triggering condition and a diversion alarm ending condition for the second alarm information.
Specifically, the step S60 may be after step S63 and before step S64, specifically, the alarm diversion triggering condition is a condition that the second alarm information needs to be diverted to the upper-level administrative district corresponding to the first administrative region code, and the alarm diversion ending condition is a condition that indicates that the second alarm information cannot be diverted any more in the process of being diverted.
After step S65, the method may specifically include the following steps:
step S66, judging whether the alarm transfer triggering condition is met; if the alarm diversion triggering condition is met, determining a plurality of third user terminals corresponding to second administrative division codes of N levels on the first administrative division code, sending the first alarm information to the plurality of third user terminals, and proceeding to step S67.
In practice, if the second alarm information is not processed by each first user terminal within a given time, or the second alarm information is considered by the current GIS user as needing to turn the alarm to the previous stage for processing, in such a case, it is determined that the alarm-turning triggering condition is satisfied. And if the second alarm information is processed by the first user terminal within the given time, determining that the alarm transfer triggering condition is not met.
Specifically, when the alarm diversion triggering condition is met, the GIS server may determine the upper N-level second administrative division code corresponding to the first administrative division code, and further send the first alarm information to the third user terminal corresponding to the second administrative division code by using the methods described in the above steps S62 to S65. N is greater than or equal to 1, and a specific value of N may be the same as the number of times that the second alarm information is alert-diverted, where N is 1 if the second alarm information is alert-diverted for the first time, N is 2 if the second alarm information is alert-diverted for the second time, and N is 3 if the second alarm information is alert-diverted for the third time. That is, the more the number of times of alarm transfer, the higher the administrative level of the GIS user to which the second alarm information is reported.
Exemplarily, taking the first alarm information sent by the alarm client of the D village as an example, if the GIS user responsible for processing the alarm transaction of the D village does not process the first alarm information obtained according to the first alarm information at a given time, or the GIS user thinks that the GIS user cannot process the second alarm information and needs to turn to the upper level for processing, the GIS server determines that the trigger condition for turning to the alarm is met, and further obtains a second administrative division code 51081100000 of the town C where the D village is located in the database; the second administrative division code 51081100000 is a code located one level above the first administrative division code. Then, a plurality of user information with the second administrative division code 51081100000 are obtained from the database, and the respective user IDs are obtained from the plurality of user information, for example, the obtained user IDs are 1021, 1478, 2014 respectively, then the method of step S64 is adopted to write the user IDs into the second alarm information to obtain new alarm information, and then the third user terminal to be sent is re-determined according to the new alarm information, and the new alarm information is further sent to the third user terminals corresponding to 1021, 1478, 2014 respectively, and is not sent to the first user terminal.
Step S67, judging whether the alarm transfer ending condition is met, if so, generating the end information aiming at the first alarm information; if the turn alarm ending condition is not satisfied, the process returns to the step S66.
In practice, if the user of the third user terminal is a user who handles provincial level alarm affairs, in such a case, it is determined that the alarm transfer ending condition is met, which indicates that the first alarm information has been pushed to the highest level GIS user for processing, and the alarm transfer is ended; otherwise, if the user of the third user terminal is not the user who handles the provincial level alarm transaction, it is determined that the alarm transfer ending condition is not satisfied, in this case, the process may go to step S66 to continuously determine whether the alarm transfer triggering condition and the alarm transfer ending condition are satisfied. When the alarm transfer ending condition is met, the settlement information can be generated so that a user of the video networking GIS system can know that the first alarm information is processed according to the settlement information. The result information may include user information of a GIS user who finally processes the first alarm information.
In the embodiment of the invention, after second alarm information is sent to each first user terminal, if the condition of alarm transfer triggering is judged to be met for the first time, a second administrative division code at the upper level corresponding to the first administrative division code is determined, and the first alarm information is sent to a third user terminal at the upper level; if the alarm transfer triggering condition is met after the first alarm information is sent to a third user terminal, determining second administrative division codes of the upper two levels corresponding to the first administrative division codes, and sending the first alarm information to the third user terminal of the upper two levels; and so on until determining that the alarm-turning ending condition is met.
Taking the first alarm information sent by the alarm client of village D as an example, after new alarm information generated according to the second alarm information and three user IDs of 1021, 1478, 2014 and the like is sent to the third user terminal, if the alarm forwarding triggering condition is judged to be met, the GIS server determines the user ID of city B in which village D is located, and sends the new alarm information to the GIS user who handles the alarm transaction in city B; and if the alarm transfer triggering condition is still met after the alarm information is sent to the GIS user for processing the alarm affair in the city B, the GIS server determines the user ID of the province A where the village D is located, then sends new alarm information to the GIS user for processing the alarm affair in the province A, and then finishes alarm transfer and generates end-of-case information.
By adopting the technical scheme, under the condition that the second alarm information is not processed by the first user terminal in time, the second alarm information can be automatically sent to the third user terminal of the previous level for processing, or the first user terminal cannot process the second alarm information and can automatically send the second alarm information to the third user terminal of the previous level for processing when the second alarm information needs to be handed to the user terminal of the previous level for processing. Therefore, under the condition that no person in the district of the jurisdiction receives the alarm, the alarm information can automatically turn to the upper level, and under the condition that the district of the jurisdiction of the country cannot receive the alarm, the alarm information also automatically turns to the upper level for processing, so that each piece of the alarm information can be processed timely and effectively.
With reference to the optional implementation of the alarm information processing method shown in fig. 7, in a possible embodiment, step S60 may specifically include the following steps:
step S601, binding a timing task, a switching alarm signaling monitoring task and a provincial level administrative division code for the second alarm information.
Wherein the timing task is provided with countdown time; the timing task is used for monitoring whether an alarm receiving signaling aiming at the second alarm information is received or not within the countdown time, the alarm transferring signaling monitoring task is used for monitoring whether an alarm transferring signaling aiming at the second alarm information is received or not, and the provincial level administrative division code corresponds to the first administrative division code.
In this embodiment, the countdown time is the given time in step S66, the duration of the countdown time may be set as required, and in practice, when the second alarm information is generated, the countdown time starts to count down. The first user terminal generates and sends alarm receiving signaling to the GIS server according to the alarm receiving operation of the GIS user, and the first user terminal generates and sends alarm forwarding signaling to the GIS server according to the alarm forwarding operation of the GIS user. The alarm forwarding operation can be specifically an operation of forwarding the colluded alarm information to the push performed by the GIS user on the video networking GIS system interface.
The province-level administrative division code is an administrative division code of a province in which the first administrative division code is located, for example, the first administrative division code is a administrative division code of village D: 51081110000, if the province in D village is province A, the province-level administrative division code corresponding to the first administrative division code is the administrative division code of province A: 510000000000.
step S602, the alarm receiving signaling is not monitored by the timing task, and/or the alarm transfer signaling monitoring task monitors the alarm transfer signaling as the alarm transfer triggering condition; and taking the administrative division code corresponding to the third user terminal as the provincial-level administrative division code as the alarm transfer ending condition.
In practice, the GIS server may use the result that the timing task set with the countdown time does not monitor the alarm receiving signaling and/or the result that the transfer alarm signaling monitoring task monitors the transfer alarm signaling as the transfer alarm triggering condition. Specifically, before the countdown time is 0, if the timing task does not monitor that the alarm receiving signaling is received all the time, or the transfer alarm signaling monitoring task monitors that the transfer alarm signaling is received, it is determined that the transfer alarm triggering condition is met.
And the administrative division code corresponding to the third user terminal is the administrative division code of the district which is handled by the GIS user corresponding to the third user terminal. For example, the GIS user of the third user terminal is lisi, and if lisi is responsible for processing the alarm in city B, the administrative division code corresponding to the third user terminal is the administrative division code 510800000000 in city B, and the third user terminal is not a provincial-level administrative division code and does not satisfy the alarm transfer end condition. If the alarm in province a is processed by lie three, the administrative division code corresponding to the third user terminal is the administrative division code 510000000000 in province a, and is a province-level administrative division code, and the alarm transfer ending condition is met.
Accordingly, in one possible embodiment of this alternative embodiment, the following steps may be further included:
step S603, if it is determined that the alarm transfer triggering condition is not satisfied, canceling the timing task and the alarm transfer signaling monitoring task.
In practice, if the alarm-turning triggering condition is not satisfied, it indicates that the second alarm information is processed, that is, in practice, the GIS user of the first user terminal clicks "alarm receiving" on the second alarm information; or, after the first alarm information is forwarded to the third user terminal, the first alarm information is processed by the third user terminal, that is, in practice, the GIS user of the third user terminal clicks "alarm receiving" on the second alarm information, and finally, the first alarm information is processed, and further, the forwarding of the alarm is not needed.
The timing task and the transfer alarm signaling monitoring task are cancelled, and in practice, the binding relationship between the second alarm information and the timing task and the transfer alarm signaling monitoring task is cancelled, or the timing task and the transfer alarm signaling monitoring task bound by the second alarm information are deleted.
In an embodiment, as shown in fig. 8, fig. 8 is a flowchart of a method for binding a timed task to the second alarm information according to another embodiment of the present application, and specifically includes the following steps:
and step S81, generating a key for the second alarm information according to the alarm identifier of the second alarm information, and storing the key into a redis cache.
In practice, the alarm identifier may be understood as an identifier that uniquely identifies the alarm information, and the identifier may be a code, and specifically, the redis cache is a key-value storage system and a high-performance key-value database for storing data, and the redis may periodically write updated data to a disk or write a modification operation to an additional record file, and may periodically write the updated data to the disk or write the modification operation to the additional record file. In the embodiment of the present invention, a Key for uniquely identifying the second alarm information is generated by the alarm identifier, where the Key may be a random character string with a length of 32 bits, and specifically, the Key may be associated with the alarm identifier to uniquely identify the alarm information identified by the alarm identifier, so that the Key of the second alarm information also uniquely identifies the second alarm information. Therefore, the effect of storing the alarm identifier of the second alarm information in a key mode is achieved in the redis cache.
Step S82, binding the timing task for the key in the redis cache, and setting the countdown time for the timing task.
Specifically, a timing task is created for the key in the redis cache, and the timing task may be understood as whether an alarm receiving signaling returned for the key is received or not, in this way, the countdown time starts to count from when the timing task is bound. In practice, the returned alarm receiving signaling may include an alarm identifier, and when the timing task performs monitoring, it may be directly determined whether the alarm receiving signaling is the alarm receiving signaling for the Key according to the alarm identifier included in the alarm receiving signaling, and whether the alarm receiving signaling is received or not, the timing task may write the result into the record file corresponding to the Key, so that the processing result of the second alarm information may be determined according to the record file.
Accordingly, if the timing task is canceled in step S603, the following steps can be implemented:
and step S83, canceling the binding relationship between the key and the timing task from the redis cache, and/or deleting the key.
Accordingly, in a possible embodiment of this optional implementation, the alarm information processing method according to the embodiment of the present invention may further include the following step S64':
and step S64', storing the second alarm information into the database.
In practice, while the key generated according to the alarm identifier of the second alarm information is stored in the redis cache in step S81, the second alarm information may also be stored in the database, where the second alarm information includes the alarm identifier.
Correspondingly, step S66 may specifically include the following steps:
step S661, obtaining a plurality of second user IDs of the same administration level as the determined second administration division code from the database.
The process of step S661 is similar to that of step S62, and reference is specifically made to step S62, which is not described herein again.
Step S662, based on the key, obtaining the alarm identifier of the second alarm information from the redis cache.
Step S663, based on the alarm identifier, obtaining the second alarm information from the database, and based on the second user ID, updating the first ID array in the second alarm information to obtain third alarm information, where the third alarm information includes the second ID array corresponding to each second user ID.
In practice, if the alarm forwarding triggering condition is met, the GIS server may obtain a key of the second alarm information from the redis cache, and based on determining the alarm identifier associated with the key, may further read the second alarm information corresponding to the alarm identifier from the plurality of alarm information stored in the database according to the alarm identifier.
Further, the first ID array in the second alarm information may be deleted, and the second ID array corresponding to the second user ID is written into the second alarm information from which the first ID array is deleted, so as to form third alarm information, and thus, the third alarm information includes the second ID array. Therefore, the ID array included in the alarm information can be updated in the alarm transferring process, and the alarm information dynamically updates the ID of the user to be targeted according to the processing result. In practice, the alarm identifier of the second alarm information is always kept unchanged.
Step S664, determining, based on the second ID array, a plurality of third user terminals to which the third alarm information is directed.
The step S664 is similar to the step S64, and reference is specifically made to the step S64, which is not described herein again.
Step S665, sending the third alarm information to the plurality of third user terminals, respectively.
The process of step S665 is similar to that of step S65, and reference is specifically made to step S65, which is not described herein again.
By adopting the technical scheme, the second alarm information and the key of the second alarm information can be stored separately, when the alarm needs to be switched, the first ID array in the second alarm information can be dynamically updated into the second ID array, so that the second alarm information stored in the database always aims at a certain administrative division code, and further, when the alarm is switched, the second alarm information aiming at different administrative division codes is stored in the database, thereby reducing the data volume stored in the database and improving the operation efficiency of the system.
It should be noted that, for simplicity of description, the method embodiments are described as a series of acts or combination of acts, but those skilled in the art will recognize that the present invention is not limited by the illustrated order of acts, as some steps may occur in other orders or concurrently in accordance with the embodiments of the present invention. Further, those skilled in the art will appreciate that the embodiments described in the specification are presently preferred and that no particular act is required to implement the invention.
Referring to fig. 9, an alarm information processing apparatus according to an embodiment of the present invention is shown, where the apparatus is applied to a video networking GIS system, the video networking GIS system is in communication connection with an alarm client through a video networking streaming media server, the video networking GIS system includes a GIS server and a plurality of user terminals, and the video networking GIS system is configured with a database; the video network streaming media server is used for receiving first alarm information sent by the plurality of alarm clients respectively; the apparatus may include the following modules:
an alarm information receiving module 901, configured to receive the first alarm information sent by the video network streaming media server, and read a first administrative region code from the first alarm information;
a user ID obtaining module 902, configured to obtain, from the database, a plurality of first user IDs that are in the same administrative level as the first administrative division code;
an alarm information editing module 903, configured to generate second alarm information using the first user ID and the first alarm information, where the second alarm information includes a first ID array corresponding to each first user ID;
a user terminal determining module 904, configured to determine, based on each first ID array, a plurality of first user terminals for which the second alarm information is directed;
and an alarm information sending module 905, configured to send the second alarm information to the plurality of first user terminals respectively.
Optionally, the apparatus may further include the following modules:
the triggering condition binding module is used for binding a transfer alarm triggering condition and a transfer alarm ending condition for the first alarm information;
the first triggering module is used for judging whether the alarm transfer triggering condition is met; if the alarm transfer triggering condition is met, determining a plurality of third user terminals corresponding to second administrative division codes of N levels on the first administrative division code, sending the first alarm information to the plurality of third user terminals, and triggering a second triggering module;
the second triggering module is used for judging whether the alarm transfer ending condition is met or not, and if the alarm transfer ending condition is met, generating end information aiming at the first alarm information; and if the alarm transfer finishing condition is not met, starting the first triggering module to execute the judgment to judge whether the alarm transfer triggering condition is met, if the alarm transfer triggering condition is met, determining a plurality of third user terminals corresponding to second administrative division codes of N levels on the first administrative division code, sending the first alarm information to the plurality of third user terminals, and triggering a second triggering module.
Optionally, the alarm information sending module 905 may include the following units:
a user determining unit, configured to determine at least one second user terminal currently logged in among the plurality of first user terminals;
and the sending unit is used for sending the second alarm information to each second user terminal through a websocket channel.
Optionally, the trigger condition binding module may include the following units:
the task binding unit is used for binding a timing task, a switching alarm signaling monitoring task and a provincial level administrative division code for the second alarm information; the timing task is provided with countdown time; the timing task is used for monitoring whether an alarm receiving signaling for the second alarm information is received or not within the countdown time, the alarm transfer signaling monitoring task is used for monitoring whether an alarm transfer signaling for the second alarm information is received or not, and the provincial level administrative division code corresponds to the first administrative division code;
a condition determining unit, configured to use the timed task as the alarm receiving signaling, and/or use the transfer alarm signaling monitoring task as the transfer alarm triggering condition; and taking the administrative division code corresponding to the third user terminal as the provincial-level administrative division code as the alarm transfer ending condition.
The apparatus may further include the following modules:
and the binding canceling module is used for canceling the timing task and the alarm transfer signaling monitoring task if the alarm transfer triggering condition is determined not to be met.
Optionally, the task binding unit may include the following sub-units:
the Key cache subunit is used for generating a Key for the second alarm information according to the alarm identifier of the second alarm information and storing the Key into a redis cache;
a timed task setting subunit, configured to bind the timed task for the key in the redis cache, and set the countdown time for the timed task;
the unbinding module is specifically configured to cancel the binding relationship between the key and the timing task from the redis cache, and/or delete the key.
Optionally, the apparatus may further include the following modules:
the alarm information storage module is used for storing the second alarm information into the database, wherein the second alarm information comprises the alarm identifier;
accordingly, the second triggering module may include the following units:
a second user ID obtaining unit, configured to obtain, from the database, a plurality of second user IDs of an administrative level that is the same as the determined second administrative division code;
the alarm identifier obtaining unit is used for obtaining an alarm identifier of the second alarm information from the redis cache based on the key;
the alarm information updating unit is used for acquiring the second alarm information from the database based on the alarm identifier, and updating a first ID array in the second alarm information based on the second user ID to obtain third alarm information, wherein the third alarm information comprises a second ID array corresponding to each second user ID;
a second user terminal determining unit, configured to determine, based on the second ID array, a plurality of third user terminals to which the third alarm information is directed;
and the second alarm information sending unit is used for respectively sending the third alarm information to the plurality of third user terminals.
For the alarm information processing device embodiment, since it is basically similar to the alarm information processing method embodiment, the description is relatively simple, and relevant points can be referred to the partial description of the alarm information processing method embodiment.
An embodiment of the present invention further provides an apparatus, including: one or more processors; and one or more machine-readable media having instructions stored thereon that, when executed by the one or more processors, cause the apparatus to perform one or more alert information processing methods as described in embodiments of the invention.
The embodiment of the invention also provides a computer readable storage medium, and a stored computer program enables a processor to execute the alarm information processing method according to the embodiment of the invention.
The embodiments in the present specification are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments are referred to each other.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, apparatus, or computer program product. Accordingly, embodiments of the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, embodiments of the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
Embodiments of the present invention are described with reference to flowchart illustrations and/or block diagrams of methods, terminal devices (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing terminal to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing terminal, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing terminal to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing terminal to cause a series of operational steps to be performed on the computer or other programmable terminal to produce a computer implemented process such that the instructions which execute on the computer or other programmable terminal provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
While preferred embodiments of the present invention have been described, additional variations and modifications of these embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. Therefore, it is intended that the appended claims be interpreted as including preferred embodiments and all such alterations and modifications as fall within the scope of the embodiments of the invention.
Finally, it should also be noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or terminal that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or terminal. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or terminal that comprises the element.
The above detailed descriptions of an alarm information processing method, an alarm information processing apparatus, an electronic device, and a computer-readable storage medium provided by the present invention have been provided, and specific examples are used herein to explain the principles and embodiments of the present invention, and the descriptions of the above examples are only used to help understand the method and the core ideas of the present invention; meanwhile, for a person skilled in the art, according to the idea of the present invention, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present invention.