CN115119081A - Data reading method and device, front-end equipment and storage medium - Google Patents

Data reading method and device, front-end equipment and storage medium Download PDF

Info

Publication number
CN115119081A
CN115119081A CN202210760296.1A CN202210760296A CN115119081A CN 115119081 A CN115119081 A CN 115119081A CN 202210760296 A CN202210760296 A CN 202210760296A CN 115119081 A CN115119081 A CN 115119081A
Authority
CN
China
Prior art keywords
data
data reading
page
websocket
server
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202210760296.1A
Other languages
Chinese (zh)
Inventor
周善勇
龙吟
肖丰
杜鹏
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Ningbo Sanxing Smart Electric Co Ltd
Original Assignee
Ningbo Sanxing Smart Electric Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Ningbo Sanxing Smart Electric Co Ltd filed Critical Ningbo Sanxing Smart Electric Co Ltd
Priority to CN202210760296.1A priority Critical patent/CN115119081A/en
Publication of CN115119081A publication Critical patent/CN115119081A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04QSELECTING
    • H04Q9/00Arrangements in telecontrol or telemetry systems for selectively calling a substation from a main station, in which substation desired apparatus is selected for applying a control signal thereto or for obtaining measured values therefrom
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/02Protocols based on web technology, e.g. hypertext transfer protocol [HTTP]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/12Protocols specially adapted for proprietary or special-purpose networking environments, e.g. medical networks, sensor networks, networks in vehicles or remote metering networks
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/16Implementation or adaptation of Internet protocol [IP], of transmission control protocol [TCP] or of user datagram protocol [UDP]
    • H04L69/161Implementation details of TCP/IP or UDP/IP stack architecture; Specification of modified or new header fields
    • H04L69/162Implementation details of TCP/IP or UDP/IP stack architecture; Specification of modified or new header fields involving adaptations of sockets based mechanisms
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04QSELECTING
    • H04Q2209/00Arrangements in telecontrol or telemetry systems
    • H04Q2209/60Arrangements in telecontrol or telemetry systems for transmitting utility meters data, i.e. transmission of data from the reader of the utility meter
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Health & Medical Sciences (AREA)
  • Computing Systems (AREA)
  • General Health & Medical Sciences (AREA)
  • Medical Informatics (AREA)
  • Computer Security & Cryptography (AREA)
  • Arrangements For Transmission Of Measured Signals (AREA)

Abstract

The embodiment of the invention provides a data reading method and device, front-end equipment and a storage medium, and relates to the field of data processing. The method comprises the following steps: firstly, a data reading request is generated according to the data reading operation of background personnel on the data reading page. And then, sending the data reading request 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. And finally, the WebSocket client sends the data to the data reading page for displaying. Because the Websocket client is installed at the front end, the data reading request generated by the front-end equipment can be sent to the back-end server through the Websocket client, and therefore the real-time performance of data reading is improved on the premise of reducing the system pressure.

Description

