Search

CN-115809391-B - Method, device, processor and computer readable storage medium for realizing real-time display of multiple frequency spectrum traces and frequency labels based on Web

CN115809391BCN 115809391 BCN115809391 BCN 115809391BCN-115809391-B

Abstract

The invention relates to a method for realizing real-time display of a plurality of frequency spectrum traces and frequency labels based on Web, which comprises the following steps that the Web page calculates the maximum drawing point number, a center server analyzes a Restful data acquisition request and generates a device control instruction; the central server analyzes, counts, extracts, packages and sends the frequency spectrum data, the Web page analyzes the frequency spectrum data, calculates the frequency standard and draws the track and the frequency standard, the Web page sets a stop mark, and the central server stops issuing the equipment stopping instruction. The invention also relates to a device, a processor and a storage medium thereof for realizing the real-time display of a plurality of frequency spectrum traces and frequency labels based on Web. The method, the device, the processor and the computer readable storage medium thereof for realizing the real-time display of the plurality of spectrum traces and the frequency standard based on the Web are adopted, the real-time dynamic update display of the plurality of spectrum traces and the frequency standard is realized on the browser without depending on the installation of a client and a plug-in, the stable operation can be realized for a long time, and the data sharing check of multiple users based on the Internet is supported.

Inventors

  • LI JI

Assignees

  • 创远信科(上海)技术股份有限公司

Dates

Publication Date
20260508
Application Date
20221228

