Channel Determination Method, Transmission Selection Module, and Control System for Communication Testing
By determining the coefficients of data packet parameters, gateway equipment and channel information, and dynamically selecting the channel, the problem of slow transmission speed and low efficiency caused by the gateway's inability to adjust the channel is solved, and efficient data transmission and accurate test results are achieved.
Patent Information
- Application Number
- CN202310675391.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-06-07
- Publication Date
- 2025-08-05
- Estimated Expiration
- 2043-06-07
AI Technical Summary
Existing gateways cannot dynamically adjust the channel of data transmission based on channel environment information, resulting in slow data transmission speed and low communication efficiency.
By determining the first, second and third coefficients based on the packet parameter information, the target gateway device information and the available channel information, the target available channel is dynamically selected, and the data packet is sent based on the channel.
It realizes efficient transmission of data packets, reduces the impact of communication process on test results, and improves the accuracy of communication test results of distribution gateways.
Smart Images

Figure CN116599915B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of power distribution gateways, and in particular to a channel determination method, a transmission selection module, a computer-readable storage medium, an electronic device, and a control system for communication testing. Background Art
[0002] An edge gateway / smart gateway is an intelligent device that integrates functions such as power supply and consumption information collection, data collection from various collection terminals, equipment status monitoring and communication networking, local analysis and decision-making, and collaborative computing. This edge gateway / smart gateway utilizes container technology, hardware platformization, software-based functions, modular structure, hardware and software decoupling, and adaptive communication protocol design. It not only provides edge computing capabilities but also meets the requirements of high-performance concurrency, large-capacity storage, and multiple collection objects. This is a brand-new device with a brand-new architecture and powerful functionality, achieving software-defined hardware capabilities.
[0003] However, most current gateways communicate according to preset channels and cannot be adjusted according to actual conditions, resulting in low communication efficiency, which in turn affects the test results of the gateway. Summary of the Invention
[0004] The main purpose of the present application is to provide a channel determination method, a transmission selection module, a computer-readable storage medium, an electronic device, and a control system for communication testing, so as to at least solve the problem in the prior art that the gateway cannot dynamically adjust the channel for transmitting data according to channel environment information, resulting in slow data transmission speed and low communication efficiency.
[0005] To achieve the above-mentioned purpose, according to one aspect of the present application, a channel determination method is provided, comprising: determining a first coefficient based on received data packet parameter information, wherein the data packet parameter information includes the data length and storage capacity of the data packet; determining a second coefficient based on device information of a target gateway, and determining multiple third coefficients based on channel information of each currently available channel of the target gateway, wherein the device information includes the chip memory, software version information, and transmission speed of the target gateway, and the channel information includes channel occupancy, signal-to-noise ratio, and channel capacity, and the target gateway is used to transmit the data packet; determining a target available channel based on the first coefficient, the second coefficient, and each of the third coefficients, and sending the data packet to the cloud based on the target available channel.
[0006] Optionally, based on the received data packet parameter information, a first coefficient is determined, including: obtaining a first ratio based on the ratio of the standard data length to the data length, and obtaining a second ratio based on the ratio of the standard storage capacity to the storage capacity; and obtaining the first coefficient based on the product of the first ratio and the second ratio.
[0007] Optionally, based on the device information of the target gateway, the second coefficient is determined, including: obtaining a third ratio based on the ratio of the chip memory to the standard chip memory, obtaining a fourth ratio based on the ratio of the software version information to the standard software version information, and obtaining a fifth ratio based on the ratio of the transmission speed to the standard transmission speed; and obtaining the second coefficient based on the product of the third ratio, the fourth ratio and the fifth ratio.
[0008] Optionally, based on the channel information of each currently available channel of the target gateway, multiple third coefficients are determined, including: obtaining a sixth ratio based on the ratio of the signal-to-noise ratio of each available channel to the standard signal-to-noise ratio, obtaining a seventh ratio based on the ratio of the channel capacity of each available channel to the standard channel capacity, and obtaining an eighth ratio based on the ratio of the channel occupancy of each available channel to the standard channel occupancy; obtaining a first target product based on the product of the sixth ratio and the seventh ratio of each available channel, and obtaining multiple third coefficients based on the ratio of the first target product of each available channel to the eighth ratio.
[0009] Optionally, based on the first coefficient, the second coefficient and each of the third coefficients, the target available channel is determined, including: determining the product of the third coefficient of each of the available channels and the first coefficient to obtain multiple second target products, and determining the product of the third coefficient of each of the available channels and the second coefficient to obtain multiple third target products; determining the sum of the second target product and the third target product of each of the available channels to obtain a target value, and determining the ratio of the target value of each of the available channels to the corresponding sum of the first coefficient and the second coefficient to obtain multiple ninth ratios; determining the available channel corresponding to the largest ninth ratio as the target available channel.
[0010] Optionally, in the case where there are multiple largest ninth ratios, the available channel corresponding to the largest ninth ratio is determined as the target available channel, including: determining whether the first coefficient, the second coefficient and the third coefficient corresponding to each largest ninth ratio exceed the corresponding preset threshold; and determining the available channel corresponding to the largest ninth ratio in which the first coefficient, the second coefficient and the third coefficient all exceed the corresponding preset threshold and the largest value that exceeds the corresponding preset threshold the most as the target available channel.
[0011] Optionally, the data information carried by the data packet includes at least one of the following: environmental security data, electrical control data, video data, equipment monitoring data, and power quality data. The environmental security data includes water immersion data, fire data, access control data, burglar alarm data, SF6 and O2 detection data, temperature and humidity data, and smoke data. The electrical control data includes dehumidifier data, exhaust fan data, air conditioning data, lighting control data, and IO control data. The video data includes dome camera data and gun camera data. The equipment monitoring data includes local monitoring data, cable temperature measurement data, and transformer overtemperature data. The power quality data includes reactive compensation data, harmonic control data, and low-voltage line measurement data.
[0012] Optionally, the process of determining the data packet based on the data information includes: classifying the data information according to a classification standard to obtain multiple sub-data information, the classification standard includes one of the following: the time period for data information collection, the data type of the data information, and the device type corresponding to the data information; converting the format of each sub-data information and the corresponding type information into a target format to obtain each sub-data information and the corresponding type information after format conversion, the target format includes one of the following: XML format, JSON format, YAML format; storing and compressing each sub-data information and the corresponding type information after format conversion in the form of an index table to obtain the data packet.
[0013] According to another aspect of the present application, a transmission selection module is provided, which is used to: determine a first coefficient based on received data packet parameter information, the data packet parameter information including the data length and storage capacity of the data packet; determine a second coefficient based on device information of a target gateway, and determine multiple third coefficients based on channel information of each currently available channel of the target gateway, the device information including the chip memory, software version information and transmission speed of the target gateway, the channel information including channel occupancy, signal-to-noise ratio and channel capacity, and the target gateway is used to transmit the data packet; determine a target available channel based on the first coefficient, the second coefficient and each of the third coefficients, and send the data packet to the cloud based on the target available channel.
[0014] According to another aspect of the present application, a computer-readable storage medium is provided, wherein the computer-readable storage medium includes a stored program, wherein when the program is executed, the device where the computer-readable storage medium is located is controlled to execute any one of the channel determination methods.
[0015] According to another aspect of the present application, an electronic device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor is configured to execute any one of the channel determination methods through the computer program.
[0016] According to one aspect of the present application, a control system for communication testing is provided, comprising: a gateway module, the gateway module comprising a target gateway, the target gateway being used to transmit data packets; a transmission selection module, communicating with the gateway module, for executing any one of the channel determination methods; and a cloud, communicating with the transmission selection module, for receiving the data packets forwarded by the transmission selection module.
[0017] By applying the technical solution of the present application, a first coefficient is determined based on the data packet parameter information of the data packet, a second coefficient is determined based on the device information of the target gateway for transmitting the data packet, and a third coefficient of each available channel is determined based on the channel information of each available information of the target gateway for transmitting the data packet; and then a target available channel is determined based on the first coefficient and the second coefficient and each third coefficient. In other words, based on the device information of the target gateway and the channel information of each available channel, as well as the data packet parameter information of the data packet, a target available channel with better communication quality is determined, and then the data packet is sent to the cloud based on the target available channel. In this way, the available channel for transmitting the data packet is dynamically selected, which ensures a high transmission efficiency of the data packet, reduces the impact of the communication process on the test results, and improves the accuracy of the communication test results of the distribution gateway, thereby solving the problem in the prior art that the gateway cannot dynamically adjust the channel for transmitting data according to the channel environment information, resulting in slow data transmission speed and low communication efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] The drawings that constitute part of this application are used to provide a further understanding of this application. The illustrative embodiments of this application and their descriptions are used to explain this application and do not constitute an improper limitation on this application. In the drawings:
[0019] Figure 1 A hardware structure block diagram of a mobile terminal for executing a channel determination method provided in an embodiment of the present application is shown;
[0020] Figure 2 A schematic flow chart of a method for determining a channel according to an embodiment of the present application is shown;
[0021] Figure 3 A schematic structural diagram of a control system for communication testing provided in accordance with an embodiment of the present application is shown;
[0022] Figure 4The figure shows an architecture diagram of a control system for communication testing provided according to an embodiment of the present application.
[0023] The above drawings include the following reference numerals:
[0024] 102. Processor; 104. Memory; 106. Transmission device; 108. Input / output device; 10. Data perception module; 20. Gateway module; 30. Packaging module; 40. Transmission selection module; 50. Cloud. DETAILED DESCRIPTION
[0025] It should be noted that, in the absence of conflict, the embodiments and features of the embodiments in this application can be combined with each other. The present application will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.
[0026] In order to enable those skilled in the art to better understand the present invention, the following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments in the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts should fall within the scope of protection of this application.
[0027] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequential order. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present application described here. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0028] As introduced in the background technology, the gateway in the prior art is unable to dynamically adjust the channel for transmitting data according to the channel environment information, resulting in slow data transmission speed and low communication efficiency. To solve the above problems, the embodiments of the present application provide a channel determination method, a transmission selection module, a computer-readable storage medium, an electronic device and a control system for communication testing.
[0029] The technical solutions in the embodiments of the present invention will be described clearly and completely below with reference to the accompanying drawings in the embodiments of the present invention.
[0030] The method embodiments provided in the embodiments of the present application can be executed in a mobile terminal, a computer terminal or a similar computing device. Taking running on a mobile terminal as an example, Figure 1 FIG. 1 is a hardware structure block diagram of a mobile terminal according to a method for determining a channel according to an embodiment of the present invention. Figure 1 As shown, the mobile terminal may include one or more ( Figure 1 Only one is shown) a processor 102 (the processor 102 may include but is not limited to a microprocessor MCU or a programmable logic device FPGA and other processing devices) and a memory 104 for storing data, wherein the mobile terminal may also include a transmission device 106 and an input and output device 108 for communication functions. It will be understood by those skilled in the art that Figure 1 The structure shown is only for illustration and does not limit the structure of the mobile terminal. Figure 1 More or fewer components than shown, or with Figure 1 Different configurations shown.
[0031] The memory 104 can be used to store computer programs, such as software programs and modules of application software, such as the computer program corresponding to the channel determination method in the embodiment of the present invention. The processor 102 executes the computer program stored in the memory 104 to execute various functional applications and data processing, thereby implementing the above-mentioned method. The memory 104 may include high-speed random access memory and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 104 may further include memory remotely located relative to the processor 102, and these remote memories can be connected to the mobile terminal via a network. Examples of such networks include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof. The transmission device 106 is used to receive or transmit data via a network. Specific examples of such networks may include a wireless network provided by the mobile terminal's telecommunications provider. In one example, the transmission device 106 includes a network interface controller (NIC), which can be connected to other network devices via a base station to enable communication with the Internet. In one example, the transmission device 106 may be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.
[0032] In this embodiment, a method for determining a channel running on a mobile terminal, a computer terminal or a similar computing device is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0033] Figure 2 FIG. 1 is a flow chart of a method for determining a channel according to an embodiment of the present application. Figure 2 As shown, the determination method includes the following steps:
[0034] Step S201, determining a first coefficient based on received data packet parameter information, wherein the data packet parameter information includes the data length and storage capacity of the data packet;
[0035] Specifically, the above-mentioned data packet parameter information may further include compression type information of the data packet, and the storage capacity of the above-mentioned data packet is the size of the data packet.
[0036] Step S202: determining a second coefficient based on device information of a target gateway, and determining a plurality of third coefficients based on channel information of each currently available channel of the target gateway, wherein the device information includes chip memory, software version information, and transmission speed of the target gateway, and the channel information includes channel occupancy, signal-to-noise ratio, and channel capacity. The target gateway is used to transmit the data packet;
[0037] In a specific embodiment of the present application, the software version information is the current software version information of the target gateway, and the transmission speed is the average transmission speed of the target gateway.
[0038] Step S203: Determine a target available channel based on the first coefficient, the second coefficient, and each of the third coefficients, and send the data packet to the cloud based on the target available channel.
[0039] Through this embodiment, the first coefficient is determined based on the data packet parameter information of the data packet, the second coefficient is determined based on the device information of the target gateway for transmitting the data packet, and the third coefficient of each available channel is determined based on the channel information of each available information of the target gateway for transmitting the data packet; and the target available channel is determined based on the first coefficient and the second coefficient and each third coefficient. In other words, based on the device information of the target gateway and the channel information of each available channel, as well as the data packet parameter information of the data packet, the target available channel with better communication quality is determined, and then the data packet is sent to the cloud based on the target available channel. In this way, the available channel for transmitting the data packet is dynamically selected, which ensures high transmission efficiency of the data packet, reduces the impact of the communication process on the test results, and improves the accuracy of the communication test results of the distribution gateway, thereby solving the problem of slow data transmission speed and low communication efficiency caused by the inability of the gateway in the prior art to dynamically adjust the channel for transmitting data according to the channel environment information.
[0040] It should be noted that the steps shown in the flowcharts of the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions, and that, although a logical order is shown in the flowcharts, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0041] In a specific implementation, step S201 can be implemented through steps S2011 and S2012. In step S2011, a first ratio is obtained based on the ratio of the standard data length to the data length, and a second ratio is obtained based on the ratio of the standard storage capacity to the storage capacity. In step S2012, the first coefficient is obtained based on the product of the first ratio and the second ratio. In other words, the first coefficient is inversely proportional to the data length and storage capacity of the data packet, respectively. That is, the first coefficient can be calculated as the ratio of the product of the standard data length and the standard storage capacity to the product of the data length and the storage capacity. This allows for a relatively simple determination of the first coefficient, further ensuring that the target available channel subsequently determined based on the first, second, and third coefficients is relatively accurate, further ensuring high data packet transmission efficiency.
[0042] Specifically, the above-mentioned standard data length and the above-mentioned standard storage capacity are both standard data length and storage capacity of data packets of the same type.
[0043] For the above embodiment, other relevant parameters of the data packet may be added according to different situations to determine the first coefficient.
[0044] In actual applications, experiments have shown that the second coefficient of the target gateway is proportional to the chip memory, software version information, and transmission speed of the target gateway. Therefore, in order to more simply obtain the second coefficient of the target gateway, the above-mentioned step S202 of the present application can be implemented through steps S2021 and S2022. In step S2021, a third ratio is obtained based on the ratio of the above-mentioned chip memory to the standard chip memory, a fourth ratio is obtained based on the ratio of the above-mentioned software version information to the standard software version information, and a fifth ratio is obtained based on the ratio of the above-mentioned transmission speed to the standard transmission speed. Step S2022 obtains the above-mentioned second coefficient based on the product of the third ratio, the fourth ratio, and the fifth ratio.
[0045] In a specific embodiment of the present application, when the standard chip memory of the target gateway is 128M, the standard software version information is 1.0, and the standard transmission speed of the target gateway is 100Byte, the current chip memory of the target gateway is represented as P, the current software version information is represented as Q, and the current transmission speed is represented as L, then the second coefficient can be represented as
[0046] Step S202 may also be implemented by steps S2023 and S2024. In step S2023, a sixth ratio is obtained based on the ratio of the signal-to-noise ratio of each of the available channels to the standard signal-to-noise ratio; a seventh ratio is obtained based on the ratio of the channel capacity of each of the available channels to the standard channel capacity; and an eighth ratio is obtained based on the ratio of the channel occupancy rate of each of the available channels to the standard channel occupancy rate. Step S2024 obtains a first target product based on the product of the sixth ratio and the seventh ratio of each of the available channels, and obtains a plurality of third coefficients based on the ratio of the first target product of each of the available channels to the eighth ratio. This allows for a relatively simple determination of the third coefficient, further ensuring that the target available channel subsequently determined based on the first coefficient, the second coefficient, and the third coefficient is relatively accurate, thereby further ensuring high data packet transmission efficiency.
[0047] Specifically, the channel occupancy rate is an average occupancy rate of the available channel within a preset period, and the signal-to-noise ratio is a signal-to-noise ratio of the available channel within a preset period.
[0048] In a specific embodiment of the present application, the channel occupancy of an available channel is represented as a1, the signal-to-noise ratio is represented as b1, and the channel capacity is represented as c1, and the standard channel occupancy of the target gateway is represented as a2, the standard signal-to-noise ratio is represented as b2, and the standard channel capacity is represented as c2, then the third coefficient of the available channel can be expressed as:
[0049]
[0050] In some embodiments, step S203 may be implemented through steps S2031, S2032, and S2033. Step S2031 includes determining the product of the third coefficient and the first coefficient for each of the available channels to obtain a plurality of second target products, and determining the product of the third coefficient and the second coefficient for each of the available channels to obtain a plurality of third target products; step S2032 includes determining the sum of the second target product and the third target product for each of the available channels to obtain a target value, and determining the ratio of the target value for each of the available channels to the corresponding sum of the first coefficient and the second coefficient to obtain a plurality of ninth ratios; and step S2033 includes determining the available channel corresponding to the largest ninth ratio as the target available channel.
[0051] Specifically, for a data packet, its first coefficient can be expressed as D; for the target gateway, its second coefficient can be expressed as E, and for each available channel in the target gateway, its third coefficient can be expressed as F i Then the product of the two objectives is D×F i , the third target product is E×F i Therefore, the target value is D×F i +E×F i , then the ninth ratio of each available channel is:
[0052]
[0053] Through the above calculation method, each available channel of the target gateway corresponds to a ninth ratio. Then, the available channel corresponding to the largest ninth ratio can be determined as the target available channel.
[0054] In actual applications, there may be multiple maximum ninth ratios. In this case, step S2032 may be implemented by determining whether the first coefficient, the second coefficient, and the third coefficient corresponding to each of the maximum ninth ratios exceed corresponding preset thresholds; and determining the available channel corresponding to the largest ninth ratio having the first coefficient, the second coefficient, and the third coefficient exceeding the corresponding preset threshold the most as the target available channel. This further enables the selection of target available channels with better communication quality, and further ensures higher efficiency of data packet transmission through the target available channels.
[0055] Specifically, for example, there are two largest ninth ratios, represented by the ninth ratio T1 and the ninth ratio T2. In other words, two target available channels can be determined. If the first coefficient, second coefficient, and third coefficient corresponding to the ninth ratio T1 all exceed their corresponding thresholds, and only the first and second coefficients of the first, second, and third coefficients corresponding to the ninth ratio T2 exceed their corresponding thresholds, in this case, the available channel corresponding to the ninth ratio T1 can be determined as the target available channel.
[0056] In a specific embodiment of the present application, the data information carried by the above-mentioned data packet includes at least one of the following: environmental security data, electrical control data, video data, equipment monitoring data, and power quality data. The above-mentioned environmental security data includes water immersion data, fire data, access control data, burglar alarm data, SF6 and O2 detection data, temperature and humidity data, and smoke data. The above-mentioned electrical control data includes dehumidifier data, exhaust fan data, air conditioning data, lighting control data, and IO control data. The above-mentioned video data includes dome camera data and gun camera data. The above-mentioned equipment monitoring data includes local monitoring data, cable temperature measurement data, and transformer overtemperature data. The above-mentioned power quality data includes reactive compensation data, harmonic control data, and low-voltage line measurement data.
[0057] In some embodiments, the process of determining the above-mentioned data packet based on the above-mentioned data information includes: classifying the above-mentioned data information according to a classification standard to obtain multiple sub-data information, and the above-mentioned classification standard includes one of the following: the time period for collecting the above-mentioned data information, the data type of the above-mentioned data information, and the device type corresponding to the above-mentioned data information; converting the format of each of the above-mentioned sub-data information and the corresponding type information into a target format to obtain each of the above-mentioned sub-data information and the corresponding type information after format conversion, and the above-mentioned target format includes one of the following: XML format, JSON format, YAML format; storing and compressing each of the above-mentioned sub-data information and the corresponding type information after format conversion in the form of an index table to obtain the above-mentioned data packet.
[0058] The embodiments of the present application also provide a transmission selection module. It should be noted that the transmission selection module of the embodiments of the present application can be used to execute the channel determination method provided in the embodiments of the present application. This device is used to implement the above-mentioned embodiments and preferred implementation methods, and the details that have been described will not be repeated here. As used below, the term "module" can be a combination of software and / or hardware that implements a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, implementation using hardware, or a combination of software and hardware, is also possible and contemplated.
[0059] The following describes the transmission selection module provided in the embodiment of the present application. The transmission selection module of the present application is used to:
[0060] Determining a first coefficient based on received data packet parameter information, wherein the data packet parameter information includes a data length and a storage capacity of the data packet;
[0061] Specifically, the above-mentioned data packet parameter information may further include compression type information of the data packet, and the storage capacity of the above-mentioned data packet is the size of the data packet.
[0062] Determining a second coefficient based on device information of a target gateway, and determining a plurality of third coefficients based on channel information of each currently available channel of the target gateway, wherein the device information includes chip memory, software version information, and transmission speed of the target gateway, and the channel information includes channel occupancy, signal-to-noise ratio, and channel capacity, and the target gateway is used to transmit the data packet;
[0063] In a specific embodiment of the present application, the software version information is the current software version information of the target gateway, and the transmission speed is the average transmission speed of the target gateway.
[0064] Based on the first coefficient, the second coefficient, and each of the third coefficients, a target available channel is determined, and the data packet is sent to the cloud based on the target available channel.
[0065] Through this embodiment, the transmission selection module is used to determine the first coefficient based on the data packet parameter information of the data packet, determine the second coefficient based on the device information of the target gateway for transmitting the data packet, and determine the third coefficient of each available channel based on the channel information of each available information of the target gateway for transmitting the data packet; and then determine the target available channel based on the first coefficient and the second coefficient and each third coefficient. In other words, the transmission selection module is used to determine the target available channel with better communication quality based on the device information of the target gateway and the channel information of each available channel, as well as the data packet parameter information of the data packet, and then send the data packet to the cloud based on the target available channel. In this way, the available channel for transmitting the data packet is dynamically selected, which ensures high transmission efficiency of the data packet, reduces the impact of the communication process on the test results, and improves the accuracy of the communication test results of the distribution gateway, thereby solving the problem of slow data transmission speed and low communication efficiency caused by the gateway in the prior art being unable to dynamically adjust the channel for transmitting data according to the channel environment information.
[0066] In a specific implementation, the transmission selection module further includes an analysis unit configured to obtain a first ratio based on a ratio of the standard data length to the data length, and a second ratio based on a ratio of the standard storage capacity to the storage capacity; and to obtain the first coefficient based on the product of the first ratio and the second ratio. In other words, the first coefficient is inversely proportional to the data length and storage capacity of the data packet, respectively. That is, the first coefficient can be calculated as the ratio of the product of the standard data length and the standard storage capacity to the product of the data length and the storage capacity. This allows for a relatively simple determination of the first coefficient, further ensuring that the target available channel subsequently determined based on the first coefficient, the second coefficient, and the third coefficient is relatively accurate, further ensuring high transmission efficiency of the data packet.
[0067] Specifically, the above-mentioned standard data length and the above-mentioned standard storage capacity are both standard data length and storage capacity of data packets of the same type.
[0068] For the above embodiment, other relevant parameters of the data packet may be added according to different situations to determine the first coefficient.
[0069] In actual application, it can be found through experiments that the second coefficient of the target gateway is proportional to the chip memory, software version information and transmission speed of the target gateway. Therefore, in order to more simply obtain the second coefficient of the target gateway, the above-mentioned analysis unit of the present application is also used to obtain a third ratio based on the ratio of the above-mentioned chip memory to the standard chip memory, obtain a fourth ratio based on the ratio of the above-mentioned software version information to the standard software version information, and obtain a fifth ratio based on the ratio of the above-mentioned transmission speed to the standard transmission speed; and obtain the above-mentioned second coefficient based on the product of the above-mentioned third ratio, the above-mentioned fourth ratio and the above-mentioned fifth ratio.
[0070] In a specific embodiment of the present application, when the standard chip memory of the target gateway is 128M, the standard software version information is 1.0, and the standard transmission speed of the target gateway is 100Byte, the current chip memory of the target gateway is represented as P, the current software version information is represented as Q, and the current transmission speed is represented as L, then the second coefficient can be represented as
[0071] The above-mentioned analysis unit is also used to obtain a sixth ratio based on the ratio of the above-mentioned signal-to-noise ratio of each of the above-mentioned available channels to the standard signal-to-noise ratio, obtain a seventh ratio based on the ratio of the above-mentioned channel capacity of each of the above-mentioned available channels to the standard channel capacity, and obtain an eighth ratio based on the ratio of the above-mentioned channel occupancy rate of each of the above-mentioned available channels to the standard channel occupancy rate; obtain a first target product based on the product of the above-mentioned sixth ratio and the above-mentioned seventh ratio of each of the above-mentioned available channels, and obtain multiple third coefficients based on the ratio of the above-mentioned first target product of each of the above-mentioned available channels to the above-mentioned eighth ratio. In this way, the third coefficient can be determined more simply, and it is further ensured that the target available channel determined subsequently based on the first coefficient, the second coefficient and the third coefficient is more accurate, and further ensures that the transmission efficiency of the data packet is high.
[0072] Specifically, the channel occupancy rate is an average occupancy rate of the available channel within a preset period, and the signal-to-noise ratio is a signal-to-noise ratio of the available channel within a preset period.
[0073] In a specific embodiment of the present application, the channel occupancy of an available channel is represented by a1, the signal-to-noise ratio is represented by b1, and the channel capacity is represented by c1, and the standard channel occupancy of the target gateway is represented by a2, the standard signal-to-noise ratio is represented by b2, and the standard channel capacity is represented by c2, then the third coefficient of the available channel can be expressed as
[0074]
[0075] In some embodiments, the transmission selection module further includes a selection unit configured to:
[0076] Determine the product of the above-mentioned third coefficient and the above-mentioned first coefficient of each of the above-mentioned available channels to obtain multiple second target products, and determine the product of the above-mentioned third coefficient and the above-mentioned second coefficient of each of the above-mentioned available channels to obtain multiple third target products; determine the sum of the above-mentioned second target product and the above-mentioned third target product of each of the above-mentioned available channels to obtain a target value, and determine the ratio of the above-mentioned target value of each of the above-mentioned available channels to the corresponding sum of the above-mentioned first coefficient and the above-mentioned second coefficient to obtain multiple ninth ratios; determine the above-mentioned available channel corresponding to the largest above-mentioned ninth ratio as the above-mentioned target available channel.
[0077] In this way, the target available channel can be determined relatively simply, and the efficiency of transmitting the data packet based on the target available channel can be further ensured to be high.
[0078] Specifically, for a data packet, its first coefficient can be expressed as D; for the target gateway, its second coefficient can be expressed as E, and for each available channel in the target gateway, its third coefficient can be expressed as F iThen the product of the two objectives is D×F i , the third target product is E×F i Therefore, the target value is D×F i +E×F i , then the ninth ratio of each available channel is:
[0079]
[0080] Through the above calculation method, each available channel of the target gateway corresponds to a ninth ratio. Then, the available channel corresponding to the largest ninth ratio can be determined as the target available channel.
[0081] In actual applications, there may be multiple maximum ninth ratios. In this case, the selection unit is further configured to determine whether the first coefficient, the second coefficient, and the third coefficient corresponding to each of the maximum ninth ratios exceed corresponding preset thresholds; and the available channel corresponding to the largest ninth ratio having the first coefficient, the second coefficient, and the third coefficient exceeding the corresponding preset threshold, and the largest ninth ratio having the first coefficient, the second coefficient, and the third coefficient exceeding the corresponding preset threshold the most, is determined as the target available channel. This further enables the selection of target available channels with better communication quality, and further ensures higher efficiency of data packet transmission through the target available channels.
[0082] Specifically, for example, there are two largest ninth ratios, represented by the ninth ratio T1 and the ninth ratio T2. In other words, two target available channels can be determined. If the first coefficient, second coefficient, and third coefficient corresponding to the ninth ratio T1 all exceed their corresponding thresholds, and only the first and second coefficients of the first, second, and third coefficients corresponding to the ninth ratio T2 exceed their corresponding thresholds, in this case, the available channel corresponding to the ninth ratio T1 can be determined as the target available channel.
[0083] In a specific embodiment of the present application, the data information carried by the above-mentioned data packet includes at least one of the following: environmental security data, electrical control data, video data, equipment monitoring data, and power quality data. The above-mentioned environmental security data includes water immersion data, fire data, access control data, burglar alarm data, SF6 and O2 detection data, temperature and humidity data, and smoke data. The above-mentioned electrical control data includes dehumidifier data, exhaust fan data, air conditioning data, lighting control data, and IO control data. The above-mentioned video data includes dome camera data and gun camera data. The above-mentioned equipment monitoring data includes local monitoring data, cable temperature measurement data, and transformer overtemperature data. The above-mentioned power quality data includes reactive compensation data, harmonic control data, and low-voltage line measurement data.
[0084] In some embodiments, the transmission selection module further includes a packaging module for classifying the data information according to a classification standard to obtain a plurality of sub-data information, wherein the classification standard includes one of the following: the time period for collecting the data information, the data type of the data information, and the device type corresponding to the data information; converting the format of each of the sub-data information and the corresponding type information into a target format to obtain each of the sub-data information and the corresponding type information after format conversion, wherein the target format includes one of the following: XML format, JSON format, and YAML format; storing and compressing each of the sub-data information and the corresponding type information after format conversion in the form of an index table to obtain the data packet.
[0085] The transmission selection module includes a processor and memory. Each of the transmission selection modules and the like is stored in the memory as a program unit, and the processor executes the program unit stored in the memory to implement the corresponding functions. All of the modules are located in the same processor; alternatively, the modules may be located in different processors in any combination.
[0086] The processor includes a kernel, which retrieves the corresponding program unit from memory. One or more kernels can be configured, and kernel parameters can be adjusted to address the problem of slower data transmission speeds and lower communication efficiency in existing gateways, which are unable to dynamically adjust data transmission channels based on channel environment information.
[0087] The memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM, and the memory includes at least one memory chip.
[0088] An embodiment of the present invention provides a computer-readable storage medium, which includes a stored program. When the program is executed, the device where the computer-readable storage medium is located is controlled to execute the channel determination method.
[0089] Specifically, the channel determination method includes:
[0090] Step S201, determining a first coefficient based on received data packet parameter information, wherein the data packet parameter information includes the data length and storage capacity of the data packet;
[0091] Step S202: determining a second coefficient based on device information of a target gateway, and determining a plurality of third coefficients based on channel information of each currently available channel of the target gateway, wherein the device information includes chip memory, software version information, and transmission speed of the target gateway, and the channel information includes channel occupancy, signal-to-noise ratio, and channel capacity. The target gateway is used to transmit the data packet;
[0092] Step S203: Determine a target available channel based on the first coefficient, the second coefficient, and each of the third coefficients, and send the data packet to the cloud based on the target available channel.
[0093] An embodiment of the present invention provides an electronic device including a memory and a processor, wherein the memory stores a computer program, and the processor is configured to execute the channel determination method according to the computer program.
[0094] Specifically, the channel determination method includes:
[0095] Step S201, determining a first coefficient based on received data packet parameter information, wherein the data packet parameter information includes the data length and storage capacity of the data packet;
[0096] Step S202: determining a second coefficient based on device information of a target gateway, and determining a plurality of third coefficients based on channel information of each currently available channel of the target gateway, wherein the device information includes chip memory, software version information, and transmission speed of the target gateway, and the channel information includes channel occupancy, signal-to-noise ratio, and channel capacity. The target gateway is used to transmit the data packet;
[0097] Step S203: Determine a target available channel based on the first coefficient, the second coefficient, and each of the third coefficients, and send the data packet to the cloud based on the target available channel.
[0098] In a typical embodiment of the present application, a control system for communication testing is provided. The control system includes a gateway module, a transmission selection module, and a cloud. The gateway module includes a target gateway configured to transmit data packets; the transmission selection module communicates with the gateway module to execute any of the aforementioned channel determination methods; and the cloud communicates with the transmission selection module to receive the data packets forwarded by the transmission selection module.
[0099] The control system for the communication test described above includes a transmission selection module configured to execute any of the aforementioned channel determination methods. In the aforementioned determination method, a first coefficient is determined based on packet parameter information of a data packet, a second coefficient is determined based on device information of a target gateway to which the data packet is transmitted, and a third coefficient is determined for each available channel based on channel information associated with each available information of the target gateway to which the data packet is transmitted. A target available channel is then determined based on the first coefficient, the second coefficient, and each third coefficient. In other words, a target available channel with good communication quality is determined based on the device information of the target gateway, channel information of each available channel, and packet parameter information of the data packet, and the data packet is then sent to the cloud based on the target available channel. This allows for dynamic selection of available channels for data packet transmission, ensures high data packet transmission efficiency, reduces the impact of the communication process on test results, and improves the accuracy of distribution gateway communication test results. This addresses the prior art issue of slow data transmission speeds and low communication efficiency, which arises from the inability of gateways to dynamically adjust data transmission channels based on channel environment information.
[0100] In order to enable those skilled in the art to more clearly understand the technical solution of the present application, the implementation process of the channel determination method of the present application will be described in detail below with reference to specific embodiments.
[0101] This embodiment relates to a specific control system for communication testing. Figure 3 As shown, the control system of the communication test includes a data perception module 10, a gateway module 20, a packaging module 30, a transmission selection module 40 and a cloud 50. Figure 4 As shown, the data sensing module 10 includes various sensors for acquiring data information. The data information includes at least one of the following: environmental security data, electrical appliance control data, video data, equipment monitoring data, and power quality data. Environmental security data includes flood data, fire data, access control data, burglar alarm data, SF6 and O2 detection data, temperature and humidity data, and smoke data. Electrical appliance control data includes dehumidifier data, exhaust fan data, air conditioning data, lighting control data, and I / O control data. Video data includes dome camera data and box camera data. Equipment monitoring data includes local monitoring data, cable temperature measurement data, and transformer overtemperature data. Power quality data includes reactive power compensation data, harmonic control data, and low-voltage line measurement data.
[0102] The gateway module 20 is in communication connection with the data perception module 10 and is used to receive data information. The communication protocol types of the gateway module 20 and the data perception module 10 mainly include DL / T634.5-101, DL / T634.5-104, MQTT, etc.
[0103] The packaging module 30 is in communication with the gateway module 20 and is used to package the data information to generate a data packet. The specific steps are as follows: according to the classification standard, the data information is divided into different types of sub-data information, and the type information of the sub-data information and the sub-data information are converted into the target format and then compressed, and the compressed sub-data information and the corresponding type information are respectively generated into a corresponding data packet in the form of an index table. The data packet includes index information and internal data, the internal data is the compressed sub-data information, and the index information is the type information corresponding to the sub-data information. The classification standard includes any one of the time period for data information collection, the data type of the data information, and the device type corresponding to the data information. The target format includes any one of XML format, JSON format, and YAML format.
[0104] The transmission selection module 40 is electrically connected to the gateway module 20 and the packaging module 30, and is used to obtain the device information of the target gateway and the channel information of each available channel in the target gateway from the gateway module, and receive the data packet. The device information of the target gateway and the channel information of each available channel in the target gateway, as well as the data packet parameter information of the data packet, determine the target available channel. The specific steps are as follows:
[0105] The transmission selection module 40 further includes an analysis unit and a selection unit.
[0106] The analysis unit is used to:
[0107] A first ratio is obtained based on a ratio of a standard data length to a data length, and a second ratio is obtained based on a ratio of a standard storage capacity to a storage capacity; and a first coefficient is obtained based on a product of the first ratio and the second ratio.
[0108] Based on the ratio of chip memory to standard chip memory, a third ratio is obtained, based on the ratio of software version information to standard software version information, a fourth ratio is obtained, and based on the ratio of transmission speed to standard transmission speed, a fifth ratio is obtained; based on the product of the third ratio, the fourth ratio and the fifth ratio, a second coefficient is obtained.
[0109] A sixth ratio is obtained based on the ratio of the signal-to-noise ratio of each available channel to the standard signal-to-noise ratio, a seventh ratio is obtained based on the ratio of the channel capacity of each available channel to the standard channel capacity, and an eighth ratio is obtained based on the ratio of the channel occupancy of each available channel to the standard channel occupancy; a first target product is obtained based on the product of the sixth ratio and the seventh ratio of each available channel, and a plurality of third coefficients are obtained based on the ratio of the first target product of each available channel to the eighth ratio.
[0110] Select the unit to use:
[0111] Determine the product of the third coefficient and the first coefficient of each available channel to obtain multiple second target products, and determine the product of the third coefficient and the second coefficient of each available channel to obtain multiple third target products; determine the sum of the second target product and the third target product of each available channel to obtain a target value, and determine the ratio of the target value of each available channel to the sum of the corresponding first coefficient and the second coefficient to obtain multiple ninth ratios; determine the available channel corresponding to the largest ninth ratio as the target available channel.
[0112] When there are multiple maximum ninth ratios, determine whether the first coefficient, second coefficient, and third coefficient corresponding to each maximum ninth ratio exceed the corresponding preset threshold; and determine the available channel corresponding to the largest ninth ratio whose first coefficient, second coefficient, and third coefficient exceed the corresponding preset threshold and exceeds the corresponding preset threshold the most as the target available channel.
[0113] The cloud 50 is in communication with the transmission selection module 40 and is configured to receive data packets and perform data processing.
[0114] In this embodiment, when it is necessary to perform a communication test on the gateway module 20, the data perception module 10 transmits the acquired external data information to the gateway module 20, and then packages and transmits it to the transmission selection module 40 through the packaging module 30, so that the transmission selection module 40 can select an available channel with the best communication quality as the target available channel based on the parameter information of the data packet, the device information of the target gateway and the channel information of each available channel of the target gateway, and transmit the data packet through the target available channel, thereby improving the data transmission efficiency during communication, reducing the impact of the communication rate on the communication test results, and improving the accuracy of the gateway communication test results.
[0115] An embodiment of the present invention provides a device, comprising a processor, a memory, and a program stored in the memory and executable on the processor. When the processor executes the program, at least the following steps are performed:
[0116] Step S201, determining a first coefficient based on received data packet parameter information, wherein the data packet parameter information includes the data length and storage capacity of the data packet;
[0117] Step S202: determining a second coefficient based on device information of a target gateway, and determining a plurality of third coefficients based on channel information of each currently available channel of the target gateway, wherein the device information includes chip memory, software version information, and transmission speed of the target gateway, and the channel information includes channel occupancy, signal-to-noise ratio, and channel capacity. The target gateway is used to transmit the data packet;
[0118] Step S203: Determine a target available channel based on the first coefficient, the second coefficient, and each of the third coefficients, and send the data packet to the cloud based on the target available channel.
[0119] The devices in this article can be servers, PCs, PADs, mobile phones, etc.
[0120] The present application also provides a computer program product, which, when executed on a data processing device, is adapted to execute a program for initializing at least the following method steps:
[0121] Step S201, determining a first coefficient based on received data packet parameter information, wherein the data packet parameter information includes the data length and storage capacity of the data packet;
[0122] Step S202: determining a second coefficient based on device information of a target gateway, and determining a plurality of third coefficients based on channel information of each currently available channel of the target gateway, wherein the device information includes chip memory, software version information, and transmission speed of the target gateway, and the channel information includes channel occupancy, signal-to-noise ratio, and channel capacity. The target gateway is used to transmit the data packet;
[0123] Step S203: Determine a target available channel based on the first coefficient, the second coefficient, and each of the third coefficients, and send the data packet to the cloud based on the target available channel.
[0124] Obviously, those skilled in the art will appreciate that the various modules or steps of the present invention described above can be implemented using a general-purpose computing device, can be centralized on a single computing device, or can be distributed across a network of multiple computing devices. They can be implemented using program code executable by the computing device, and thus, can be stored in a storage device and executed by the computing device. In some cases, the steps shown or described herein can be performed in a different order than that shown, or can be fabricated as separate integrated circuit modules, or multiple modules or steps can be fabricated as a single integrated circuit module. Thus, the present invention is not limited to any particular combination of hardware and software.
[0125] Those skilled in the art will appreciate that the embodiments of the present application can be provided as methods, systems, or computer program products. Therefore, the present application can adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application can adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to magnetic disk storage, CD-ROM, optical storage, etc.) that contain computer-usable program code.
[0126] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the steps in the process. Figure 1 a process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0127] These computer program instructions may also be stored in a computer readable memory that can direct a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 a process or multiple processes and / or boxes Figure 1 The function specified in one or more boxes.
[0128] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operational steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing the instructions executed on the computer or other programmable device for implementing the process. Figure 1 a process or multiple processes and / or boxes Figure 1 The steps for the function specified in one or more boxes.
[0129] In a typical configuration, a computing device includes one or more processors (CPUs), input / output interfaces, network interfaces, and memory.
[0130] The memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.
[0131] Computer-readable media includes permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. The 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 technology, compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer-readable media does not include transitory computer-readable media (transitory media), such as modulated data signals and carrier waves.
[0132] It should also be noted that the terms "comprises," "includes," or any other variations thereof are intended to encompass non-exclusive inclusion, such that a process, method, commodity, or apparatus that includes a series of elements includes not only those elements but also other elements not explicitly listed, or includes elements inherent to such process, method, commodity, or apparatus. In the absence of further limitations, an element defined by the phrase "comprises a ..." does not exclude the presence of other identical elements in the process, method, commodity, or apparatus that includes the element.
[0133] From the above description, it can be seen that the above embodiments of the present application achieve the following technical effects:
[0134] 1) In the channel determination method of the present application, a first coefficient is determined based on the data packet parameter information of the data packet, a second coefficient is determined based on the device information of the target gateway for transmitting the data packet, and a third coefficient of each available channel is determined based on the channel information of each available information of the target gateway for transmitting the data packet; and then a target available channel is determined based on the first coefficient and the second coefficient and each third coefficient. In other words, based on the device information of the target gateway and the channel information of each available channel, as well as the data packet parameter information of the data packet, a target available channel with better communication quality is determined, and then the data packet is sent to the cloud based on the target available channel. In this way, the available channel for transmitting the data packet is dynamically selected, which ensures a high transmission efficiency of the data packet, reduces the impact of the communication process on the test results, and improves the accuracy of the communication test results of the distribution gateway, thereby solving the problem in the prior art that the gateway cannot dynamically adjust the channel for transmitting data according to the channel environment information, resulting in slow data transmission speed and low communication efficiency.
[0135] 2) The transmission selection module of the present application is used to determine the first coefficient based on the data packet parameter information of the data packet, determine the second coefficient based on the device information of the target gateway for transmitting the data packet, and determine the third coefficient of each available channel based on the channel information of each available information of the target gateway for transmitting the data packet; and then determine the target available channel based on the first coefficient and the second coefficient and each third coefficient. In other words, the transmission selection module is used to determine the target available channel with better communication quality based on the device information of the target gateway and the channel information of each available channel, as well as the data packet parameter information of the data packet, and then send the data packet to the cloud based on the target available channel. In this way, the available channel for transmitting the data packet is dynamically selected, which ensures a high transmission efficiency of the data packet, reduces the impact of the communication process on the test results, and improves the accuracy of the communication test results of the distribution gateway, thereby solving the problem in the prior art that the gateway cannot dynamically adjust the channel for transmitting data according to the channel environment information, resulting in slow data transmission speed and low communication efficiency.
[0136] 3) The control system for the communication test of the present application includes a transmission selection module, which is used to execute any of the above-mentioned channel determination methods. In the above-mentioned determination method, a first coefficient is determined based on the data packet parameter information of the data packet, a second coefficient is determined based on the device information of the target gateway to which the data packet is transmitted, and a third coefficient of each available channel is determined based on the channel information of each available information of the target gateway to which the data packet is transmitted; and then a target available channel is determined based on the first coefficient and the second coefficient and each third coefficient. In other words, based on the device information of the target gateway and the channel information of each available channel, as well as the data packet parameter information of the data packet, a target available channel with better communication quality is determined, and then the data packet is sent to the cloud based on the target available channel. In this way, the available channel for transmitting the data packet is dynamically selected, the transmission efficiency of the data packet is ensured to be high, the impact of the communication process on the test results is reduced, and the accuracy of the communication test results of the distribution gateway is improved, thereby solving the problem of slow data transmission speed and low communication efficiency caused by the inability of the gateway in the prior art to dynamically adjust the channel for transmitting data according to the channel environment information.
[0137] The above description is merely a preferred embodiment of the present application and is not intended to limit the present application. Various modifications and variations are possible for those skilled in the art. Any modifications, equivalent substitutions, or improvements made within the spirit and principles of the present application shall be included within the scope of protection of the present application.
Claims
1. A method for determining a channel, characterized in that: include: Determining a first coefficient based on received data packet parameter information, wherein the data packet parameter information includes a data length and a storage capacity of the data packet; Determining a second coefficient based on device information of a target gateway, and determining a plurality of third coefficients based on channel information of each currently available channel of the target gateway, wherein the device information includes chip memory, software version information, and transmission speed of the target gateway, and the channel information includes channel occupancy, signal-to-noise ratio, and channel capacity. The target gateway is used to transmit the data packet, and each available channel corresponds to one third coefficient. Determine a target available channel based on the first coefficient, the second coefficient, and each of the third coefficients, and send the data packet to the cloud based on the target available channel. Wherein, based on the first coefficient, the second coefficient and each of the third coefficients, the target available channel is determined, including: determining the product of the third coefficient of each of the available channels and the first coefficient to obtain multiple second target products, and determining the product of the third coefficient of each of the available channels and the second coefficient to obtain multiple third target products; determining the sum of the second target product and the third target product of each of the available channels to obtain a target value, and determining the ratio of the target value of each of the available channels to the corresponding sum of the first coefficient and the second coefficient to obtain multiple ninth ratios; and determining the available channel corresponding to the largest ninth ratio as the target available channel.
2. The determination method according to claim 1, characterized in that Determining a first coefficient based on received data packet parameter information includes: Obtaining a first ratio based on a ratio of a standard data length to the data length, and obtaining a second ratio based on a ratio of a standard storage capacity to the storage capacity; The first coefficient is obtained based on the product of the first ratio and the second ratio.
3. The determination method according to claim 1, characterized in that Determining a second coefficient based on device information of the target gateway includes: obtaining a third ratio based on a ratio of the chip memory to a standard chip memory, obtaining a fourth ratio based on a ratio of the software version information to standard software version information, and obtaining a fifth ratio based on a ratio of the transmission speed to a standard transmission speed; The second coefficient is obtained based on the product of the third ratio, the fourth ratio, and the fifth ratio.
4. The determination method according to claim 1, characterized in that Determining a plurality of third coefficients based on channel information of each currently available channel of the target gateway includes: A sixth ratio is obtained based on a ratio of the signal-to-noise ratio of each of the available channels to a standard signal-to-noise ratio; a seventh ratio is obtained based on a ratio of the channel capacity of each of the available channels to a standard channel capacity; and an eighth ratio is obtained based on a ratio of the channel occupancy of each of the available channels to a standard channel occupancy; A plurality of first target products are obtained based on the product of the sixth ratio and the seventh ratio of each of the available channels, and a plurality of third coefficients are obtained based on the ratio of the first target product and the eighth ratio of each of the available channels.
5. The determination method according to claim 1, characterized in that: In a case where there are multiple largest ninth ratios, determining the available channel corresponding to the largest ninth ratio as the target available channel includes: determining whether the first coefficient, the second coefficient, and the third coefficient corresponding to each of the largest ninth ratios exceed corresponding preset thresholds; The available channel corresponding to the largest ninth ratio, in which the first coefficient, the second coefficient, and the third coefficient all exceed corresponding preset thresholds and the largest ratio exceeds the corresponding preset thresholds, is determined as the target available channel.
6. The determination method according to any one of claims 1 to 4, characterized in that: The data information carried by the data packet includes at least one of the following: environmental security data, electrical control data, video data, equipment monitoring data, and power quality data. The environmental security data includes water immersion data, fire data, access control data, burglar alarm data, SF6 and O2 detection data, temperature and humidity data, and smoke data. The electrical control data includes dehumidifier data, exhaust fan data, air conditioning data, lighting control data, and IO control data. The video data includes dome camera data and gun camera data. The equipment monitoring data includes local monitoring data, cable temperature measurement data, and transformer overtemperature data. The power quality data includes reactive compensation data, harmonic control data, and low-voltage line measurement data.
7. The determination method according to claim 6, characterized in that: The process of determining the data packet based on the data information includes: Classifying the data information according to a classification standard to obtain a plurality of sub-data information, wherein the classification standard includes one of the following: a time period during which the data information is collected, a data type of the data information, and a device type corresponding to the data information; Converting the format of each sub-data information and the corresponding type information into a target format to obtain each sub-data information and the corresponding type information after format conversion, wherein the target format includes one of the following: XML format, JSON format, and YAML format; The sub-data information and the corresponding type information after format conversion are stored and compressed in the form of an index table to obtain the data packet.
8. A transmission selection module, characterized in that: The transmission selection module is used to: Determining a first coefficient based on received data packet parameter information, wherein the data packet parameter information includes a data length and a storage capacity of the data packet; Determining a second coefficient based on device information of a target gateway, and determining a plurality of third coefficients based on channel information of each currently available channel of the target gateway, wherein the device information includes chip memory, software version information, and transmission speed of the target gateway, and the channel information includes channel occupancy, signal-to-noise ratio, and channel capacity. The target gateway is used to transmit the data packet; Determine a target available channel based on the first coefficient, the second coefficient, and each of the third coefficients, and send the data packet to the cloud based on the target available channel. Wherein, based on the first coefficient, the second coefficient and each of the third coefficients, the target available channel is determined, including: determining the product of the third coefficient of each of the available channels and the first coefficient to obtain multiple second target products, and determining the product of the third coefficient of each of the available channels and the second coefficient to obtain multiple third target products; determining the sum of the second target product and the third target product of each of the available channels to obtain a target value, and determining the ratio of the target value of each of the available channels to the corresponding sum of the first coefficient and the second coefficient to obtain multiple ninth ratios; and determining the available channel corresponding to the largest ninth ratio as the target available channel.
9. A computer-readable storage medium, characterized in that The computer-readable storage medium includes a stored program, wherein when the program is executed, the device where the computer-readable storage medium is located is controlled to execute the channel determination method according to any one of claims 1 to 7.
10. An electronic device comprising a memory and a processor, characterized in that: A computer program is stored in the memory, and the processor is configured to execute the channel determination method according to any one of claims 1 to 7 through the computer program.
11. A control system for communication testing, characterized in that: include: A gateway module, the gateway module including a target gateway, the target gateway being used to transmit data packets; a transmission selection module, communicating with the gateway module, and configured to execute the channel determination method according to any one of claims 1 to 7; The cloud communicates with the transmission selection module and is used to receive the data packet forwarded by the transmission selection module.
Citation Information
Patent Citations
Media gateway information determination method, apparatus and device, and computer readable medium
CN113364672A
Channel selection method, device and system and storage medium
CN113596794A