Heat pump algorithm processing method and device

By configuring multiple sub-algorithms and parameter matching script configuration tables in the air source heat pump system, the problem of the algorithm being unable to adapt to changes in different regions is solved, improving calculation accuracy and user experience, and reducing downtime risk.

CN118779006BActive Publication Date: 2025-11-14GUANGDONG VANWARD NEW ELECTRIC CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202410829208.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-06-25
Publication Date
2025-11-14
Estimated Expiration
2044-06-25

AI Technical Summary

Technical Problem

The algorithm of air source heat pump energy station cannot flexibly adapt to changes in policies, market expectations and material costs in different regions, resulting in inaccurate calculation results and frequent shutdowns, which affects user experience.

Method used

By employing a heat pump algorithm, the server and user end of the heat pump system are configured, and a script configuration table is used to dynamically call and match parameters for multiple sub-algorithms, avoiding frequent downtime caused by algorithm modifications and improving execution efficiency and accuracy.

Benefits of technology

This enables the heat pump algorithm to be flexibly adapted to different user terminals, reducing downtime risks, improving calculation accuracy and user experience, and saving computing and storage resources.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118779006B_ABST
    Figure CN118779006B_ABST
Patent Text Reader

Abstract

This invention relates to the field of air source heat pump processing technology, and discloses a heat pump algorithm processing method and apparatus. The method is applied to a heat pump system, which includes a server and a user terminal. The server is configured with a heat pump algorithm and a script configuration table for the heat pump algorithm. The method includes: receiving a calculation instruction sent by the user terminal; responding to the calculation instruction, obtaining algorithm identifiers of multiple sub-algorithms of the heat pump algorithm matching the calculation instruction and related parameters of the user terminal required to run the multiple sub-algorithms; determining the algorithm code of the multiple sub-algorithms according to the algorithm identifiers and a first mapping relationship; running the heat pump algorithm based on the algorithm code of the multiple sub-algorithms and the related parameters, and obtaining a first running result of the heat pump algorithm matching the calculation instruction. The first running result is used to characterize the solution method of the calculation instruction. This avoids frequent downtime caused by algorithm modifications and other operations, ensures the normal operation of the heat pump algorithm, and significantly improves the user experience.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of air source heat pump control technology, specifically to heat pump algorithm processing methods and devices. Background Technology

[0002] Air source heat pump energy stations are large-scale operations, and their various indicators will change with variations in local policies, market expectations, and material costs. Consequently, the algorithms used to determine these indicators will also frequently change. Related technologies typically use a fixed algorithm to calculate these indicators. However, if local policies, market expectations, and material costs do not align with this fixed algorithm, the calculated input and output indicators will differ significantly from reality, exhibiting considerable inaccuracies, insufficient reliability, and lack of practicality.

[0003] In response, related technologies have adopted methods that modify the algorithm's calculation code to obtain more practical results. However, this approach requires modifying the algorithm for all users. If multiple energy stations are located in different areas among all users, it will affect other users' use of the algorithm. Furthermore, modifying the calculation code is labor-intensive, error-prone, and requires updating the algorithm code and redeploying the service after completion, which will cause downtime. Therefore, how to reasonably handle the algorithm of air source heat pump energy stations to better adapt to the policies, market expectations, and material costs of the energy station's location has become an urgent technical problem to be solved. Summary of the Invention

[0004] In view of this, the present invention provides a heat pump algorithm processing method and apparatus to address the urgent technical problem of how to rationally process the algorithm of an air source heat pump energy station so as to better adapt to the policies, market expectations, material costs, and other data of the energy station's location.

[0005] In a first aspect, the present invention provides a heat pump algorithm processing method applied to a heat pump system. The heat pump system includes a server and a user terminal. The server is configured with a heat pump algorithm and a script configuration table for the heat pump algorithm. The script configuration table is used to characterize the algorithm identifiers of multiple preset sub-algorithms of the heat pump algorithm, the preset association parameters of the user terminal required to run the multiple preset sub-algorithms, and the first mapping relationship between the algorithm codes of the multiple preset sub-algorithms. The method includes:

[0006] Receive calculation instructions sent by the user client;

[0007] In response to the operation command, obtain the algorithm identifiers of multiple sub-algorithms of the heat pump algorithm that match the operation command, as well as the associated parameters of the user terminal required to run the multiple sub-algorithms;

[0008] Based on the algorithm identifier and the first mapping relationship, determine the algorithm code of multiple sub-algorithms;

[0009] Based on the algorithm code and associated parameters of multiple sub-algorithms, the heat pump algorithm is run to obtain the first running result of the heat pump algorithm that matches the operation instructions. The first running result is used to characterize the solution method of the operation instructions.

[0010] This invention's heat pump algorithm processing method determines the algorithm code based on a pre-configured script configuration table, effectively avoiding strong correlation between the heat pump algorithm and its associated parameters. Since different user terminals have different parameters, multiple sub-algorithms are configured for the heat pump algorithm, each with a different algorithm identifier. Therefore, when different sub-algorithms need to be configured for different associated parameters, it does not affect other user terminals' use of the heat pump algorithm for calculations. This avoids frequent downtime caused by algorithm modifications, ensures the normal operation of the heat pump algorithm, and significantly improves the user experience.

[0011] In one alternative implementation, the method further includes:

[0012] The first running result is sent to the user terminal that applies the heat pump algorithm, so that the user terminal can obtain the second running result of the heat pump algorithm based on the first running result and the values ​​of the associated parameters. The second running result is used to characterize the running status of the user terminal obtained based on the solution method.

[0013] The heat pump algorithm processing method of this invention provides a first running result that can be a calculation formula obtained by executing the heat pump algorithm. Based on this first running result, the user terminal can quickly solve for and obtain its operating status. This significantly saves user terminal computing and storage resources, effectively improves the algorithm execution efficiency on the user terminal, and thus significantly enhances the user experience.

[0014] In one optional implementation, obtaining the algorithm identifiers of multiple sub-algorithms matching the operation instructions includes:

[0015] Identify the identifiers included in the heat pump algorithm corresponding to the operation instructions;