Claims (11)

  1. 1. A method for realizing real-time display of a plurality of spectrum traces and frequency marks based on Web, which is characterized by comprising the following steps: (1) Collecting spectrum data, calculating the maximum drawing point number by a Web page, issuing a channel id through a Websocket channel, analyzing a Restful data collection request by a central server, and generating an equipment control instruction; (2) The central server analyzes, counts, extracts, packages and sends the frequency spectrum data, the Web page analyzes the frequency spectrum data, calculates a frequency standard and draws a track and the frequency standard; (3) The central server stops sending data to the WebSocket and extracting current batch processing data, and issues a command of stopping equipment; The step (2) specifically comprises the following steps: (2.1) the central server receives the spectrum data stream; (2.2) the center server analyzes the spectrum data, splices and unifies the spectrum data collected in a segmented way, (2.3) The center server counts the frequency spectrum data according to the data type set in the Web page data definition; (2.4) the central server intercepts spectrum data from the statistical spectrum object and the unified real-time spectrum object according to the drawing frequency range, and compresses the data according to the maximum drawing points; (2.5) the central server encapsulates the single data type and then sequentially transmits the encapsulated single data type; (2.6) the central server establishes a sending thread according to the data type, sends spectrum data to the Web page, and simultaneously carries out frame rate control on the data; (2.7) the center server receives the received frame rate returned by the Web page through the WebSocket, evaluates the network quality, and determines the sending frame rate according to the network quality evaluation result; (2.8) the Web page receives the flow control data, verifies according to the batch token, records the corresponding receiving time stamp, counts the receiving frame rate, and sends the receiving frame rate to the center server through the WebSocket; (2.9) analyzing the frequency spectrum data by the Web page; (2.10) judging the validity of the data; (2.11) converting the spectral data into data of a unit selected by a user; (2.12) calculating x-pixel coordinates and y-pixel coordinates of the drawn trace; (2.13) setting colors according to the data types or the trace numbers, and drawing traces; (2.14) drawing frequency scale.
  2. 2. The method for displaying a plurality of spectrum traces and frequency labels in real time based on Web implementation of claim 1, wherein the step (1) specifically comprises the steps of: (1.1) acquiring a drawing area width from a Web page; (1.2) calculating the maximum drawing point number; (1.3) establishing a Websocket channel with a central server; (1.4) the central server transmits a channel id generated by the central service to the Web page through a Websocket channel; (1.5) the Web page generates a batch token and sends a Restful data acquisition request to a central server; (1.6) the center server analyzes the Restful data acquisition request into Web page data definition; And (1.7) the central server generates a device control instruction and issues the device control instruction.
  3. 3. The method for displaying a plurality of spectrum traces and frequency labels in real time based on Web implementation of claim 2, wherein the calculating the maximum drawing point in step (1.2) specifically comprises: the maximum drawing point number is calculated according to the following formula: wlimit =int (drawing area pixel width×2); points=round (k× (freqEnd-FREQSTART)/device spectrum resolution); LimitFrame=Min(wlimit,points); wherein wlimit is the maximum drawing point upper limit, points is the spectrum drawing point, LIMITFRAME is the maximum drawing point, k is the mobile network bandwidth coefficient, freqEnd is the drawing cut-off frequency, and FREQSTART is the drawing start frequency.
  4. 4. The Web-based method of real-time displaying a plurality of spectral traces and frequency labels according to claim 2, wherein said step (1) further comprises the steps of: (1-1.1) the central server returns the task Id to the Web page; (1-1.2) Web page temporary storage task Id and Web page data definition; (1-1.3) updating a data time stamp of the stored data when the Web page receives the data, and monitoring a change in the data time stamp; (1-1.4) if the data time stamp changes, triggering the drawing operation.
  5. 5. The method for displaying a plurality of spectrum traces and frequency labels in real time based on Web implementation of claim 1, wherein the step (2.2) specifically comprises: And obtaining an int frequency spectrum array with a fixed length corresponding to the task Id plus the equipment Id, and if the subsequent frequency spectrum data is received, updating the data segment corresponding to the subsequent frequency spectrum array.
  6. 6. The method for displaying a plurality of spectrum traces and frequency labels in real time based on Web implementation of claim 1, wherein the step (2.3) specifically comprises: (2.3.1) storing the two key value pairs into a HashMap set; (2.3.2) if the central server receives the data acquisition instruction and the data operation instruction issued by the Web page, counting the reference count of each data type code of the current task according to the Web page data definition stored by the central server; (2.3.3) stopping counting the type code when the reference count of the type code is 0.
  7. 7. The method for displaying a plurality of spectrum traces and frequency labels in real time based on Web implementation of claim 1, wherein said step (2.4) specifically comprises the steps of: (2.4.1) processing the intercepted data at the time of data compression; And (2.4.2) if the length of the intercepted data is less than or equal to the maximum drawing point number, skipping the compression process, otherwise, segmenting the intercepted data according to the maximum drawing point number, and projecting the data in the segment to obtain the compressed data.
  8. 8. The method for displaying a plurality of spectrum traces and frequency labels in real time based on Web implementation of claim 1, wherein the step (3) specifically comprises the steps of: (3.1) setting a stop mark on the Web page, and sending a command to inform a central server to perform resource release operation; And (3.2) closing a socket channel by the Web page, stopping drawing, clearing the cache and resetting the control variable, stopping sending data to the Websocket by the center server, removing the Websocket from the channel list, stopping extracting the current batch processing data, and issuing a stopping device instruction.
  9. 9. An apparatus for implementing Web-based real-time display of a plurality of spectral traces and frequency bins, said apparatus comprising: a processor configured to execute computer-executable instructions; A memory storing one or more computer-executable instructions which, when executed by the processor, perform the steps of the Web-based method of implementing the real-time display of a plurality of spectral traces and frequency labels of any one of claims 1 to 8.
  10. 10. A processor for implementing Web-based real-time display of a plurality of spectral traces and frequency bins, wherein the processor is configured to execute computer-executable instructions that, when executed by the processor, implement the steps of the Web-based method of implementing real-time display of a plurality of spectral traces and frequency bins of any of claims 1 to 8.
  11. 11. A computer readable storage medium having stored thereon a computer program executable by a processor to perform the steps of the Web-based method of any one of claims 1 to 8 for displaying a plurality of spectral traces and frequency bins in real time.

