Remote communication method, device and equipment for power utilization information acquisition terminal and storage medium
By obtaining and matching the data frame and thread address of the power consumption information collection terminal, the problem of terminal address mismatch is solved, the communication success rate is improved, the time cost is reduced, and the correct push of the data frame is ensured.
Patent Information
- Application Number
- CN202410769437.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-14
- Publication Date
- 2024-09-17
AI Technical Summary
In the remote communication of power consumption information collection terminals, the data push between multiple terminals and the main station software is easily affected by the data forwarding strategy of the intermediate network device, causing the data frame received by the thread to not match the terminal address in the thread, affecting Communication success rate and stability.
By obtaining the frame receiving queue and terminal address of each thread in the main station software, the target thread of the data frame is determined, and the existence of the data frame is determined in the frame receiving queue of the target thread. If it does not exist, the business logic of the data frame is executed to ensure The data frame is pushed to the matching thread.
It improves the communication success rate, reduces time costs, avoids repeated execution of data frames and unnecessary bugs, and ensures the uniqueness and correctness of data frames.
Smart Images

Figure CN118660244A
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of power consumption information collection terminals, and in particular to a remote communication method, device, equipment and storage medium for power consumption information collection terminals. Background Art
[0002] The power consumption information collection terminal is a device that collects power consumption information from each information collection point, referred to as the collection terminal, which can realize the collection of electricity meter data, data management, two-way data transmission, and forwarding or execution of control commands. Power consumption information collection terminals are divided into special transformer collection terminals, centralized meter reading terminals, distributed energy monitoring terminals and other types according to the application site. The power consumption information collection terminal generally uses a 4G remote module to realize communication with the main station software. In the existing communication scheme, when multiple terminals communicate remotely with the main station software, it is easily affected by the data forwarding strategy of the intermediate network equipment. The remote communication between multiple terminals and the main station software may cause data push confusion, which makes the data frame received by the software thread at the end of the communication may not be the data frame of the terminal address where the thread is located, that is, the data frame received by the thread does not match the terminal address in the thread. Summary of the invention
[0003] The object of the present invention is to provide a remote communication method, device, equipment and storage medium for an electricity consumption information collection terminal to solve the technical problem in the prior art that the data frame received by a thread does not match the terminal address in the thread.
[0004] The technical solution of the present invention is as follows, which provides a remote communication method for an electricity consumption information collection terminal, comprising:
[0005] Obtaining the frame receiving queue of each thread in the master station software and the terminal address corresponding to each thread in the master station software, and after receiving the current data frame, obtaining the terminal address in the current data frame;
[0006] Determine a target thread corresponding to the current data frame according to a terminal address in the current data frame and terminal addresses corresponding to each thread;
[0007] Determine whether there is a current data frame in the frame receiving queue of the target thread, and if not, execute the business logic corresponding to the current data frame.
[0008] Further, determining the target thread corresponding to the current data frame according to the terminal address in the current data frame and the terminal addresses corresponding to the threads includes:
[0009] It is determined in turn whether the terminal address in the current data frame is the same as the terminal address corresponding to each thread, and the thread whose corresponding terminal address is the same as the terminal address in the current data frame is determined as the target thread corresponding to the current data frame.
[0010] Furthermore, before obtaining the frame receiving queue of each thread in the master station software and the terminal address corresponding to each thread in the master station software, it also includes initializing the flag bit corresponding to the terminal address to obtain an initial flag bit;
[0011] Accordingly, determining in turn whether the terminal address in the current data frame is the same as the terminal address corresponding to each thread includes:
[0012] If the terminal address in the current data frame is the same as the terminal address corresponding to the current thread, the initial flag bit corresponding to the current thread is set to the first flag bit; otherwise, the initial flag bit corresponding to the current thread is set to the second flag bit, and it is determined whether the terminal address in the current data frame is the same as the terminal address corresponding to the next thread.
[0013] Further, determining whether there is a current data frame in the frame receiving queue of the target thread includes:
[0014] If the first flag is detected, it is determined whether there is a current data frame in the frame receiving queue of the target thread.
[0015] Further, after determining whether there is a current data frame in the frame receiving queue of the target thread, the method further includes:
[0016] When there is a current data frame in the frame receiving queue of the target thread, the service logic corresponding to the current data frame is not executed, and the target thread waits for receiving subsequent data frames.
[0017] Further, after determining whether there is a current data frame in the frame receiving queue of the target thread, the method further includes:
[0018] When the current data frame does not exist in the receiving frame queue of the target thread, the current data frame is filled into the receiving frame queue corresponding to the target thread.
[0019] Further, executing the business logic corresponding to the current data frame includes: causing the target thread to execute the business logic corresponding to the current data frame.
[0020] Another technical solution of the present invention is as follows: a remote communication device for a power consumption information collection terminal is also provided, including a data acquisition module, a target thread determination module, and a business logic execution module;
[0021] The data acquisition module is used to acquire the frame receiving queue of each thread in the master station software and the terminal address corresponding to each thread in the master station software, and after receiving the current data frame, acquire the terminal address in the current data frame;
[0022] The target thread determination module is used to determine the target thread corresponding to the current data frame according to the terminal address in the current data frame and the terminal addresses corresponding to the threads;
[0023] The business logic execution module is used to determine whether there is a current data frame in the frame receiving queue of the target thread, and if not, execute the business logic corresponding to the current data frame.
[0024] Another technical solution of the present invention is as follows: an electronic device is also provided, including a memory and a processor, wherein the memory stores a computer program executable by the processor, and when the processor executes the computer program, the remote communication method of the electricity consumption information collection terminal as described in any of the above technical solutions is implemented.
[0025] Another technical solution of the present invention is as follows: a computer-readable storage medium is also provided, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the remote communication method of the electricity consumption information collection terminal as described in any of the above technical solutions is implemented.
[0026] The beneficial effects of the present invention are: obtaining the frame receiving queue of each thread in the main station software and the terminal address corresponding to each thread in the main station software, and after receiving the current data frame, obtaining the terminal address in the current data frame; determining the target thread corresponding to the current data frame according to the terminal address in the current data frame and the terminal address corresponding to each thread; judging whether the current data frame exists in the frame receiving queue of the target thread, and if not, executing the business logic corresponding to the current data frame; through the above technical scheme, the data frame can be pushed to the corresponding target thread, so that the data frame received by each thread matches the terminal address in the thread, which can improve the communication success rate and reduce the time cost of communication. BRIEF DESCRIPTION OF THE DRAWINGS
[0027] Figure 1 A schematic flow chart of a remote communication method for an electricity consumption information collection terminal provided in an embodiment of the present invention.
[0028] Figure 2 A schematic diagram of the structure of a remote communication device for an electricity consumption information collection terminal provided in an embodiment of the present invention.
[0029] Figure 3 A schematic diagram of the structure of an electronic device provided by an embodiment of the present invention.
[0030] Figure 4 A schematic diagram of the structure of a computer-readable storage medium provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0031] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0032] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the terms used in this way can be interchangeable under appropriate circumstances, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein.
[0033] Reference to "embodiments" herein means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present invention. The appearance of the phrase in various places in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments.
[0034] Figure 1 It is a flow chart of the remote communication method of the power consumption information collection terminal according to an embodiment of the present invention. It should be noted that if there is substantially the same result, the remote communication method of the power consumption information collection terminal according to the present invention is not limited to the above. Figure 1 The process sequence shown is limited. Figure 1 As shown, the remote communication method of the power consumption information collection terminal includes:
[0035] S101, obtaining a frame receiving queue of each thread in the master station software and a terminal address corresponding to each thread in the master station software, and after receiving a current data frame, obtaining the terminal address in the current data frame;
[0036] S102, determining a target thread corresponding to the current data frame according to a terminal address in the current data frame and terminal addresses corresponding to each thread;
[0037] S103, determining whether there is a current data frame in the frame receiving queue of the target thread, and if not, executing the service logic corresponding to the current data frame.
[0038] It should be noted that the above data frame may include a data frame of electric energy meter data or a data frame of control command data.
[0039] According to an embodiment of the present invention, by obtaining the frame receiving queue of each thread in the main station software and the terminal address corresponding to each thread in the main station software, after receiving the current data frame, the terminal address in the current data frame is obtained; according to the terminal address in the current data frame and the terminal address corresponding to each thread, the target thread corresponding to the current data frame is determined; it is judged whether the current data frame exists in the frame receiving queue of the target thread, and if not, the business logic corresponding to the current data frame is executed; the data frame can be pushed to the corresponding target thread, so that the data frame received by each thread matches the terminal address in the thread, which can improve the communication success rate and reduce the time cost of communication.
[0040] In some embodiments, determining the target thread corresponding to the current data frame according to the terminal address in the current data frame and the terminal addresses corresponding to the threads includes:
[0041] It is determined in turn whether the terminal address in the current data frame is the same as the terminal address corresponding to each thread, and the thread whose corresponding terminal address is the same as the terminal address in the current data frame is determined as the target thread corresponding to the current data frame.
[0042] The embodiment of the present invention determines in sequence whether the terminal address in the current data frame is the same as the terminal address corresponding to each thread, and determines the thread whose corresponding terminal address is the same as the terminal address in the current data frame as the target thread corresponding to the current data frame, so that the terminal address of the target thread matches the terminal address in the data frame, thereby improving the communication success rate and reducing the time cost of communication.
[0043] In a specific embodiment, it is determined whether the terminal address in the current data frame is the same as the terminal address corresponding to the first thread. If so, the first thread is determined as the target thread corresponding to the current data frame. Otherwise, it is determined whether the terminal address in the current data frame is the same as the terminal address corresponding to the second thread. By analogy, the thread whose corresponding terminal address is the same as the terminal address in the current data frame is determined as the target thread corresponding to the current data frame. The order of determining whether the terminal address corresponding to each thread is the same as the terminal address in the current data frame can be randomly determined or preset, and the determination order has no effect on the determination result.
[0044] In some embodiments, before obtaining the frame receiving queue of each thread in the master station software and the terminal address corresponding to each thread in the master station software, it also includes initializing the flag bit corresponding to the terminal address to obtain an initial flag bit;
[0045] Accordingly, determining in turn whether the terminal address in the current data frame is the same as the terminal address corresponding to each thread includes:
[0046] If the terminal address in the current data frame is the same as the terminal address corresponding to the current thread, the initial flag bit corresponding to the current thread is set to the first flag bit; otherwise, the initial flag bit corresponding to the current thread is set to the second flag bit, and it is determined whether the terminal address in the current data frame is the same as the terminal address corresponding to the next thread.
[0047] In a specific embodiment, if the second flag is detected, it is determined whether the terminal address in the current data frame is the same as the terminal address corresponding to the next thread of the current thread. If they are the same, the initial flag corresponding to the next thread is set to the first flag; otherwise, the initial flag corresponding to the next thread is set to the second flag.
[0048] In some embodiments, determining whether there is a current data frame in the frame receiving queue of the target thread includes:
[0049] If the first flag is detected, it is determined whether there is a current data frame in the frame receiving queue of the target thread.
[0050] In the embodiment of the present invention, after detecting the first flag bit, it is ensured that the terminal address in the current data frame is the same as the terminal address corresponding to the current thread, and then it is determined whether the current data frame exists in the receiving frame queue of the target thread, thereby avoiding the inconsistency between the terminal address of the target thread and the terminal address of the data frame to be processed.
[0051] In some embodiments, after determining whether there is a current data frame in the frame receiving queue of the target thread, the method further includes:
[0052] When there is a current data frame in the frame receiving queue of the target thread, the service logic corresponding to the current data frame is not executed, and the target thread waits for receiving subsequent data frames.
[0053] In the embodiment of the present invention, when there is a current data frame in the frame receiving queue of the target thread, the business logic corresponding to the current data frame is not executed, and the subsequent data frame is waited for to be received, thereby avoiding repeated execution of the same data frame.
[0054] In some embodiments, after determining whether there is a current data frame in the frame receiving queue of the target thread, the method further includes:
[0055] When the current data frame does not exist in the receiving frame queue of the target thread, the current data frame is filled into the receiving frame queue corresponding to the target thread.
[0056] In an embodiment of the present invention, when the current data frame does not exist in the receiving frame queue of the target thread, the current data frame is filled into the receiving frame queue corresponding to the target thread, and the business logic corresponding to the current data frame is executed, so that the terminal address of the target thread matches the terminal address in the data frame, thereby improving the communication success rate and reducing the time cost of communication.
[0057] In some embodiments, executing the business logic corresponding to the current data frame includes: causing the target thread to execute the business logic corresponding to the current data frame.
[0058] The remote communication method of the power consumption information collection terminal provided in the embodiment of the present invention obtains the frame receiving queue of each thread in the main station software and the terminal address corresponding to each thread in the main station software, and after receiving the current data frame, obtains the terminal address in the current data frame; determines the target thread corresponding to the current data frame according to the terminal address in the current data frame and the terminal address corresponding to each thread; judges whether the current data frame exists in the frame receiving queue of the target thread, and if not, executes the business logic corresponding to the current data frame; the data frame can be pushed to the corresponding target thread, so that the data frame received by each thread matches the terminal address in the thread, which can improve the communication success rate and reduce the time cost of communication.
[0059] During the remote batch upgrade or other remote communication between the software and the terminal, it is easy to be affected by the forwarding strategy of the network device in the data link, resulting in the mismatch between the data frame received by each thread and the terminal address in the thread, which makes the actual business needs of the software not met, and ultimately affects the stability of the overall operation of the software. Usually, such problems are extremely dependent on the forwarding strategy of the network device in the data link. Especially when there are a large number of terminals, it is difficult to adapt to all situations through the correct forwarding strategy of the network device. Generally, the required data frame is retrieved by resending the request, which is easy to cause problems such as increased communication costs and low success rate of one-time communication. It may also cause all threads to resend data frames but fail to receive the correct data frames, causing the main business to pause and introducing unnecessary bugs.
[0060] The remote communication method of the power consumption information collection terminal provided in the embodiment of the present invention initializes the flag bit in the main process of the software. Each thread can complete the preprocessing of the received data frame by calling the remote communication data parsing and pushing interface. The remote communication data parsing and pushing interface only needs to be called before the thread parses the data frame. It will determine whether the data frame is the data frame matched by the current thread. If so, it will execute the relevant business logic. If not, it will obtain the corresponding thread frame receiving queue according to the terminal address in the data frame, fill it in when the same data frame does not exist in the frame receiving queue, otherwise it will be discarded. The embodiment of the present invention uses the preprocessing of the received data frame, and pushes it to the corresponding thread for processing based on the terminal address in the data frame as the judgment basis. In the stage of distributing data frames in software communication, the data frame is accurately pushed to the corresponding thread after data preprocessing, which can solve the problem of data push confusion in remote communication between multiple terminals and the main station software.
[0061] The remote communication method for the power consumption information collection terminal provided in the embodiment of the present invention can conveniently and quickly filter the data frames required by the thread, and push the non-required data frames to other corresponding threads, completely solving the problem that the data frames received by each thread do not match the terminal address in the thread; when pushing the data frame, it will determine whether the same data frame exists in the destination thread's frame receiving queue. If not, the data frame will be filled into the frame receiving queue. If so, the push will be abandoned to avoid filling in duplicate data and introducing unnecessary bugs into the program; the remote communication data analysis and push interface can be used to determine whether the data frame is the data frame matched by the current thread, which is completely unaffected by the forwarding strategy of the network equipment in the data link, and can provide strong support for the business execution of the program.
[0062] The remote communication method for the power consumption information collection terminal provided in the embodiment of the present invention can ensure the uniqueness and correctness of the data of each channel when the main station software program communicates remotely with multiple terminals in parallel. In the prior art, due to reliance on the forwarding strategy of the network equipment in the data link and the large number of terminals, the retransmission mechanism cannot effectively improve the success rate of remote communication. By using the remote communication method for the power consumption information collection terminal provided in the embodiment of the present invention, it is possible to get rid of the dependence on the forwarding strategy of the network equipment, significantly improve the success rate of remote communication, and fundamentally reduce the time cost of remote communication; the remote communication method for the power consumption information collection terminal provided in the embodiment of the present invention can quickly and accurately push data frames to the corresponding thread when processing the communication interaction of batch terminal upgrades or batch parameter settings, and effectively support terminal upgrades and parameter settings.
[0063] Based on the above-mentioned power consumption information collection terminal remote communication method, an embodiment of the present invention provides a power consumption information collection terminal remote communication device, and its structural diagram is as follows: Figure 2As shown, the electricity consumption information collection terminal remote communication device 20 includes a data acquisition module 21, a target thread determination module 22 and a business logic execution module 23;
[0064] The data acquisition module 21 is used to acquire the frame receiving queue of each thread in the master station software and the terminal address corresponding to each thread in the master station software, and after receiving the current data frame, acquire the terminal address in the current data frame;
[0065] The target thread determination module 22 is used to determine the target thread corresponding to the current data frame according to the terminal address in the current data frame and the terminal addresses corresponding to the threads;
[0066] The service logic execution module 23 is used to determine whether there is a current data frame in the frame receiving queue of the target thread, and if not, execute the service logic corresponding to the current data frame.
[0067] The above-mentioned data acquisition module 21 also includes a frame receiving unit, which includes multiple sub-frame receiving units. The number of sub-frame receiving units can be the same as the number of threads corresponding to the main station software. The target thread determination module 22 can also be called a parsing module. The power consumption information collection terminal remote communication device 20 also includes a push module, which can push the current data frame to the target thread corresponding to the value.
[0068] For other details about how the modules in the above-mentioned electricity consumption information collection terminal remote communication device implement the above-mentioned technical solution, please refer to the description of the electricity consumption information collection terminal remote communication method provided in the above-mentioned invention embodiment, which will not be repeated here.
[0069] Based on the above-mentioned remote communication method of the power consumption information collection terminal, an embodiment of the present invention further provides an electronic device, a structural diagram of which is shown in FIG. Figure 3 As shown, the device 30 includes a processor 31 and a memory 32 coupled to the processor 31. The memory 32 stores a computer program, and when the computer program is executed by the processor 31, the processor 31 executes the steps of the remote communication method of the power consumption information collection terminal in the above embodiment.
[0070] For other details about how the processor 31 in the above-mentioned power consumption information collection terminal remote communication device implements the above-mentioned technical solution, please refer to the description of the power consumption information collection terminal remote communication method provided in the above-mentioned invention embodiment, which will not be repeated here.
[0071] Among them, the processor 31 can also be called a CPU (Central Processing Unit), and the processor 31 may be an integrated circuit chip with signal processing capabilities; the processor 31 can also be a general-purpose processor, DSP (Digital Signal Process), ASIC (Application Specific Integrated Circuit), FPGA (Field Programmable Gate Array) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, among which the general-purpose processor can be a microprocessor or the processor 31 can also be any conventional processor, etc.
[0072] The embodiment of the present invention further provides a computer-readable storage medium, a schematic diagram of which is shown in FIG. Figure 4 As shown, a readable computer program 41 is stored on the storage medium 40; wherein the computer program 41 can be stored in the above storage medium in the form of a software product, including several instructions for enabling a computer device (which can be a personal computer, server, or network device, etc.) or a processor to execute all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, magnetic disk or optical disk, ROM (Read-Only Memory), RAM (Random Access Memory) and other media that can store program codes, or terminal devices such as computers, servers, mobile phones, and tablets.
[0073] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the modules is only a logical function division. There may be other division methods in actual implementation, such as multiple modules or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or modules, which can be electrical, mechanical or other forms.
[0074] The modules described as separate components may or may not be physically separated, and the components shown as modules may or may not be physical modules, that is, they may be located in one place or distributed on multiple network modules. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0075] In addition, each functional module in each embodiment of the present application can be integrated into a processing module, or each module can exist physically separately, or two or more modules can be integrated into one module. The above-mentioned integrated module can be implemented in the form of hardware or in the form of a software functional module. If the integrated module is implemented in the form of a software functional module and sold or used as an independent product, it can be stored in a computer-readable storage medium.
[0076] In the above embodiments, all or part of the embodiments may be implemented by software, hardware, firmware or any combination thereof. When implemented by software, all or part of the embodiments may be implemented in the form of a computer program product.
[0077] The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions may be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions may be transmitted from a website site, a computer, a server, or a data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode to another website site, computer, server, or data center. The computer-readable storage medium may be any available medium that a computer can store or a data storage device such as a server or a data center that includes one or more available media integrations. The available medium may be a magnetic medium, (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state drive (SSD)), etc.
[0078] The technical solution provided by the present application is introduced in detail above. The principles and implementation methods of the present application are explained by using specific examples in the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea. At the same time, for those skilled in the art, according to the idea of the present application, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.
[0079] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented in one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that include computer-usable program code.
[0080] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices and computer program products according to the present application. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of the processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0081] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0082] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0083] Obviously, those skilled in the art can make various changes and modifications to the present application without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is also intended to include these modifications and variations.
Claims
1. A remote communication method for an electricity consumption information collection terminal, characterized in that: include: Obtaining the frame receiving queue of each thread in the master station software and the terminal address corresponding to each thread in the master station software, and after receiving the current data frame, obtaining the terminal address in the current data frame; Determine a target thread corresponding to the current data frame according to a terminal address in the current data frame and terminal addresses corresponding to each thread; Determine whether there is a current data frame in the frame receiving queue of the target thread, and if not, execute the business logic corresponding to the current data frame.
2. The remote communication method for power consumption information collection terminal according to claim 1, characterized in that: Determining a target thread corresponding to the current data frame according to a terminal address in the current data frame and terminal addresses corresponding to each thread includes: It is determined in turn whether the terminal address in the current data frame is the same as the terminal address corresponding to each thread, and the thread whose corresponding terminal address is the same as the terminal address in the current data frame is determined as the target thread corresponding to the current data frame.
3. The remote communication method of the power consumption information collection terminal according to claim 2, characterized in that: Before obtaining the frame receiving queue of each thread in the master station software and the terminal address corresponding to each thread in the master station software, the method further includes initializing the flag bit corresponding to the terminal address to obtain an initial flag bit; Accordingly, determining in turn whether the terminal address in the current data frame is the same as the terminal address corresponding to each thread includes: If the terminal address in the current data frame is the same as the terminal address corresponding to the current thread, the initial flag bit corresponding to the current thread is set to the first flag bit; otherwise, the initial flag bit corresponding to the current thread is set to the second flag bit, and it is determined whether the terminal address in the current data frame is the same as the terminal address corresponding to the next thread.
4. The remote communication method for power consumption information collection terminal according to claim 3, characterized in that: Determining whether there is a current data frame in the frame receiving queue of the target thread includes: If the first flag is detected, it is determined whether there is a current data frame in the frame receiving queue of the target thread.
5. The remote communication method of the power consumption information collection terminal according to claim 1, characterized in that: After determining whether there is a current data frame in the frame receiving queue of the target thread, the method further includes: When there is a current data frame in the frame receiving queue of the target thread, the service logic corresponding to the current data frame is not executed, and the target thread waits for receiving subsequent data frames.
6. The remote communication method of the power consumption information collection terminal according to claim 1, characterized in that: After determining whether there is a current data frame in the frame receiving queue of the target thread, the method further includes: When the current data frame does not exist in the receiving frame queue of the target thread, the current data frame is filled into the receiving frame queue corresponding to the target thread.
7. The remote communication method of the power consumption information collection terminal according to claim 1, characterized in that: Executing the business logic corresponding to the current data frame includes: enabling the target thread to execute the business logic corresponding to the current data frame.
8. A remote communication device for an electricity consumption information collection terminal, characterized in that: It includes a data acquisition module, a target thread determination module and a business logic execution module; The data acquisition module is used to acquire the frame receiving queue of each thread in the master station software and the terminal address corresponding to each thread in the master station software, and after receiving the current data frame, acquire the terminal address in the current data frame; The target thread determination module is used to determine the target thread corresponding to the current data frame according to the terminal address in the current data frame and the terminal addresses corresponding to the threads; The business logic execution module is used to determine whether there is a current data frame in the frame receiving queue of the target thread, and if not, execute the business logic corresponding to the current data frame.
9. An electronic device, comprising a memory and a processor, wherein the memory stores a computer program executable by the processor, wherein: When the processor executes the computer program, the remote communication method for the electricity consumption information collection terminal according to any one of claims 1 to 7 is implemented.
10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the remote communication method for a power consumption information collection terminal as described in any one of claims 1 to 7 is implemented.
