Collection terminal communication method and device based on 698 protocol and medium

By initiating a TCP connection after the data link layer connection is stable, performing disconnection detection and fault handling, preloading the network parameter table, selecting appropriate network parameters for connection, the problem of unstable communication of the acquisition terminal in remote areas is solved, the on-line speed and on-line rate are improved, and the stability and robustness of the communication are enhanced.

CN120583545APending Publication Date: 2025-09-02QINGDAO ITECHENE TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510760026.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-09
Publication Date
2025-09-02

AI Technical Summary

Technical Problem

The existing acquisition terminals have unstable communication in remote areas and the network connection parameters cannot be unified, resulting in the problem of inability to go online.

Method used

After the connection of the data link layer is stable, the TCP connection is initiated, and the disconnection detection and fault processing are performed, the network parameter table is preloaded, the appropriate network parameters are selected for connection, the network communication channel is established, and data interaction is performed through the TCP connection.

Benefits of technology

The online speed and online rate of the acquisition terminal in remote areas are improved, the stability and speed of communication are ensured, robustness is enhanced, and the speed of the private network of different operators is adapted to the speed of the private network of different operators.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120583545A_ABST
    Figure CN120583545A_ABST
Patent Text Reader

Abstract

The invention provides an acquisition terminal communication method and device based on a 698 protocol and a medium, and belongs to the field of communication. When a collection terminal communicates, a network parameter table is preloaded, a network parameter is selected from the network parameter table to serve as a specified network parameter, then first connection is initiated to a server through network communication equipment and the specified network parameter, and after the first connection state is determined to be successful connection, the server is connected with the network communication equipment. A second connection is initiated to the server through the network communication device and the specified network parameters. During communication, connection states of the first connection and the second connection are continuously detected, error information is judged according to the connection states, and errors are tried to be solved. According to the communication method provided by the invention, the online speed and the online rate of the acquisition terminal in the remote area are improved, and the communication stability is ensured.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of communications, and in particular to a collection terminal communication method, device and medium based on the 698 protocol. Background Art

[0002] The acquisition terminal is primarily used to collect energy data from a large number of energy meters. After successful data collection, the acquisition terminal needs to upload the meter data to the State Grid acquisition master server. The acquisition terminal must also support remote reading of device data from the master server, as well as parameter settings and device control commands issued remotely by the master server. It must also support remote upgrades of the acquisition terminal by the master server. These data transmission, parameter settings, control, and upgrade functions all rely on TCP communication between the acquisition terminal and the master server. TCP communication relies on data link layer connections, including Ethernet and wireless dial-up.

[0003] Due to the large differences in the actual operating environments of collection equipment, only equipment in a very small number of areas can use Ethernet communication, and wireless dial-up communication can only be used when the base station signal in urban areas is relatively good. However, most collection terminals are distributed in remote areas such as urban edges, rural areas and mountainous areas. The base station signals in these locations are unstable and Ethernet connections cannot be used, which leads to unstable communication and the inability to guarantee the efficiency and accuracy of data interaction between the main station server and the collection terminal.

[0004] At the same time, in the actual operation of the collection terminal, the SIM card belonging to different operators may be used through wireless dial-up. The APN network parameters used by the same operator under different network standards may also be different. At this time, due to the different adaptation speeds of the collection terminal to the private network of different operators, the online speed of the collection terminal is affected, and it may even be impossible to go online.

[0005] It can be seen that the above-mentioned existing acquisition terminal communication method has the problems of unstable communication in remote areas and the inability to unify network connection parameters, which leads to the inability of the acquisition terminal to go online. Summary of the Invention

[0006] To address the above problems, this application uses wireless dial-up to establish a data link layer connection, and then initiates a TCP connection after the data link layer connection is stable. Data interaction between the master server and the acquisition terminal is carried out through the TCP connection. After the data link layer connection and the TCP connection are successful, disconnection detection and disconnection fault processing are continuously performed to ensure the stability of data interaction.

[0007] In a first aspect, the present application provides a collection terminal communication method based on the 698 protocol, which is applied to the collection terminal, and the method includes the following steps: Pre-loading a network parameter table, the network parameter table including network parameters, the network parameters including operator identification and connection parameters, and selecting a network parameter from the network parameter table as a designated network parameter; Initiate a first connection to the server through a network communication device and specified network parameters, the first connection being used to establish a network communication channel, the network communication device having a unique operator identifier; After detecting that the state of the first connection is successfully connected, a second connection is initiated to the server through the network communication device and the specified network parameters. The second connection is used to transmit data in the network communication channel.