[0016] Based on the identifier, the algorithm identifiers of multiple sub-algorithms that match the operation instructions are identified.

[0017] The heat pump algorithm processing method of this invention uses identifiers to quickly identify the algorithm identifiers of multiple sub-algorithms included in the heat pump algorithm, enabling the execution of multiple sub-algorithms matching different algorithm instructions. This significantly improves the execution efficiency and accuracy of the heat pump algorithm.

[0018] In one alternative implementation, the preset sub-algorithm is configured to have multiple versions, each with a fixed version number;

[0019] The script configuration table is also used to represent the second mapping relationship between the version number of the preset sub-algorithm and the region to which the user terminal belongs.

[0020] The heat pump algorithm processing method of this invention allows for the configuration of multiple versions of a preset sub-algorithm, each with a fixed version number. A second mapping relationship between the version number of the preset sub-algorithm and the user's region is configured in a script configuration table. Therefore, different versions can be configured for the same sub-algorithm based on factors such as the user's region, further ensuring the adaptability of the heat pump algorithm to multiple user terminals.

[0021] In one optional implementation, the arithmetic instructions carry the user identifier from the user terminal;

[0022] Obtain the algorithm identifiers of multiple sub-algorithms of the heat pump algorithm that match the operation instructions, including:

[0023] Identify the identifiers included in the heat pump algorithm corresponding to the operation instructions;

[0024] Based on the identifier, the algorithm identifiers of multiple sub-algorithms that match the operation instructions are identified;

[0025] Determine the user's region based on the user identifier;

[0026] The version number of the sub-algorithm is determined based on the region and the second mapping relationship.

[0027] In one alternative implementation, a heat pump algorithm is run based on the algorithm code and associated parameters of multiple sub-algorithms, including:

[0028] Based on the algorithm identifiers of the multiple sub-algorithms of the heat pump algorithm, determine whether multiple sub-algorithms are missing;

[0029] When multiple sub-algorithms are complete, determine whether the associated parameters are missing;

[0030] Run the heat pump algorithm with all associated parameters complete.

[0031] The heat pump algorithm processing method of this invention first determines whether multiple sub-algorithms and their associated parameters are missing based on the algorithm identifiers of multiple sub-algorithms before running the heat pump algorithm. Only when all sub-algorithms and their associated parameters are complete is the heat pump algorithm run, thus fully ensuring the execution efficiency and accuracy of the heat pump algorithm.

[0032] In one optional implementation, the heat pump algorithm is run based on the algorithm code and associated parameters of multiple sub-algorithms, and further includes:

[0033] In the event that multiple sub-algorithms are missing, issue the first alert; and / or

[0034] If the associated parameters are missing, a second alert will be issued.

[0035] The heat pump algorithm processing method of this invention can issue corresponding reminders when multiple sub-algorithms or related parameters are missing, thereby updating and improving the sub-algorithms or related parameters in a timely and accurate manner. This further ensures the execution efficiency and accuracy of the heat pump algorithm.

[0036] In one optional implementation, the algorithm codes for multiple sub-algorithms are determined based on the algorithm identifier and the first mapping relationship, including:

[0037] Based on the first mapping relationship, obtain the algorithm type of the sub-algorithm;

[0038] Based on the algorithm type, obtain the algorithm code of the sub-algorithm.

[0039] In one alternative implementation, the method further includes:

[0040] When a change in the heat pump algorithm is detected, the multiple preset sub-algorithms included in the heat pump algorithm and the preset associated parameters of the user terminal required to run the multiple preset sub-algorithms are verified; and / or

[0041] At set intervals, the preset sub-algorithms included in the heat pump algorithm and the preset associated parameters of the user terminal required to run the preset sub-algorithms are verified.

[0042] The heat pump algorithm processing method of this invention verifies the multiple preset sub-algorithms included in the heat pump algorithm and the preset associated parameters of the user terminal required to run the multiple preset sub-algorithms at set time intervals or when a change in the heat pump algorithm is detected. This effectively avoids problems such as algorithm errors caused by directly modifying the heat pump algorithm itself or its sub-algorithms through the server. This effectively ensures the normal operation of the heat pump algorithm.

[0043] Secondly, the present invention provides a heat pump algorithm processing device applied to a server running a heat pump algorithm. The server is configured with a heat pump algorithm and a script configuration table for the heat pump algorithm. The script configuration table is used to characterize the algorithm identifiers of multiple preset sub-algorithms of the heat pump algorithm, the preset association parameters of the user end required to run the multiple preset sub-algorithms, and the first mapping relationship between the algorithm codes of the multiple preset sub-algorithms. The device includes:

[0044] The receiving module is used to receive calculation instructions sent by the user terminal;

[0045] The acquisition module is used to obtain, in response to the operation command, the algorithm identifiers of multiple sub-algorithms of the heat pump algorithm that match the operation command and the associated parameters of the user terminal required to run the multiple sub-algorithms;

[0046] The determination module is used to determine the algorithm code of multiple sub-algorithms based on the algorithm identifier and the first mapping relationship;

[0047] The execution module is used to run the heat pump algorithm based on the algorithm code and associated parameters of multiple sub-algorithms, and obtain the first running result of the heat pump algorithm that matches the operation instructions. The first running result is used to characterize the solution method of the operation instructions. Attached Figure Description

[0048] To more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the specific embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.

[0049] Figure 1 This is a flowchart illustrating the heat pump algorithm processing method according to an embodiment of the present invention;

[0050] Figure 2 This is a flowchart illustrating another heat pump algorithm processing method according to an embodiment of the present invention;

[0051] Figure 3 This is a flowchart illustrating a specific application example of the heat pump algorithm processing algorithm according to an embodiment of the present invention;

[0052] Figure 4 This is a structural block diagram of a heat pump algorithm processing method apparatus according to an embodiment of the present invention;

[0053] Figure 5 This is a schematic diagram of the hardware structure of a computer device according to an embodiment of the present invention. Detailed Implementation

[0054] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, 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 those skilled in the art without creative effort are within the scope of protection of the present invention.