Description

Method, device, processor and computer readable storage medium for realizing real-time display of multiple frequency spectrum traces and frequency labels based on Web Technical Field The invention relates to the field of radio monitoring and analysis, in particular to the field of spectrum drawing, and specifically relates to a method, a device, a processor and a computer readable storage medium for realizing real-time display of a plurality of spectrum traces and frequency scales based on Web. Background Since the web page is running in a browser, in single threaded mode, conventional C, java-based multithreading is not suitable for this scenario. Conventional spectrum monitoring is a BS mode where the CS application mode is not suitable for a browser, for example, client software does not need to be installed on a machine where the browser is located, a plug-in does not need to be installed, and the system runs directly in the browser, etc. The resources of the browser are limited, and the use of the CPU and the memory is more limited, for example, the web page is easy to crash after the web page memory exceeds 200 MB. In practical application, 4 traces and 8 frequency marks need to be drawn. The trace needs to support different statistical types, such as maximum, minimum, average and real-time, the statistical types of the trace can be dynamically switched, and meanwhile, partial trace can be kept static when part of the trace is refreshed, and trace data is not updated. Disclosure of Invention The invention aims to overcome the defects of the prior art and provides a method, a device, a processor and a computer readable storage medium thereof for realizing real-time display of a plurality of frequency spectrum traces and frequency labels based on Web, which have high observation precision, real-time updating and wide application range. To achieve the above object, a method, an apparatus, a processor and a computer readable storage medium thereof for displaying a plurality of spectrum traces and frequency labels in real time based on Web implementation of the present invention are as follows: The method for displaying a plurality of frequency spectrum traces and frequency labels in real time based on Web is mainly characterized by comprising the following steps: (1) Collecting spectrum data, calculating the maximum drawing point number by a Web page, issuing a channel id through a Websocket channel, analyzing a Restful data collection request by a central server, and generating an equipment control instruction; (2) The central server analyzes, counts, extracts, packages and sends the frequency spectrum data, the Web page analyzes the frequency spectrum data, calculates a frequency standard and draws a track and the frequency standard; (3) And the central server stops sending data to the WebSocket, extracting current batch processing data and issuing a device stopping instruction. Preferably, the step (1) specifically includes the following steps: (1.1) acquiring a drawing area width from a Web page; (1.2) calculating the maximum drawing point number; (1.3) establishing a Websocket channel with a central server; (1.4) the central server transmits a channel id generated by the central service to the Web page through a Websocket channel; (1.5) the Web page generates a batch token and sends a Restful data acquisition request to a central server; (1.6) the center server analyzes the Restful data acquisition request into Web page data definition; And (1.7) the central server generates a device control instruction and issues the device control instruction. Preferably, in the step (1.2), the maximum drawing point number is calculated, specifically: the maximum drawing point number is calculated according to the following formula: wlimit =int (drawing area pixel width×2); points=round (k× (freqEnd-FREQSTART)/device spectrum resolution); LimitFrame=Min(wlimit,points); wherein wlimit is the maximum drawing point upper limit, points is the spectrum drawing point, LIMITFRAME is the maximum drawing point, k is the mobile network bandwidth coefficient, freqEnd is the drawing cut-off frequency, and FREQSTART is the drawing start frequency. Preferably, the step (1) further comprises the steps of: (1-1.1) the central server returns the task Id to the Web page; (1-1.2) Web page temporary storage task Id and Web page data definition; (1-1.3) updating a data time stamp of the stored data when the Web page receives the data, and monitoring a change in the data time stamp; (1-1.4) if the data time stamp changes, triggering the drawing operation. Preferably, the step (2) specifically includes the following steps: (2.1) the central server receives the spectrum data stream; (2.2) the center server analyzes the spectrum data, splices and unifies the spectrum data collected in a segmented way, (2.3) The center server counts the frequency spectrum data according to the data type set in the Web page data definition; (2.4) the central