[0008] Based on this solution, compared with the existing solution, a network parameter table is preloaded in the collection terminal. When establishing the first connection, network communication devices belonging to different operators can quickly find suitable network parameters through the network parameter table and establish the first connection through the network parameters. This setting improves the speed at which the collection terminal adapts to the operator's private network and improves the online speed and online rate of the collection terminal.

[0009] In conjunction with the first aspect, the network parameters also include a network standard, and the step of obtaining the specified network parameters includes: Group the network parameters according to the operator identifier, and sort the grouped network parameters according to the network standard; Preload the network group corresponding to the operator identification of the network communication device, and use the network parameters with the highest network standard in the network group as the designated network parameters.

[0010] Based on this solution, the range of pre-loaded network parameters is further limited according to the unique operator identifier of the network communication device. In the network parameter table, only the part related to the unique operator identifier of the network communication device is selected for pre-loading, thereby reducing the amount of loaded data and thus speeding up the loading speed. At the same time, the pre-loaded network parameters are sorted by network standard, and the network parameters with the highest network standard are selected as the designated network parameters to participate in establishing the first connection. The higher the network standard, the higher the communication rate and communication stability of the network, which further improves the online speed and online rate of the acquisition terminal while ensuring the communication rate and stability.

[0011] In combination with the first aspect, after detecting that the status of the first connection is successful, the method further includes the following steps: Create a connection log.

[0012] The connection log stores the specified network parameters used for the first connection and successful connection. In actual use, the problem of reconnecting network communication devices under the same operator may be encountered. The specified network parameters stored in the connection log will quickly establish the first connection through the stored specified network parameters when the collection terminal attempts to initiate the first connection to the server, resulting in faster connection and online speed and higher stability.

[0013] Scenarios for reconnecting network communication devices under the same operator include: replacing network communication devices under the same operator and restarting the collection terminal.

[0014] Based on this solution, the adapted operators can be memorized, making it easier to quickly go online after the device is restarted or the network communication equipment of the same operator is replaced.

[0015] In combination with the first aspect, the network parameters further include a network standard. After detecting that the status of the first connection is successful, the following steps are further included: Each time, the state and network parameters of the network communication device are obtained by querying for the first time, the state including the enabled state and the disabled state; When the network communication device is in an enabled state, after N consecutive queries find that the state of the network communication device is in an disabled state, where N is an integer greater than 1, the state of the network communication device is updated to a disabled state; When the network communication device is in an inactive state, after it is found that the state of the network communication device is active, the state of the network communication device is updated to the active state.

[0016] Based on this solution, when the network communication device is in the enabled state, it is necessary to query the same unenabled state result N times in a row before switching from the enabled state to the unenabled state. When the network communication device is in the unenabled state, it only needs to query the network communication device as the enabled state once to switch the network communication device to the enabled state. This can effectively prevent misjudgment of the network communication device state during actual operation, and at the same time ensure that the network communication device is switched from the unenabled state to the enabled state in a timely manner, thereby ensuring the real-time and effectiveness of communication.

[0017] In combination with the first aspect, after the status of the network communication device is updated to the enabled state, the following steps are further included: Detecting the operator identification of the network communication device, and if the operator identification is changed and the changed operator identification is valid, selecting the network parameters of the highest network standard corresponding to the changed network operator identification from the network parameter table; The first connection is re-initiated to the server using the above network parameters as designated network parameters.

[0018] Based on this solution, after a network communication device is updated from an inactive state to an active state, the first connection between the network communication device and the server needs to be re-established. At this time, the operator identifier corresponding to the network communication device may change. It is necessary to determine whether the changed operator identifier is valid. If it is valid, the network parameters with the changed operator identifier are pre-loaded from the network parameter table. The network parameters with the highest network standard are selected as the designated network parameters from the pre-loaded network parameters, and the first connection to the server is re-established. This solution ensures the robustness of the first connection, fully considering the scenarios when the network communication device fails and is replaced.

[0019] In combination with the first aspect, when detecting that the connection status of the first connection is successful, the method further includes the following steps: Every second time period, the status of the first connection is queried and obtained. When the status of the first connection changes and the connection fails, the accumulated offline time is recorded and updated. Every third time period after the accumulated offline time, the network parameters are switched and an attempt is made to re-establish the first connection. The network parameters herein specifically refer to network parameters with an operator identifier corresponding to the network communication device. When the accumulated offline time reaches a first threshold, the network connection device is forcibly powered off and restarted. When the accumulated offline time reaches a second threshold, the collection terminal system is reset. When the status of the first connection is connection failure and the network communication device is in an inactive state, the accumulated offline time is reset to zero and updating of the accumulated offline time is suspended; When the state of the first connection changes and the connection is successful, the state of the first connection is updated to successful connection.

