Data reading method and device, front-end device and storage medium

By deploying a single WebSocket client on the front-end device and utilizing the channel mechanism, the problems of real-time data reading and resource waste in electricity meters were solved, achieving efficient data transmission and resource utilization.

CN115119081BActive Publication Date: 2026-02-13NINGBO SANXING INTELLIGENT ELECTRIC
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202210760296.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-06-29
Publication Date
2026-02-13
Estimated Expiration
2042-06-29

AI Technical Summary

Technical Problem

In existing technologies, the real-time performance of electricity meter data reading is not high enough, and it puts a lot of pressure on system performance. Furthermore, deploying a WebSocket client on each functional page increases management difficulty and wastes resources.

Method used

Deploy a WebSocket client on the front-end device to send data read requests directly to the back-end server, and use the message bus channel mechanism to associate different functional pages, thereby reducing the number of WebSocket clients and improving the real-time performance of data transmission and resource utilization efficiency.

Benefits of technology

It improves the real-time performance of data reading, saves system resources, reduces the development workload of front-end devices, and reduces the waste of system resources.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115119081B_ABST
    Figure CN115119081B_ABST
Patent Text Reader

Abstract

Embodiments of the present application provide a data reading method and device, a front-end device and a storage medium, and relate to the field of data processing. The method comprises the following steps: first, generating a data reading request according to the data reading operation of a background personnel on the data reading page. Then, sending the data reading request to the back-end server through a WebSocket client, so that the back-end server acquires the data of the electric meter device and returns the data to the WebSocket client. Finally, the WebSocket client sends the data to the data reading page for display. Since the WebSocket client is installed on the front end, the data reading request generated by the front-end device can be sent to the back-end server through the WebSocket client, thereby improving the real-time performance of data reading under the premise of reducing system pressure.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the field of data processing, in particular to a data reading method and device, a front-end equipment and a storage medium. BACKGROUND

[0002] In an electric meter data acquisition system, the front-end equipment has multiple functions, such as data reading function and statistical data display function. The background personnel can read the data of the electric meter equipment installed on the user side through the front-end equipment, so as to master the user's power consumption in real time.

[0003] In the prior art, when the background personnel reads the electric meter data, the real-time performance of the electric meter data obtained is not high enough, and the performance of the system is greatly stressed. SUMMARY

[0004] The purposes of the present application include, for example, providing a data reading method and device, a front-end equipment and a storage medium. By deploying a WebSocket client in the front-end equipment, when the background personnel requests data reading in the front-end equipment, the front-end equipment can directly send a request to the back-end server through the WebSocket client to obtain the data of the electric meter equipment, thereby improving the real-time performance of data reading.

[0005] In order to achieve the above-mentioned purposes, the technical solutions adopted by the embodiments of the present application are as follows:

[0006] In a first aspect, the embodiments of the present application provide a data reading method applied to a front-end equipment, wherein the front-end equipment communicates with an electric meter equipment through a back-end server, the front-end equipment is deployed with a WebSocket client, and the front-end equipment comprises a data reading page; the method comprises:

[0007] generating a data reading request according to a data reading operation of the background personnel in the data reading page;

[0008] sending the data reading request to the back-end server through the WebSocket client, so that the back-end server obtains the data of the electric meter equipment and returns the data to the WebSocket client;

[0009] The WebSocket client sends the data to the data reading page for display.

[0010] In a possible implementation, the front-end equipment further comprises a plurality of function pages, the plurality of function pages comprises the data reading page; the front-end equipment is further deployed with a message bus, the message bus comprises at least one channel, each channel is associated with a corresponding function page; and the back-end server is deployed with a WebSocket server.

[0011] The step of sending the data reading request to the backend server through the WebSocket client comprises:

[0012] Determining a first target channel corresponding to the data reading page from the at least one channel;

[0013] Sending the data reading request to the WebSocket client through the first target channel;

[0014] The WebSocket client sends the data reading request to the WebSocket server.

[0015] In a possible implementation, the front-end device further comprises a statistical data display page; and the method further comprises:

[0016] Displaying the statistical data of the electric meter device through the statistical data display page and performing real-time refreshing.

[0017] In a possible implementation, the front-end device further comprises a plurality of function pages, the plurality of function pages comprising the statistical data display page; the front-end device is further deployed with a message bus, the message bus comprising at least one channel, each channel being associated with a corresponding function page; and the backend server is deployed with a WebSocket server;

[0018] The step of displaying the statistical data of the electric meter device through the statistical data display page and performing real-time refreshing comprises:

[0019] The WebSocket client receives the timing statistical data sent by the WebSocket server in real time, wherein the timing statistical data is obtained by the backend server according to the data sent by the electric meter device in real time;

[0020] Determining a second target channel corresponding to the statistical data display page from the at least one channel;

[0021] Sending the timing statistical data to the statistical data display page through the second target channel, so that the statistical data display page displays the timing statistical data to refresh the data.

[0022] In a possible implementation, the electric meter device is at least one, the data reading request comprises an identifier of a target electric meter device, and the target electric meter device is selected from all the electric meter devices by the background personnel on the data reading page; and the backend server is deployed with a WebSocket server.

[0023] The step of sending the data reading request to the backend server through the WebSocket client comprises:

[0024] The identification is sent to the backend server through the WebSocket client, so that the backend server sends the data reading request to the target electric meter device according to the identification, acquires data of the target electric meter device, and sends the data of the target electric meter device to the WebSocket client.

[0025] In a second aspect, the embodiments of the present application further provide a data reading device, applied to a front-end device, wherein the front-end device communicates with an electric meter device through a backend server, the front-end device is deployed with a WebSocket client, and the front-end device comprises a data reading page; the data reading device comprises:

[0026] A generating module is configured to generate a data reading request according to a data reading operation of a background staff on the data reading page;

[0027] A sending module is configured to send the data reading request to the backend server through the WebSocket client, so that the backend server acquires data of the electric meter device and returns the data to the WebSocket client;

[0028] A display module is configured to send the data to the data reading page for display by the WebSocket client.

[0029] In a third aspect, the embodiments of the present application further provide a front-end device, which comprises:

[0030] One or more processors;

[0031] A memory is configured to store one or more programs, when the one or more programs are executed by the one or more processors, the one or more processors are caused to implement the above-mentioned data reading method.

[0032] In a fourth aspect, the embodiments of the present application further provide a computer readable storage medium, which stores a computer program, when the computer program is executed by a processor, the above-mentioned data reading method is implemented.

[0033] Compared to existing technologies, this invention provides a data reading method, apparatus, front-end device, and storage medium. The method includes: first, generating a data reading request based on a data reading operation performed by a back-end user on a data reading page; then, sending the data reading request to a back-end server via a WebSocket client, enabling the back-end server to retrieve data from the electricity meter and return the data to the WebSocket client; finally, the WebSocket client sending the data to the data reading page for display. This improves the real-time performance of data reading by back-end users. Attached Figure Description

[0034] To more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings used in the embodiments will be briefly introduced below. It should be understood that the following drawings only show some embodiments of the present invention and should not be regarded as a limitation on the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.

[0035] Figure 1 This is a schematic diagram illustrating an application scenario of the data reading method provided in an embodiment of the present invention.

[0036] Figure 2 This is a schematic diagram illustrating another application scenario of the data reading method provided in this embodiment of the invention.

[0037] Figure 3 This is a flowchart illustrating the data reading method provided in an embodiment of the present invention.

[0038] Figure 4 This is a communication example diagram illustrating the data reading method provided in an embodiment of the present invention.

[0039] Figure 5 This is a block diagram of a data reading device provided in an embodiment of the present invention.

[0040] Figure 6 A block diagram of a front-end device provided in an embodiment of the present invention.

[0041] Icons: 10-Front-end device; 20-Back-end server; 30-Electricity meter device; 101-Memory; 102-Processor; 103-Bus; 200-Data reading device; 201-Generation module; 202-Sending module; 203-Display module; 204-Refresh module. Detailed Implementation