[0055] This invention provides a heat pump algorithm processing method. Based on a pre-configured script configuration table, the algorithm code is determined, effectively avoiding strong correlation between the heat pump algorithm and its associated parameters. Since different user terminals have different parameters, multiple sub-algorithms are configured for the heat pump algorithm, each with a different algorithm identifier. This ensures that configuring different sub-algorithms for different associated parameters does not affect other user terminals' use of the heat pump algorithm for calculations.

[0056] According to an embodiment of the present invention, a heat pump algorithm processing method embodiment is provided. It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions. Furthermore, although a logical order is shown in the flowchart, in some cases, the steps shown or described may be executed in a different order than that shown here.

[0057] This embodiment provides a heat pump algorithm processing method applied to a heat pump system. The heat pump system includes a server and a user terminal. The server is configured with a heat pump algorithm and a script configuration table for the heat pump algorithm. The script configuration table is used to characterize the algorithm identifiers of multiple preset sub-algorithms of the heat pump algorithm, the preset associated parameters of the user terminal required to run the multiple preset sub-algorithms, and the first mapping relationship between the algorithm codes of the multiple preset sub-algorithms.

[0058] In one embodiment of the present invention, the energy station includes functional equipment such as a boiler and equipment such as a control cabinet. A user-end control system for controlling the energy station's data can be directly configured on the control cabinet, such as a mini-program or an APP (application).

[0059] Heat pump systems require the calculation and determination of various parameters, resulting in a variety of heat pump algorithms. Each heat pump algorithm may employ different calculation methods for different regions or types of user terminals. Therefore, in this embodiment of the invention, when writing the overall algorithm code for each heat pump algorithm, the nested parameters requiring calculation are configured as a sub-algorithm and represented as an algorithm identifier in the overall algorithm for the heat pump algorithm. In this way, preset sub-algorithms for parameters used in multiple heat pump algorithms can be applied to multiple heat pump algorithms, effectively improving the deployment and configuration efficiency of heat pump algorithms. Here, the algorithm identifier can be used to identify the uniqueness of the sub-algorithm. The preset associated parameters for user terminals required by multiple different preset sub-algorithms may differ. Preset associated parameters may include electricity prices, water prices, and energy policies of the energy station where the user terminal is located. Therefore, a script configuration table is pre-configured to represent the algorithm identifiers of multiple preset sub-algorithms of the heat pump algorithm, the preset associated parameters for user terminals required to run multiple preset sub-algorithms, and the first mapping relationship between the algorithm codes of multiple preset sub-algorithms. The overall algorithm of the heat pump algorithm can call multiple preset sub-algorithms.

[0060] Figure 1 This is a flowchart of a heat pump algorithm processing method according to an embodiment of the present invention, such as... Figure 1 As shown, the process includes the following steps:

[0061] Step S101: Receive the calculation instructions sent by the user terminal.

[0062] For example, by clicking a button on the user's device to query specific operational data of an energy station, a calculation command can be sent to the server. The server can then receive the calculation command sent by the user's device.

[0063] For example, operational data may include: the percentage of heat pumps that meet the requirements for the day at the user's energy station, energy efficiency ratio, basic heat consumption, cold air infiltration heat consumption, flow rate calculation, pipe section resistance, hydraulic parameters of the pipes, and heating capacity of the air source heat pump under actual operating conditions.

[0064] In one embodiment of the present invention, the algorithm identifier of the sub-algorithm carried by the operation instruction can also be directly obtained when the operation instruction is received.

[0065] Step S102: In response to the operation instruction, obtain the algorithm identifiers of multiple sub-algorithms of the heat pump algorithm that match the operation instruction and the associated parameters of the user terminal required to run the multiple sub-algorithms.

[0066] In this embodiment of the invention, the calculation instruction may carry the calculation target required by the user terminal. The calculation instruction may carry a user terminal identifier, which can be used to determine information such as the region of the energy station where the user terminal is located. When pre-configuring the heat pump algorithm, the user terminal and / or region to which different heat pump algorithms are applicable can be identified based on the user terminal identifier and / or region identifier. Thus, through the pre-configured heat pump algorithm, the algorithm identifiers of multiple sub-algorithms of the heat pump algorithm matching the calculation instruction can be further obtained.

[0067] Furthermore, based on the algorithm identifiers of multiple sub-algorithms of the heat pump algorithm that match the calculation instructions, the script configuration table can be called to determine the associated parameters of the user end required to run multiple sub-algorithms. For example, the electricity price and water price in the location of the energy station to which the user end belongs.

[0068] Step S103: Determine the algorithm code of multiple sub-algorithms based on the algorithm identifier and the first mapping relationship.

[0069] In this embodiment of the invention, the algorithm code of multiple sub-algorithms can be determined by calling the script configuration table based on the algorithm identifiers of multiple sub-algorithms of the heat pump algorithm that match the operation instructions, and according to the algorithm identifiers and the first mapping relationship in the script configuration table.

[0070] Step S104: Based on the algorithm code and associated parameters of multiple sub-algorithms, run the heat pump algorithm to obtain the first running result of the heat pump algorithm that matches the operation instructions. The first running result is used to characterize the solution method of the operation instructions.

[0071] In this embodiment of the invention, for the heat pump algorithm, the nested parameters that need to be calculated are configured as sub-algorithms. The corresponding sub-algorithms are obtained through the above steps, and their codes and associated parameters are acquired. Therefore, based on the algorithm codes and associated parameters of multiple sub-algorithms, the heat pump algorithm can be run. A first running result of the heat pump algorithm matching the calculation instructions is obtained. This first running result characterizes the solution method for the calculation instructions. For example, the solution method might be a calculation formula specific to the calculation instructions.

[0072] This invention's heat pump algorithm processing method determines the algorithm code based on a pre-configured script configuration table, effectively avoiding strong correlation between the heat pump algorithm and its associated parameters. Since different user terminals have different parameters, multiple sub-algorithms are configured for the heat pump algorithm, each with a different algorithm identifier. Therefore, when different sub-algorithms need to be configured for different associated parameters, it does not affect other user terminals' use of the heat pump algorithm for calculations. This avoids frequent downtime caused by algorithm modifications, ensures the normal operation of the heat pump algorithm, and significantly improves the user experience.