[0020] Based on this solution, when the connection status of the first connection is failed, it can be diagnosed and self-repaired in time to adapt to different application scenarios, further enhancing robustness and improving the detection speed and network recovery speed when the network status is abnormal.

[0021] In combination with the first aspect, initiating a second connection to the server further includes the following steps: Detecting and acquiring a status of a second connection; When the status of the second connection is connection failure, the accumulated failure time is recorded and updated; every time the accumulated failure time exceeds a fourth time, the network parameters are switched, and the first connection and the second connection are initiated to the server through the network communication device and the switched network parameters; when the accumulated failure time reaches a third threshold, the acquisition terminal is forcibly restarted; When the status of the second connection is successful, the accumulated failure time is reset to zero and the updating of the accumulated failure time is suspended.

[0022] Here, initiating the first connection and the second connection to the server through the network communication device and the switched network parameters should be understood as: establishing the first connection, detecting the connection status of the first connection and establishing the second connection in sequence, and cannot be understood as initiating the first connection and the second connection at the same time.

[0023] Based on this solution, a double-layer connection detection is performed on the first connection and the second connection. The connection detections cooperate with each other to jointly select network parameters to ensure the stability of the connection.

[0024] A second aspect of the present application provides a collection terminal communication device based on the 698 protocol, including a first connection module and a second connection module, wherein: The first connection module is used to initiate a first connection to the server through a network communication device and specified network parameters, the first connection is used to establish a network communication channel, and the network communication device has a unique operator identifier; The second connection module is used to initiate a second connection to the server through the network communication device and specified network parameters when detecting that the state of the first connection is successful. The second connection is used to transmit data in the network communication channel.

[0025] The third aspect of the present application provides a collection terminal communication device based on the 698 protocol, including a memory and a processor, the memory is coupled to the processor, the memory is used to store programs or instructions, when the program or instruction is executed by the processor, the collection terminal communication device executes the collection terminal communication method as described above.

[0026] A fourth aspect of the present application provides a computer-readable storage medium storing a computer program. When the computer program is executed, the acquisition terminal communication method described above is performed.

[0027] The technical effects brought about by the second to fourth aspects of this application can be referred to the technical effects of the first aspect mentioned above, and will not be elaborated here. BRIEF DESCRIPTION OF THE DRAWINGS

[0028] Figure 1 This is a schematic diagram of the communication between the acquisition terminal and the operator network server in one embodiment of the present application.

[0029] Figure 2 This is a schematic diagram of a collection terminal communication method based on the 698 protocol in an embodiment of the present application.

[0030] Figure 3 Schematic diagram of the seven-layer model of the communication protocol.

[0031] Figure 4 This is a schematic diagram of host network communication.

[0032] Figure 5 A schematic diagram of obtaining specified network parameters according to an embodiment of the present application.

[0033] Figure 6 This is a schematic diagram of network communication device status update according to an embodiment of the present application.

[0034] Figure 7 A schematic diagram of selecting network parameters according to an embodiment of the present application.

[0035] Figure 8 This is a schematic diagram of updating the first connection failure status according to an embodiment of the present application.

[0036] Figure 9 This is a schematic diagram of updating the second connection failure status according to an embodiment of the present application.

[0037] Figure 10 This is a structural diagram of a collection terminal communication device based on the 698 protocol in an embodiment of the present application.

[0038] Figure 11 A schematic diagram of a computer-readable storage medium used in an embodiment of the present application. DETAILED DESCRIPTION

[0039] In the following description, specific details such as specific system structures and techniques are provided for purposes of illustration rather than limitation to facilitate a thorough understanding of the embodiments of the present application. However, it will be apparent to those skilled in the art that the present application may be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to avoid obscuring the description of the present application with unnecessary detail.

[0040] It should be understood that when used in the present specification and the appended claims, the term "comprising" indicates the presence of described features, integers, steps, operations, elements and / or components, but does not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or collections thereof.

[0041] It will also be understood that the term "and / or" used in this specification and the appended claims refers to and includes any and all possible combinations of one or more of the associated listed items.

[0042] In addition, in the description of the present application specification and the appended claims, the terms "first", "second", "third", etc. are only used to distinguish the descriptions and cannot be understood as indicating or implying relative importance.

[0043] References to "one embodiment" or "some embodiments" in this specification mean that a particular feature, structure, or characteristic described in conjunction with that embodiment is included in one or more embodiments of the present application. Thus, phrases such as "in one embodiment," "in some embodiments," "in other embodiments," and "in other embodiments" appearing in various places in this specification do not necessarily refer to the same embodiment, but rather mean "one or more but not all embodiments," unless otherwise specifically emphasized. The terms "including," "comprising," "having," and variations thereof all mean "including but not limited to," unless otherwise specifically emphasized.