[0042] In order to make the objects, technical solutions and advantages of the embodiments of the present application clearer, the following will clearly and completely describe the technical solutions in the embodiments of the present application with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only some but not all of the embodiments of the present application. The components of the embodiments of the present application described and shown in the drawings can be arranged and designed in various different configurations.

[0043] Therefore, the following detailed description of the embodiments of the present application provided in the drawings is not intended to limit the scope of the claimed present application, but only represents selected embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative labor fall within the scope of protection of the present application.

[0044] It should be noted that: similar reference numbers and letters represent similar items in the following drawings, therefore, once an item is defined in one drawing, it does not need to be further defined and explained in subsequent drawings.

[0045] In addition, if the terms "first", "second" and the like are used, they are only used to distinguish descriptions, and cannot be understood as indicating or implying relative importance.

[0046] It should be noted that, in the case of no conflict, the features in the embodiments of the present application can be combined with each other.

[0047] In the electric meter data acquisition system, the front-end device has multiple functions, such as data reading function, statistical data display function. The background personnel can read the data of the electric meter equipment installed on the user side through the front-end device, so as to master the user's power consumption in real time.

[0048] Generally, the data generated by the electric meter is sent to the back-end server in real time for caching, in the prior art, the front-end device usually realizes real-time data acquisition in the following way.

[0049] A WebSocket client is deployed for each function page of the front-end device, and a WebSocket server is also deployed on the back-end server. The back-end server regularly counts data and sends the statistical data to the WebSocket client through the WebSocket server. The WebSocket client refreshes the data on the corresponding function page according to the received statistical data.

[0050] In the above method, since a WebSocket client is needed for each function page, too many WebSocket clients are deployed, which increases the management difficulty and causes waste of system resources. Moreover, deploying a WebSocket client for each function page increases the development workload of the front-end device.

[0051] To solve the above problems, the embodiment provides a data reading method. A WebSocket client is deployed on a client. When a user requests data reading on a front-end device, the front-end device can directly send a request to a back-end server through the WebSocket client to obtain data of a power meter device, thereby improving the real-time performance of data transmission. Moreover, only one WebSocket client is deployed on each front-end device, thereby saving system resources.

[0052] Please refer to Figure 1 , Figure 1 Fig. 1 shows an application scenario of a data reading method provided by the embodiment, which includes m front-end devices, a back-end server 20 and n power meter devices. The back-end server 20 communicates with each front-end device and each power meter device.

[0053] The power meter device is installed on a user side and is used to collect power consumption data of the user.

[0054] The front-end device is deployed with a WebSocket client, and the back-end server 20 is deployed with a WebSocket server. The communication between the front-end device and the back-end server 20 is realized through the communication between the WebSocket client and the WebSocket server.

[0055] The front-end device is installed on a power grid company side. The front-end device is installed with a browser, and the browser includes multiple function pages, such as a data display page, a data reading page, a pull-in and pull-out page, a parameter device page and the like. A user can operate on each function page to realize the operation on the power meter device 30.

[0056] For the convenience of description, please refer to Figure 2 The data reading method provided by the embodiment is described by taking the communication between the back-end server 20 and the front-end device 10 and the power meter device 30 as an example. The front-end device 10 can be any one of the m front-end devices in Figure 1 The power meter device 30 can be any one of the n power meter devices in Figure 1

[0057] On the basis of the above content, the data reading method provided by the embodiment is introduced. Please refer to Figure 3 , Figure 3 Fig. 2 shows a flowchart of the data reading method provided by the embodiment, which includes the following steps S110-S130.

[0058] S110, a data reading request is generated according to a data reading operation of a user on a data reading page.

[0059] ​In the embodiment, the front-end device 10 comprises a data reading page for reading data of the electric meter device, wherein the electric meter device can be all the electric meter devices in communication with the back-end server or part of the electric meter devices, and the user can select in the data reading page.

[0060] S120, sending the data reading request to the back-end server through the WebSocket client, so that the back-end server acquires the data of the electric meter device and returns the data to the WebSocket client.