[0073] This embodiment provides a heat pump algorithm processing method applied to a heat pump system. The heat pump system includes a server and a user terminal. The server is configured with a heat pump algorithm and a script configuration table for the heat pump algorithm. The script configuration table is used to characterize the algorithm identifiers of multiple preset sub-algorithms of the heat pump algorithm, the preset associated parameters of the user terminal required to run the multiple preset sub-algorithms, and the first mapping relationship between the algorithm codes of the multiple preset sub-algorithms. Figure 2 This is a flowchart of another heat pump algorithm processing method according to an embodiment of the present invention, such as... Figure 2 As shown, the process includes the following steps:

[0074] Step S201: Receive the calculation instructions sent by the user terminal.

[0075] Please see details Figure 1 Step S101 of the illustrated embodiment will not be described again here.

[0076] Step S202: In response to the operation instruction, obtain the algorithm identifiers of multiple sub-algorithms of the heat pump algorithm that match the operation instruction and the associated parameters of the user terminal required to run the multiple sub-algorithms.

[0077] In an optional implementation, step S202 may include:

[0078] Step S2021: Identify the identifiers included in the heat pump algorithm corresponding to the operation instruction.

[0079] Step S2022: Based on the identifier, the algorithm identifiers of multiple sub-algorithms that match the operation instructions are identified.

[0080] In one embodiment of the present invention, the algorithm script of the heat pump algorithm is nested using the ${XXX} symbol to nest the algorithm scripts of its sub-algorithms. When the algorithm script of a sub-algorithm needs to be modified, as long as the algorithm identifier is not modified, a large amount of modification work of the heat pump algorithm script can be avoided. Thus, the algorithm script of the heat pump algorithm can be modified efficiently and conveniently. It should be noted here that in the embodiments of the present invention, the scripts and code involving the algorithm can be understood to have the same meaning.

[0081] Here, the identifier is written into the overall algorithm of the heat pump algorithm. The ${} in ${XXX} described above can be used as the identifier, and XXX is the algorithm identifier. For example, the algorithm identifier is an algorithm number encoded for each sub-algorithm. The algorithm identifier can also use other identifiers that uniquely identify the algorithm. Other suitable symbols can also be used as identifiers.

[0082] Therefore, if multiple heat pump algorithms use the same parameter, when optimizing and updating the calculation of that parameter, it is not necessary to update all heat pump algorithms involving that parameter. Only the preset sub-algorithm for calculating that parameter needs to be updated.

[0083] The heat pump algorithm processing method of this invention uses identifiers to quickly identify the algorithm identifiers of multiple sub-algorithms included in the heat pump algorithm, enabling the execution of multiple sub-algorithms matching different algorithm instructions. This significantly improves the execution efficiency and accuracy of the heat pump algorithm.

[0084] In one optional implementation, the computation instruction carries the user identifier from the user terminal. The algorithm identifiers of multiple sub-algorithms of the heat pump algorithm matching the computation instruction can then be obtained using the following steps:

[0085] Step a1: Identify the identifiers included in the heat pump algorithm corresponding to the operation instruction.

[0086] Step a2: Based on the identifier, identify the algorithm identifiers of multiple sub-algorithms that match the operation instructions.

[0087] Based on the identifiers included in the heat pump algorithm, the algorithm identifiers of sub-algorithms that match the algorithm instructions can be identified.

[0088] Step a3: Determine the user terminal region based on the user identifier.

[0089] In one alternative implementation, the mapping between user identifiers and the user's region can be configured by creating a database table. Therefore, the user's region can be determined based on the user identifier.

[0090] Step a4: Determine the version number of the sub-algorithm based on the region and the second mapping relationship.

[0091] In one alternative implementation, the preset sub-algorithm is configured to have multiple versions, each with a fixed version number. The script configuration table is also used to characterize a second mapping relationship between the version numbers of the preset sub-algorithms and the region to which the user terminal belongs.

[0092] In one alternative implementation, a second mapping relationship can be constructed by creating a user-sub-algorithm relationship table. This table mainly includes a user table primary key and a sub-algorithm table primary key. The heat pump system can determine the appropriate algorithm version or type for a user based on the user's relevant information and then bind the sub-algorithm to the user. For example, if the energy station to which the user belongs is located in Beijing, and it is determined that algorithm type A is suitable for the user, then algorithm type A can be bound to users in Beijing.

[0093] For example, for algorithm A, you can configure A1 to correspond to a region, A2 to correspond to a region, and A3 to correspond to a region, along with parameters such as water and electricity costs for each region. When changing these parameters, the backend can select the sub-algorithm version corresponding to that region. This significantly improves the efficiency of algorithm updates and optimizations while maximizing the decoupling of the correlation between multiple regions, allowing them to run independently even when using the same heat pump algorithm. This ensures the effective operation of the heat pump algorithm to the greatest extent possible.

[0094] The heat pump algorithm processing method of this invention allows for the configuration of multiple versions of a preset sub-algorithm, each with a fixed version number. A second mapping relationship between the version number of the preset sub-algorithm and the user's region is configured in a script configuration table. Therefore, different versions can be configured for the same sub-algorithm based on factors such as the user's region, further ensuring the adaptability of the heat pump algorithm to multiple user terminals.

[0095] For further details on step S202, please refer to [link / reference]. Figure 1 Step S102 of the illustrated embodiment will not be described again here.

[0096] Step S203: Determine the algorithm code of multiple sub-algorithms based on the algorithm identifier and the first mapping relationship.

[0097] In one alternative implementation, step S203 may include:

[0098] Step S2031: Obtain the algorithm type of the sub-algorithm based on the first mapping relationship.

[0099] In one optional embodiment of the present invention, the algorithm type may be a file or a script file, etc.

[0100] Step S2032: Obtain the algorithm code of the sub-algorithm according to the algorithm type.

[0101] In one optional embodiment of the present invention, if the algorithm type is a file, then the data in the file needs to be read and parsed into script text. If the algorithm type is a text format, then the script text can be obtained directly.

[0102] For further detailed operating steps in step S203, please refer to [link / reference]. Figure 1 Step S103 of the illustrated embodiment will not be described again here.

