Gateway device determination method and apparatus, electronic device, and controlled end
Patent Information
- Application Number
- CN202611156108.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-31
- Publication Date
- 2026-09-25
AI Technical Summary
[0003]本发明的目的之一在于提供一种网关设备的确定方法,以解决相关技术中通过简单的就近原则分配的网关设备导致手机和车辆通过网关设备通信时,通信质量不佳的问题;目的之二在于提供一种网关设备的确定方法;目的之三在于提供一种网关设备的确定装置;目的之四在于提供一种网关设备的确定装置;目的之五在于提供一种电子设备;目的之六在于提供一种被控端
电子设备能够基于控制端和被控端的位置,分别确定控制端对应的第一备选网关设备,以及被控端对应的第二备选网关设备,进而确定备选通路,从而使备选通路包括1个或2个备选的网关设备,从而综合考虑了控制端和被控端的位置,且解决了相关技术中通过单端就近原则筛选网关设备,导致控制端和被控端距离较远的时候,控制端或被控端和筛选出的网关设备通信时间长的问题;进而可对备选通路的通信质量进行评估,得到表征通信质量的通路评估结果,从而能够通过通路评估结果筛选出通信质量更好的备选通路,通过此备选通路能够实现控制端和被控端的通信,提高了控制端和被控端的通信质量和通信效果。
Smart Images