[0044] The present invention will be further explained and illustrated below in conjunction with specific embodiments.

[0045] See Figure 1 , a schematic diagram of the communication between the acquisition terminal and the operator network server in one embodiment of the present application. A network communication device 101 is provided in the acquisition terminal 10. In this embodiment, the network communication device 101 is specifically a SIM card. The network communication device 101 has a unique operator identifier, indicating that the network communication device 101 belongs to a specific operator. When making a network connection, the connection is made in accordance with the network connection parameter specifications of the specific operator. Therefore, in this embodiment, the operator server 20 includes multiple operator servers. The operators include: China Mobile, China Telecom, and China Telecom. The multiple servers here can be different servers of multiple operators or different servers of the same operator. This application does not limit this, nor does it limit the specific number of servers. It can be one server or multiple servers.

[0046] When the collection terminal 10 establishes a wireless network connection with the operator server 20, the wireless network connection is performed through the network communication device installed on the collection terminal 10. The network communication device 101 will be connected to the corresponding operator server 20 through the corresponding operator base station (not shown in the figure). The wireless connection method can be any data link layer encapsulation protocol that supports wireless connection. In this application solution, it is specifically connected through the PPP (Point-to-Point Protocol) protocol, that is, the point-to-point protocol.

[0047] See Figure 2 , which is a schematic diagram of a collection terminal communication method based on the 698 protocol according to an embodiment of the present application, including steps S1 to S3.

[0048] S1, preload the network parameter table, and select a network parameter from the network parameter table as the designated network parameter.

[0049] The network parameter table stores one or more network parameters, each of which contains an operator identifier and connection parameters. Those skilled in the art will understand that the network parameter table and network parameters are both custom data structures used to store data of a specified type. Please see Table 1 for details.

[0050] Table 1:

[0051] Table 1 is a network parameter table. Each row in Table 1 represents a network parameter. Each network parameter includes an operator identifier and connection parameters. In other embodiments, each network parameter also includes other parameters. The operator identifier is used to mark the operator server to which this network parameter is to be connected. In this embodiment, numbers are used as operator identifiers, such as 1 for China Mobile, 2 for China Unicom, etc. Those skilled in the art can design suitable characters or marks as operator identifiers, and this application does not impose any restrictions on this. The connection parameters specifically include IP addresses and DNS server addresses, etc., which are used to connect to the operator server. Other parameters can be set according to different actual application requirements, such as network standards. Table 1 is only an example of a custom data structure of a network parameter table and network parameters, which is used to explain this solution and should not be understood as a limitation on this solution. Those skilled in the art can understand that the data structure can have various forms and is not limited to the form of a table.

[0052] S2, initiating a first connection to the server through the network communication device and the specified network parameters.

[0053] The first connection is used to establish a network communication channel. In this embodiment, the first connection is specifically a wireless connection through the PPP protocol. The network communication channel is a network communication channel of the data link layer. After understanding the present application solution, you can select any data link layer communication protocol according to actual needs to establish a wireless network connection without any creative work.

[0054] S3: After detecting that the status of the first connection is successful, initiate a second connection to the server through the network communication device and the specified network parameters.

[0055] The second connection is used to transmit data in the network communication channel. In this embodiment, the second connection is specifically connected through the TCP protocol. The TCP protocol is a communication protocol of the transport layer. Figure 3 and Figure 4 , Figure 3This is a diagram of the seven-layer model of a communication protocol. From bottom to top, they are: physical layer, data link layer, network layer, transport layer, session layer, presentation layer, and application layer. The data link layer is used to establish host-to-host connections and transmit data between hosts. Although this ensures that each host can accurately transmit data to the corresponding host, after the corresponding host receives the data, it is unclear to which process to submit the data. Based on this, the transport layer is introduced to provide data transmission between processes. See Figure 4 , is a schematic diagram of host network communication. Host 1 and Host 2 establish a connection through the data link layer. Further, Port 1 in Host 1 and Port 2 in Host 2 establish a connection through the transport layer. This application solution fully considers the characteristics of network communication protocols and specifically designs a reliable communication method. On the premise of ensuring the stability of the data link layer connection, communication at the transport layer is carried out to ensure communication stability.

[0056] Furthermore, the network parameters also include the network standard. The steps for obtaining the specified network parameters include S11~S12. Figure 5 , which is a schematic diagram of obtaining specified network parameters according to an embodiment of the present application.

[0057] S11, grouping network parameters according to operator identifiers, and sorting the grouped network parameters according to network standards.

