Remote upgrade methods, systems, and devices for water meter collection equipment
By automatically identifying and sending upgrade files through the remote upgrade system, seamless upgrades of water meter collection equipment have been achieved, solving the problem of low upgrade efficiency and improving equipment maintenance efficiency and stability.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-07-21
- Publication Date
- 2026-03-10
AI Technical Summary
Upgrading water meter collection equipment is inefficient, especially in harsh environments where efficient program updates are difficult to perform and require on-site operation by professionals, posing safety risks and high costs.
The remote upgrade system establishes wireless communication between the remote upgrade server and the data collection equipment, determines whether the equipment needs to be upgraded, and sends upgrade files for automatic upgrade. It supports simultaneous upgrades of batch devices, reduces manual intervention, and improves upgrade efficiency.
It enables seamless and automatic equipment upgrades, improving maintenance efficiency, reducing costs and complexity, enhancing equipment stability and customer experience, and solving the problem of low upgrade efficiency.
Smart Images

Figure CN115134684B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of water meter collection and copying, in particular to a remote upgrading method, system and device of a water meter collection and copying equipment. BACKGROUND
[0002] The water meter collection and copying equipment is usually installed in a position not easy to be accessed by a user due to its application environment and application scene. Moreover, since the water meter is an appliance for measuring water flow, its installation environment is usually a position with high humidity such as an underground well and an underground pipeline. The laboratory condition cannot completely simulate the on-site use environment. Once a software problem caused by design failure or specific on-site environment interference occurs, a professional maintenance personnel needs to go to the installation site and enter the underground well to update the program of the collection and copying equipment one by one. This is not only dangerous but also difficult and laborious.
[0003] Therefore, there is a technical problem of low efficiency in upgrading the water meter collection and copying equipment in the prior art. SUMMARY
[0004] The present application aims to provide a remote upgrading method, system and device of a water meter collection and copying equipment to alleviate the technical problem of low efficiency in upgrading the water meter collection and copying equipment in the prior art.
[0005] In a first aspect, the present application provides a remote upgrading method of a water meter collection and copying equipment, applied to a remote upgrading system of the water meter collection and copying equipment. The method comprises the following steps.
[0006] Determining a target collection and copying equipment in an online state;
[0007] Judging whether the target collection and copying equipment needs to be upgraded;
[0008] If the judgment result is that the target collection and copying equipment needs to be upgraded, sending an upgrading file to the target collection and copying equipment;
[0009] Upgrading the target collection and copying equipment remotely through the upgrading file.
[0010] In a possible implementation, the remote upgrading system comprises a target collection and copying equipment and a remote upgrading server. The step of judging whether the target collection and copying equipment needs to be upgraded comprises the following steps.
[0011] The remote upgrading server sends upgrading file information to the target collection and copying equipment;
[0012] The target collection and copying equipment analyzes the upgrading file information to obtain an upgrading file version number corresponding to the upgrading file information;
[0013] The target set copying device judges whether it needs to be upgraded based on the file version number of the target set copying device and the upgrade file version number.
[0014] In one possible implementation, if the judgment result is that the target set copying device needs to be upgraded, the target set copying device is sent an upgrade file.
[0015] If the judgment result is that the target set copying device needs to be upgraded, the target set copying device sends an upgrade request to the remote upgrade server.
[0016] The remote upgrade server sends an upgrade file corresponding to the upgrade file version number to the target set copying device in response to the upgrade request.
[0017] In one possible implementation, the upgrade file includes a plurality of data packets; the remote upgrade server sends an upgrade file corresponding to the upgrade file version number to the target set copying device in response to the upgrade request, including:
[0018] The remote upgrade server sends a first data packet to the target set copying device in response to the upgrade request.
[0019] The target set copying device stores the first data packet and requests a second data packet from the remote upgrade server.
[0020] The remote upgrade server sends the second data packet to the target set copying device in response to the request for the second data packet from the target set copying device.
[0021] In one possible implementation, the target set copying device is remotely upgraded through the upgrade file, including:
[0022] The target set copying device checks the upgrade file.
[0023] If the check result is correct, the target set copying device erases the original file and writes the upgrade file.
[0024] If the check result is incorrect, the target set copying device discards the upgrade file.
[0025] In one possible implementation, the remote upgrade system includes a target set copying device and a remote upgrade server; and further includes:
[0026] If the communication between the target set copying device and the remote upgrade server fails, the target set copying device re-sends a communication request to the remote upgrade server.
[0027] If the retransmission number of the communication request is greater than a preset number, the target set copying device gives up upgrading.
[0028] In a second aspect, the embodiments of the present application provide a remote upgrading system of a water meter set copying device, the remote upgrading system comprising a set copying device and a remote upgrading server, the set copying device comprising a set copying device main body and a remote communication module;
[0029] The set copying device main body is connected with the remote communication module through a serial port in a wired manner, the remote communication module is connected with the remote upgrading server through a network in a wireless manner, and the remote communication module is configured to realize data transmission between the set copying device and the remote upgrading server.
[0030] In a third aspect, the embodiments of the present application provide a remote upgrading device of a water meter set copying device, applied to a remote upgrading system of the water meter set copying device; the device comprises:
[0031] A determination module configured to determine a target set copying device in an online state;
[0032] A judgment module configured to judge whether the target set copying device needs to be upgraded;
[0033] A sending module configured to send an upgrading file to the target set copying device if the judgment result is that the target set copying device needs to be upgraded;
[0034] An upgrading module configured to remotely upgrade the target set copying device through the upgrading file.
[0035] In a fourth aspect, the embodiments of the present application provide an electronic device comprising a memory and a processor, the memory storing a computer program capable of running on the processor, and the processor implements the steps of the method of the first aspect when executing the computer program.
[0036] In a fifth aspect, the embodiments of the present application provide a computer readable storage medium storing computer executable instructions, the computer executable instructions causing the processor to run the steps of the method of the first aspect when the computer executable instructions are invoked and run by the processor.
[0037] The embodiments of the present application bring the following beneficial effects:
[0038] The embodiment of the present application provides a remote upgrading method, system and device of a water meter group copy equipment, first, a target group copy equipment in an online state is determined, then whether the target group copy equipment needs to be upgraded is judged, if the judgment result is that the target group copy equipment needs to be upgraded, an upgrading file is sent to the target group copy equipment, so that the target group copy equipment is remotely upgraded through the upgrading file. In the scheme, the remote upgrading server first establishes wireless communication with each water meter group copy equipment, determines all target group copy equipment in an online state, then the system judges whether the target group copy equipment needs to be upgraded, if the target group copy equipment needs to be upgraded, the remote upgrading server sends corresponding upgrading files to each target group copy equipment, so that each target group copy equipment completes remote upgrading through the upgrading file. Compared with the prior art, in the scheme, the latest upgrading program is stored in the remote upgrading server, if the group copy equipment is installed on site, and the group copy equipment cannot solve the problem by using the original program, the corresponding upgrading condition can be set on the remote upgrading server, then the application program of the group copy equipment is updated through the remote upgrading mode, field construction and maintenance are facilitated, equipment maintenance efficiency is improved, the cost and difficulty of maintenance are reduced, and only when the group copy equipment is in a good network state, the maintenance and upgrading of the equipment can be carried out without manual participation, the whole process is automatically carried out by the equipment, the equipment stability and customer experience are greatly improved, and the technical problem that the upgrading efficiency of the water meter group copy equipment is low in the prior art is solved. BRIEF DESCRIPTION OF DRAWINGS
[0039] In order to more clearly illustrate the technical scheme in the specific embodiments of the present application or the prior art, the drawings needed to be used in the description of the specific embodiments or the prior art will be briefly introduced. Obviously, the drawings in the following description are some embodiments of the present application, and those skilled in the art can also obtain other drawings according to these drawings without creative labor.
[0040] Figure 1 A flowchart of a remote upgrading method of a water meter group copy equipment provided by the embodiment of the present application is shown in the figure.
[0041] Figure 2 A complete upgrading flowchart provided by the embodiment of the present application is shown in the figure.
[0042] Figure 3 A flowchart of normal use of a group copy equipment provided by the embodiment of the present application is shown in the figure.
[0043] Figure 4 A flowchart of a processing scheme when an exception occurs in the upgrading process provided by the embodiment of the present application is shown in the figure.
[0044] Figure 5A structure schematic view of a remote upgrading system of a water meter group copy equipment provided by the embodiment of the present application;
[0045] Figure 6 A structure schematic view of a main control chip of a water meter group copy equipment main body provided by the embodiment of the present application;
[0046] Figure 7 A structure schematic view of a remote upgrading device of a water meter group copy equipment provided by the embodiment of the present application;
[0047] Figure 8 A structure schematic view of an electronic equipment provided by the embodiment of the present application. DETAILED DESCRIPTION
[0048] In order to make the purpose, technical scheme and advantages of the embodiments of the present application clearer, the technical scheme of the present application will be described clearly and completely below with reference to the drawings. Obviously, the described embodiments are some of the embodiments of the present application, but not all the embodiments of the present application. Based on the embodiments in the present application, all the other embodiments obtained by those skilled in the art without creative work fall within the scope of protection of the present application.
[0049] The terms “include” and “have” and any variations thereof mentioned in the embodiments of the present application are intended to cover the non-exclusive inclusion. For example, a process, method, system, product or equipment including a series of steps or units is not limited to the listed steps or units, but optionally further includes other steps or units not listed, or optionally further includes other steps or units inherent to the process, method, product or equipment.
[0050] The water meter collection equipment is usually installed in a position which is not easy to be accessed by a user due to its application environment and application scene. Moreover, since the water meter is an instrument for measuring water flow, its installation environment is usually a position with high humidity such as an underground well or an underground pipeline. The laboratory condition cannot completely simulate the field use environment. Once a software problem caused by design failure or interference of a specific field environment occurs, a professional maintenance personnel needs to be installed in the field to enter the underground well to update the program of the collection equipment one by one. This is not only dangerous but also difficult and has a large workload. If the user is abroad, the maintenance personnel even needs to be sent to abroad, which consumes a lot of human and material resources. Moreover, since the collection equipment is usually installed in a closed mode, safety protection modes such as hiding and locking are used. Therefore, the customer needs to cooperate to find the collection equipment, such as providing the installation location. Moreover, the collection equipment cannot be used during the upgrading process. If the upgrading process lasts for a long time, the customer will inevitably have a very poor experience. If the software problem is caused by the specific environment of the field, the test in the laboratory environment cannot completely simulate the problem of the field environment. Therefore, whether the newly updated program is stable needs to be verified by a large number of field conditions. Even, the program needs to be updated for many times to completely solve the problem, which will cause unpredictable economic loss.
[0051] The prior art has a remote upgrading method. For example, a maintenance personnel carries a remote upgrading device to the installation site, then installs the remote upgrading device to the installed equipment, and then realizes the remote upgrading of the installed equipment through the remote upgrading device, thereby avoiding the disassembly and installation process of the equipment and improving the effect of equipment maintenance to a certain extent. However, this method still needs the maintenance personnel to enter the installation site to operate, and the maintenance cost is still high and the efficiency is still low.
[0052] Based on this, the embodiment of the present application provides a remote upgrading method, system and device of a water meter collection equipment, which can alleviate the technical problem of low efficiency of upgrading the water meter collection equipment in the prior art.
[0053] The embodiments of the present application will be further described below with reference to the accompanying drawings.
[0054] Figure 1 A flowchart of a remote upgrading method of a water meter collection equipment provided by the embodiment of the present application is shown in the figure. The method can be applied to a remote upgrading system of a water meter collection equipment. As shown in the figure, the method comprises the following steps. Figure 1
[0055] Step S110, determining a target collection equipment in an online state.
[0056] For example, as shown in the figure, the method comprises the following steps. Figure 2 As shown, the remote upgrade server needs to establish communication with the collection and copying device to realize upgrade. In actual application, some collection and copying devices are limited by application environment and use battery power supply mode. To ensure the service life, the collection and copying device cannot use long connection mode to continuously connect the meter management platform and the remote upgrade server, so the periodic short connection mode is used to connect the server, that is, the remote communication module connects the meter management platform and the remote upgrade server when the collection and copying device needs to report data or reaches the network connection period. After completing the scheduled task, there is no subsequent task to maintain the network, so the network connection is disconnected to reduce power consumption and wait for the next reporting task or network connection task. Other collection and copying devices can use power supply, so the collection and copying device does not need to consider power consumption. After the collection and copying device is started, the remote communication module maintains the network connection of the meter management platform and the remote upgrade server for a long time. Since the network can be connected for a long time, the real-time performance of remote upgrade is higher, and the collection and copying device or the remote upgrade server can actively initiate the remote upgrade process. Remote upgrade of any time and any device can be realized, and upgrade of specified devices and simultaneous upgrade of batch devices can be supported, which can greatly improve the accuracy and efficiency of upgrade.
[0057] As shown in Figure 3 When the collection and copying device is installed and powered in the field, the parallel IP parameters of the remote communication module are configured, and the device is enabled. The collection and copying device starts normal work, periodically collects water meter data, detects that the collection and copying device has a data reporting task or a periodic network connection task, and the remote communication module specifies the connection of the corresponding cloud server according to the already configured parallel IP parameters, and performs corresponding data transmission tasks on different platforms.
[0058] As shown in Figure 2 The maintenance personnel uploads the upgrade file to the remote upgrade server, updates the upgrade file information, and enables the remote upgrade server program update notification function. After the remote upgrade server program update notification function is enabled, the remote upgrade server first detects whether the device is online, for example, the remote upgrade server can send a remote communication handshake request to each collection and copying device, and determine a plurality of target collection and copying devices in an online state through the response result. If the collection and copying device is online, the upgrade file information is actively sent to the device, otherwise, the device is online and then the upgrade file information is sent. The maximum active sending number of the notification function can be customized by the maintenance personnel.
[0059] Step S120, judging whether the target collection and copying device needs to be upgraded.
[0060] As shown in Figure 2As shown, the target set of copy devices in the online state can send a query upgrade file instruction to the remote upgrade server. The remote upgrade server sends the upgrade file version number to the target set of copy devices in response to the request of the target set of copy devices. Alternatively, the remote upgrade server can directly send the upgrade file version number to the target set of copy devices without the request of the target set of copy devices. By comparing the current file version number of the target set of copy devices with the upgrade file version number, it can be determined whether the target set of copy devices needs to be upgraded.
[0061] Step S130, if the judgment result is that the target set of copy devices needs to be upgraded, the upgrade file is sent to the target set of copy devices.
[0062] As shown in the example, Figure 2 If the judgment result is that the target set of copy devices needs to be upgraded, the target set of copy devices can send an upgrade request to the remote upgrade server, and the remote upgrade server can further send the corresponding upgrade file to the target set of copy devices.
[0063] Step S140, the target set of copy devices is remotely upgraded by the upgrade file.
[0064] As shown in the example, Figure 2 After receiving all the upgrade files, the target set of copy devices upgrades itself based on the verified upgrade files, and after the upgrade is completed, the upgrade result can be reported to the remote upgrade server, thereby completing the remote upgrade.
[0065] In the embodiment of the application, the remote upgrade server first establishes wireless communication with each water meter set of copy devices, determines all target set of copy devices in the online state, and then judges whether these target set of copy devices need to be upgraded. If the target set of copy devices needs to be upgraded, the remote upgrade server sends the corresponding upgrade file to each target set of copy devices, so that each target set of copy devices completes remote upgrade through the upgrade file. Compared with the prior art, by storing the latest upgrade program in the remote upgrade server, if the set of copy devices installed in the field cannot solve the problem by using the original program, the corresponding upgrade condition can be set on the remote upgrade server, and then the application program of the set of copy devices is updated through remote upgrade, which facilitates on-site construction and maintenance, improves the efficiency of equipment maintenance, reduces the cost and difficulty of maintenance, and only needs the set of copy devices in the network state to be good, the maintenance and upgrade of the equipment can be carried out without manual intervention, and the stability and customer experience of the equipment are greatly improved, and the technical problem of low efficiency of upgrading the water meter set of copy devices in the prior art is solved.
[0066] The above steps will be described in detail below.
[0067] In some embodiments, the server in the remote upgrading system establishes communication with the target set-copy device, sends the target set-copy device the upgrade file version number, and the target set-copy device compares the upgrade file version number with its own version number, so as to accurately determine whether upgrading is needed. As an example, the remote upgrading system includes a target set-copy device and a remote upgrading server; the step S120 can specifically include the following steps:
[0068] Step a), the remote upgrading server sends the target set-copy device the upgrade file information.
[0069] Step b), the target set-copy device parses the upgrade file information to obtain the upgrade file version number corresponding to the upgrade file information.
[0070] Step c), the target set-copy device judges whether it needs to be upgraded based on its own file version number and the upgrade file version number.
[0071] As an example, as shown in Figure 2 After receiving the upgrade file information transmitted by the remote upgrading server, the target set-copy device can parse the upgrade file information to obtain the upgrade file version number information transmitted by the remote upgrading server, and then compare the version number with its own version number. If the upgrade file version number is higher than its own version number, the target set-copy device requests the remote upgrading server to start upgrading.
[0072] By making the remote upgrading server first send the target set-copy device the upgrade file information, and then the target set-copy device parses the upgrade file information to obtain the upgrade file version number corresponding to the upgrade file information, and then the target set-copy device can judge whether it needs to be upgraded based on its own file version number and the upgrade file version number, so as to accurately determine whether upgrading is needed, and improve the upgrading efficiency.
[0073] Based on the above steps a), b) and c), the target set-copy device actively sends an upgrade request to the remote upgrading server, so that the remote upgrading server can accurately issue the corresponding upgrade file and efficiently complete the remote upgrading. As an example, the step S130 can specifically include the following steps:
[0074] Step d), if the judgment result is that the target set-copy device needs to be upgraded, the target set-copy device sends an upgrade request to the remote upgrading server.
[0075] Step e), the remote upgrading server sends the target set-copy device the upgrade file corresponding to the upgrade file version number in response to the upgrade request.
[0076] As an example, as shown in Figure 2As shown, the target set copying device compares the upgrade file version number with its own version number, and requests the remote upgrade server to start upgrading if the upgrade file version number is higher than its own version number. The remote upgrade server can respond to an instruction allowing upgrading, and send the upgrade file corresponding to the upgrade file version number to the target set copying device.
[0077] By making the target set copying device send an upgrade request to the remote upgrade server if the judgment result is that upgrading is needed, the remote upgrade server can send the upgrade file corresponding to the upgrade file version number to the target set copying device in response to the upgrade request, so that the remote upgrade server can accurately issue the corresponding upgrade file and efficiently complete remote upgrading.
[0078] Based on the above steps d) and e), the remote upgrade server can divide the upgrade file into multiple data packets and send them to the target set copying device multiple times, so as to ensure fast transmission of the file, guarantee error-free transmission, and avoid upgrade failure caused by direct transmission of a large-capacity data packet. As an example, the upgrade file includes multiple data packets; the above step e) can specifically include the following steps:
[0079] Step f), the remote upgrade server sends the first data packet to the target set copying device in response to the upgrade request.
[0080] Step g), the target set copying device stores the first data packet and requests the remote upgrade server for the second data packet.
[0081] Step h), the remote upgrade server sends the second data packet to the target set copying device in response to the request of the target set copying device for the second data packet.
[0082] For example, the target set copying device can send the upgrade request to the remote upgrade server through the following steps: Figure 2As shown, after the remote upgrade server receives the upgrade request of the target set of copy devices, it starts to check the stored upgrade file and decomposes the upgrade file into several small pieces, i.e. multiple data packets. Each small piece can contain 256 bytes of data of the upgrade file. After the decomposition is successful, the target set of copy devices is replied to allow the upgrade response, which contains the upgrade file piece information, such as the number of bytes contained in each small piece, the total number of file pieces, the total CRC16 check code of the upgrade file, etc. After the target set of copy devices receives the response, it parses the upgrade file information contained in the response information, sets the to-be-upgraded condition, and then resets the main control chip of the main body of the target set of copy devices, stays in the upgrade program, and prepares to start the upgrade, and the network connection of the remote upgrade module remains unchanged. The target set of copy devices sequentially requests the upgrade file piece packets, and after the remote upgrade server receives the upgrade file piece packets, it queries the processed upgrade file and sends the corresponding upgrade file piece packets to the target set of copy devices. After the target set of copy devices check the upgrade file piece packets, they are stored in the download program storage area, and then the next upgrade file piece packet is requested.
[0083] By making the remote upgrade server send the first data packet to the target set of copy devices in response to the upgrade request, then the target set of copy devices stores the first data packet and requests the second data packet from the remote upgrade server, and then the remote upgrade server sends the second data packet to the target set of copy devices in response to the request of the target set of copy devices for the second data packet, the remote server can divide the upgrade file into multiple data packets, and send them to the target set of copy devices in small capacity and multiple batches, thereby ensuring the fast transmission of the file, ensuring the transmission without error, and avoiding the upgrade failure caused by directly transmitting a large capacity data packet.
[0084] Based on the above steps d) and e), after the target set of copy devices completely receives the upgrade file, it can check the upgrade file. If the check is successful, the original file is erased and overwritten with the upgrade file, ensuring the success of the upgrade and ensuring the upgrade efficiency. As an example, the above step S140 can specifically include the following steps:
[0085] Step i), the target set of copy devices checks the upgrade file.
[0086] Step j), if the check result is correct, the target set of copy devices erases the original file and writes the upgrade file.
[0087] Step k), if the check result is incorrect, the target set of copy devices discards the upgrade file.
[0088] For example, as shown in FIG. 6, the target set of copy devices can include the following steps: Figure 2As shown, after all the upgrade files are downloaded, the target set copying device starts to check all the data of the fragmented packages. If the check is successful, the target set copying device replies to the remote upgrade server with upgrade success information, then erases the original application program, and writes the upgrade files in the download program storage area into the FLASH space of the original application program. If the check fails, the target set copying device directly discards the upgrade files and continues to execute the original application program. In the case of check failure, the target set copying device can also start the upgrade process again after waiting for a period of time. The target set copying device jumps from the upgrade program to the new application program and starts to run the new application program, and the upgrade is completed this time. The target set copying device starts to work with the new program, detects whether there is a task that needs to maintain the network, and processes the task if there is one. After there is no task that needs to maintain the network, the remote communication module closes the network and reduces power consumption, and then repeats the periodic collection of water meter data, reporting of data, and connection of the network task.
[0089] By making the target set copying device check the upgrade files, if the check result is correct, the target set copying device erases the original files and writes the upgrade files, and if the check result is incorrect, the target set copying device discards the upgrade files, which can ensure successful upgrade and improve the upgrade efficiency.
[0090] In some embodiments, a solution to the upgrade error is also provided to make the function more abundant, for example, when the number of communication failures between the target set copying device and the remote upgrade server is greater than a preset number, the upgrade process is abandoned to avoid other errors caused by continuously attempting to upgrade. As an example, the remote upgrade system includes a target set copying device and a remote upgrade server; the method can also include the following steps:
[0091] Step l), if the communication between the target set copying device and the remote upgrade server fails, the target set copying device re-sends a communication request to the remote upgrade server.
[0092] Step m), if the number of re-sent communication requests is greater than a preset number, the target set copying device gives up the upgrade.
[0093] As an example, as shown in Figure 4 The communication failure can occur in various links. When the communication connection is failed in the initial link, the target water meter set copying device can attempt to re-establish communication with the remote upgrade server, and if the number of re-established communications exceeds a preset number, the target set copying device gives up the upgrade. When the communication is failed when requesting to transmit the files, the target water meter set copying device can attempt to re-establish communication with the remote upgrade server and re-request the abnormal upgrade data fragments, and if the number of requests exceeds a preset number, the target set copying device gives up the upgrade.
[0094] By making the target set of copy equipment resend the communication request to the remote upgrade server in the case of disconnection, and giving up the upgrade when the number of resending is greater than the preset number, the upgrade error can be responded in time, and the upgrade process is abandoned in time, avoiding the occurrence of other errors caused by continuous upgrade attempts.
[0095] Figure 5 A structural diagram of a remote upgrade system of a water meter set copy equipment provided by the embodiment of the application is shown in the figure. Figure 5 As shown in the figure, the system comprises:
[0096] The set copy equipment 501 and the remote upgrade server 502, the set copy equipment 501 comprising a set copy equipment main body 5011 and a remote communication module 5012.
[0097] The set copy equipment main body 5011 and the remote communication module 5012 are connected by a serial port, the remote communication module 5012 and the remote upgrade server 502 are connected by a network, and the remote communication module 5012 is used to realize data transmission between the set copy equipment 501 and the remote upgrade server 502.
[0098] For example, the set copy equipment main body 5011 can adopt an STM32 series single-chip microcomputer, and the STM32 series single-chip microcomputer has a Flash memory module. All the Flash memory modules are arranged in the same linear address space. As shown in the figure, Figure 6 two pieces of complete code with independent running capability are needed to be placed in the set copy equipment main body main control chip, one piece of code is an upgrade program stored in the front end of the Flash space, and the other piece of code is an application program stored in the rear end of the upgrade program, and the two pieces of code do not overlap with each other. The two pieces of code respectively realize different functions and can be independently run, and after the corresponding setting conditions are met, the two pieces of code can jump to each other. The upgrade program occupies a relatively small Flash space and only contains an upgrade function, and the upgrade program can erase and write the code segment of the specified address under the normal working voltage. The application program occupies a larger Flash space and contains the complete business function of the product. After the chip is reset, the upgrade program is entered first, the upgrade program first reads the program to be upgraded identifier from the storage, if the program to be upgraded identifier meets the upgrade condition, the upgrade program continues to stay in the upgrade program and performs subsequent program upgrade operation, otherwise, the chip is directly reset to the application program and the business code of the equipment is executed. An upgrade instruction needs to be defined in the application program, when the upgrade instruction is triggered, the application program sets the program to be upgraded identifier in the storage to meet the upgrade condition, and then the chip is reset to stay in the upgrade program and start the upgrade.
[0099] The remote communication module is an integrated module of various remote communication modes, connected with the collection and copying device through a serial port. The remote communication module also uses an STM32 system single-chip microcomputer. The remote communication module can be compatible with various network modules, such as a 4G network module and an NB-IoT network module. The remote communication module 5012 serves as a bridge for communication between the collection and copying device 501 and the remote upgrade server 502, and has the function of managing multiple parallel IPs. For example, the remote communication module 5012 is set to parallel dual IPs, of which the main IP is configured as a meter management platform of the collection and copying device 501, used for normal business data reporting of the collection and copying device 501, and the slave IP is configured as the remote upgrade server 502, used for remote program updating. The remote communication module 5012 can simultaneously maintain network connections of two IPs, and then agrees on a specific data format with the collection and copying device main body 5011, so as to realize the transmission of data in different data formats to different IPs. For example, the collection and copying device 501 can report meter data to the meter management platform, and can also simultaneously send an instruction for querying an upgrade file to the remote upgrade server 502. The maximum number of parallel IPs of the remote communication module 5012 can be defined by itself. When the collection and copying device 501 needs to report data, the data is transmitted to the meter management platform through the remote communication module 5012 according to the agreed data format, so as to realize the normal meter reading reporting function of the collection and copying device 501. At the same time, the instruction for querying the upgrade file is sent to the remote upgrade server 502 to query whether the current needs to be upgraded. When any IP of the network connections maintained by the remote communication module 5012 transmits data to the remote communication module 5012, the remote communication module 5012 respectively packages the data from different IPs according to the agreed data format, and directly transmits the data to the collection and copying device main body 5011.
[0100] The remote upgrade server 502 can be deployed on a cloud server, used for saving the upgrade program file of the collection and copying device 501, and actively pushing the latest upgrade file information stored at present to the online collection and copying device 501 after the program upgrade notification function of the remote upgrade server 502 is started. The remote upgrade server 502 can reply to appropriate data according to different request instructions of different devices, so as to realize the simultaneous online upgrade function of batch devices.
[0101] Figure 7 A structure schematic diagram of a remote upgrade device of a water meter collection and copying device provided by the embodiment of the application is shown in FIG. 7. Figure 7 As shown in FIG. 7, the remote upgrade device 700 of the water meter collection and copying device comprises:
[0102] A determination module 701, used for determining a target collection and copying device in an online state;
[0103] A judgment module 702, used for judging whether the target collection and copying device needs to be upgraded;
[0104] The sending module 703 is configured to send the upgrade file to the target set copy device if the determination result is that the target set copy device needs to be upgraded.
[0105] The upgrading module 704 is configured to remotely upgrade the target set copy device by using the upgrade file.
[0106] In some embodiments, the remote upgrading system comprises the target set copy device and a remote upgrading server; and the determining module 702 is specifically configured to:
[0107] The remote upgrading server sends the upgrade file information to the target set copy device;
[0108] The target set copy device parses the upgrade file information to obtain an upgrade file version number corresponding to the upgrade file information;
[0109] The target set copy device determines whether the target set copy device needs to be upgraded based on the file version number of the target set copy device and the upgrade file version number.
[0110] In some embodiments, the sending module 703 is specifically configured to:
[0111] If the determination result is that the target set copy device needs to be upgraded, the target set copy device sends an upgrade request to the remote upgrading server;
[0112] The remote upgrading server sends the upgrade file corresponding to the upgrade file version number to the target set copy device in response to the upgrade request.
[0113] In some embodiments, the upgrade file comprises a plurality of data packets; and the sending module 703 is specifically configured to:
[0114] The remote upgrading server sends a first data packet to the target set copy device in response to the upgrade request;
[0115] The target set copy device stores the first data packet and requests a second data packet from the remote upgrading server;
[0116] The remote upgrading server sends the second data packet to the target set copy device in response to the request for the second data packet from the target set copy device.
[0117] In some embodiments, the upgrading module 704 is specifically configured to:
[0118] The target set copy device checks the upgrade file;
[0119] If the checking result is correct, the target set copy device erases the original file and writes the upgrade file;
[0120] If the checking result is incorrect, the target set copy device discards the upgrade file.
[0121] In some embodiments, the remote upgrading system comprises a target set of collection devices and a remote upgrading server; the device further comprises:
[0122] A giving-up module, configured to resend a communication request by the target set of collection devices to the remote upgrading server if the communication between the target set of collection devices and the remote upgrading server fails;
[0123] If the number of times of resending the communication request is greater than a preset number of times, the target set of collection devices gives up upgrading.
[0124] The device provided by the embodiments of the present application has the same implementation principle and technical effects as the foregoing method embodiments, and for brevity of description, the parts not mentioned in the system embodiments can be referred to the corresponding contents in the foregoing method embodiments.
[0125] The embodiments of the present application provide an electronic device, specifically, the electronic device comprises a processor and a storage device; the storage device stores a computer program, and the computer program performs the method of any one of the above embodiments when being run by the processor.
[0126] Figure 8 A structural schematic diagram of an electronic device provided by the embodiments of the present application, the electronic device comprises a processor 801, a memory 802, a bus 803 and a communication interface 804, the processor 801, the communication interface 804 and the memory 802 are connected through the bus 803; the processor 801 is configured to execute an executable module stored in the memory 802, for example, a computer program.
[0127] The memory 802 can contain a high-speed random access memory (RAM, Random Access Memory) and can also include a non-volatile memory (Non-volatile Memory), for example, at least one disk memory. The communication connection between the system network element and at least one other network element is realized through at least one communication interface 804 (which can be wired or wireless), and the Internet, a wide area network, a local area network, a metropolitan area network, etc. can be used.
[0128] The bus 803 can be an ISA bus, a PCI bus or an EISA bus, etc. The bus can be divided into an address bus, a data bus, a control bus, etc. For the convenience of representation, Figure 8 Only one bidirectional arrow is used to represent the bus, but it does not mean that there is only one bus or one type of bus.
[0129] The memory 802 is configured to store a program, and the processor 801 executes the program after receiving an execution instruction; the method executed by the device defined in any one of the foregoing embodiments of the present application can be applied to the processor 801 or realized by the processor 801.
[0130] The processor 801 can be an integrated circuit chip having a processing capability of signals. In the implementation process, each step of the above method can be completed by the integrated logic circuit of hardware or the instruction in the form of software in the processor 801. The processor 801 described above can be a general processor, including a central processing unit (CPU), a network processor (NP), etc.; can also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic device, a discrete gate or transistor logic device, a discrete hardware component. The disclosed methods, steps and logic block diagrams in the embodiments of the present application can be implemented or executed. The general processor can be a microprocessor or the processor can also be any conventional processor. The steps of the method disclosed in combination with the embodiments of the present application can be directly embodied as a hardware code processor for execution, or a combination of hardware and software modules in the code processor for execution. The software module can be located in a random access memory, a flash memory, a read-only memory, a programmable read-only memory or an electrically erasable programmable memory, a register or other mature storage medium in the art. The storage medium is located in the memory 802, and the processor 801 reads the information in the memory 802, and combines the hardware to complete the steps of the above method.
[0131] The computer program product of the readable storage medium provided by the embodiments of the present application comprises a computer readable storage medium storing program codes, and the instructions included in the program codes can be used to execute the method in the foregoing method embodiments. The specific implementation can be referred to the foregoing method embodiments, and will not be described here.
[0132] If the functions are implemented in the form of software function units and sold or used as independent products, they can be stored in a computer readable storage medium. Based on this understanding, the technical solutions of the present application or the part of the prior art that essentially contributes to the present application or the part of the technical solutions can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes a plurality of instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the embodiments of the present application. The aforementioned storage medium includes a U disk, a mobile hard disk, a read-only memory (ROM, Read-Only Memory), a random access memory (RAM, Random Access Memory), a magnetic disk or an optical disk, and various media that can store program codes.
[0133] Finally, it should be noted that the above embodiments are only specific implementations of the present application, which are used to illustrate the technical solutions of the present application, but not to limit them. The protection scope of the present application is not limited thereto. Although the present application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that any person skilled in the art can modify or easily think of changes to the technical solutions described in the foregoing embodiments within the technical scope disclosed by the present application, or replace some technical features with equivalent ones. These modifications, changes or replacements do not make the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present application, and should be covered within the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.
Claims
1. A remote upgrading method of a water meter collection device, characterized by, The application is applied to a remote upgrading system of the water meter collection equipment; the remote upgrading system comprises a target collection equipment and a remote upgrading server; the collection equipment adopts a long connection or a periodic short connection to perform network connection with the remote upgrading server; the target collection equipment comprises a collection equipment main body and a remote communication module, and the remote communication module is used for connecting with the remote upgrading server according to configured IP parameters; the method comprises the following steps: determining the target collection equipment in an online state; wherein the remote upgrading server determines a plurality of target collection equipments in an online state through a remote communication handshake request sent to each collection equipment and a response result; if the collection equipment is not in an online state, the upgrading file information is sent when the collection equipment needs to report data next time or when a network connection period is reached; judging whether the target collection equipment needs to be upgraded; if the judgment result is that the target collection equipment needs to be upgraded, the target collection equipment sends an upgrading request to the remote upgrading server; the remote upgrading server sends an upgrading file corresponding to the upgrading file version number to the target collection equipment in response to the upgrading request; the target collection equipment is remotely upgraded through the upgrading file; wherein after receiving the response, the target collection equipment analyzes the upgrading file information contained in the response information, sets the to-be-upgraded condition, and then resets the main control chip of the target collection equipment main body; after the main control chip is reset, the target collection equipment first enters an upgrading program, reads the program to-be-upgraded identifier from the storage, and if the program to-be-upgraded identifier meets the upgrading condition, continues to stay in the upgrading program for subsequent program upgrading operation, otherwise, directly jumps to an application program to start executing the business code of the equipment; wherein the remote upgrading server sends an upgrading file corresponding to the upgrading file version number to the target collection equipment in response to the upgrading request, comprising: the remote upgrading server sends a first data packet to the target collection equipment in response to the upgrading request; the target collection equipment stores the first data packet and requests a second data packet from the remote upgrading server; the remote upgrading server sends the second data packet to the target collection equipment in response to the request of the target collection equipment for the second data packet; the upgrading file comprises a plurality of data packets.
2. The method of claim 1, wherein, the judgment of whether the target collection equipment needs to be upgraded comprises: the remote upgrading server sends the upgrading file information to the target collection equipment; the target collection equipment analyzes the upgrading file information to obtain the upgrading file version number corresponding to the upgrading file information; the target collection equipment judges whether it needs to be upgraded based on the file version number of the target collection equipment and the upgrading file version number.
3. The method of claim 1, wherein, the remote upgrading of the target collection equipment through the upgrading file comprises: the target collection equipment verifies the upgrading file; If the check result is correct, the target set copying device will erase the original file and write the upgrade file; If the check result is incorrect, the target set copying device will discard the upgrade file.
4. The method of claim 1, wherein, Further comprising: If the communication between the target set copying device and the remote upgrade server fails, the target set copying device re-sends a communication request to the remote upgrade server; If the re-sending number of the communication request is greater than a preset number, the target set copying device gives up the upgrade.
5. A remote upgrading system for a water meter collection device, comprising: The remote upgrade method applied to the water meter set copying device as claimed in any one of claims 1-4; the remote upgrade system comprises a set copying device and a remote upgrade server, and the set copying device comprises a set copying device main body and a remote communication module; The set copying device main body and the remote communication module are connected through a serial port in a wired mode, the remote communication module and the remote upgrade server are connected through a network in a wireless mode, the remote communication module is used for realizing data transmission between the set copying device and the remote upgrade server, and the remote upgrade server determines a plurality of target set copying devices in an online state through a response result by sending a remote communication handshake request to each set copying device; If the set copying device is not in the online state, the upgrade file information is sent when the set copying device needs to report data next time or reaches a network connection period; the set copying device adopts a long connection or a periodic short connection mode to perform network connection with the remote upgrade server; and the remote communication module is used for connecting with the remote upgrade server according to an IP parameter that has been configured.
6. A remote upgrading device of a water meter collection device, characterized by, The remote upgrade system applied to the water meter set copying device; the remote upgrade system comprises a target set copying device and a remote upgrade server; the set copying device adopts a long connection or a periodic short connection mode to perform network connection with the remote upgrade server; the target set copying device comprises a set copying device main body and a remote communication module, and the remote communication module is used for connecting with the remote upgrade server according to an IP parameter that has been configured; and the device comprises: A determination module that is used for determining target set copying devices in an online state; wherein the remote upgrade server determines a plurality of target set copying devices in an online state through a response result by sending a remote communication handshake request to each set copying device; and if the set copying device is not in the online state, the upgrade file information is sent when the set copying device needs to report data next time or reaches a network connection period; A judgment module that is used for judging whether the target set copying device needs to be upgraded or not. The sending module is configured to send an upgrade request to the remote upgrade server by the target group copy device if the judgment result is that the target group copy device needs to be upgraded; and the remote upgrade server sends an upgrade file corresponding to the upgrade file version number to the target group copy device in response to the upgrade request. The remote upgrade server sends the upgrade file corresponding to the upgrade file version number to the target group copy device in response to the upgrade request, including: the remote upgrade server sends a first data packet to the target group copy device in response to the upgrade request; the target group copy device stores the first data packet and requests a second data packet from the remote upgrade server; the remote upgrade server sends the second data packet to the target group copy device in response to the request of the target group copy device for the second data packet; and the upgrade file includes a plurality of data packets. The upgrade module is configured to remotely upgrade the target group copy device by using the upgrade file. After the target group copy device receives the response, the target group copy device analyzes the upgrade file information contained in the response information, sets a to-be-upgraded condition, and then resets a main control chip of the main body of the target group copy device. After the main control chip is reset, the main control chip first enters an upgrade program. The upgrade program first reads a program to-be-upgraded identifier from a storage. If the program to-be-upgraded identifier meets an upgrade condition, the upgrade program continues to stay in the upgrade program and performs subsequent program upgrade operations. Otherwise, the upgrade program directly jumps to an application program and starts to execute a business code of the device.
7. An electronic device comprising a memory, a processor, the memory having stored therein a computer program executable on the processor, characterized in that, The processor executes the computer program to implement the steps of the method in any one of claims 1 to 4.
8. A computer-readable storage medium, characterized in that, The computer readable storage medium stores computer executable instructions. When the computer executable instructions are called and executed by the processor, the computer executable instructions cause the processor to execute the method in any one of claims 1 to 4.
Citation Information
Patent Citations
Intelligent remote upgrade method of collector in electric meter collecting system
CN107315620A
Upgrading method and device for double-core intelligent electric meter management unit software and storage medium
CN111488166A