[0103] Step S204: Based on the algorithm code and associated parameters of multiple sub-algorithms, run the heat pump algorithm to obtain the first running result of the heat pump algorithm that matches the operation instructions. The first running result is used to characterize the solution method of the operation instructions.

[0104] In an optional implementation, step S204 may include:

[0105] Step S2041: Determine whether multiple sub-algorithms are missing based on the algorithm identifiers of the multiple sub-algorithms of the heat pump algorithm.

[0106] Step S2042: If multiple sub-algorithms are complete, determine whether the associated parameters are missing.

[0107] There are several reasons why sub-algorithms and associated parameters may be missing. For example, a heat pump algorithm may include a sub-algorithm coded as 0035, but the algorithm may not be present in the preset script configuration table or the data packet containing the algorithm code may not contain the corresponding algorithm code for that sub-algorithm.

[0108] Step S2043: If the associated parameters are complete, run the heat pump algorithm.

[0109] The heat pump algorithm processing method of this invention first determines whether multiple sub-algorithms and their associated parameters are missing based on the algorithm identifiers of multiple sub-algorithms before running the heat pump algorithm. Only when all sub-algorithms and their associated parameters are complete is the heat pump algorithm run, thus fully ensuring the execution efficiency and accuracy of the heat pump algorithm.

[0110] In an optional implementation, step S204 further includes:

[0111] Step S2044: In the case of multiple missing sub-algorithms, issue the first reminder.

[0112] Step S2045: If the associated parameters are missing, issue a second reminder.

[0113] In one embodiment of the present invention, the first reminder and the second reminder may be the same or different.

[0114] Similarly, depending on the actual situation, it is also possible to configure the system to retain only one of the operation steps, either step S2044 or step S2045, or to retain both steps S2044 and S2045.

[0115] The heat pump algorithm processing method of this invention can issue corresponding reminders when multiple sub-algorithms or related parameters are missing, thereby updating and improving the sub-algorithms or related parameters in a timely and accurate manner. This further ensures the execution efficiency and accuracy of the heat pump algorithm.

[0116] Step S205: The first running result is sent to the user terminal that applies the heat pump algorithm, so that the user terminal can obtain the second running result of the heat pump algorithm based on the first running result and the value of the associated parameter. The second running result is used to characterize the running status of the user terminal obtained based on the solution method.

[0117] The first result described above can be a formula used to execute calculation instructions. The server obtains this calculation formula and sends it to the user terminal for final calculation. This avoids the need for the user terminal to send multiple parameters to the server to obtain the final calculation result, effectively saving communication resources. Simultaneously, executing the calculation instructions on the server side to obtain the formula effectively conserves the user terminal's computing and storage resources.

[0118] Step S206: When a change in the heat pump algorithm is detected, the multiple preset sub-algorithms included in the heat pump algorithm and the preset associated parameters of the user terminal required to run the multiple preset sub-algorithms are verified.

[0119] Step S207: At set intervals, verify the multiple preset sub-algorithms included in the heat pump algorithm and the preset associated parameters of the user terminal required to run the multiple preset sub-algorithms.

[0120] In this embodiment of the invention, after modifying the heat pump algorithm in the heat pump system backend, it is possible to verify whether the preset sub-algorithm code corresponding to the sub-algorithm number of the heat pump algorithm and the associated parameters required by the algorithm are missing.

[0121] In this embodiment of the invention, the server of the heat pump system can periodically check whether the preset sub-algorithm code corresponding to the sub-algorithm number of the heat pump algorithm and the associated parameters required by the algorithm are missing.

[0122] The heat pump algorithm processing method of this invention verifies the multiple preset sub-algorithms included in the heat pump algorithm and the preset associated parameters of the user terminal required to run the multiple preset sub-algorithms at set time intervals or when a change in the heat pump algorithm is detected. This effectively avoids problems such as algorithm errors caused by directly modifying the heat pump algorithm itself or its sub-algorithms through the server. This effectively ensures the normal operation of the heat pump algorithm.

[0123] This embodiment provides a heat pump algorithm processing method applied to a heat pump system. The heat pump system includes a server and a user terminal. The server is configured with a heat pump algorithm and a script configuration table for the heat pump algorithm. The script configuration table is used to characterize the algorithm identifiers of multiple preset sub-algorithms of the heat pump algorithm, the preset association parameters of the user terminal required to run the multiple preset sub-algorithms, and the first mapping relationship between the algorithm codes of the multiple preset sub-algorithms. Figure 3 This is a flowchart illustrating a specific application example of the heat pump algorithm processing method according to an embodiment of the present invention, such as... Figure 3 As shown, the process includes the following steps:

[0124] Step S301: Import the open-source nashorn-core package into the pom.xml file of the Java Spring project to use the heat pump algorithm script engine in the Java project.

[0125] Here, the script engine is the overall algorithm of the heat pump algorithm described above.

[0126] Step S302: Create a database table, a built-in object table of the script engine. This object table mainly includes information about the methods of other languages ​​that the script engine needs to call, such as the class path and method name of Java.

[0127] In step S303, the object table of the script engine created by ScriptEngineManager in the nashorn-core package is used to query the data table in step S302 to obtain the built-in object information, and the object is passed into the script engine object in real time using the Java reflection principle.

[0128] The main purpose of this step is to allow methods from other languages ​​to be called at any time from within the scripting language.

[0129] Step S304: Create a script configuration table in the form of a database table.

[0130] The script configuration table is used to represent the algorithm identifiers of multiple preset sub-algorithms of the heat pump algorithm, the preset associated parameters of the energy station required to run the multiple preset sub-algorithms, and the first mapping relationship between the algorithm codes of the multiple preset sub-algorithms. For example, the script configuration table may include the code of multiple preset sub-algorithms of the air source heat pump energy station implemented in a scripting language, the algorithm number of the sub-algorithm, the parameters required by the sub-algorithm, and other related information.

[0131] In step S305, the user terminal such as the energy station APP sends multiple algorithm numbers and associated parameters required by the air source heat pump energy station to the heat pump algorithm configured on the server.