[0058] S12, pre-loading the network group corresponding to the operator identification of the network communication device, and using the network parameter with the highest network standard in the network group as the designated network parameter.

[0059] Network standards include 2G, 3G, 4G and 5G. The network parameters of different network standards under the same operator are different. In order to ensure that this solution can adapt to various network communication devices, the network parameter table is preloaded before connection. The network parameter table includes most of the network parameters. To prevent the preloading time from being long due to the network parameter table being too large, this embodiment groups according to the operator identifier and only preloads a set of network parameters corresponding to the network communication device, thereby speeding up the preloading process and ensuring the online speed of the acquisition terminal.

[0060] This embodiment further uses the network parameters of the highest network standard in the network group as the designated network parameters. The above network standards are from high to low: 5G, 4G, 3G and 2G. The higher the network standard, the faster the network transmission rate and the stronger the transmission stability, thereby improving the online rate of the acquisition terminal.

[0061] Furthermore, after detecting that the status of the first connection is successful, the method further includes establishing a connection log.

[0062] The connection log stores the specified network parameters for the first connection. After detecting that the status of the first connection is successful, the specified network parameters are stored in the connection log, so that when the first connection is re-initiated later, the specified network parameters with a greater possibility of successful connection are quickly found.

[0063] After the connection log is established, each time the first connection is initiated to the server, the specified network parameters stored in the connection log are first used.

[0064] For example, a SIM card under a certain operator has three network parameters for 5G, 4G, and 3G network standards. When establishing the first connection, the 5G network parameters with the highest network standard are used first. At this time, the connection fails and the 4G network parameters are switched to. At this time, the connection is successful and the 4G network parameters are stored in the connection log. Due to an emergency, the collection terminal restarts. After the collection terminal restarts, the first connection is re-established. The specified network parameters stored in the connection log are first queried to obtain the 4G network parameters, and the first connection is established using the 4G network parameters. There is no need to try the failed 5G parameters again, which improves the online speed of the collection terminal.

[0065] Furthermore, the connection log stores the specified network parameters after each successful first connection, and configures a connection weight based on the number of successful connections. The higher the connection weight, the higher the probability of a successful connection with the specified network parameters. One of the calculation formulas for the connection weight is as follows:

[0066] in, is the weight of the i-th specified network parameter, The number of successful connections for the i-th specified network parameters, It should be noted that this formula is only used to assist in explaining the present application and should not be considered as a limitation of the present application. Those skilled in the art can use other weight calculation methods without creative effort.

[0067] Each time the first connection is established, the network parameters with the highest connection weight are first tried. If this fails, the system returns to the preloaded network parameter table and tries other network parameters in turn until the connection is successful. The number of connection attempts is recorded. If the connection is successful, the connection weight is updated based on the number of connection attempts and the network parameters at the time of success.

[0068] Furthermore, after detecting that the status of the first connection is successful, the status of the first connection is kept detected to promptly detect communication failures and perform self-processing. Figure 6 , is a schematic diagram of network communication device status update according to an embodiment of the present application, including steps S21 to S23.

[0069] S21, querying and obtaining the status and network parameters of the network communication device every first time, where the status includes an enabled state and a disabled state.

[0070] S22, when the network communication device is in the enabled state, after N consecutive queries find that the state of the network communication device is in the disabled state, where N is an integer greater than 1, the state of the network communication device is updated to the disabled state.

[0071] S23, when the network communication device is in an inactive state, after querying that the state of the network communication device is active, updating the state of the network communication device to an active state.

[0072] In this embodiment, the network communication device is specifically a SIM card, and the enabled state and the disabled state are respectively the inserted state and the uninserted state. The insertion state of the SIM card is detected in real time, and when a communication failure occurs, the fault location can be quickly identified to determine the subsequent maintenance plan.

[0073] In this embodiment, the first time is specifically 30 seconds and N is 3. The present application does not impose any restrictions on this, and no creative effort is required to change the specific values ​​of the first time and N.

[0074] When the SIM card is in the inserted state, it is necessary to query the same uninserted state result three times in a row before switching from the inserted state to the uninserted state. When the SIM card is in the uninserted state, it is only necessary to query the SIM card as the inserted state once before switching the SIM card to the inserted state. This can effectively prevent misjudgment of the SIM card state during actual operation and ensure that the SIM card is switched from the uninserted state to the inserted state in a timely manner, ensuring the real-time and effectiveness of communication.

[0075] Furthermore, when the SIM card is reinserted, it is necessary to re-determine the operator to which it belongs in order to load the corresponding network parameter group. Figure 7 , which is a schematic diagram of selecting network parameters in an embodiment of the present application, including steps S31~S32.

