Photovoltaic inverter communication protocol search method, device and electronic device
Through slicing and fuzzy C-means clustering technology, combined with the optimization of historical search times, the efficiency of photovoltaic inverter communication protocol search is improved and the problem of slow matching speed in the existing technology is solved.
Patent Information
- Application Number
- CN202410736517.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-07
- Publication Date
- 2024-09-13
- Estimated Expiration
- 2044-06-07
AI Technical Summary
The existing photovoltaic inverter communication protocol search method has the problem of slow communication protocol matching, which makes protocol adaptation difficult during the photovoltaic data collection process.
Generate a list of non-duplicate terms by slicing the communication protocol names, construct a term matrix and perform fuzzy C-means clustering, determine the target category matrix, obtain photovoltaic inverter feature information, match its term vectors and place them in the target category matrix Find matching protocols and adjust sorting based on historical search times to improve search efficiency.
It significantly improves the efficiency of photovoltaic inverter communication protocol search, solves the problem of slow matching speed, and achieves faster protocol matching.
Smart Images

Figure CN118312542B
Abstract
Description
Technical Field
[0001] The present application relates to the field of communications, and in particular to a method, device and electronic equipment for searching a communication protocol of a photovoltaic inverter. Background Art
[0002] Due to standardization issues, there are many versions of photovoltaic inverter products, which means that it is difficult to adapt the photovoltaic inverter protocol during the photovoltaic data collection process.
[0003] The current method for searching the communication protocol of a photovoltaic inverter usually randomly or sequentially traverses the protocol database to see if the communication protocol matches the current photovoltaic inverter, which has the problem of slow communication protocol matching speed. Summary of the invention
[0004] The present invention provides a photovoltaic inverter communication protocol search method, device and electronic device to solve the problem of slow communication protocol matching speed in the current photovoltaic inverter communication protocol search method.
[0005] In a first aspect, the present invention provides a photovoltaic inverter communication protocol search method, the method comprising:
[0006] Slice the names of several communication protocols to obtain a target entry list without duplicates;
[0007] Based on the target term list, determining the term vectors of each of the communication protocols and integrating them to obtain a target term matrix;
[0008] Performing fuzzy C-means clustering on the communication protocols based on the target term matrix, and determining a target category matrix based on the clustering result, wherein different column elements in the target category matrix represent different types of communication protocols;
[0009] Acquire characteristic information of a target photovoltaic inverter, and determine and classify an entry vector of the target photovoltaic inverter based on the target entry list and the characteristic information of the target photovoltaic inverter;
[0010] In the target category matrix, a target column corresponding to the entry vector category of the target photovoltaic inverter is determined, and a target communication protocol matching the target photovoltaic inverter is searched in the target column.
[0011] In some of the embodiments, before searching the target column for a target communication protocol that matches the target photovoltaic inverter, the method further includes:
[0012] According to the historical search times of each communication protocol, adjusting the order of the elements in each column of the target category matrix;
[0013] The step of searching the target column for a target communication protocol that matches the target photovoltaic inverter comprises:
[0014] The target column is sequentially searched for a target communication protocol that matches the target photovoltaic inverter.
[0015] In some embodiments, the performing fuzzy C-means clustering on the plurality of communication protocols based on the target term matrix and determining the target category matrix based on the clustering results comprises:
[0016] Circularly calculating the cluster centers of different categories and the membership degree of the term vectors of each communication protocol and each cluster center;
[0017] The calculation formulas for cluster centers of different categories are as follows:
[0018]
[0019] The calculation formula of the term vector of each communication protocol and the degree of membership of each cluster center is as follows:
[0020]
[0021] in, i and k All represent category numbers. N represents the total number of categories, K i Indicates i The cluster centers of the categories, K k Indicates k The cluster centers of the categories, L represents the target term matrix, j represents the matrix row number, J Indicates the total number of communication protocols, L j Indicates the first j row elements, Indicates L j With i The degree of membership of a category, s represents the weight factor;
[0022] After the loop calculation is completed, the category of each communication protocol is determined and the target category matrix is constructed according to the term vector of each communication protocol and the degree of membership of each cluster center, and the cluster centers of different categories are used as index values of corresponding element columns in the target category matrix.
[0023] In some embodiments, adjusting the order of elements in each column of the target category matrix according to the historical search times of each of the communication protocols includes:
[0024] According to the historical search times of each of the communication protocols, a target search matrix corresponding to the target category matrix is constructed, wherein different column elements in the target search matrix represent the historical search times of different types of communication protocols respectively;
[0025] Calculate the query probability of each communication protocol in each category:
[0026]
[0027] Where Q represents the target search matrix, Represents the target search matrix i Ledi j row elements, express The query probability of the corresponding communication protocol, M Indicates the maximum number of single-category communication protocols;
[0028] Calculate the reverse probability of each of the communication protocols in different categories:
[0029]
[0030] in, express The inverse probability corresponding to the communication protocol, R represents the target category matrix, R k represents the target category matrix k Column elements, { }express The result is 1 if true, otherwise 0.
[0031] Calculate the lookup weight for each of the communication protocols in each category:
[0032]
[0033] in, express The search weight of the corresponding communication protocol;
[0034] According to the order of the search weights of the communication protocols in each category from large to small, the order of the elements in each column of the target category matrix is adjusted.
[0035] In some embodiments, the characteristic information of the target photovoltaic inverter includes the model, version and characteristic word of the target photovoltaic inverter.
[0036] In some of the embodiments, the historical search times include the search times within a dynamic historical time window.
[0037] In some of the embodiments, the weight factor is 2;
[0038] The number of loop calculations of the membership degree of the cluster centers of different categories and the term vectors of each communication protocol and each cluster center is 100.
[0039] In a second aspect, the present invention provides a photovoltaic inverter communication protocol search device, the device comprising:
[0040] The protocol slicing module is used to slice the names of several communication protocols to obtain a target entry list without duplicate items;
[0041] A term generation module, used to determine the term vectors of each of the communication protocols based on the target term list and integrate them to obtain a target term matrix;
[0042] A protocol classification module, used for performing fuzzy C-means clustering on the communication protocols based on the target term matrix, and determining a target category matrix based on the clustering result, wherein different column elements in the target category matrix represent different types of communication protocols;
[0043] A term classification module, used to obtain characteristic information of a target photovoltaic inverter, determine a term vector of the target photovoltaic inverter based on the target term list and the characteristic information of the target photovoltaic inverter, and classify the term vector;
[0044] The protocol matching module is used to determine a target column corresponding to the entry vector category of the target photovoltaic inverter in the target category matrix, and search for a target communication protocol matching the target photovoltaic inverter in the target column.
[0045] In a third aspect, the present invention provides an electronic device comprising a memory and a processor, wherein a computer program is stored in the memory, and the processor is configured to run the computer program to execute the photovoltaic inverter communication protocol search method described in the first aspect.
[0046] In a fourth aspect, the present invention provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the steps of the photovoltaic inverter communication protocol search method described in any one of the first aspects.
[0047] Compared with the related art, the photovoltaic inverter communication protocol search method provided by the present invention can greatly improve the protocol search efficiency compared to searching for the target communication protocol matching the target photovoltaic inverter in the entire protocol library, and solves the problem of slow communication protocol matching speed in the current photovoltaic inverter communication protocol search method.
[0048] Details of one or more embodiments of the present application are set forth in the following drawings and description to make other features, objects, and advantages of the present application more readily apparent. BRIEF DESCRIPTION OF THE DRAWINGS
[0049] Figure 1 is a flow chart of a photovoltaic inverter communication protocol search method provided in an embodiment of the present invention;
[0050] Figure 2 is a flow chart of a photovoltaic inverter communication protocol search method provided in a specific embodiment of the present invention;
[0051] Figure 3 4 is a structural diagram of a photovoltaic inverter communication protocol search device provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0052] In order to more clearly understand the purpose, technical solutions and advantages of the present application, the present application is described and illustrated below in conjunction with the accompanying drawings and embodiments.
[0053] Unless otherwise defined, the technical terms or scientific terms involved in this application shall have the general meaning understood by people with general skills in the technical field to which this application belongs. The words "one", "a", "the", "these" and the like in this application do not indicate a quantitative limitation, and they may be singular or plural. The terms "include", "comprise", "have" and any variants thereof involved in this application are intended to cover non-exclusive inclusions; for example, a process, method and system, product or device comprising a series of steps or modules (units) is not limited to the listed steps or modules (units), but may include unlisted steps or modules (units), or may include other steps or modules (units) inherent to these processes, methods, products or devices. The words "connect", "connected", "coupled" and the like involved in this application are not limited to physical or mechanical connections, but may include electrical connections, whether direct or indirect. The "multiple" involved in this application refers to two or more. "And / or" describes the association relationship of associated objects, indicating that there may be three relationships, for example, "A and / or B" may mean: A exists alone, A and B exist at the same time, and B exists alone. Generally, the character " / " indicates that the objects associated with each other are in an "or" relationship. The terms "first", "second", "third", etc. in this application are only used to distinguish similar objects and do not represent a specific ordering of the objects.
[0054] In an embodiment of the present invention, a photovoltaic inverter communication protocol search method is provided. Figure 1 is a flow chart of a photovoltaic inverter communication protocol search method provided in an embodiment of the present invention, such as Figure 1As shown, the process includes steps S110 to S150.
[0055] Step S110, slicing the names of several communication protocols to obtain a target entry list without duplicate items.
[0056] Specifically, the communication protocols to be matched are usually stored in the cloud. In this step, firstly, all the communication protocols to be matched in the cloud are collected; then the names of these communication protocols are sliced to obtain a series of name slices, where name slices refer to shorter entries in longer names; finally, duplicate entries are deleted to obtain a target entry list.
[0057] For example, if the protocol library in the cloud contains [Protocol 1: Huawei v3.0, Protocol 2: Maitian Energy v1.0, Protocol 3: Huawei Low Power v1.0], all names in the protocol library are sliced to obtain a target entry list without duplicate items. g =[Huawei, v3.0, Wheatfield Energy, v1.0, low power].
[0058] Step S120, based on the target term list, determine the term vectors of each communication protocol and integrate them to obtain a target term matrix.
[0059] Specifically, this step is mainly to determine the vector representation of each communication protocol. The term vector of each communication protocol is determined according to the position of the term contained in the name of the communication protocol in the target term list. The term vector of each communication protocol is used as a row of the target term matrix, so as to integrate and obtain the target term matrix.
[0060] For example, there is a target term list g =[Huawei, v3.0, Maitian Energy, v1.0, low power], then the term vectors of different communication protocols are as follows:
[0061] Huawei v3.0 entry vector l 1=[1, 1, 0, 0, 0], the entry vector of Wheatfield Energy v1.0 l 2=[0, 0, 1, 1, 0], entry vector of Huawei low power v1.0 l 3=[1, 0, 0, 1, 1].
[0062] A 1 in the term vector indicates that the communication protocol includes the term at the corresponding position in the target term list, and a 0 in the term vector indicates that the communication protocol does not include the term at the corresponding position in the target term list.
[0063] Will l 1. l 2 and l 3 Summarize and integrate to get the target term matrix L:
[0064]
[0065] Step S130, performing fuzzy C-means clustering on a number of communication protocols based on the target term matrix, and determining a target category matrix based on the clustering result, wherein different column elements in the target category matrix represent different types of communication protocols.
[0066] In the target term matrix, different row elements represent different communication protocols, and then different communication protocols can be classified based on the target term matrix. The classification method adopts fuzzy C-means clustering (FCM).
[0067] Specifically, step S130 includes step S131 and step S132.
[0068] Step S131, cyclically calculating the cluster centers of different categories and the membership degree of the term vectors of each communication protocol and each cluster center, and executing step S132 after the cyclic calculation is completed.
[0069] The calculation formulas for cluster centers of different categories are as follows:
[0070]
[0071] The calculation formula of the term vector of each communication protocol and the membership degree of each cluster center is as follows:
[0072]
[0073] in, i and k All represent category numbers. N represents the total number of categories, K i Indicates i The cluster centers of the categories, K k Indicates k The cluster centers of the categories, L represents the target term matrix, j represents the matrix row number, J represents the total number of communication protocols, that is, the total number of rows in the target term matrix, L j Indicates the first j The row element, that is, j communication protocols, Indicates L j With i The degree of membership of a category, s represents the weight factor. j The row element is the j communication protocols, It means the j Communication protocol iThe degree of membership of a category. i and Iterative cycle calculation, the two are coupled.
[0074] Specifically, before looping, you can first determine the total number of categories. N , weight factor s and the number of loop calculations T Etc., and then initialize the membership matrix u, the matrix elements are , which satisfies:
[0075]
[0076] In some of the embodiments, the weight factor is 2; the number of loop calculations of the membership of the cluster centers of different categories and the term vectors of each communication protocol with each cluster center is 100.
[0077] Step S132, according to the degree of membership between the term vector of each communication protocol and each cluster center, determine the category of each communication protocol and construct a target category matrix, and use the cluster centers of different categories as index values of corresponding element columns in the target category matrix.
[0078] Specifically, each communication protocol can be assigned to the type corresponding to the cluster center with the highest membership. In the target category matrix, different matrix elements represent different communication protocols, and elements in the same column represent the same type of communication protocols. The number of columns in the target category matrix is the total number of types of communication protocols. N , the number of rows of the target category matrix is the total number of the largest single-category communication protocols M Therefore, in this paper, i and k It also represents the matrix column number. For types with fewer communication protocols, the target type matrix can be padded with element 0. Then the target category matrix can be expressed as R, The total number of single-category communication protocols is the number of communication protocols belonging to the same category. Different categories may have different numbers of communication protocols. The cluster center can be expressed as K. .
[0079] Exemplarily, for step S131 and step S132, when the weight factor is 2, the number of loop calculations is 100, and the total number of types is 2, it can be obtained:
[0080]
[0081] The corresponding classification is: protocol 2 is type 1, and protocol 1 and protocol 3 are type 2. M =2, N =2, the target category matrix R is:
[0082]
[0083] Among them, element 2 represents protocol 2, elements 1 and 3 represent protocols 1 and 3 respectively, and element 0 complements type 1.
[0084] Step S140, acquiring characteristic information of the target photovoltaic inverter, determining the term vector of the target photovoltaic inverter based on the target term list and the characteristic information of the target photovoltaic inverter, and classifying the term vector.
[0085] Through the previous steps, the target category matrix has been obtained. In the target category matrix, different matrix elements represent different communication protocols, and elements in the same column represent the same type of communication protocols. At the same time, the cluster center of each category is used as the index value of the corresponding element column.
[0086] In this step, the target photovoltaic inverter is the photovoltaic inverter that needs to match the protocol. The characteristic information of the target photovoltaic inverter is usually uploaded by the protocol debugging transmission device, which mainly includes the model, version and characteristic word of the target photovoltaic inverter. As in step S120, based on the target term list, the characteristic information of the target photovoltaic inverter is converted into the term vector form, so as to obtain the term vector of the target photovoltaic inverter. Then, the distance between the term vector of the target photovoltaic inverter and each cluster center is calculated, and the category corresponding to the nearest cluster center is determined as the term vector category of the target photovoltaic inverter.
[0087] Step S150: determining a target column corresponding to the entry vector category of the target photovoltaic inverter in the target category matrix, and searching the target communication protocol matching the target photovoltaic inverter in the target column.
[0088] In this step, according to the entry vector category of the target photovoltaic inverter, the corresponding target column is determined in the target category matrix. The elements in the target column represent the same type of communication protocols, and are a group of communication protocols that best match the target photovoltaic inverter. Therefore, searching for the target communication protocol that matches the target photovoltaic inverter in the target column will greatly improve the efficiency of protocol search compared to searching for the target communication protocol that matches the target photovoltaic inverter in the entire protocol library, and solve the problem of slow communication protocol matching speed in the current photovoltaic inverter communication protocol search method.
[0089] In some of the embodiments, the method further includes step S160 before searching the target column for a target communication protocol that matches the target photovoltaic inverter.
[0090] Step S160: adjusting the order of the elements in each column of the target category matrix according to the historical search times of each communication protocol.
[0091] And step S150 specifically includes:
[0092] Sequentially search the target communication protocol that matches the target PV inverter in the target column.
[0093] According to the previous description, each column element in the target category matrix represents the same category of communication protocols. Considering that the development of events is temporally correlated, when the number of historical searches for a communication protocol is high, it can be said that the probability of matching the current target photovoltaic inverter is higher. Therefore, according to the number of historical searches for each communication protocol, the order of each column element in the target category matrix is adjusted, and the communication protocol with the most historical searches can be placed in the front row, and then searched in the order of arrangement, so that the target communication protocol matching the target photovoltaic inverter can be determined more quickly.
[0094] Furthermore, the historical search times include the search times within a dynamic historical time window, wherein the dynamic historical time window can be set to the previous day, that is, the search times of each communication protocol in the previous day are used as its own historical search times.
[0095] Step S160 specifically includes steps S161 to S165.
[0096] Step S161, constructing a target search matrix corresponding to the target category matrix according to the historical search times of each communication protocol, wherein different column elements in the target search matrix represent the historical search times of different types of communication protocols.
[0097] Among them, the target search matrix can be expressed as Q, The target search matrix corresponds to each element in the target category matrix one by one. For example, the first row and first column element in the target category matrix represents communication protocol 1, and the first row and first column element in the target search matrix represents the historical search times of communication protocol 1.
[0098] Step S162, calculating the query probability of each communication protocol in each category:
[0099]
[0100] Where Q represents the target search matrix, Represents the first i Ledi j row elements, express The query probability corresponding to the communication protocol, M Indicates the maximum number of single-class communication protocols.
[0101] Step S163, calculating the reverse probability of each communication protocol in different categories:
[0102]
[0103] in, express The inverse probability corresponding to the communication protocol, R represents the target category matrix, R k represents the target category matrix k Column elements, { }express The result is 1 if it is true, otherwise it is 0. express The result is 1 if true, otherwise 0.
[0104] Step S164, calculating the search weight of each communication protocol in each category:
[0105]
[0106] in, express The search weight of the corresponding communication protocol.
[0107] Step S165, adjusting the order of the elements in each column of the target category matrix according to the search weight of each communication protocol in each category from large to small.
[0108] Through the previous steps, the search weight of each communication protocol can be obtained. The communication protocol with a higher search weight has a higher probability of matching with the target photovoltaic inverter. Therefore, for each category of communication protocols, the communication protocol with a higher search weight is ranked first.
[0109] Specifically, the rearrangement can be performed in the following way. The adjusted target category matrix can be expressed as ,but:
[0110]
[0111] Among them, W i Indicates the i Column element, I i Indicates the corresponding i The sparse matrix of categories, , specifically except for i Line i The column element is 1 and all other elements are 0 N OK N Column square matrix.
[0112] For example, assume that:
[0113]
[0114] And calculate:
[0115]
[0116] when i =2:
[0117]
[0118] at this time:
[0119]
[0120] when i =1, the calculation process is similar, and we can get:
[0121]
[0122] Combining the two, we can get:
[0123]
[0124] As described above, at least one embodiment of each part of the photovoltaic inverter communication protocol search method provided by the present invention has been described respectively. It should be noted that the various parts of the photovoltaic inverter communication protocol search method can be combined using different embodiments to form different embodiments of the photovoltaic inverter communication protocol search method.
[0125] For example, in a specific overall embodiment, the photovoltaic inverter communication protocol search method includes:
[0126] Step S110, slicing the names of several communication protocols to obtain a target entry list without duplicate items.
[0127] Specifically, the communication protocols to be matched are usually stored in the cloud. In this step, firstly, all the communication protocols to be matched in the cloud are collected; then the names of these communication protocols are sliced to obtain a series of name slices, where name slices refer to shorter entries in longer names; finally, duplicate entries are deleted to obtain a target entry list.
[0128] Step S120, based on the target term list, determine the term vectors of each communication protocol and integrate them to obtain a target term matrix.
[0129] Specifically, this step is mainly to determine the vector representation of each communication protocol. The term vector of each communication protocol is determined according to the position of the term contained in the name of the communication protocol in the target term list. The term vector of each communication protocol is used as a row of the target term matrix, so as to integrate and obtain the target term matrix.
[0130] Step S131, cyclically calculating the cluster centers of different categories and the membership degree of the term vectors of each communication protocol and each cluster center, and executing step S132 after the cyclic calculation is completed.
[0131] The calculation formulas for cluster centers of different categories are as follows:
[0132]
[0133] The calculation formula of the term vector of each communication protocol and the membership degree of each cluster center is as follows:
[0134]
[0135] in, i and k All represent category numbers. N represents the total number of categories, K i Indicates i The cluster centers of the categories, K k Indicates k The cluster centers of the categories, L represents the target term matrix, j represents the matrix row number, J Indicates the total number of communication protocols, L j Indicates the first j row elements, Indicates L j With i The degree of membership of a category, s represents the weight factor. j The row element is the j communication protocols, It means the j Communication protocol i The degree of membership of a category. K i and Iterative cycle calculation, the two are coupled.
[0136] Specifically, before looping, you can first determine the total number of categories. N , weight factor s and the number of loop calculations T Etc., and then initialize the membership matrix u, the matrix elements are , which satisfies:
[0137]
[0138] The weight factor is 2; the number of loop calculations of the membership of the cluster centers of different categories and the term vectors of each communication protocol with each cluster center is 100.
[0139] Step S132, according to the degree of membership between the term vector of each communication protocol and each cluster center, determine the category of each communication protocol and construct a target category matrix, and use the cluster centers of different categories as index values of corresponding element columns in the target category matrix.
[0140] Specifically, each communication protocol can be assigned to the type corresponding to the cluster center with the highest membership. In the target category matrix, different matrix elements represent different communication protocols, and elements in the same column represent the same type of communication protocols. The number of columns in the target category matrix is the total number of types of communication protocols. N , the number of rows of the target category matrix is the total number of the largest single-category communication protocols M Therefore, in this paper, i and k It also represents the matrix column number. For types with fewer communication protocols, the target type matrix can be padded with elements 0. Then the target category matrix can be expressed as The total number of single-category communication protocols is the number of communication protocols belonging to the same category. Different categories may have different numbers of communication protocols.
[0141] Step S161, constructing a target search matrix corresponding to the target category matrix according to the historical search times of each communication protocol, wherein different column elements in the target search matrix represent the historical search times of different types of communication protocols.
[0142] Among them, the target search matrix can be expressed as The target search matrix corresponds to each element in the target category matrix one by one. For example, the first row and first column element in the target category matrix represents communication protocol 1, and the first row and first column element in the target search matrix represents the historical search times of communication protocol 1.
[0143] Step S162, calculating the query probability of each communication protocol in each category:
[0144]
[0145] Where Q represents the target search matrix, Represents the first i Ledi j row elements, express The query probability corresponding to the communication protocol, M Indicates the maximum number of single-class communication protocols.
[0146] Step S163, calculating the reverse probability of each communication protocol in different categories:
[0147]
[0148] in, express The inverse probability corresponding to the communication protocol, R represents the target category matrix, R k represents the target category matrix k Column elements, { }express The result is 1 if true, otherwise 0.
[0149] Step S164, calculating the search weight of each communication protocol in each category:
[0150]
[0151] in, express The search weight of the corresponding communication protocol.
[0152] Step S165, adjusting the order of the elements in each column of the target category matrix according to the search weight of each communication protocol in each category from large to small.
[0153] Step S140, acquiring characteristic information of the target photovoltaic inverter, determining the term vector of the target photovoltaic inverter based on the target term list and the characteristic information of the target photovoltaic inverter, and classifying the term vector.
[0154] Through the previous steps, the target category matrix has been obtained. In the target category matrix, different matrix elements represent different communication protocols, and elements in the same column represent the same type of communication protocols. At the same time, the cluster center of each category is used as the index value of the corresponding element column.
[0155] In this step, the target photovoltaic inverter is the photovoltaic inverter that needs to match the protocol. The characteristic information of the target photovoltaic inverter is usually uploaded by the protocol debugging transmission device, which mainly includes the model, version and characteristic word of the target photovoltaic inverter. As in step S120, based on the target term list, the characteristic information of the target photovoltaic inverter is converted into the term vector form, so as to obtain the term vector of the target photovoltaic inverter. Then, the distance between the term vector of the target photovoltaic inverter and each cluster center is calculated, and the category corresponding to the nearest cluster center is determined as the term vector category of the target photovoltaic inverter.
[0156] Step S150: determining a target column corresponding to the entry vector category of the target photovoltaic inverter in the target category matrix, and sequentially searching the target communication protocol matching the target photovoltaic inverter in the target column.
[0157] In this step, according to the entry vector category of the target photovoltaic inverter, the corresponding target column is determined in the target category matrix. The elements in the target column represent the same type of communication protocols, and are a group of communication protocols that best match the target photovoltaic inverter. Therefore, searching for the target communication protocol that matches the target photovoltaic inverter in the target column will greatly improve the efficiency of protocol search compared to searching for the target communication protocol that matches the target photovoltaic inverter in the entire protocol library, and solve the problem of slow communication protocol matching speed in the current photovoltaic inverter communication protocol search method.
[0158] In the embodiments of the present invention, a photovoltaic inverter communication protocol search device is also provided, which is used to implement the above embodiments and preferred implementation modes, and the descriptions that have been made will not be repeated. The terms "module", "unit", "subunit", etc. used below can implement a combination of software and / or hardware for a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceivable.
[0159] Figure 3 is a structural diagram of a photovoltaic inverter communication protocol search device provided in an embodiment of the present invention. Figure 3 , the photovoltaic inverter communication protocol search device includes:
[0160] The protocol slicing module is used to slice the names of several communication protocols to obtain a target entry list without duplicate items;
[0161] A term generation module, used to determine the term vectors of each communication protocol based on the target term list and integrate them to obtain a target term matrix;
[0162] The protocol classification module is used to perform fuzzy C-means clustering on several communication protocols based on the target term matrix, and determine the target category matrix based on the clustering results. Different column elements in the target category matrix represent different types of communication protocols.
[0163] A term classification module is used to obtain characteristic information of a target photovoltaic inverter, determine a term vector of the target photovoltaic inverter based on the target term list and the characteristic information of the target photovoltaic inverter, and classify the term vector;
[0164] The protocol matching module is used to determine the target column corresponding to the entry vector category of the target photovoltaic inverter in the target category matrix, and search for the target communication protocol matching the target photovoltaic inverter in the target column.
[0165] Each module in the photovoltaic inverter communication protocol search device is used to execute each step in the photovoltaic inverter communication protocol search method, and its principle is the same as that of executing the photovoltaic inverter communication protocol search method.
[0166] It should be noted that the above modules can be functional modules or program modules, and can be implemented by software or hardware. For modules implemented by hardware, the above modules can be located in the same processor; or the above modules can be located in different processors in any combination.
[0167] In the present invention, an electronic device is also provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor is configured to run the computer program to execute the photovoltaic inverter communication protocol search method provided by the present invention.
[0168] In the present invention, a computer-readable storage medium is also provided, on which a computer program is stored, characterized in that when the computer program is executed by a processor, the steps of the photovoltaic inverter communication protocol search method provided by the present invention are implemented.
[0169] It should be understood that the specific embodiments described herein are only used to explain the application, rather than to limit it. Based on the embodiments provided in this application, all other embodiments obtained by ordinary technicians in this field without creative work are within the protection scope of this application.
[0170] Obviously, the drawings are only some examples or embodiments of the present application. For ordinary technicians in the field, the present application can also be applied to other similar situations based on these drawings without creative work. In addition, it is understandable that although the work done in this development process may be complicated and lengthy, for ordinary technicians in the field, certain changes in design, manufacturing or production based on the technical content disclosed in this application are only conventional technical means and should not be regarded as insufficient content disclosed in this application.
Claims
1. A photovoltaic inverter communication protocol search method, characterized in that: The method comprises: Slice the names of several communication protocols to obtain a target entry list without duplicates; Based on the target term list, determining the term vectors of each of the communication protocols and integrating them to obtain a target term matrix; Circularly calculating the cluster centers of different categories and the membership degree of the term vectors of each communication protocol and each cluster center; The calculation formulas for cluster centers of different categories are as follows: , The calculation formula of the term vector of each communication protocol and the degree of membership of each cluster center is as follows: , in, i and k All represent category numbers. N represents the total number of categories, K i Indicates i The cluster centers of the categories, K k Indicates k The cluster centers of the categories, L represents the target term matrix, j represents the matrix row number, J Indicates the total number of communication protocols, L j Indicates the first j row elements, u ij Indicates L j With i The degree of membership of a category, s represents the weight factor; After the loop calculation is completed, the category of each communication protocol is determined according to the degree of membership of each term vector and each cluster center of each communication protocol, and a target category matrix is constructed, and the cluster centers of different categories are respectively used as index values of corresponding element columns in the target category matrix, and different column elements in the target category matrix represent different types of communication protocols; Acquire characteristic information of a target photovoltaic inverter, and determine and classify an entry vector of the target photovoltaic inverter based on the target entry list and the characteristic information of the target photovoltaic inverter; In the target category matrix, determining a target column corresponding to the entry vector category of the target photovoltaic inverter; According to the historical search times of each of the communication protocols, a target search matrix corresponding to the target category matrix is constructed, wherein different column elements in the target search matrix represent the historical search times of different types of communication protocols respectively; Calculate the query probability of each of the communication protocols in each category: , , Where Q represents the target search matrix, Q ij Represents the first i Ledi j Row elements, QP ij Indicates Q ij The query probability corresponding to the communication protocol, M Indicates the maximum total number of single-category communication protocols; Calculate the reverse probability of each of the communication protocols in different categories: , Among them, IP ij Indicates Q ij The inverse probability corresponding to the communication protocol, R represents the target category matrix, R k represents the target category matrix k Column element, {*} means * if the result is 1, otherwise it is 0; Calculate the lookup weight for each of the communication protocols in each category: , Among them, W ij Indicates Q ij The search weight of the corresponding communication protocol; According to the order of the search weights of the communication protocols in each category from large to small, the order of the elements in each column of the target category matrix is adjusted, and the target communication protocol matching the target photovoltaic inverter is sequentially searched in the target column.
2. The photovoltaic inverter communication protocol search method according to claim 1, characterized in that: The characteristic information of the target photovoltaic inverter includes the model, version and characteristic word of the target photovoltaic inverter.
3. The photovoltaic inverter communication protocol search method according to claim 1, characterized in that: The historical search times include the search times within a dynamic historical time window.
4. The photovoltaic inverter communication protocol search method according to claim 1, characterized in that: The weight factor is 2; The number of loop calculations of the membership degree of the cluster centers of different categories and the term vectors of each communication protocol and each cluster center is 100.
5. A photovoltaic inverter communication protocol search device, characterized in that: The device comprises: The protocol slicing module is used to slice the names of several communication protocols to obtain a target entry list without duplicate items; A term generation module, used to determine the term vectors of each of the communication protocols based on the target term list and integrate them to obtain a target term matrix; A protocol classification module, which is used to cyclically calculate the cluster centers of different categories and the membership degree of each of the term vectors of the communication protocols and each of the cluster centers. After the cyclic calculation is completed, the category of each of the communication protocols is determined according to the membership degree of each of the term vectors of the communication protocols and each of the cluster centers, and a target category matrix is constructed, and the cluster centers of different categories are respectively used as the index values of the corresponding element columns in the target category matrix, and the elements of different columns in the target category matrix represent different types of communication protocols; The calculation formulas for cluster centers of different categories are as follows: , The calculation formula of the term vector of each communication protocol and the degree of membership of each cluster center is as follows: , in, i and k All represent category numbers. N represents the total number of categories, K i Indicates i The cluster centers of the categories, K k Indicates k The cluster centers of the categories, L represents the target term matrix, j represents the matrix row number, J Indicates the total number of communication protocols, L j Indicates the first j row elements, u ij Indicates L j With i The degree of membership of a category, s represents the weight factor; A term classification module, used to obtain characteristic information of a target photovoltaic inverter, determine a term vector of the target photovoltaic inverter based on the target term list and the characteristic information of the target photovoltaic inverter, and classify the term vector; A protocol matching module is used to determine the target column corresponding to the entry vector category of the target photovoltaic inverter in the target category matrix, construct a target search matrix corresponding to the target category matrix according to the historical search times of each communication protocol, wherein different column elements in the target search matrix respectively represent the historical search times of different types of communication protocols, calculate the query probability of each communication protocol in each category, calculate the reverse probability of each communication protocol in different categories, calculate the search weight of each communication protocol in each category, adjust the order of each column element in the target category matrix according to the search weight of each communication protocol in each category from large to small, and sequentially search for the target communication protocol matching the target photovoltaic inverter in the target column; The calculation formula for the query probability of each communication protocol in each category is: , , Where Q represents the target search matrix, Q ij Represents the first i Ledi j Row elements, QP ij Indicates Q ij The query probability corresponding to the communication protocol, M Indicates the maximum total number of single-category communication protocols; The calculation formula of the reverse probability of each of the communication protocols in different categories is: , Among them, IP ij Indicates Q ij The inverse probability corresponding to the communication protocol, R represents the target category matrix, R k represents the target category matrix k Column element, {*} means * if the result is 1, otherwise it is 0; The calculation formula for the search weight of each communication protocol in each category is: , Among them, W ij Indicates Q ij The search weight of the corresponding communication protocol.
6. An electronic device comprising a memory and a processor, characterized in that: A computer program is stored in the memory, and the processor is configured to run the computer program to execute the photovoltaic inverter communication protocol search method according to any one of claims 1 to 4.
7. 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 photovoltaic inverter communication protocol search method described in any one of claims 1 to 4 are implemented.
Citation Information
Patent Citations
Method for personalized recommendation of Web text
CN104615779A
Text classification method of word vectors and terminal equipment
CN106294684A
String classification method and system and string classification equipment
CN107807987A
Vector database-based occupational information query method and device
CN117235137A
Item retrieval using query core intent detection
US20230401238A1