[0132] Here, algorithm information can be obtained by querying the script configuration table in step S304. It then checks for missing or duplicate sub-algorithms; if any are found, an error is reported and a prompt message is sent to the user's app. Next, it checks for missing parameters required by the sub-algorithms; if any are found, an error is reported, and a prompt message is also sent to the user's app.

[0133] Step S306: Determine the algorithm type of the sub-algorithm obtained in step S305. If the algorithm type is a file, read the data from the file and parse it into script text; if the algorithm is in text format, directly obtain the script text.

[0134] Step S307: Nested algorithm processing.

[0135] When nesting other algorithms within an algorithm script, use the ${XXX} symbol, where XXX is the algorithm number. This number replaces the result of the algorithm code at that location, thus solving the problem of code being difficult to modify and maintain when algorithms are nested too deeply.

[0136] Specifically, air source heat pump energy station algorithms typically involve nested algorithms. When algorithms are nested, multiple algorithms contain several identical computational logic segments, making later modification and verification difficult. For example, a heat pump algorithm that needs to calculate the "daily heat pump load percentage" requires the results of sub-algorithms for "maximum heat pump load at the target water temperature" and "daily building load." Another algorithm also requires the results of sub-algorithms for "maximum heat pump load at the target water temperature" and "daily building load."

[0137] Here, the multiple algorithm script texts A obtained in step S306 can be detected. If the algorithm script text A contains the symbol ${XXX}, all the XXX algorithm codes are extracted, and then all the information of the algorithm is obtained from the script method table. The operations of steps 5, 6, 7, and 8 are performed iteratively.

[0138] If the algorithm script is text B, check the parameters of text B and whether the algorithm is missing. If not, use ScriptEngineManager to execute the algorithm according to the text of the algorithm script.

[0139] Finally, the algorithm's results are stored in the script engine in key-value format for caching to avoid redundant calculations and wasted resources. After the algorithm results are stored, the `${XXX}` in the algorithm script text is replaced with the key value. After the script text and key values ​​are replaced, when the `ScriptEngineManager` executes the script, it can replace the key value with the corresponding value. This effectively solves the problem of nested algorithms in heat pump algorithms. Ultimately, only the logic of the current algorithm needs to be maintained, without needing to concern ourselves with the logic of other nested algorithms, allowing for efficient algorithm modification.

[0140] Step S308: Modify or optimize the sub-algorithm.

[0141] In related technologies, if the algorithm script or a sub-algorithm of a heat pump algorithm needs to be modified or optimized, it is necessary to modify the Java code to change the algorithm's script file. After modifying the script file, the algorithm script is redeployed to the heat pump system server and the service is restarted. Based on the above analysis, the heat pump algorithm processing method of this invention can update the user's algorithm at any time through the management backend, Java interface, or database modification, without downtime. If only a few preset sub-algorithms are modified, as long as the algorithm identifier of the sub-algorithm remains unchanged, there is no need to stop the system and redeploy and restart the entire heat pump algorithm, effectively avoiding service interruption and ensuring the normal operation and use of the heat pump algorithm for multiple users.

[0142] Step S309: Create a user information table.

[0143] This table mainly includes user-related information and information that affects the algorithm of air source heat pump energy stations, such as region.

[0144] Step S310: Create a user-algorithm relational database table.

[0145] This table mainly includes the primary key of the user table and the primary key of the algorithm table. Based on the user information in step S308, the heat pump system can determine the appropriate algorithm type for the user and then bind the algorithm to the user. For example, if the user is in Beijing, it is determined that the user is suitable for algorithm type A, and then algorithm type A is bound to the user.

[0146] Step S311, heat pump algorithm optimization.

[0147] If you need to modify the algorithm for a specific user or type of user, you can filter for this target user in the management backend, download the original script file, modify it, and re-upload it. This allows you to modify the user's algorithm at any time without shutting down the system.

[0148] This embodiment also provides a heat pump algorithm processing device for implementing the above embodiments and preferred embodiments; details already described will not be repeated. As used below, the term "module" can refer to a combination of software and / or hardware that performs a predetermined function. Although the device described in the following embodiments is preferably implemented in software, hardware implementation, or a combination of software and hardware, is also possible and contemplated.

[0149] This embodiment provides a heat pump algorithm processing device applied to a server running a heat pump algorithm. The server is configured with a heat pump algorithm and a script configuration table for the heat pump algorithm. The script configuration table is used to represent the algorithm identifiers of multiple preset sub-algorithms of the heat pump algorithm, the preset associated parameters of the user terminal required to run the multiple preset sub-algorithms, and the first mapping relationship between the algorithm codes of the multiple preset sub-algorithms. Figure 4 As shown, the heat pump algorithm processing device includes:

[0150] The receiving module 401 is used to receive the calculation instructions sent by the user terminal;

[0151] The acquisition module 402 is used to, in response to the operation instruction, acquire the algorithm identifiers of multiple sub-algorithms of the heat pump algorithm that match the operation instruction and the associated parameters of the user terminal required to run the multiple sub-algorithms;

[0152] The determination module 403 is used to determine the algorithm code of multiple sub-algorithms based on the algorithm identifier and the first mapping relationship;

[0153] The execution module 404 is used to run the heat pump algorithm based on the algorithm code and associated parameters of multiple sub-algorithms, and obtain the first running result of the heat pump algorithm that matches the operation instructions. The first running result is used to characterize the solution method of the operation instructions.

[0154] In one alternative embodiment, the apparatus further includes:

[0155] The sending module is used to send the first running result to the user terminal that applies the heat pump algorithm, so that the user terminal can obtain the second running result of the heat pump algorithm based on the first running result and the value of the associated parameter. The second running result is used to characterize the running status of the user terminal obtained based on the solution method.

[0156] In one optional implementation, the acquisition module 402 includes:

[0157] The identifier submodule is used to identify the identifiers included in the heat pump algorithm corresponding to the operation instructions;

[0158] The identifier recognition submodule is used to identify the algorithm identifiers of multiple sub-algorithms that match the operation instructions based on the identifier identifier.

[0159] In one alternative implementation, the preset sub-algorithm is configured to have multiple versions, each with a fixed version number;