[0076] S31 , detecting the operator identification of the network communication device, and if the operator identification is changed and the changed operator identification is valid, selecting the network parameters of the highest network standard corresponding to the changed network operator identification from the network parameter table.

[0077] In this embodiment, the operator identifier is characters 1 to 4, corresponding to 1: China Unicom; 2: China Telecom; 3: China Mobile; 4: Other. If the operator identifier is any of characters 1 to 4, the operator identifier is considered valid and the subsequent steps are continued. If it is other characters or garbled characters, the operator identifier is considered invalid, and a log is generated including the operator identifier, collection terminal ID, and time information, and saved to the collection terminal.

[0078] S32: Re-initiate a first connection to the server using the highest-standard network parameters as designated network parameters.

[0079] The step of initiating the first connection here also includes: S33, reading the connection log, and if the connection log stores the specified network parameters, clearing the connection log.

[0080] S34, after the first connection is successful, the specified network parameters during the connection are stored in the connection log.

[0081] After changing the operator, the format and content of the corresponding network parameters must also be changed accordingly. Continuing to use the previous operator's network parameters will inevitably lead to connection failure. Therefore, after changing the operator, it is necessary to re-memorize the network parameters to reduce the waiting time for switching network parameters caused by connection failure and speed up the online speed of the collection terminal.

[0082] Furthermore, when the state of the first connection is detected to be successfully connected, steps S41 to S43 are also included. Figure 8 , is a schematic diagram of the first connection failure status update in an embodiment of the present application.

[0083] S41: query and obtain the status of the first connection every second time period. When the status of the first connection changes and the connection fails, record and update the accumulated offline time.

[0084] Every time the cumulative offline time reaches the third time, select to switch to other network parameters from the network parameter table and try to re-establish the first connection. The network parameters here belong to a set of network parameters identified by the corresponding operator. If the cumulative offline time reaches the first threshold, the network connection device will be forced to power off and restart. If the cumulative offline time reaches the second threshold, the collection terminal system will be reset.

[0085] In this embodiment, the second time is specifically 2 seconds, the third time is 5 minutes, the first threshold is 15 minutes, 30 minutes and 60 minutes, and the second threshold is 120 minutes. It is easy for those skilled in the art to replace the second time, the third time, the first threshold and the second threshold with other values ​​according to usage requirements, which does not require creative work.

[0086] In this embodiment, the network connection device is a device for inserting a SIM card, has a power supply interface, can receive signals and switch the power supply interface according to the received signals to complete the power-off restart function.

[0087] In this embodiment, resetting the acquisition terminal system includes initializing each module or component in the acquisition terminal and resetting the system to clear the error state.

[0088] S42: When the status of the first connection is connection failure and the network communication device is in an inactive state, the accumulated time is reset to zero and updating of the accumulated offline time is suspended.

[0089] The reason for the connection failure in this case is that the network communication device is not enabled, so there is no need to restart and initialize other modules, devices or components.

[0090] S43: When the state of the first connection changes and the connection is successful, the state of the first connection is updated to successful connection. At this time, the fault state is cleared and the connection is normal.

[0091] Furthermore, initiating a second connection to the server also includes steps S51 to S53, see Figure 9 , is a schematic diagram of the second connection failure status update in an embodiment of the present application.

[0092] S51: Detect and obtain the status of the second connection.

[0093] S52: When the status of the second connection is connection failure, record and update the accumulated failure time.

[0094] Every fourth time after the cumulative failure time has elapsed, the network parameters are switched. Specifically, if the current operator information is valid, the network parameters corresponding to the operator identifier are sent to the network connection process. If the current operator information is invalid or unknown, the network parameters with the highest network standard are selected from each operator identifier group in the network parameter table and sent to the network connection process. The network connection process sequentially initiates the first connection and the second connection using the network parameters.

[0095] When the accumulated failure time reaches the third threshold, the collection terminal will be forced to restart.

[0096] In this embodiment, the fourth time is specifically 5 minutes, and the third threshold is 2 hours, but this application solution does not impose any restrictions on this.

[0097] S53: When the status of the second connection is successful, the accumulated failure time is reset to zero and updating of the accumulated failure time is suspended.

[0098] Continuously detecting the connection status of the first and second connections during the connection process can fix some common problems without the need for technicians to solve them offline, thereby enhancing the robustness and stability of the entire communication system and ensuring the online rate of the acquisition terminal.

[0099] See Figure 10 , which is a structural diagram of a collection terminal communication device based on the 698 protocol in an embodiment of the present application, including: a first connection module 31, a second connection module 32 and a fault detection and repair module 33.

[0100] The first connection module 31 is used to initiate a first connection to the server through a network communication device and specified network parameters.