[0061] In the embodiment, the WebSocket client is pre-deployed, and the WebSocket is a network transmission protocol which can realize full-duplex communication on a single connection, so as to better save system resources and bandwidth and achieve real-time communication.

[0062] S130, the WebSocket client sends the data to the data reading page for display.

[0063] In the embodiment, the data reading page can not only display the acquired data, but also download the acquired data to the front-end device.

[0064] Compared with the prior art, the data reading method provided in the embodiment can improve the real-time performance of data transmission by deploying the WebSocket client in the front-end device, and when the user requests to read data in the front-end device, the front-end device can directly send the request to the back-end server through the WebSocket client to acquire the data of the electric meter device.

[0065] Optionally, the front-end device 10 further comprises a plurality of function pages, and the plurality of function pages comprises the data reading page. The front-end device is further deployed with a message bus, the message bus comprises at least one channel, each channel is associated with a corresponding function page, and the back-end server 20 is deployed with a WebSocket server.

[0066] The step S120 can comprise the following sub-steps S1201-S1203.

[0067] S1201, determining a first target channel corresponding to the data reading page in the at least one channel.

[0068] S1202, sending the data reading request to the WebSocket client through the first target channel.

[0069] S1203, the WebSocket client sends the data reading request to the WebSocket server.

[0070] In the embodiment, please refer to Figure 4 ,Figure 4 The process of the front-end device 10 and the back-end server 20 communication is shown. The front-end device 10 includes multiple function pages such as a data reading page, a statistical data refreshing page, etc. Each function page communicates with the WebSocket client through a bus and a WebSocket client, and the bus includes multiple channels, each of which is associated with a function page. For example, channel 1 is associated with the data reading page, and channel 2 is associated with the statistical data refreshing page.

[0071] When the user operates on the data reading page, the front-end device 10 generates a data reading request, and the front-end device 10 determines channel 1 as a first target channel from the multiple channels and sends the data reading request to the WebSocket client through channel 1. The WebSocket client sends the data reading request to the WebSocket server in the back-end server 20.

[0072] The WebSocket server sends the data reading request to the back-end logic processing module, and the back-end logic processing module processes the data reading request and sends the data reading request to the electric meter device 30 to obtain the data of the electric meter device 30. The processing performed by the back-end logic processing module can be determining the identification of the electric meter device according to the data reading request and sending the data reading request to the electric meter device according to the identification.

[0073] The other function pages can include a pull-in and pull-out breaker page, and the user can perform pull-in and pull-out operations on the electric meter device 30 on the pull-in and pull-out breaker page. The other function pages can also include a parameter configuration page, and the user can set the parameters of the electric meter device 30 on the parameter configuration page.

[0074] Optionally, the front-end device 10 generally also has a statistical data refreshing function, that is, the real-time statistical data of the electric meter device 30 is displayed on the page that needs to be refreshed in real time. In the prior art, to implement the above-mentioned statistical data refreshing function, the front-end device needs to define a timer for each page that needs to be refreshed in real time, for example, a timer is defined on the statistical data display page to request data from the back-end server at a fixed time interval. The back-end server returns data in real time, and the front-end device refreshes the data of the page according to the returned data.

[0075] However, in the above method, the real-time performance of the data refreshing of the front-end device depends on the refreshing frequency of the timer. If the time interval is too large, the real-time performance of the data refreshing is reduced. If the time interval is too small, the load of the system is increased.

[0076] In addition, in the case of a large number of accesses to the front-end device, each front-end device needs to perform data refreshing, and there is a situation of repeated data requests and repeated statistical data, which increases the load of the system and causes waste of system resources.

[0077] Therefore, the data reading method provided in the embodiment further comprises a statistical data display page.

[0078] S140, displaying the statistical data of the electric meter device through the statistical data display page and performing real-time refreshing.

[0079] Optionally, the plurality of function pages comprises the statistical data display page. Step S140 can comprise the following sub-steps S1401-S1403.