[0160] The script configuration table is also used to represent the second mapping relationship between the version number of the preset sub-algorithm and the region to which the user terminal belongs.

[0161] In one optional implementation, the arithmetic instructions carry the user identifier from the user terminal;

[0162] The acquisition module 402 includes:

[0163] The identifier submodule is used to identify the identifiers included in the heat pump algorithm corresponding to the operation instructions;

[0164] The identifier recognition submodule is used to identify the algorithm identifiers of multiple sub-algorithms that match the operation instructions based on the identifier identifier.

[0165] The region submodule is used to determine the user's region based on the user identifier;

[0166] The version submodule is used to determine the version number of the sub-algorithm based on the region and the second mapping relationship.

[0167] In one alternative implementation, the operation module 404 includes:

[0168] The first missing submodule is used to determine whether multiple sub-algorithms are missing based on the algorithm identifiers of the multiple sub-algorithms of the heat pump algorithm;

[0169] The second missing submodule is used to determine whether the associated parameters are missing when multiple sub-algorithms are complete.

[0170] The Run submodule is used to run the heat pump algorithm when the associated parameters are complete.

[0171] In an optional implementation, the operation module 404 further includes:

[0172] The first alert submodule is used to issue a first alert when multiple sub-algorithms are missing; and / or

[0173] The second reminder submodule is used to issue a second reminder when the associated parameters are missing.

[0174] In one alternative implementation, the determining module 403 includes:

[0175] The type submodule is used to obtain the algorithm type of the sub-algorithm based on the first mapping relationship;

[0176] The code submodule is used to obtain the algorithm code of a sub-algorithm based on the algorithm type.

[0177] In one alternative embodiment, the apparatus further includes:

[0178] The first verification submodule is used to verify, when a change in the heat pump algorithm is detected, the multiple preset sub-algorithms included in the heat pump algorithm and the preset associated parameters of the user terminal required to run the multiple preset sub-algorithms; and / or

[0179] The second verification submodule is used to verify the multiple preset sub-algorithms included in the heat pump algorithm and the preset associated parameters of the user terminal required to run the multiple preset sub-algorithms at set intervals.

[0180] Further functional descriptions of the above modules and units are the same as those in the corresponding embodiments described above, and will not be repeated here.

[0181] In this embodiment, the heat pump algorithm processing device is presented in the form of a functional unit. Here, a unit refers to an ASIC (Application Specific Integrated Circuit) circuit, a processor and memory that execute one or more software or fixed programs, and / or other devices that can provide the above functions.

[0182] This invention also provides a computer device having the above-described features. Figure 4 The heat pump algorithm processing device shown.

[0183] Please see Figure 5 , Figure 5 This is a schematic diagram of the structure of a computer device provided in an optional embodiment of the present invention, such as... Figure 5 As shown, the computer device includes one or more processors 10, memory 20, and interfaces for connecting the components, including high-speed interfaces and low-speed interfaces. The components communicate with each other via different buses and can be mounted on a common motherboard or otherwise installed as needed. The processors can process instructions executed within the computer device, including instructions stored in or on memory to display graphical information of a GUI on external input / output devices (such as display devices coupled to the interfaces). In some alternative implementations, multiple processors and / or multiple buses can be used with multiple memories and multiple memory modules, if desired. Similarly, multiple computer devices can be connected, each providing some of the necessary operations (e.g., as a server array, a group of blade servers, or a multiprocessor system). Figure 5Take a processor 10 as an example.

[0184] Processor 10 may be a central processing unit, a network processor, or a combination thereof. Processor 10 may further include a hardware chip. The hardware chip may be an application-specific integrated circuit (ASIC), a programmable logic device (PLD), or a combination thereof. The programmable logic device may be a complex programmable logic device (CAMP), a field-programmable gate array (FPGA), a general-purpose array logic (GDA), or any combination thereof.

[0185] The memory 20 stores instructions executable by at least one processor 10 to cause at least one processor 10 to perform the method shown in the above embodiments.

[0186] The memory 20 may include a program storage area and a data storage area. The program storage area may store the operating system and applications required for at least one function; the data storage area may store data created based on the use of the computer device. Furthermore, the memory 20 may include high-speed random access memory and may also include non-transitory memory, such as at least one disk storage device, flash memory device, or other non-transitory solid-state storage device. In some alternative embodiments, the memory 20 may optionally include memory remotely located relative to the processor 10, and these remote memories may be connected to the computer device via a network. Examples of such networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.

[0187] The memory 20 may include volatile memory, such as random access memory; the memory may also include non-volatile memory, such as flash memory, hard disk or solid-state drive; the memory 20 may also include a combination of the above types of memory.

[0188] The computer device also includes a communication interface 30 for communicating with other devices or communication networks.

[0189] This invention also provides a computer-readable storage medium. The methods described above according to embodiments of the invention can be implemented in hardware or firmware, or implemented as computer code that can be recorded on a storage medium, or implemented as computer code downloaded via a network and originally stored on a remote storage medium or a non-transitory machine-readable storage medium and then stored on a local storage medium. Thus, the methods described herein can be processed by software stored on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. The storage medium can be a magnetic disk, optical disk, read-only memory, random access memory, flash memory, hard disk, or solid-state drive, etc.; further, the storage medium can also include combinations of the above types of memory. It is understood that computers, processors, microprocessor controllers, or programmable hardware include storage components capable of storing or receiving software or computer code, which, when accessed and executed by the computer, processor, or hardware, implements the methods shown in the above embodiments.

[0190] A portion of this invention can be applied as a computer program product, such as computer program instructions, which, when executed by a computer, can invoke or provide the methods and / or technical solutions according to the invention through the operation of the computer. Those skilled in the art will understand that the forms in which computer program instructions exist in a computer-readable medium include, but are not limited to, source files, executable files, installation package files, etc. Correspondingly, the ways in which computer program instructions are executed by a computer include, but are not limited to: the computer directly executing the instructions, or the computer compiling the instructions and then executing the corresponding compiled program, or the computer reading and executing the instructions, or the computer reading and installing the instructions and then executing the corresponding installed program. Here, the computer-readable medium can be any available computer-readable storage medium or communication medium accessible to a computer.

