Power supply and demand resource communication method and device, resource monitoring equipment and computer storage medium
By obtaining and generating communication protocols in resource monitoring equipment and converting protocol library files into target communication protocols, the problem of lack of unified standards for supply and demand power resource communication protocols in the prior art is solved, which improves communication efficiency and simplifies the protocol determination process. .
Patent Information
- Application Number
- CN202411626778.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-14
- Publication Date
- 2025-02-14
AI Technical Summary
In the prior art, the massive power supply and demand resources communication protocols on the user side lack unified standards, resulting in low efficiency in customized development of communication protocols. When the power supply and demand resources access changes, it is necessary to redevelop the communication protocol, resulting in low communication efficiency.
By obtaining the last called protocol library file and standard communication protocol in the resource monitoring device, generating communication protocols and sending them to power supply and demand resources, using the protocol library file to convert feedback data into a protocol library file identification feature set, and traversing the protocol library file until it is Find the corresponding mapping protocol library file, convert it into the target communication protocol, and establish communication with power supply and demand resources.
The communication efficiency between power supply and demand resources and resource monitoring equipment is improved, the steps of redeveloping communication protocols due to changes in power supply and demand resources are avoided, and the speed of determining the target communication protocol is accelerated.
Smart Images

Figure CN119449858A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of smart grid and distributed energy management technology, and in particular to a method and apparatus for communicating power supply and demand resources, a resource monitoring device, a computer-readable storage medium, and a computer program product. Background Art
[0002] With the continuous advancement of the country's construction of new power systems and new load management systems, massive distributed power supply and demand (power supply, power demand) power supply and demand resources such as energy, energy storage and loads that are widely distributed on the user side, such as distributed and distributed energy storage, air conditioners, charging piles, etc., are continuously connected to the power grid and participate in power grid interaction through power measurement systems such as smart electricity meters and power measurement terminal equipment. The master station needs to communicate and interact with these power supply and demand resources to realize the power supply and consumption status monitoring and operation status regulation of the power supply and demand resources.
[0003] There is currently no unified communication protocol standard for the massive supply and demand of electricity resources on the user side. Taking distributed photovoltaics as an example, the protocols of photovoltaic control devices from different manufacturers and different types are different. In order to monitor and regulate the supply and demand of electricity resources on the user side, when the resource monitoring equipment is connected to the measuring equipment for grid monitoring, it is necessary to develop customized communication protocols for different resource monitoring equipment.
[0004] However, the current customized communication protocol development method requires the development of new corresponding communication protocols once the connected power supply and demand resources change, resulting in low communication efficiency. Summary of the Invention
[0005] Based on this, it is necessary to provide a power supply and demand resource communication method, device, resource monitoring equipment, computer-readable storage medium and computer program product that can improve communication efficiency in response to the above technical problems.
[0006] In a first aspect, the present application provides a method for communicating power supply and demand resources, which is applied to a resource monitoring device, comprising:
[0007] When the resource monitoring device detects that the power supply and demand resource is connected to the resource monitoring device, the protocol library file and the standard communication protocol that were last called are obtained from the protocol library associated with the resource monitoring device;
[0008] Generate a communication protocol based on the protocol library file and the standard communication protocol, and send the communication protocol to the power supply and demand resource; the communication protocol is used by the power supply and demand resource to generate feedback data based on the communication protocol and return it to the resource monitoring device;
[0009] The feedback data is converted into a protocol library file identification feature set using the protocol library file, and all protocol library files are traversed until the protocol library file identification feature set has a corresponding mapping protocol library file in the pre-built set-file mapping relationship library, and the mapping protocol library file is determined as the target protocol library file;
[0010] The target protocol library file is used to convert the standard communication protocol into the target communication protocol corresponding to the power supply and demand resources, and communication with the power supply and demand resources is established through the target communication protocol.
[0011] In one embodiment, generating a communication protocol based on a protocol library file and a standard communication protocol, and sending the communication protocol to a power supply and demand resource includes:
[0012] Acquire a characteristic protocol based on a standard communication protocol; the characteristic protocol includes multiple data items;
[0013] The protocol library file is used to convert each data item into the corresponding communication protocol, and the communication protocol is sent to the power supply and demand resources.
[0014] In one embodiment, obtaining a characteristic protocol based on a standard communication protocol includes:
[0015] Identify protocol type information of the candidate data item contained in the standard communication protocol;
[0016] According to the protocol type information, a plurality of data items are determined from a plurality of candidate data items, and a characteristic protocol is obtained based on the plurality of data items.
[0017] In one embodiment, the method further comprises:
[0018] All protocol library files are traversed. If the protocol library file identification feature set does not have a corresponding mapping protocol library file in the set-file mapping relationship library, an identification failure message is generated and returned to the main station.
[0019] In an exemplary embodiment, generating identification failure information and returning it to the master station via the access device includes:
[0020] If the protocol library file identification feature set does not have a corresponding mapping protocol library file in the set-file mapping relationship library, traverse the remaining protocol library files stored in the protocol library associated with the resource monitoring device;
[0021] In the protocol library file identification feature set corresponding to the remaining protocol library files, if there is no corresponding mapping protocol library file in the set-file mapping relationship library, traverse the protocol library files stored in the full protocol library associated with the master station;
[0022] If the protocol library file identification feature set corresponding to the protocol library file stored in the full protocol library does not have a corresponding mapping protocol library file in the set-file mapping relationship library, an identification failure message is generated and returned to the main station.
[0023] In one embodiment, the full protocol library and the protocol library are constructed by the following steps:
[0024] Obtaining a sample communication protocol used by each power supply and demand resource to establish communication with the resource monitoring device, data demand information and similarity information of each power supply and demand resource, and general data demand information;
[0025] Generate a standard communication protocol based on similarity information and common data requirement information;
[0026] According to the standard communication protocol, sample communication protocol and data requirement information, the protocol library files corresponding to each power supply and demand resource are generated, and the full protocol library and protocol library are generated respectively based on multiple protocol library files.
[0027] In a second aspect, the present application further provides a power supply and demand resource communication device, which is applied to resource monitoring equipment, including:
[0028] An acquisition module is used to acquire the last called protocol library file and the standard communication protocol from the protocol library associated with the resource monitoring device when the resource monitoring device detects that the power supply and demand resource is connected to the resource monitoring device;
[0029] The protocol generation module is used to generate a communication protocol based on the protocol library file and the standard communication protocol, and send the communication protocol to the power supply and demand resources; the communication protocol is used for the power supply and demand resources to generate feedback data based on the communication protocol and return it to the resource monitoring device;
[0030] A traversal module is used to convert the feedback data into a protocol library file identification feature set using the protocol library file, traverse all the protocol library files until the protocol library file identification feature set has a corresponding mapping protocol library file in a pre-built set-file mapping relationship library, and determine the mapping protocol library file as the target protocol library file;
[0031] The communication establishment module is used to convert the standard communication protocol into the target communication protocol corresponding to the power supply and demand resources by using the target protocol library file, and establish communication with the power supply and demand resources through the target communication protocol.
[0032] In a third aspect, the present application further provides a resource monitoring device, including a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the following steps are implemented:
[0033] When the resource monitoring device detects that the power supply and demand resource is connected to the resource monitoring device, the protocol library file and the standard communication protocol that were last called are obtained from the protocol library associated with the resource monitoring device;
[0034] Generate a communication protocol based on the protocol library file and the standard communication protocol, and send the communication protocol to the power supply and demand resource; the communication protocol is used by the power supply and demand resource to generate feedback data based on the communication protocol and return it to the resource monitoring device;
[0035] The feedback data is converted into a protocol library file identification feature set using the protocol library file, and all protocol library files are traversed until the protocol library file identification feature set has a corresponding mapping protocol library file in the pre-built set-file mapping relationship library, and the mapping protocol library file is determined as the target protocol library file;
[0036] The target protocol library file is used to convert the standard communication protocol into the target communication protocol corresponding to the power supply and demand resources, and communication with the power supply and demand resources is established through the target communication protocol.
[0037] In a fourth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the following steps:
[0038] When the resource monitoring device detects that the power supply and demand resource is connected to the resource monitoring device, the protocol library file and the standard communication protocol that were last called are obtained from the protocol library associated with the resource monitoring device;
[0039] Generate a communication protocol based on the protocol library file and the standard communication protocol, and send the communication protocol to the power supply and demand resource; the communication protocol is used by the power supply and demand resource to generate feedback data based on the communication protocol and return it to the resource monitoring device;
[0040] The feedback data is converted into a protocol library file identification feature set using the protocol library file, and all protocol library files are traversed until the protocol library file identification feature set has a corresponding mapping protocol library file in the pre-built set-file mapping relationship library, and the mapping protocol library file is determined as the target protocol library file;
[0041] The target protocol library file is used to convert the standard communication protocol into the target communication protocol corresponding to the power supply and demand resources, and communication with the power supply and demand resources is established through the target communication protocol.
[0042] In a fifth aspect, the present application further provides a computer program product, comprising a computer program, which, when executed by a processor, implements the following steps:
[0043] When the resource monitoring device detects that the power supply and demand resource is connected to the resource monitoring device, the protocol library file and the standard communication protocol that were last called are obtained from the protocol library associated with the resource monitoring device;
[0044] Generate a communication protocol based on the protocol library file and the standard communication protocol, and send the communication protocol to the power supply and demand resource; the communication protocol is used by the power supply and demand resource to generate feedback data based on the communication protocol and return it to the resource monitoring device;
[0045] The feedback data is converted into a protocol library file identification feature set using the protocol library file, and all protocol library files are traversed until the protocol library file identification feature set has a corresponding mapping protocol library file in the pre-built set-file mapping relationship library, and the mapping protocol library file is determined as the target protocol library file;
[0046] The target protocol library file is used to convert the standard communication protocol into the target communication protocol corresponding to the power supply and demand resources, and communication with the power supply and demand resources is established through the target communication protocol.
[0047] The above-mentioned power supply and demand resource communication method, device, resource monitoring device, computer-readable storage medium and computer program product, when the resource monitoring device detects that the power supply and demand resource is connected to the resource monitoring device, first obtains the last called protocol library file and standard communication protocol from the protocol library associated with the resource monitoring device, then generates a communication protocol based on the protocol library file and the standard communication protocol, and sends the communication protocol to the power supply and demand resource. The power supply and demand resource generates feedback data based on the communication protocol and returns it to the resource monitoring device. Thereafter, the resource monitoring device uses the protocol library file to convert the feedback data into a protocol library file identification feature set, traverses all protocol library files until the protocol library file identification feature set has a corresponding mapping protocol library file in a pre-built set-file mapping relationship library, determines the mapping protocol library file as the target protocol library file, and finally uses the target protocol library file to convert the standard communication protocol into the target communication protocol corresponding to the power supply and demand resource, and establishes communication with the power supply and demand resource through the target communication protocol. When electric power supply and demand resources are newly connected to resource monitoring equipment, the pre-built protocol library files are exhaustively searched until a target protocol library file that meets the mapping is found, and the target protocol library file is used to convert the standard communication protocol into a target communication protocol. The target communication protocol is used to establish communication with the electric power supply and demand resources, thereby avoiding the need for the master station to redevelop the communication protocol when the electric power supply and demand resources are newly connected to the resource monitoring equipment, speeding up the determination of the target communication protocol, and thereby improving the communication efficiency between the electric power supply and demand resources and the resource monitoring equipment. BRIEF DESCRIPTION OF THE DRAWINGS
[0048] In order to more clearly illustrate the technical solutions in the embodiments of the present application or related technologies, the following briefly introduces the drawings required for use in the embodiments of the present application or related technical descriptions. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying any creative work.
[0049] FIG1 is a diagram illustrating an application environment of a method for communicating power supply and demand resources in one embodiment;
[0050] FIG2 is a schematic flow chart of a method for communicating power supply and demand resources in one embodiment;
[0051] FIG3 is a specific architecture diagram of a power grid monitoring and control system according to an embodiment;
[0052] FIG4 is a schematic diagram of a process for establishing a protocol library in another embodiment;
[0053] FIG5 is a schematic diagram of a process for establishing a feature protocol in one embodiment;
[0054] FIG6 is a schematic diagram of a process for constructing a collection-file mapping relationship library in another embodiment;
[0055] FIG7 is a flow chart of a method for communicating power supply and demand resources according to another embodiment;
[0056] FIG8 is a structural block diagram of a power supply and demand resource communication device according to one embodiment;
[0057] FIG9 is a diagram showing the internal structure of a resource monitoring device in one embodiment. DETAILED DESCRIPTION
[0058] In order to make the purpose, technical solutions and advantages of this application more clear, the following further describes this application in detail with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain this application and are not intended to limit this application.
[0059] The power supply and demand resource communication method provided in the embodiment of the present application can be applied to the application environment shown in Figure 1. Among them, the power supply and demand resources are connected to the resource monitoring device, and communicate with the resource monitoring device through their respective corresponding dedicated communication protocols. The resource monitoring device is connected to the main station, and the resource monitoring device communicates with the main station through the standard communication protocol. Among them, the main station is deployed with a full protocol library, which stores all the protocol library files, and the resource monitoring device is deployed with a protocol library, which stores the protocol library files used by the power supply and demand resources previously connected to the resource monitoring device. The protocol library files are used to realize the conversion between the standard communication protocol and the dedicated communication protocol.
[0060] When the resource monitoring device detects that the power supply and demand resource is connected to the resource monitoring device, the protocol library file and the standard communication protocol called last time are obtained from the protocol library associated with the resource monitoring device. Then, a communication protocol is generated based on the protocol library file and the standard communication protocol, and the communication protocol is sent to the power supply and demand resource. The power supply and demand resource generates feedback data based on the communication protocol and returns it to the resource monitoring device. The feedback file is converted into a protocol library file identification feature set using the protocol library file, and all protocol library files are traversed until the protocol library file identification feature set has a corresponding mapping protocol library file in a pre-built set-file mapping relationship library. The mapping protocol library file is determined as the target protocol library file. Finally, the target protocol library file is used to convert the standard communication protocol into the target communication protocol corresponding to the power supply and demand resource, and communication with the power supply and demand resource is established through the target communication protocol.
[0061] Among them, the master station can be an independent physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server providing cloud computing; the resource monitoring equipment can be equipment that realizes communication access to power supply and demand resources, local data collection or transparent transmission, and local analysis and calculation, such as smart electricity meters, measurement terminals, etc.; power supply and demand resources can be user-side power supply and demand resources, such as photovoltaic cells, energy storage, and charging piles.
[0062] In an exemplary embodiment, as shown in FIG2 , a method for communicating power supply and demand resources is provided, which is described by taking the method applied to the resource monitoring device in FIG1 as an example, and includes the following steps S201 to S204 . In particular:
[0063] Step S201 : when the resource monitoring device detects that the power supply and demand resource is connected to the resource monitoring device, the protocol library file and the standard communication protocol that were called last time are obtained from the protocol library associated with the resource monitoring device.
[0064] Among them, resource monitoring equipment can be understood as equipment that realizes communication access to power supply and demand resources, local data collection or transparent transmission, and local analysis and calculation, such as smart meters, measurement terminals, etc.; power supply and demand resources can be understood as user-side power supply and demand resources, such as photovoltaic cells, energy storage, and charging piles, etc.; protocol library files can be understood as files that can only convert between two protocols, and the conversion between standard communication protocols and special communication protocols is realized here.
[0065] Optionally, when the resource monitoring device detects that the power supply and demand resources are connected to the resource monitoring device, it is known that the power supply and demand resources here may be unknown new power supply and demand resources, or they may be connected devices that have lost communication with the resource monitoring device due to a disconnection. In order to speed up the determination of the target communication protocol, on the premise that the resource monitoring device has a record of the last time it connected to the power supply and demand resources, the last called protocol library file is obtained from the protocol library associated with the resource monitoring device as the starting point of exhaustive enumeration, and the standard communication protocol is obtained, which lays the data foundation for the subsequent determination of the target communication protocol, and using the last called protocol library file as the starting test file also speeds up the determination of the target protocol library file to a certain extent.
[0066] Step S202: Generate a communication protocol based on the protocol library file and the standard communication protocol, and send the communication protocol to the power supply and demand resource; the communication protocol is used by the power supply and demand resource to generate feedback data based on the communication protocol and return it to the resource monitoring device.
[0067] For example, the resource monitoring device selects the minimum characteristic protocol from the standard communication protocols that can be used to distinguish different communication protocols. It then uses the protocol library file to convert the minimum characteristic protocol into a communication protocol. This protocol is then sent to the power supply and demand resource. The power supply and demand resource generates feedback data in response to the communication protocol and returns it to the resource monitoring device. Selecting the minimum characteristic protocol from the standard communication protocols as the minimum unit for protocol library file conversion avoids the significant computing power cost associated with converting the standard communication protocols and simultaneously speeds up the determination of the target communication protocol.
[0068] In step S203, the feedback data is converted into a protocol library file identification feature set using the protocol library file, and all protocol library files are traversed until the protocol library file identification feature set has a corresponding mapping protocol library file in the pre-built set-file mapping relationship library, and the mapping protocol library file is determined as the target protocol library file.
[0069] Optionally, the resource monitoring device uses the protocol library file to convert the feedback data into a protocol file identification feature set. The constituent elements of the protocol file identification feature set here are unique, that is, only one of the same feedback data is retained to form a specific set, which ensures the simplicity of the data. Then, all protocol library files are traversed, including the unidentified protocol library files stored in the resource monitoring device and the protocol library files saved in the master station, until the protocol library file identification feature set exists in the pre-built set-file mapping relationship library.
[0070] Step S204 , using the target protocol library file, converting the standard communication protocol into a target communication protocol corresponding to the power supply and demand resource, and establishing communication with the power supply and demand resource through the target communication protocol.
[0071] For example, the resource monitoring device uses the target protocol library file to convert the standard communication protocol into the target communication protocol corresponding to the power supply and demand resource. This target communication protocol is then used to establish communication with the power supply and demand resource, allowing the power supply and demand resource to exchange data and transmit information with the resource monitoring device using the target communication protocol. Using the target communication protocol to establish communication between the power supply and demand resource and the resource monitoring device ensures the stability of communication between the power supply and demand resource, thereby improving the communication stability of the entire system.
[0072] In the above-mentioned power supply and demand resource communication method, when the resource monitoring device detects that the power supply and demand resource is connected to the resource monitoring device, it first obtains the last called protocol library file and standard communication protocol from the protocol library associated with the resource monitoring device, and then generates a communication protocol based on the protocol library file and the standard communication protocol, and sends the communication protocol to the power supply and demand resource. The power supply and demand resource generates feedback data based on the communication protocol and returns it to the resource monitoring device. After that, the resource monitoring device uses the protocol library file to convert the feedback data into a protocol library file identification feature set, traverses all protocol library files until the protocol library file identification feature set has a corresponding mapping protocol library file in the pre-built set-file mapping relationship library, and determines the mapping protocol library file as the target protocol library file. Finally, using the target protocol library file, the standard communication protocol is converted into the target communication protocol corresponding to the power supply and demand resource, and communication with the power supply and demand resource is established through the target communication protocol. When electric power supply and demand resources are newly connected to resource monitoring equipment, the pre-built protocol library files are exhaustively searched until a target protocol library file that meets the mapping is found, and the target protocol library file is used to convert the standard communication protocol into a target communication protocol. The target communication protocol is used to establish communication with the electric power supply and demand resources, thereby avoiding the need for the master station to redevelop the communication protocol when the electric power supply and demand resources are newly connected to the resource monitoring equipment, speeding up the determination of the target communication protocol, and thereby improving the communication efficiency between the electric power supply and demand resources and the resource monitoring equipment.
[0073] In one embodiment, a communication protocol is generated based on a protocol library file and a standard communication protocol, and the communication protocol is sent to power supply and demand resources, including: obtaining a characteristic protocol based on the standard communication protocol; the characteristic protocol includes multiple data items; using the protocol library file to convert each data item into a corresponding communication protocol, and sending the communication protocol to the power supply and demand resources.
[0074] Among them, the characteristic protocol can be understood as a set of data item sets of the standard communication protocol, which can be used to distinguish and identify the maximum data item set of different power supply and demand resource communication protocols.
[0075] Optionally, the resource monitoring device retrieves multiple data items that meet set conditions from a standard communication protocol, constructs a signature protocol from these data items, then uses a protocol library file to convert each data item into a corresponding communication protocol, and finally transmits the communication protocol to the power supply and demand resource. After constructing the signature protocol, the purpose-specific communication protocol typically has a smaller data payload and higher transmission efficiency, reducing unnecessary information exchange, improving the efficiency and speed of data transmission, and thus accelerating the traversal of all protocol library files.
[0076] In one embodiment, obtaining a characteristic protocol based on a standard communication protocol includes: identifying protocol type information of a candidate data item contained in the standard communication protocol; determining multiple data items from multiple candidate data items based on the protocol type information, and obtaining a characteristic protocol based on the multiple data items.
[0077] For example, the resource monitoring device identifies the protocol type information of the candidate data items contained in the standard communication protocol, and then determines multiple data items from the multiple candidate data items based on the protocol type information. The selection principle includes removing control or parameter setting protocols and retaining data acquisition protocols. Secondly, it can be used to distinguish at least two protocol library files, and finally obtains the characteristic protocol based on multiple data items. Avoiding the selection of control or parameter setting protocols and giving priority to data acquisition protocols effectively reduces security risks and ensures the stability and security of the system. Ensure that the selected protocol data items can effectively distinguish different protocol library files, so that the resource monitoring device can quickly identify and switch between multiple protocols, thereby improving the system's responsiveness.
[0078] In an exemplary embodiment, the method further includes: traversing all protocol library files, and if the protocol library file identification feature set does not have a corresponding mapping protocol library file in the set-file mapping relationship library, generating identification failure information and returning it to the main station.
[0079] Optionally, after traversing all protocol library files, if the final protocol library identification feature set does not have a corresponding mapping protocol library file in the set-file mapping relationship library, the resource monitoring device generates an identification failure message and returns it to the master station to notify it of access to an unidentifiable power supply and demand resource, waiting for the master station to issue a further instruction for exception handling. This mechanism, in which the resource monitoring device reports failure information to the master station when it cannot identify a protocol, improves the system's intelligent management level, enhances the flexibility and reliability of the power supply and demand resource monitoring process, and provides users with a richer and safer monitoring experience.
[0080] In one embodiment, an identification failure message is generated and returned to the main station through the access device, including: if the protocol library file identification feature set does not have a corresponding mapping protocol library file in the set-file mapping relationship library, traversing the remaining protocol library files stored in the protocol library associated with the resource monitoring device; if the protocol library file identification feature set corresponding to the remaining protocol library files does not have a corresponding mapping protocol library file in the set-file mapping relationship library, traversing the protocol library files stored in the full protocol library associated with the main station; if the protocol library file identification feature set corresponding to the protocol library file stored in the full protocol library does not have a corresponding mapping protocol library file in the set-file mapping relationship library, generating an identification failure message and returning to the main station.
[0081] Among them, the full protocol library file can be understood as the total set of all protocol library files, and the protocol library file can be understood as the protocol library file used to store the power supply and demand resources previously connected to the resource monitoring device can be understood as a subset of the total set.
[0082] For example, if the protocol library file identification feature set does not have a corresponding mapping protocol library file in the set-file mapping relationship library, the other unidentified protocol library files stored in the protocol library associated with the resource monitoring device are traversed. If the protocol library file identification feature set corresponding to the other unidentified protocol library files does not have a corresponding mapping protocol library file in the set-file mapping relationship library, the remaining unidentified protocol library files stored in the subjectively associated full protocol library are traversed in batches, and the remaining unidentified protocol library files less than the total number are traversed one by one. After the batch traversal is completed, if the protocol library file identification feature set corresponding to the protocol library file stored in the full protocol library does not have a corresponding mapping protocol library file in the set-file mapping relationship library, an identification failure message is generated and returned to the master station, waiting for the master station to issue a command for exception processing. Performing protocol library file identification in stages and layers can speed up protocol identification, reduce processing time, and thereby improve the communication efficiency between power supply and demand resources and resource monitoring equipment.
[0083] In one embodiment, the full protocol library and the protocol library are constructed by the following steps: obtaining the sample communication protocol used by each power supply and demand resource to establish communication with the resource monitoring device, the data requirement information and similarity information of each power supply and demand resource, and the general data requirement information; generating a standard communication protocol based on the similarity information and the general data requirement information; generating a protocol library file corresponding to each power supply and demand resource according to the standard communication protocol, the sample communication protocol and the data requirement information, and generating the full protocol library and the protocol library respectively based on multiple protocol library files.
[0084] Among them, data demand information includes but is not limited to the type, accuracy, frequency and application scenarios of data; similarity information can be understood as commonality, the similarities of different power supply and demand resources in function, data type, structure, environmental impact, technical management and interactive feedback; general data demand information can be understood as referring to the standardized data that all types of resource monitoring equipment connected to the power grid must collect and share in the power measurement system, covering basic information on power measurement, data format and transmission protocol, equipment status monitoring, user participation information and macro-dispatching data.
[0085] Optionally, the resource monitoring device obtains the sample communication protocol used by each power supply and demand resource to establish communication with the resource monitoring device, the data requirement information and similarity information of each power supply and demand resource, and the general data requirement information, and then generates a standard communication protocol for communication between the master station and the resource monitoring device based on the similarity information and the general data requirement information, and then generates a protocol library file corresponding to each power supply and demand resource based on the standard communication protocol, the sample communication protocol and the data requirement information, and finally constructs a full protocol library based on multiple protocol library files and sends it to the master station, and constructs a protocol library based on the protocol library files selected by the resource monitoring device and stores it in the resource monitoring device.
[0086] 1. Through the standard communication protocol generated based on similarity information and common data requirement information, various resource monitoring devices can maintain consistency in communication, reducing compatibility issues caused by different device types.
[0087] 2. A full protocol library is constructed by using protocol library files for multiple power supply and demand resources, effectively covering all power supply and demand resources in the current network and ensuring that the master station can support multiple types of resource monitoring devices. Historically used protocol library files are retained on the corresponding resource monitoring devices, facilitating rapid testing of the most likely protocol library files when new power supply and demand resources are connected to the resource monitoring device, which helps speed up the communication establishment between the new power supply and demand resources and the resource monitoring device.
[0088] 3. By reusing standardized protocols and protocol libraries, repetitive work in new equipment design is reduced.
[0089] In an exemplary embodiment, a specific implementation method for power supply and demand resource communication is provided. User-side power supply and demand resources (hereinafter referred to as power supply and demand resources) are connected to the power grid monitoring and control system via a power measurement system through resource monitoring equipment. The specific architecture is shown in Figure 3, where:
[0090] The master station is an information system that collects, analyzes, and stores power supply and demand resource data, as well as issues related monitoring commands. It stores a comprehensive library of power supply and demand resource communication protocols. Resource monitoring equipment facilitates communication access, local data collection or transparent transmission, and local analysis and calculation. Under the current power technology system, power supply and demand resources primarily utilize nearby electricity metering equipment, such as smart meters and measurement terminals. Resource monitoring equipment communicates with the master station using a standardized power communication protocol, while power supply and demand resources communicate with resource monitoring equipment using customized protocols. Resource monitoring equipment develops and implements automatic communication protocol recognition programs.
[0091] The protocol library is a collection of files that can be dynamically called by access devices and perform protocol conversion. It consists of a series of protocol library files. In the present invention, the protocol library files are designed to be able to convert only between two protocols to reduce the size of the protocol library files and adapt to the local communication environment. The protocol library files can be sent to the resource monitoring device through remote communication and local communication channels as needed.
[0092] For ease of description, the protocol S is defined as a standardized protocol for the power measurement system, which can be used for communication between the master station and the access device; the protocol set Z is defined as {z1,z2,..,z i ,..,z n} is a collection of protocols for various resource monitoring devices, where element z i Represents the protocol of the i-th resource monitoring device; define the protocol library L={l1,l2,..,l i ,..,l n}, where element l i It is a protocol library file that can be used for S and z i Conversion between protocols.
[0093] According to the above introduction, when the power supply and demand resources are connected to the resource monitoring device, the resource monitoring device does not know which protocol the power supply and demand resources use. k , that is, the resource monitoring device cannot determine which protocol library file to call for protocol conversion, and the resource monitoring device is usually an embedded device and cannot store the full amount of protocol library files. Therefore, a cloud-edge collaborative method is needed to find the protocol library file for S and z k Protocol conversion protocol library file l k .
[0094] To solve the above problem, define the protocol S1={a1,..,a i ,..,a n}, which is a subset of the data item set in protocol S, and is the largest data item set that can be used to distinguish different power supply and demand resource communication protocols. In this invention, it is called a characteristic protocol. The data item a of the characteristic protocoli After being converted into the corresponding protocol through the corresponding protocol library file, it can be sent to the corresponding power supply and demand resource. The power supply and demand resource may reply or not reply. The reply data can be converted into data item b in the S set through the corresponding protocol library conversion file. i , which is called the power supply and demand resource characteristic protocol; define T ai ={t0,t bi1 ,...,t bii ,...,t bin} is a i Feedback data b after sending i The feature set is called the receiving protocol feature, such as data length, data type, etc., where t0 is defined as the time it takes to send a i When the resource monitoring device responds to data, t0=1 means there is response data, and t0=0 means there is no response data. When t0=0, T ai Only t0 has a value, and the other elements should be empty elements; define To use the protocol library file l i The received protocol feature T obtained after sending all elements in the feature protocol S1 to the corresponding resource monitoring device ai The union of is called the protocol library file identification feature set, as mentioned above With l i There is a one-to-one correspondence between them, that is, through Can uniquely determine l i .
[0095] As mentioned above, the key to protocol adaptive communication is to find the protocol library file l k The idea of the present invention is that the resource monitoring device traverses and calls the protocol library file to send the characteristic protocol, and judges whether the protocol library file is the protocol library file for the power supply and demand resource by judging the characteristics of the reply protocol. k The following stages are included:
[0096] Phase 1: As shown in Figure 4, establish a protocol library:
[0097] Extensively collect various user-side power supply and demand resource protocols currently connected to the power grid, sort out the data requirements for the interaction between power supply and demand resources and the power grid, and develop a protocol library file between the standardized protocol S of the power measurement system and various power supply and demand resource protocols based on common and general data requirements. i If necessary, the standardized protocol S can be expanded as needed to build a relatively complete protocol library L, and the full protocol library L can be deployed on the master side. The commonly used protocol categories can be counted synchronously and the commonly used protocol library files L can be deployed on the master side. s Can be deployed in resource monitoring devices.
[0098] Phase 2: As shown in Figure 5, establish the characteristic protocol S1:
[0099] First, sort out the protocol feature categories, such as protocol data length, data type, possible data sets, etc.
[0100] Then select the protocol data item a from S according to the following principle i Construct feature protocol S1:
[0101] 1. For safety reasons i It cannot be a control or parameter setting protocol, and a data acquisition protocol is preferred;
[0102] 2.a i Corresponding T ai It should be able to distinguish at least two protocol library files;
[0103] 3. The resource monitoring device protocol type can be uniquely identified by combining the receiving protocol features corresponding to one or more protocol data items, and the corresponding protocol library file can be found for conversion between the resource monitoring device protocol and the standardized protocol, thereby realizing communication interaction of power supply and demand resources.
[0104] Phase 3: As shown in Figure 6, a mapping relationship library Ω is established between the received protocol feature combination and the protocol library file:
[0105] 1. Take the elements l in L in sequence i ;
[0106] 2. Through the protocol data receiving and sending software and protocol library files i To l i The corresponding resource monitoring device sends the protocol data item a in S1 j And record T aj ;
[0107] 3. After all the receiving protocol features corresponding to the elements in S1 are obtained, find the union of the receiving protocol features ;
[0108] 4. Record With l i The mapping relationship between i =< , l i >
[0109] 5. Take the next element in L and repeat steps 2-4 until the mapping between each element in L and the identification feature set of the protocol library file is completed, Ω={ω1...ω n}.
[0110] Phase 4: As shown in Figure 7, the protocol automatic identification process is started:
[0111] 1. Start the access monitoring function of the resource monitoring equipment of the power supply and demand resources on the user side and monitor the communication port for access to the power supply and demand resources;
[0112] 2. When the power supply and demand resources are connected, if there is a protocol library file that has been identified before (only the most recent identification is retained), load the historically identified protocol library file. m ;
[0113] 3. Start the protocol identification function and call l m After protocol conversion, each protocol item in S1 is sent to the power supply and demand resources in sequence, and the characteristics of the returned protocol are recorded to build a protocol library file identification feature set ;
[0114] 4. Search each element in Ω and check whether there is a satisfactory mapping, that is, whether Ω has The corresponding mapping;
[0115] 5. If there is a mapping that meets the requirements, the connected power supply and demand resources are identified as available. m Perform protocol conversion and communication, and the process ends;
[0116] 6. If there is no satisfactory mapping, continue to the next step;
[0117] 7. Call the locally stored protocol library L l Replace unrecognized protocol library files in m , then execute 3, 4, 5, if L l The identification has been completed and the process ends. If no suitable protocol library file is found, proceed to the next step.
[0118] 8. Apply for new protocol library L from the master station in batches c To avoid the full master station protocol library being too large, you can apply for a subset of the master station's protocol library, and then perform steps 3, 4, and 5 on the protocol library files therein to identify them. If the corresponding protocol library file is still not identified, continue to apply for a new protocol library from the master station;
[0119] 9. If the protocol library on the master side has also completed the identification but still cannot find a suitable protocol library file, a resource monitoring device that cannot be identified and accessed is sent to the master station, and the process ends.
[0120] Compared with the existing technology, this application has the following advantages:
[0121] 1. When an unknown power supply and demand resource is newly connected to the resource monitoring device, the resource monitoring device can use the exhaustive method to find the communication protocol that is compatible with the power supply and demand resource, thereby quickly establishing communication with the power supply and demand resource and improving communication efficiency.
[0122] 2. Compared with the communication protocol that directly stores power supply and demand resources, the protocol library files stored in the protocol library for converting communication protocols and standard communication protocols greatly increase the storage capacity of the protocol library and ensure the accuracy of the communication protocol.
[0123] 3. Avoid selecting control or parameter setting protocols and give priority to data acquisition protocols, which effectively reduces security risks and ensures the stability and security of the system; the feature protocol can effectively distinguish different protocol library files, allowing resource monitoring equipment to quickly identify and switch between multiple protocols, thereby improving the system's responsiveness.
[0124] It should be understood that, although the various steps in the flowcharts involved in the various embodiments described above are displayed in sequence according to the instructions of the arrows, these steps are not necessarily executed in sequence in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order restriction on the execution of these steps, and these steps can be executed in other orders. Moreover, at least a portion of the steps in the flowcharts involved in the various embodiments described above can include multiple steps or multiple stages, and these steps or stages are not necessarily executed and completed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a portion of steps or stages in other steps.
[0125] Based on the same inventive concept, an embodiment of the present application further provides a power supply and demand resource communication device for implementing the power supply and demand resource communication method described above. The implementation solution provided by this device is similar to the implementation solution described in the above method. Therefore, the specific limitations of one or more power supply and demand resource communication device embodiments provided below can be found in the above-mentioned limitations of the power supply and demand resource communication method and will not be repeated here.
[0126] In an exemplary embodiment, as shown in FIG8 , a power supply and demand resource communication device is provided, which is applied to a resource monitoring device and includes: an acquisition module 801 , a protocol generation module 802 , a traversal module 803 and a communication establishment module 804 , wherein:
[0127] The acquisition module 801 is used to acquire the last called protocol library file and the standard communication protocol from the protocol library associated with the resource monitoring device when the resource monitoring device detects that the power supply and demand resource is connected to the resource monitoring device;
[0128] The protocol generation module 802 is used to generate a communication protocol based on the protocol library file and the standard communication protocol, and send the communication protocol to the power supply and demand resource; the communication protocol is used by the power supply and demand resource to generate feedback data based on the communication protocol and return it to the resource monitoring device;
[0129] A traversal module 803 is configured to convert the feedback data into a protocol library file identification feature set using the protocol library file, traverse all protocol library files until the protocol library file identification feature set has a corresponding mapping protocol library file in a pre-built set-file mapping relationship library, and determine the mapping protocol library file as the target protocol library file;
[0130] The communication establishment module 804 is used to convert the standard communication protocol into a target communication protocol corresponding to the power supply and demand resource by using the target protocol library file, and establish communication with the power supply and demand resource through the target communication protocol.
[0131] In one embodiment, the protocol generation module 801 further includes:
[0132] The characteristic protocol acquisition submodule is used to obtain the characteristic protocol based on the standard communication protocol; the characteristic protocol includes multiple data items.
[0133] The protocol generation submodule is used to convert each data item into a corresponding communication protocol using the protocol library file and send the communication protocol to the power supply and demand resources.
[0134] In one embodiment, the characteristic protocol acquisition submodule is further used to identify protocol type information of candidate data items contained in the standard communication protocol; based on the protocol type information, multiple data items are determined from multiple candidate data items, and the characteristic protocol is obtained based on the multiple data items.
[0135] In an exemplary embodiment, the power supply and demand resource communication device also includes a mapping failure module for traversing all protocol library files. If the protocol library file identification feature set does not have a corresponding mapping protocol library file in the set-file mapping relationship library, an identification failure message is generated and returned to the main station.
[0136] In one embodiment, the mapping failure module is also used to traverse the remaining protocol library files stored in the protocol library associated with the resource monitoring device if there is no corresponding mapping protocol library file in the set-file mapping relationship library for the protocol library file identification feature set; and to traverse the protocol library files stored in the full protocol library associated with the master station if there is no corresponding mapping protocol library file in the set-file mapping relationship library for the protocol library file identification feature set corresponding to the remaining protocol library files; and to generate identification failure information and return it to the master station if there is no corresponding mapping protocol library file in the set-file mapping relationship library for the protocol library file identification feature set corresponding to the protocol library file stored in the full protocol library.
[0137] In one embodiment, the power supply and demand resource communication device also includes a protocol library construction module, which is used to obtain sample communication protocols used by each power supply and demand resource to establish communication with the resource monitoring equipment, data requirement information and similarity information of each power supply and demand resource, and general data requirement information; based on the similarity information and general data requirement information, a standard communication protocol is generated; according to the standard communication protocol, the sample communication protocol and the data requirement information, a protocol library file corresponding to each power supply and demand resource is generated, and a full protocol library and a protocol library are generated respectively based on multiple protocol library files.
[0138] Each module in the above-mentioned power supply and demand resource communication device can be implemented in whole or in part through software, hardware, or a combination thereof. Each module can be embedded in or independent of the processor in the resource monitoring device in hardware form, or can be stored in the memory of the resource monitoring device in software form, so that the processor can call and execute the corresponding operations of each module.
[0139] In an exemplary embodiment, a resource monitoring device is provided. The resource monitoring device may be a terminal, and its internal structure may be shown in Figure 9. The resource monitoring device includes a processor, memory, an input / output interface, a communication interface, a display unit, and an input device. The processor, memory, and input / output interface are connected via a system bus, and the communication interface, display unit, and input device are connected to the system bus via the input / output interface. The processor of the resource monitoring device provides computing and control capabilities. The memory of the resource monitoring device includes a non-volatile storage medium and internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operating system and computer program stored in the non-volatile storage medium. The input / output interface of the resource monitoring device is used to exchange information between the processor and external devices. The communication interface of the resource monitoring device is used to communicate with external terminals via wired or wireless communication. The wireless communication may be achieved via Wi-Fi, a mobile cellular network, near field communication (NFC), or other technologies. When executed by the processor, the computer program implements a method for communicating power supply and demand resources. The display unit of the resource monitoring device is used to produce a visually visible image and can be a display screen, a projection device, or a virtual reality imaging device. The display screen can be a liquid crystal display or an electronic ink display screen. The input device of the resource monitoring device can be a touch screen layer covering the display screen, or can be a keypad, trackball, or touchpad provided on the housing of the resource monitoring device, or can be an external keyboard, touchpad, or mouse.
[0140] Those skilled in the art will understand that the structure shown in Figure 9 is merely a block diagram of a portion of the structure related to the solution of the present application, and does not constitute a limitation on the resource monitoring device to which the solution of the present application is applied. The specific resource monitoring device may include more or fewer components than shown in the figure, or combine certain components, or have a different component arrangement.
[0141] In an exemplary embodiment, a resource monitoring device is provided, including a memory and a processor. The memory stores a computer program, and the processor implements the power supply and demand resource communication method of the above embodiment when executing the computer program.
[0142] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the power supply and demand resource communication method of the above embodiment is implemented.
[0143] In one embodiment, a computer program product is provided, including a computer program. When the computer program is executed by a processor, the power supply and demand resource communication method of the above embodiment is implemented.
[0144] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant regulations.
[0145] Those skilled in the art will understand that all or part of the processes in the above-mentioned embodiments can be implemented by instructing the relevant hardware through a computer program. The computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. In particular, any reference to memory, database, or other media used in the embodiments provided in this application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The databases involved in the various embodiments provided herein may include at least one of a relational database and a non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the various embodiments provided herein may be, but are not limited to, general-purpose processors, central processing units (CPUs), graphics processing units (GPUs), digital signal processors (DSPs), programmable logic devices (PLDs), quantum computing-based data processing logic devices, artificial intelligence (AI) processors, and the like.
[0146] The technical features of the above embodiments can be combined arbitrarily. In order to make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.
[0147] The above-described embodiments merely represent several implementation methods of the present application. While the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the present application. It should be noted that a person of ordinary skill in the art may make various modifications and improvements without departing from the spirit of the present application, and these modifications and improvements fall within the scope of protection of the present application. Therefore, the scope of protection of the present application shall be determined by the appended claims.
Claims
1. A method for communicating power supply and demand resources, characterized in that: Applied to a resource monitoring device, the method comprises: When the resource monitoring device detects that the power supply and demand resource is connected to the resource monitoring device, obtaining the protocol library file and the standard communication protocol called last time from the protocol library associated with the resource monitoring device; Generate a communication protocol according to the protocol library file and the standard communication protocol, and send the communication protocol to the power supply and demand resource; the communication protocol is used by the power supply and demand resource to generate feedback data based on the communication protocol and return it to the resource monitoring device; The feedback data is converted into a protocol library file identification feature set by using the protocol library file, and all the protocol library files are traversed until the protocol library file identification feature set has a corresponding mapping protocol library file in a pre-built set-file mapping relationship library, and the mapping protocol library file is determined as a target protocol library file; The target protocol library file is used to convert the standard communication protocol into a target communication protocol corresponding to the power supply and demand resource, and communication with the power supply and demand resource is established through the target communication protocol.
2. The method according to claim 1, characterized in that The generating of the communication protocol according to the protocol library file and the standard communication protocol, and sending the communication protocol to the power supply and demand resource comprises: Acquire a characteristic protocol based on the standard communication protocol; the characteristic protocol includes multiple data items; The protocol library file is used to convert each of the data items into a corresponding communication protocol, and the communication protocol is sent to the power supply and demand resource.
3. The method according to claim 2, characterized in that The acquiring of the characteristic protocol based on the standard communication protocol comprises: Identifying protocol type information of the candidate data item contained in the standard communication protocol; According to the protocol type information, a plurality of the data items are determined from a plurality of candidate data items, and the characteristic protocol is obtained based on the plurality of the data items.
4. The method according to claim 1, characterized in that: The method further comprises: All the protocol library files are traversed. If the protocol library file identification feature set does not have a corresponding mapping protocol library file in the set-file mapping relationship library, an identification failure message is generated and returned to the main station.
5. The method according to claim 4, characterized in that The generating of identification failure information and returning the information to the master station through the access device includes: If the protocol library file identification feature set does not have a corresponding mapping protocol library file in the set-file mapping relationship library, traverse the remaining protocol library files stored in the protocol library associated with the resource monitoring device; In the protocol library file identification feature set corresponding to the remaining protocol library files, if there is no corresponding mapping protocol library file in the set-file mapping relationship library, traverse the protocol library files stored in the full protocol library associated with the master station; If the protocol library file identification feature set corresponding to the protocol library file stored in the full protocol library does not have a corresponding mapping protocol library file in the set-file mapping relationship library, an identification failure message is generated and returned to the main station.
6. The method according to claim 5, characterized in that The full protocol library and the protocol library are constructed by the following steps: Acquire a sample communication protocol used by each of the power supply and demand resources to establish communication with the resource monitoring device, data requirement information and similarity information of each of the power supply and demand resources, and general data requirement information; generating the standard communication protocol based on the similarity information and the general data requirement information; According to the standard communication protocol, the sample communication protocol and the data requirement information, a protocol library file corresponding to each of the power supply and demand resources is generated, and based on a plurality of the protocol library files, the full protocol library and the protocol library are respectively generated.
7. A power supply and demand resource communication device, characterized in that: Application resource monitoring equipment, the device comprising: An acquisition module, configured to acquire the protocol library file and the standard communication protocol last called from the protocol library associated with the resource monitoring device when the resource monitoring device detects that the power supply and demand resources are connected to the resource monitoring device; A protocol generation module, used to generate a communication protocol according to the protocol library file and the standard communication protocol, and send the communication protocol to the power supply and demand resource; the communication protocol is used for the power supply and demand resource to generate feedback data based on the communication protocol and return it to the resource monitoring device; A traversal module, used to convert the feedback data into a protocol library file identification feature set using the protocol library file, traverse all the protocol library files until the protocol library file identification feature set has a corresponding mapping protocol library file in a pre-built set-file mapping relationship library, and determine the mapping protocol library file as a target protocol library file; The communication establishment module is used to use the target protocol library file to convert the standard communication protocol into a target communication protocol corresponding to the power supply and demand resource, and establish communication with the power supply and demand resource through the target communication protocol.
8. A resource monitoring device, comprising a memory and a processor, wherein the memory stores a computer program, characterized in that: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 6 are implemented.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.
10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.