Real-time measuring point operation scheme of power and environment monitoring system
By using an operator that complies with the scheduled specifications in the dynamic ring monitoring system to replace the expression of the user input, and use the corresponding engine to perform the expression, solve the problem of complex and scalability in existing technologies, achieve efficient testing, and achieve efficient testing Point operation and simplified development process.
Patent Information
- Application Number
- CN202411925570.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-25
- Publication Date
- 2025-01-28
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The calculation processing of the dynamic ring monitoring system in the prior art is complex and difficult to trace, resulting in high development difficulty, poor scalability, low execution efficiency and difficult debugging.
Provide a real -time measuring point computing scheme of the dynamic ring monitoring system. By obtaining the expression of the user input, the operator in the original expression is replaced by an operational symbol that complies with the scheduled specifications to obtain the measurement point value and assigned. Finally, the corresponding engine is used to use the corresponding engine Express the expression to obtain calculation results.
Simplified the development process of computing, improved the measurement efficiency of the measurement point, reduced the difficulty of development and the length of the code, and improved the scalability and debugging efficiency of the system.
Smart Images

Figure CN119377160A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of dynamic environment monitoring, and in particular to a real-time measurement point calculation scheme for a dynamic environment monitoring system. Background Art
[0002] With the development of science and technology, the rapid expansion of the Internet and big data, the importance of data centers is also increasing. In data centers, dynamic environment monitoring systems are usually used to process the collected data from multiple measurement points to generate new measurement point values or determine the alarm status. For example, power can be calculated through the collected voltage and current data; or custom rules can be set to trigger an alarm when the current exceeds a certain threshold. This function based on real-time data analysis is crucial for the efficient operation and abnormality monitoring of data centers.
[0003] Therefore, a computing solution is needed that can process the measurement point data efficiently and easily. Summary of the invention
[0004] The embodiment of the present application provides a real-time measurement point calculation solution for a dynamic environment monitoring system to solve the defects of the prior art in that the calculation and processing are complex and difficult to trace.
[0005] To achieve the above objectives, the present application provides a real-time measurement point calculation solution for a dynamic environment monitoring system, including: Obtaining a first expression input by a user, wherein the expression includes at least one measurement point selected by the user and at least one first operator; Substituting the first operator in the first expression with the second operator that meets the first specification to obtain a second expression; Obtaining the measured point values of the measured points included in the second expression; Assigning the obtained measurement point values to the measurement points included in the second expression to obtain a third expression; Loading a first engine corresponding to the first specification, wherein the first engine is an engine for a server-side programming language for processing the third expression; The third expression is executed using the loaded first engine to obtain a first calculation result.
[0006] According to the real-time measurement point operation scheme of the dynamic environment monitoring system of the embodiment of the present application, after obtaining the first expression input by the user, the second operator that meets the predetermined specification is used to replace the first operator in the first expression to obtain the second expression, and then the measurement point values of the measurement points contained therein are obtained according to the second expression, and the measurement point values are used to assign values to the measurement points to obtain the third expression, and finally the third expression can be directly processed using the engine corresponding to the predetermined specification. Therefore, various operators and operation methods can be easily added during the development process, and there is no need for a complicated development process when facing the combination of logical operations and arithmetic operations, and fast measurement point value calculation can be achieved, which not only simplifies the operation development process, but also greatly improves the efficiency of measurement point operations.
[0007] The above description is only an overview of the technical solution of the present application. In order to more clearly understand the technical means of the present application, it can be implemented in accordance with the contents of the specification. In order to make the above and other purposes, features and advantages of the present application more obvious and easy to understand, the specific implementation methods of the present application are listed below. BRIEF DESCRIPTION OF THE DRAWINGS
[0008] Various other advantages and benefits will become apparent to those of ordinary skill in the art by reading the detailed description of the preferred embodiments below. The accompanying drawings are only for the purpose of illustrating the preferred embodiments and are not to be considered as limiting the present application. Also, the same reference symbols are used throughout the accompanying drawings to represent the same components. In the accompanying drawings: Figure 1 It is a flow chart showing an embodiment of a real-time measurement point calculation method of a dynamic environment monitoring system provided by the present application. DETAILED DESCRIPTION
[0009] The exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although the exemplary embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be limited by the embodiments set forth herein. On the contrary, these embodiments are provided to enable a more thorough understanding of the present disclosure and to fully convey the scope of the present disclosure to those skilled in the art.
[0010] In data centers, a dynamic environment monitoring system is usually used to process the collected data from multiple measurement points to generate new measurement point values or determine the alarm status. For example, the power can be calculated through the collected voltage and current data; or a custom rule can be set to trigger an alarm when the current exceeds a certain threshold. This function based on real-time data analysis is crucial for the efficient operation and abnormality monitoring of data centers.
[0011] In the prior art, a custom calculator panel is usually designed for such requirements. Users can select the required measurement points and operators on the panel, and combine these options into an expression string and submit it to the server. After receiving the string, the server will parse the measurement points and replace them with the current real-time data values. Subsequently, the calculation is performed according to the operator type specified in the expression, and finally the calculation result or alarm status is generated. However, such a processing method requires pre-definition of the processing of the operators in the string, and also requires pre-definition of the logical relationship and calculation order between the operators, which leads to high development difficulty, complex code, and low calculation execution efficiency.
[0012] For example, in the prior art, when parsing and calculating string expressions, it is usually necessary to follow certain calculation rules. First, the operators with higher priority are calculated, and the calculation results are used to replace the operands and operators involved in the calculation in the original expression. For example, when calculating the expression "1+2×3+4", you need to first find the multiplication sign "×", multiply the operands on both sides of it to get "6", and then replace "2×3" with "6" to get the new expression "1+6+4". And so on, operators with higher priority such as brackets will be gradually eliminated until all calculations are completed in order and the final result is obtained.
[0013] Specifically, when implementing the above calculation process in the prior art, it is usually divided into the following steps: 1. Define operators and their corresponding operation logic; 2. Set priorities and sort operators; 3. Calculate level by level according to the priority of the operator; 4. Combine the lowest priority operator with the result of the previous step to complete the final operation.
[0014] However, the above solutions in the prior art can realize the parsing and calculation of expressions, but from the perspective of the complete calculation process, the following problems still exist: 1. High coupling and poor scalability When processing expressions, each step is closely related and highly coupled, resulting in poor scalability. If a new operator needs to be added, it is necessary to start from the first step of definition and gradually modify each step to adapt to the new operator. This method is not only time-consuming, but also prone to introducing new problems.
[0015] 2. Complex logic and difficult development The existing technology has complex parsing and calculation logic for expressions. Therefore, when developing processing logic, developers need to fully consider the characteristics of each operator and the priority processing between operators of the same level. In addition, developers also need to deal with the difference between left and right parentheses, multi-level nested parentheses, and the coexistence of logical operators and arithmetic operators. These factors significantly increase the difficulty of development and are also prone to lengthy and error-prone code.
[0016] 3. Difficult debugging and unintuitive problem location When an error occurs, there is little reference information, making it difficult to intuitively determine where the problem lies. Usually, only the final calculation result can be used to determine whether the expression parsing is correct, but it is unclear at which step the error occurred. Developers often need to debug step by step, tracking and observing layer by layer, which results in low debugging efficiency.
[0017] 4. The code is lengthy and the execution efficiency is low Due to the complex logic and huge amount of code, the efficiency of operation execution will inevitably decrease. This bloated code structure not only affects performance, but also increases maintenance costs.
[0018] Therefore, although the above solutions in the prior art can meet basic requirements, they have significant deficiencies in scalability, maintainability and execution efficiency, and urgently need to be optimized to improve overall performance and development efficiency.
[0019] In this regard, the present application proposes a real-time measurement point calculation method for a dynamic environment monitoring system. Figure 1 As shown in , the real-time measurement point calculation method of the dynamic environment monitoring system according to the embodiment of the present application may include: S101, obtaining a first expression input by a user.
[0020] In step S101, the first expression input by the user can be obtained. In the embodiment of the present application, the expression input by the user can be obtained through various ways. For example, the expression sent by the user through the network can be obtained, or the calculator panel can be displayed on the display panel of the terminal used by the user to provide the user with the operation functions of measuring point selection, numerical input, arithmetic operators and logical operators. Therefore, the user can use the calculator panel to select the measuring points on the panel and the arithmetic operators and logical operators between the measuring point data to mark the expression he wants, and after the user completes editing the expression, the edited expression can be sent to the server side by pressing the confirmation button. Therefore, in step S101, the server side can obtain the first expression input by the user, and the expression can include at least one measuring point and at least one first operator selected by the user through, for example, the above-mentioned calculator panel. In the embodiment of the present application, such an operator can include at least one of an arithmetic operator and a logical operator.
[0021] In addition, in an embodiment of the present application, the button corresponding to the operator in the calculator panel can be encapsulated as a piece of code, for example, a code that complies with the JavaScript specification, so that when the user operates the displayed calculator panel, by clicking the button corresponding to the operator, the code that complies with the predetermined specification is directly included in the edited expression. Therefore, in this way, when a new operator needs to be added, a button encapsulated as code can be directly added to the calculator panel, which greatly simplifies the development process.
[0022] S102, using a second operator that complies with the first specification to replace the first operator in the first expression to obtain a second expression.
[0023] In step S102, the operator in the first expression obtained in step S101 can be replaced with a second operator that complies with a predetermined specification. For example, in an embodiment of the present application, an operator that complies with the JavaScript specification can be used to replace the operator in the first expression obtained in step S101, thereby ensuring that the obtained second expression can be correctly recognized by the JavaScript language. After obtaining the second expression, it can be sent to the server, or step S102 can also be executed by the server after receiving the first expression sent by the user.
[0024] S103, obtaining the measurement point values of the measurement points included in the second expression.
[0025] In step S103, after receiving the second expression, the server can obtain the real-time measurement point value for the measurement point included in the second expression. In the embodiment of the present application, the server can directly request the corresponding measurement point value from the measurement point through the communication line in a wired or wireless manner, or the server can also send an acquisition request to the control module, and the acquisition request can include the measurement point information of the measurement point included in the second expression, so that the control module can first obtain the real-time value from the corresponding measurement point according to the measurement point information and send it to the server.
[0026] S104, assigning the obtained measurement point values to the measurement points included in the second expression to obtain a third expression.
[0027] In step S104, the server can assign values to the measuring points in the second expression obtained in step S102 according to the real-time values of the measuring points obtained in step S103. For example, the measuring points in the second expression can be replaced with corresponding real-time values to obtain a third expression.
[0028] S105: Load a first engine corresponding to the first specification.
[0029] In step S105, the server side may load the corresponding engine according to the specification based on which the first operator is replaced in step S102. For example, in an embodiment of the present application, the first engine recorded in step S105 may be an engine for a server-side programming language for processing the third expression. When the first specification is a JavaScript specification, a JavaScript engine may be loaded as the first engine in step S105.
[0030] S106: Use the loaded first engine to execute the third expression to obtain a first calculation result.
[0031] In step S106, the first engine loaded in step S105 can be used to execute the third expression obtained in step S104, so as to perform arithmetic operations and logical operations on the real-time numerical values of each measuring point specified by the user in step S101 to obtain a first calculation result. In the embodiment of the present application, the third expression obtained in step S104 can be first parsed using the first engine recorded in step S105 to obtain an analytical expression, and then the analytical expression is executed to obtain the first calculation result for the real-time measuring point value.
[0032] Therefore, according to the real-time measurement point calculation method of the dynamic environment monitoring system of the embodiment of the present application, after obtaining the first expression input by the user, the second operator that meets the predetermined specification is used to replace the first operator in the first expression to obtain the second expression, and then the measurement point values of the measurement points contained therein are obtained according to the second expression, and the measurement point values are used to assign values to the measurement points to obtain the third expression, and finally the third expression can be directly processed using the engine corresponding to the predetermined specification. Therefore, various operators and operation methods can be easily added during the development process, and there is no need for a complicated development process when facing the combination of logical operations and arithmetic operations, and fast measurement point value calculation can be achieved, which not only simplifies the operation development process, but also greatly improves the efficiency of measurement point operations.
[0033] Those skilled in the art can understand that all or part of the steps of implementing the above-mentioned method embodiments can be completed by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When the program is executed, the steps of the above-mentioned method embodiments are executed; and the aforementioned storage medium includes: ROM, RAM, disk or optical disk and other media that can store program codes.
[0034] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some or all of the technical features therein with equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.
Claims
1. A real-time measurement point calculation scheme for a dynamic environment monitoring system, characterized in that: include: Obtaining a first expression input by a user, wherein the expression includes at least one measurement point selected by the user and at least one first operator; Substituting the first operator in the first expression with the second operator that meets the first specification to obtain a second expression; Obtaining the measured point values of the measured points included in the second expression; Assigning the obtained measurement point values to the measurement points included in the second expression to obtain a third expression; Loading a first engine corresponding to the first specification, wherein the first engine is an engine for a server-side programming language for processing the third expression; The third expression is executed using the loaded first engine to obtain a first calculation result.
2. The real-time measurement point calculation scheme of the dynamic environment monitoring system according to claim 1 is characterized in that: The first specification is a JavaScript specification, and the first engine is a JavaScript engine.
3. The real-time measurement point calculation scheme of the dynamic environment monitoring system according to claim 2 is characterized in that: Before obtaining the first expression input by the user, the solution further includes: Displays the calculator panel, which is used to provide users with measurement point selection, value input, arithmetic operators and logical operators.
4. The real-time measurement point calculation scheme of the dynamic environment monitoring system according to claim 3 is characterized in that: The using the loaded first engine to execute the third expression to obtain a first calculation result comprises: Parsing the third expression using the first engine to obtain an analytical expression; The analytical expression is executed to obtain the first calculation result.
5. The real-time measurement point calculation scheme of the dynamic environment monitoring system according to claim 3 is characterized in that: The calculator panel includes at least one operator button, and the operator button is encapsulated as a code segment corresponding to the first specification.
Citation Information
Patent Citations
Method and apparatus for editing data containers and network containing thereof
CA2703092A1
Method for establishing programmable logic operation model of coal mine monitoring system
CN110765324A
Analysis method and device for function expression in compiled language environment, storage medium and terminal
CN111752566A
System alarm monitoring method, device and equipment and readable storage medium
CN114500251A
Risk business determination method and device, storage medium and electronic equipment
CN117611343A