[0191] Although embodiments of the invention have been described in conjunction with the accompanying drawings, those skilled in the art can make various modifications and variations without departing from the spirit and scope of the invention, and such modifications and variations all fall within the scope defined by the appended claims.

Claims

1. A heat pump algorithm processing method, characterized in that, The method is applied to a heat pump system, which includes a server and a user terminal. The server is configured with the heat pump algorithm and a script configuration table for the heat pump algorithm. The script configuration table is used to represent the algorithm identifiers of multiple preset sub-algorithms of the heat pump algorithm, the preset association parameters of the user terminal required to run the multiple preset sub-algorithms, and the first mapping relationship between the algorithm codes of the multiple preset sub-algorithms. The method includes: Receive the calculation instruction sent by the user terminal, the calculation instruction carrying the user identifier of the user terminal; In response to the operation instruction, obtain the algorithm identifiers of multiple sub-algorithms of the heat pump algorithm that match the operation instruction and the associated parameters of the user terminal required to run the multiple sub-algorithms; Based on the algorithm identifier and the first mapping relationship, the algorithm code of multiple sub-algorithms is determined; Based on the algorithm code of multiple sub-algorithms and the associated parameters, the heat pump algorithm is run to obtain a first running result of the heat pump algorithm that matches the operation instruction. The first running result is used to characterize the solution method of the operation instruction. The preset sub-algorithm is configured to have multiple versions, each with a fixed version number; The script configuration table is also used to represent the second mapping relationship between the version number of the preset sub-algorithm and the region to which the user terminal belongs; The algorithm identifiers for obtaining the multiple sub-algorithms of the heat pump algorithm that match the operation instruction include: Identify the identifiers included in the heat pump algorithm corresponding to the operation instruction; Based on the identifier, algorithm identifiers of multiple sub-algorithms that match the operation instructions are identified; The region to which the user terminal belongs is determined based on the user identifier; The version number of the sub-algorithm is determined based on the region it belongs to and the second mapping relationship.

2. The method according to claim 1, characterized in that, The method further includes: The first running result is sent to the user terminal that applies the heat pump algorithm, so that the user terminal obtains the second running result of the heat pump algorithm based on the first running result and the value of the associated parameter. The second running result is used to characterize the running status of the user terminal obtained based on the solution method.

3. The method according to claim 1, characterized in that, The step of obtaining the algorithm identifiers of multiple sub-algorithms matching the operation instruction includes: Identify the identifiers included in the heat pump algorithm corresponding to the operation instruction; Based on the identifier, the algorithm identifiers of multiple sub-algorithms that match the operation instructions are identified.

4. The method according to claim 1, characterized in that, The process of running the heat pump algorithm based on the algorithm code of multiple sub-algorithms and the associated parameters includes: Based on the algorithm identifiers of the multiple sub-algorithms of the heat pump algorithm, determine whether the multiple sub-algorithms are missing; If all the sub-algorithms are complete, determine whether the associated parameters are missing; The heat pump algorithm is run if the associated parameters are complete.

5. The method according to claim 4, characterized in that, The process of running the heat pump algorithm based on the algorithm code of multiple sub-algorithms and the associated parameters further includes: In the event that any of the aforementioned sub-algorithms are missing, issue a first alert; and / or If the associated parameter is missing, a second reminder will be issued.

6. The method according to any one of claims 1 to 5, characterized in that, The step of determining the algorithm code for multiple sub-algorithms based on the algorithm identifier and the first mapping relationship includes: Based on the first mapping relationship, obtain the algorithm type of the sub-algorithm; Based on the algorithm type, obtain the algorithm code of the sub-algorithm.

7. The method according to any one of claims 1 to 5, characterized in that, The method further includes: When a change in the heat pump algorithm is detected, the multiple preset sub-algorithms included in the heat pump algorithm and the preset associated parameters of the user terminal required to run the multiple preset sub-algorithms are verified; and / or At set intervals, the preset sub-algorithms included in the heat pump algorithm and the preset associated parameters of the user terminal required to run the preset sub-algorithms are verified.

8. A heat pump algorithm processing device, characterized in that, An apparatus for running a heat pump algorithm, wherein the server is configured with the heat pump algorithm and a script configuration table for the heat pump algorithm, the script configuration table being used to characterize the algorithm identifiers of multiple preset sub-algorithms of the heat pump algorithm, preset associated parameters of the user terminal required to run the multiple preset sub-algorithms, and a first mapping relationship between the algorithm codes of the multiple preset sub-algorithms, the apparatus comprising: A receiving module is used to receive a calculation instruction sent by the user terminal, wherein the calculation instruction carries the user identifier of the user terminal; The acquisition module is used to, in response to the operation instruction, acquire the algorithm identifiers of multiple sub-algorithms of the heat pump algorithm that match the operation instruction and the associated parameters of the user terminal required to run the multiple sub-algorithms; The determining module is used to determine the algorithm code of multiple sub-algorithms based on the algorithm identifier and the first mapping relationship; The running module is used to run the heat pump algorithm based on the algorithm code of multiple sub-algorithms and the associated parameters, and obtain a first running result of the heat pump algorithm that matches the operation instruction. The first running result is used to characterize the solution method of the operation instruction. The preset sub-algorithm is configured to have multiple versions, each with a fixed version number; The script configuration table is also used to represent the second mapping relationship between the version number of the preset sub-algorithm and the region to which the user terminal belongs; The acquisition module includes: The identifier submodule is used to identify the identifiers included in the heat pump algorithm corresponding to the operation instruction; The identifier identification submodule is used to identify the algorithm identifiers of multiple sub-algorithms that match the operation instructions based on the identifier identifier; The region submodule is used to determine the region to which the user terminal belongs based on the user identifier; The version submodule is used to determine the version number of the sub-algorithm based on the region it belongs to and the second mapping relationship.

Citation Information

Patent Citations

  • Index rule generation method and device, electronic equipment and storage medium

    CN116090867A

  • Algorithm calling method and device, server and computer storage medium

    CN117492876A