[0101] The second connection module 32 is configured to initiate a second connection to the server through a network communication device and specified network parameters when detecting that the state of the first connection is successful.

[0102] The fault detection and repair module 33 is used to record and update the accumulated offline time when the state of the first connection changes and the connection fails. Every time the accumulated offline time passes a third time, the network parameters are switched and an attempt is made to re-establish the first connection. The network parameters are the network parameters identified by the operator corresponding to the network communication device. When the accumulated offline time reaches a first threshold, the network connection device is forcibly powered off and restarted. When the accumulated offline time reaches a second threshold, the collection terminal is reset.

[0103] The fault detection and repair module 33 is also used to detect that the status of the second connection is a connection failure, record and update the cumulative failure time; every time the cumulative failure time passes a fourth time, switch the network parameters once, and initiate the first connection and the second connection to the server through the network communication equipment and the switched network parameters; when the cumulative failure time reaches a third threshold, force the acquisition terminal to restart.

[0104] See Figure 11 The present application also provides a computer-readable storage medium, which stores a computer program or instruction of the above-mentioned acquisition terminal communication method. When the program or instruction is executed by the processor, a collection terminal communication method based on the 698 protocol can be completed.

[0105] Specifically, a system, device, or apparatus equipped with a machine-readable storage medium may be provided, wherein the machine-readable storage medium stores software program code that implements the functions of any of the above-described embodiments, and the system, device, or apparatus is configured to read and execute the instructions stored in the machine-readable storage medium. In this case, the program code read from the machine-readable storage medium itself can implement the functions of any of the above-described embodiments, and thus the machine-readable code and the machine-readable storage medium storing the machine-readable code constitute part of the present invention.

[0106] The above-mentioned storage medium can be implemented by any type of volatile or non-volatile memory device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic or optical disks (such as CD-ROM, CD-R, CD-RW, DVD-20 ROM, DVD-RAM, DVD-RW, DVD-RW), magnetic tape, etc. The storage medium can be any available medium that can be accessed by a general-purpose or special-purpose computer.

[0107] It should be understood that the processor may be a central processing unit (CPU), other general-purpose processors, digital signal processors (DSP), or application-specific integrated circuits (ASICs). A general-purpose processor may be a microprocessor or any conventional processor. The steps of the method disclosed in the present invention may be directly implemented by a hardware processor or implemented by a combination of hardware and software modules in the processor.

[0108] It should be understood that the storage medium is coupled to the processor so that the processor can read information from the storage medium and write information to the storage medium. Of course, the storage medium can also be an integral part of the processor. The processor and the storage medium can be located in an application-specific integrated circuit (ASIC). Of course, the processor and the storage medium can also exist as discrete components in a terminal or server.

[0109] The computer-readable program instructions described herein can be downloaded from a computer-readable storage medium to each computing / processing device, or downloaded to an external computer or external storage device via a network, such as the Internet, a local area network, a wide area network, and / or a wireless network. The network can include copper transmission cables, fiber optic transmission, wireless transmission, routers, firewalls, switches, gateway computers, and / or edge servers. The network adapter card or network interface in each computing / processing device receives the computer-readable program instructions from the network and forwards the computer-readable program instructions to be stored in the computer-readable storage medium in each computing / processing device.

[0110] The computer program instructions for performing the disclosed operation can be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-related instructions, microcode, firmware instructions, state setting data, or source code or object code written in any combination of one or more programming languages, including object-oriented programming languages ​​such as Smalltalk, C++, and conventional procedural programming languages ​​such as "C" language or similar programming languages. Computer-readable program instructions can be executed entirely on a user's computer, partially on a user's computer, executed as an independent software package, partially on a user's computer and partially on a remote computer, or executed entirely on a remote computer or server. In the case of a remote computer, the remote computer can be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or can be connected to an external computer (e.g., using an Internet service provider to connect via the Internet). In some embodiments, by utilizing the state information of computer-readable program instructions to personalize an electronic circuit, such as a programmable logic circuit, a field programmable gate array (FPGA), or a programmable logic array (PLA), the electronic circuit can execute computer-readable program instructions, thereby realizing various aspects disclosed by the present invention.

[0111] The above description is merely a preferred embodiment of the present application and is not intended to limit the present application. Various modifications and variations are possible for those skilled in the art. Any modifications, equivalent substitutions, or improvements made within the spirit and principles of the present application shall be included within the scope of protection of the present application.

[0112] Although the above describes the specific implementation methods of the present invention, it does not limit the scope of protection of the present invention. Those skilled in the art should understand that various modifications or variations that can be made by those skilled in the art on the basis of the technical solution of the present invention without creative work are still within the scope of protection of the present invention.