[0080] S1401, the WebSocket client receives the timing statistical data sent by the WebSocket server in real time, wherein the timing statistical data is obtained by the backend server according to the data sent by the electric meter device in real time.

[0081] In the embodiment, the electric meter device 30 sends data to the backend server 20 in real time, and the backend logic processing module in the backend server 20 performs statistical processing on the data at a set time interval. The statistical information can include the current power, the daily power consumption, the cumulative power consumption, etc.

[0082] S1402, determining the second target channel corresponding to the statistical data display page from the at least one channel.

[0083] S1403, sending the timing statistical data to the statistical data display page through the second target channel, so that the statistical data display page displays the timing statistical data and refreshes the data.

[0084] In the embodiment, please continue to refer to Figure 4 After the WebSocket client receives the timing statistical data, it determines channel 2 as the second target channel from the plurality of channels, and sends the timing statistical data to the statistical data display page through channel 2.

[0085] It should be noted that if the other function pages include a function page that needs real-time data refreshing, the WebSocket client will send the timing statistical data to the corresponding function page through the corresponding channel for refreshing after receiving the timing statistical data.

[0086] Optionally, the electric meter device is at least one, and the data reading request comprises an identifier of a target electric meter device. The target electric meter device is selected by the user from all electric meter devices on the data reading page.

[0087] Step S120 can comprise the following sub-step S1201.

[0088] S1201, send the identification to the backend server through the WebSocket client, so that the WebSocket server sends a data reading request to the target electric meter device according to the identification, to obtain the data of the target electric meter device, and sends the data of the target electric meter device to the WebSocket client.

[0089] In the embodiment, the target electric meter device can be one or multiple, and the identification of the electric meter device can be a unique symbol identification of the electric meter device. For example, the user selects electric meter device 1 and electric meter device 2 in the data reading page to perform data reading, and the data reading request generated by the front-end device 10 includes the identifications of the electric meter device 1 and the electric meter device 2. Figure 1

[0090] Compared with the prior art, the embodiment has the following beneficial effects:

[0091] Firstly, the data reading method provided by the embodiment, by deploying a WebSocket client in the front-end device, when the user requests to perform data reading in the front-end device, the front-end device can directly send a request to the backend server through the WebSocket client to obtain the data of the electric meter device, thereby improving the real-time performance of data transmission.

[0092] Secondly, compared with the prior art of deploying a WebSocket client for each function page, the embodiment only deploys one WebSocket client in one front-end device and establishes a bus, and different function pages are associated by using different channels in the bus, thereby saving system resources and reducing the development work of the front-end device.

[0093] Finally, for the function page that needs real-time data refreshing, the backend server actively sends the timing statistical data to the front-end device at regular intervals, and then the corresponding channel of the WebSocket client in the front-end device sends the timing statistical data to the corresponding function page. Compared with the prior art of requesting refreshing at regular intervals by different function pages, the method in the embodiment can update the data of multiple function pages at the same time only once, thereby reducing the waste of system resources.

[0094] Please refer to Figure 5 , Figure 5 Fig. 1 shows a block schematic diagram of the data reading apparatus 200 provided by the embodiment. The data reading apparatus 200 is applied to the front-end device 10, the front-end device 10 communicates with the electric meter device 30 through the backend server 20, the front-end device 10 is deployed with a WebSocket client, and the front-end device 10 includes a data reading page. The data reading apparatus 200 includes:

[0095] ​The generating module 201 is configured to generate a data reading request according to a data reading operation of the user on the data reading page.

[0096] The sending module 202 is configured to send the data reading request to the backend server through the WebSocket client, so that the backend server acquires data of the electric meter device and returns the data to the WebSocket client.

[0097] The display module 203 is configured to send the data to the data reading page for display by the WebSocket client.

[0098] Optionally, the front-end device further includes a plurality of function pages, and the plurality of function pages include the data reading page; the front-end device is further deployed with a message bus, the message bus includes at least one channel, each channel is associated with a corresponding function page; and the backend server is deployed with a WebSocket server.

[0099] The sending module 202 is further configured to:

[0100] Determine a first target channel corresponding to the data reading page in the at least one channel.

[0101] Send the data reading request to the WebSocket client through the first target channel.

[0102] The WebSocket client sends the data reading request to the WebSocket server.

[0103] Optionally, the front-end device further includes a statistical data display page; and the data reading device further includes a refreshing module 204.

[0104] The refreshing module 204 is configured to display statistical data of the electric meter device through the statistical data display page and perform real-time refreshing.

[0105] Optionally, the plurality of function pages include the statistical data display page.

[0106] The refreshing module 204 is further configured to receive timing statistical data sent by the WebSocket server in real time by the WebSocket client, wherein the timing statistical data is obtained by the backend server according to data sent by the electric meter device in real time.

[0107] Determine a second target channel corresponding to the statistical data display page from the at least one channel.

[0108] Send the timing statistical data to the statistical data display page through the second target channel, so that the statistical data display page displays the timing statistical data to refresh the data.

[0109] Optionally, the electric meter devices are at least one, and the data reading request comprises an identification of the target electric meter device, and the target electric meter device is selected by the user from all the electric meter devices on a data reading page.

[0110] The sending module 202 is further configured to send the identification to the backend server through the WebSocket client, so that the WebSocket server sends the data reading request to the target electric meter device according to the identification, acquires data of the target electric meter device, and sends the data of the target electric meter device to the WebSocket client.

[0111] Those skilled in the art can clearly understand the specific working process of the data reading device 200 described above for the convenience and brevity of description. The corresponding process in the foregoing method embodiments can be referred to, and will not be described here.

[0112] Please refer to Figure 6 , Figure 6 A block diagram of a front-end device 10 is shown, which can be, but is not limited to, a mobile phone, a tablet computer, a notebook computer, a server, or other electronic devices with processing capabilities, and can also be a general-purpose computer or a special-purpose computer. The front-end device 10 includes a memory 101, a processor 102, and a bus 103. The memory 101 and the processor 102 are connected through the bus 103, for example, a disk, a ROM, or a RAM, or any combination thereof. The front-end device 10 can also include program instructions stored in the ROM, the RAM, or other types of non-transitory storage media, or any combination thereof. According to these program instructions, the method of the present application can be implemented.

[0113] The memory 101 is used to store programs, such as the data reading device 200. The data reading device 200 includes at least one software function module stored in the memory 101 in the form of software or firmware. After receiving an execution instruction, the processor 102 executes the program to implement the data reading method in the present embodiment.

[0114] The memory 101 can be, but is not limited to, a random access memory (RAM), a read only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), etc.

[0115] The processor 102 can be an integrated circuit chip with processing capability. In the implementation process, each step of the data reading method in the embodiment can be completed by the integrated logic circuit of hardware or the instruction in the form of software in the processor 102. The processor 102 described above can be a general processor, including a central processing unit (CPU), a microcontroller unit (MCU), a complex programmable logic device (CPLD), a field programmable gate array (FPGA), an embedded ARM, etc.

[0116] For the convenience of description, only one processor is described in the front-end device 10. However, it should be noted that the front-end device 10 in the present application can also include multiple processors, so the steps performed by one processor described in the present application can also be jointly performed or separately performed by multiple processors. For example, if the processor of the front-end device 10 performs steps A and B, it should be understood that steps A and B can also be jointly performed by two different processors or separately performed in one processor. For example, a first processor performs step A, a second processor performs step B, or the first processor and the second processor jointly perform steps A and B.

[0117] The embodiment also provides a computer readable storage medium, which stores a computer program, and the computer program is executed by the processor 102 to implement the data reading method disclosed in the above embodiment.

[0118] To sum up, the data reading method, device, front-end equipment and storage medium provided by the embodiment of the application, the method comprises the following steps: first, a data reading request is generated according to the data reading operation of a user on the data reading page. Then, the data reading request is sent to the back-end server through a WebSocket client, so that the back-end server obtains the data of the electric meter equipment and returns the data to the WebSocket client. Finally, the WebSocket client sends the data to the data reading page for display. Thus, the real-time performance of the user in data reading is improved.