Data reading method and device, front-end equipment and storage medium
Technical Field
The present invention relates to the field of data processing, and in particular, to a data reading method and apparatus, a front-end device, and a storage medium.
Background
In the electric meter data acquisition system, the front-end equipment has multiple functions, such as a data reading function and a statistical data display function. Backstage personnel can read the data of the ammeter equipment installed at the user side through the front-end equipment so as to master the electricity utilization condition of the user in real time.
In the prior art, when background personnel read the electric meter data, the real-time performance of the obtained electric meter data is not high enough, and the performance of the system is stressed greatly.
Disclosure of Invention
The invention aims to provide a data reading method, a data reading device, front-end equipment and a storage medium.
In order to achieve the above purpose, the embodiment of the present invention adopts the following technical solutions:
in a first aspect, an embodiment of the present invention provides a data reading method, which is applied to a front-end device, where the front-end device communicates with an electric meter device through a back-end server, the front-end device is deployed with a WebSocket client, and the front-end device includes a data reading page; the method comprises the following steps:
generating a data reading request according to the data reading operation of background personnel on the data reading page;
sending the data reading request to the back-end server through a WebSocket client, so that the back-end server obtains data of the ammeter equipment and returns the data to the WebSocket client;
and the WebSocket client sends the data to the data reading page for display.
In a possible implementation, the front-end device further includes a plurality of functional pages, where the plurality of functional pages include the data reading page; the front-end equipment is also provided with a message bus, the message bus comprises at least one channel, and each channel is associated with a corresponding function page; the back-end server is provided with a WebSocket server;
the step of sending the data reading request to the back-end server through the WebSocket client comprises the following steps:
determining a first target channel corresponding to the data reading page in the at least one channel;
sending the data reading request to the WebSocket client through the first target channel;
and the WebSocket client sends the data reading request to the WebSocket server.
In a possible implementation, the front-end device further includes a statistical data presentation page; the method further comprises the following steps:
and displaying the statistical data of the electric meter equipment through the statistical data display page, and refreshing in real time.
In a possible implementation manner, the front-end device further includes a plurality of function pages, where the plurality of function pages include the statistical data presentation page; the front-end equipment is also provided with a message bus, the message bus comprises at least one channel, and each channel is associated with a corresponding function page; the back-end server is provided with a WebSocket server;
the step of displaying the statistical data of the electric meter equipment through the statistical data display page and refreshing the statistical data in real time comprises the following steps:
the WebSocket client receives timing statistical data sent by the WebSocket server in real time, wherein the timing statistical data are obtained by counting the data sent by the back-end server in real time according to the electric meter equipment;
determining a second target channel corresponding to the statistical data display page from the at least one channel;
and sending the timing statistical data to the statistical data display page through the second target channel so as to enable the statistical data display page to display the timing statistical data and refresh the data.
In a possible embodiment, the number of the electric meter devices is at least one, the data reading request includes 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; the back-end server is provided with a WebSocket server side in a deployed mode;
the step of sending the data reading request to the back-end server through the WebSocket client comprises the following steps:
and sending the identification to the back-end server through a WebSocket client, so that the WebSocket server sends the data reading request to the target electric meter equipment according to the identification to obtain the data of the target electric meter equipment, and sends the data of the target electric meter equipment to the WebSocket client.
In a second aspect, an embodiment of the present invention further provides a data reading apparatus, which is applied to a front-end device, where the front-end device communicates with an electric meter device through a back-end server, the front-end device is deployed with a WebSocket client, and the front-end device includes a data reading page; the data reading apparatus includes:
the generating module is used for generating a data reading request according to the data reading operation of background personnel on the data reading page;
the sending module is used for sending the data reading request to the back-end server through a WebSocket client so that the back-end server can obtain data of the ammeter equipment and return the data to the WebSocket client;
and the display module is used for the WebSocket client to send the data to the data reading page for display.
In a third aspect, an embodiment of the present invention further provides a front-end device, where the front-end device includes:
one or more processors;
a memory for storing one or more programs which, when executed by the one or more processors, cause the one or more processors to implement the data reading method described above.
In a fourth aspect, the present invention further provides a computer-readable storage medium, on which a computer program is stored, where the computer program is executed by a processor to implement the data reading method.
Compared with the prior art, the data reading method, the data reading device, the front-end equipment and the storage medium provided by the embodiment of the invention comprise the following steps: firstly, a data reading request is generated according to the data reading operation of background personnel on the data reading page. And then, 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. And finally, the WebSocket client sends the data to the data reading page for displaying. Therefore, the real-time performance of data reading by background personnel is improved.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings needed to be used in the embodiments will be briefly described below, it should be understood that the following drawings only illustrate some embodiments of the present invention and therefore should not be considered as limiting the scope, and for those skilled in the art, other related drawings can be obtained according to the drawings without inventive efforts.
Fig. 1 is a schematic view of an application scenario of the data reading method according to the embodiment of the present invention.
Fig. 2 is a schematic view of another application scenario of the data reading method according to the embodiment of the present invention.
Fig. 3 is a schematic flowchart of a data reading method according to an embodiment of the present invention.
Fig. 4 is a communication example diagram of a data reading method according to an embodiment of the present invention.
Fig. 5 is a block diagram of a data reading apparatus according to an embodiment of the present invention.
Fig. 6 is a schematic block diagram of a front-end device according to an embodiment of the present invention.
Icon: 10-front-end equipment; 20-a back-end server; 30-a meter device; 101-a memory; 102-a processor; 103-a bus; 200-a data reading device; 201-a generation module; 202-a sending module; 203-a display module; 204-refresh module.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all, embodiments of the present invention. The components of embodiments of the present invention generally described and illustrated in the figures herein may be arranged and designed in a wide variety of different configurations.
Thus, the following detailed description of the embodiments of the present invention, as presented in the figures, is not intended to limit the scope of the invention, as claimed, but is merely representative of selected embodiments of the invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
It should be noted that: like reference numbers and letters refer to like items in the following figures, and thus, once an item is defined in one figure, it need not be further defined and explained in subsequent figures.
Furthermore, the appearances of the terms "first," "second," and the like, if any, are used solely to distinguish one from another and are not to be construed as indicating or implying relative importance.
It should be noted that the features of the embodiments of the present invention may be combined with each other without conflict.
In the electric meter data acquisition system, the front-end equipment has multiple functions, such as a data reading function and a statistical data display function. Background personnel can read the data of the ammeter equipment installed at the user side through the front-end equipment so as to master the power utilization condition of the user in real time.
Generally, data generated by the electric meter is sent to the back-end server for caching, and in the prior art, the front-end device generally acquires the data in real time in the following manner.
A Websocket client is deployed for each functional page of the front-end equipment, and a Websocket server is deployed for the back-end server. And the back-end server periodically counts the data and sends the statistical data to the WebSocket client through the WebSocket server. And the WebSocket client refreshes data on the corresponding function page according to the received statistical data.
In the method, because each functional page needs to deploy the Websocket client, too many Websocket clients are caused, the management difficulty is increased, and the waste of system resources is caused. Moreover, each function page is provided with a WebSocket client, so that the development workload of front-end equipment is increased.
In order to solve the above problems, in the data reading method provided in this embodiment, by deploying the WebSocket client at the client, when a user requests to read data at the front-end device, the front-end device may directly send the request to the back-end server through the WebSocket client, so as to obtain data of the electric meter device, thereby improving the real-time performance of data transmission. In addition, each front-end device is only provided with one WebSocket client, so that the resources of the system are saved.
Referring to fig. 1, fig. 1 is a schematic diagram illustrating an application scenario of the data reading method according to the embodiment of the present invention, where the application scenario includes m front-end devices, a back-end server 20 and n electric meter devices, and the back-end server 20 communicates with each front-end device and each electric meter device.
The electric meter equipment is installed on the user side and used for collecting the electricity utilization data of the user.
The front-end device is deployed with a WebSocket client, the back-end server 20 is deployed with a WebSocket server, and communication between the front-end device and the back-end server 20 is achieved through communication between the WebSocket client and the WebSocket server.
The front-end equipment is installed on the side of a power grid company, the front-end equipment is provided with a browser, and the browser comprises a plurality of function pages. Such as a data presentation page, a data reading page, a pull-close page, a parameter device page, etc. The user can operate on the respective function pages to realize the operation of the electricity meter device 30.
For convenience of description, please refer to fig. 2, which illustrates an example that the back-end server 20 communicates with the front-end device 10 and the electric meter device 30 respectively. The front-end device 10 may be any one of m front-end devices in fig. 1, and the electric meter device 30 may be any one of n electric meter devices in fig. 1.
On the basis of the above, the data reading method provided in the present embodiment is described. Referring to fig. 3, fig. 3 is a schematic flow chart illustrating a data reading method provided in the present embodiment, and the method includes the following steps S110 to S130.
And S110, generating a data reading request according to the data reading operation of the user on the data reading page.
In this embodiment, the front-end device 10 includes a data reading page, configured to read data of the electric meter devices, where the electric meter devices may be all electric meter devices in communication with the back-end server, or some electric meter devices in all electric meter devices, and the user may select on the data reading page.
And S120, sending the data reading request to a back-end server through the WebSocket client so that the back-end server can obtain the data of the ammeter equipment and return the data to the WebSocket client.
In this embodiment, the WebSocket client is pre-deployed, and the WebSocket is a network transmission protocol, and can perform full-duplex communication on a single connection, thereby better saving system resources and bandwidth and achieving real-time communication.
And S130, the WebSocket client sends the data to the data reading page for display.
In this embodiment, the data reading page may not only display the acquired data, but also download the acquired data to the front-end device.
Compared with the prior art, according to the data reading method provided by the embodiment, the WebSocket client is deployed on the front-end device, when a user requests to read data on the front-end device, the front-end device can directly send the request to the back-end server through the WebSocket client to obtain data of the electric meter device, and therefore the real-time performance of data transmission is improved.
Optionally, the front-end device 10 further includes a plurality of function pages, and the plurality of function pages include a data reading page. The front-end device is also provided 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 provided with a WebSocket server.
Step S120 may include the following sub-steps S1201-S1203.
S1201, a first target channel corresponding to the data reading page is determined in at least one channel.
And S1202, sending the data reading request to the WebSocket client through the first target channel.
S1203, the WebSocket client sends the data reading request to a WebSocket server.
In this embodiment, referring to fig. 4, fig. 4 shows a process of communication between the front-end device 10 and the back-end server 20. The front-end device 10 includes a plurality of functional pages such as a data reading page, a statistics refreshing page, and the like. Each function page is communicated with the WebSocket client through a bus, the bus comprises a plurality of channels, and each channel is associated with one function page. For example, channel 1 is associated with a data read page and channel 2 is associated with a statistics refresh page.
When a user operates on the data reading page, the front-end device 10 generates a data reading request, the front-end device 10 determines a channel 1 as a first target channel from the multiple channels, and sends the data reading request to the WebSocket client through the channel 1. The WebSocket client sends the data reading request to the WebSocket server in the backend server 20.
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 then sends the data reading request to the electric meter device 30 to obtain data of the electric meter device 30. The processing performed by the back-end logic processing module may be to determine an identifier of the electric meter device according to the data reading request, and send the data reading request to the electric meter device according to the identifier.
The other function pages may include a switching-off page, and a user may perform switching-off and switching-on operations on the electric meter device 30 on the switching-off page. The other function pages may further include a parameter configuration page where the user can set parameters of the electric meter device 30.
Optionally, the front-end device 10 generally further has a statistical data refreshing function, that is, the real-time statistical data of the electric meter device 30 is displayed on a page that needs to be refreshed in real time. In the prior art, to implement the above 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, and data is periodically requested from the back-end server. The back-end server returns data in real time, and the front-end equipment refreshes the data of the page according to the returned data.
However, in the above method, the real-time performance of the front-end device to refresh data depends on the refresh frequency of the timer, and if the time interval is too large, the real-time performance of data refresh is reduced. If the time interval is too small, the load on the system increases.
In addition, under the condition that the access amount of the front-end equipment is large, each front-end equipment needs to refresh data, and the conditions of repeatedly requesting data and repeatedly counting data exist, so that the load of the system is increased, and the waste of system resources is caused.
Therefore, in the data reading method provided in this embodiment, the front-end device 10 further includes a statistical data display page. The data reading method may further include the following step S140 in parallel with the steps S110 to S130.
And S140, displaying the statistical data of the electric meter equipment through the statistical data display page, and refreshing in real time.
Optionally, the plurality of function pages include a statistical data presentation page. Step S140 may include the following sub-steps S1401-S1403.
And S1401, the WebSocket client receives timing statistical data sent by the WebSocket server in real time, wherein the timing statistical data is obtained by counting the data sent by the electric meter equipment in real time by the back-end server.
In this embodiment, the electric meter device 30 may send data to the back-end server 20 in real time, the back-end logic processing module in the back-end server 20 counts the data at set time intervals, and the counted information may include: the current electric quantity, the current day electric quantity, the accumulated electric quantity, and the like.
S1402, determining a second target channel corresponding to the statistical data display page from the at least one channel.
And S1403, the timing statistical data is sent to a statistical data display page through the second target channel, so that the statistical data display page displays the timing statistical data, and the data is refreshed.
In this embodiment, please continue to refer to fig. 4, after the WebSocket client receives the timing statistical data, determine a channel 2 as a second target channel from the multiple channels, and send the timing statistical data to the statistical data display page through the channel 2.
It should be noted that, if other function pages include a function page that needs real-time data refreshing, after receiving the timing statistical data, the WebSocket client sends the timing statistical data to the corresponding function page through the corresponding channel for refreshing.
Optionally, the number of the electric meter devices is at least one, the data reading request includes an identifier of the target electric meter device, and the target electric meter device is selected from all the electric meter devices in the data reading page by the user.
Step S120 may include the following sub-step S1201.
And S1201, sending the identifier to a back-end server through the WebSocket client, so that the WebSocket server sends the data reading request to the target electric meter device according to the identifier to obtain the data of the target electric meter device, and sends the data of the target electric meter device to the WebSocket client.
In this embodiment, the target electric meter device may be one or multiple electric meter devices, and the identifier of the electric meter device may be a unique identifier of the electric meter device. For example, if the user selects the electric meter device 1 and the electric meter device 2 in fig. 1 on the data reading page to perform data reading, the data reading request generated by the front-end device 10 includes the identifiers of the electric meter device 1 and the electric meter device 2.
Compared with the prior art, the embodiment has the following beneficial effects:
first, in the data reading method provided in this embodiment, the WebSocket client is deployed on the front-end device, and when a user requests to read data from the front-end device, the front-end device can directly send the request to the back-end server through the WebSocket client to obtain data of the electric meter device, so that the real-time performance of data transmission is improved.
Secondly, compared with the prior art in which a WebSocket client is deployed for each function page, in this embodiment, only one WebSocket client is deployed in one front-end device, a bus is established, and different channels in the bus are used to associate different function pages, so that system resources are saved, and development work of the front-end device is reduced.
And finally, for the functional page needing real-time data refreshing, periodically sending the timing statistical data to the front-end equipment through the back-end server, and then sending the timing statistical data to the corresponding functional page through the corresponding channel of the WebSocket client in the front-end equipment. Compared with the prior art that the refreshing is requested at regular time through different functional pages, the method in the embodiment can synchronously update the data of a plurality of functional pages only by once statistics, and reduces the waste of system resources.
Referring to fig. 5, fig. 5 is a block diagram illustrating a data reading apparatus 200 according to the present embodiment. The data reading device 200 is applied to the front-end device 10, the front-end device 10 communicates with the electric meter device 30 through the back-end server 20, the WebSocket client is deployed on the front-end device 10, and the front-end device 10 includes a data reading page. The data reading apparatus 200 includes:
the generating module 201 is configured to generate a data reading request according to a data reading operation of a user on a data reading page.
The sending module 202 is configured to send the data reading request to the back-end server through the WebSocket client, so that the back-end server obtains data of the electric meter device and returns the data to the WebSocket client.
And the display module 203 is used for the WebSocket client to send the data to the data reading page for displaying.
Optionally, the front-end device further includes a plurality of functional pages, where the plurality of functional pages include a data reading page; the front-end equipment is also provided with a message bus, the message bus comprises at least one channel, and each channel is associated with a corresponding function page; and the back-end server is provided with a WebSocket server.
The sending module 202 is further configured to:
and determining a first target channel corresponding to the data reading page in at least one channel.
And sending the data reading request to the WebSocket client through the first target channel.
And the WebSocket client sends the data reading request to the WebSocket server.
Optionally, the front-end device further includes a statistical data display page; the data reading device also includes a refresh module 204.
And the refreshing module 204 is configured to display the statistical data of the electric meter device through the statistical data display page, and perform real-time refreshing.
Optionally, the plurality of function pages include a statistical data presentation page.
The refreshing module 204 is further configured to receive, by the WebSocket client, timing statistical data sent by the WebSocket server in real time, where the timing statistical data is obtained by counting, by the backend server, data sent by the electric meter device in real time.
And determining a second target channel corresponding to the statistical data display page from the at least one channel.
And sending the timing statistical data to a statistical data display page through a second target channel so that the statistical data display page displays the timing statistical data to refresh the data.
Optionally, the number of the electric meter devices is at least one, the data reading request includes an identifier of the target electric meter device, and the target electric meter device is selected from all the electric meter devices in the data reading page by the user.
The sending module 202 is further configured to send the identifier 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 identifier, so as to obtain data of the target electric meter device, and sends the data of the target electric meter device to the WebSocket client.
It will be apparent to those skilled in the art that the above-described specific operation of the data reading apparatus 200 is provided for convenience and brevity of description. Reference may be made to the corresponding process in the foregoing method embodiment, which is not described herein again.
Referring to fig. 6, fig. 6 is a block diagram illustrating a front-end device 10 according to the present embodiment, where the front-end device 10 may be, but is not limited to, a mobile phone, a tablet computer, a notebook computer, a server, or other electronic devices with processing capability, and may also be a general-purpose computer or a special-purpose computer. Front-end 10 includes memory 101, processor 102, and bus 103. The memory 101 and the processor 102 are connected by a bus 103, such as a disk, ROM, or RAM, or any combination thereof. Illustratively, the front-end device 10 may also include program instructions stored in ROM, RAM, or other types of non-transitory storage media, or any combination thereof. The method of the present invention can be implemented according to these program instructions.
The memory 101 is used for storing programs, such as the data reading device 200. The data reading device 200 includes at least one software functional module which can be stored in the memory 101 in the form of software or firmware (firmware), and the processor 102 executes the program to implement the data reading method in the present embodiment after receiving the execution instruction.
The Memory 101 may be, but is not limited to, a Random Access Memory (RAM), a Read Only Memory (ROM), a Programmable Read-Only Memory (PROM), an Erasable Read-Only Memory (EPROM), an electrically Erasable Read-Only Memory (EEPROM), and the like.
The processor 102 may be an integrated circuit chip having signal processing capabilities. In implementation, the steps of the data reading method in this embodiment may be implemented by integrated logic circuits of hardware in the processor 102 or instructions in the form of software. The processor 102 may be a general-purpose processor, and includes a Central Processing Unit (CPU), a Micro Control Unit (MCU), a Complex Programmable Logic Device (CPLD), a Field Programmable Gate Array (FPGA), and an embedded ARM.
For ease of illustration, only one processor is depicted in the head end 10. It should be noted, however, that the front-end 10 in the present invention may also include multiple processors, and thus the steps performed by one processor described in the present invention may also be performed by multiple processors in combination or individually. For example, if the processor of the front-end device 10 executes step a and step B, it should be understood that step a and step B may also be executed by two different processors together or executed in one processor separately. For example, a first processor performs step a and a second processor performs step B, or the first processor and the second processor perform steps a and B together.
The embodiment also provides a computer-readable storage medium, on which a computer program is stored, and the computer program is executed by the processor 102 to implement the data reading method disclosed in the above embodiment.
In summary, embodiments of the present invention provide a data reading method, an apparatus, a front-end device, and a storage medium, where the method includes: firstly, a data reading request is generated according to the data reading operation of a user on the data reading page. And then, sending the data reading request 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. And finally, the WebSocket client sends the data to the data reading page for displaying. Therefore, the real-time performance of data reading by a user is improved.
The above description is only for the specific embodiment of the present invention, but the scope of the present invention is not limited thereto, and any changes or substitutions that can be easily conceived by those skilled in the art within the technical scope of the present invention are included in the scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the appended claims.

