Network resource configuration method and device of video monitoring system and electronic equipment
By obtaining the hash value calculation of the dual-layer virtual LAN tag and encapsulating the IPv6 extended packet header in the video surveillance system, the problem of decoupling network and application service information is solved, enabling fine-grained configuration of network resources and fine-grained differentiation of service information, thereby improving the quality of network services.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- POWER DISPATCHING CONTROL CENT OF GUANGDONG POWER GRID CO LTD
- Filing Date
- 2023-05-26
- Publication Date
- 2026-07-21
AI Technical Summary
In traditional video surveillance systems, network and application business information are decoupled and cannot be precisely distinguished, resulting in unreasonable network resource allocation.
By acquiring the dual-layer VLAN tag of traffic packets, calculating the hash value using a hash algorithm, querying the hash mapping table to obtain application service information, and encapsulating it in the hop-by-hop options header of the IPv6 extension packet, network resources are identified and configured according to the application service information.
It enables the network to finely distinguish and rationally allocate application service information, thereby improving the quality and efficiency of network services.
Smart Images

Figure CN116846996B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of communication technology, and in particular to a network resource configuration method, apparatus and electronic device for a video surveillance system. Background Technology
[0002] In traditional video surveillance systems, network and application service information are decoupled, and the network and application service information cannot perceive each other. The network cannot make fine distinctions between application service information, making it difficult to allocate network resources reasonably based on the content of application service information. Summary of the Invention
[0003] In view of this, the purpose of this application is to provide a network resource configuration method, apparatus and electronic device for a video surveillance system to solve the above-mentioned technical problems.
[0004] To achieve the above objectives, the first aspect of this application provides a method for configuring network resources in a video surveillance system, comprising:
[0005] Acquire traffic packets, wherein the traffic packets include a two-layer virtual LAN tag;
[0006] Based on the aforementioned two-layer virtual LAN label, a hash value is calculated using a hash algorithm to obtain the hash value calculation result;
[0007] Based on the hash value calculation result, query the application service information corresponding to the hash value calculation result from the pre-stored hash mapping table, and encapsulate the application service information in the option header of the IPv6 extended packet header that has been pre-formatted and expanded.
[0008] Identify the application service information in the hop-by-hop option header, and configure network resources based on the application service information.
[0009] Optionally, the dual-layer VLAN tag includes an inner VLAN tag and an outer VLAN tag, wherein the inner VLAN tag is encapsulated within the outer VLAN tag;
[0010] The hash value calculation based on the two-layer virtual local area network label using a hash algorithm to obtain the hash value calculation result includes:
[0011] From the inner virtual local area network (VLAN) tag, read the first VLAN identity identifier and the first priority information corresponding to the inner VLAN tag, respectively;
[0012] From the outer virtual LAN label, read the second virtual LAN identity identifier corresponding to the outer virtual LAN label and the second priority information corresponding to the outer LAN label respectively;
[0013] The first virtual LAN identity, the second virtual LAN identity, the first priority information, and the second priority information are concatenated using preset concatenation symbols to obtain the concatenation result;
[0014] The concatenated result is subjected to a hash algorithm to calculate a hash value, and the hash value calculation result is obtained.
[0015] Optionally, the hash value calculation result includes the source media access control address and first priority information corresponding to the inner virtual local area network label, the second virtual local area network identity identifier and second priority information corresponding to the outer virtual local area network label, and the application service information includes the flow identifier and / or the user identifier and / or the quality of service requirement identifier;
[0016] The step of retrieving application business information corresponding to the hash value calculation result from a pre-stored hash mapping table based on the hash value calculation result includes:
[0017] From the first mapping table in the hash mapping table, query the stream identifier corresponding to the source media access control address. The first mapping table represents the correspondence between each source media access control address and the stream identifier.
[0018] From the second mapping relationship table in the hash mapping table, query the user identifier corresponding to the second virtual local area network identity identifier. The second relationship mapping table represents the correspondence between each second virtual local area network identity identifier and the user identifier.
[0019] From the third mapping table in the hash mapping table, query the first service quality requirement identifier corresponding to the first priority information, and query the second service quality requirement identifier corresponding to the second priority information. Use the first service quality requirement identifier and the second service quality requirement identifier as service quality requirement identifiers. The third mapping table represents the correspondence between each first priority information and each second priority information and the service quality requirement identifier.
[0020] Optionally, the type of the flow identifier includes a first flow identifier type and a second flow identifier type, wherein the first flow identifier type is used to indicate that the traffic packet is a video stream originating from a video surveillance device, and the second flow identifier type is used to indicate that the traffic packet is a command stream originating from a terminal device;
[0021] The user identifier type includes a first user identifier type and a second user identifier type. The first user identifier type is used to indicate that the sending account of the traffic packet is a first type account, and the second user identifier type is used to indicate that the sending account of the traffic packet is a second type account.
[0022] The value corresponding to the quality of service requirement identifier is used to indicate the priority of the traffic packet transmission.
[0023] Optionally, configuring network resources based on the application service information includes:
[0024] Configure network resources according to the type of the flow identifier; and / or,
[0025] Configure network resources according to the type of the user identifier; and / or,
[0026] Network resources are configured based on the value corresponding to the service quality requirements.
[0027] Optionally, configuring network resources based on the type of the flow identifier includes:
[0028] In response to determining that the type of the flow identifier is the first flow identifier type, network resources within a preset bandwidth range are configured; or,
[0029] In response to determining that the type of the flow identifier is the second flow identifier type, network resources with a latency within a preset range are configured.
[0030] Optionally, configuring network resources based on the type of the user identifier includes:
[0031] In response to determining that the user identifier is of the first user identifier type, pre-defined network resources corresponding to the first type of account are configured; or,
[0032] In response to determining that the user identifier is of the second user identifier type, preset network resources corresponding to the second type of account are configured.
[0033] Optionally, configuring network resources based on the value corresponding to the service quality requirement identifier includes:
[0034] In response to determining that the value corresponding to the service quality requirement identifier is greater than the value of other service quality requirement identifiers corresponding to other traffic packets, the traffic packet corresponding to the service quality requirement identifier is transmitted with high priority; or,
[0035] In response to determining that the value corresponding to the service quality requirement identifier is less than the value of other service quality requirement identifiers corresponding to other traffic packets, the traffic packet corresponding to the service quality requirement identifier is transmitted with low priority; or,
[0036] In response to determining that the value corresponding to the quality of service requirement identifier is equal to the value of the other quality of service requirement identifier corresponding to other traffic packets, the traffic packet corresponding to the quality of service requirement identifier and the other traffic packets corresponding to the other quality of service requirement identifier are transmitted simultaneously.
[0037] A second aspect of this application provides a network resource configuration device for a video surveillance system, comprising:
[0038] The traffic packet acquisition module is configured to acquire traffic packets, which include a two-layer virtual local area network label;
[0039] The hash value calculation module is configured to perform hash value calculation based on the two-layer virtual local area network label using a hash algorithm to obtain the hash value calculation result.
[0040] The mapping query module is configured to query the application service information corresponding to the hash value calculation result from a pre-stored hash mapping table based on the hash value calculation result, and encapsulate the application service information in the hop-by-hop option header of the pre-formatted IPv6 extended packet header;
[0041] The network resource configuration module is configured to identify application service information in the hop-by-hop option header of a public backbone network and configure network resources based on the application service information.
[0042] A third aspect of this application provides an electronic device including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the method described in the first aspect.
[0043] As can be seen from the above, the network resource configuration method, apparatus, and electronic equipment of the video surveillance system provided in this application acquire traffic packets, calculate hash values using a hash algorithm based on the dual-layer virtual LAN labels marked on the traffic packets, obtain the hash value calculation results, query the application service information corresponding to the hash value calculation results from a pre-stored hash mapping table, and then encapsulate the queried application service information in the hop-by-hop option header of a pre-formatted extended IPv6 packet header. Then, the application service information in each option header of the public backbone network is identified, and network resources are configured according to the application service information. This achieves the transformation of the dual-layer virtual LAN labels marked on the traffic packets into information in the IPv6 extended packet header of the public backbone network, enabling the network to perceive application service information and thus distinguish it in detail, thereby achieving the effect of rationally configuring network resources based on the content of the application service information. Attached Figure Description
[0044] To more clearly illustrate the technical solutions in this application or related technologies, the drawings used in the description of the embodiments or related technologies will be briefly introduced below. Obviously, the drawings described below are only embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0045] Figure 1 This is a flowchart of a network resource configuration method for a video surveillance system according to an embodiment of this application;
[0046] Figure 2A This is a schematic diagram illustrating the format of each option header in an embodiment of this application;
[0047] Figure 2B This is a schematic diagram illustrating the application service information stored in the header of each option in this application, according to an embodiment of the present application.
[0048] Figure 2C This is an extended schematic diagram of the application-aware network identity identifier portion of an embodiment of this application;
[0049] Figure 2D This is a schematic diagram illustrating the storage of application service information after the application-aware network identity identifier is extended according to an embodiment of this application.
[0050] Figure 3 This is a schematic diagram of the network resource configuration device of the video surveillance system according to an embodiment of this application;
[0051] Figure 4 This is a schematic diagram of an electronic device according to an embodiment of this application. Detailed Implementation
[0052] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with specific embodiments and the accompanying drawings.
[0053] It should be noted that, unless otherwise defined, the technical or scientific terms used in the embodiments of this application should have the ordinary meaning understood by one of ordinary skill in the art to which this application pertains. The terms "first," "second," and similar terms used in the embodiments of this application do not indicate any order, quantity, or importance, but are merely used to distinguish different components. Terms such as "comprising" or "including" mean that the element or object preceding the word encompasses the elements or objects listed after the word and their equivalents, without excluding other elements or objects. Terms such as "connected" or "linked" are not limited to physical or mechanical connections, but can include electrical connections, whether direct or indirect. Terms such as "upper," "lower," "left," and "right" are only used to indicate relative positional relationships; when the absolute position of the described object changes, the relative positional relationship may also change accordingly.
[0054] In related technologies, traditional video surveillance systems decouple network and application service information, preventing them from perceiving each other. The network cannot accurately distinguish application service information, making it difficult to allocate network resources rationally based on the content of application service information.
[0055] This application provides a network resource configuration method for a video surveillance system. By acquiring traffic packets, calculating hash values using a hash algorithm based on the dual-layer virtual LAN (VLAN) tags marked on the traffic packets, obtaining the hash value calculation result, querying the application service information corresponding to the hash value calculation result from a pre-stored hash mapping table, and then encapsulating the queried application service information in the hop-by-hop option header of a pre-formatted extended IPv6 packet header, identifying the application service information in each option header of the public backbone network, and configuring network resources according to the application service information, this method transforms the dual-layer VLAN tags marked on the traffic packets into information in the IPv6 extended packet header of the public backbone network. This allows the network to perceive application service information, enabling fine-grained differentiation of application service information and achieving the effect of rationally configuring network resources based on the content of the application service information. Figure 1 As shown, the method includes:
[0056] Step 101: Obtain traffic packets, the traffic packets including two-layer virtual LAN tags.
[0057] In this step, traffic packets are sent from a terminal device, which can be at least one of the following:
[0058] Cameras, digital video recorders, network video recorders.
[0059] In addition, the terminal device can also be a terminal control device that sends instructions to a camera, digital video recorder, or network recorder.
[0060] When traffic packets are sent from terminal devices, they are tagged with an inner Virtual Local Area Network (VLAN) label. The inner VLAN label can be used to distinguish different devices and achieve isolation and protection between devices.
[0061] When traffic packets enter the edge switches of the public backbone network, they are tagged with an outer virtual LAN label to isolate information within the subsystem and achieve isolation and protection between systems.
[0062] In addition, after acquiring the traffic packet, it can be determined whether the traffic packet contains a virtual LAN tag. If it contains a virtual LAN tag, it can be further determined whether the virtual LAN tag is a double-layer tag.
[0063] Step 102: Calculate the hash value using a hash algorithm based on the dual-layer virtual LAN label to obtain the hash value calculation result.
[0064] In this step, after traffic packets labeled with a two-layer virtual LAN tag enter the public backbone network, a hash value is calculated based on the virtual LAN tag using the Secure Hash Algorithm 256-bit (SHA256) algorithm to obtain the hash value calculation result corresponding to the virtual LAN tag.
[0065] Step 103: Based on the hash value calculation result, query the application service information corresponding to the hash value calculation result from the pre-stored hash mapping table, and encapsulate the application service information in the hop-by-hop option header of the pre-formatted IPv6 extended packet header.
[0066] In this step, the hash mapping table is stored in the switches of the public backbone network. The hash mapping table stores the mapping relationship between the information in the virtual LAN tag and the application service information, so that the application service information corresponding to the hash calculation result can be retrieved from the hash mapping table, enabling the network to perceive the application service information and thus make fine distinctions between the application service information.
[0067] The IPv6 (Internet Protocol Version 6) extended header, through APN6 (Application-aware IPv6 Networking) technology, utilizes the programmable space of the IPv6 extended header to carry application service information into the network, forming the premise for network awareness of application service information.
[0068] The application service information carried in the IPv6 extended header includes Application Partition Name (APN ID) and Application Partition Parameters (APN Parameters). The APN ID provides information that helps the network distinguish different application flows and different users (groups) of a particular application / class of applications, and may include information such as Application Group ID and User Group ID. The APN Parameters are optional and may include network performance requirements such as bandwidth, latency, jitter, and packet loss rate. APN6 technology can change the traditional non-differentiated service delivery model, providing diversified services through different paths.
[0069] Application service information is encapsulated in the hop-by-hop Options Header (HBH) of a pre-formatted extended IPv6 header. For example, the flow identifier and / or user identifier and / or quality of service requirement identifier are encapsulated in the hop-by-hop Options Header (HBH) position within the IPv6 extended header. The format of the hop-by-hop Options Header is as follows: Figure 2A As shown. When storing, the Next Header portion of the previous header is set to 0, indicating that the next header type for the current header is a hop-by-hop options header. The OptionType portion of the hop-by-hop options header identifies the type of the current extension header. The header extension length (HdrExt Len) refers to the number of 8-byte blocks in the hop-by-hop options extension header. The Application-Aware Network Information (APN6 Information) stores the application service information (variable length) corresponding to the IPv6 extension header.
[0070] The application business information format encapsulated in the hop-by-hop option header is as follows: Figure 2B As shown, the Application-Aware Network Identity Type (APN-ID-Type) field is designed as a short type (32 bits), while the Flags (undefined flag) and Network Performance Requirement Parameter Type (APN-Para-Type) parts are reserved fields. The Network Performance Requirement Parameter APN-Para (Optional) is an optional part; if used, it needs to be identified in the Network Performance Requirement Parameter Type (APN-Para-Type) field. The Application-Aware Network Identity (APN-ID) is an extended part, which can... Figure 2B The Application Perceptual Network Identity (APN-ID) part of the application is extended to, for example, Figure 2CAs shown, the Application Aware Network Identity (APN-ID) part is expanded into three parts: Flow-Type (8 bits), User-Type (8 bits), and Priority-Type (16 bits).
[0071] The extended Application-Aware Network Identity (APN-ID) stores application service information, specifically as follows: Figure 2D As shown, when Flow-Type is 0x01, it indicates that the current IPv6 extension header carries information about a video stream, and when it is 0x02, it indicates that the current IPv6 extension header carries information about a command stream.
[0072] When User-Type is 0x01, it indicates that the sending account type of the current IPv6 extension header is a regular account, and when it is 0x02, it indicates that the sending account type of the current IPv6 extension header is a premium (VIP) account.
[0073] Alternatively, User-Type can be set to 0x01, indicating that the sending account type of the current IPv6 extension header is a regular user; 0x02 indicates that the sending account type of the current IPv6 extension header is a regular VIP user; and 0x03 indicates that it is a premium VIP user.
[0074] The Priority-Type field records the parsed priority information. The higher the value of this field, the higher the priority of the current IPv6 extended header during transmission, and the more network resources it can obtain. For example, a Priority-Type of 0x0063 indicates high priority, and 0x0000 indicates low priority.
[0075] Furthermore, by encapsulating application service information in the hop-by-hop option header of the IPv6 extension header, the Virtual LAN (VLAN) label is converted into information at the Application Aware Network Identity (APN-ID) layer. This solves the problem that the information of the VLAN label is only used during identification, but is not fully utilized when encapsulated into the Application Aware Network Identity (APN-ID) layer of the hop-by-hop option header.
[0076] Step 104: Identify the application service information in the option headers of the public backbone network, and configure network resources according to the application service information.
[0077] In this step, network resources are rationally allocated based on the content of application service information, enabling precise control and management of application service information, thereby improving the quality and efficiency of network services.
[0078] The above scheme acquires traffic packets, calculates hash values using a hash algorithm based on the dual-layer VLAN tags marked on the traffic packets, obtains the hash value calculation result, queries the pre-stored hash mapping table for the application service information corresponding to the hash value calculation result, and then encapsulates the retrieved application service information in the hop-by-hop option header of a pre-formatted extended IPv6 packet header. It then identifies the application service information in each option header within the public backbone network and configures network resources accordingly. This transforms the dual-layer VLAN tags marked on the traffic packets into information within the IPv6 extended packet header of the public backbone network, enabling the network to perceive application service information and thus distinguish it precisely, ultimately achieving the effect of rationally configuring network resources based on the content of the application service information.
[0079] In some embodiments, the dual-layer VLAN tag includes an inner VLAN tag and an outer VLAN tag, wherein the inner VLAN tag is encapsulated within the outer VLAN tag.
[0080] Step 102 includes:
[0081] Step 1021: Read the first virtual local area network identity identifier and the first priority information corresponding to the inner virtual local area network label from the inner virtual local area network label.
[0082] Step 1022: Read the second virtual LAN identity identifier and the second priority information corresponding to the outer virtual LAN label from the outer virtual LAN label.
[0083] Step 1023: Use preset splicing symbols to splice the first virtual LAN identity, the second virtual LAN identity, the first priority information and the second priority information to obtain the splicing result.
[0084] Step 1024: Calculate the hash value of the concatenation result using a hash algorithm to obtain the hash value calculation result.
[0085] In the above scheme, the two-layer VLAN tagging of traffic packets includes an inner VLAN tag (C-VLAN, customer-side tag) and an outer VLAN tag (S-VLAN, vendor-side tag).
[0086] From the inner VLAN tag, read the first VLAN ID (C-VLAN ID) and priority field information (i.e., first priority information). From the outer VLAN tag, read the second VLAN ID (S-VLAN ID) and priority field information (i.e., second priority information).
[0087] use" # The first virtual LAN identity, first priority information, second virtual LAN identity, and second priority information are concatenated using the preset concatenation symbol to obtain the concatenated field (i.e., the concatenation result). Then, the hash value of the concatenated field is calculated using the Secure Hash Algorithm 256-bit (SHA256) algorithm to obtain the hash value calculation result.
[0088] QinQ (Extended Virtual LAN Space) technology enables a data frame to carry two layers of VLAN tags, encapsulating the inner VLAN tag within the outer VLAN tag. This allows traffic packets to traverse the public backbone network with both layers of VLAN tags. QinQ technology is suitable for scenarios requiring communication between different VLANs. It allows for nesting VLANs within a single VLAN, thereby improving network flexibility and scalability.
[0089] Furthermore, multiple independent video surveillance systems can run simultaneously within a single physical network, each corresponding to a virtual local area network (VLAN). Using QinQ technology, each inner VLAN can be encapsulated within an outer VLAN, thereby achieving isolation and protection between different video surveillance systems.
[0090] In some embodiments, the hash value calculation result includes the source media access control address and first priority information corresponding to the inner virtual LAN label, the second virtual LAN identity identifier and second priority information corresponding to the outer virtual LAN label, and the application service information includes the flow identifier and / or the user identifier and / or the quality of service requirement identifier.
[0091] Step 103 includes:
[0092] Step 1031: Query the stream identifier corresponding to the source media access control address from the first mapping table in the hash mapping table. The first mapping table represents the correspondence between each source media access control address and the stream identifier.
[0093] Step 1032: Query the user identifier corresponding to the second virtual local area network (VLAN) identity identifier from the second mapping relationship table in the hash mapping table. The second mapping relationship table represents the correspondence between each VLAN identity identifier and the user identifier.
[0094] Step 1033: From the third mapping relationship table in the hash mapping table, query the first service quality requirement identifier corresponding to the first priority information, and query the second service quality requirement identifier corresponding to the second priority information. Use the first service quality requirement identifier and the second service quality requirement identifier as service quality requirement identifiers. The third mapping relationship table represents the correspondence between each first priority information and each second priority information and the service quality requirement identifier.
[0095] In the above scheme, the hash value calculation result includes the source media access control address (source MAC address) and first priority information corresponding to the inner virtual LAN label, and the second virtual LAN identity and second priority information corresponding to the outer virtual LAN label.
[0096] Hash mapping tables are stored in the switches of the public backbone network. The hash mapping tables store the mapping relationship between the information in the virtual LAN tags and the application service information, including the first mapping table, the second mapping table, and the third mapping table.
[0097] The first mapping table stores the mapping relationship between the source media access control address and the flow-type in the inner VLAN tag; the second mapping table stores the mapping relationship between the second VLAN ID field and the user-type in the outer VLAN tag; and the third mapping table stores the mapping relationship between the priority field (i.e., the first priority information) in the inner VLAN tag and the priority field (i.e., the second priority information) in the outer VLAN tag and the quality of service requirement identifier (priority-type).
[0098] The application service information corresponding to the double-layer label (inner VLAN label and outer VLAN label) carried in the traffic packet is looked up in the hash mapping table. Specifically, the flow identifier corresponding to the source media access control address in the inner VLAN label is retrieved from the first mapping table.
[0099] Retrieve the user identifier corresponding to the second virtual LAN identity identifier in the outer virtual LAN label from the second mapping table;
[0100] The third mapping table is used to query the first service quality requirement identifier corresponding to the first priority information in the inner VLAN tag, and the second service quality requirement identifier corresponding to the second priority information in the outer VLAN tag. The first and second service quality requirement identifiers are then used as the service quality requirement identifier. For example, if the first priority information in the inner VLAN tag is 6 and the second priority information in the outer VLAN tag is 3, then the service quality requirement identifier is 63.
[0101] Application service information includes flow identifiers and / or user identifiers and / or quality of service requirement identifiers, which enables the application service information corresponding to the hash calculation result to be retrieved from the hash mapping table. This allows the network to perceive the application service information and thus distinguish it in a fine manner.
[0102] In some embodiments, the type of the flow identifier includes a first flow identifier type and a second flow identifier type, wherein the first flow identifier type is used to indicate that the traffic packet is a video stream originating from a video surveillance device, and the second flow identifier type is used to indicate that the traffic packet is a command stream originating from a terminal device;
[0103] The user identifier type includes a first user identifier type and a second user identifier type. The first user identifier type is used to indicate that the sending account of the traffic packet is a first type account, and the second user identifier type is used to indicate that the sending account of the traffic packet is a second type account.
[0104] The value corresponding to the quality of service requirement identifier is used to indicate the priority of the traffic packet transmission.
[0105] In the above scheme, for example, when the type of the flow identifier is 0x01 (i.e., the first flow identifier type), it indicates that the traffic packet is a video stream from a video surveillance device.
[0106] When the flow identifier type is 0x02 (i.e., the second flow identifier type), it indicates that the flow packet is a command flow from the terminal device.
[0107] When the user identifier type is 0x01 (i.e., the first user identifier type), it indicates that the account sending the traffic packet is a regular account (i.e., the first type account).
[0108] When the user identifier type is 0x02 (i.e., the second user identifier type), it indicates that the account sending the traffic packet is a premium (VIP) account (i.e., the second type account).
[0109] If a traffic packet has a service quality requirement identifier of 63 and another traffic packet has a service quality requirement identifier of 00, then the traffic packet with a service quality requirement identifier of 63 has a high transmission priority, and the other traffic packet with a service quality requirement identifier of 00 has a low transmission priority.
[0110] In some embodiments, step 104 includes:
[0111] Step 1041: Configure network resources according to the type of the flow identifier. And / or,
[0112] Step 1042: Configure network resources according to the type of the user identifier. And / or,
[0113] Step 1043: Configure network resources according to the value corresponding to the service quality requirement identifier.
[0114] In the above scheme, network resources are rationally allocated based on the type of flow identifier, and / or based on the type of user identifier, and based on the value of the service quality requirement identifier.
[0115] In some embodiments, step 1041 includes:
[0116] Step 10411: In response to determining that the type of the flow identifier is the first flow identifier type, configure network resources within a preset bandwidth range. Alternatively,
[0117] Step 10412: In response to determining that the type of the flow identifier is the second flow identifier type, network resources with a latency within a preset range are configured.
[0118] In the above scheme, if the type of the flow identifier is 0x01 (i.e., the first flow identifier type), it means that the traffic packet is a video stream from a video surveillance device, and then high bandwidth network resources higher than the preset bandwidth threshold are configured.
[0119] If the flow identifier type is 0x02 (i.e., the second flow identifier type), it indicates that the traffic packet is a command flow from the terminal device, and low-latency network resources below the preset latency threshold are configured.
[0120] In some embodiments, step 1042 includes:
[0121] Step 10421: In response to determining that the type of the user identifier is the first user identifier type, configure preset network resources corresponding to the first type of account. Alternatively,
[0122] Step 10422: In response to determining that the type of the user identifier is the second user identifier type, configure the preset network resources corresponding to the second type of account.
[0123] In the above scheme, if the user identifier type is 0x01 (i.e., the first user identifier type), it indicates that the account sending the traffic packet is a regular account (i.e., the first type account), and then the network resources corresponding to the regular account are configured.
[0124] If the user identifier type is 0x02 (i.e., the second user identifier type), it means that the account sending the traffic packet is a premium (VIP) account (i.e., the second type account), and then the network resources corresponding to the premium account are configured.
[0125] In some embodiments, step 1043 includes:
[0126] Step 10431: In response to determining that the value corresponding to the Quality of Service (QoS) requirement identifier is greater than the values of other QoS requirement identifiers corresponding to other traffic packets, the traffic packet corresponding to the QoS requirement identifier is transmitted with high priority. Alternatively,
[0127] Step 10432: In response to determining that the value corresponding to the Quality of Service (QoS) requirement identifier is less than the value of other QoS requirement identifiers corresponding to other traffic packets, the traffic packet corresponding to the QoS requirement identifier is transmitted according to the lower priority. Alternatively,
[0128] Step 10433: In response to determining that the value corresponding to the quality of service requirement identifier is equal to the value of the other quality of service requirement identifier corresponding to other traffic packets, the traffic packets corresponding to the quality of service requirement identifier and the other traffic packets corresponding to the other quality of service requirement identifier are transmitted simultaneously.
[0129] In the above scheme, if the value of the service quality requirement identifier is greater than the value of the other service quality requirement identifier corresponding to other traffic packets, then the traffic packets with the larger value of the other service quality requirement identifier corresponding to other traffic packets will be transmitted first.
[0130] If the value corresponding to the Quality of Service Requirement (QoS) identifier is less than the value of the QoS identifier corresponding to other traffic packets, then the other traffic packets corresponding to the QoS identifiers will be transmitted first, and then the traffic packets with the smaller QoS identifier value will be transmitted.
[0131] If the value corresponding to the QoS requirement identifier is equal to the value of the other QoS requirement identifier corresponding to other traffic packets, then the traffic packet corresponding to the QoS requirement identifier can be transmitted simultaneously with other traffic packets corresponding to the other QoS requirement identifier.
[0132] It should be noted that the method in this embodiment can be executed by a single device, such as a computer or server. The method can also be applied in a distributed scenario, where multiple devices cooperate to complete the task. In such a distributed scenario, one of these devices may execute only one or more steps of the method in this embodiment, and the multiple devices will interact with each other to complete the method described.
[0133] It should be noted that the above description describes some embodiments of this application. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in a different order than that shown in the above embodiments and still achieve the desired result. Furthermore, the processes depicted in the drawings do not necessarily require a specific or sequential order to achieve the desired result. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0134] Based on the same inventive concept, corresponding to any of the above embodiments, this application also provides a network resource configuration device for a video surveillance system.
[0135] refer to Figure 3 The network resource configuration device of the video surveillance system includes:
[0136] Traffic packet acquisition module 301 is configured to acquire traffic packets, the traffic packets including a two-layer virtual local area network label;
[0137] The hash value calculation module 302 is configured to perform hash value calculation based on the dual-layer virtual local area network label using a hash algorithm to obtain the hash value calculation result.
[0138] The mapping query module 303 is configured to query the application service information corresponding to the hash value calculation result from the pre-stored hash mapping table based on the hash value calculation result, and encapsulate the application service information in the hop-by-hop option header of the pre-formatted IPv6 extended packet header;
[0139] The network resource configuration module 304 is configured to identify the application service information in the hop-by-hop option header of the public backbone network and configure network resources according to the application service information.
[0140] In some embodiments, the dual-layer virtual LAN label includes an inner virtual LAN label and an outer virtual LAN label, wherein the inner virtual LAN label is encapsulated within the outer virtual LAN label;
[0141] The hash value calculation module 302 is specifically configured as follows:
[0142] From the inner virtual local area network (VLAN) tag, read the first VLAN identity identifier and the first priority information corresponding to the inner VLAN tag, respectively;
[0143] From the outer virtual LAN label, read the second virtual LAN identity identifier corresponding to the outer virtual LAN label and the second priority information corresponding to the outer LAN label respectively;
[0144] The first virtual LAN identity, the second virtual LAN identity, the first priority information, and the second priority information are concatenated using preset concatenation symbols to obtain the concatenation result;
[0145] The concatenated result is subjected to a hash algorithm to calculate a hash value, and the hash value calculation result is obtained.
[0146] In some embodiments, the hash value calculation result includes the source media access control address and first priority information corresponding to the inner virtual local area network label, the second virtual local area network identity identifier and second priority information corresponding to the outer virtual local area network label, and the application service information includes the flow identifier and / or the user identifier and / or the quality of service requirement identifier;
[0147] The mapping query module 303 is specifically configured as follows:
[0148] From the first mapping table in the hash mapping table, query the stream identifier corresponding to the source media access control address. The first mapping table represents the correspondence between each source media access control address and the stream identifier.
[0149] From the second mapping relationship table in the hash mapping table, query the user identifier corresponding to the second virtual local area network identity identifier. The second relationship mapping table represents the correspondence between each second virtual local area network identity identifier and the user identifier.
[0150] From the third mapping table in the hash mapping table, query the first service quality requirement identifier corresponding to the first priority information, and query the second service quality requirement identifier corresponding to the second priority information. Use the first service quality requirement identifier and the second service quality requirement identifier as service quality requirement identifiers. The third mapping table represents the correspondence between each first priority information and each second priority information and the service quality requirement identifier.
[0151] In some embodiments, the type of the flow identifier includes a first flow identifier type and a second flow identifier type, wherein the first flow identifier type is used to indicate that the traffic packet is a video stream originating from a video surveillance device, and the second flow identifier type is used to indicate that the traffic packet is a command stream originating from a terminal device;
[0152] The user identifier type includes a first user identifier type and a second user identifier type. The first user identifier type is used to indicate that the sending account of the traffic packet is a first type account, and the second user identifier type is used to indicate that the sending account of the traffic packet is a second type account.
[0153] The value corresponding to the quality of service requirement identifier is used to indicate the priority of the traffic packet transmission.
[0154] In some embodiments, the network resource configuration module 304 includes:
[0155] The first configuration unit is configured to configure network resources according to the type of the flow identifier; and / or,
[0156] The second configuration unit is configured to configure network resources according to the type of the user identifier; and / or,
[0157] The third configuration unit is configured to configure network resources according to the value corresponding to the quality of service requirement identifier.
[0158] In some embodiments, the first configuration unit is specifically configured as follows:
[0159] In response to determining that the type of the flow identifier is the first flow identifier type, network resources within a preset bandwidth range are configured; or,
[0160] In response to determining that the type of the flow identifier is the second flow identifier type, network resources with a latency within a preset range are configured.
[0161] In some embodiments, the second configuration unit is specifically configured as follows:
[0162] In response to determining that the user identifier is of the first user identifier type, pre-defined network resources corresponding to the first type of account are configured; or,
[0163] In response to determining that the user identifier is of the second user identifier type, preset network resources corresponding to the second type of account are configured.
[0164] In some embodiments, the third configuration unit is specifically configured as follows:
[0165] In response to determining that the value corresponding to the service quality requirement identifier is greater than the value of other service quality requirement identifiers corresponding to other traffic packets, the traffic packet corresponding to the service quality requirement identifier is transmitted with high priority; or,
[0166] In response to determining that the value corresponding to the service quality requirement identifier is less than the value of other service quality requirement identifiers corresponding to other traffic packets, the traffic packet corresponding to the service quality requirement identifier is transmitted with low priority; or,
[0167] In response to determining that the value corresponding to the quality of service requirement identifier is equal to the value of the other quality of service requirement identifier corresponding to other traffic packets, the traffic packet corresponding to the quality of service requirement identifier and the other traffic packets corresponding to the other quality of service requirement identifier are transmitted simultaneously.
[0168] For ease of description, the above devices are described in terms of function, divided into various modules. Of course, in implementing this application, the functions of each module can be implemented in one or more software and / or hardware.
[0169] The apparatus described above is used to implement the network resource configuration method of the corresponding video surveillance system in any of the foregoing embodiments, and has the beneficial effects of the corresponding method embodiments, which will not be repeated here.
[0170] Based on the same inventive concept, corresponding to the methods of any of the above embodiments, this application also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the network resource configuration method of the video surveillance system described in any of the above embodiments.
[0171] Figure 4 This illustration shows a more specific hardware structure diagram of an electronic device provided in this embodiment. The device may include: a processor 401, a memory 402, an input / output interface 403, a communication interface 404, and a bus 405. The processor 401, memory 402, input / output interface 403, and communication interface 404 are interconnected internally via the bus 405.
[0172] The processor 401 can be implemented using a general-purpose CPU (Central Processing Unit), microprocessor, application-specific integrated circuit (ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of this specification.
[0173] The memory 402 can be implemented in the form of ROM (Read Only Memory), RAM (Random Access Memory), static storage device, dynamic storage device, etc. The memory 402 can store the operating system and other applications. When the technical solutions provided in the embodiments of this specification are implemented by software or firmware, the relevant program code is stored in the memory 402 and is called and executed by the processor 401.
[0174] Input / output interface 403 is used to connect input / output modules to realize information input and output. Input / output modules can be configured as components in the device (not shown in the figure) or externally connected to the device to provide corresponding functions. Input devices may include keyboards, mice, touch screens, microphones, various sensors, etc., and output devices may include displays, speakers, vibrators, indicator lights, etc.
[0175] Communication interface 404 is used to connect a communication module (not shown in the figure) to enable communication between this device and other devices. The communication module can communicate via wired means (such as USB, Ethernet cable, etc.) or wireless means (such as mobile network, WIFI, Bluetooth, etc.).
[0176] Bus 405 includes a pathway for transmitting information between various components of the device (e.g., processor 401, memory 402, input / output interface 403, and communication interface 404).
[0177] It should be noted that although the above-described device only shows the processor 401, memory 402, input / output interface 403, communication interface 404, and bus 405, in specific implementations, the device may also include other components necessary for normal operation. Furthermore, those skilled in the art will understand that the above-described device may only include the components necessary for implementing the embodiments of this specification, and not necessarily all the components shown in the figures.
[0178] The electronic devices described above are used to implement the network resource configuration method of the corresponding video surveillance system in any of the foregoing embodiments, and have the beneficial effects of the corresponding method embodiments, which will not be repeated here.
[0179] Based on the same inventive concept, corresponding to the methods of any of the above embodiments, this application also provides a non-transitory computer-readable storage medium that stores computer instructions for causing the computer to execute the network resource configuration method of the video surveillance system as described in any of the above embodiments.
[0180] The computer-readable medium of this embodiment includes permanent and non-permanent, removable and non-removable media, and information storage can be implemented by any method or technology. Information can be computer-readable instructions, data structures, program modules, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, magnetic magnetic disk storage or other magnetic storage devices, or any other non-transfer medium that can be used to store information accessible by a computing device.
[0181] The computer instructions stored in the storage medium of the above embodiments are used to cause the computer to execute the network resource configuration method of the video surveillance system as described in any of the above embodiments, and have the beneficial effects of the corresponding method embodiments, which will not be repeated here.
[0182] Those skilled in the art should understand that the discussion of any of the above embodiments is merely exemplary and is not intended to imply that the scope of this application (including the claims) is limited to these examples; within the framework of this application, the technical features of the above embodiments or different embodiments can also be combined, the steps can be implemented in any order, and there are many other variations of different aspects of the embodiments of this application as described above, which are not provided in the details for the sake of brevity.
[0183] Additionally, to simplify the description and discussion, and to avoid obscuring the embodiments of this application, the well-known power / ground connections to integrated circuit (IC) chips and other components may or may not be shown in the provided drawings. Furthermore, the apparatus may be shown in block diagram form to avoid obscuring the embodiments of this application, and this also takes into account the fact that the details of the implementation of these block diagram apparatuses are highly dependent on the platform on which the embodiments of this application will be implemented (i.e., these details should be fully understood by those skilled in the art). While specific details (e.g., circuits) have been set forth to describe exemplary embodiments of this application, it will be apparent to those skilled in the art that the embodiments of this application can be implemented without these specific details or with variations thereof. Therefore, these descriptions should be considered illustrative rather than restrictive.
[0184] Although this application has been described in conjunction with specific embodiments thereof, many substitutions, modifications, and variations of these embodiments will be apparent to those skilled in the art from the foregoing description. For example, other memory architectures (e.g., dynamic RAM (DRAM)) may be used with the embodiments discussed.
[0185] The embodiments of this application are intended to cover all such substitutions, modifications, and variations that fall within the broad scope of the appended claims. Therefore, any omissions, modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the embodiments of this application should be included within the protection scope of this application.
Claims
1. A method for configuring network resources in a video surveillance system, characterized in that, include: Acquire traffic packets, the traffic packets including dual-layer virtual local area network (VLAN) labels, the dual-layer VLAN labels including an inner VLAN label and an outer VLAN label, wherein the inner VLAN label is encapsulated in the outer VLAN label; From the inner VLAN tag, the source media access control address and the first priority information corresponding to the inner VLAN tag are read respectively; from the outer VLAN tag, the second VLAN ID and the second priority information corresponding to the outer VLAN tag are read respectively; the source media access control address, the second VLAN ID, the first priority information, and the second priority information are concatenated using a preset concatenation symbol to obtain a concatenation result; the concatenation result is then hashed using a hash algorithm to obtain a hash value calculation result. Based on the hash value calculation result, query the application service information corresponding to the hash value calculation result from the pre-stored hash mapping table, and encapsulate the application service information in the hop-by-hop option header of the pre-formatted IPv6 extended packet header; Identify the application service information in the hop-by-hop option header of the public backbone network, and configure network resources based on the application service information.
2. The method according to claim 1, characterized in that, The hash value calculation result includes the source media access control address and first priority information corresponding to the inner virtual local area network label, the second virtual local area network identity and second priority information corresponding to the outer virtual local area network label, and the application service information includes the flow identifier and / or user identifier and / or service quality requirement identifier. The step of retrieving application business information corresponding to the hash value calculation result from a pre-stored hash mapping table based on the hash value calculation result includes: From the first mapping table in the hash mapping table, query the stream identifier corresponding to the source media access control address. The first mapping table represents the correspondence between each source media access control address and the stream identifier. From the second mapping table in the hash mapping table, query the user identifier corresponding to the second virtual local area network identity identifier. The second mapping table represents the correspondence between each second virtual local area network identity identifier and the user identifier. From the third mapping table in the hash mapping table, query the first service quality requirement identifier corresponding to the first priority information, and query the second service quality requirement identifier corresponding to the second priority information. Use the first service quality requirement identifier and the second service quality requirement identifier as service quality requirement identifiers. The third mapping table represents the correspondence between each first priority information and each second priority information and the service quality requirement identifier.
3. The method according to claim 2, characterized in that, The type of the flow identifier includes a first flow identifier type and a second flow identifier type. The first flow identifier type is used to indicate that the traffic packet is a video stream originating from a video surveillance device, and the second flow identifier type is used to indicate that the traffic packet is a command stream originating from a terminal device. The user identifier type includes a first user identifier type and a second user identifier type. The first user identifier type is used to indicate that the sending account of the traffic packet is a first type account, and the second user identifier type is used to indicate that the sending account of the traffic packet is a second type account. The value corresponding to the quality of service requirement identifier is used to indicate the priority of the traffic packet transmission.
4. The method according to claim 3, characterized in that, The configuration of network resources based on the application service information includes: Configure network resources according to the type of the flow identifier; and / or, Configure network resources according to the type of the user identifier; and / or, Network resources are configured based on the value corresponding to the service quality requirements.
5. The method according to claim 4, characterized in that, The process of configuring network resources based on the type of the flow identifier includes: In response to determining that the type of the flow identifier is the first flow identifier type, network resources within a preset bandwidth range are configured; or, In response to determining that the type of the flow identifier is the second flow identifier type, network resources with a latency within a preset range are configured.
6. The method according to claim 4, characterized in that, The process of configuring network resources based on the type of the user identifier includes: In response to determining that the user identifier is of the first user identifier type, pre-defined network resources corresponding to the first type of account are configured; or, In response to determining that the user identifier is of the second user identifier type, preset network resources corresponding to the second type of account are configured.
7. The method according to claim 4, characterized in that, The process of configuring network resources based on the value corresponding to the service quality requirement identifier includes: In response to determining that the value corresponding to the service quality requirement identifier is greater than the value of other service quality requirement identifiers corresponding to other traffic packets, the traffic packet corresponding to the service quality requirement identifier is transmitted with high priority; or, In response to determining that the value corresponding to the service quality requirement identifier is less than the value of other service quality requirement identifiers corresponding to other traffic packets, the traffic packet corresponding to the service quality requirement identifier is transmitted with low priority; or, In response to determining that the value corresponding to the quality of service requirement identifier is equal to the value of the other quality of service requirement identifier corresponding to other traffic packets, the traffic packet corresponding to the quality of service requirement identifier and the other traffic packets corresponding to the other quality of service requirement identifier are transmitted simultaneously.
8. A network resource configuration device for a video surveillance system, characterized in that, include: The traffic packet acquisition module is configured to acquire traffic packets, the traffic packets including a two-layer virtual local area network (VLAN) label, the two-layer VLAN label including an inner VLAN label and an outer VLAN label, wherein the inner VLAN label is encapsulated in the outer VLAN label; The hash value calculation module is configured to read the source media access control address and the first priority information corresponding to the inner virtual local area network (VLAN) tag from the inner VLAN tag; and to read the second VLAN identity and the second priority information corresponding to the outer VLAN tag from the outer VLAN tag. The module then concatenates the source media access control address, the second VLAN identity, the first priority information, and the second priority information using a preset concatenation symbol to obtain a concatenation result. Finally, the module calculates the hash value of the concatenation result using a hash algorithm to obtain the hash value calculation result. The mapping query module is configured to query the application service information corresponding to the hash value calculation result from a pre-stored hash mapping table based on the hash value calculation result, and encapsulate the application service information in the hop-by-hop option header of the pre-formatted IPv6 extended packet header; The network resource configuration module is configured to identify application service information in the hop-by-hop option header of a public backbone network and configure network resources based on the application service information.
9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the method as described in any one of claims 1 to 7.