[0119] The above merely describes the specific embodiments of the application, but the protection scope of the application is not limited to this. Any person skilled in the art can easily think of changes or replacements within the technical range disclosed by the application, which should be covered within the protection scope of the application. Therefore, the protection scope of the application should be subject to the protection scope of the claims.

Claims

1. A data reading method, characterized in that, The method is applied to a front-end device that communicates with a back-end server and an electricity meter. The front-end device deploys a WebSocket client and includes a data reading page. The front-end device also includes multiple functional pages, including the data reading page. A data read request is generated based on the data read operation performed by the backend personnel on the data read page; The data read request is sent to the backend server via a WebSocket client, so that the backend server can obtain the data from the electricity meter device and return the data to the WebSocket client; The front-end device is also equipped with a message bus, which includes at least one channel and each channel is associated with a corresponding function page; and the back-end server is equipped with a WebSocket server. The step of sending the data read request to the backend server via a WebSocket client includes: determining a first target channel corresponding to the data read page from the at least one channel; sending the data read request to the WebSocket client via the first target channel; and the WebSocket client sending the data read request to the WebSocket server. The WebSocket client sends the data to the data reading page for display.

2. The method according to claim 1, characterized in that, The front-end device also includes a statistical data display page; the method further includes: The statistical data of the electricity meter is displayed on the statistical data display page and is refreshed in real time.

3. The method according to claim 2, characterized in that, The multiple functional pages include the statistical data display page; The step of displaying the statistical data of the electricity meter device through the statistical data display page and refreshing it in real time includes: The WebSocket client receives timed statistical data sent by the WebSocket server in real time, wherein the timed statistical data is obtained by the backend server based on the data sent by the electricity meter device in real time; Determine the second target channel corresponding to the statistics display page from the at least one channel; The timed statistical data is sent to the statistical data display page via the second target channel, so that the statistical data display page displays the timed statistical data to refresh the data.

4. The method according to claim 1, characterized in that, The electricity meter device is at least one, and the data reading request includes the identifier of the target electricity meter device, which is selected by the back-end personnel from all the electricity meter devices on the data reading page; The backend server is equipped with a WebSocket server. The step of sending the data read request to the backend server via a WebSocket client includes: The identifier is sent to the backend server via the WebSocket client, so that the WebSocket server sends the data read request to the target meter device according to the identifier, so as to obtain the data of the target meter device, and sends the data of the target meter device to the WebSocket client.

5. A data reading device, characterized in that, Applied to a front-end device, the front-end device communicates with a back-end server and an electricity meter device. The front-end device deploys a WebSocket client and includes a data reading page. The front-end device also includes multiple function pages, including the data reading page. The data reading device includes: The generation module is used to generate data read requests based on the data read operations performed by backend personnel on the data read page; The sending module is used to send the data reading request to the backend server through a WebSocket client, so that the backend server can obtain the data of the electricity meter device and return the data to the WebSocket client; The front-end device is also equipped with a message bus, which includes at least one channel and each channel is associated with a corresponding function page; and the back-end server is equipped with a WebSocket server. The sending module is further configured to: determine a first target channel corresponding to the data reading page from the at least one channel; send the data reading request to the WebSocket client through the first target channel; and send the data reading request to the WebSocket server. The display module is used by the WebSocket client to send the data to the data reading page for display.

6. The apparatus according to claim 5, characterized in that, The front-end device also includes a statistical data display page; the data reading device also includes a refresh module; The refresh module is used to display the statistical data of the electricity meter through the statistical data display page and refresh it in real time.

7. A front-end device, characterized in that, The front-end device includes: One or more processors; A memory for storing one or more programs, which, when executed by one or more processors, cause the one or more processors to implement the data reading method as described in any one of claims 1-4.

8. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the data reading method as described in any one of claims 1-4.

Citation Information

Patent Citations

  • DATA DISPLAY METHOD AND APPARATUS, DATA pushig METHOD AND APPARATUS

    CN109067899A