Claims (10)

1. The data reading method is characterized by being applied to front-end equipment, wherein the front-end equipment is communicated with ammeter equipment through a back-end server, a WebSocket client is deployed on the front-end equipment, and the front-end equipment comprises a data reading page; the method comprises the following steps:
generating a data reading request according to the data reading operation of background personnel on the data reading page;
sending the data reading request to the back-end server through a WebSocket client, so that the back-end server obtains data of the ammeter equipment and returns the data to the WebSocket client;
and the WebSocket client sends the data to the data reading page for displaying.
2. The method of claim 1, wherein the front-end device further comprises a plurality of function pages, the plurality of function pages comprising the data read page; the front-end equipment is also provided with a message bus, the message bus comprises at least one channel, and each channel is associated with a corresponding function page; the back-end server is provided with a WebSocket server;
the step of sending the data reading request to the back-end server through the WebSocket client comprises the following steps:
determining a first target channel corresponding to the data reading page in the at least one channel;
sending the data reading request to the WebSocket client through the first target channel;
and the WebSocket client sends the data reading request to the WebSocket server.
3. The method of claim 1, wherein the front-end device further comprises a statistics presentation page; the method further comprises the following steps:
and displaying the statistical data of the ammeter equipment through the statistical data display page, and refreshing in real time.
4. The method of claim 3, wherein the front-end device further comprises a plurality of function pages, the plurality of function pages comprising the statistics presentation page; the front-end equipment is also provided with a message bus, the message bus comprises at least one channel, and each channel is associated with a corresponding function page; the back-end server is provided with a WebSocket server;
the step of displaying the statistical data of the electric meter equipment through the statistical data display page and refreshing the statistical data in real time comprises the following steps:
the WebSocket client receives timing statistical data sent by the WebSocket server in real time, wherein the timing statistical data are obtained by counting the data sent by the back-end server in real time according to the electric meter equipment;
determining a second target channel corresponding to the statistical data display page from the at least one channel;
and sending the timing statistical data to the statistical data display page through the second target channel so as to enable the statistical data display page to display the timing statistical data and refresh the data.
5. The method of claim 1, wherein the meter devices are at least one, the data read request includes an identification of a target meter device selected from all the meter devices on the data read page for the back office personnel; the back-end server is provided with a WebSocket server side in a deployed mode;
the step of sending the data reading request to the back-end server through the WebSocket client comprises the following steps:
and sending the identification to the back-end server through a WebSocket client, so that the WebSocket server sends the data reading request to the target electric meter equipment according to the identification to obtain the data of the target electric meter equipment, and sends the data of the target electric meter equipment to the WebSocket client.
6. A data reading device is characterized by being applied to front-end equipment, wherein the front-end equipment is communicated with ammeter equipment through a back-end server, a WebSocket client is deployed on the front-end equipment, and the front-end equipment comprises a data reading page; the data reading apparatus includes:
the generating module is used for generating a data reading request according to the data reading operation of background personnel on the data reading page;
the sending module is used for sending the data reading request to the back-end server through a WebSocket client so that the back-end server can obtain data of the ammeter equipment and return the data to the WebSocket client;
and the display module is used for the WebSocket client to send the data to the data reading page for display.
7. The apparatus of claim 6, wherein the front-end device further comprises a plurality of function pages, the plurality of function pages comprising the data read page; the front-end equipment is also provided with a message bus, the message bus comprises at least one channel, and each channel is associated with a corresponding function page; the back-end server is provided with a WebSocket server;
the sending module is further configured to:
determining a first target channel corresponding to the data reading page in the at least one channel;
sending the data reading request to the WebSocket client through the first target channel;
and the WebSocket client sends the data reading request to the WebSocket server.
8. The apparatus of claim 6, wherein the front-end device further comprises a statistics presentation page; the data reading device also comprises a refreshing module;
and the refreshing module is used for displaying the statistical data of the electric meter equipment through the statistical data display page and refreshing in real time.
9. A head-end apparatus, characterized in that the head-end apparatus comprises:
one or more processors;
memory for storing one or more programs which, when executed by the one or more processors, cause the one or more processors to implement a data reading method as claimed in any one of claims 1-5.
10. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the data reading method according to any one of claims 1 to 5.
CN202210760296.1A 2022-06-29 2022-06-29 Data reading method and device, front-end equipment and storage medium Pending CN115119081A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210760296.1A CN115119081A (en) 2022-06-29 2022-06-29 Data reading method and device, front-end equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210760296.1A CN115119081A (en) 2022-06-29 2022-06-29 Data reading method and device, front-end equipment and storage medium

