Inspection data transmission method in dynamic network environment
By deploying data reception and transmission service instances in a dynamic network environment, and using self-test process, heartbeat mechanism and random election mechanism, rapid data transmission, breakpoint continuous transmission and data verification of sectors are achieved, solving the problems of low data transmission efficiency and high resource consumption in the existing technology.
Patent Information
- Application Number
- CN202510377978.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-28
- Publication Date
- 2025-06-24
AI Technical Summary
In a dynamic network environment, it is difficult for the prior art to achieve rapid data transmission, breakpoint continuous transmission and data verification of sectors, and the deployment of message queue components increases potential failure points and resource consumption.
By deploying data reception and sending service instances on the data middle platform side and edge device side, the self-test process, heartbeat mechanism and random election mechanism are used to realize service registration and discovery, split the data into multiple sectors and generate verification codes, select the target instance for data transmission, and complete the checksum splicing in the data middle platform.
It realizes rapid data transmission, breakpoint continuous transmission and data verification of sectors, reduces resource consumption and potential failure points, and improves transmission efficiency and reliability.
Smart Images

Figure CN120201054A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of power transmission and distribution, and particularly to a method for transmitting inspection data in a dynamic network environment. Background Art
[0002] In the industrial Internet and Internet of Things systems, the transmission of edge device data to the data center in a dynamic network environment is usually achieved by using message queue technology and Message Queuing Telemetry Transport (MQTT) technology. Although the purpose of data transmission can be achieved, the prerequisite for deploying message queue components in a cluster environment is to deploy application program coordination components. This requires both the data center side and the edge side to deploy application program coordination components and message queue components, and run services that implement the MQTT function on the data center side or the edge side, resulting in an increase in the number of services and potential failure points, and an increase in resource consumption on the edge side.
[0003] At the same time, the data synchronization process implemented by MQTT technology is still affected by the network environment in fact, and cannot solve the problems of data interruption and resume transmission due to the network environment.
[0004] Chinese patent document with publication number CN110166472A and publication date August 23, 2019 discloses an inspection data transmission method, an inspection robot and an inspection system. The method includes: Obtaining inspection data; Encrypting the inspection data according to a preset encryption algorithm to obtain a ciphertext of the inspection data; Sending the ciphertext of the inspection data to a local robot server through a public broadband network. The local robot server decrypts the ciphertext of the inspection data according to a preset decryption algorithm corresponding to the preset encryption algorithm to obtain the inspection data, processes the inspection data according to a preset processing algorithm to obtain data to be transmitted with a data capacity suitable for transmission on a power wireless private network, and on the basis of encrypting the data to be transmitted according to the preset encryption algorithm to obtain a ciphertext of the data to be transmitted; Receiving the ciphertext of the data to be transmitted fed back by the local robot server, and decrypting the ciphertext of the data to be transmitted according to the preset decryption algorithm to obtain the data to be transmitted; Transmitting the data to be transmitted through the power wireless private network.
[0005] The inspection data transmission method disclosed in this patent document reduces the occupancy of public broadband network resources and meets the requirements of large data volume transmission. However, the data transmission efficiency is low, and breakpoint resume transmission and sector-by-sector data verification cannot be achieved. Summary of the Invention
[0006] In order to overcome the defects of the above-mentioned prior art, the present invention provides a method for transmitting inspection data in a dynamic network environment. The present invention not only supports multiple groups of data sending and data receiving service instances to achieve fast data transmission through concurrent means, but also realizes breakpoint continuation of data transmission and sector-based data verification.
[0007] The present invention is realized through the following technical solutions: A method for transmitting inspection data in a dynamic network environment, characterized by comprising the following steps: S1. When at least one data receiving service instance is deployed on the data center side and starts, it executes a self-check process. After the data receiving service module of the data center passes the self-check, it registers a temporary node with the application program coordination component and maintains the registration status through a heartbeat mechanism until the service goes offline; S2. When there are multiple data receiving service instances, the initialization call count of each instance is 0, and an election instance is determined in the application program coordination component through a random election mechanism; S3. When a data sending service instance is deployed on the edge device side and starts, it executes a self-check process. After the data sending service module of the edge device passes the self-check, it queries the application program coordination component to obtain data receiving service parameters; S4. The data collected by the edge device is split into multiple sectors with serial numbers and a check code is generated, and a target instance is selected according to the available status of the data receiving service instance and the data is transmitted to the data center; S5. After the data receiving service module of the data center completes the reception of the sector, it triggers the edge device to delete the corresponding data, and verifies the continuity of the sector serial numbers and the consistency of the check codes. After passing, data splicing and decompression are performed.
[0008] In S1, the self-check process executed when the data receiving service instance starts refers to checking whether the data receiving service instance can be connected to the application program coordination component and the database in the data center.
[0009] In S2, determining the election instance in the application program coordination component through a random election mechanism means that each data receiving service instance records the call count in the application program coordination component, and synchronizes the call count records of all data receiving service instances after each call; when a non-all-zero state is detected, each data receiving service instance independently calculates the cumulative probability distribution {x1, x2,..., xn}, generates a uniformly distributed random number X in the interval [0, 1), and determines the election instance according to the probability distribution.
[0010] In S3, the self-check process executed when the data sending service instance starts refers to checking whether the data sending service instance can be connected to the application program coordination component and the database in the edge device.
[0011] In S3, obtaining the data reception service parameters means that when the data transmission service instance is a single instance, the data transmission service instance after self-check queries the service parameters of the elected data reception service instance from the application coordination component; when the data transmission service instance is a multi-instance, the data transmission service instance after self-check queries the service parameters of all available data reception service instances from the application coordination component.
[0012] In S4, the check codes include sector data check codes and complete sector data check codes, and both the sector data check codes and the complete sector data check codes are stored in the edge device.
[0013] The complete sector data check code refers to the data check code formed by arranging all the sector data check codes in an orderly manner.
[0014] In S4, selecting the target instance and transmitting data to the data center means that when the data transmission service of the edge device is a single instance, when there is sector data to be transmitted in the edge device database, the data to be transmitted is sent to the data center by calling the service parameters of the elected data reception service instance that has been obtained; when the data transmission service of the edge device is a multi-instance, each instance sequentially checks the available status of all the data reception services that have been queried and whether the service is reachable. When the service is available and reachable, the data to be transmitted is sent to the data center by calling the parameters of this data reception service.
[0015] In S5, triggering the edge device to delete the corresponding data means that every time the data reception service module in the data center completely receives a sector of data and passes the verification, it calls the service interface of the edge device to delete the sector data corresponding to the sector data check code.
[0016] In S5, verifying the sequence continuity of the sectors and the consistency of the check codes means that the data reception service module checks whether the sequence numbers of all the received sectors are continuous. If they are continuous, the sector data check codes of each sector are spliced in order and it is verified whether they match the complete sector data check code. If they match, the sector data of each sector is spliced in order and decompressed; if they are not continuous or the sector data check codes spliced in order do not match the complete sector data check code, it exits and waits for the next call.
[0017] The dynamic network environment described in the present invention refers to a wireless network with unstable connection status and transmission performance.
[0018] The data center described in the present invention refers to a platform for data aggregation and data storage.
[0019] The edge device described in the present invention refers to a mobile terminal.
[0020] The heartbeat mechanism described in the present invention is a mechanism for detecting the network connection status.
[0021] The beneficial effects of the present invention are mainly manifested in the following aspects: 1. In the present invention, S1: When at least one data receiving service instance is deployed on the data middle platform side and starts, it executes a self-check process. After the data receiving service module on the data middle platform passes the self-check, it registers a temporary node with the application program coordination component and maintains the registration status through a heartbeat mechanism until the service goes offline; S2: When there are multiple data receiving service instances, the initialization call count of each instance is 0, and an election instance is determined in the application program coordination component through a random election mechanism; S3: When a data sending service instance is deployed on the edge device side and starts, it executes a self-check process. After the data sending service module on the edge device passes the self-check, it queries the application program coordination component to obtain data receiving service parameters; S4: The data collected by the edge device is split into multiple sectors with serial numbers and a check code is generated. The target instance is selected according to the available status of the data receiving service instance and the data is transmitted to the data middle platform; S5: After the data receiving service module on the data middle platform completes the sector reception, it triggers the edge device to delete the corresponding data, and verifies the serial number continuity and check code consistency of the sectors. After passing, data splicing and decompression are performed. Compared with the prior art, it not only supports the rapid transmission of data by multiple groups of data sending and data receiving service instances in a concurrent manner, but also realizes the breakpoint continuation of data and sector-by-sector data verification.
[0022] 2. In the present invention, the application program coordination component is used to realize the registration of data receiving service instances and the service discovery function of data sending service instances. When a single data sending service instance and multiple data receiving service instances are deployed, the data receiving service instances are elected in a self-coordinating manner, which can avoid the consumption of resources caused by deploying unnecessary components on the data middle platform side and the edge device side.
[0023] 3. In the present invention, the data of the patrol inspection data transmitted from the edge device to the data middle platform is split into multiple data sets composed of "sector serial number, sector data, sector data check code, and a check code of a string composed of sector data check codes in sequence". The data transmission from the edge device to the data middle platform is realized by the data sending service instance calling the data service receiving instance. After the transmission is completed and verified, the sector data of the edge device is deleted until there is no data to be transmitted in the edge device database, realizing the rapid transmission of data and improving the transmission efficiency.
[0024] 4. In the present invention, multiple data receiving service instances achieve the load balancing of the data receiving service through the combined call count of each instance and a random process. When multiple data receiving instances are deployed in a clustered data middle platform, the uniform distribution of traffic for each node can be realized.
[0025] 5. The present invention realizes load balancing through dynamic election and probability allocation, and combines strict data verification and status management to ensure the reliability and consistency of cross-platform data transmission. BRIEF DESCRIPTION OF THE DRAWINGS
[0026] The present invention will be further specifically described below in conjunction with the accompanying drawings of the specification and the specific embodiments: Figure 1 is a flowchart of the present invention; Figure 2 is a flowchart of the service registration and discovery process of the data sending service and the receiving service of the present invention; Figure 3 is a flowchart of the service self-check process of the present invention; Figure 4 is a flowchart of the service example election process of the present invention. SPECIFIC EMBODIMENTS
[0027] Embodiment 1 See Figure 1 , a method for transmitting inspection data in a dynamic network environment, including the following steps: S1. When at least one data receiving service instance is deployed on the data middle platform side and starts, it executes a self-check process. After the data receiving service module of the data middle platform passes the self-check, it registers a temporary node with the application program coordination component and maintains the registration status through a heartbeat mechanism until the service goes offline; S2. When there are multiple data receiving service instances, the initial call count of each instance is 0, and an election instance is determined in the application program coordination component through a random election mechanism; S3. When a data sending service instance is deployed on the edge device side and starts, it executes a self-check process. After the data sending service module of the edge device passes the self-check, it queries the application program coordination component to obtain data receiving service parameters; S4. The data collected by the edge device is split into multiple sectors with serial numbers and a check code is generated, and the target instance is selected according to the available status of the data receiving service instance and the data is transmitted to the data middle platform; S5. After the data receiving service module of the data middle platform completes the sector reception, it triggers the edge device to delete the corresponding data, and checks the continuity of the sector serial numbers and the consistency of the check codes. After passing, it performs data splicing and decompression.
[0028] This embodiment is the most basic implementation method. S1: When at least one data receiving service instance is deployed on the data middle platform side, a self-check process is executed when it starts. After the data receiving service module of the data middle platform passes the self-check, a temporary node is registered with the application program coordination component, and the registration status is maintained through the heartbeat mechanism until the service goes offline; S2: When there are multiple data receiving service instances, the initial call count of each instance is 0, and an election instance is determined in the application program coordination component through a random election mechanism; S3: When a data sending service instance is deployed on the edge device side, a self-check process is executed when it starts. After the data sending service module of the edge device passes the self-check, the application program coordination component is queried to obtain data receiving service parameters; S4: The collected data is split into multiple numbered sectors by the edge device and a check code is generated, and a target instance is selected according to the available status of the data receiving service instance and the data is transmitted to the data middle platform; S5: After the data receiving service module of the data middle platform finishes receiving the sectors, the edge device is triggered to delete the corresponding data, and the continuity of the sector numbers and the consistency of the check codes are verified. After passing, data splicing and decompression are performed. Compared with the prior art, it not only supports the rapid transmission of data by multiple groups of data sending and data receiving service instances in a concurrent manner, but also realizes the breakpoint resumption of data and sector-by-sector data verification.
[0029] Embodiment 2 See Figures 1-4 , A method for transmitting inspection data in a dynamic network environment, including the following steps: S1: When at least one data receiving service instance is deployed on the data middle platform side, a self-check process is executed when it starts. After the data receiving service module of the data middle platform passes the self-check, a temporary node is registered with the application program coordination component, and the registration status is maintained through the heartbeat mechanism until the service goes offline; S2: When there are multiple data receiving service instances, the initial call count of each instance is 0, and an election instance is determined in the application program coordination component through a random election mechanism; S3: When a data sending service instance is deployed on the edge device side, a self-check process is executed when it starts. After the data sending service module of the edge device passes the self-check, the application program coordination component is queried to obtain data receiving service parameters; S4: The collected data is split into multiple numbered sectors by the edge device and a check code is generated, and a target instance is selected according to the available status of the data receiving service instance and the data is transmitted to the data middle platform; S5: After the data receiving service module of the data middle platform finishes receiving the sectors, the edge device is triggered to delete the corresponding data, and the continuity of the sector numbers and the consistency of the check codes are verified. After passing, data splicing and decompression are performed.
[0030] Preferably, in S1, when the data receiving service instance starts, the self-check process is to check whether the data receiving service instance can be connected to the application coordination component and the database in the data center.
[0031] In S2, determining the election instance in the application coordination component through the random election mechanism means that each data receiving service instance records the number of times it is called in the application coordination component, and after each call, it synchronizes the call count records of all data receiving service instances; when a non-all-zero state is detected, each data receiving service instance independently calculates the cumulative probability distribution {x1, x2,..., xn}, generates a uniformly distributed random number X in the interval [0, 1), and determines the election instance according to the probability distribution.
[0032] This embodiment is a preferred embodiment. By using the application coordination component, the registration of data receiving service instances and the service discovery function of data sending service instances are realized. When deploying a single data sending service instance and multiple data receiving service instances, the data receiving service instances are elected in a self-coordinating manner, which can avoid resource consumption caused by deploying unnecessary components on the data center side and the edge device side.
[0033] Embodiment 3 See Figures 1-4 , a method for transmitting inspection data in a dynamic network environment, including the following steps: S1. When at least one data receiving service instance is deployed on the data center side and starts, it executes a self-check process. After the data receiving service module in the data center passes the self-check, it registers a temporary node with the application coordination component and maintains the registration status through a heartbeat mechanism until the service goes offline; S2. When there are multiple data receiving service instances, the initial call count of each instance is 0, and the election instance is determined in the application coordination component through a random election mechanism; S3. When the data sending service instance is deployed on the edge device side and starts, it executes a self-check process. After the data sending service module on the edge device passes the self-check, it queries the application coordination component to obtain data receiving service parameters; S4. The data collected by the edge device is split into multiple numbered sectors and a check code is generated, and the target instance is selected according to the available status of the data receiving service instance and the data is transmitted to the data center; S5. After the data receiving service module in the data center completes the sector reception, it triggers the edge device to delete the corresponding data, and verifies the continuity of the sector numbers and the consistency of the check codes. After passing, it performs data splicing and decompression.
[0034] In S1, when the data receiving service instance starts, the self-check process is to check whether the data receiving service instance can be connected to the application coordination component and the database in the data center.
[0035] In S2, determining the election instance in the application coordination component through the random election mechanism means that each data receiving service instance records the number of calls in the application coordination component, and after each call, synchronizes the call number records of all data receiving service instances; when detecting a non-all-zero state, each data receiving service instance independently calculates the cumulative probability distribution {x1, x2,..., xn}, generates a uniformly distributed random number X in the interval [0, 1), and determines the election instance according to the probability distribution.
[0036] Further preferably, in S3, the self-check process executed when the data sending service instance starts means checking whether the data sending service instance can be connected to the databases in the application coordination component and the edge device.
[0037] In S3, obtaining the data receiving service parameters means that when the data sending service instance is a single instance, the data sending service instance after self-check queries the service parameters of the elected data receiving service instance from the application coordination component; when the data sending service instance is a multi-instance, the data sending service instance after self-check queries the service parameters of all available data receiving service instances from the application coordination component.
[0038] This embodiment is another preferred embodiment. The inspection data transmitted from the edge device to the data center is split into multiple data sets composed of "sector number, sector data, sector data check code, and the check code of the string composed of each sector data check code in sequence". The data transmission from the edge device to the data center is realized by the data sending service instance calling the data service receiving instance. After the transmission is completed and verified, the sector data of the edge device is deleted until there is no data to be transmitted in the edge device database, realizing fast data transmission and improving the transmission efficiency.
[0039] Embodiment 4 See Figures 1-4 , a method for transmitting inspection data in a dynamic network environment, including the following steps: S1. When at least one data receiving service instance is deployed on the data center side and starts, it executes a self-check process. After the self-check of the data receiving service module in the data center passes, it registers a temporary node with the application coordination component and maintains the registration status through the heartbeat mechanism until the service goes offline; S2. When there are multiple data receiving service instances, the initial call count of each instance is 0, and the election instance is determined in the application coordination component through the random election mechanism; S3. When the data sending service instance is deployed on the edge device side and starts, it executes a self-check process. After the self-check of the data sending service module in the edge device passes, it queries the application coordination component to obtain the data receiving service parameters; S4. Split the collected data into multiple numbered sectors through the edge device and generate a check code. Select a target instance based on the available status of the data receiving service instance and transmit the data to the data center platform. S5. After the data receiving service module of the data center platform completes the sector reception, trigger the edge device to delete the corresponding data, and verify the continuity of the sector numbers and the consistency of the check codes. After passing, perform data splicing and decompression.
[0040] In step S1, the self-check process executed when the data receiving service instance starts refers to checking whether the data receiving service instance can be connected to the application program coordination component and the database in the data center platform.
[0041] In step S2, determining the election instance in the application program coordination component through the random election mechanism means that each data receiving service instance records the number of calls in the application program coordination component, and synchronizes the call number records of all data receiving service instances after each call; when detecting a non-all-zero state, each data receiving service instance independently calculates the cumulative probability distribution {x1, x2,..., xn}, generates a uniformly distributed random number X in the interval [0, 1), and determines the election instance according to the probability distribution.
[0042] In step S3, the self-check process executed when the data sending service instance starts refers to checking whether the data sending service instance can be connected to the application program coordination component and the database in the edge device.
[0043] In step S3, obtaining the data receiving service parameters means that when the data sending service instance is a single instance, the data sending service instance after self-check queries the service parameters of the elected data receiving service instance from the application program coordination component; when the data sending service instance is a multi-instance, the data sending service instance after self-check queries the service parameters of all available data receiving service instances from the application program coordination component.
[0044] In step S4, the check code includes the sector data check code and the complete sector data check code, and both the sector data check code and the complete sector data check code are stored in the edge device.
[0045] The complete sector data check code refers to the data check code formed by arranging all the sector data check codes in an orderly manner.
[0046] In S4, selecting a target instance and transmitting data to the data center means that when the data sending service of the edge device is a single instance, when there is sector data to be transmitted in the edge device database, the data to be transmitted is sent to the data center by calling the service parameters of the elected data receiving service instance that has been obtained; when the data sending service of the edge device is multiple instances, each instance sequentially checks the available status of all the queried data receiving services and whether the services are reachable. When the service is available and reachable, the data to be transmitted is sent to the data center by calling the parameters of the data receiving service.
[0047] This embodiment is another preferred embodiment. Multiple data receiving service instances achieve load balancing of the data receiving service through the number of calls of each instance combined with a random process. When multiple data receiving instances are deployed in a clustered data center, uniform distribution of traffic for each node can be achieved.
[0048] Embodiment 5 See Figures 1-4 , a method for transmitting inspection data in a dynamic network environment, including the following steps: S1. When at least one data receiving service instance is deployed on the data center side and starts, it executes a self-check process. After the data receiving service module of the data center passes the self-check, it registers a temporary node with the application program coordination component and maintains the registration status through a heartbeat mechanism until the service goes offline; S2. When there are multiple data receiving service instances, the initial call count of each instance is 0, and an election instance is determined in the application program coordination component through a random election mechanism; S3. When a data sending service instance is deployed on the edge device side and starts, it executes a self-check process. After the data sending service module of the edge device passes the self-check, it queries the application program coordination component to obtain data receiving service parameters; S4. The data collected by the edge device is split into multiple numbered sectors and a check code is generated, and the target instance is selected according to the available status of the data receiving service instance and the data is transmitted to the data center; S5. After the data receiving service module of the data center completes the sector reception, it triggers the edge device to delete the corresponding data, and checks the continuity of the sector numbers and the consistency of the check codes. After passing, data splicing and decompression are performed.
[0049] In S1, when the data receiving service instance starts to execute the self-check process, it means checking whether the data receiving service instance can be connected to the application program coordination component and the database in the data center.
[0050] In S2, determining the election instance in the application coordination component through the random election mechanism means that each data receiving service instance records the number of calls in the application coordination component, and after each call, it synchronizes the call number records of all data receiving service instances; when detecting a non-all-zero state, each data receiving service instance independently calculates the cumulative probability distribution {x1, x2,..., xn}, generates a uniformly distributed random number X in the interval [0, 1), and determines the election instance according to the probability distribution.
[0051] In S3, when the data sending service instance starts, performing the self-check process means checking whether the data sending service instance can be connected to the databases in the application coordination component and the edge device.
[0052] In S3, obtaining the data receiving service parameters means that when the data sending service instance is a single instance, after passing the self-check, the data sending service instance queries the service parameters of the elected data receiving service instance from the application coordination component; when the data sending service instance is a multi-instance, after passing the self-check, the data sending service instance queries the service parameters of all available data receiving service instances from the application coordination component.
[0053] In S4, the checksum includes the sector data checksum and the complete sector data checksum, and both the sector data checksum and the complete sector data checksum are stored in the edge device.
[0054] The complete sector data checksum refers to the data checksum formed after all sector data checksums are arranged in order.
[0055] In S4, selecting the target instance and transmitting data to the data center means that when the data sending service of the edge device is a single instance, when there is sector data to be transmitted in the edge device database, the data to be transmitted is sent to the data center by calling the service parameters of the elected data receiving service instance obtained; when the data sending service of the edge device is a multi-instance, each instance sequentially checks the available status of all data receiving services queried and whether the service is reachable. When the service is available and reachable, the data to be transmitted is sent to the data center by calling the parameters of the data receiving service.
[0056] More preferably, in S5, triggering the edge device to delete the corresponding data means that every time the data receiving service module of the data center completely receives the sector data and passes the verification, it calls the service interface of the edge device to delete the sector data corresponding to the sector data checksum.
[0057] In S5, verifying the sequence continuity of sectors and the consistency of check codes means that the data receiving service module checks whether the sequence numbers of all received sectors are continuous. If they are continuous, the data check codes of each sector are concatenated in sequence and verified to see if they match the check code of the complete sector data. If they match, the data of each sector is concatenated in sequence and decompressed. If they are not continuous or the concatenated data check codes of each sector in sequence do not match the check code of the complete sector data, it exits and waits for the next call.
[0058] This embodiment is the best implementation method. By implementing load balancing through dynamic election and probability allocation, combined with strict data verification and status management, it can ensure the reliability and consistency of cross-platform data transmission.
[0059] Data receiving service module of the data middle platform: When starting, it executes a self-check process to verify the connectivity with the application program coordination component and the database in the data middle platform. After passing the self-check, it registers in the application program coordination component in the form of a temporary node and maintains the registration status through a heartbeat mechanism until the service goes offline. When deploying multiple data receiving service instances, the number of times each instance is called during initialization is recorded as 0, and any instance is randomly selected as the election instance to register in the application program coordination component. After each data receiving service is called, the number of times it is called recorded in the application program coordination component is incremented by 1. And after each call, each instance reads the recorded number of times all instances are called in the application program coordination component. When the recorded number of times of all instances is not all 0, each instance increments its count by 1 and calculates the cumulative probability. Then a random number within the interval is generated in a uniform probability manner. Let the data receiving service instance corresponding to i be the election instance.
[0060] Data sending service module of the edge device: When starting, it executes a self-check process to verify the connectivity with the application program coordination component and the edge device database. In single-instance mode, it queries the parameters of the elected data receiving service. In multi-instance mode, it queries the parameters of all available data receiving services.
Claims
1. A method for transmitting patrol data in a dynamic network environment, characterized in that: The following steps are involved: S1. Deploy at least one data receiving service instance on the data middle station side and execute the self-check process when it starts. After the data receiving service module of the data middle station passes the self-check, register the temporary node with the application coordination component and maintain the registration status through the heartbeat mechanism until the service goes offline; S2. When there are multiple data receiving service instances, the number of times each instance is initialized to be called is 0, and the election instance is determined in the application coordination component through a random election mechanism; S3. When the data sending service instance is deployed on the edge device side and started, a self-check process is executed. After the data sending service module of the edge device passes the self-check, the application coordination component is queried to obtain the data receiving service parameters. S4. Split the collected data into multiple sectors with serial numbers through the edge device and generate a check code, select the target instance according to the available status of the data receiving service instance, and transmit the data to the data middle station; S5. After the data receiving service module of the data middle station completes sector reception, it triggers the edge device to delete the corresponding data and verify the continuity of the sector serial number and the consistency of the check code. After passing, data splicing and decompression are performed.
2. The method for transmitting patrol data in a dynamic network environment according to claim 1, characterized in that: In S1, the self-check process performed when the data receiving service instance is started refers to checking whether the data receiving service instance can be connected to the application coordination component and the database in the data center.
3. The method for transmitting patrol data in a dynamic network environment according to claim 1, characterized in that: In S2, determining the election instance in the application coordination component through a random election mechanism means that each data receiving service instance records the number of times it is called in the application coordination component, and after each call, synchronizes the call number records of all data receiving service instances; when a non-all-zero state is detected, each data receiving service instance independently calculates the cumulative probability distribution {x1, x2, ..., xn}, generates a uniform random number X in the interval [0,1), and determines the election instance according to the probability distribution.
4. The method for transmitting patrol data in a dynamic network environment according to claim 1, characterized in that: In S3, the self-check process performed when the data sending service instance is started refers to checking whether the data sending service instance can be connected to the application coordination component and the database in the edge device.
5. The method for transmitting patrol data in a dynamic network environment according to claim 1, characterized in that: In S3, obtaining the data receiving service parameters means that when the data sending service instance is a single instance, the data sending service instance after self-inspection queries the application coordination component for the service parameters of the elected data receiving service instance; when the data sending service instance is multiple instances, the data sending service instance after self-inspection queries the application coordination component for the service parameters of all available data receiving service instances.
6. The method for transmitting patrol data in a dynamic network environment according to claim 1, characterized in that: In S4, the check code includes a sector data check code and a complete sector data check code, and both the sector data check code and the complete sector data check code are stored in the edge device.
7. The method for transmitting patrol data in a dynamic network environment according to claim 6, characterized in that: The complete sector data check code refers to a data check code formed after all sector data check codes are arranged in order.
8. The method for transmitting patrol data in a dynamic network environment according to claim 1, characterized in that: In the S4, selecting the target instance and transmitting data to the data middle station means that when the data sending service of the edge device is a single instance, when there is sector data to be transmitted in the edge device database, the data to be transmitted is sent to the data middle station by calling the service parameters of the acquired elected data receiving service instance; when the data sending service of the edge device is a multi-instance, each instance sequentially checks the availability status of all queried data receiving services and whether the service is reachable. When the service is available and reachable, the data to be transmitted is sent to the data middle station by calling the parameters of the data receiving service.
9. The method for transmitting patrol data in a dynamic network environment according to claim 1, characterized in that: In S5, triggering the edge device to delete the corresponding data means that after the data receiving service module of the data middle station completely receives the sector data once and passes the verification, it calls the service interface of the edge device to delete the sector data corresponding to the sector data verification code.
10. The method for transmitting patrol data in a dynamic network environment according to claim 1, characterized in that: In the S5, checking the continuity of the sector serial numbers and the consistency of the check codes means that the data receiving service module checks whether the serial numbers of all sectors received are continuous. If they are continuous, the check codes of the sector data are spliced in sequence and verified whether they match the check code of the complete sector data. If they match, the data of each sector is spliced in sequence and decompressed; if they are discontinuous or the check codes of the sector data that are continuous but spliced in sequence do not match the check code of the complete sector data, the module exits and waits for the next call.
Citation Information
Patent Citations
Inspection data transmission method, inspection robot and inspection system
CN110166472A