Claims

1. A collection terminal communication method based on 698 protocol, characterized in that: Applied to a collection terminal, the method comprises the following steps: Preloading a network parameter table, the network parameter table including network parameters, the network parameters including an operator identifier and connection parameters, and selecting a network parameter corresponding to the operator identifier and the network communication device from the network parameter table as a designated network parameter; Initiating a first connection to a server using a network communication device and specified network parameters, wherein the first connection is used to establish a network communication channel, and the network communication device has a unique operator identifier; After detecting that the state of the first connection is successfully connected, a second connection is initiated to the server through the network communication device and the specified network parameters, where the second connection is used to transmit data in the network communication channel.

2. A collection terminal communication method based on 698 protocol as claimed in claim 1, characterized in that: The network parameters also include a network standard, and the step of obtaining the specified network parameters includes: grouping the network parameters according to the operator identifier, and sorting the grouped network parameters according to the network standard; The network group corresponding to the operator identification of the network communication device is preloaded, and the network parameter with the highest network standard in the network group is used as the designated network parameter.

3. A collection terminal communication method based on 698 protocol as claimed in claim 1, characterized in that: After detecting that the state of the first connection is successful, the following steps are further included: A connection log is established, where the connection log is used to store the specified network parameters, and the stored specified network parameters are used to initiate the first connection again.

4. A collection terminal communication method based on 698 protocol as claimed in claim 1, characterized in that: After detecting that the state of the first connection is successful, the following steps are further included: querying and obtaining the status and network parameters of the network communication device every first time, wherein the status includes an enabled state and a disabled state; When the network communication device is in an enabled state, if the state of the network communication device is found to be an unenabled state for N consecutive times, the state of the network communication device is updated to an unenabled state, where N is an integer greater than 1; When the network communication device is in an enabled state, it is found that the state of the network communication device is in an enabled state, and the state of the network communication device is updated to the enabled state.

5. A collection terminal communication method based on 698 protocol as claimed in claim 4, characterized in that: The network parameters also include a network standard. After the state of the network communication device is updated to an enabled state, the following steps are further included: detecting the operator identification of the network communication device, and if the operator identification is changed and valid, selecting the network parameter of the highest network standard corresponding to the changed operator identification from the network parameter table; The first connection is re-initiated to the server using the network parameters as designated network parameters.

6. A collection terminal communication method based on 698 protocol as claimed in claim 4, characterized in that: After detecting that the state of the first connection is successfully connected, the following steps are further included: The state of the first connection is queried and obtained every second time period, and when the state of the first connection changes and the connection fails, the accumulated offline time is recorded and updated; every time the accumulated offline time passes a third time period, the network parameters are switched and an attempt is made to re-establish the first connection, where the network parameters are network parameters corresponding to the operator identifier of the network communication device; when the accumulated offline time reaches a first threshold, the network connection device is forcibly powered off and restarted; when the accumulated offline time reaches a second threshold, the acquisition terminal is reset. When the state of the first connection is connection failure and the network communication device is in an inactive state, resetting the accumulated offline time to zero and suspending updating of the accumulated offline time; When the state of the first connection changes and the connection is successful, the state of the first connection is updated to successful connection.

7. The acquisition terminal communication method based on 698 protocol as claimed in claim 1, characterized in that: Initiating a second connection to the server further comprises the following steps: Detecting and obtaining a status of the second connection; When the state of the second connection is connection failure, recording and updating the accumulated failure time; every time the accumulated failure time passes a fourth time, switching the network parameters once, and initiating the first connection and the second connection to the server through the network communication device and the switched network parameters; when the accumulated failure time reaches a third threshold, forcibly restarting the acquisition terminal; When the status of the second connection is successful connection, the accumulated failure time is reset to zero and updating of the accumulated failure time is suspended.

8. A collection terminal communication device based on 698 protocol, characterized in that: It includes a first connection module and a second connection module, wherein: The first connection module is used to initiate a first connection to the server through a network communication device and specified network parameters, the first connection is used to establish a network communication channel, and the network communication device has a unique operator identifier; The second connection module is configured to, when detecting that the first connection is successfully connected, initiate a second connection to the server via a network communication device and specified network parameters, wherein the second connection is configured to transmit data within the network communication channel.

9. A collection terminal communication device based on 698 protocol, characterized in that: The acquisition terminal communication device includes: a processor, the processor is coupled to a memory, the memory is used to store programs or instructions, and when the program or instructions are executed by the processor, the acquisition terminal communication device executes the acquisition terminal communication method according to any one of claims 1 to 7.

10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed, the acquisition terminal communication method according to any one of claims 1 to 7 is completed.