Publications (1)

Publication Number Publication Date
CN115119081A true CN115119081A (en) 2022-09-27

Family

ID=83331206

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210760296.1A Pending CN115119081A (en) 2022-06-29 2022-06-29 Data reading method and device, front-end equipment and storage medium

Country Status (1)

Country Link
CN (1) CN115119081A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116302212A (en) * 2023-05-25 2023-06-23 广州市千钧网络科技有限公司 Method, device, equipment and storage medium for refreshing application embedded HTML page

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116302212A (en) * 2023-05-25 2023-06-23 广州市千钧网络科技有限公司 Method, device, equipment and storage medium for refreshing application embedded HTML page

Similar Documents

Publication Publication Date Title
CN112311617A (en) Configured data monitoring and alarming method and system
CN107800554B (en) Data acquisition method, device and system
CN108733531B (en) GPU performance monitoring system based on cloud computing
CN109218054B (en) Terminal dynamic configuration, corresponding server implementation method, device and storage medium
CN105183299A (en) Human-computer interface service processing system and method
CN111858284A (en) Resource monitoring method and device for artificial intelligence server
CN115119081A (en) Data reading method and device, front-end equipment and storage medium
CN114675983A (en) Business data processing method and device, storage medium and electronic equipment
CN114979024A (en) Computing power network transaction method and device, computer readable medium and electronic equipment
CN105808329A (en) Distributed overtime task scheduling method and device
CN113590433B (en) Data management method, data management system, and computer-readable storage medium
US11064259B2 (en) Interaction data distribution control method, apparatus, electronic device, and storage medium
CN105471674A (en) Method and system for testing performance of server
CN112152874A (en) System and method for acquiring and analyzing application monitoring data in distributed system
CN112463604A (en) APP detection system based on electric power integration terminal
CN116545905A (en) Service health detection method and device, electronic equipment and storage medium
CN108134635B (en) Measurement control method and device based on multithreading
EP3751820A1 (en) Data acquisition method, service provider terminal, service user terminal, and network function entity
CN115757998A (en) Dynamic rendering method and device for power grid data
CN114356970A (en) Storage system resource caching method and device
CN115357179A (en) Display screen management method, display screen management device, electronic equipment and storage medium
CN114817334A (en) Real-time storage and query system for mass device data
CN113094131A (en) Prompt resource display method, device, terminal, server and storage medium
CN115410580A (en) Voice recognition method, device, equipment and medium for command scheduling system
CN114327738A (en) User interface refreshing method and device, electronic equipment and readable storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination