A smart park data transmission method based on the Internet of Things
Through the smart park data transmission method based on the Internet of Things in the smart park, the distance between the server node and the user terminal is dynamically adjusted, and the problem of user terminal mobility affecting the reasonable allocation of nodes is solved, achieving lower latency and higher network performance.
Patent Information
- Application Number
- CN202411342975.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-25
- Publication Date
- 2025-04-18
- Estimated Expiration
- 2044-09-25
AI Technical Summary
The prior art fails to effectively consider the mobility of user terminals in smart parks, resulting in unsatisfactory allocation of nodes and the inability to effectively avoid the occurrence of delays.
Through the smart campus data transmission method based on the Internet of Things, the distance between the redistribution server node and the node to be allocated by the task is dynamically adjusted according to the load of the server node and the movement trajectory and rate of the user terminal, and the redistribution and data transmission path of the task are optimized.
It realizes more reasonable assignment of tasks in smart parks, reduces latency, and improves network performance and user experience.
Smart Images

Figure CN119276872B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of digital information transmission, and in particular to a smart park data transmission method based on the Internet of Things. Background Art
[0002] Communication load refers to the amount of data transmitted in a communication network and its impact on network transmission speed and bandwidth. In a network, data is transmitted in the form of packets, which occupy network bandwidth and rely on network devices for transmission. The size of the communication load depends on the type and amount of data transmitted, as well as the throughput, transmission speed, latency and other factors of the devices in the network. Measuring and managing the communication load is crucial to optimizing and maintaining network performance.
[0003] Edge computing is a distributed computing architecture that moves the computation of applications, data, and services from the central nodes of the network to the edge nodes of the network logic for processing. This architecture breaks down large services that were originally handled entirely by central nodes into smaller, more manageable parts, which are distributed to edge nodes for processing. Edge nodes are closer to user terminal devices, thereby speeding up data processing and transmission and reducing latency. Under this architecture, data analysis and knowledge generation are closer to the source of data, making it more suitable for processing big data. In a smart park, the amount of edge computing data processed by different server nodes at the same time is different, that is, the load is different. In order to avoid server crashes caused by excessive load on a single node, the tasks of nodes with larger loads can be assigned to other nodes with smaller loads for processing.
[0004] In the related art, load distribution mainly relies on the transmission distance and transmission time between two nodes to avoid excessive delay affecting the transmission speed, and then affecting the processing speed. However, this method does not take into account the mobility of the user terminal. The transmission distance and transmission time of the node determined according to the location of the user terminal before the movement may change with the movement of the user terminal. It is not the best choice for the user terminal after the movement, which leads to the unreasonable allocation of nodes and actually cannot avoid the occurrence of delay. Therefore, it is urgent to develop a smart park data transmission method based on the Internet of Things to solve the above problems. Summary of the invention
[0005] In order to solve the technical problem that user terminal mobility affects the reasonable allocation of nodes, the purpose of the present invention is to provide a smart park data transmission method based on the Internet of Things. The technical solution adopted is as follows:
[0006] The present invention provides a smart park data transmission method based on the Internet of Things, the method comprising:
[0007] According to the load of the server node, determine the server node whose necessary degree of load distribution of the server node is greater than the degree threshold, and use the server node whose necessary degree of load distribution of the server node is greater than the degree threshold as the node to be assigned a task;
[0008] Determine the task real-time requirement degree of the task sent by the user terminal received by the server node;
[0009] Determine the distance between the redistributed server node and the node to be assigned the task based on the topological structure diagram, the real-time requirement of the task, the distance between the two farthest server nodes in the park, and the position corresponding to the time when the user terminal sends the task, wherein the topological structure diagram is determined according to the position of the server nodes in the park;
[0010] Based on the movement trajectory corresponding to the time when the task is sent by the user terminal to the time when the task is sent by the user terminal, as well as the movement speed corresponding to the time when the task is sent by the user terminal and the movement speed corresponding to the time when the task is sent by the user terminal, the distance between the reallocation server node and the node to be assigned the task is adjusted to obtain the optimal adjustment distance;
[0011] Based on the optimal adjustment distance, determining a selection range of redistributed server nodes;
[0012] On the topology structure diagram, based on the selection range of the reallocated server nodes, determining the reallocated server nodes in the selection range of the reallocated server nodes;
[0013] Calculating the suitability of the reallocated server nodes in the selection range of the reallocated server nodes, and taking the reallocated server node with the smallest suitability in the selection range of the reallocated server nodes as the optimal server node;
[0014] The task of the task-to-be-assigned node is assigned to the optimal server node, and data transmission and user terminal task response are performed with the user terminal through the optimal server node.
[0015] In some embodiments, the distance between the redistribution server node and the task to-be-assigned node is adjusted based on the movement trajectory corresponding to the time when the task is sent by the user terminal to the time when the task is sent by the user terminal, and the movement rate corresponding to the time when the task is sent by the user terminal and the movement rate corresponding to the time when the task is sent by the user terminal, to obtain the optimal adjustment distance, including:
[0016] Based on the movement trajectory corresponding to the time from the task time sent by the user terminal to the time adjacent to the task time sent by the user terminal, and the movement speed corresponding to the task time sent by the user terminal, the distance between the reallocation server node and the task to be allocated node is adjusted to obtain a first adjusted distance;
[0017] Calculate the average of the first adjustment distance corresponding to the task time sent by the user terminal, the second adjustment distance and the third adjustment distance adjacent to the task time sent by the user terminal, and the fourth adjustment distance and the fifth adjustment distance adjacent to the task time sent by the user terminal to obtain the optimal adjustment distance.
[0018] In some embodiments, before determining, based on the load of the server node, a server node whose necessary degree of load distribution of the server node is greater than a degree threshold, and using the server node whose necessary degree of load distribution of the server node is greater than the degree threshold as a node to be assigned a task, the method further includes:
[0019] Through base station positioning, the location, movement trajectory and movement speed of the user terminal are determined.
[0020] In some embodiments, determining, based on the load of the server node, the server node whose necessary degree of load distribution of the server node is greater than a degree threshold, and using the server node whose necessary degree of load distribution of the server node is greater than the degree threshold as a node to be assigned a task, includes:
[0021] Determine the necessary degree of load distribution of server nodes according to the following formula:
[0022]
[0023] In the formula, Q i,j represents the necessary degree of load distribution of the jth server node at the i-th load detection time, S i,j represents the load of the jth server node at the i-th load detection moment, S represents the load of the j-th server node in all recorded historical moments, max{} represents a function for finding the maximum value, and i represents the sequence number of the load detection moment;
[0024] In response to the necessary degree of load distribution of the server node being greater than a degree threshold, the server node whose necessary degree of load distribution of the server node is greater than the degree threshold is used as a node to be assigned a task.
[0025] In some embodiments, the task real-time requirement degree of the task sent by the user terminal received by the server node is determined according to the following formula:
[0026]
[0027] Where U j,p represents the real-time requirement of the pth task sent by the same user terminal and received by the jth server node, p represents the task number, j represents the server node number, and n represents the set K m The total number of time intervals contained in the set K m The number of the time interval contained in t p-l,p-l+1 represents the time interval between the mth user terminal sending the pl-th request and the p-l+1-th request, m represents the sequence number of the user terminal, and the set K m The elements of K are the time intervals between two consecutive moments when the same user terminal sends task requests to the same server node, and the time interval between two consecutive moments when the same user terminal sends task requests to the same server node is less than 60s. m It is expressed as {t p-1,p ,t p,p+1 ,...,t p-l,p-l+1}.
[0028] In some embodiments, the distance between the reallocation server node and the node to be allocated for the task is determined based on the topological structure diagram, the real-time requirement of the task, the distance between the two farthest server nodes in the park, and the position corresponding to the time when the user terminal sends the task, according to the following formula:
[0029]
[0030] In the formula, l p represents the distance between the redistribution server node and the node to be assigned the task, L represents the distance between the two server nodes farthest apart in the park, and U j,p represents the real-time requirement of the p-th task sent by the same user terminal and received by the j-th server node, U represents the real-time requirement of the p-th task sent by the same user terminal and received by all server nodes, max{} represents the function for finding the maximum value, p represents the task number, and j represents the server node number.
[0031] In some embodiments, according to the following formula, based on the movement trajectory corresponding to the time from the task time sent by the user terminal to the time adjacent to the task time sent by the user terminal, and the movement speed corresponding to the task time sent by the user terminal, the distance between the reallocation server node and the task to be allocated node is adjusted to obtain a first adjusted distance:
[0032]
[0033] In the formula, l p ' represents the first adjustment distance, l prepresents the distance between the redistribution server node and the node to be assigned the task, tanh() represents the hyperbolic tangent function, v p The mobile speed of the same user terminal sending the p-th task, max(v) represents the maximum mobile speed of the same user terminal sending the p-th task.
[0034] In some embodiments, after entering the park, the straight line connecting the last nearest server node and the current nearest server node of the mobile user terminal and the straight line connecting the current nearest server node and the next nearest server node of the mobile user terminal form an angle, and multiple angles are obtained as the user terminal moves, and the average of the multiple angles is calculated, and the average is used as the swing trend degree θ of the user terminal from the last nearest server node to the current nearest server node. m , determining a selection range of redistributed server nodes based on the optimal adjustment distance includes:
[0035] In the topology structure diagram, a circle is drawn with the current nearest server node as the center and the optimal adjustment distance as the radius to obtain a first range;
[0036] In the topology diagram, the current nearest server node is taken as the radiating point, and a ray is drawn from the direction from the previous nearest server node to the current nearest server node as the positive direction. The ray is rotated clockwise and counterclockwise by a first angle to obtain an upper boundary ray and a lower boundary ray. The closed area surrounded by the upper boundary ray, the lower boundary ray and the circle is the selection range of the redistributed server node. The value of the first angle is the swing trend degree θ m .
[0037] In some embodiments, calculating the suitability of the reallocated server nodes in the selection range of the reallocated server nodes, and taking the reallocated server node with the smallest suitability in the selection range of the reallocated server nodes as the optimal server node, comprises:
[0038] The suitability of the reallocated server node in the selection range of the reallocated server node is calculated according to the following formula:
[0039]
[0040] In the formula, E j,p,k The appropriateness of the reallocated server node Q represents the appropriateness of the reallocated server node for which the pth task of the jth server node is reallocated by the kth server node in the selection range of the reallocated server node whose necessary degree of load distribution is greater than the degree threshold. i,kIndicates the necessary degree of load distribution of the kth server node in the selection range of the redistributed server node, the necessary degree of load distribution obtained at the i-th load detection time is greater than the degree threshold, θ p Indicates the direction of the redistributed server node in the selection range of the server node receiving the pth task and the swing trend degree from the last nearest server node to the current nearest server node corresponding to the user terminal sending the pth task during the movement process, p represents the task number, j represents the server node number, i represents the number of load detection time, and k represents the number of server nodes in the selection range of the redistributed server node whose necessary degree of load distribution is greater than the degree threshold;
[0041] The reallocated server node with the smallest degree of suitability in the selection range of the reallocated server nodes is selected as the optimal server node.
[0042] In some embodiments, the degree threshold is selected in the range of 0.4 to 0.6.
[0043] The present invention has the following beneficial effects:
[0044] The present invention provides a data transmission method for a smart park based on the Internet of Things. The method first determines the server nodes whose necessary degree of load distribution of the server nodes is greater than a degree threshold according to the load of the server nodes, and uses the server nodes whose necessary degree of load distribution of the server nodes is greater than the degree threshold as task-to-be-assigned nodes, thereby timely and accurately finding the server nodes with too heavy processing tasks, so as to facilitate timely task redistribution; secondly, the task real-time requirement degree of the task sent by the user terminal received by the server node is determined, so as to grasp the real-time degree to which the user expects the server node to feedback the task; then, based on the topological structure diagram, the task real-time requirement degree and the distance between the two farthest server nodes in the park and the position corresponding to the time when the user terminal sends the task, the distance between the reallocated server node and the task-to-be-assigned node is determined, and the time delay problem caused by the different distances between different server nodes and the user terminal is taken into account, so as to obtain the approximate distance between the reallocated server node and the task-to-be-assigned node; further, based on the moving trajectory corresponding to the time when the user terminal sends the task to the time when the user terminal sends the task, and the moving speed corresponding to the time when the user terminal sends the task and the position corresponding to the time when the user terminal sends the task The moving rate corresponding to the time periods adjacent to each other is used to adjust the distance between the reallocation server node and the task to be allocated node to obtain the optimal adjustment distance. The influence of the user's moving rate and moving trajectory on the distance between the reallocation server node and the task to be allocated node is further considered to obtain the optimal adjustment distance that can predict the user's moving trend. Then, based on the optimal adjustment distance, the selection range of the reallocation server node is determined. On the topological structure diagram, based on the selection range of the reallocation server node, the reallocation server nodes in the selection range of the reallocation server node are determined. The reallocation server nodes in the selection range of the reallocation server node can adapt to the user's movement and are the best choice for task redistribution. Then, the suitability of the reallocation server nodes in the selection range of the reallocation server nodes is calculated, and the reallocation server node with the smallest suitability in the selection range of the reallocation server node is used as the optimal server node. The optimal server node is the best choice for receiving the reallocated tasks. Finally, the tasks of the task to be allocated nodes are assigned to the optimal server node, and data transmission and user terminal task response are performed through the optimal server node, thereby completing the data transmission of the smart park. This method can take into account the load of different server nodes, the distance from the user, the transmission delay, and the user's mobility, and arrange the optimal server node to process the tasks of the user terminal to ensure a good network experience for users in the smart park. BRIEF DESCRIPTION OF THE DRAWINGS
[0045] In order to more clearly illustrate the technical solutions and advantages in the embodiments of the present invention or the prior art, the drawings required for use in the embodiments or the prior art descriptions are briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0046] Figure 1 A method flow chart of a smart park data transmission method based on the Internet of Things provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0047] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0048] Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs.
[0049] The present invention provides a data transmission method for a smart park based on the Internet of Things. Figure 1 , the method comprising:
[0050] Step 101, based on the load of the server nodes, determine the server nodes whose necessary degree of load distribution is greater than the degree threshold, and use the server nodes whose necessary degree of load distribution is greater than the degree threshold as nodes to be assigned tasks.
[0051] In a smart park, when the load of a server node is too large, due to the limited processing capacity of the server node, it may cause problems such as delayed information feedback or network crash. To avoid the above problems, the load of the server node should be detected in real time, and the unprocessed load should be promptly distributed to adjacent servers with smaller loads for processing. This step can promptly and accurately identify the server node with excessive processing tasks, so as to facilitate timely task redistribution.
[0052] In some embodiments, the load may be network traffic, and the size of the network traffic of a single server node per unit time is taken as the load of the single server node at a certain moment.
[0053] In some embodiments, step 101 includes:
[0054] Step 1011, according to the following formula, determine the necessary degree of load distribution of the server node, so as to facilitate timely task redistribution:
[0055]
[0056] In the formula, Q i,j It indicates the necessary degree of load distribution of the jth server node at the i-th load detection time, which can reflect the necessary degree of task redistribution of the server node. i,j represents the load of the jth server node at the i-th load detection time, S i,j The larger it is, the heavier the task of the server node is. S represents the load of the j-th server node in all the recorded historical moments. max{} represents the function of finding the maximum value. max{S} can get the maximum value of the load of the j-th server node in all the recorded historical moments. max{S} is not zero. i represents the sequence number of the load detection moment. S i,j The larger the Q i,j The larger it is, the heavier the task of the server node is, and the more task redistribution is needed.
[0057] Step 1012: In response to the necessary degree of load distribution of the server nodes being greater than the degree threshold, the server nodes whose necessary degree of load distribution of the server nodes is greater than the degree threshold are used as nodes to be assigned tasks.
[0058] When the necessary degree of load distribution of server nodes is greater than the Chengdu threshold, it means that the load on the server nodes has reached the upper limit that needs to be redistributed. In order to avoid problems such as untimely information feedback or network collapse, these server nodes are treated as task-to-be-allocated nodes for subsequent task redistribution.
[0059] In some embodiments, the degree threshold is selected in the range of 0.4 to 0.6. Such a setting can allow the server node to fully perform network data transmission without causing network collapse due to excessive load.
[0060] In some embodiments, the degree threshold may be 0.5.
[0061] In some embodiments, before step 101, the method further includes:
[0062] Through base station positioning, the location, movement trajectory and movement speed of the user terminal are determined.
[0063] The location of the user terminal can reflect the user's location in the park at different times, the movement trajectory can reflect the user's movement route and general trend in the park, and the movement rate can reflect the speed of the user's movement.
[0064] It should be noted that base station positioning is a wireless positioning technology that determines the user's geographic location information by establishing a connection between the mobile phone and a nearby base station. Base station positioning can use the communication between the mobile phone and multiple base stations to analyze the distance between the mobile user and the base station, and then determine the user's location. The base station can determine the approximate location of the mobile phone by recording the time difference.
[0065] The request information sent from the user terminal obtained by the server node, each piece of information as a task has its corresponding user terminal, that is, the user. After processing the task request, the server node should feed back the information to the user terminal to ensure that the user terminal can receive the information. Since different user terminals send different requests to the server, the real-time requirements for the server node return are different. For example, when a user is swiping a video, the server node needs to continuously provide real-time feedback. In order to avoid excessive delay when the server node feedbacks, this request task is assigned to other server nodes that are closer and have less load for processing. If the user only needs to download files, the real-time feedback of the server node is not strong, and it can be appropriately considered to arrange it to be processed by a server node far away from the current server node. Therefore, it is particularly necessary to analyze the distribution range of the current client's task according to the real-time requirements of the request task sent by the user, so step 102 is introduced.
[0066] Step 102, determining the degree of real-time requirement of the task sent by the user terminal and received by the server node, so as to understand the degree of real-time feedback the user expects the server node to provide on the task.
[0067] In some embodiments, step 102 is implemented according to the following formula:
[0068]
[0069] Where U j,p It represents the real-time requirement degree of the p-th task sent by the same user terminal and received by the j-th server node, reflecting the real-time degree to which the user expects the server node to provide feedback on the task. j,p The larger the value, the stronger the real-time feedback from the server node is needed by the user. p represents the task number, j represents the server node number, and n represents the set K. m The total number of time intervals contained in the set K. The larger the n, the greater the real-time requirement of the task. m The number of the time interval contained in t p-l,p-l+1 represents the time interval between the mth user terminal sending the plth request and the p-l+1th request, reflecting the urgency of the user's demand for task real-time performance. p-l,p-l+1 The shorter the time, the stronger the user's demand for real-time tasks. m represents the serial number of the user terminal. The set Km The elements of K are the time intervals between two consecutive moments when the same user terminal sends task requests to the same server node, and the time interval between two consecutive moments when the same user terminal sends task requests to the same server node is less than 60s. m Expressed as {tp- 1 ,p,tp,p +1 ,...,tp-l,pl +1}. It represents the average time interval between multiple adjacent requests. The larger the average value is, the smaller the request interval of the task is and the greater the real-time requirement of the task is. Through n pairs Adjust to get the real-time U that reflects the user's expectation for the server node to feedback the task. j,p , The larger the U j,p The larger the value, the more real-time feedback from the server node is required by the user.
[0070] It should be noted that the real-time requirement of the task requested by the current user can be judged by the number of user requests in a continuous period of time and the length of the interval between adjacent requests. When the interval between the request tasks sent by the same user to the same server node for multiple times is short, that is, the set K m The smaller the value of each element is, the more requests the user makes per unit time, which proves that the current user's requests are more intensive and the user is more likely to be performing operations with high real-time requirements such as watching videos.
[0071] Step 103, based on the topological structure diagram, the real-time requirement of the task, the distance between the two farthest server nodes in the park, and the position corresponding to the time when the user terminal sends the task, determine the distance between the reallocated server node and the node to be assigned the task. The topological structure diagram is determined according to the position of the server node in the park.
[0072] Taking into account the delay problem caused by the different distances between different server nodes and user terminals, the approximate distance between the redistributed server node and the task to be assigned node is obtained. When the real-time requirement of the task requested by the user terminal is greater, this task should be assigned to a server node with a closer distance for processing. When the real-time requirement of the task requested by the user is not high, it can be considered to be assigned to a server node far away from the current nearest server node for processing. Therefore, the distance between the task redistribution node and the task to be assigned node can be roughly determined by the real-time requirement of the requested task.
[0073] In some embodiments, step 103 is implemented according to the following formula:
[0074]
[0075] In the formula, l p It indicates the distance between the redistribution server node and the task to be assigned node, that is, the distance between the task redistribution server node and the server node currently processing the user task, reflecting the approximate distance between the redistribution server node and the task to be assigned node. L indicates the distance between the two server nodes farthest apart in the park, and U j,p represents the real-time requirement of the p-th task sent by the same user terminal and received by the j-th server node, U represents the real-time requirement of the p-th task sent by the same user terminal and received by all server nodes, max(U) represents the maximum value of the real-time requirement of the p-th task sent by the same user terminal and received by all server nodes, and the value is not zero, max{} represents the function for finding the maximum value, p represents the task number, and j represents the server node number.
[0076] It should be noted that The larger the value, the greater the real-time requirement of the current task. The smaller, The smaller the distance l is, the closer the task redistribution server node is to the server node currently processing the user task. p The smaller it is.
[0077] In a smart park, the user terminal is generally a mobile phone carried by the user. The user himself moves in the park, and the user terminal will move with the user. Therefore, the rationality of load distribution for different redistribution server nodes will change due to the movement of users in the park. The user's current approximate position, movement trajectory and movement rate in the park can be obtained through base station positioning. The movement of users in the park usually has a general direction. The smaller the angle with this direction, the more suitable the node is as a redistribution node. In addition, since different users move at different speeds in the park and their positions for receiving return information are different, the distance range of the selected redistribution node should also be different. Therefore, step 104 is introduced to adjust the distance between the redistribution server node and the task to be assigned node, and further considers the influence of the user's movement rate and movement trajectory on the distance between the redistribution server node and the task to be assigned node, so as to obtain the optimal adjustment distance that can predict the user's movement trend.
[0078] Step 104, based on the movement trajectory corresponding to the time when the task is sent by the user terminal to the time adjacent to the time when the task is sent by the user terminal, as well as the movement speed corresponding to the time when the task is sent by the user terminal and the movement speed corresponding to the time adjacent to the time when the task is sent by the user terminal, adjust the distance between the reallocation server node and the task to be allocated node to obtain the optimal adjusted distance.
[0079] In some embodiments, step 104 includes:
[0080] Step 1041, based on the movement trajectory corresponding to the task time sent by the user terminal to the time adjacent to the task time sent by the user terminal, and the movement speed corresponding to the task time sent by the user terminal, adjust the distance between the reallocation server node and the task to be allocated node to obtain a first adjusted distance.
[0081] When the user's moving speed is high, if the distance between the reallocation server node and the current nearest server node is close, the user may move away from the reallocation server node due to the fast moving speed, and thus fail to receive the feedback information of the reallocation server node in time. In this case, in order to make the selection range of the reallocation server node more reasonable, the distance between the reallocation server node and the task to be allocated node should be adjusted to obtain the first adjustment distance. The greater the speed, the greater the first adjustment distance should be, and the smaller the speed, the first adjustment distance can be appropriately reduced, thereby adapting to the user's movement by predicting the user's movement trend.
[0082] In some embodiments, step 1041 is implemented according to the following formula:
[0083]
[0084] In the formula, l p ′ represents the first adjustment distance, reflecting the distance between the reallocated server node and the task to be allocated node after adjustment, l p represents the distance between the redistribution server node and the task to be assigned node, tanh() represents the hyperbolic tangent function, and the input Normalize, v p The mobile speed of the same user terminal sending the p-th task, max(v) represents the maximum mobile speed of the same user terminal sending the p-th task, and the value is not zero; max{} represents a function for obtaining the maximum value. The larger it is, the faster the user's current moving speed is, and the selection range of the redistributed server node should be larger, so the larger the first adjustment distance is.
[0085] Step 1042, calculate the average of the first adjustment distance corresponding to the task time sent by the user terminal, the second adjustment distance and the third adjustment distance adjacent to the task time sent by the user terminal, and the fourth adjustment distance and the fifth adjustment distance adjacent to the task time sent by the user terminal, and obtain the optimal adjustment distance.
[0086] The user's moving speed in the park is uncertain, so it is rather one-sided to use only the current moving speed as the basis for reallocating the server node range. Therefore, the distance is further adjusted according to the user's speed at other times close to the current time, and the optimal adjustment distance is obtained to provide a reference for judging the selection range of the reallocated server nodes.
[0087] Step 105: Determine a selection range of reallocated server nodes based on the optimal adjustment distance.
[0088] In some embodiments, after entering the park, the straight line connecting the last nearest server node and the current nearest server node of the mobile user terminal and the straight line connecting the current nearest server node and the next nearest server node of the mobile user terminal form an angle, and multiple angles are obtained as the user terminal moves, and the average of the multiple angles is calculated, and the average is used as the swing trend degree θ of the user terminal from the last nearest server node to the current nearest server node. m , step 105 specifically includes:
[0089] Step 1051: In the topology diagram, a circle is drawn with the current nearest server node as the center and the optimal adjustment distance as the radius to obtain a first range.
[0090] Step 1052: In the topology diagram, take the current nearest server node as the radiating point, draw a ray from the direction from the previous nearest server node to the current nearest server node as the positive direction, rotate the ray clockwise and counterclockwise by a first angle respectively, and obtain an upper boundary ray and a lower boundary ray. The closed area surrounded by the upper boundary ray, the lower boundary ray and the circle is the selection range of the redistributed server node. The value of the first angle is the swing trend degree θ m .
[0091] Step 106: Determine the reallocated server nodes in the selection range of the reallocated server nodes on the topology diagram based on the selection range of the reallocated server nodes.
[0092] The reallocated server nodes within the selection range of the reallocated server nodes can adapt to the mobility of users and are better choices for task reallocation.
[0093] However, if the direction from the current closest server node to the reallocated server node is more consistent with the direction from the previous closest server node to the current closest server node, it means that the user is more likely to move in this direction in the future, so the transmission delay of arranging the reallocated server node in this direction will be smaller. When the load of the current closest server node itself is too large, if a new task is assigned to it, the processing speed of the new task will still be very slow, and the delay will still be large. Therefore, a server node with a smaller load in the selection range of the reallocated server node should be used as the reallocated server node, and step 107 is introduced to solve the above problem.
[0094] Step 107, calculating the suitability of the reallocated server nodes in the selection range of the reallocated server nodes, and taking the reallocated server node with the smallest suitability in the selection range of the reallocated server nodes as the optimal server node.
[0095] The optimal server node is the best choice to receive the reallocated tasks.
[0096] In some embodiments, step 107 includes:
[0097] Step 1071, calculating the suitability of the reallocated server nodes in the selection range of the reallocated server nodes according to the following formula:
[0098]
[0099] In the formula, E j,p,k The appropriateness of the reallocated server node indicates that the pth task of the jth server node is reallocated by the kth server node in the selection range of the reallocated server node whose necessary degree of load distribution is greater than the degree threshold. j,p,k The optimal server node can be selected from the redistributed server nodes within the selection range of the redistributed server nodes. i,k Indicates the necessary degree of load distribution of the kth server node in the selection range of the redistributed server node, the necessary degree of load distribution obtained at the i-th load detection time is greater than the degree threshold, and the value is not zero, θ p Indicates the direction of the redistributed server node in the selection range of the server node receiving the pth task and the swing trend degree from the last nearest server node to the current nearest server node corresponding to the user terminal sending the pth task during the movement process. The value is not zero. p represents the task number, j represents the server node number, i represents the load detection time number, and k represents the number of server nodes in the selection range of the redistributed server node whose necessary degree of load distribution is greater than the degree threshold. Q i,k The larger the p The larger the The smaller, that is, E j,p,k The smaller the value is, the more likely it is that the user will move to the reallocated server node, and the more likely it is that the reallocated server node will be used as the optimal server node.
[0100] Step 1072: The reallocated server node with the least degree of suitability in the selection range of the reallocated server nodes is selected as the optimal server node.
[0101] Step 108, assigning the task of the task-to-be-assigned node to the optimal server node, and performing data transmission with the user terminal and the response of the user terminal task through the optimal server node.
[0102] In summary, the embodiment of the present invention provides a smart park data transmission method based on the Internet of Things. The method can take into account the load of different server nodes, the distance from the user and the transmission delay, as well as the user's mobility. The optimal server node is arranged to process the tasks of the user terminal to ensure a good network experience for users in the smart park.
[0103] It should be noted that the sequence of the above embodiments of the present invention is only for description and does not represent the advantages and disadvantages of the embodiments. The processes depicted in the accompanying drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0104] The various embodiments in this specification are described in a progressive manner, and the same or similar parts between the various embodiments can be referenced to each other, and each embodiment focuses on the differences from other embodiments.
Claims
1. A smart park data transmission method based on the Internet of Things, characterized in that: The method comprises: According to the load of the server node, determine the server node whose necessary degree of load distribution of the server node is greater than the degree threshold, and use the server node whose necessary degree of load distribution of the server node is greater than the degree threshold as the node to be assigned a task; Determine the task real-time requirement degree of the task sent by the user terminal received by the server node; Determine the distance between the redistributed server node and the node to be assigned the task based on the topological structure diagram, the real-time requirement of the task, the distance between the two farthest server nodes in the park, and the position corresponding to the time when the user terminal sends the task, wherein the topological structure diagram is determined according to the position of the server nodes in the park; Based on the movement trajectory corresponding to the time when the task is sent by the user terminal to the time when the task is sent by the user terminal, as well as the movement speed corresponding to the time when the task is sent by the user terminal and the movement speed corresponding to the time when the task is sent by the user terminal, the distance between the reallocation server node and the node to be assigned the task is adjusted to obtain the optimal adjustment distance; Based on the optimal adjustment distance, determining a selection range of reallocated server nodes; On the topology structure diagram, based on the selection range of the reallocated server nodes, determining the reallocated server nodes in the selection range of the reallocated server nodes; Calculating the suitability of the reallocated server nodes in the selection range of the reallocated server nodes, and taking the reallocated server node with the smallest suitability in the selection range of the reallocated server nodes as the optimal server node; The task of the task-to-be-assigned node is assigned to the optimal server node, and data transmission and user terminal task response are performed with the user terminal through the optimal server node.
2. According to the method for data transmission in a smart park based on the Internet of Things in claim 1, it is characterized in that: The method adjusts the distance between the redistribution server node and the task to-be-assigned node based on the movement trajectory corresponding to the time when the task is sent by the user terminal to the time when the task is sent by the user terminal, and the movement speed corresponding to the time when the task is sent by the user terminal and the movement speed corresponding to the time when the task is sent by the user terminal to obtain the optimal adjustment distance, including: Based on the movement trajectory corresponding to the time from the task time sent by the user terminal to the time adjacent to the task time sent by the user terminal, and the movement speed corresponding to the task time sent by the user terminal, the distance between the reallocation server node and the task to be allocated node is adjusted to obtain a first adjusted distance; Calculate the average of the first adjustment distance corresponding to the task time sent by the user terminal, the second adjustment distance and the third adjustment distance adjacent to the task time sent by the user terminal, and the fourth adjustment distance and the fifth adjustment distance adjacent to the task time sent by the user terminal to obtain the optimal adjustment distance.
3. According to the method for data transmission in a smart park based on the Internet of Things in claim 1, it is characterized in that: Before determining, based on the load of the server node, a server node whose necessary degree of load distribution of the server node is greater than a degree threshold, and taking the server node whose necessary degree of load distribution of the server node is greater than the degree threshold as a node to be assigned a task, the method further includes: Through base station positioning, the location, movement trajectory and movement speed of the user terminal are determined.
4. According to the method for data transmission in a smart park based on the Internet of Things in claim 1, it is characterized in that: The step of determining, according to the load of the server node, a server node whose necessary degree of load distribution of the server node is greater than a degree threshold, and taking the server node whose necessary degree of load distribution of the server node is greater than the degree threshold as a node to be assigned a task comprises: Determine the necessary degree of load distribution of server nodes according to the following formula: In the formula, Q i,j represents the necessary degree of load distribution of the jth server node at the i-th load detection time, S i,j represents the load of the jth server node at the i-th load detection moment, S represents the load of the j-th server node in all recorded historical moments, max{} represents a function for finding the maximum value, and i represents the sequence number of the load detection moment; In response to the necessary degree of load distribution of the server node being greater than a degree threshold, the server node whose necessary degree of load distribution of the server node is greater than the degree threshold is used as a node to be assigned a task.
5. According to the method for data transmission in a smart park based on the Internet of Things in claim 1, it is characterized in that: According to the following formula, the real-time requirement degree of the task sent by the user terminal received by the server node is determined: Where U j,p represents the real-time requirement of the pth task sent by the same user terminal and received by the jth server node, p represents the task number, j represents the server node number, and n represents the set K m The total number of time intervals contained in the set K. m The number of the time interval contained in t p-l,p-l+1 represents the time interval between the mth user terminal sending the pl-th request and the p-l+1-th request, m represents the sequence number of the user terminal, and the set K m The elements of K are the time intervals between two consecutive moments when the same user terminal sends task requests to the same server node, and the time interval between two consecutive moments when the same user terminal sends task requests to the same server node is less than 60s. m It is expressed as {t p-1,p ,t p,p+1 ,...,t p-l,p-l+1 }.
6. The method for transmitting data in a smart park based on the Internet of Things according to claim 2, characterized in that: According to the following formula, based on the topological structure diagram, the real-time requirement of the task, the distance between the two farthest server nodes in the park, and the position corresponding to the time when the user terminal sends the task, the distance between the reallocation server node and the node to be allocated for the task is determined: In the formula, l p represents the distance between the redistribution server node and the node to be assigned the task, L represents the distance between the two server nodes farthest apart in the park, and U j,p represents the real-time requirement of the p-th task sent by the same user terminal and received by the j-th server node, U represents the real-time requirement of the p-th task sent by the same user terminal and received by all server nodes, max{} represents the function for finding the maximum value, p represents the task number, and j represents the server node number.
7. The method for transmitting data in a smart park based on the Internet of Things according to claim 6, characterized in that: According to the following formula, based on the movement trajectory corresponding to the time from the task time sent by the user terminal to the time adjacent to the task time sent by the user terminal, and the movement speed corresponding to the task time sent by the user terminal, the distance between the reallocation server node and the task to be allocated node is adjusted to obtain a first adjusted distance: In the formula, l p ' represents the first adjustment distance, l p represents the distance between the redistribution server node and the node to be assigned the task, tanh() represents the hyperbolic tangent function, v p The mobile speed of the same user terminal sending the p-th task, max(v) represents the maximum mobile speed of the same user terminal sending the p-th task.
8. The method for transmitting data in a smart park based on the Internet of Things according to claim 7, characterized in that: After entering the park, the straight line connecting the last nearest server node and the current nearest server node of the mobile user terminal and the straight line connecting the current nearest server node and the next nearest server node of the mobile user terminal form an angle. As the user terminal moves, multiple angles are obtained, and the average of the multiple angles is calculated, and the average is used as the swing trend degree θ of the user terminal from the last nearest server node to the current nearest server node. m , the determining of a selection range of redistributed server nodes based on the optimal adjustment distance includes: In the topology structure diagram, a circle is drawn with the current nearest server node as the center and the optimal adjustment distance as the radius to obtain a first range; In the topology diagram, the current nearest server node is taken as the radiating point, and a ray is drawn from the direction from the previous nearest server node to the current nearest server node as the positive direction. The ray is rotated clockwise and counterclockwise by a first angle to obtain an upper boundary ray and a lower boundary ray. The closed area surrounded by the upper boundary ray, the lower boundary ray and the circle is the selection range of the redistributed server node. The value of the first angle is the swing trend degree θ m .
9. The method for transmitting data in a smart park based on the Internet of Things according to claim 8, characterized in that: Calculating the suitability of the reallocated server nodes in the selection range of the reallocated server nodes, and taking the reallocated server node with the smallest suitability in the selection range of the reallocated server nodes as the optimal server node, including: The suitability of the reallocated server node in the selection range of the reallocated server node is calculated according to the following formula: In the formula, E j,p,k The appropriateness of the reallocated server node Q represents the appropriateness of the reallocated server node for which the pth task of the jth server node is reallocated by the kth server node in the selection range of the reallocated server node whose necessary degree of load distribution is greater than the degree threshold. i,k Indicates the necessary degree of load distribution of the kth server node in the selection range of the redistributed server node, the necessary degree of load distribution obtained at the i-th load detection time is greater than the degree threshold, θ p Indicates the direction of the redistributed server node in the selection range of the server node receiving the pth task and the swing trend degree from the last nearest server node to the current nearest server node corresponding to the user terminal sending the pth task during the movement process, p represents the task number, j represents the server node number, i represents the number of load detection time, and k represents the number of server nodes in the selection range of the redistributed server node whose necessary degree of load distribution is greater than the degree threshold; The reallocated server node with the smallest degree of suitability in the selection range of the reallocated server nodes is selected as the optimal server node.
10. The method for transmitting data in a smart park based on the Internet of Things according to claim 1, characterized in that: The selection range of the degree threshold is 0.4 to 0.6.
Citation Information
Patent Citations
Smart park rapid fire emergency processing method and system based on Internet of Things
CN115175126A
Service function chain reconstruction method and system based on edge network
CN117439903A