Energy storage remote signaling deflection processing method and device
By receiving and comparing energy-storage remote signal data, and using MurmurHash3 and dual-pointer algorithm to determine data changes, the problem of low remote signal deformation analysis performance in the prior art is solved, and faster fault warning and diagnosis is achieved.
Patent Information
- Application Number
- CN202510338968.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-20
- Publication Date
- 2025-04-25
AI Technical Summary
In the case of large number of energy storage remote signal equipment access and frequent variation ratios, the existing technology analyzes that the remote signal is low in displacement performance, resulting in slow fault warning and diagnosis speed, and may even cause memory insufficient abnormality caused by excessive memory load on the MQTT server.
By receiving the energy storage remote signal data sent by the message proxy server, and obtaining the latest energy storage remote signal data from the database, using the MurmurHash3 algorithm for fine-grained comparison. If the data does not change, the data will continue to be received. If the data changes, the new data will be cached to the database. If the preliminary comparison results are not equal, a fine-grained comparison is further used to determine the data changes.
Improve the performance of analyzing remote signal displacement, and can perform fault warning and diagnosis faster, avoiding message accumulation and insufficient memory problems.
Smart Images

Figure CN119883712A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the field of energy storage remote signaling, and in particular to a method and device for processing energy storage remote signaling displacement. Background Art
[0002] The original point data of energy storage telemetering is received from the Message Queuing Telemetry Transport (MQTT) broker. If the number of energy storage telemetering devices connected is large and the transformation ratio is frequent, once the consumer performance cannot keep up with the production speed, message accumulation and consumption delay will occur, affecting the speed of fault warning and diagnosis, and problems cannot be discovered in time; more seriously, it may even cause the MQTT server to have excessive memory load, resulting in an Out Of Memory (OOM) exception.
[0003] Therefore, the current performance of analyzing remote signal changes is low, resulting in slow fault warning and diagnosis. Summary of the invention
[0004] In view of this, an embodiment of the present invention provides a method and device for processing energy storage remote signal displacement, which can improve the performance of analyzing remote signal displacement, thereby enabling faster fault warning and diagnosis.
[0005] In a first aspect, an embodiment of the present invention provides a method for processing energy storage remote signal displacement, the method comprising: Receiving first energy storage remote signaling data sent by a message proxy server, wherein the first energy storage remote signaling data includes data for indicating an operating state and alarm information of an energy storage device; Acquire second energy storage remote signaling data from a database, where the second energy storage remote signaling data is the latest energy storage remote signaling data in the database; A first comparison result is obtained by performing a fine-grained comparison on the first energy storage remote signaling data and the second energy storage remote signaling data using a MurmurHash3 algorithm; The first comparison result is equal, and it is determined that the remote signal point has not changed; or If the first comparison result is unequal, a fine-grained comparison is performed on the first energy storage remote signaling data and the second energy storage remote signaling data by using a double pointer algorithm to determine whether the remote signaling point has changed; Determining that the remote signaling point has not changed, continuing to perform the step of receiving the first energy storage remote signaling data sent by the message proxy server; or It is determined that the remote signal point has changed, and the first energy storage remote signal data is cached in the database.
[0006] Optionally, the performing fine-grained comparison on the first energy storage remote signaling data and the second energy storage remote signaling data by using the MurmurHash3 algorithm to obtain a first comparison result includes: Extracting the hash of the first energy storage remote signaling data to obtain a first hash; Using the MurmurHash3 algorithm to calculate the hash of the second energy storage remote signaling data to obtain a second hash; Determine whether the values of the first Hash and the second Hash are equal; If it is determined that the values of the first Hash and the second Hash are not equal, determining that the first comparison result is not equal; or If it is determined that the values of the first Hash and the second Hash are equal, it is determined that the first comparison result is equal.
[0007] Optionally, the determining whether the telesignaling point has changed by performing a fine-grained comparison on the first energy storage telesignaling data and the second energy storage telesignaling data using a double pointer algorithm includes: Point the first pointer to the first key in the first energy storage remote signaling data, and point the second pointer to the first key in the second energy storage remote signaling data; Compare whether a first key currently pointed to by the first pointer and a second key currently pointed to by the second pointer are equal; If the first key and the second key are equal, move the first pointer from the first key to the first value corresponding to the first key, and move the second pointer from the second key to the second value corresponding to the second key; comparing whether the first value and the second value are equal; If the first value is equal to the second value, the first pointer is moved back to the next key of the first key, and the second pointer is moved back to the next key of the second key; Determine whether the first pointer encounters the first character during the current backward movement; If it is determined that the first pointer encounters the first character during the current backward movement process, determining whether the point change record is empty; If it is determined that the point change record is empty, it is determined that the remote signal point has not changed; or if it is determined that the point change record is not empty, it is determined that the remote signal point has changed.
[0008] Optionally, it also includes: If the first value and the second value are not equal, record the key-value pair currently pointed to by the first pointer as the change point; The first pointer is moved back to a key next to the first key, and the second pointer is moved back to a key next to the second key.
[0009] Optionally, it also includes: If it is determined that the first pointer does not encounter the first character in the current backward movement process, determining whether the second pointer encounters the first character in the current backward movement process; If it is determined that the second pointer encounters the first character during the current backward movement process, the key-value pair currently pointed to by the first pointer and the subsequent key-value pairs are recorded as the change point; Determine whether the point change record is empty.
[0010] Optionally, it also includes: If it is determined that the second pointer does not encounter the first character during the current backward movement process, a comparison is made as to whether the first key currently pointed to by the first pointer and the second key currently pointed to by the second pointer are equal.
[0011] Optionally, it also includes: If the first key and the second key are not equal, determining whether the first key is greater than the second key; If it is determined that the first key is larger than the second key, the second pointer is moved back to the key next to the second key; It is determined whether the second pointer encounters the first character during the current backward movement.
[0012] Optionally, it also includes: If it is determined that the first key is smaller than the second key, the key-value pair currently pointed to by the first pointer is recorded as the change point; The first pointer is moved back to a key next to the first key, and the second pointer is moved back to a key next to the second key.
[0013] Optionally, it is determined that the remote signal point has changed, and the first energy storage remote signal data is sent to a Kafka cluster.
[0014] On the other hand, an embodiment of the present invention provides an energy storage remote signal displacement processing device, the device comprising: A transceiver module is used to receive first energy storage remote signaling data sent by a message proxy server, wherein the first energy storage remote signaling data includes data used to represent the operating status and alarm information of the energy storage device; and obtain second energy storage remote signaling data from a database, wherein the second energy storage remote signaling data is the latest energy storage remote signaling data in the database; A processing module is used to perform a fine-grained comparison on the first energy storage telesignaling data and the second energy storage telesignaling data by using the MurmurHash3 algorithm to obtain a first comparison result; if the first comparison result is equal, it is determined that the telesignaling point has not changed; or if the first comparison result is unequal, a double pointer algorithm is used to perform a fine-grained comparison on the first energy storage telesignaling data and the second energy storage telesignaling data to determine whether the telesignaling point has changed; if it is determined that the telesignaling point has not changed, continue to execute the step of receiving the first energy storage telesignaling data sent by the message proxy server; or if it is determined that the telesignaling point has changed, the transceiver module is also used to cache the first energy storage telesignaling data to the database.
[0015] On the other hand, an embodiment of the present invention provides a storage medium, wherein the storage medium includes a stored program, wherein when the program is executed, the device where the storage medium is located is controlled to execute the above method.
[0016] On the other hand, an embodiment of the present invention provides a computer device, including a memory and a processor, wherein the memory is used to store information including program instructions, and the processor is used to control the execution of the program instructions, wherein the program instructions implement the steps of the above method when loaded and executed by the processor.
[0017] In the technical solution of the energy storage telesignal position change processing method and device provided by the embodiment of the present invention, the method includes: receiving the first energy storage telesignal data sent by the message proxy server, the first energy storage telesignal data includes data for indicating the operating status and alarm information of the energy storage device; obtaining the second energy storage telesignal data from the database, the second energy storage telesignal data is the latest energy storage telesignal data in the database; using the MurmurHash3 algorithm to perform a fine-grained comparison between the first energy storage telesignal data and the second energy storage telesignal data to obtain a first comparison result; the first comparison result is equal, and it is determined that the telesignal point has not changed; or the first comparison result is not equal, and the first energy storage telesignal data and the second energy storage telesignal data are fine-grained compared by using the double pointer algorithm to determine whether the telesignal point has changed; it is determined that the telesignal point has not changed, and the step of receiving the first energy storage telesignal data sent by the message proxy server is continued; or it is determined that the telesignal point has changed, and the first energy storage telesignal data is cached to the database. It can improve the performance of parsing telesignal position change, so that fault warning and diagnosis can be faster. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] Figure 1 A flow chart of a method for processing energy storage remote signal position change provided by an embodiment of the present invention; Figure 2 It is a system framework diagram of the energy storage remote signal position change processing solution in an embodiment of the present invention; Figure 3A flowchart of obtaining a first comparison result by performing a fine-grained comparison on first energy storage remote signaling data and second energy storage remote signaling data using the MurmurHash3 algorithm provided in an embodiment of the present invention; Figure 4 A flowchart for determining whether a telesignaling point has changed by performing a fine-grained comparison of first energy storage telesignaling data and second energy storage telesignaling data using a double pointer algorithm provided in an embodiment of the present invention; Figure 5 is a schematic diagram of the double pointers moving backward when the first key and the second key are equal in an embodiment of the present invention; Figure 6 is a schematic diagram of the double pointer moving backward when the first value and the second value are not equal in an embodiment of the present invention; Figure 7 is a schematic diagram of the second pointer moving backward when the first key is larger than the second key in an embodiment of the present invention; Figure 8 is a schematic diagram of the double pointers moving backward when the first key is smaller than the second key in an embodiment of the present invention; Fig. 9 is a schematic diagram of the second pointer encountering the first character during the current backward movement process in an embodiment of the present invention; Fig.10 A schematic diagram of the structure of an energy storage remote signal position change processing device provided by an embodiment of the present invention; Fig.11 A schematic diagram of a computer device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0019] In order to better understand the technical solution of the present invention, the embodiments of the present invention are described in detail below with reference to the accompanying drawings.
[0020] It should be clear that the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0021] The terms used in the embodiments of the present invention are only for the purpose of describing specific embodiments, and are not intended to limit the present invention. The singular forms "a", "said" and "the" used in the embodiments of the present invention and the appended claims are also intended to include plural forms, unless the context clearly indicates other meanings.
[0022] It should be understood that the term "and / or" used in this article is only a description of the association relationship of associated objects, indicating that there can be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in this article generally indicates that the associated objects before and after are in an "or" relationship.
[0023] Figure 1 A flow chart of a method for processing energy storage remote signal position change provided by an embodiment of the present invention is shown in FIG. Figure 1 As shown, the method includes: step 101-step 107.
[0024] Step 101: Receive first energy storage remote signaling data sent by a message proxy server, where the first energy storage remote signaling data includes data for indicating the operating status and alarm information of an energy storage device.
[0025] In the embodiment of the present invention, each step may be executed by a server.
[0026] Among them, the message broker server is MQTT Broker.
[0027] For example, Figure 2 : is a system framework diagram of the energy storage remote signal position change processing solution in an embodiment of the present invention, such as Figure 2 As shown, the server is connected to the MQTT Broker to receive the first energy storage remote signaling data sent by the MQTT Broker, and marks the first energy storage remote signaling data as A.Yx.
[0028] The key-value pair in energy storage telesignaling data is a data structure used to represent the status information of the energy storage system, usually consisting of a key and a value.
[0029] Key: Indicates the type or attribute of energy storage telesignaling data, such as "switch status", "energy storage status", "fault type", "alarm level", etc.
[0030] Value: Indicates the specific state or value of the corresponding key, such as "Closed", "Opened", "Charging", "Discharging", "Idle", "Overtemperature", "Overvoltage", "Undervoltage", "Serious", "Warning", "Prompt", etc.
[0031] Step 102: Acquire second energy storage remote signaling data from a database. The second energy storage remote signaling data is the latest energy storage remote signaling data in the database.
[0032] The database is a Redis cluster. Figure 2 As shown, the server is connected to the Redis cluster to obtain the second energy storage remote signaling data, and marks the second energy storage remote signaling data as B.Yx.
[0033] Step 103 , performing a fine-grained comparison on the first energy storage remote signaling data and the second energy storage remote signaling data by using the MurmurHash3 algorithm to obtain a first comparison result, and executing step 104 or step 105 .
[0034] like Figure 2As shown, the server includes a telemetering data comparator, and the telemetering data comparator includes a MurmurHash comparator and a double pointer comparison algorithm. Among them, the MurmurHash comparator is used for coarse-grained comparison; the double pointer comparison algorithm is used for fine-grained comparison.
[0035] In the embodiment of the present invention, the server first uses the MurmurHash3 algorithm to perform a fine-grained comparison on the first energy storage remote signaling data and the second energy storage remote signaling data to obtain a first comparison result.
[0036] In some possible embodiments, Figure 3 As shown, step 103 specifically includes: step 103a-step 103e.
[0037] Step 103a: extract the hash of the first energy storage remote signaling data to obtain a first hash.
[0038] In the embodiment of the present invention, the server extracts the hash of the first energy storage remote signaling data to obtain a first hash, which is marked as A.Yx.Hash.
[0039] Step 103b: Use the MurmurHash3 algorithm to calculate the hash of the second energy storage remote signaling data to obtain a second hash.
[0040] In the embodiment of the present invention, the server uses the MurmurHash3 algorithm to calculate the hash of the second energy storage remote signaling data to obtain a second hash, which is marked as B.Yx.Hash.
[0041] Step 103c: determine whether the values of the first hash and the second hash are equal. If so, execute step 103d; if not, execute step 103e.
[0042] Step 103d: Determine that the first comparison result is equal, and proceed to step 104.
[0043] Step 103e: determine that the first comparison result is unequal, and proceed to step 105.
[0044] Step 104: The first comparison result is equal, and it is determined that the remote signal point has not changed, and step 101 is continued.
[0045] In the embodiment of the present invention, if the values of the first hash and the second hash are equal, it is determined that the remote signal point has not changed, and there is no need to perform fine-grained comparison, and step 101 is continued.
[0046] Step 105 , if the first comparison result is unequal, a double pointer algorithm is used to perform a fine-grained comparison on the first energy storage telesignaling data and the second energy storage telesignaling data to determine whether the telesignaling point has changed, and step 106 or step 107 is executed.
[0047] In the embodiment of the present invention, if the values of the first hash and the second hash are not equal, a double pointer algorithm is used to perform a fine-grained comparison on the first energy storage telesignaling data and the second energy storage telesignaling data to determine whether the telesignaling point has changed.
[0048] In some possible embodiments, Figure 4 As shown, step 105 specifically includes: step 105a-step 105m.
[0049] Step 105a: point the first pointer to the first key in the first energy storage remote signaling data, and point the second pointer to the first key in the second energy storage remote signaling data.
[0050] In the embodiment of the present invention, the double pointer in the double pointer algorithm includes a first pointer and a second pointer. First, the first pointer points to the first key in the first energy storage remote signaling data, and the second pointer points to the first key in the second energy storage remote signaling data.
[0051] Step 105b, compare whether the first key currently pointed to by the first pointer and the second key currently pointed to by the second pointer are equal, if so, execute step 105c; if not, execute step 105g.
[0052] Step 105c: Move the first pointer from the first key to the first value corresponding to the first key, and move the second pointer from the second key to the second value corresponding to the second key.
[0053] In the embodiment of the present invention, if the first key and the second key are equal, the double pointers are moved backward to point to the first value corresponding to the first key and the second value corresponding to the second key respectively.
[0054] Step 105d, compare whether the first value and the second value are equal, if so, execute step 105f; if not, execute step 105e.
[0055] In the embodiment of the present invention, the first key and the second key are equal, and a comparison is continued to determine whether a first value corresponding to the first key and a second value corresponding to the second key are equal.
[0056] For example, Figure 5 Schematic diagram of the double pointer moving backward when the first key and the second key are equal in the embodiment of the present invention. Figure 5 As shown, the upper energy storage telemetering data is the first energy storage telemetering data, namely A.Yx; the lower energy storage telemetering data is the second energy storage telemetering data, namely B.Yx. First, the first pointer and the second pointer point to the first key of A.Yx and B.Yx respectively. Since the first keys of A.Yx and B.Yx are both "0", the first keys of A.Yx and B.Yx are equal. Move the first pointer back to the value "0" corresponding to the first key of A.Yx, and move the second pointer back to the value "1" corresponding to the first key of B.Yx.
[0057] Step 105e: record the key-value pair currently pointed to by the first pointer as the changed point.
[0058] In the embodiment of the present invention, if the first value and the second value are not equal, the key-value pair currently pointed to by the first pointer is recorded as the point of change.
[0059] Step 105f, move the first pointer back to the next key of the first key, move the second pointer back to the next key of the second key, and continue to execute step 105j.
[0060] In the embodiment of the present invention, if the first value and the second value are equal, the double pointer is further moved backward to the next key of the first key and the next key of the second key, so as to continue to compare the following keys. If the first value and the second value are not equal, after recording the key-value pair currently pointed to by the first pointer as the point of change, the double pointer is further moved backward to the next key of the first key and the next key of the second key, so as to continue to compare the following keys.
[0061] For example, Figure 6 FIG. 1 is a schematic diagram of the double pointer moving backward when the first value and the second value are not equal in an embodiment of the present invention. Figure 6 As shown in the figure, the upper energy storage telemetering data is the first energy storage telemetering data, i.e. A.Yx; the lower energy storage telemetering data is the second energy storage telemetering data, i.e. B.Yx. The first value currently pointed to by the first pointer is "0", and the second value pointed to by the second pointer is "1", so the first value and the second value are not equal. First, record the key-value pair ("0": "0") currently pointed to by the first pointer as the change point, and then move the first pointer back to the next key "1" of the first key, and move the second pointer back to the next key "1" of the second key.
[0062] Step 105g, determine whether the first key is greater than the second key, if so, execute step 105h; if not, execute step 105i.
[0063] In the embodiment of the present invention, when the first key and the second key are not equal, it is determined whether the first key is greater than the second key.
[0064] Step 105h, move the second pointer back to the next key of the second key, and continue to execute step 105k.
[0065] In the embodiment of the present invention, when the first key is greater than the second key, the second pointer is moved back to the next key of the second key, and step 105k is continued to be executed to continue the comparison.
[0066] For example, Figure 7 Schematic diagram of the second pointer moving backward when the first key is larger than the second key in an embodiment of the present invention. Figure 7As shown, the first key is "2", the second key is "1", the first key is greater than the second key, and the second pointer is moved back to the next key "2" of the second key.
[0067] Step 105i, record the key-value pair currently pointed to by the first pointer as the changed point, and continue to execute step 105f.
[0068] In the embodiment of the present invention, when the first key is smaller than the second key, the key-value pair currently pointed to by the first pointer is recorded as the point of change, and step 105f is continued to be executed to facilitate the comparison of the subsequent keys.
[0069] For example, Figure 8 Schematic diagram of the double pointer moving backward when the first key is smaller than the second key in the embodiment of the present invention. Figure 8 As shown, the first key is "1" and the second key is "2". The first key is smaller than the second key, and the first pointer continues to move back to the next key "2" of the first key. Since the key currently pointed to by the second pointer is the last key of the second energy storage remote signal data, after the second pointer is moved back to the next key of the second key, the second pointer points to the first character "}".
[0070] Step 105j, determine whether the first pointer encounters the first character during this backward movement process, if not, execute step 105k; if yes, execute step 105m.
[0071] In the embodiment of the present invention, after each backward movement of the first pointer, it is necessary to determine whether the first character "}" is encountered during the current backward movement. If the first character "}" is not encountered, it indicates that the key-value pair pointed to by the first pointer before the current backward movement is not the last key-value pair in the first energy storage telesignaling data, and the comparison can continue; if the first pointer encounters the first character "}" during the current backward movement, it indicates that the key-value pair pointed to by the first pointer before the current backward movement is the last key-value pair in the first energy storage telesignaling data, and no further comparison is required.
[0072] Step 105k, determine whether the second pointer encounters the first character during this backward movement process, if not, continue to execute step 105b; if yes, execute step 105l.
[0073] In the embodiment of the present invention, after each backward movement of the second pointer, it is necessary to determine whether the first character "}" is encountered during the current backward movement. If the first character "}" is not encountered, it indicates that the key-value pair pointed to by the second pointer before the current backward movement is not the last key-value pair in the second energy storage telesignaling data, and the comparison can continue; if the second pointer encounters the first character "}" during the current backward movement, it indicates that the key-value pair pointed to by the second pointer before the current backward movement is the last key-value pair in the second energy storage telesignaling data, and no further comparison is required.
[0074] Step 1051: record the key-value pair currently pointed to by the first pointer and the subsequent key-value pairs as the change points.
[0075] In the embodiment of the present invention, when the second pointer encounters the first character "}" during the current backward movement, the key-value pair currently pointed to by the first pointer and the subsequent key-value pairs are recorded as the change points.
[0076] For example, Fig. 9 FIG. 1 is a schematic diagram of the second pointer encountering the first character during the backward movement process in the embodiment of the present invention. Fig. 9 As shown, the second pointer encounters the first character "}" during this backward movement, indicating that the key-value pair pointed to by the second pointer before this backward movement is the last key-value pair in the second energy storage remote signaling data, and no further comparison is required. Since the first pointer does not encounter the first character "}" during the backward movement, indicating that the number of key-value pairs of the first energy storage remote signaling data is greater than the number of key-value pairs of the second energy storage remote signaling data, the key-value pair currently pointed to by the first pointer and the key-value pairs thereafter are recorded as the change points.
[0077] Step 105m, determine whether the point change record is empty, if so, execute step 106; if not, execute step 107.
[0078] In the embodiment of the present invention, after the fine-grained comparison is completed, it is determined whether the point change record is empty.
[0079] Step 106: Determine that the remote signal point has not changed, and continue to execute step 101.
[0080] In the embodiment of the present invention, if the point change record is empty, it is determined that the remote signal point has not changed.
[0081] Step 107: determine that the remote signal point has changed, and cache the first energy storage remote signal data to the database.
[0082] In the embodiment of the present invention, if the point change record is not empty, it is determined that the remote signal point has changed, and the first energy storage remote signal data, that is, the latest energy storage remote signal data, is stored in the Redis cluster for the next change ratio judgment.
[0083] In the embodiment of the present invention, after determining that the telesignaling point has changed, the first energy storage telesignaling data is also sent to the Kafka cluster. The Kafka cluster is used to send the third energy storage telesignaling to the Flink cluster and the Influxdb cluster according to the first energy storage telesignaling data; the Flink cluster is used to execute the alarm process according to the third energy storage telesignaling data; the Influxdb cluster is used to perform big data and algorithm team analysis according to the third energy storage telesignaling data. Among them, after the Kafka cluster sends the third energy storage telesignaling data to the Flink cluster and the Influxdb cluster, the operations performed by the Flink cluster and the Influxdb cluster are asynchronous operations, and the two are executed in parallel at the same time.
[0084] like Figure 2 As shown in the figure, after the server sends the first energy storage telemetering data to the Kafka cluster, the Flink cluster uses Flink+Kafka to consume the telemetering point data of energy storage changes, and determines whether the point is matched according to the configured alarm rules. If the energy storage point that needs to be alarmed is matched, the alarm information is directly sent to the user; otherwise, the alarm process ends. The Kafka cluster saves the telemetering point data of energy storage changes consumed by Kafka to the Influxdb cluster for subsequent analysis and use by the big data and algorithm team.
[0085] The embodiment of the present invention proposes a dual-pointer position change algorithm in the cloud, which improves the performance of analyzing remote signal position change, thereby enabling faster fault warning and diagnosis.
[0086] The energy storage telesignal position change processing method provided in the embodiment of the present invention utilizes a telesignal position change algorithm in the cloud to analyze the telesignal change points, while reducing the time complexity and space complexity.
[0087] The energy storage telesignal position change processing method provided in the embodiment of the present invention reports the telesignal information on the energy storage device side. Regardless of whether the device side is changed, the cloud side can analyze the telesignal position change with high performance.
[0088] The beneficial effects of the energy storage remote signal position change processing method provided by the embodiment of the present invention are as follows: 1. Usually, the md5 algorithm is used for coarse-grained comparison or the coarse-grained comparison is not applicable. However, the MurmurHash3 algorithm is used for coarse-grained comparison. The performance of the MurmurHash3 algorithm is more than 10 times that of the md5 algorithm, especially in the scenario with longer string length, the performance is better.
[0089] 2. Usually, fine-grained comparison first deserializes the old and new JSON strings, and then traverses and compares whether the keys and values are equal. This method will result in two additional JSON operations, which increases the time complexity by more than 10 times; in addition, the JSON object needs to occupy additional memory. The embodiment of the present invention uses a double pointer algorithm for fine-grained comparison. The double pointer algorithm only needs two int variables, so the space complexity is lower than that of the JSON serialization method.
[0090] 3. If Figure 2 As shown, the overall architecture of the embodiment of the present invention uses a general big data architecture, kafka+redis+influxdb+flink, which can better provide distributed expansion capabilities.
[0091] In a technical solution of a method for processing energy storage telesignal position change provided by an embodiment of the present invention, the method comprises: receiving first energy storage telesignal data sent by a message proxy server, the first energy storage telesignal data comprising data for indicating the operating status and alarm information of the energy storage device; obtaining second energy storage telesignal data from a database, the second energy storage telesignal data being the latest energy storage telesignal data in the database; obtaining a first comparison result by using the MurmurHash3 algorithm to perform a fine-grained comparison between the first energy storage telesignal data and the second energy storage telesignal data; if the first comparison result is equal, it is determined that the telesignal point has not changed; or if the first comparison result is unequal, a fine-grained comparison is performed between the first energy storage telesignal data and the second energy storage telesignal data by using a double pointer algorithm to determine whether the telesignal point has changed; if it is determined that the telesignal point has not changed, the step of receiving the first energy storage telesignal data sent by the message proxy server is continued; or if it is determined that the telesignal point has changed, the first energy storage telesignal data is cached to the database. The performance of parsing telesignal position change can be improved, thereby enabling faster fault warning and diagnosis.
[0092] Fig.10 A schematic diagram of a storage energy remote signal position change processing device provided by an embodiment of the present invention is shown in FIG. Fig.10 As shown, the device comprises: The transceiver module 31 is used to receive the first energy storage remote signaling data sent by the message proxy server, the first energy storage remote signaling data includes data used to represent the operating status and alarm information of the energy storage device; obtain the second energy storage remote signaling data from the database, the second energy storage remote signaling data is the latest energy storage remote signaling data in the database; The processing module 32 is used to perform a fine-grained comparison on the first energy storage telesignaling data and the second energy storage telesignaling data by using the MurmurHash3 algorithm to obtain a first comparison result; if the first comparison result is equal, it is determined that the telesignaling point has not changed; or if the first comparison result is unequal, a fine-grained comparison is performed on the first energy storage telesignaling data and the second energy storage telesignaling data by using a double pointer algorithm to determine whether the telesignaling point has changed; if it is determined that the telesignaling point has not changed, continue to execute the step of receiving the first energy storage telesignaling data sent by the message proxy server; or if it is determined that the telesignaling point has changed, the transceiver module 31 is also used to cache the first energy storage telesignaling data to the database.
[0093] In some possible embodiments, the processing module 32 is specifically used to extract the hash of the first energy storage telesignaling data to obtain a first hash; use the MurmurHash3 algorithm to calculate the hash of the second energy storage telesignaling data to obtain a second hash; determine whether the values of the first hash and the second hash are equal; if it is determined that the values of the first hash and the second hash are not equal, determine that the first comparison result is unequal; or if it is determined that the values of the first hash and the second hash are equal, determine that the first comparison result is equal.
[0094] In some possible embodiments, the processing module 32 is specifically used to point the first pointer to the first key in the first energy storage telesignaling data, and point the second pointer to the first key in the second energy storage telesignaling data; compare whether the first key currently pointed to by the first pointer and the second key currently pointed to by the second pointer are equal; if the first key and the second key are equal, move the first pointer from the first key to the first value corresponding to the first key, and move the second pointer from the second key to the second value corresponding to the second key; compare whether the first value and the second value are equal; if the first value and the second value are equal, move the first pointer back to the next key of the first key, and move the second pointer back to the next key of the second key; determine whether the first pointer encounters the first character during this backward movement; if it is determined that the first pointer encounters the first character during this backward movement, determine whether the point change record is empty; if it is determined that the point change record is empty, determine that the telesignaling point has not changed; or if it is determined that the point change record is not empty, determine that the telesignaling point has changed.
[0095] In some possible embodiments, the processing module 32 is also specifically used to record the key-value pair currently pointed to by the first pointer as the change point if the first value and the second value are not equal; move the first pointer back to the next key of the first key, and move the second pointer back to the next key of the second key.
[0096] In some possible embodiments, the processing module 32 is also specifically used to determine whether the second pointer encounters the first character during the current backward movement if it is determined that the first pointer has not encountered the first character during the current backward movement; if it is determined that the second pointer encounters the first character during the current backward movement, record the key-value pair currently pointed to by the first pointer and the subsequent key-value pairs as the changed point; and determine whether the point change record is empty.
[0097] In some possible embodiments, the processing module 32 is further specifically configured to compare whether the first key currently pointed to by the first pointer and the second key currently pointed to by the second pointer are equal if it is determined that the second pointer does not encounter the first character during the current backward movement process.
[0098] In some possible embodiments, the processing module 32 is also specifically used to determine whether the first key is greater than the second key if the first key is not equal to the second key; if it is determined that the first key is greater than the second key, move the second pointer back to the next key of the second key; and determine whether the second pointer encounters the first character during this backward movement.
[0099] In some possible embodiments, the processing module 32 is also specifically used to record the key-value pair currently pointed to by the first pointer as the change point if it is determined that the first key is smaller than the second key; move the first pointer back to the next key of the first key, and move the second pointer back to the next key of the second key.
[0100] In some possible embodiments, the processing module 32 determines that the remote signal point has changed, and the transceiver module 31 is further used to send the first energy storage remote signal data to the Kafka cluster.
[0101] In the technical solution provided by the embodiment of the present invention, the first energy storage telesignaling data sent by the message proxy server is received, and the first energy storage telesignaling data includes data for indicating the operating status and alarm information of the energy storage device; the second energy storage telesignaling data is obtained from the database, and the second energy storage telesignaling data is the latest energy storage telesignaling data in the database; the first comparison result is obtained by fine-grained comparison of the first energy storage telesignaling data and the second energy storage telesignaling data using the MurmurHash3 algorithm; the first comparison result is equal, and it is determined that the telesignaling point has not changed; or the first comparison result is unequal, and the first energy storage telesignaling data and the second energy storage telesignaling data are fine-grained compared by using the double pointer algorithm to determine whether the telesignaling point has changed; it is determined that the telesignaling point has not changed, and the step of receiving the first energy storage telesignaling data sent by the message proxy server is continued; or it is determined that the telesignaling point has changed, and the first energy storage telesignaling data is cached to the database. It can improve the performance of parsing telesignaling position changes, so that fault warning and diagnosis can be faster.
[0102] An embodiment of the present application provides a storage medium, which includes a stored program, wherein when the program is executed, the device where the storage medium is located is controlled to execute the above method.
[0103] An embodiment of the present application provides a server, including a memory and a processor, wherein the memory is used to store information including program instructions, and the processor is used to control the execution of the program instructions, wherein the program instructions implement the steps of the above method when loaded and executed by the processor.
[0104] Fig.11 A schematic diagram of the structure of a server provided in an embodiment of the present application, such as Fig.11 As shown, the computer device 20 includes: a processor 21, a memory 22, and a computer program 23 stored in the memory 22 and executable on the processor 21. When the computer program 23 is executed by the processor 21, the energy management method applied in the embodiment is implemented. To avoid repetition, they are not described one by one here.
[0105] The computer device 20 includes, but is not limited to, a processor 21 and a memory 22. Those skilled in the art will appreciate that Fig.11 It is only an example of the computer device 20 and does not constitute a limitation of the computer device 20. It may include more or fewer components than shown in the figure, or a combination of certain components, or different components. For example, the computer device 20 may also include input and output devices, network access devices, buses, etc.
[0106] The processor 21 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc.
[0107] The memory 22 may be an internal storage unit of the computer device 20, such as a hard disk or memory of the computer device 20. The memory 22 may also be an external storage device of the computer device 20, such as a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, etc. equipped on the computer device 20. Further, the memory 22 may also include both an internal storage unit of the computer device 20 and an external storage device. The memory 22 is used to store computer programs and other programs and data required by the computer device 20. The memory 22 may also be used to temporarily store data that has been output or is to be output.
[0108] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0109] In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms.
[0110] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0111] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of hardware plus software functional units.
[0112] The above-mentioned integrated unit implemented in the form of a software functional unit can be stored in a computer-readable storage medium. The above-mentioned software functional unit is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) or a processor to perform some steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), disk or optical disk and other media that can store program code.
[0113] The above description is only a preferred embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application shall be included in the scope of protection of the present application.
Claims
1. A method for processing energy storage remote signal displacement, characterized in that: The method comprises: Receiving first energy storage remote signaling data sent by a message proxy server, wherein the first energy storage remote signaling data includes data for indicating an operating status and alarm information of an energy storage device; Acquire second energy storage remote signaling data from a database, where the second energy storage remote signaling data is the latest energy storage remote signaling data in the database; A first comparison result is obtained by performing a fine-grained comparison on the first energy storage remote signaling data and the second energy storage remote signaling data using a MurmurHash3 algorithm; The first comparison result is equal, and it is determined that the remote signal point has not changed; or If the first comparison result is unequal, a fine-grained comparison is performed on the first energy storage remote signaling data and the second energy storage remote signaling data by using a double pointer algorithm to determine whether the remote signaling point has changed; Determining that the remote signaling point has not changed, continuing to perform the step of receiving the first energy storage remote signaling data sent by the message proxy server; or It is determined that the remote signal point has changed, and the first energy storage remote signal data is cached in the database.
2. The method according to claim 1, characterized in that: The method of obtaining a first comparison result by performing a fine-grained comparison on the first energy storage remote signaling data and the second energy storage remote signaling data using the MurmurHash3 algorithm includes: Extracting the hash of the first energy storage remote signaling data to obtain a first hash; Using the MurmurHash3 algorithm to calculate the hash of the second energy storage remote signaling data to obtain a second hash; Determine whether the values of the first Hash and the second Hash are equal; If it is determined that the values of the first Hash and the second Hash are not equal, determining that the first comparison result is not equal; or If it is determined that the values of the first Hash and the second Hash are equal, it is determined that the first comparison result is equal.
3. The method according to claim 1 or 2, characterized in that: The method of performing fine-grained comparison on the first energy storage remote signaling data and the second energy storage remote signaling data by using a double pointer algorithm to determine whether the remote signaling point has changed includes: Point the first pointer to the first key in the first energy storage remote signaling data, and point the second pointer to the first key in the second energy storage remote signaling data; Compare whether a first key currently pointed to by the first pointer and a second key currently pointed to by the second pointer are equal; If the first key and the second key are equal, move the first pointer from the first key to the first value corresponding to the first key, and move the second pointer from the second key to the second value corresponding to the second key; comparing whether the first value and the second value are equal; If the first value is equal to the second value, the first pointer is moved back to the next key of the first key, and the second pointer is moved back to the next key of the second key; Determine whether the first pointer encounters the first character during the current backward movement; If it is determined that the first pointer encounters the first character during the current backward movement process, determining whether the point change record is empty; If it is determined that the point change record is empty, it is determined that the remote signal point has not changed; or if it is determined that the point change record is not empty, it is determined that the remote signal point has changed.
4. The method according to claim 3, characterized in that Also includes: If the first value and the second value are not equal, record the key-value pair currently pointed to by the first pointer as the point of change; The first pointer is moved back to a key next to the first key, and the second pointer is moved back to a key next to the second key.
5. The method according to claim 3, characterized in that: Also includes: If it is determined that the first pointer does not encounter the first character in the current backward movement process, determining whether the second pointer encounters the first character in the current backward movement process; If it is determined that the second pointer encounters the first character during the current backward movement process, the key-value pair currently pointed to by the first pointer and the subsequent key-value pairs are recorded as the change point; Determine whether the point change record is empty.
6. The method according to claim 5, characterized in that Also includes: If it is determined that the second pointer does not encounter the first character during the current backward movement process, a comparison is made as to whether the first key currently pointed to by the first pointer and the second key currently pointed to by the second pointer are equal.
7. The method according to claim 3, characterized in that Also includes: If the first key and the second key are not equal, determining whether the first key is greater than the second key; If it is determined that the first key is larger than the second key, the second pointer is moved back to the key next to the second key; It is determined whether the second pointer encounters the first character during the current backward movement.
8. The method according to claim 7, characterized in that Also includes: If it is determined that the first key is smaller than the second key, the key-value pair currently pointed to by the first pointer is recorded as the change point; The first pointer is moved back to a key next to the first key, and the second pointer is moved back to a key next to the second key.
9. The method according to claim 1, characterized in that: The method further comprises: It is determined that the remote signal point has changed, and the first energy storage remote signal data is sent to the Kafka cluster.
10. An energy storage remote signal displacement processing device, characterized in that: include: A transceiver module is used to receive first energy storage remote signaling data sent by a message proxy server, wherein the first energy storage remote signaling data includes data used to represent the operating status and alarm information of the energy storage device; and obtain second energy storage remote signaling data from a database, wherein the second energy storage remote signaling data is the latest energy storage remote signaling data in the database; A processing module is used to perform a fine-grained comparison on the first energy storage telesignaling data and the second energy storage telesignaling data by using the MurmurHash3 algorithm to obtain a first comparison result; if the first comparison result is equal, it is determined that the telesignaling point has not changed; or if the first comparison result is unequal, a double pointer algorithm is used to perform a fine-grained comparison on the first energy storage telesignaling data and the second energy storage telesignaling data to determine whether the telesignaling point has changed; if it is determined that the telesignaling point has not changed, continue to execute the step of receiving the first energy storage telesignaling data sent by the message proxy server; or if it is determined that the telesignaling point has changed, the transceiver module is also used to cache the first energy storage telesignaling data to the database.
Citation Information
Patent Citations
Remote signaling data processing method and processing device
CN103093005A
Method for processing remote signaling messages and SOE messages from multiple collection channels
CN109143878A
Data synchronization method for transformer substation centralized monitoring system and power grid resource service platform
CN116319831A