Figure CN122824657A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of gateway screening technology, and more specifically to a method, apparatus, electronic device, and controlled terminal for determining gateway devices. Background Technology
[0002] Mobile phones and vehicles can communicate through gateway devices. However, in related technologies, the gateway devices assigned to mobile phones and vehicles are often assigned based on a simple proximity principle, resulting in poor communication quality when mobile phones and vehicles communicate through gateway devices. Summary of the Invention
[0003] One objective of this invention is to provide a method for determining a gateway device, thereby solving the problem in related technologies where poor communication quality occurs when mobile phones and vehicles communicate through gateway devices due to the simple proximity principle of assigning gateway devices. A second objective is to provide a method for determining a gateway device. A third objective is to provide a device for determining a gateway device. A fourth objective is to provide a device for determining a gateway device. A fifth objective is to provide an electronic device. A sixth objective is to provide a controlled terminal.
[0004] To achieve the above objectives, the technical solution adopted by the present invention is as follows: In a first aspect, embodiments of this application provide a method for determining a gateway device, the method being applied to an electronic device, the method comprising: At least one first alternative gateway device is determined based on control terminal information, and at least one second alternative gateway device is determined based on controlled terminal information; wherein, the first alternative gateway device is a device determined based on the location of the control terminal indicated by the control terminal information, and the second alternative gateway device is a device determined based on the location of the controlled terminal indicated by the controlled terminal information; The communication quality of the alternative paths is evaluated, and path evaluation results are generated; wherein, the alternative paths include the control terminal, the controlled terminal, the first alternative gateway device, and the second alternative gateway device; Based on the path evaluation results, the target gateway devices corresponding to the control terminal and the controlled terminal are determined; wherein, the number of the target gateway devices is a first preset value or a second preset value; The gateway information is sent to at least one of the following: the control terminal, the controlled terminal, and the target gateway device; wherein the gateway information is used to indicate the configuration of at least one of the following: the control terminal, the controlled terminal, and the channel between the control terminal and the controlled terminal.
[0005] In some embodiments, evaluating the communication quality of candidate paths and generating path evaluation results includes: The communication quality between the first alternative gateway device and the control terminal is evaluated, and a first evaluation result is generated. The communication quality between the second alternative gateway device and the controlled terminal is evaluated, and a second evaluation result is generated. The pathway evaluation result is generated based on the first evaluation result and the second evaluation result; The first alternative gateway device and the second alternative gateway device may be the same or different.
[0006] In other words, when the first and second alternative gateway devices are the same, the communication quality between the control end and the controlled end and the alternative gateway device can be determined separately; when the first and second alternative gateway devices are different, the communication quality between the control end and the controlled end and the different alternative gateway devices can be determined separately; and by combining the first and second evaluation results, the path evaluation result corresponding to the entire alternative path can be determined, thus not only considering the communication quality between both sides and the gateway devices, but also providing support for the subsequent selection of gateway devices.
[0007] In some embodiments, the path evaluation result includes a path evaluation value; when the first candidate gateway device and the second candidate gateway device are the same, generating the path evaluation result based on the first evaluation result and the second evaluation result includes: Obtain the service scenario identifiers of the control terminal and the controlled terminal; Based on the correspondence between the business scenario identifier and the weight, the first weight corresponding to the first evaluation result and the second weight corresponding to the second evaluation result are determined. The first evaluation result is weighted based on the first weight to generate a first weighted evaluation result, and the second evaluation result is weighted based on the second weight to generate a second weighted evaluation result. The pathway evaluation value is generated based on the first weighted evaluation result and the second weighted evaluation result.
[0008] In other words, it can comprehensively consider the business scenarios on both sides and dynamically adjust the weights corresponding to the first and second evaluation results, thereby making the channel evaluation value more compatible with the business scenario and making the subsequently selected gateway devices more compatible with the business scenario.
[0009] In some embodiments, when the first candidate gateway device and the second candidate gateway device are different, generating the path evaluation value based on the first evaluation result and the second evaluation result includes: A third evaluation result is determined for the first candidate gateway device and the second candidate gateway device; wherein the third evaluation result is used to indicate the communication quality between the first candidate gateway device and the second candidate gateway device; The pathway evaluation value is generated based on the first weighted evaluation result, the second weighted evaluation result, and the third evaluation result.
[0010] In other words, when the control end and the controlled end are connected to different gateway devices, the communication quality between the gateway devices also needs to be considered, so as to improve the reliability and accuracy of the path evaluation value.
[0011] In some embodiments, evaluating the communication quality between the first alternative gateway device and the control terminal to generate a first evaluation result includes: The communication quality between the first alternative gateway device and the control terminal is evaluated in at least two dimensions, and a first communication indicator value is generated for each dimension; wherein, the at least two dimensions include at least two of the following: latency, packet loss rate, load and bandwidth capacity; A first evaluation result is generated based on the first communication indicator values corresponding to the at least two dimensions.
[0012] In other words, it is possible to quantify the indicators corresponding to multiple dimensions, obtain the first communication indicator value corresponding to each dimension, and then combine the first communication indicator values corresponding to multiple dimensions to quantify the communication quality between the control terminal and the first candidate gateway device, thereby providing data support for the subsequent selection of gateway devices with better communication quality.
[0013] In some embodiments, the path evaluation result includes a path evaluation value; determining the target gateway device corresponding to the control terminal and the controlled terminal based on the path evaluation result includes: From the multiple pathway evaluation values, determine the limiting evaluation value; Based on the candidate paths corresponding to the limit evaluation value, the target path is determined; If the first alternative gateway device and the second alternative gateway device included in the target path are the same, the first alternative gateway device included in the target path shall be determined as the target gateway device. If the first alternative gateway device and the second alternative gateway device included in the target path are different, the first alternative gateway device included in the target path shall be determined as the first target gateway device, and the second alternative gateway device included in the target path shall be determined as the second target gateway device.
[0014] In other words, the path evaluation value and communication quality can be directly or inversely proportional. When they are directly proportional, the maximum path evaluation value is reached; when they are inversely proportional, the minimum path evaluation value is reached. This allows us to identify candidate paths with high communication quality. By using the candidate paths with high communication quality as target paths, one or two gateway devices corresponding to these target paths will naturally become target gateway devices. Communicating through the target path where these target gateway devices are located will improve the communication quality between the control end and the controlled end.
[0015] In some embodiments, the method further includes: If the target distance value is less than or equal to the distance threshold, the number of target gateway devices is determined to be a first preset value; wherein, the target distance value is used to indicate the distance between the control terminal and the controlled terminal, and the first target gateway device and the second target gateway device are the same; If the target distance is greater than a distance threshold, the number of target gateway devices is determined to be a second preset value; wherein the first target gateway device and the second target gateway device are different; If the number of target gateway devices is a first preset value and the gateway level indicated by the path evaluation result is lower than a preset level, the number of target gateway devices is determined to be either a first preset value or a second preset value.
[0016] In other words, the number of target gateway devices can be pre-determined by combining the distance between the controlling and controlled ends. Based on the pre-determined number, the quality of some alternative paths can be evaluated to obtain path evaluation results, thereby reducing the number of alternative paths to be evaluated and speeding up the determination of target gateway devices. Furthermore, when the number of target gateway devices is the first preset value and the communication quality of the alternative paths does not meet the expected effect, the quality of the alternative paths corresponding to the two alternative gateway devices can be adaptively evaluated, thereby increasing the number of alternative paths and facilitating the selection of target paths with better communication quality.
[0017] In some embodiments, the path evaluation result is used to indicate the gateway level of the candidate gateway devices included in the candidate path, the candidate gateway devices including the first candidate gateway device and the second candidate gateway device, and the gateway information including configuration information; the method further includes: Configuration information is generated based on the service scenario identifiers of the control terminal and the controlled terminal, and the target gateway level corresponding to the target gateway device.
[0018] In other words, different business scenarios can correspond to gateway devices with different preset gateway levels. The configuration information can be determined based on whether the preset gateway level and the target gateway level correspond, so that different types of channels can be built for different business scenarios, or different configurations can be made for the control end and / or the controlled end, so that the data transmission channel and the business scenario are more matched.
[0019] In some embodiments, the method further includes: When the connection status with the controlled terminal is in the reconnection state, receive the controlled terminal information sent by the controlled terminal; The controlled terminal information also includes communication information between the controlled terminal and the third target gateway device in the disconnected state, wherein the disconnected state is used to indicate that the connection between the controlled terminal and the controlled terminal is broken; the third target gateway device is a device determined by the controlled terminal based on the location and historical communication information of the controlled terminal in the disconnected state. The process of generating configuration information based on the service scenario identifiers of the control terminal and the controlled terminal and the target gateway level corresponding to the target gateway device includes: Based on the business scenario identifier, the target gateway level, and the communication information, configuration information corresponding to the controlled terminal is generated.
[0020] In other words, when the connection between the controlled end and the electronic device is lost, the control end can autonomously determine the next third target gateway device to connect to. This allows the controlled end to flexibly and autonomously switch the connected gateway device during the disconnection and re-establish the connection with the electronic device through the newly connected third gateway device. After re-establishing the connection, the electronic device can evaluate the target gateway level corresponding to the third target gateway device. Based on the communication between the controlled end and the third target gateway device during the disconnection period, as well as the business scenarios and target gateway levels of the control end and the controlled end, the control end can determine the configuration information for the controlled end and / or the third target gateway device, thereby improving the communication quality and effect between the control end and the controlled end.
[0021] Secondly, embodiments of this application provide a method for determining a gateway device, the method being applied to a controlled end, the method comprising: Receive gateway information sent by electronic devices; The gateway information includes at least one first alternative gateway device determined by the electronic device based on control terminal information, and at least one second alternative gateway device determined based on controlled terminal information; wherein the first alternative gateway device is a device determined based on the location of the control terminal indicated by the control terminal information, and the second alternative gateway device is a device determined based on the location of the controlled terminal indicated by the controlled terminal information; the communication quality of the alternative paths is evaluated to generate path evaluation results; wherein the alternative paths include the control terminal, the controlled terminal, the first alternative gateway device, and the second alternative gateway device; based on the path evaluation results, information is sent after determining the target gateway devices corresponding to the control terminal and the controlled terminal; wherein the number of target gateway devices is a first preset value or a second preset value.
[0022] In some embodiments, the method further includes: When the connection with the electronic device is disconnected, a third target gateway device is determined based on the location and historical communication information of the controlled terminal, so as to connect with the electronic device through the third target gateway device; wherein, the disconnected state is used to indicate that the connection with the electronic device is broken; Determine first communication information and / or second communication information; wherein, the first communication information is used to indicate the communication quality with the third target gateway device, and the second communication information is used to indicate the processing method of the data to be transmitted, wherein the data to be transmitted is the data to be transmitted to the control terminal; When the connection status with the electronic device is in reconnection state, send controlled terminal information to the controlled terminal; The controlled terminal information also includes the communication information.
[0023] In other words, when the connection between the controlled end and the electronic device is lost, the controlling end can autonomously determine the next third target gateway device to connect to. Thus, the controlled end can flexibly and autonomously switch the connected gateway device in the event of a disconnection, and re-establish the connection with the electronic device through the newly connected third gateway device, thereby uploading the controlled end information.
[0024] In some embodiments, the path evaluation result is used to indicate the gateway level of the candidate gateway devices included in the candidate path, the candidate gateway devices including a first candidate gateway device and a second candidate gateway device, the gateway information including configuration information, the configuration information including information generated by the electronic device based on the service scenario identifier of the control terminal and the controlled terminal and the target gateway level corresponding to the target gateway device; the method further includes: Based on the configuration information, at least one of the following is determined: the encryption algorithm, encoding method, and resolution for the data to be transmitted.
[0025] In other words, the controlled end can encrypt, encode, and adjust the resolution of the data to be transmitted based on the configuration information, so that the amount of data to be transmitted can be different according to different business scenarios and different target gateway levels, thus enabling flexible processing and transmission of the data to be transmitted.
[0026] Thirdly, embodiments of this application provide a gateway device determination apparatus, the apparatus comprising: The first determining module is configured to determine at least one first candidate gateway device based on control terminal information, and to determine at least one second candidate gateway device based on controlled terminal information; wherein, the first candidate gateway device is a device determined based on the location of the control terminal indicated by the control terminal information, and the second candidate gateway device is a device determined based on the location of the controlled terminal indicated by the controlled terminal information; A generation module is used to evaluate the communication quality of alternative paths and generate path evaluation results; wherein, the alternative paths include the control terminal, the controlled terminal, the first alternative gateway device, and the second alternative gateway device; The second determining module is used to determine the target gateway devices corresponding to the control terminal and the controlled terminal based on the path evaluation results; wherein the number of target gateway devices is a first preset value or a second preset value; A first sending module is configured to send gateway information to at least one of the following: the control terminal, the controlled terminal, and the target gateway device; wherein the gateway information is used to indicate configuration for at least one of the following: the control terminal, the controlled terminal, and the channel between the control terminal and the controlled terminal.
[0027] Fourthly, embodiments of this application provide a device for determining a gateway device, the device comprising: The first receiving module is used to receive gateway information sent by electronic devices; The gateway information includes at least one first alternative gateway device determined by the electronic device based on control terminal information, and at least one second alternative gateway device determined based on controlled terminal information; wherein the first alternative gateway device is a device determined based on the location of the control terminal indicated by the control terminal information, and the second alternative gateway device is a device determined based on the location of the controlled terminal indicated by the controlled terminal information; the communication quality of the alternative paths is evaluated to generate path evaluation results; wherein the alternative paths include the control terminal, the controlled terminal, the first alternative gateway device, and the second alternative gateway device; based on the path evaluation results, information is sent after determining the target gateway devices corresponding to the control terminal and the controlled terminal; wherein the number of target gateway devices is a first preset value or a second preset value.
[0028] Fifthly, embodiments of this application provide an electronic device including a memory and a processor. The memory stores a computer program that can run on the processor, and the processor executes the program to implement some or all of the steps in the method of the first aspect described above.
[0029] In a sixth aspect, embodiments of this application provide a controlled terminal, including a memory and a processor. The memory stores a computer program that can run on the processor, and the processor executes the program to implement some or all of the steps in the method of the second aspect described above.
[0030] In a seventh aspect, embodiments of this application provide a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements some or all of the steps in the above-described method.
[0031] Eighthly, embodiments of this application provide a computer program product, including a computer program or instructions, which, when executed by a processor, implement some or all of the steps in the above-described method.
[0032] The beneficial effects of this invention are: The electronic device can determine the first alternative gateway device corresponding to the control end and the second alternative gateway device corresponding to the controlled end based on the location of the control end and the controlled end, respectively, and then determine the alternative path. Thus, the alternative path includes one or two alternative gateway devices, which comprehensively considers the location of the control end and the controlled end, and solves the problem in related technologies where the gateway device is selected based on the principle of proximity at one end, resulting in long communication time between the control end or the controlled end and the selected gateway device when the distance between the control end and the controlled end is far. Furthermore, the communication quality of the alternative path can be evaluated to obtain the path evaluation result characterizing the communication quality. The alternative path with better communication quality can be selected based on the path evaluation result. Through the alternative path, the communication between the control end and the controlled end can be realized, thus improving the communication quality and communication effect between the control end and the controlled end. Attached Figure Description
[0033] Figure 1 A flowchart illustrating a method for determining a gateway device provided in an embodiment of this application; Figure 2 A schematic diagram of a connection provided in an embodiment of this application; Figure 3 A schematic diagram illustrating another connection provided in an embodiment of this application; Figure 4 A flowchart illustrating another method for determining a gateway device provided in this application embodiment; Figure 5 An interactive signaling diagram provided for an embodiment of this application; Figure 6This is a schematic diagram of a gateway device determination apparatus provided in an embodiment of this application; Figure 7 A schematic diagram of a determining device for another gateway device provided in an embodiment of this application; Figure 8 A schematic diagram of the composition structure of an electronic device provided in an embodiment of this application; Figure 9 This is a schematic diagram of the composition structure of a controlled terminal provided in an embodiment of this application. Detailed Implementation
[0034] The embodiments of the present invention will be described below with reference to the accompanying drawings and preferred embodiments. Those skilled in the art can easily understand other advantages and effects of the present invention from the content disclosed in this specification. The present invention can also be implemented or applied through other different specific embodiments, and various details in this specification can also be modified or changed based on different viewpoints and applications without departing from the spirit of the present invention. It should be understood that the preferred embodiments are only for illustrating the present invention and not for limiting the scope of protection of the present invention.
[0035] In related technologies, when a mobile phone and a vehicle interact, a scheduling server can allocate gateway devices to transmit information between the phone and the vehicle. However, when allocating gateway devices to phones and vehicles, the principle of proximity is often adopted, using the gateway device closest to the phone or vehicle for communication, while ignoring the distance between the phone and the vehicle. This results in greater latency for the more distant phone or vehicle when accessing the gateway device, leading to a decrease in communication quality between the phone and the vehicle.
[0036] To address the aforementioned issues, a method for determining gateway devices is provided. Figure 1 A flowchart illustrating a method for determining a gateway device provided in an embodiment of this application is shown below. Figure 1 As shown, steps 101 to 104 are included, wherein: Step 101: Determine at least one first alternative gateway device based on the control terminal information, and determine at least one second alternative gateway device based on the controlled terminal information; wherein, the first alternative gateway device is a device determined based on the location of the control terminal indicated by the control terminal information, and the second alternative gateway device is a device determined based on the location of the controlled terminal indicated by the controlled terminal information.
[0037] In this embodiment of the disclosure, the electronic device is used to allocate gateway devices to the control end and the controlled end. The control end and the controlled end can communicate through the gateway device. The control end includes mobile phones, computers, tablets, vehicles, wearable devices, etc.; the controlled end includes mobile phones, computers, tablets, vehicles, wearable devices, etc.; the gateway device includes a device with gateway functionality, which can be used to achieve at least one of the following: traffic access, request forwarding, protocol processing, caching acceleration, etc. For example, the gateway device can be used to receive a request sent by one device and forward this request to another device; the gateway device includes routers, servers, containers, etc. The electronic device includes servers, cloud computing, etc. For example, the control end includes a mobile phone, the controlled end includes a vehicle, the gateway device includes a gateway server, and the electronic device includes a scheduling server.
[0038] The control terminal information may include at least one of the following: a first regional identifier, a first Internet Protocol (IP) identifier, a first Global Positioning System (GPS) identifier, or other identifiers representing the location of the control terminal; and may also include at least one of the following: first user information, first network type, first operator information, service scenario identifier, etc. The controlled terminal information may include at least one of the following: a second regional identifier, a second Internet Protocol (IP) identifier, a second Global Positioning System (GPS) identifier, or other identifiers representing the location of the controlled terminal; and may also include at least one of the following: second user information, second network type, second operator information, service scenario identifier, operational information, etc.
[0039] For example, the control terminal includes a mobile phone. The first user information includes the user's nickname, mobile phone number, and mobile phone identification code. The first network type includes Wireless Local Area Network (WIFI), 4G, and 5G. The first operator information includes the operator type. The controlled terminal includes a vehicle. The second user information may include the vehicle's name, model, and identification code. The second network type includes WIFI, 4G, and 5G. The second operator information includes the operator type. Operational information includes the vehicle's current operating mode (driving mode, parking mode, or charging mode) and may also include information representing the vehicle's safety level.
[0040] Gateway devices can be devices placed by technicians. For example, technicians can place one gateway device in each city within a country, or one gateway device in each country. Electronic devices can know the location of each gateway device in advance. Based on the location of the control terminal, they can determine the gateway devices around the control terminal and use these as first-choice gateway devices. Similarly, based on the location of the controlled terminal, they can determine second-choice gateway devices around the controlled terminal. The first and second-choice gateway devices can be the same or different, and the number of non-overlapping gateway devices between the first and second-choice gateway devices is greater than or equal to two.
[0041] Of course, the electronic device can also determine the first and second gateway devices based on the location and country of the control terminal, the location and country of the controlled terminal, and the location and country of the gateway device. For example, if multiple gateway devices are located in Beijing, Shanghai, the eastern United States, Europe, etc., and the control terminal is located in Beijing and the controlled terminal is located in Suzhou, the electronic device can determine that the first and second alternative gateway devices include Beijing and Shanghai.
[0042] Step 102: Evaluate the communication quality of the alternative paths and generate path evaluation results; wherein, the alternative paths include the control end, the controlled end, the first alternative gateway device and the second alternative gateway device.
[0043] In this embodiment, the path containing the control terminal, the controlled terminal, the first alternative gateway device, and the second alternative gateway device can be referred to as an alternative path. Different alternative paths indicate different channels between the control terminal and the controlled terminal. When the first alternative gateway device and the second alternative gateway device are different, the alternative path includes two alternative gateway devices with different order. To ensure the communication quality between the control terminal and the controlled terminal, the quality of the alternative paths is evaluated based on the communication quality of the paths, and the evaluation results of the alternative paths are obtained, which facilitates the subsequent determination of a suitable link for communication between the control terminal and the controlled terminal.
[0044] For example, the control end includes a mobile phone, the controlled end includes a vehicle, and both the first and second alternative gateway devices include a Beijing gateway device located in Beijing and a Shanghai gateway device located in Shanghai. The first alternative path can be used to indicate mobile phone-Beijing gateway device-Shanghai gateway device-vehicle, the second alternative path can be used to indicate mobile phone-Shanghai gateway device-Beijing gateway device-vehicle, the third alternative path can be used to indicate mobile phone-Beijing gateway device-vehicle, and the fourth alternative path can be used to indicate mobile phone-Shanghai gateway device-vehicle.
[0045] Step 103: Based on the path evaluation results, determine the target gateway devices corresponding to the control end and the controlled end; wherein the number of target gateway devices is a first preset value or a second preset value.
[0046] In this embodiment of the disclosure, target paths can be selected based on path evaluation results, and the gateway devices included in the target paths can be designated as target gateway devices. A first preset value indicates that the number of target gateway devices is 1, and a second preset value indicates that the number of gateway devices is 2. The control terminal corresponds to the first target gateway device, and the controlled terminal corresponds to the second target gateway device. The target gateway devices corresponding to the control terminal and the controlled terminal can be the same or different.
[0047] For example, if the target path is the first alternative path mentioned above, then the target gateway devices include both Beijing and Shanghai gateway devices, and the total number of target gateway devices is 2; the target gateway device corresponding to the control end is the Beijing gateway device, and the target gateway device corresponding to the controlled end is the Shanghai gateway device. If the target path is the third alternative path mentioned above, then the target gateway devices include both Beijing gateway devices, and the total number of target gateway devices is 1; both the control end and the controlled end have Beijing gateway devices as their target gateway devices. If the target path is the fourth alternative path mentioned above, then the target gateway devices include both Shanghai gateway devices, and the total number of target gateway devices is 1; both the control end and the controlled end have Shanghai gateway devices as their target gateway devices.
[0048] Step 104: Send gateway information to at least one of the following: the controller, the controlled device, and the target gateway device; wherein the gateway information is used to indicate the configuration of at least one of the following: the controller, the controlled device, and the channel between the controller and the controlled device.
[0049] In this embodiment of the disclosure, the gateway information may include target information and / or configuration information. The target information includes at least one of the following: first target gateway information of a first target gateway device, second target gateway information of a second target gateway device, wherein the first target gateway information and the second target gateway information are identical when the first target gateway device and the second target gateway device are the same; the configuration information includes at least one of the following: first target configuration information for processing data output from the control terminal, second target configuration information for processing data output from the controlled terminal, third target configuration information for configuring the channel between the control terminal and the controlled terminal, etc.
[0050] For example, when the target path is the first alternative path mentioned above, the electronic device can send the first target information of the Beijing gateway device to the mobile phone and the second target information of the Shanghai gateway device to the vehicle. The first target gateway information may include the IP address, identifier, domain name, etc. of the Beijing gateway device, and the second target gateway information may include the IP address, identifier, domain name, etc. of the Shanghai gateway device, so that the mobile phone knows the information of the point of access (POP) and the vehicle knows the information of the POP. The mobile phone establishes a communication connection with the Beijing gateway device through the first target information, and the vehicle establishes a communication connection with the Shanghai gateway device through the second target information.
[0051] Figure 2 A schematic diagram of a connection provided in an embodiment of this application, such as... Figure 2 As shown, gateway cluster 23 is a system composed of multiple gateway devices, used to provide high availability, load balancing, and unified access to services. Gateway cluster 23 includes at least one gateway device. Backbone network 24 is a high-speed core network connecting multiple regions or cities, used to connect high-speed networks in different regions or areas. Its function is to realize large-scale data transmission and interconnection, support communication between local area networks (LANs) and metropolitan area networks (MANs), and provide international exit and cross-regional connectivity for the Internet. Electronic devices include scheduling server 25; scheduling server 25 determines at least one target gateway device from gateway cluster 23; control terminal 21 establishes a communication connection with controlled terminal 22 through the target gateway device and backbone network.
[0052] When the control terminal has established a communication connection with the first target gateway device, the electronic device may not send the first target information to the control terminal. Similarly, when the controlled terminal has established a communication connection with the second target gateway device, the electronic device may not send the second target information to the controlled terminal. If the current configuration information is the same as the previous configuration information, the current configuration information may not be sent, thereby reducing the amount of information sent and the amount of data, and reducing the energy consumption of the electronic device.
[0053] In this embodiment, the electronic device can determine a first alternative gateway device corresponding to the control terminal and a second alternative gateway device corresponding to the controlled terminal based on the locations of the control terminal and the controlled terminal, thereby determining alternative paths. This allows each alternative path to correspond to one or two alternative gateway devices, comprehensively considering the locations of the control terminal and the controlled terminal. It also solves the problem in related technologies where selecting gateway devices based on a single-end proximity principle results in long communication times between the control terminal and the selected gateway device when the distance between them is large. Furthermore, the communication quality of the alternative paths can be evaluated to obtain path evaluation results characterizing the communication quality. This allows for the selection of alternative paths with better communication quality, enabling communication between the control terminal and the controlled terminal through these alternative paths, thus improving the communication quality and effectiveness between them.
[0054] In some embodiments, step 102 includes steps 1021 to 1023, wherein: Step 1021: Evaluate the communication quality between the first alternative gateway device and the control terminal, and generate the first evaluation result; Step 1022: Evaluate the communication quality between the second alternative gateway device and the controlled end, and generate a second evaluation result; Step 1023: Generate pathway evaluation results based on the first evaluation results and the second evaluation results; The first alternative gateway device and the second alternative gateway device may be the same or different.
[0055] In this embodiment of the disclosure, GW can represent a gateway device, GWi can represent a first alternative gateway device, and GWj can represent a second alternative gateway device; the number of first alternative gateway devices is A, the number of second alternative gateway devices is B, and both A and B are integers greater than or equal to 1; i and j are both integers, and A≥i≥1, B≥j≥1.
[0056] The path evaluation result may include at least one of the following: path evaluation value, gateway level, first evaluation value, second evaluation value, etc. When the number of target gateway devices is 1, the gateway level is the level of the target gateway device; when the number of target gateway devices is 2, the gateway level is the level of the first target gateway device and the level of the second target gateway device, and the levels of the first target gateway device and the second target gateway device are the same. The gateway level can be determined by the path evaluation value.
[0057] For each first alternative gateway device GWi, the communication quality between the first alternative gateway device GWi and the control terminal is evaluated to generate a first evaluation value Ec(GWi); for each second alternative gateway device GWj, the communication quality between the second alternative gateway device GWj and the controlled terminal is evaluated to generate a second evaluation value Ev(GWj); based on the first evaluation value Ec(GWi) and the second evaluation value Ev(GWj), the path evaluation value E(GWi) is determined.
[0058] For example, the first alternative gateway device includes a Beijing gateway device and a Shanghai gateway device; the communication quality between the Beijing gateway device and the mobile phone is evaluated to obtain a first evaluation value Ec1(GWi), and the communication quality between the Shanghai gateway device and the mobile phone is evaluated to obtain a first evaluation value Ec2(GWi); the second alternative gateway device includes a Beijing gateway device and a Shanghai gateway device; the communication quality between the Beijing gateway device and the vehicle is evaluated to obtain a second evaluation value Ev1(GWj), and the communication quality between the Shanghai gateway device and the vehicle is evaluated to obtain a second evaluation value Ev2(GWj); Ec(GWi) and Ev(GWj) are combined, and four path evaluation values E(GWi) are determined based on the combined Ec(GWi) and Ev(GWj).
[0059] In calculating the pathway evaluation value, the sum of the first evaluation value Ec(GWi) and the second evaluation value Ev(GWj) can be used as the first pathway evaluation value; the first evaluation value Ec(GWi) and the second evaluation value Ev(GWj) can be weighted, and the sum of the weighted first evaluation value Ec(GWi) and the second evaluation value Ev(GWj) can be used as the second pathway evaluation value; the average of the first pathway evaluation values can be used as the third pathway evaluation value; the sum or average of the first pathway evaluation value, the second pathway evaluation value and the third pathway evaluation value can be used as the fourth pathway evaluation value. The pathway evaluation result can include at least one of the following: the first pathway evaluation value, the second pathway evaluation value, the third pathway evaluation value and the fourth pathway evaluation value.
[0060] The smaller the path evaluation value, the higher the gateway level. Electronic devices can determine the gateway level by comparing the path evaluation value and the channel threshold. For example, the channel threshold includes threshold T1 and threshold T2, where T2 > T1; when the path evaluation value E(GWi) ≤ T1, the gateway level is determined to be Level 1; when E(GWi) ≤ T2, the gateway level is determined to be Level 2; and when E(GWi) > T2, the gateway level is determined to be Level 3. At gateway level 1, communication quality is the highest; at gateway level 2, communication quality is second best; and at gateway level 3, communication quality is the lowest. Therefore, the level of the gateway device can be evaluated through the path evaluation value, reflecting the communication quality between the control end and the controlled end when constructing a channel through this alternative gateway device.
[0061] In some embodiments, the path evaluation result includes a path evaluation value; when the first alternative gateway device and the second alternative gateway device are the same, step 1023 includes steps 10231 to 10234, wherein: Step 10231: Obtain the business scenario identifiers of the control end and the controlled end; Step 10232: Based on the correspondence between business scenario identifiers and weights, determine the first weight corresponding to the first evaluation result and the second weight corresponding to the second evaluation result; Step 10233: Weight the first evaluation result based on the first weight to generate a first weighted evaluation result; and weight the second evaluation result based on the second weight to generate a second weighted evaluation result. Step 10234: Generate pathway evaluation values based on the first weighted evaluation results and the second weighted evaluation results.
[0062] In this embodiment of the disclosure, the control terminal and the controlled terminal may correspond to at least one business scenario identifier. For example, the business scenario may include a scenario where the control terminal controls the controlled terminal, a scenario where the controlled terminal transmits data to the control terminal, etc., and different business scenarios have different identifiers.
[0063] The pathway evaluation value E(GWi) is calculated using the first formula, which can be expressed as formula (1).
[0064] E(GWi)=a Ec(GWi)+b Ev(GWj); Formula (1); Where a and b represent the first weight and the second weight, respectively. Ec(GWi) represents the first weighted evaluation result, b Ev(GWj) represents the second weighted evaluation result. Different business scenario identifiers can correspond to different weights, and the first and second weights can vary depending on the business scenario. For example, when the business scenario is that the control end controls the controlled end, it is necessary to prioritize ensuring that the controlled end can receive instructions from the control end, and the first weight can be less than the second weight; when the business scenario is that the controlled end transmits data to the control end, the first weight can be equal to the second weight. This allows the weights of the first and second evaluation results to be dynamically adjusted as the business scenario changes, making the subsequent evaluation of the gateway level more consistent with the business scenario and providing a data foundation for the selection of subsequent gateway devices.
[0065] In some embodiments, when the first alternative gateway device and the second alternative gateway device are different, step 1023 includes steps 10235 to 10236, wherein: Step 10235: Determine the third evaluation result corresponding to the first alternative gateway device and the second alternative gateway device; wherein, the third evaluation result is used to indicate the communication quality between the first alternative gateway device and the second alternative gateway device; Step 10236: Generate pathway evaluation values based on the first weighted evaluation results, the second weighted evaluation results, and the third evaluation results.
[0066] In this embodiment of the disclosure, when the first alternative gateway device and the second alternative gateway device are different, the control end and the controlled end communicate through two different gateway devices. In steps 10231 to 10233 above, the electronic device has evaluated and quantified the communication quality between the control end and the first alternative gateway device to obtain a first weighted evaluation result; evaluated and quantified the communication quality between the controlled end and the second alternative gateway device to obtain a second weighted evaluation result; and then it is necessary to quantify the communication quality between gateway devices to obtain a third evaluation result E(GWi-j).
[0067] The third evaluation result can be used to indicate at least one of the following: communication delay, packet loss rate, bit error rate, bandwidth capacity, load capacity, etc., between the first and second alternative gateway devices. For example, when the third evaluation result is used to indicate the communication delay between the first and second alternative gateway devices; since the communication delay between gateway devices is often affected by country, region, and distance, the delay value between gateway devices can be predetermined, and then the delay value can be determined based on the location of the first and second alternative gateway devices. This determined delay value is the third evaluation result; the smaller the delay value, the higher the communication quality.
[0068] The electronic device can calculate the path evaluation value using the second formula, which can be expressed as formula (2).
[0069] E(GWi)=a Ec(GWi)+b Ev(GWj)+E(GWi-j); Formula (2); Where a and b represent the first weight and the second weight, respectively. Ec(GWi) represents the first weighted evaluation result, b Ev(GWj) represents the second weighted evaluation result. Different business scenario identifiers can correspond to different weights, and the first and second weights can vary depending on the business scenario. For example, when the business scenario is that the control end controls the controlled end, it is necessary to prioritize ensuring that the controlled end can receive instructions from the control end, and the first weight can be less than the second weight; when the business scenario is that the controlled end transmits data to the control end, the first weight can be equal to the second weight. This allows the weights of the first and second evaluation results to be dynamically adjusted as the business scenario changes, making the subsequent evaluation of the gateway level more consistent with the business scenario and providing a data foundation for the selection of subsequent gateway devices.
[0070] In some embodiments, step 1021 includes steps 201 to 202, wherein: Step 201: Evaluate the communication quality between the first alternative gateway device and the control terminal in at least two dimensions, and generate a first communication indicator value corresponding to each dimension; wherein, the at least two dimensions include at least two of the following: latency, packet loss rate, load and bandwidth capacity; Step 202: Generate a first evaluation result based on the first communication indicator values corresponding to at least two dimensions.
[0071] In this embodiment of the disclosure, latency refers to the time interval between the transmission of a signal and the receipt of a response. Latency includes round-trip time (RTT), transmission latency, etc. Taking RTT as an example, RTT refers to the total time taken from the time the sender sends a data packet, to the time the receiver receives the data packet and returns an acknowledgment, and then to the time the sender receives the acknowledgment. It is usually expressed in milliseconds (ms) and reflects the speed of network transmission, serving as an indicator of network latency. The smaller the RTT, the higher the communication quality. In this embodiment, the sender is the control end, and the receiver is the first alternative gateway device; or, in the process of obtaining the second evaluation result, the sender is the controlled end, and the receiver is the second alternative gateway device.
[0072] Packet loss rate refers to the ratio of lost data packets to the total number of data packets sent during data transmission. It is a metric for measuring network performance; a lower packet loss rate indicates higher communication quality. Load measures the workload and stress on a network over a specific period, reflecting the data processing capacity and efficiency of gateway devices. Higher load indicates lower gateway performance and lower communication quality; lower load reduces latency and gateway congestion, improving network reliability and communication quality. Bandwidth capacity refers to the maximum capacity or rate at which a channel can transmit data per unit of time; higher bandwidth capacity indicates higher communication quality.
[0073] Electronic devices can evaluate communication quality from at least two of the following dimensions: latency, packet loss rate, load, bandwidth capacity, throughput, and bit error rate. This allows for a multi-dimensional assessment of communication quality and improves the reliability of the evaluation results.
[0074] The first evaluation result includes the first evaluation value Ec(GWi). In step 202, after the electronic device obtains the first communication index values of each dimension, it can normalize the first communication index values to obtain the normalized first communication index values; the first evaluation value Ec(GWi) is obtained based on the normalized first communication index values.
[0075] For example, from the perspective of low communication quality, the first communication indicator value can be normalized. Given that for dimensions such as latency, packet loss rate, load, and bit error rate, a higher first communication indicator value generally indicates lower communication quality, and given that for dimensions such as bandwidth capacity and throughput, a higher first communication indicator value generally indicates higher communication quality, normalization can be performed without processing the first communication indicator values for these dimensions, resulting in the same values before and after normalization. Furthermore, the first communication indicator values for dimensions such as bandwidth capacity and throughput can be negatively calculated to obtain normalized first communication indicator values for these dimensions. Using these normalized first communication indicator values for each dimension as the first evaluation value Ec(GWi) reduces the problem of the first evaluation value Ec(GWi) not accurately reflecting communication quality due to the different dimensions of the first communication indicator values for different dimensions, thus improving the reliability and accuracy of the first evaluation value Ec(GWi).
[0076] The above example, using the inverse of the first communication indicator value for some dimensions, illustrates the normalization process. Alternatively, for each dimension, the maximum and minimum first communication indicator values can be obtained, and the normalized first communication indicator value can be determined based on these values. This disclosure does not limit the normalization process.
[0077] When calculating the first evaluation value Ec(GWi) using the normalized first communication index value, the sum of each normalized first communication index value can be used as the first evaluation value Ec(GWi); the normalized first communication index values can be weighted, and the sum of the weighted first communication index values can be used as the first evaluation value Ec(GWi), etc.
[0078] In some embodiments, step 202 includes steps 2021 to 2022, wherein: Step 2021: Based on the correspondence between business scenario identifiers and weights, determine the third weight corresponding to each dimension; the business scenario identifier is used to indicate the business scenario of the control end and the controlled end. Step 2022: Generate the first evaluation result based on the first communication indicator values corresponding to at least two dimensions and the third weight corresponding to each dimension.
[0079] In this embodiment of the disclosure, the weights corresponding to each dimension can be determined based on the business scenarios of the control end and the controlled end, thereby highlighting the dimensions affecting communication quality in different scenarios through weights. For example, business scenarios include control scenarios, video transmission scenarios, and log transmission scenarios; the corresponding business scenario identifiers are control scenario identifier, video transmission identifier, and log transmission identifier, respectively. A control scenario can refer to a scenario where the control end controls the controlled end, or a scenario where the controlled end uploads emergency data, etc.; a video transmission scenario can refer to a scenario where the controlled end transmits video to the control end, or a scenario where the control end transmits video to the controlled end, etc.; a log transmission scenario can refer to a scenario where the control end transmits logs to the controlled end, or a scenario where the controlled end transmits logs to the control end.
[0080] When the business scenario is a control scenario, it represents the high importance of the transmitted data and requires rapid transmission. For example, the control end includes a mobile phone, and the controlled end includes a vehicle. The mobile phone can control the vehicle's driving, parking, etc., through pending commands. Alternatively, the vehicle may have a sentry system to monitor vehicle safety. When the sentry system issues a warning, the vehicle can transmit warning data to the mobile phone. The warning data indicates that the vehicle has been scratched, damaged, or is experiencing abnormal vibrations, so that the user can be notified of any problems with the vehicle in a timely manner. In this case, the channel needs to have characteristics such as high reliability and low latency. When calculating the first evaluation value Ec(GWi) through four dimensions—latency, packet loss rate, load, and bandwidth capacity—the average weights corresponding to the three dimensions of latency, packet loss rate, and load can be made greater than the weight corresponding to bandwidth capacity.
[0081] When the business scenario involves video transmission, it represents a large volume of data being transmitted. For example, a vehicle might have monitoring equipment to collect video data, which the vehicle then sends to a mobile phone. Since the amount of video data is typically greater than the amount of data in the instructions to be executed, the channel needs to have high bandwidth and be able to tolerate a certain amount of packet loss. Therefore, the weight corresponding to bandwidth capability can be greater than the weight corresponding to packet loss rate.
[0082] When the business scenario involves transmitting logs, it indicates that the transmitted data has high reliability and needs to be transmitted accurately. For example, a vehicle might send operational logs or fault diagnosis data to a mobile phone, or a mobile phone might send upgrade data to a vehicle. In this case, the channel needs to be highly reliable and tolerant of high latency, allowing the weight corresponding to packet loss rate to be greater than the weight corresponding to latency.
[0083] The first evaluation value Ec(GWi) of the electronic device can be calculated using the third formula under four dimensions: round-trip delay, packet loss rate, load, and bandwidth capacity. The third formula can be expressed as formula (3).
[0084] Ec(GWi)=w1 RTT_ci+w2 Loss_ci+w3 Load_i+w4 Cap_i, Formula (3); Where w1, w2, w3 and w4 represent the third weights corresponding to the four dimensions of round-trip time, packet loss rate, load and bandwidth capacity, respectively; RTT_ci, Loss_ci, Load_i and Cap_i represent the normalized first communication index values corresponding to the four dimensions of round-trip time, packet loss rate, load and bandwidth capacity, respectively.
[0085] In other words, the emphasis on each dimension varies across different business scenarios. By determining the weight of each dimension for each business scenario, a data foundation can be provided for subsequently selecting channels and target gateway devices that better suit the business scenario, thereby improving the communication effect between the control end and the controlled end. For example, the first alternative path has high latency but high reliability, the third alternative path has low latency but low reliability, and the fourth alternative path has high bandwidth. The system can determine the first, third, or fourth alternative path as the target path based on different business scenarios, thereby improving the communication effect between the vehicle and the mobile phone in different scenarios.
[0086] Similarly, in some embodiments, step 1022 includes: evaluating the communication quality between the second alternative gateway device and the controlled end in at least two dimensions, and generating a second communication indicator value corresponding to each dimension; wherein, the at least two dimensions include at least two of the following: latency, packet loss rate, load and bandwidth capacity; and generating a second evaluation result based on the second communication indicator values corresponding to the at least two dimensions.
[0087] A second evaluation result is generated based on the second communication indicator values corresponding to at least two dimensions, including: determining the third weight corresponding to each dimension based on the correspondence between business scenario identifiers and weights; the business scenario identifier is used to indicate the business scenario of the control end and the controlled end; and the second evaluation result is generated based on the second communication indicator values corresponding to at least two dimensions and the third weight corresponding to each dimension.
[0088] Referring to steps 201 to 202 and steps 2021 to 2022 above, the second evaluation result may include the second evaluation value Ev(GWj). The electronic device can calculate the second evaluation value Ev(GWj) using the fourth formula under the four dimensions of round-trip delay, packet loss rate, load and bandwidth capacity. The fourth formula can be expressed as formula (4).
[0089] Ev(GWj)=w1 RTT_vj +w2 Loss_vj +w3 Load_j+w4 Cap_j, Formula (4); Here, RTT_vj, Loss_vj, Load_j, and Cap_j represent the normalized second communication metric values corresponding to the four dimensions of round-trip time, packet loss rate, load, and bandwidth capacity, respectively. This allows for the quantification of the communication quality between the second candidate gateway device and the controlled end, providing a data foundation for subsequent screening to determine the target gateway device. When the first and second candidate gateway devices are the same, Load_j equals Load_i, and Cap_j equals Cap_i, meaning that the load and bandwidth of the same gateway device are equal.
[0090] In some embodiments, the pathway evaluation result includes a pathway evaluation value; step 103 includes steps 1031 to 1034, wherein: Step 1031: Determine the limit evaluation value from multiple pathway evaluation values; Step 1032: Determine the target pathway based on the alternative pathways corresponding to the limit evaluation value; Step 1033: If the first alternative gateway device and the second alternative gateway device included in the target path are the same, the first alternative gateway device included in the target path is determined as the target gateway device. Step 1034: If the first alternative gateway device and the second alternative gateway device included in the target path are different, the first alternative gateway device included in the target path is determined as the first target gateway device, and the second alternative gateway device included in the target path is determined as the second target gateway device.
[0091] In this embodiment of the disclosure, as described above, from the perspective of low communication quality, the first communication indicator value and the second communication indicator are normalized, and the limit evaluation value can refer to the smallest path evaluation value among multiple path evaluation values; similarly, if from the perspective of high communication quality, the first communication indicator value and the second communication indicator are normalized, the limit evaluation value can refer to the largest path evaluation value among multiple path evaluation values. For ease of explanation, this disclosure uses the perspective of low communication quality as an example for illustration.
[0092] Each candidate path corresponds to one path evaluation value. After determining the limit evaluation value, the target path can be determined based on the one-to-one correspondence between the path evaluation values and the candidate paths. Each target path corresponds to a control end and a controlled end, as well as at least one candidate gateway device. For example, if the first candidate path is determined to be the target path, the first target gateway device is a Beijing gateway device, and the second target gateway device is a Shanghai gateway device; if the third candidate path is determined to be the target path, the number of target gateway devices is 1, and the target gateway device is a Beijing gateway device; if the fourth candidate path is determined to be the target path, the number of target gateway devices is 1, and the target gateway device is a Shanghai gateway device. This allows consideration of the location of the control end and the controlled end, as well as the communication quality of the path. It also allows for the selection of high-quality target gateway devices based on the business scenarios of the control end and the controlled end, thereby improving the communication effect between the control end and the controlled end.
[0093] In some embodiments, the method further includes steps 1001 to 1003, wherein: Step 1001: If the target distance value is less than or equal to the distance threshold, determine the number of target gateway devices as a first preset value; wherein, the target distance value is used to indicate the distance between the control end and the controlled end, and the first target gateway device and the second target gateway device are the same; Step 1002: If the target distance is greater than the distance threshold, determine the number of target gateway devices to a second preset value; wherein the first target gateway device and the second target gateway device are different. Step 1003: If the number of target gateway devices is a first preset value and the gateway level indicated by the path evaluation result is lower than the preset level, determine the number of target gateway devices to be a first preset value or a second preset value.
[0094] In this embodiment of the disclosure, in addition to considering alternative gateway devices based on the locations of the control terminal and the controlled terminal, the electronic device can also determine the number of target gateway devices based on the distance between the control terminal and the controlled terminal.
[0095] If the target distance is less than or equal to the distance threshold, it indicates that the distance between the control end and the controlled end is short, and there is a high probability that the control end and the controlled end will communicate through the same gateway device. For example, if the control end and the controlled end are located in Beijing and Shanghai respectively, and the first and second candidate gateway devices are both Beijing gateway devices and Shanghai gateway devices, the electronic device can determine to select one of the Beijing gateway devices and Shanghai gateway devices as the target gateway device based on the fact that the number of target gateway devices is equal to 1. The first evaluation result and the second evaluation result can be calculated through the above steps, without calculating the third evaluation result, thereby reducing the amount of calculation and speeding up the selection of the target gateway device.
[0096] If the target distance is greater than a distance threshold, it indicates that the distance between the control end and the controlled end is large, and there is a high probability that the control end and the controlled end will communicate through two different gateway devices. For example, if the control end and the controlled end are located in Beijing and the eastern United States, respectively, the first alternative gateway device identified includes the Beijing gateway device, and the second alternative gateway device includes the eastern United States gateway device. The electronic device may determine not to evaluate the communication quality of the alternative path with only one alternative gateway device, based on the fact that the number of target gateway devices is equal to 2.
[0097] If the number of target gateway devices is a first preset value and the gateway level indicated by the path evaluation result is lower than the preset level, it indicates that the communication quality of the path including one gateway device is low. The path evaluation results of the alternative path including two gateway devices can be calculated, and then the path evaluation results of multiple paths are sorted to obtain the limit evaluation value. The target path is obtained based on the limit evaluation value. The number of gateway devices corresponding to the target path can be one or two.
[0098] In some embodiments, the path evaluation result is used to indicate the gateway level of the alternative gateway device corresponding to the alternative path. The alternative gateway device includes a first alternative gateway device and a second alternative gateway device. The gateway information includes configuration information. The method further includes: step 105, generating configuration information based on the service scenario identifier of the control terminal and the controlled terminal and the target gateway level corresponding to the target gateway device.
[0099] In this embodiment of the disclosure, the service scenario identifier includes at least one of the following: a control scenario identifier, a transmission video identifier, and a transmission log identifier; when the service scenario identifier is a control scenario identifier, first configuration information is generated based on the control scenario identifier and the target gateway level; when the service scenario identifier is a transmission video identifier, second configuration information is generated based on the transmission video identifier and the target gateway level; when the service scenario identifier is a transmission log identifier, third configuration information is generated based on the transmission log identifier and the target gateway level.
[0100] In other words, when the first configuration information, the second configuration information, and the third configuration information are used to indicate the configuration channel, the reliability index of the first channel configured by the first configuration information is higher than the reliability index of the second channel configured by the second configuration information, and the reliability index of the third channel configured by the third configuration information is higher than the reliability index of the second channel; the latency index of the first channel is lower than the latency index of the third channel; the packet loss index and bandwidth index of the second channel are higher than the packet loss index and bandwidth index of the first channel, and the packet loss index and bandwidth index of the second channel are higher than the packet loss index and bandwidth index of the third channel.
[0101] Furthermore, when the control end and the controlled end correspond to multiple different business scenarios, electronic devices can control the gateway device to construct different types of channels through configuration information. For example, when the business scenario identifier is a control scenario identifier, a transmission video identifier, and a transmission log identifier, the configuration information can instruct the gateway device to configure three channels. This allows different scenarios to correspond to different channels, ensuring that the data to be transmitted in different scenarios will not affect each other. This reduces the probability of packet loss in other scenarios due to a sudden increase in the amount of data to be transmitted in one scenario.
[0102] For example, the first configuration information is used to indicate the configuration of the control command channel, which features low latency and high reliability and is dedicated to transmitting control commands such as steering wheel, gear shift, and emergency braking; the second configuration information is used to indicate the configuration of the video stream channel, which features high bandwidth and can tolerate a certain amount of packet loss and is used to transmit video from multiple cameras to the mobile phone; the third configuration information is used to indicate the configuration of the log / program upgrade channel, which features high reliability and can tolerate high latency and is used to transmit diagnostic data and firmware information.
[0103] The first configuration information includes either first allocation information or second allocation information. When the service scenario identifier is a control scenario identifier, the first configuration information is generated based on the control scenario identifier and the target gateway level, including: generating the first configuration information based on the matching degree between the control scenario identifier and the target gateway level. For example, the first configuration information may include allocation information, which is arranged in descending order of matching degree as: first allocation information, second allocation information, and third allocation information; the quality of the data to be transmitted indicated by the first allocation information is higher than the quality of the data to be transmitted indicated by the second allocation information, and the quality of the data to be transmitted indicated by the second allocation information is higher than the quality of the data to be transmitted indicated by the third allocation information.
[0104] The gateway levels mentioned above may include Level 1, Level 2, or Level 3; electronic devices can pre-determine the correspondence between service scenario identifiers and preset gateway levels. The preset gateway level corresponding to the service scenario identifier is determined; if the preset gateway level and the target gateway level have a high degree of matching, the control scenario identifier and the target gateway level are also determined to have a high degree of matching; if the preset gateway level and the target gateway level have a low degree of matching, the control scenario identifier and the target gateway level are also determined to have a low degree of matching.
[0105] In other words, when the target gateway level and the preset gateway level have a low matching degree, the quality of the data to be transmitted can be reduced. For example, when the data to be transmitted is video data, if the preset gateway level and the target gateway level have a high matching degree, the vehicle obtains high-definition video data according to the first allocation information; the high-definition video data can be transmitted to the mobile phone through the target channel corresponding to the target path. The vehicle can adjust the video data according to the second allocation information by reducing the frame rate, reducing the resolution, etc., and transmit the adjusted video data to the mobile phone, thereby reducing the amount of data to be transmitted and enabling the user to obtain the video data as soon as possible, and to learn about the vehicle's status and other information through the video data.
[0106] Specifically, when the first configuration information is used to indicate channel configuration, the encryption index of the channel indicated by the first allocation information is lower than the encryption index of the channel indicated by the second allocation information. For example, if the preset gateway level is level 1 and the target gateway level is level 1, and the matching degree between the preset gateway level and the target gateway level is high, the first allocation information indicates that the target gateway device can disable the encrypted tunnel; when the target gateway level is level 2 or 3, and the matching degree between the preset gateway level and the target gateway level is low, the second allocation information indicates that the target gateway device enables the encrypted tunnel.
[0107] For example, the preset gateway level for the control scenario is Level 1 and cannot be Level 3. The preset gateway level for both the video transmission scenario and the log transmission scenario is Level 1. This means that in the video transmission scenario or the log transmission scenario, if the target gateway device's target gateway level is Level 1, 2, or 3, video, logs, firmware information, and other data can be transmitted through the channel corresponding to that target gateway device. Furthermore, if the target gateway device's target gateway level is Level 2 or 3, the data to be transmitted can be processed by reducing the frame rate, reducing the resolution, and compressing it to obtain a reduced data volume, thereby reducing the amount of data transmitted. In the control scenario, if there is no Level 1 gateway device, a Level 2 gateway device can be selected as the target gateway device, and the target gateway device can be controlled to enable an encrypted tunnel.
[0108] Figure 3 A schematic diagram of another connection provided in an embodiment of this application, such as... Figure 3The control terminal 31 includes a mobile phone located domestically, and the controlled terminal 35 includes a vehicle located overseas. The first target gateway device 32 includes a domestic gateway device GW-CN, and the second target gateway device 34 includes a US East Coast gateway device GW-US. The first target gateway device 32 and the second target gateway device 34 can communicate with each other through a backbone network 33. The backbone network 33 is used to forward data to be transmitted without processing the data. When the control terminal 31 sends data to be transmitted, the data is used to instruct the viewing, control, and transmission of information of the vehicle, and may include instructions, firmware information, etc. When the controlled terminal 35 sends data to be transmitted, the data includes warning data, video, logs, etc.
[0109] Different business scenarios can correspond to different channels. For example, a control scenario can correspond to a control command channel, a video transmission scenario can correspond to a video stream channel, and a log transmission scenario can correspond to a log stream channel. The channel level can change with the target gateway level. The channel levels of multiple channels between two target gateway devices can be the same or different. When the gateway level of the first target gateway device 32 and the second target gateway device 34 is determined to be level 1 in the control scenario, the channel level of the control command channel is level 1. When the gateway level of the first target gateway device 32 and the second target gateway device 34 is level 2 in the video transmission scenario, the channel level of the video stream channel is level 2. When the gateway level of the first target gateway device 32 and the second target gateway device 34 is level 3 in the log transmission scenario, the channel level of the log stream channel is level 3.
[0110] In the control scenario, if the target gateway level is calculated to be level 2, when the controlled terminal 35 sends the data to be transmitted, the first target gateway device opens an encrypted tunnel to encrypt the data to be transmitted, generating encrypted data to be transmitted; the encrypted data to be transmitted is sent to the backbone network through the level 2 control command channel; the backbone network forwards the encrypted data to be transmitted to the second target gateway device 34; the second target gateway device 34 decrypts the encrypted data to be transmitted and sends the decrypted data to be transmitted to the controlled terminal 35 through the level 2 control command channel.
[0111] In some embodiments, the method further includes: step 106, receiving controlled terminal information sent by the controlled terminal when the connection status with the controlled terminal is a reconnection status; The controlled end information also includes communication information between the controlled end and the third target gateway device in the disconnected state. The disconnected state is used to indicate that the connection between the controlled end and the controlled end is broken. The third target gateway device is the device determined by the controlled end based on the location and historical communication information of the controlled end in the disconnected state. Step 105 may include: generating configuration information corresponding to the controlled terminal based on the business scenario identifier, target gateway level, and communication information.
[0112] In this embodiment of the disclosure, the controlled terminal can be connected to the electronic device through a second target gateway device. The controlled terminal can periodically send heartbeat information to the electronic device through the second target gateway device, and the electronic device can send heartbeat feedback to the controlled terminal through the second target gateway device. The connection status between the controlled terminal and the electronic device is a connected state. When the controlled terminal does not receive heartbeat feedback, the controlled terminal can determine that the connection status between the controlled terminal and the electronic device is a disconnected state. Similarly, when the electronic device does not receive heartbeat information, the electronic device can determine that the connection status between the electronic device and the controlled terminal is a disconnected state.
[0113] In the disconnected state, the controlled terminal can autonomously determine the gateway device to be connected to, and use this autonomously determined gateway device as the third target gateway device, and determine the communication information when connecting to the third target gateway device. The communication information includes first communication information and / or second communication information. The first communication information is used to indicate the communication quality between the controlled terminal and the third target gateway device, for example, the communication information includes information such as latency, bit error rate, and packet loss rate; the second communication information can be used to instruct the controlled terminal on the processing of the data to be transmitted, for example, the communication information may also include encryption algorithm, encoding method, resolution setting, etc.
[0114] The controlled device can re-establish a connection with the electronic device through the third target gateway device. At this time, the connection status between the electronic device and the controlled device is a reconnection state. The electronic device can run the first target model. Based on the business scenario identifier, target gateway level and communication information, the first target model generates the configuration information corresponding to the controlled device. Thus, the electronic device can combine the communication information between the controlled device and the third target gateway device to obtain the configuration information for the controlled device.
[0115] In some embodiments, when the service scenario identifier is a control scenario identifier, the electronic device adjusts the target gateway level corresponding to the video transmission scenario to level two and / or adjusts the target gateway level corresponding to the log transmission scenario to level two, based on the fact that the target gateway level corresponding to the control scenario identifier is not level one.
[0116] In this embodiment of the disclosure, since the data to be transmitted between the control end and the controlled end in the control scenario is often related to control and emergency scenarios, and the data to be transmitted is relatively important, in order to save the resources of the first-level gateway device, the electronic device can adjust the first-level target gateway device corresponding to the transmission video scenario and / or transmission log scenario to the second-level target gateway device, thereby reducing the amount of data transmitted by the first-level target gateway device and increasing the number of gateway devices corresponding to the control scenario, thereby improving the security, reliability and transmission rate of the data transmitted between the control end and the controlled end in the control scenario.
[0117] Alternatively, when the electronic device is identified as a control scenario, based on the fact that the duration of the non-Level 1 target gateway device corresponding to the control scenario exceeds the duration threshold, the target gateway level corresponding to the video transmission scenario is adjusted to Level 2, and / or the target gateway level corresponding to the log transmission scenario is adjusted to Level 2. In order to ensure the continuity of control or early warning data transmission, higher latency and lower reliability can be received, etc., and the data to be transmitted corresponding to the control scenario can be temporarily transmitted through the Level 2 gateway device. During the temporary transmission duration, the Level 1 target gateway device corresponding to the video transmission scenario and / or the log transmission scenario can be adjusted to the Level 2 target gateway device. This way, the transmission of the data to be transmitted corresponding to the control scenario is not delayed, and the target gateway device corresponding to the video transmission scenario and / or the log transmission scenario can be adjusted as soon as possible.
[0118] In some embodiments, the electronic device controls the target gateway device corresponding to the control terminal and / or the controlled terminal to switch, and stores the data to be transmitted during the switching period; or, during the switching period, controls the target gateway device before the switch to store the data to be transmitted.
[0119] In this embodiment of the present disclosure, as described above, the electronic device can switch the secondary target gateway device corresponding to the control terminal to the primary target gateway device in a control scenario. To avoid the loss of data to be transmitted during the switching process, the electronic device can cache the data to be transmitted that has been received by the target gateway device of the earphone; or, during the switching period, the electronic device can control the secondary target gateway device to cache the received data to be transmitted and send the cached data to be transmitted to the primary target gateway device, thereby avoiding the loss of data to be transmitted.
[0120] Figure 4 A flowchart of another method for determining a gateway device provided in this application embodiment, the method being applied to a controlled end, the method including step 401, wherein: Step 401: Receive gateway information sent by the electronic device; The gateway information includes at least one first alternative gateway device determined by the electronic device based on the control terminal information, and at least one second alternative gateway device determined based on the controlled terminal information; wherein the first alternative gateway device is a device determined based on the location of the control terminal indicated by the control terminal information, and the second alternative gateway device is a device determined based on the location of the controlled terminal indicated by the controlled terminal information; the communication quality of the alternative paths is evaluated to generate path evaluation results; wherein the alternative paths include the control terminal, the controlled terminal, the first alternative gateway device, and the second alternative gateway device; based on the path evaluation results, information is sent after determining the target gateway devices corresponding to the control terminal and the controlled terminal; wherein the number of target gateway devices is a first preset value or a second preset value.
[0121] In this embodiment, the controlled terminal can periodically send controlled terminal information to the electronic device so that the electronic device can know the location of the controlled terminal in a timely manner. The controlled terminal can also send controlled terminal information to the electronic device after its location changes. This disclosure does not limit the timing of when the controlled terminal sends controlled terminal information. The controlled terminal information can be used to indicate the location of the controlled terminal. For example, the controlled terminal information may include a first regional identifier, a first IP identifier, a first GPS identifier, or other identifiers representing the location of the control terminal. Referring to steps 101 to 104 above, the electronic device can determine the first and second alternative gateway devices corresponding to the control terminal and the controlled terminal, respectively, based on their locations. A bidirectional communication path is then formed by the control terminal, at least one gateway device, and the controlled terminal. The communication quality of the channel in this path is evaluated, thereby determining the target gateway device from the first and second alternative gateway devices to better realize communication between the control terminal and the controlled terminal. The target gateway device is determined after considering the location of the control terminal and the controlled terminal and the overall communication quality. Communicating through the target gateway device can improve the communication quality and efficiency between the control terminal and the controlled terminal.
[0122] In some embodiments, the method further includes steps 4001 to 4003, wherein: Step 4001: When the connection status with the electronic device is disconnected, a third target gateway device is determined based on the location and historical communication information of the controlled terminal, so as to connect with the electronic device through the third target gateway device; wherein, the disconnected status is used to indicate that the connection with the electronic device is broken. Step 4002: Determine the first communication information and / or the second communication information; wherein, the first communication information is used to indicate the communication quality with the third target gateway device, and the second communication information is used to indicate the processing method of the data to be transmitted, and the data to be transmitted is the data to be transmitted to the control terminal; Step 4003: If the connection status with the electronic device is in reconnection state, send the controlled end information to the controlled end; The controlled end information also includes communication information.
[0123] In this embodiment of the disclosure, the controlled terminal may run a second target model, which is used to determine a third target gateway device by combining the location and historical communication information of the controlled terminal. For example... Figure 2As shown, communication between the controlled terminal and the electronic device occurs through a second target gateway device. If the connection between the controlled terminal and the electronic device is lost, it indicates that at least one of the following faults has occurred: the channel between the controlled terminal and the second target gateway device is disconnected; the channel between the second target gateway device and the electronic device is disconnected; or the second target gateway device malfunctions. To promptly re-establish connection with the electronic device and the control terminal, the controlled terminal can determine a third target gateway device through the running second target model, and then re-establish connection with the electronic device through the third target gateway device.
[0124] For example, the controlled end may include a vehicle. When the vehicle travels to a network blind spot such as a tunnel, the connection with the electronic device will be lost. The vehicle may include an edge prediction module, which is used to run a second target model. If no heartbeat feedback is received within a certain period of time, the controlled end determines that it is disconnected from the electronic device. When the edge prediction module is triggered to perform edge prediction, it determines a third alternative gateway device based on the location of the controlled end and determines the historical communication information corresponding to the third alternative gateway device. The historical communication information corresponding to the third alternative gateway device can be information stored locally on the controlled end, such as historical gateway delays, or information sent by the electronic device, such as information sent by the electronic device to the second target gateway device, as well as information from other second alternative gateway devices. This allows the controlled end to determine the third target gateway device from the third alternative gateway devices through the second target model, and then directly attempt to establish a connection with the third target gateway device; after the connection is established, it re-establishes a connection with the electronic device.
[0125] In some embodiments, the path evaluation result is used to indicate the gateway level of the candidate gateway devices included in the candidate path. The candidate gateway devices include a first candidate gateway device and a second candidate gateway device. The gateway information includes configuration information, which includes information generated by the electronic device based on the service scenario identifiers of the control terminal and the controlled terminal and the target gateway level corresponding to the target gateway device. The method further includes: determining at least one of the following based on the configuration information: the encryption algorithm, encoding method and resolution for the data to be transmitted.
[0126] In this embodiment of the disclosure, as described above, when the target gateway level and the preset gateway level have a low degree of matching, the electronic device determines a degradation strategy. The degradation strategy includes at least one of the following: downgrading the encryption algorithm, encoding method and resolution of the data to be transmitted, thereby reducing the amount of data transmitted when the degree of matching is low.
[0127] For example, encryption algorithms may include symmetric encryption algorithms, asymmetric encryption algorithms, etc., encoding methods may include H.264, H.265, etc., and resolutions may include 360P, 720P, etc. The lower the match between the target gateway level and the preset gateway level, the less data the control end and the controlled end can transmit and / or the higher the encryption level can be through downgrade strategies.
[0128] In some embodiments, the electronic device includes a scheduling server, the control terminal includes a mobile phone, and the controlled terminal includes an electronic device. Figure 5 An interactive signaling diagram provided for an embodiment of this application, such as Figure 5 As shown, it includes: Step 501: The mobile phone sends control terminal information to the dispatch server, and the vehicle sends controlled terminal information to the dispatch server. The control terminal information includes the location of the mobile phone, and the controlled terminal information includes the location of the vehicle. Step 502: The scheduling server determines the alternative gateway devices corresponding to the mobile phone and the vehicle according to their locations; wherein the mobile phone corresponds to the first alternative gateway device and the vehicle corresponds to the second alternative gateway device. Step 503: The scheduling server evaluates the alternative paths corresponding to the alternative gateway devices based on the business scenario, and obtains the path evaluation value and gateway level. Step 504: The scheduling server determines the first target gateway device corresponding to the mobile phone and the second target gateway device corresponding to the vehicle based on the path evaluation value; wherein, the first target gateway device and the second target gateway device may be the same or different; Step 505: The scheduling server sends the first target gateway information to the mobile phone and the second target gateway information to the vehicle; Step 506: Based on the first target gateway information, the mobile phone controls the connected gateway device to be the first target gateway device; based on the second target gateway information, the vehicle controls the connected gateway device to be the second target gateway device. Step 507: The scheduling server, in conjunction with the business scenario and the gateway level of the target gateway device, determines the first target configuration information corresponding to the mobile phone, the second target configuration information corresponding to the vehicle, and the third target configuration information corresponding to the target gateway device. Step 508: The scheduling server sends the first target configuration information to the mobile phone and the second target configuration information to the vehicle; Step 509: The mobile phone determines the processing method for the data to be transmitted based on the first target configuration information, and the vehicle determines the processing method for the data to be transmitted based on the second target configuration information. Step 510: The vehicle disconnection triggers local prediction and decision-making on the edge side to determine the third target gateway device, so as to re-establish the connection with the scheduling server through the third target gateway device; Step 511: Vehicle reconnection triggers the sending of controlled terminal information. The controlled terminal information also includes communication information between the vehicle and the third target gateway device, so that the scheduling server can combine the business scenario, the gateway level of the target gateway device and the communication information to determine the first target configuration information corresponding to the mobile phone, the second target configuration information corresponding to the vehicle and the third target configuration information corresponding to the target gateway device. In this embodiment of the disclosure, step 508 further includes a scheduling server sending third target configuration information to the target gateway device, thereby enabling the first target gateway device and / or the second target gateway device to process or forward the data to be transmitted sent by the mobile phone or vehicle based on the third target configuration information.
[0129] The scheduling server, based on the path evaluation value corresponding to each alternative path, determines the alternative gateway devices for the vehicle and mobile phone after identifying their respective locations. It then evaluates at least one alternative path for each gateway device, mobile phone, and vehicle, providing a data foundation for communication quality. The scheduling server can clearly identify the channel with better communication quality through communication commands, improving the communication effect between the mobile phone and vehicle. This overcomes the shortcomings of related technologies that select gateway devices based on proximity, resulting in long communication times when the distance between the mobile phone and vehicle is far, leading to long communication times between the mobile phone / vehicle and the gateway device. Furthermore, when calculating the path evaluation value... Furthermore, it also combines the business scenarios of mobile phones and vehicles, such as steps 201 to 202 above, to configure different weights for different dimensions, and as in steps 10231 to 10234 above, to configure different weights for the first evaluation result and the second evaluation result corresponding to the control end and the controlled end, respectively. This avoids the problem of one-sided path evaluation value caused by a single evaluation dimension. It can automatically adjust the weights corresponding to latency, packet loss rate, load and bandwidth capacity according to the different needs of low latency, high bandwidth and high reliability in different business scenarios, improve the accuracy and reliability of path evaluation value, and provide a data foundation for subsequent gateway device allocation and resource configuration. After determining the first target gateway device corresponding to the mobile phone and the second target gateway device corresponding to the vehicle, the scheduling server can determine whether the previous first target gateway device connected to the mobile phone is indeed the first target gateway device, and whether the previous second target gateway device connected to the vehicle is indeed the second target gateway device. If the previous first target gateway device is the same as the first target gateway device, the first target gateway information does not need to be sent to the mobile phone, thereby reducing the amount of data transmitted by the scheduling server. If the previous first target gateway device is different from the first target gateway device, it indicates that the scheduling server has determined a new gateway device for the mobile phone. The scheduling server can send the first target gateway information to the mobile phone, and the mobile phone will switch the connected gateway device from the previous first target gateway device to the latest first target gateway device, thereby improving the quality of subsequent communication. Similarly, the scheduling server can also determine whether to send the second target gateway information to the vehicle based on whether the previous second target gateway device and the second target gateway device are the same.
[0130] In addition, when using dual gateways for relaying, compared to related technologies where control commands and video streams are transmitted together, causing bandwidth congestion and loss of commands sent by mobile phones during backbone network fluctuations, this disclosure can determine the corresponding gateway devices for mobile phones and vehicles in different scenarios, thereby reducing the situation of mixed transmission of control commands and video streams. The level of alternative paths and alternative gateway devices can be determined through path evaluation values. The levels of alternative paths and alternative gateway devices are the same. As mentioned above, different business scenarios can correspond to different preset gateway levels. When the matching degree between the preset gateway level and the target gateway level is low, the vehicle can reduce the resolution of the image in the video and reduce the amount of video stream data through different encoding methods, thereby reducing the number of video stream units, reducing the bandwidth occupied by the video stream, and reducing the probability of lost commands sent by mobile phones. Furthermore, as mentioned above, in the control scenario, the preset gateway level is level 1. When the matching degree between the preset gateway level and the target gateway level is low, the gateway device used for data transmission can be controlled to transmit commands through an encrypted channel, thereby enabling traffic splitting and security isolation of business stream types. Furthermore, it also takes into account that vehicles may travel to places with poor network signals, such as tunnels. To avoid having to wait until the vehicle reaches a place with good network signal before it can reconnect to the dispatch server, the vehicle can run a second target model. This allows the vehicle to automatically identify the third target gateway device to connect to when it detects a disconnection from the dispatch server, and then reconnect to the dispatch server as soon as possible. Similarly, it can also reconnect to the mobile phone as soon as possible through the third target gateway device, reducing the disaster recovery requirements for highly mobile devices such as vehicles.
[0131] In other embodiments, the electronic device can also pre-determine the number of target gateway devices based on the distance between the mobile phone and the vehicle. If the distance between the vehicle and the mobile phone is short, the electronic device determines the number of target gateway devices to be 1. Therefore, when calculating the path evaluation value corresponding to the alternative paths, it can first calculate the path evaluation value corresponding to the alternative path with 1 alternative gateway device. If the distance between the vehicle and the mobile phone is long, the electronic device determines the number of target gateway devices to be 2. Therefore, when calculating the path evaluation value corresponding to the alternative paths, it can first calculate the path evaluation value corresponding to the alternative path with 2 alternative gateway devices. To avoid... To avoid overlooking cases where the communication quality of the alternative paths corresponding to two alternative gateway devices is good, if the number of target gateway devices is determined to be 1, and the path evaluation value corresponding to the alternative path of the 1 alternative gateway device indicates that the gateway level of the alternative gateway device is not Level 1, then the path evaluation values corresponding to the alternative paths of the 2 alternative gateway devices can be calculated. Then, the path evaluation values corresponding to the alternative paths of the 1 alternative gateway device and the alternative paths of the 2 alternative gateway devices are compared to determine the minimum path evaluation value. The alternative path corresponding to the minimum path evaluation value can correspond to 1 or 2 alternative gateway devices.
[0132] In this embodiment, when the mobile phone and vehicle are close together, the communication time between the two gateway devices is often longer than the communication time between the mobile phone or vehicle and a single gateway device. Therefore, when the mobile phone and vehicle are close together, communication is usually conducted through a single gateway device. Similarly, when the mobile phone and vehicle are far apart, communication is usually conducted through two gateway devices. Based on this, the electronic device can compare the target distance value between the mobile phone and the vehicle with a distance threshold. When the target distance value is less than or equal to the distance threshold, it indicates that the vehicle and the mobile phone are close. The electronic device can then prioritize determining whether the gateway device is at level one if the mobile phone and vehicle are connected to the same gateway device. If the gateway device is at level one, it is selected as the target gateway device, thereby reducing the number of calculations and comparisons of path evaluation values and accelerating the determination of the target gateway device.
[0133] When the gateway device is at level two or three, then the alternative paths of the corresponding two alternative gateway devices are considered. This allows for the determination of the better alternative path by combining the path evaluation values of the alternative paths of one alternative gateway device and the alternative paths of the two alternative gateway devices, thereby improving the communication quality and effect between mobile phones and vehicles.
[0134] When the target distance value is greater than the distance threshold, it indicates that the distance between the vehicle and the mobile phone is far. Electronic devices can prioritize determining whether the two gateway devices are at the same level when the mobile phone and the vehicle are connected to different gateway devices. This reduces the number of calculations and comparisons of path evaluation values and speeds up the determination of the target gateway device. Similarly, if there are no gateway devices at the same level, it can first determine whether there is a candidate path corresponding to one gateway device. Then, the path evaluation value of the candidate path corresponding to one gateway device can be calculated and compared to select the gateway device with high communication quality.
[0135] For example, consider a gateway device GW-BJ deployed in Beijing and a gateway device GW-SH deployed in Shanghai. A mobile phone is located in Beijing, and a vehicle is located in Shanghai; they are in adjacent regions, so the number of target gateway devices is determined to be 1. The latency from the mobile phone to GW-BJ is determined to be 20ms, and to GW-SH 40ms; the latency from the vehicle to GW-BJ is 35ms, and to GW-SH 15ms. The scheduling server determines the weights for the four dimensions—round-trip latency, packet loss rate, load, and bandwidth capacity—to be: w1=0.5, w2=0.2, w3=0.2, w4=0.1, with a packet loss rate of 0.1% for all dimensions and comparable load and bandwidth capacity.
[0136] When both the first and second alternative gateway devices are GW-BJ, the first evaluation value Ec(GW-BJ) = 0.5 can be calculated using the above formula (3). 20 + 0.2 0.1 + 0.2 Load_BJ+0.1 Cap_BJ; The second evaluation value Ev(GW-BJ) = 0.5 can be calculated using the above formula (4). 35+0.2 0.1 + 0.2 Load_BJ+0.1 Cap_BJ, the pathway evaluation value E(GW-BJ) can be calculated using the above formula (1) = a (0.5 20 + 0.2 0.1 + 0.2 Load_BJ+0.1 Cap_BJ)+b (0.5 35+0.2 0.1 + 0.2 Load_BJ +0.1 Similarly, when both the first and second alternative gateway devices are GW-SH, the path evaluation value E(GW-SH) can be calculated as a. (0.5 40+0.2 0.1 + 0.2 Load_SH+0.1 Cap_SH)+b (0.5 15 + 0.2 0.1 +0.2 Load_SH+ 0.1 Cap_SH).
[0137] Assuming that both E(GW-BJ) and E(GW-SH) are less than or equal to the threshold T1, then both GW-BJ and GW-SH are first-level gateways; when E(GW-BJ) equals E(GW-SH), either GW-BJ or GW-SH can be used as the target gateway device; when E(GW-BJ) is greater than E(GW-SH), then GW-SH can be used as the target gateway device; when E(GW-BJ) is less than E(GW-SH), then GW-BJ can be used as the target gateway device, and both the vehicle and the control terminal are connected to this GW-BJ.
[0138] If the current target gateway device for the mobile phone and vehicle is GW-BJ, and if E(GW-BJ) is calculated to be greater than E(GW-SH), or in other words, E(GW-BJ) is greater than the product of E(GW-SH) and a preset ratio, the scheduling server can determine that the next target gateway device is GW-SH. The scheduling server can then control the mobile phone and vehicle to switch their connection to the target gateway device GW-SH, thereby enabling real-time switching of the target gateway device and improving communication quality and performance.
[0139] For example, consider the following gateways: GW-US-EAST (US East), GW-EU (Europe), and GW-CN-SH (China). A mobile phone is located in Shanghai, China, while a vehicle is located in the eastern United States. The measured latency from the mobile phone to GW-CN-SH is 20ms, to GW-EU is 140ms, and to GW-US-EAST is 200ms. The latency from the vehicle to GW-US-EAST is 30ms, to GW-EU is 100ms, and to GW-CN-SH is 180ms. GW-US-EAST and GW-EU communicate via a backbone network.
[0140] The scheduling server determines the dual-gateway mode based on the location of both ends. In the business scenario, the path evaluation value determines that the mobile phone connects to the domestic first-level GW-CN-SH, and the vehicle connects to the US East-level GW-US-EAST. When both gateway devices are first-level gateway devices, an encrypted tunnel can also be enabled. Commands sent by the mobile phone can be transmitted through the encrypted tunnel between GW-CN-SH and GW-US-EAST, using Chinese cryptographic algorithms or AES-256 encryption. Video streams sent by the vehicle can use the ordinary video channel between GW-CN-SH and GW-US-EAST, and the video can be compressed using H.264 / H.265 to obtain the video stream. Logs and diagnostic data sent by the vehicle can use the low-priority channel between GW-CN-SH and GW-US-EAST, with acceptable latency.
[0141] The current business scenario is an emergency vehicle control scenario within a control scenario. GW-CN-SH and GW-US-EAST can establish a low-latency control channel in response to configuration information issued by the dispatch service area, facilitating the transmission of control commands for vehicle components such as the steering wheel, gear shift, and brakes. Additionally, in the current business scenario of video transmission, GW-CN-SH and GW-US-EAST can establish a high-bandwidth video channel in response to configuration information issued by the dispatch service area, enabling the transmission of video streams. These two distinct channels can transmit data corresponding to different scenarios, avoiding interference between data transmitted in different scenarios.
[0142] Analyzing from the perspective of end-to-end latency, the total end-to-end latency using the dual-gateway multi-channel collaborative mode is approximately: Mobile phone → GW-CN-SH (20ms) + Backbone network (80ms) + GW-US-EAST → Controlled device (30ms) = 130ms. Compared to the traditional single-gateway solution where the mobile phone directly connects to the overseas gateway GW-US-EAST, latency is significantly reduced, and control commands are transmitted through a dedicated encrypted channel, greatly improving security and reliability. Furthermore, the dual-gateway mode breaks through the traditional pipeline relay, establishing a dedicated channel for commands and a dedicated channel for video data, avoiding video bandwidth congestion and providing encrypted tunnel isolation for high-security commands.
[0143] In the current business scenario, which involves emergency vehicle control and video transmission within a control scenario, when cross-border backbone links become congested, the target channel corresponding to this target path can be downgraded from a primary channel to a secondary channel. Gateway devices can respond to configuration information by executing a "preserve command, discard video" strategy: proactively discarding some key video frames to free up bandwidth and ensure uninterrupted control command flow. Vehicles can respond to configuration information by reducing the video frame rate from 30fps to 15fps and increasing FEC redundancy to ensure the real-time performance of control commands. When the communication quality between GW-CN-SH and GW-US-EAST deteriorates, the scheduling server attempts to switch the vehicle's access gateway to the European gateway GW-EU, forming a path of mobile phone → GW-CN-SH → European GW-EU → vehicle, while maintaining encryption and low latency for control commands.
[0144] If a vehicle enters a weak network area and loses contact with the dispatch server, the vehicle's edge prediction module, based on local records, detects that the GW-US-WEST gateway previously had lower latency and higher reliability. It then autonomously initiates keep-alive and reconnection requests to GW-US-WEST to maintain uninterrupted remote control. Furthermore, it automatically determines the video processing method based on significant network fluctuations. After reconnecting to the dispatch server, the vehicle synchronizes its local decision results to the dispatch server, which then reassesses and issues new gateway device and / or configuration information. This improves the flexibility of gateway device connection in situations of disconnection or weak network conditions, meeting the disaster recovery needs of highly mobile devices such as vehicles.
[0145] In some embodiments, the above Figure 4 The steps of the method for determining the gateway device shown can be executed by the control terminal. This disclosure does not limit the control terminal and the controlled terminal. For example, the control terminal may include a mobile phone and the controlled terminal may include a vehicle; or, the control terminal may include a vehicle and the controlled terminal may include a mobile phone, etc.
[0146] Figure 6 This is a schematic diagram of a gateway device determination apparatus provided in an embodiment of this application, as shown below. Figure 6 As shown, the determining device 600 for the gateway device includes: The first determining module 601 is used to determine at least one first alternative gateway device based on control terminal information, and to determine at least one second alternative gateway device based on controlled terminal information; wherein, the first alternative gateway device is a device determined based on the location of the control terminal indicated by the control terminal information, and the second alternative gateway device is a device determined based on the location of the controlled terminal indicated by the controlled terminal information. The generation module 602 is used to evaluate the communication quality of the alternative paths and generate path evaluation results; wherein, the alternative paths include a control terminal, a controlled terminal, a first alternative gateway device, and a second alternative gateway device; The second determining module 603 is used to determine the target gateway devices corresponding to the control end and the controlled end based on the path evaluation results; wherein the number of target gateway devices is a first preset value or a second preset value; The first sending module 604 is used to send gateway information to at least one of the following: a control terminal, a controlled terminal, and a target gateway device; wherein the gateway information is used to indicate the configuration of at least one of the following: a control terminal, a controlled terminal, and a channel between the control terminal and the controlled terminal.
[0147] In some embodiments, the generation module 602 is configured to: The communication quality between the first alternative gateway device and the control terminal is evaluated, and a first evaluation result is generated. The communication quality between the second alternative gateway device and the controlled end is evaluated, and a second evaluation result is generated. Pathway evaluation results are generated based on the first and second evaluation results; The first alternative gateway device and the second alternative gateway device may be the same or different.
[0148] In some embodiments, the path evaluation result includes a path evaluation value; when the first alternative gateway device and the second alternative gateway device are the same, the generation module 602 is used to: Obtain the business scenario identifiers of the control end and the controlled end; Based on the correspondence between business scenario identifiers and weights, determine the first weight corresponding to the first evaluation result and the second weight corresponding to the second evaluation result; The first evaluation result is weighted based on the first weight to generate a first weighted evaluation result, and the second evaluation result is weighted based on the second weight to generate a second weighted evaluation result. Based on the first weighted evaluation results and the second weighted evaluation results, a pathway evaluation value is generated.
[0149] In some embodiments, when the first alternative gateway device and the second alternative gateway device are different, the generation module 602 is used to: A third evaluation result is determined for the first alternative gateway device and the second alternative gateway device; wherein the third evaluation result is used to indicate the communication quality between the first alternative gateway device and the second alternative gateway device; Based on the first weighted evaluation result, the second weighted evaluation result, and the third evaluation result, a pathway evaluation value is generated.
[0150] In some embodiments, the generation module 602 is configured to: The communication quality between the first alternative gateway device and the control terminal is evaluated in at least two dimensions, and a first communication indicator value is generated for each dimension; wherein, the at least two dimensions include at least two of the following: latency, packet loss rate, load and bandwidth capacity; A first evaluation result is generated based on the first communication indicator values corresponding to at least two dimensions.
[0151] In some embodiments, the pathway evaluation result includes a pathway evaluation value; the second determining module 603 is configured to: Determine the limiting evaluation value from multiple pathway evaluation values; Based on the alternative pathways corresponding to the limit evaluation values, the target pathway is determined. If the first alternative gateway device and the second alternative gateway device included in the target path are the same, the first alternative gateway device included in the target path shall be determined as the target gateway device; If the first alternative gateway device and the second alternative gateway device included in the target path are different, the first alternative gateway device included in the target path shall be determined as the first target gateway device, and the second alternative gateway device included in the target path shall be determined as the second target gateway device.
[0152] In some embodiments, the determining device 600 of the gateway device further includes: a third determining module, configured to: If the target distance value is less than or equal to the distance threshold, the number of target gateway devices is determined to be a first preset value; wherein, the target distance value is used to indicate the distance between the control end and the controlled end, and the first target gateway device and the second target gateway device are the same; If the target distance is greater than a distance threshold, the number of target gateway devices is determined to be a second preset value; wherein the first target gateway device and the second target gateway device are different. If the number of target gateway devices is a first preset value and the gateway level indicated by the path evaluation result is lower than the preset level, the number of target gateway devices is determined to be either the first preset value or the second preset value.
[0153] In some embodiments, the path evaluation result is used to indicate the gateway level of the candidate gateway devices included in the candidate path. The candidate gateway devices include a first candidate gateway device and a second candidate gateway device. The gateway information includes configuration information. The gateway device determination device 600 further includes: a second generation module, used to generate configuration information based on the service scenario identifiers of the control end and the controlled end and the target gateway level corresponding to the target gateway device.
[0154] In some embodiments, the determining device 600 of the gateway device further includes: a second receiving module, configured to receive controlled terminal information sent by the controlled terminal when the connection state with the controlled terminal is in a reconnection state; The controlled end information also includes communication information between the controlled end and the third target gateway device in the disconnected state. The disconnected state is used to indicate that the connection between the controlled end and the controlled end is broken. The third target gateway device is the device determined by the controlled end based on the location and historical communication information of the controlled end in the disconnected state. The second generation module is used to generate configuration information corresponding to the controlled terminal based on the business scenario identifier, target gateway level, and communication information.
[0155] Figure 7 A schematic diagram of a determining device for another gateway device provided in an embodiment of this application is shown below. Figure 7 As shown, the gateway device determining device 700 includes: The first receiving module is used to receive gateway information sent by electronic devices; The gateway information includes at least one first alternative gateway device determined by the electronic device based on the control terminal information, and at least one second alternative gateway device determined based on the controlled terminal information; wherein the first alternative gateway device is a device determined based on the location of the control terminal indicated by the control terminal information, and the second alternative gateway device is a device determined based on the location of the controlled terminal indicated by the controlled terminal information; the communication quality of the alternative paths is evaluated to generate path evaluation results; wherein the alternative paths include the control terminal, the controlled terminal, the first alternative gateway device, and the second alternative gateway device; based on the path evaluation results, information is sent after determining the target gateway devices corresponding to the control terminal and the controlled terminal; wherein the number of target gateway devices is a first preset value or a second preset value.
[0156] In some embodiments, the determining device 700 of the gateway device further includes: a second sending module, configured to: When the connection status with the electronic device is disconnected, a third target gateway device is determined based on the location and historical communication information of the controlled terminal, so as to connect with the electronic device through the third target gateway device; wherein, the disconnected status is used to indicate that the connection with the electronic device is broken; Determine the first communication information and / or the second communication information; wherein the first communication information is used to indicate the communication quality with the third target gateway device, and the second communication information is used to indicate the processing method of the data to be transmitted, and the data to be transmitted is the data to be transmitted to the control end; When the connection status with the electronic device is in reconnection state, send the controlled end information to the controlled end; The controlled end information also includes communication information.
[0157] In some embodiments, the path evaluation result is used to indicate the gateway level of the candidate gateway devices included in the candidate path. The candidate gateway devices include a first candidate gateway device and a second candidate gateway device. The gateway information includes configuration information, which includes information generated by the electronic device based on the service scenario identifiers of the control terminal and the controlled terminal and the target gateway level corresponding to the target gateway device. The gateway device determining device 700 further includes: a fourth determining module, used to: determine at least one of the following based on the configuration information: the encryption algorithm, encoding method and resolution for the data to be transmitted.
[0158] The descriptions of the apparatus embodiments above are similar to those of the method embodiments above, and have similar beneficial effects. In some embodiments, the functions or modules included in the apparatus provided in this disclosure can be used to perform the methods described in the method embodiments above. For technical details not disclosed in the system embodiments of this application, please refer to the descriptions of the method embodiments of this application for understanding.
[0159] It should be noted that, in the embodiments of this application, if the above-described method for determining the gateway device is implemented as a software functional module and sold or used as an independent product, it can also be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the embodiments of this application, or the part that contributes to the related technology, can be embodied in the form of a software product. This software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the methods of the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, mobile hard drives, read-only memory (ROM), magnetic disks, or optical disks. Thus, the embodiments of this application are not limited to any specific hardware, software, or firmware, or any combination of hardware, software, and firmware.
[0160] Figure 8 This is a schematic diagram of the composition structure of an electronic device 800 provided in an embodiment of this application, as shown below. Figure 8 As shown, the electronic device 800 includes: a processor 801, a communication interface 802, and a memory 803, wherein: The processor 801 typically controls the overall operation of the electronic device 800, which may be the method for determining the gateway device provided in the embodiments of this application.
[0161] The communication interface 802 enables the electronic device 800 to communicate with other terminals or servers via a network.
[0162] The memory 803 is configured to store instructions and applications executable by the processor 801, and can also cache data to be processed or already processed by the various modules in the electronic device 800 (e.g., image data, audio data, voice communication data, and video communication data). It can be implemented using flash memory or random access memory (RAM). Data transfer between the processor 801, the communication interface 802, and the memory 803 can be performed via bus 804.
[0163] Figure 9 This application provides a schematic diagram of the composition structure of a controlled terminal 900, as shown in the embodiment. Figure 9 As shown, the controlled terminal 900 includes: a processor 901, a communication interface 902, and a memory 903, wherein: The processor 901 typically controls the overall operation of the controlled terminal 900, and the overall operation may be the method for determining the gateway device provided in the embodiments of this application.
[0164] The communication interface 902 enables the controlled terminal 900 to communicate with other terminals or servers via a network.
[0165] The memory 903 is configured to store instructions and applications executable by the processor 901, and can also cache data to be processed or already processed by various modules in the controlled terminal 900 (e.g., image data, audio data, voice communication data, and video communication data). It can be implemented using flash memory or random access memory (RAM). Data transfer between the processor 901, the communication interface 902, and the memory 903 can be performed via bus 904.
[0166] This application provides a computer program product or computer program that includes computer instructions stored in a readable storage medium. The processor of the controlled device reads the computer instructions from the readable storage medium and executes the computer instructions, causing the controlled device to perform the gateway device determination method described above in this application.
[0167] This application provides a readable storage medium storing executable instructions, wherein the executable instructions, when executed by a processor, will cause the processor to execute the gateway device determination method provided in this application.
[0168] It should be noted that the descriptions of the storage medium and device embodiments above are similar to the descriptions of the method embodiments above, and have similar beneficial effects. For technical details not disclosed in the storage medium and device embodiments of this application, please refer to the descriptions of the method embodiments of this application for understanding.
[0169] The aforementioned processor can be at least one of the following: Application Specific Integrated Circuit (ASIC), Digital Signal Processor (DSP), Digital Signal Processing Device (DSPD), Programmable Logic Device (PLD), Field Programmable Gate Array (FPGA), Central Processing Unit (CPU), Controller, Microcontroller, and Microprocessor. It is understood that other electronic devices can also implement the functions of the aforementioned processor, and this application does not specifically limit the specific implementation.
[0170] The aforementioned computer storage media / memory can be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), magnetic random access memory (FRAM), flash memory, magnetic surface memory, optical disc, or compact disc read-only memory (CD-ROM), etc.; or it can be various terminals that include one or any combination of the above-mentioned memories, such as mobile phones, computers, tablet devices, personal digital assistants, etc.
[0171] In the several embodiments provided in this application, it should be understood that the disclosed devices and methods can be implemented in other ways. The device embodiments described above are merely illustrative. For example, the division of units is only a logical functional division, and in actual implementation, there may be other division methods, such as: multiple units or components can be combined, or integrated into another system, or some features can be ignored or not executed. In addition, the coupling, direct coupling, or communication connection between the various components shown or discussed can be through some interfaces, and the indirect coupling or communication connection between devices or units can be electrical, mechanical, or other forms.
[0172] The units described above as separate components may or may not be physically separate. The components shown as units may or may not be physical units. They may be located in one place or distributed across multiple network units. Some or all of the units may be selected to achieve the purpose of this embodiment according to actual needs.
[0173] In addition, each functional unit in the various embodiments of this application can be integrated into one processing unit, or each unit can be a separate unit, or two or more units can be integrated into one unit; the integrated unit can be implemented in hardware or in the form of hardware plus software functional units.
[0174] Those skilled in the art will understand that all or part of the steps of the above method embodiments can be implemented by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When the program is executed, it performs the steps of the above method embodiments. The aforementioned storage medium includes various media that can store program code, such as mobile storage devices, read-only memory (ROM), magnetic disks, or optical disks.
[0175] Alternatively, if the integrated units described above are implemented as software functional modules and sold or used as independent products, they can also be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence or the part that contributes to related technologies, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the methods of the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as mobile storage devices, ROMs, magnetic disks, or optical disks.
[0176] The above embodiments are merely preferred embodiments provided to fully illustrate the present invention, and the scope of protection of the present invention is not limited thereto. Equivalent substitutions or modifications made by those skilled in the art based on the present invention are all within the scope of protection of the present invention.
Claims
1. A method for determining a gateway device, characterized in that, The method is applied to an electronic device, and the method includes: At least one first alternative gateway device is determined based on control terminal information, and at least one second alternative gateway device is determined based on controlled terminal information; wherein, the first alternative gateway device is a device determined based on the location of the control terminal indicated by the control terminal information, and the second alternative gateway device is a device determined based on the location of the controlled terminal indicated by the controlled terminal information; The communication quality of the alternative paths is evaluated, and path evaluation results are generated; wherein, the alternative paths include the control terminal, the controlled terminal, the first alternative gateway device, and the second alternative gateway device; Based on the path evaluation results, the target gateway devices corresponding to the control terminal and the controlled terminal are determined; wherein, the number of the target gateway devices is a first preset value or a second preset value; The gateway information is sent to at least one of the following: the control terminal, the controlled terminal, and the target gateway device; wherein the gateway information is used to indicate the configuration of at least one of the following: the control terminal, the controlled terminal, and the channel between the control terminal and the controlled terminal.
2. The method according to claim 1, characterized in that, The evaluation of the communication quality of the candidate paths and the generation of path evaluation results include: The communication quality between the first alternative gateway device and the control terminal is evaluated, and a first evaluation result is generated. The communication quality between the second alternative gateway device and the controlled terminal is evaluated, and a second evaluation result is generated. The pathway evaluation result is generated based on the first evaluation result and the second evaluation result; The first alternative gateway device and the second alternative gateway device may be the same or different.
3. The method according to claim 2, characterized in that, The path evaluation result includes a path evaluation value; when the first candidate gateway device and the second candidate gateway device are the same, generating the path evaluation result based on the first evaluation result and the second evaluation result includes: Obtain the service scenario identifiers of the control terminal and the controlled terminal; Based on the correspondence between the business scenario identifier and the weight, the first weight corresponding to the first evaluation result and the second weight corresponding to the second evaluation result are determined. The first evaluation result is weighted based on the first weight to generate a first weighted evaluation result, and the second evaluation result is weighted based on the second weight to generate a second weighted evaluation result. The pathway evaluation value is generated based on the first weighted evaluation result and the second weighted evaluation result.
4. The method according to claim 3, characterized in that, When the first candidate gateway device and the second candidate gateway device are different, the step of generating the path evaluation value based on the first evaluation result and the second evaluation result includes: A third evaluation result is determined for the first candidate gateway device and the second candidate gateway device; wherein the third evaluation result is used to indicate the communication quality between the first candidate gateway device and the second candidate gateway device; The pathway evaluation value is generated based on the first weighted evaluation result, the second weighted evaluation result, and the third evaluation result.
5. The method according to claim 2, characterized in that, The step of evaluating the communication quality between the first candidate gateway device and the control terminal to generate a first evaluation result includes: The communication quality between the first alternative gateway device and the control terminal is evaluated in at least two dimensions, and a first communication indicator value is generated for each dimension; wherein, the at least two dimensions include at least two of the following: latency, packet loss rate, load and bandwidth capacity; A first evaluation result is generated based on the first communication indicator values corresponding to the at least two dimensions.
6. The method according to any one of claims 1 to 5, characterized in that, The path evaluation result includes a path evaluation value; determining the target gateway device corresponding to the control terminal and the controlled terminal based on the path evaluation result includes: From the multiple pathway evaluation values, determine the limiting evaluation value; Based on the alternative paths corresponding to the extreme evaluation values, the target path is determined; If the first alternative gateway device and the second alternative gateway device included in the target path are the same, the first alternative gateway device included in the target path shall be determined as the target gateway device. If the first alternative gateway device and the second alternative gateway device included in the target path are different, the first alternative gateway device included in the target path shall be determined as the first target gateway device, and the second alternative gateway device included in the target path shall be determined as the second target gateway device.
7. The method according to claim 6, characterized in that, The method further includes: If the target distance value is less than or equal to the distance threshold, the number of target gateway devices is determined to be a first preset value; wherein, the target distance value is used to indicate the distance between the control terminal and the controlled terminal, and the first target gateway device and the second target gateway device are the same; If the target distance is greater than a distance threshold, the number of target gateway devices is determined to be a second preset value; wherein the first target gateway device and the second target gateway device are different; If the number of target gateway devices is a first preset value and the gateway level indicated by the path evaluation result is lower than a preset level, the number of target gateway devices is determined to be either a first preset value or a second preset value.
8. The method according to any one of claims 1 to 5, characterized in that, The path evaluation result is used to indicate the gateway level of the candidate gateway devices included in the candidate path, the candidate gateway devices include the first candidate gateway device and the second candidate gateway device, and the gateway information includes configuration information; the method further includes: Configuration information is generated based on the service scenario identifiers of the control terminal and the controlled terminal, and the target gateway level corresponding to the target gateway device.
9. The method according to claim 8, characterized in that, The method further includes: When the connection status with the controlled terminal is in the reconnection state, receive the controlled terminal information sent by the controlled terminal; The controlled terminal information also includes communication information between the controlled terminal and the third target gateway device in the disconnected state, wherein the disconnected state is used to indicate that the connection between the controlled terminal and the controlled terminal is broken; the third target gateway device is a device determined by the controlled terminal based on the location and historical communication information of the controlled terminal in the disconnected state. The process of generating configuration information based on the service scenario identifiers of the control terminal and the controlled terminal and the target gateway level corresponding to the target gateway device includes: Based on the business scenario identifier, the target gateway level, and the communication information, configuration information corresponding to the controlled terminal is generated.
10. A method for determining a gateway device, characterized in that, The method is applied to the controlled end, and the method includes: Receive gateway information sent by electronic devices; The gateway information includes at least one first alternative gateway device determined by the electronic device based on control terminal information, and at least one second alternative gateway device determined based on controlled terminal information; wherein the first alternative gateway device is a device determined based on the location of the control terminal indicated by the control terminal information, and the second alternative gateway device is a device determined based on the location of the controlled terminal indicated by the controlled terminal information; the communication quality of the alternative paths is evaluated to generate path evaluation results; wherein the alternative paths include the control terminal, the controlled terminal, the first alternative gateway device, and the second alternative gateway device; based on the path evaluation results, information is sent after determining the target gateway devices corresponding to the control terminal and the controlled terminal; wherein the number of target gateway devices is a first preset value or a second preset value.
11. The method according to claim 10, characterized in that, The method further includes: When the connection with the electronic device is disconnected, a third target gateway device is determined based on the location and historical communication information of the controlled terminal, so as to connect with the electronic device through the third target gateway device; wherein, the disconnected state is used to indicate that the connection with the electronic device is broken; Determine first communication information and / or second communication information; wherein, the first communication information is used to indicate the communication quality with the third target gateway device, and the second communication information is used to indicate the processing method of the data to be transmitted, wherein the data to be transmitted is the data to be transmitted to the control terminal; When the connection status with the electronic device is in reconnection state, send controlled terminal information to the controlled terminal; The controlled terminal information also includes the communication information.
12. The method according to claim 10, characterized in that, The path evaluation result is used to indicate the gateway level of the candidate gateway devices included in the candidate path. The candidate gateway devices include the first candidate gateway device and the second candidate gateway device. The gateway information includes configuration information, which includes information generated by the electronic device based on the service scenario identifiers of the control terminal and the controlled terminal and the target gateway level corresponding to the target gateway device. The method further includes: Based on the configuration information, at least one of the following is determined: the encryption algorithm, encoding method, and resolution for the data to be transmitted.
13. A device for determining a gateway device, characterized in that, The device includes: The first determining module is configured to determine at least one first candidate gateway device based on control terminal information, and to determine at least one second candidate gateway device based on controlled terminal information; wherein, the first candidate gateway device is a device determined based on the location of the control terminal indicated by the control terminal information, and the second candidate gateway device is a device determined based on the location of the controlled terminal indicated by the controlled terminal information; A generation module is used to evaluate the communication quality of alternative paths and generate path evaluation results; wherein, the alternative paths include the control terminal, the controlled terminal, the first alternative gateway device, and the second alternative gateway device; The second determining module is used to determine the target gateway devices corresponding to the control terminal and the controlled terminal based on the path evaluation results; wherein the number of target gateway devices is a first preset value or a second preset value; A first sending module is configured to send gateway information to at least one of the following: the control terminal, the controlled terminal, and the target gateway device; wherein the gateway information is used to indicate configuration for at least one of the following: the control terminal, the controlled terminal, and the channel between the control terminal and the controlled terminal.
14. A device for determining a gateway device, characterized in that, The device includes: The first receiving module is used to receive gateway information sent by electronic devices; The gateway information includes at least one first alternative gateway device determined by the electronic device based on control terminal information, and at least one second alternative gateway device determined based on controlled terminal information; wherein the first alternative gateway device is a device determined based on the location of the control terminal indicated by the control terminal information, and the second alternative gateway device is a device determined based on the location of the controlled terminal indicated by the controlled terminal information; the communication quality of the alternative paths is evaluated to generate path evaluation results; wherein the alternative paths include the control terminal, the controlled terminal, the first alternative gateway device, and the second alternative gateway device; based on the path evaluation results, information is sent after determining the target gateway devices corresponding to the control terminal and the controlled terminal; wherein the number of target gateway devices is a first preset value or a second preset value.
15. An electronic device, the device comprising a processor and a memory storing instructions executable by the processor; characterized in that, When the instructions are executed by the processor, the method described in any one of claims 1 to 9 is implemented.
16. A controlled terminal, the device comprising a processor and a memory storing instructions executable by the processor; characterized in that, When the instructions are executed by the processor, the method as described in any one of claims 10 to 12 is implemented.