CN-122019180-A - Control method of industrial edge computing terminal and electronic equipment
Abstract
The embodiment of the application provides a control method of an industrial edge computing terminal and electronic equipment. The method comprises the steps of classifying hardware resources of an industrial edge computing terminal to obtain types of all hardware resources and first numbers of all types of hardware resources, determining a plurality of target resources based on the types of the hardware resources and the first numbers of the hardware resources, enabling the target resources to be used for controlling the hardware resources, establishing corresponding relations between the hardware resources and the target resources, determining a mapping table based on the corresponding relations between the hardware resources and the target resources, receiving a first request, wherein the first request is used for requesting control of the hardware resources, the first request comprises the first target resources, and controlling the first hardware resources corresponding to the first target resources based on the mapping table and the first target resources. By the method, the problems of poor reusability and low development efficiency of the driver caused by dependence on specific hardware resources in the related technology are solved.
Inventors
- WANG SUNJUN
- Huang Zhangkai
- SHEN WENCHEN
- CHEN LIANG
- MA GANG
- ZHONG QIYI
- TIAN RUI
- LENG YUANYUAN
Assignees
- 杭州义益钛迪信息技术有限公司
Dates
- Publication Date
- 20260512
- Application Date
- 20260206
Claims (10)
- 1. A control method of an industrial edge computing terminal, comprising: Classifying the hardware resources of the industrial edge computing terminal to obtain the types of the hardware resources and the first quantity of the hardware resources; determining a plurality of target resources based on the type of the hardware resources and the plurality of first quantities, the target resources being used for controlling the hardware resources; Establishing a corresponding relation between each hardware resource and the target resource, and determining a mapping table based on the corresponding relation between each hardware resource and the target resource; receiving a first request for requesting control of a hardware resource, the first request including a first target resource; And controlling a first hardware resource corresponding to the first target resource based on the mapping table and the first target resource.
- 2. The method according to claim 1, wherein the establishing the correspondence between each hardware resource and the target resource includes: Determining storage addresses corresponding to a plurality of target resources; for any one hardware resource; establishing a corresponding relation between a target resource corresponding to a candidate storage address with the minimum associated evaluation value and the hardware resource; and the candidate storage addresses are storage addresses which do not establish a corresponding relation with the hardware resources in the storage addresses corresponding to the target resources.
- 3. The method of claim 2, wherein the determining the associated evaluation value of the hardware resource mapped to the candidate memory addresses that are unassigned from the memory addresses, for any one of the candidate memory addresses, comprises: Determining a type consistency score of the hardware resource and a target resource corresponding to the candidate storage address; determining a rank rationality score for the mapping of the hardware resource to the candidate storage address; determining the product of a first preset weight coefficient and the type consistency score as a first evaluation factor; determining the product of a second preset weight coefficient and the arrangement rationality score as a second evaluation factor; And determining the sum of the first evaluation factor and the second evaluation factor as an associated evaluation value of the mapping of the hardware resource to the candidate storage address.
- 4. The method according to claim 1, wherein the method further comprises: responding to the new adding operation of the hardware resources of the industrial edge computing terminal, classifying the new adding hardware resources to obtain the types of the new adding hardware resources and the second quantity of various new adding hardware resources; determining a plurality of newly added target resources based on the type of the newly added hardware resources and the plurality of second numbers; and establishing a corresponding relation between each newly-added hardware resource and the newly-added target resource, and updating the mapping table based on the corresponding relation between each newly-added hardware resource and the newly-added target resource.
- 5. The method of claim 1, wherein the controlling the first hardware resource corresponding to the first target resource based on the mapping table and the first target resource comprises: determining whether the first target resource exists in the mapping table; When the first target resource exists in the mapping table, controlling a first hardware resource corresponding to the first target resource based on the first target resource; When the first target resource does not exist in the mapping table, first alarm information is generated, the first alarm information is recorded in a log, and the first alarm information indicates that the first target resource is invalid.
- 6. The method of claim 5, wherein the method further comprises: recording a control result of controlling the first hardware resource corresponding to the first target resource based on the first target resource each time, wherein the control result is successful control or abnormal control; Determining the proportion of the number of control anomalies corresponding to the first target resource to the total number of control, wherein the total number of control is the sum of the number of successful control and the number of control anomalies; and when the proportion exceeds a preset abnormal threshold value, generating second alarm information, wherein the second alarm information indicates that the first hardware resource corresponding to the first target resource has configuration errors or faults or the first hardware resource corresponding to the first target resource is wrong.
- 7. The method according to claim 1, wherein after determining the mapping table based on the correspondence between the hardware resources and the target resources, the method further comprises: determining first equipment information of each hardware resource, wherein the first equipment information is used for indicating specification parameters of the hardware resource; and determining first text information describing the hardware resources corresponding to each target resource based on the first equipment information of each hardware resource and the mapping table.
- 8. The method of claim 7, wherein after the generating the second alert information, the method further comprises: Receiving second equipment information of each hardware resource input on a first interface in response to the second alarm information displayed on the first interface; Determining second text information of the hardware resources corresponding to each target resource based on the second equipment information of each hardware resource; Comparing the plurality of second text information with the mapping table, and determining whether the first hardware resource is matched with the second text information of the hardware resource corresponding to the first target resource; updating the first hardware resource corresponding to the first target resource based on the second text information of the hardware resource corresponding to each target resource and the mapping table when the first hardware resource is not matched with the second text information of the hardware resource corresponding to the first target resource; And when the first hardware resource is matched with the second text information of the hardware resource corresponding to the first target resource, determining that the first hardware resource corresponding to the first target resource has configuration errors or faults.
- 9. The method of claim 8, wherein updating the first hardware resource corresponding to the first target resource based on the second text information of the hardware resource controllable by each target resource and the mapping table comprises: Determining a second hardware resource corresponding to the first target resource based on the second text information of the hardware resource controllable by each target resource and the mapping table; updating a first hardware resource connected with a first target resource in a connection topological graph in the first interface to the second hardware resource, wherein the connection topological graph comprises the corresponding relation between each hardware resource and each target resource; Generating a differential configuration update instruction based on the first target resource and the second hardware resource; And updating the first hardware resource corresponding to the first target resource in the mapping table to the second hardware resource based on the differential configuration updating instruction.
- 10. An electronic device is characterized by comprising a memory and a processor; The memory stores computer-executable instructions; the processor executing computer-executable instructions stored in the memory, causing the processor to perform the method of any one of claims 1-9.
Description
Control method of industrial edge computing terminal and electronic equipment Technical Field The present application relates to the field of computers, and in particular, to a control method for an industrial edge computing terminal and an electronic device. Background The industrial edge computing terminal is used as a key node for connecting the physical equipment and the cloud platform and is used for bearing the core functions of data acquisition, real-time control, edge computing and the like. In the related art, a developer needs to write a special driver for hardware resources (such as various Input/Output (IO) interfaces and communication interfaces) of different industrial edge computing terminals, so as to control the hardware resources. However, in the related art, the special driver is written depending on adapting to specific hardware resources, so that the driver has poor compatibility, and multiplexing between different industrial edge computing terminals is difficult. Disclosure of Invention The embodiment of the application provides a control method of an industrial edge computing terminal and electronic equipment, which are used for improving multiplexing effects of a driver between different industrial edge computing terminals. In a first aspect, an embodiment of the present application provides a method for controlling an industrial edge computing terminal, including: classifying the hardware resources of the industrial edge computing terminal to obtain the types of the hardware resources and the first quantity of the hardware resources; Determining a plurality of target resources based on the type of the hardware resources and the plurality of first quantities, the target resources being used for controlling the hardware resources; Establishing a corresponding relation between each hardware resource and a target resource, and determining a mapping table based on the corresponding relation between each hardware resource and the target resource; Receiving a first request, wherein the first request is used for requesting control of a hardware resource, and the first request comprises a first target resource; and controlling the first hardware resource corresponding to the first target resource based on the mapping table and the first target resource. In some embodiments, establishing the correspondence between each hardware resource and the target resource includes: Determining storage addresses corresponding to a plurality of target resources; Determining the association evaluation value of the hardware resource mapped to each candidate storage address in the storage addresses according to any hardware resource, and establishing the corresponding relation between the target resource corresponding to the candidate storage address with the minimum association evaluation value and the hardware resource; the candidate storage addresses are storage addresses which do not establish corresponding relation with the hardware resources in the storage addresses corresponding to the target resources. In some embodiments, for any one candidate storage address, determining an associated evaluation value for mapping a hardware resource to each candidate storage address that is unassigned from the storage addresses includes: Determining a type consistency score of the hardware resource and a target resource corresponding to the candidate storage address; determining a layout rationality score for mapping the hardware resource to the candidate storage address; determining a product of a first preset weight coefficient and a type consistency score as a first evaluation factor; Determining the product of a second preset weight coefficient and the arrangement rationality score as a second evaluation factor; And determining the sum of the first evaluation factor and the second evaluation factor as an associated evaluation value of mapping the hardware resource to the candidate storage address. In some embodiments, the method further comprises: responding to the new adding operation of the hardware resources of the industrial edge computing terminal, classifying the new adding hardware resources to obtain the types of the new adding hardware resources and the second quantity of various new adding hardware resources; determining a plurality of newly added target resources based on the type of the newly added hardware resources and the plurality of second numbers; And establishing a corresponding relation between each newly-added hardware resource and the newly-added target resource, and updating a mapping table based on the corresponding relation between each newly-added hardware resource and the newly-added target resource. In some embodiments, controlling a first hardware resource corresponding to a first target resource based on a mapping table and the first target resource includes: determining whether a first target resource exists in the mapping table; When a first target resource exists in the mapping t