Line feature extraction method and device of image, electronic equipment
By constructing a distributed computing power pool, predicting computing power requirements and optimizing network transmission, and selecting the optimal computing power node for image line feature extraction, the problem of poor processing performance in existing technologies is solved, and the efficiency and energy efficiency of image feature extraction are improved.
Patent Information
- Application Number
- CN202211349555.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-10-31
- Publication Date
- 2026-04-17
- Estimated Expiration
- 2042-10-31
AI Technical Summary
In existing technologies, the line feature extraction methods selected by users have poor processing performance on the images to be processed, resulting in a decrease in image feature extraction performance, which is particularly evident when processing massive amounts of images.
By constructing a distributed computing power pool, the computing power requirements of each computing power node are estimated, the optimal line feature extraction operator is selected, and the target computing power node is determined from the candidate computing power nodes based on the computing power requirements, latency and energy consumption indicators to extract image line features.
The performance of image line feature extraction has been improved by optimizing the allocation of computing resources and network transmission paths, thereby increasing processing efficiency and energy efficiency.
Smart Images

Figure CN115908840B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of image processing technology, and in particular to methods, apparatus, electronic devices, and computer-readable storage media for extracting line features from images. Background Technology
[0002] Information infrastructure resources (such as computing, storage, and networks) are becoming increasingly important in scientific research and daily work and life, and users across various industries need to comprehensively utilize these resources to meet their ever-changing needs. However, from the perspective of resource construction and ownership, most enterprise users or individuals do not possess sufficient resource reserves, and they require a flexible way to acquire and use resources. From the perspective of resource provision, the ownership of information infrastructure resources is also decentralized, making it difficult for any single party to control all resources. Therefore, the industry has been researching technologies for resource integration and utilization to provide flexible and feasible overall solutions and improve resource utilization efficiency. From early grid computing and fog computing to today's cloud computing, various types of solutions have emerged, and the concept of "computing power networks" has attracted widespread attention in recent years. "Computing power," or computing resources, has become an important basic resource in the digital age and can be applied to various scenarios.
[0003] Line features are crucial one-dimensional image features, holding significant research value and wide applications in digital image processing, computer vision, and pattern recognition. Various methods exist for extracting line features, each with varying performance characteristics. Currently, users typically select a single method for line feature extraction in engineering projects. If the chosen method performs poorly on the image being processed, it can lead to a sharp decline in image feature extraction performance, especially with massive datasets.
[0004] Therefore, how to leverage network computing power to improve the performance of line feature extraction from images is a problem that this application needs to solve. Summary of the Invention
[0005] This application provides a method, apparatus, and electronic device for extracting line features from images, which can improve the performance of line feature extraction from images.
[0006] In a first aspect, embodiments of this application disclose a method for extracting line features from an image, comprising:
[0007] Based on the image line feature extraction request, obtain the image to be processed;
[0008] Estimate the computational power requirement of each line feature extraction operator in each distributed computing node when performing line feature extraction on the image to be processed;
[0009] Based on the computational power requirement value of the operator, determine the computational power requirement value corresponding to the computational power node and the preferred line feature extraction operator;
[0010] Based on the computing power demand value and the idle computing power of the computing power nodes, candidate computing power nodes are obtained from the computing power nodes;
[0011] Obtain the latency and energy consumption values corresponding to each candidate computing node;
[0012] Based on the computing power requirement value, the latency index value, and the energy consumption index value, a target computing power node matching the image line feature extraction request is determined from the candidate computing power nodes, so as to extract line features from the image to be processed through the preferred line feature extraction operator of the target computing power node.
[0013] Optionally, the estimated computational power requirement value for each line feature extraction operator in each distributed computing node when performing line feature extraction on the image to be processed includes:
[0014] A specified number of the images to be processed are randomly selected as sample images and sent to each of the distributed computing power nodes respectively;
[0015] The image to be processed is extracted by each line feature extraction operator in the computing power node, and the sample computing power requirement value corresponding to each line feature extraction operator is obtained.
[0016] Based on the specified quantity, the total number of images to be processed, and the sample computing power requirement, the corresponding operator computing power requirement value is obtained when each line feature extraction operator performs line feature extraction on the image to be processed.
[0017] Optionally, determining the computing power requirement value corresponding to the computing power node and the preferred line feature extraction operator based on the operator computing power requirement value includes:
[0018] Determine the minimum value of the operator's computing power requirement, and use it as the computing power requirement value corresponding to the computing power node;
[0019] The line feature extraction operator corresponding to the minimum value of the operator's computing power requirement is determined as the preferred line feature extraction operator for the computing power node.
[0020] Optionally, obtaining the latency and energy consumption values corresponding to each candidate computing node includes:
[0021] Obtain the network transmission paths corresponding to scheduling the image line feature extraction request to the candidate computing power node;
[0022] Preset latency information is obtained for each network transmission path, and the preset latency information is aggregated to obtain the latency index value corresponding to each candidate computing power node. The preset latency information includes one or more of the following: the transmission latency of the image line feature extraction request accessing the candidate computing power node, the processing latency of the candidate computing power node, the wide area network transmission latency from the candidate computing power node to the cloud data center, and the computing latency of the cloud data center; wherein the cloud data center is used to allocate line feature extraction tasks to the computing power nodes.
[0023] Obtain preset energy consumption information on each of the network transmission paths, and aggregate the preset energy consumption information to obtain the energy consumption index value corresponding to each candidate computing power node. The preset energy consumption information includes one or more of the following: wireless transmission energy consumption, energy consumption of the candidate computing power node, WAN energy consumption from the candidate computing power node to the cloud data center, and cloud data center energy consumption.
[0024] Optionally, the image line feature extraction request carries requirement option information, and determining the target computing power node matching the image line feature extraction request from the candidate computing power nodes based on the computing power requirement value, the latency index value, and the energy consumption index value includes:
[0025] In response to the requirement option information indicating timeliness priority, the candidate computing power node with the shortest latency matching the latency index value is selected as the target computing power node corresponding to the image line feature extraction request; or...
[0026] In response to the requirement option information indicating energy saving priority, the resource consumption index value corresponding to each candidate computing power node is obtained according to the computing power requirement value and the energy consumption index value; according to the resource consumption index value, the candidate computing power node with the least resource consumption is selected as the target computing power node corresponding to the image line feature extraction request.
[0027] Optionally, determining the target computing power node matching the image line feature extraction request from the candidate computing power nodes based on the computing power requirement value, the latency index value, and the energy consumption index value includes:
[0028] Based on the computing power requirement value and the energy consumption index value, obtain the resource consumption information corresponding to the candidate computing power node; and based on the latency index value, obtain the time consumption information corresponding to the candidate computing power node.
[0029] Output the resource consumption information and time consumption information corresponding to each candidate computing power node, so that the user can select the candidate computing power node based on the resource consumption information and the time consumption information;
[0030] The candidate computing power node selected by the user is used as the target computing power node corresponding to the image line feature extraction request.
[0031] Secondly, embodiments of this application disclose an image line feature extraction apparatus, comprising:
[0032] The image acquisition module is used to acquire the image to be processed based on the image line feature extraction request;
[0033] The operator computing power requirement estimation module is used to estimate the operator computing power requirement value corresponding to each line feature extraction operator in each distributed computing power node when performing line feature extraction on the image to be processed;
[0034] The computing power node computing power requirement and optimization operator determination module is used to determine the computing power requirement value and the optimization line feature extraction operator corresponding to the computing power node based on the operator computing power requirement value;
[0035] The candidate computing power node acquisition module is used to acquire candidate computing power nodes from the computing power nodes based on the computing power demand value and the idle computing power of the computing power nodes;
[0036] The latency and energy consumption acquisition module is used to acquire the latency index value and energy consumption index value corresponding to each candidate computing power node;
[0037] The computing power node determination module is used to determine the target computing power node matching the image line feature extraction request from the candidate computing power nodes based on the computing power demand value, the latency index value and the energy consumption index value, so as to extract line features from the image to be processed through the preferred line feature extraction operator of the target computing power node.
[0038] Optionally, the operator computing power demand estimation module is further used for:
[0039] A specified number of the images to be processed are randomly selected as sample images and sent to each of the distributed computing power nodes respectively;
[0040] The image to be processed is extracted by each line feature extraction operator in the computing power node, and the sample computing power requirement value corresponding to each line feature extraction operator is obtained.
[0041] Based on the specified quantity, the total number of images to be processed, and the sample computing power requirement, the corresponding operator computing power requirement value is obtained when each line feature extraction operator performs line feature extraction on the image to be processed.
[0042] Optionally, determining the computing power requirement value corresponding to the computing power node and the preferred line feature extraction operator based on the operator computing power requirement value includes:
[0043] The minimum value of the operator's computing power requirement is determined as the computing power requirement value corresponding to the computing power node, and the line feature extraction operator corresponding to the minimum value of the operator's computing power requirement is determined as the preferred line feature extraction operator for the computing power node.
[0044] Optionally, the latency and energy consumption acquisition module is further used for:
[0045] Obtain the network transmission paths corresponding to scheduling the image line feature extraction request to the candidate computing power node;
[0046] Preset latency information is obtained for each network transmission path, and the preset latency information is aggregated to obtain the latency index value corresponding to each candidate computing power node. The preset latency information includes one or more of the following: the transmission latency of the image line feature extraction request accessing the candidate computing power node, the processing latency of the candidate computing power node, the wide area network transmission latency from the candidate computing power node to the cloud data center, and the computing latency of the cloud data center; wherein the cloud data center is used to allocate line feature extraction tasks to the computing power nodes.
[0047] Obtain preset energy consumption information on each of the network transmission paths, and aggregate the preset energy consumption information to obtain the energy consumption index value corresponding to each candidate computing power node. The preset energy consumption information includes one or more of the following: wireless transmission energy consumption, energy consumption of the candidate computing power node, WAN energy consumption from the candidate computing power node to the cloud data center, and cloud data center energy consumption.
[0048] Optionally, the image line feature extraction request carries requirement option information, and the computing power node determination module is further used for:
[0049] In response to the requirement option information indicating timeliness priority, the candidate computing node with the shortest latency matching the latency index value is selected as the computing node corresponding to the image line feature extraction request; or...
[0050] In response to the requirement option information indicating energy saving priority, the resource consumption index value corresponding to each candidate computing power node is obtained according to the computing power requirement value and the energy consumption index value; according to the resource consumption index value, the candidate computing power node with the least resource consumption is selected as the computing power node corresponding to the image line feature extraction request.
[0051] Optionally, the computing node determination module is further configured to:
[0052] Based on the computing power requirement value and the energy consumption index value, obtain the resource consumption information corresponding to the candidate computing power node; and based on the latency index value, obtain the time consumption information corresponding to the candidate computing power node.
[0053] Output the resource consumption information and time consumption information corresponding to each candidate computing power node, so that the user can select the candidate computing power node based on the resource consumption information and the time consumption information;
[0054] The candidate computing power node selected by the user is used as the computing power node corresponding to the image line feature extraction request.
[0055] Thirdly, embodiments of this application also disclose an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements the line feature extraction method for images described in embodiments of this application.
[0056] Fourthly, embodiments of this application disclose a computer-readable storage medium storing a computer program thereon, which, when executed by a processor, comprises the steps of the line feature extraction method for an image disclosed in embodiments of this application.
[0057] The image line feature extraction method disclosed in this application involves: acquiring an image to be processed based on an image line feature extraction request; estimating the computational power requirement value of each line feature extraction operator in each distributed computing power node when performing line feature extraction on the image to be processed; determining the computational power requirement value corresponding to the computing power node and the preferred line feature extraction operator based on the operator computational power requirement value; obtaining candidate computing power nodes from the computing power nodes based on the computational power requirement value and the idle computing power of the computing power nodes; obtaining the latency index value and energy consumption index value corresponding to each candidate computing power node; and determining the target computing power node matching the image line feature extraction request from the candidate computing power nodes based on the computational power requirement value, the latency index value, and the energy consumption index value, so as to perform line feature extraction on the image to be processed through the preferred line feature extraction operator of the target computing power node, thereby improving the performance of image line feature extraction.
[0058] The above description is only an overview of the technical solution of this application. In order to better understand the technical means of this application and to implement it in accordance with the contents of the specification, and to make the above and other objects, features and advantages of this application more obvious and understandable, the following are specific embodiments of this application. Attached Figure Description
[0059] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0060] Figure 1 This is a flowchart of the line feature extraction method for images disclosed in the embodiments of this application;
[0061] Figure 2 This is a schematic diagram of an application system for the line feature extraction method of images disclosed in the embodiments of this application;
[0062] Figure 3 This is a schematic diagram of the structure of the line feature extraction device for images disclosed in the embodiments of this application;
[0063] Figure 4 A block diagram schematically illustrates an electronic device for performing the method according to this application; and
[0064] Figure 5 A storage unit for holding or carrying program code implementing the method according to this application is illustrated schematically. Detailed Implementation
[0065] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0066] This application provides a method for line feature extraction of images. It can pre-construct a distributed computing power pool and preset multiple line feature extraction operators on each computing power node in the pool. Based on the computing power capability of each computing power node, the computing power consumed by the line feature extraction operator, and factors such as the image line feature extraction request and the network environment of the computing power node, the method provides the computing power node and line feature extraction operator with the highest matching degree to the line feature extraction request to perform line feature extraction of the image, thereby improving the performance of image line feature extraction.
[0067] The following is a detailed description of the specific implementation of the image line feature extraction method disclosed in the embodiments of this application.
[0068] like Figure 1As shown in the embodiment of this application, a method for extracting line features from an image includes steps 110 to 160.
[0069] Step 110: Obtain the image to be processed based on the image line feature extraction request.
[0070] Line features are crucial one-dimensional image features, holding significant research value and wide applications in digital image processing, computer vision, and pattern recognition. A line in an image refers to a very narrow region between a pair of adjacent boundaries, where grayscale values exhibit similar amplitude characteristics. It serves as a boundary between regions with differing local characteristics. Line features primarily refer to straight lines in an image and the relationships between them, including parallelism, intersection, perpendicularity, and collinearity. Linear features are common in everyday life, such as the edges of buildings and roads. Edge regions are generally where grayscale changes are most dramatic in an image.
[0071] The image line feature extraction algorithm disclosed in this application embodiment can be applied to a cloud service platform. The cloud service platform provides a network interface or client page for users to access in order to obtain the user's image line feature extraction request and obtain the image to be processed for the image line feature extraction request.
[0072] Step 120: Estimate the computational power requirement of each line feature extraction operator in each distributed computing node when performing line feature extraction on the image to be processed.
[0073] In existing technologies, commonly used image line feature extraction operators include gradient operators, difference operators, Roberts operators, Sobel operators, and Prewitt operators. Different line feature extraction operators exhibit performance differences for different types of images. To find the most suitable image line feature extraction operator for the current image to be processed, this embodiment first constructs distributed computing nodes, such as... Figure 2 As shown. Figure 2 In this system, each computing node 210 is configured with a computing pool containing multiple different line feature extraction operators. For example, each computing node may have a computing pool consisting of the aforementioned five line feature extraction operators. These computing nodes can be distributed across different geographical regions. The computing node 210 is communicatively connected to the cloud data center 220, used to receive image line feature extraction tasks sent by the cloud data center 220, and to send image processing results to the cloud data center 220.
[0074] The computing node can be a server or other device with data processing capabilities.
[0075] Upon receiving an image line feature extraction request, the first step is to obtain the computational power quantitative index required by each computing node to perform line feature extraction on the image to be processed. In this embodiment, the computational power quantitative index required by a single computing node to perform line feature extraction on the image is denoted as the "operator computational power requirement value". The computational power quantitative index is used to measure the computational power required to perform image feature extraction.
[0076] In some embodiments of this application, the computational power quantification index can be predefined according to computational needs. For example, the hash output rate N per second (e.g., N is 1,000,000 times) when a computing node executes a preset hash function can be used as a benchmark, defined as 1 point of computing power, and "point" can be used as the quantification index of computing power. In this way, based on the preset hash function output rate per second of the computing node, the computing power output per second of each computing node can be obtained, that is, the number of computing power points output per second. For example, if a computing node outputs 2N hash calculation results per second, it can be considered that the computing node can output 2 points of computing power per second. Here, N represents a positive integer.
[0077] Furthermore, given the computing power output of each computing node, the number of computing power points required to execute a preset feature extraction operator on that node can be obtained based on the execution time of that operator. For example, if a line feature extraction operator takes 1 second to execute 100 times on computing node A, and node A outputs 2 computing power points per second, then the computing power required to execute the line feature extraction operator 100 times is 2 computing power points. Therefore, the computing power required to execute the line feature extraction operator once on computing node A can be calculated.
[0078] Using the above method, for a batch of images, the computational power required to perform line feature extraction on computing node A by executing each line feature extraction operator once can be estimated based on the number of images and the computational power required to perform each line feature extraction operator on computing node A.
[0079] Because different line feature extraction operators have different implementation principles and execute different instructions, the computing power required when different line feature extraction operators are executed on the same computing power node will inevitably differ. On the other hand, different line feature extraction operators will utilize the hardware resources of the computing power node differently. Therefore, the computing power required when the same line feature extraction operator is executed on different computing power nodes may differ. In view of this, in the embodiments of this application, for different computing power nodes, the computing power requirement value required for each line feature extraction operator running on that computing power node to perform line feature extraction on the image to be processed is determined, and denoted as the "operator computing power requirement value".
[0080] Step 130: Based on the operator computing power requirement value, determine the computing power requirement value corresponding to the computing power node and the preferred line feature extraction operator.
[0081] Then, by combining the characteristics of each line on the computing power node, the operator computing power requirement value corresponding to the operator is extracted, and the computing power requirement value corresponding to the computing power node is determined.
[0082] In some embodiments of this application, determining the computing power requirement value and preferred line feature extraction operator corresponding to the computing power node based on the operator computing power requirement value includes: determining the minimum value of the operator computing power requirement value as the computing power requirement value corresponding to the computing power node; and determining the line feature extraction operator corresponding to the minimum value of the operator computing power requirement value as the preferred line feature extraction operator for the computing power node. For example, for each computing power node, the minimum value among the operator computing power requirement values corresponding to that computing power node can be used as the computing power requirement value corresponding to that computing power node, and correspondingly, the line feature extraction operator corresponding to the minimum operator computing power requirement value can be used as the preferred line feature extraction operator for that computing power node to process the current image feature extraction request.
[0083] Step 140: Based on the computing power demand value and the idle computing power of the computing power nodes, obtain candidate computing power nodes from the computing power nodes.
[0084] In some embodiments of this application, obtaining candidate computing nodes from the computing nodes based on the computing power demand value and the idle computing power of the computing nodes includes: obtaining computing nodes in the computing power pool whose idle computing power is greater than the computing power demand value as candidate computing nodes, wherein the idle computing power of the computing nodes is calculated based on hardware data such as the number of CPUs, CPU utilization, total memory, memory utilization, video memory size and utilization of the computing nodes, as well as the total computing power that the computing nodes can provide.
[0085] In some embodiments of this application, the total computing power provided by the computing node can be calculated using the method described in the preceding steps.
[0086] In some embodiments of this application, each computing node periodically assesses its own idle computing power and sends its idle computing power to the cloud data center.
[0087] Step 150: Obtain the latency index value and energy consumption index value corresponding to each candidate computing power node.
[0088] As mentioned earlier, the candidate computing nodes can be deployed in different geographical areas (e.g., in different cities), and image line feature extraction requests may also originate from various cities. Therefore, there are multiple network transmission paths for image line feature extraction requests to reach the cloud data center. On the other hand, the cloud data center will schedule image line feature extraction requests to various computing nodes for processing according to preset calculation results. During this process, the image to be processed travels through different network transmission paths before finally reaching the designated computing node. The line quality and distance of different network transmission paths may vary, which will affect the overall performance of image feature extraction.
[0089] Based on the above analysis, it is necessary to calculate the latency and energy consumption values for the network transmission path from the cloud data center to each computing node for image line feature extraction requests.
[0090] The latency metric indicates the time consumed from the issuance of an image feature extraction request to the start of feature extraction execution at the computing node. This includes the time the image feature extraction request waits to be processed and forwarded at various network nodes during network transmission, as well as the transmission time of the request signal over the network. The energy consumption metric indicates the energy consumption incurred at various network nodes from the issuance of the image feature extraction request to its arrival at the computing node. This includes energy consumption on physical lines and energy consumption in the cloud data center.
[0091] Step 160: Based on the computing power requirement value, the latency index value, and the energy consumption index value, determine the target computing power node matching the image line feature extraction request from the candidate computing power nodes, so as to extract line features from the image to be processed through the preferred line feature extraction operator of the target computing power node.
[0092] Finally, based on the computing power requirement, latency index, and energy consumption index, the target computing power node corresponding to the image line feature extraction request can be automatically determined, either based on latency requirement or energy consumption requirement. Then, the image to be processed is sent to the determined target computing power node via the cloud data center for feature extraction.
[0093] In other embodiments of this application, corresponding computing power node selection prompts can be generated based on the computing power demand value, the latency index value, and the energy consumption index value, and displayed to the image feature extraction request issuer. Based on the selection result of the image feature extraction request issuer on the computing power node selection prompts, the target computing power node matching the image line feature extraction request can be determined.
[0094] To make the line feature extraction method of the image disclosed in the embodiments of this application clearer, the specific implementation methods of the aforementioned steps are further illustrated below.
[0095] In step 120 above, the estimated computational power requirement value of each line feature extraction operator in each distributed computing node when performing line feature extraction on the image to be processed includes: randomly selecting a specified number of the images to be processed as sample images and sending them to each distributed computing node; performing line feature extraction on the images to be processed by each line feature extraction operator in the computing node to obtain the sample computational power requirement value corresponding to each line feature extraction operator; and obtaining the operator computational power requirement value corresponding to each line feature extraction operator when performing line feature extraction on the image to be processed based on the specified number, the total number of images to be processed, and the sample computational power requirement value.
[0096] The specified quantity can be a certain proportion of the images to be processed. If a certain proportion (e.g., 5%) of the total number of images to be processed is less than 1, the specified quantity is 1. Alternatively, the specified quantity can be a preset quantity, such as 100. When the total number of images to be processed is less than 100, the specified quantity is the total number of images to be processed.
[0097] First, a specified number of the images to be processed are randomly selected from the images to be processed as sample images.
[0098] Then, the sample images are sent to each computing node for line feature extraction, and the computing power points consumed by each computing node for line feature extraction of the sample images (i.e., the computing power requirement value) are obtained. In some embodiments of this application, the cloud data center can generate image line feature extraction tasks based on selected sample images and send the image line feature extraction tasks to each computing node. After receiving the image line feature extraction task, each computing node runs each line feature extraction operator to execute the image line feature extraction task, and records the computing power points consumed by running each feature extraction operator to execute the image line feature extraction task, denoted as the "sample computing power requirement value".
[0099] Taking a computing power node with five pre-set feature extraction operators, including gradient operator, difference operator, Roberts operator, Sobel operator and Prewitt operator, as an example, the computing power node can obtain five sample computing power requirements, and each sample computing power requirement corresponds to a feature extraction operator.
[0100] The implementation principles of each feature extraction operator are as follows.
[0101] (1) Gradient operator
[0102] In mathematics, the gradient corresponds to the first derivative. The gradient operator is a first derivative operator. For a continuous function f(x,y), the gradient at position (x,y) can be represented by a vector (the two components are the first derivatives along the x and y directions, respectively). The gradient calculation formula is as follows:
[0103]
[0104] (2) Difference operator
[0105] For an image f(x,y), its difference operator can be calculated using the following formula:
[0106]
[0107] (3) Roberts operator
[0108] The Roberts operator has low computational cost and can obtain good features for images with steep boundaries. The computational expression of the Roberts operator is as follows:
[0109]
[0110] (4) Prewit operator.
[0111] The Prewit operator calculates the difference in grayscale averages over the neighborhood of pixel (i,j), replacing the average grayscale difference between pixels. Differential or difference calculations enhance the high-frequency components of an image, which include noise and edges; therefore, they can simultaneously amplify both noise and edges. The Prewit operator mitigates this by smoothing the image and suppressing noise.
[0112] (5) Sobel operator
[0113] Unlike the Prewit operator, the Sobel operator assigns greater weight to the pixels above, below, to the left, and to the right of pixel (i,j) when calculating the average gray value in the neighborhood of pixel (i,j).
[0114] The specific implementation methods of the above-mentioned feature extraction operators are existing technologies and will not be described in detail in this application.
[0115] As can be seen from the implementation principles of the various feature extraction operators above, different feature extraction operators have different computational requirements, which can be divided into three categories: logical operation capability, parallel computing capability, and neural network acceleration capability. For example, the gradient operator, difference operator, and Roberts operator require stronger logical operation capability, while the Prewit operator and Sobel operator require stronger neural network acceleration capability.
[0116] Different computing nodes may have different hardware configurations, and based on these different configurations, they possess the ability to output different types of computing power. Therefore, a unified measurement of heterogeneous computing power is needed. For example, the computing power provided by different chips can be mapped to a unified dimension through a measurement function. For heterogeneous computing power devices and platforms, assuming there are n logic operation chips, m parallel computing chips, and p neural network acceleration chips, the computing power requirements for services using different operators can be uniformly described as the following computing power consumption model:
[0117]
[0118] Among them, C br Let f() represent the total computing power requirement, f() be the metric function used for dimensional mapping, A, B and C represent chips with different computing capabilities (e.g., A represents a logic operation chip, B represents a parallel operation chip, and C represents a neural network acceleration chip), a, β and γ are mapping ratio coefficients, and q() represents redundant computing power.
[0119] Based on the above computing power consumption model and the aforementioned feature extraction operators, it can be concluded that different feature extraction operators require devices with different types of computing power output to fully utilize the available computing resources and improve the performance of the operators in feature extraction. Furthermore, by performing line feature extraction on the sample image, the sample computing power requirement consumed by each computing power node for line feature extraction reflects the matching degree between the operator and the computing power node. The smaller the sample computing power requirement, the higher the matching degree between the feature extraction operator and the computing power node.
[0120] Next, for each computing node, the computing power requirement for each sample image used for line feature extraction is divided by the proportion of the sample image in the image to be processed. The quotient is used as the computing power requirement for each feature extraction operator to extract line features from the image to be processed, denoted as the "operator computing power requirement value". In this way, five operator computing power requirement values can be obtained for each computing node, and each operator computing power requirement value corresponds to one feature extraction operator.
[0121] In the aforementioned step 150, obtaining the latency index value and energy consumption index value corresponding to each candidate computing power node includes: sub-step 1501, sub-step 1502 and sub-step 1503.
[0122] Sub-step 1501: Obtain the network transmission paths corresponding to scheduling the image line feature extraction request to the candidate computing power node.
[0123] In some embodiments of this application, the network transmission paths corresponding to scheduling the image line feature extraction request to each candidate computing node can be determined based on the access device information of each computing node in the network system.
[0124] When the image line feature extraction request is scheduled to the candidate computing power node, the corresponding network transmission path includes two parts: the first part is the network transmission path from the sender of the image line feature extraction request to the cloud data center, and the other part is the network transmission path from the cloud data center to each candidate computing power node. Each part of the network transmission path can be obtained by referring to the methods in the prior art, and will not be described again in this embodiment.
[0125] Optionally, the obtained network transmission path may include, but is not limited to, the following information: transmission distance, transmission medium quality (such as bandwidth and energy consumption indicators of the transmission medium), computing power status of candidate computing power nodes, computing power status of cloud data centers on the network transmission path, hardware parameters, etc.
[0126] Sub-step 1502: Obtain preset latency information on each of the network transmission paths, and aggregate the preset latency information to obtain the latency index value corresponding to each candidate computing power node. The preset latency information includes one or more of the following: the transmission latency of the image line feature extraction request accessing the candidate computing power node, the processing latency of the candidate computing power node, the wide area network transmission latency from the candidate computing power node to the cloud data center, and the computing latency of the cloud data center.
[0127] The cloud data center is used to allocate linear feature extraction tasks to the computing nodes. In some embodiments of this application, the cloud data center is also used to perform feature extraction tasks.
[0128] The following section describes the calculation method for each preset latency information of candidate computing nodes, using the calculation method for each of the aforementioned preset latency information in edge computing networks as an example. Those skilled in the art should understand that the following latency information calculation method is merely one feasible method and not the only method for calculating latency information, and should not be construed as limiting this application.
[0129] (i) The transmission delay of the image line feature extraction request to the candidate computing power node
[0130] Assume a user accesses an edge computing node (i.e., a candidate computing node) via wireless communication. Let the data transmission bandwidth of the wireless communication link be B. According to Shannon's theorem, in a channel environment with limited bandwidth and noise interference, the transmission delay from user i (i.e., the sender of the image line feature extraction request) to the edge computing node is... for:
[0131]
[0132] Where, p i h is the transmission power of the i-th device; k,i σ is the channel gain from the i-th user terminal to the k-th edge computing node, which is a random, independent, and identically distributed variable; 2 It is the power of additive white Gaussian noise, D i This represents the total amount of computational task data for user i.
[0133] (ii) Processing latency of the candidate computing nodes
[0134] Computational tasks (such as image line feature extraction) can be scheduled based on different demands for computing and network resources; that is, some tasks can be performed on edge computing nodes, while others can be offloaded to cloud data centers. If we consider λ... i λ represents the proportion of the computational task assigned to the corresponding edge computing node by the i-th user (i.e., the one issuing the line feature extraction request for a certain image). i The value range of is [0, 1]. Therefore, 1 - λ i A significant portion of the computational tasks are offloaded to cloud data centers. This represents the computing resources allocated to user i by the k-th edge computing node. Therefore, the edge computing latency of task i is... for:
[0135]
[0136] Among them, C i This represents the total computing power required for the computational task of the i-th user.
[0137] (iii) Wide area network transmission latency from the candidate computing nodes to the cloud data center
[0138] Assume the cloud data center provides bandwidth W for computing task i on the k-th edge computing node. k,i For (bit / s) connectivity services, the transmission latency from edge computing nodes to cloud data centers... It can be represented as:
[0139]
[0140] Where 1-λ i This represents the proportion of computing tasks that user i will offload to the cloud data center.
[0141] (iv) Computing latency of cloud data centers
[0142] Cloud data center allocation f i cIf the computing resources are used to compute the computational task of the i-th user (such as an image line feature extraction task), then the computing latency of the cloud data center is... Represented as:
[0143]
[0144] In the wireless time domain, latency is a crucial characteristic for evaluating system performance. It can be measured by the sum of the task queue lengths across the cloud, network, edge, and endpoint segments. Considering the dynamic queue characteristics of edge nodes and cloud data center nodes, the average system latency can be expressed as:
[0145]
[0146] Among them, S k (t) represents the queue of computing tasks unloaded to the server side of the cloud data center at time t, Q k (t) represents the task queue that exists on the edge computing node, and T represents the discrete time interval.
[0147] The total latency of the computation task can be expressed as:
[0148]
[0149] When the aforementioned edge computing nodes are candidate computing power nodes and the computing task is image line feature extraction, the total latency and average latency corresponding to each candidate computing power node can be calculated.
[0150] In some embodiments of this application, the total latency corresponding to the candidate computing power node can be used as the latency index value corresponding to the candidate computing power node.
[0151] Sub-step 1503: Obtain preset energy consumption information on each of the network transmission paths, and aggregate the preset energy consumption information to obtain the energy consumption index value corresponding to each candidate computing power node. The preset energy consumption information includes one or more of the following: wireless transmission energy consumption, energy consumption of the candidate computing power node, WAN energy consumption from the candidate computing power node to the cloud data center, and cloud data center energy consumption.
[0152] The following section describes the calculation method for each preset energy consumption information of candidate computing nodes, using the calculation method for each of the above-mentioned preset energy consumption information in edge computing networks as an example. Those skilled in the art should understand that the following energy consumption information calculation method is merely one feasible method and not the only method for calculating energy consumption information, and should not be construed as limiting this application.
[0153] (a) Wireless transmission power consumption
[0154] Wireless transmission energy consumption is used to represent the energy consumption of the wireless communication link from a user (such as the sender of an image line feature extraction request) to an edge computing node (such as a candidate computing power node). Optionally, wireless transmission energy consumption can be calculated using the following formula.
[0155]
[0156] Among them, P W D represents the energy consumed (J / bit) to transmit one bit of data in a wireless communication link. i This represents the total amount of computational task data for user i.
[0157] (ii) Energy consumption of the candidate computing nodes
[0158] Energy consumption of candidate computing node k It can be calculated using the following formula:
[0159]
[0160] Where, η e λ represents the energy consumption factor (J / CPU cycle) per unit CPU revolutions of an edge computing node. i C represents the proportion of the computational task of the i-th user (i.e., the one issuing the image line feature extraction request) allocated to its corresponding edge computing node (i.e., candidate computing power node). i This represents the total computing power required for the computational task of the i-th user.
[0161] (III) Wide Area Network Energy Consumption from Candidate Computing Nodes to Cloud Data Centers Wide area network energy consumption represents the energy consumption of the wide area network communication link from a user (e.g., the sender of an image line feature extraction request) to an edge computing node (e.g., a candidate computing node). Optionally, wide area network energy consumption can be calculated using the following formula.
[0162]
[0163] Among them, P 1 The energy consumed (J / bit) to transmit one bit of data in a wireless communication link, 1-λ i This represents the proportion of computing tasks that user i will offload to the cloud data center.
[0164] (iv) Energy consumption of cloud data centers
[0165] Energy consumption of candidate computing node k It can be calculated using the following formula:
[0166]
[0167] Where, ηc The energy factor (J / CPU cycle) representing the unit CPU revolutions of a cloud data center server, 1-λ i This represents the proportion of computing tasks that user i will offload to the cloud data center.
[0168] In the aforementioned formula, parameter P w η e P 1 and η c All are constants and are only related to the hardware of the user equipment and the server.
[0169] The total energy consumption of a certain computing task can be expressed as:
[0170]
[0171] When the aforementioned edge computing nodes are candidate computing power nodes and the computing task is image line feature extraction, the total energy consumption corresponding to each candidate computing power node can be calculated.
[0172] In some embodiments of this application, the total energy consumption corresponding to the candidate computing power node can be used as the energy consumption index value corresponding to the candidate computing power node.
[0173] For the specific calculation methods of the above preset delay information and preset energy consumption information, please refer to the prior art. These methods will not be described further in the embodiments of this application.
[0174] In some embodiments of this application, the image line feature extraction request carries requirement option information. Accordingly, in step 160 above, determining the target computing power node matching the image line feature extraction request from the candidate computing power nodes based on the computing power requirement value, the latency index value, and the energy consumption index value includes: responding to the requirement option information indicating timeliness priority, selecting the candidate computing power node with the shortest latency matching the latency index value as the target computing power node corresponding to the image line feature extraction request; or, responding to the requirement option information indicating energy saving priority, obtaining the resource consumption index value corresponding to each of the candidate computing power nodes based on the computing power requirement value and the energy consumption index value; and selecting the candidate computing power node with the least resource consumption based on the resource consumption index value as the target computing power node corresponding to the image line feature extraction request.
[0175] For example, in one application scenario, a cloud service platform provides a network interface or client page for users to access. When a user initiates an image feature extraction request, they can simultaneously select their image feature extraction requirements, such as prioritizing failures or prioritizing energy saving. In this way, after obtaining the computing power requirements, latency, and energy consumption values for each computing node, the cloud service platform considers the matching degree between these indicators and the user's requirements, and selects the candidate computing node with the highest matching degree to execute the image line feature extraction task corresponding to the user's image feature extraction request.
[0176] For example, when a user selects timeliness as the priority, the cloud service platform selects the candidate computing node with the shortest image processing latency based on the latency index value to execute the image line feature extraction task corresponding to the image feature extraction request issued by the user.
[0177] For example, when a user prioritizes energy saving, the cloud service platform first obtains the resource consumption index value corresponding to each candidate computing power node based on the computing power requirement value and the energy consumption index value. For instance, the resource consumption index value is obtained by normalizing the computing power requirement value and the energy consumption index value separately, and then summing them. The resource consumption index value is positively correlated with both the computing power requirement value and the energy consumption index value. Then, the candidate computing power node with the lowest resource consumption, indicated by the lowest resource consumption index value, is selected as the target computing power node corresponding to the image line feature extraction request.
[0178] In some other embodiments of this application, determining the target computing power node matching the image line feature extraction request from the candidate computing power nodes based on the computing power requirement value, the latency index value, and the energy consumption index value includes: obtaining resource consumption information corresponding to the candidate computing power nodes based on the computing power requirement value and the energy consumption index value; and obtaining time consumption information corresponding to the candidate computing power nodes based on the latency index value; outputting the resource consumption information and the time consumption information corresponding to each candidate computing power node, so that the user selects the candidate computing power node based on the resource consumption information and the time consumption information; and using the candidate computing power node selected by the user as the target computing power node corresponding to the image line feature extraction request.
[0179] In another application scenario, the cloud service platform first obtains the resource consumption information corresponding to each candidate computing power node based on the computing power requirement value and the energy consumption index value. The calculation method for the resource consumption information is as described above and will not be repeated here. Based on the latency index value, the platform obtains the time consumption information corresponding to the candidate computing power node. Simultaneously, based on the latency index value, the platform obtains the time consumption information corresponding to the candidate computing power node. The time consumption information is positively correlated with the latency index value.
[0180] In some embodiments of this application, the resource consumption information can be expressed as resource consumption ranking, computational cost, etc., and the time consumption information can be expressed as consumption time ranking, estimated consumption time, etc. The cloud service platform outputs the resource consumption information and time consumption information corresponding to each candidate computing power node on the client page, providing users with decision-making references. In this way, users can select the candidate computing power nodes for line feature extraction of the image to be processed based on the resource consumption information and the time consumption information. Finally, the cloud service platform uses the candidate computing power node selected by the user as the target computing power node corresponding to the image line feature extraction request.
[0181] This application also discloses a method for line feature extraction of images. This method involves: acquiring an image to be processed based on an image line feature extraction request; estimating the computational power requirement of each line feature extraction operator in a distributed computing node when performing line feature extraction on the image to be processed; determining the computational power requirement value corresponding to the computing node and a preferred line feature extraction operator based on the computational power requirement value; obtaining candidate computing nodes from the computing nodes based on the computational power requirement value and the idle computing power of the computing nodes; obtaining the latency index value and energy consumption index value corresponding to each candidate computing node; and determining the target computing node matching the image line feature extraction request from the candidate computing nodes based on the computational power requirement value, the latency index value, and the energy consumption index value, so that line feature extraction of the image to be processed can be performed using the preferred line feature extraction operator of the target computing node, thereby improving the performance of image line feature extraction.
[0182] This application also discloses an image line feature extraction method. By pre-constructing distributed computing power nodes and setting multiple line feature extraction operators on each computing power node, after receiving a user's image line feature extraction request, the method can comprehensively analyze the computing power requirements matching the request and the energy consumption and latency when different feature extraction operators on each computing power node execute the feature extraction task corresponding to the image line feature extraction request. This analysis serves as a reference for selecting computing power nodes, thereby enabling the selection of the computing power node with the best timeliness for line feature extraction of the image to be processed, and significantly improving the performance of image line feature extraction.
[0183] On the other hand, the image line feature extraction method disclosed in this application embodiment can also select the computing power node with the best energy saving effect to extract the line features of the image to be processed according to the user's needs, so as to fully meet the user's image line feature extraction needs.
[0184] Accordingly, embodiments of this application also disclose an image line feature extraction device, such as... Figure 3 As shown, the device includes:
[0185] The image acquisition module 310 is used to acquire the image to be processed based on the image line feature extraction request;
[0186] The operator computing power requirement estimation module 320 is used to estimate the operator computing power requirement value corresponding to each line feature extraction operator in each distributed computing power node when performing line feature extraction on the image to be processed.
[0187] The computing power node computing power requirement and optimization operator determination module 330 is used to determine the computing power requirement value and the optimization line feature extraction operator corresponding to the computing power node based on the operator computing power requirement value;
[0188] The candidate computing power node acquisition module 340 is used to acquire candidate computing power nodes from the computing power nodes based on the computing power demand value and the idle computing power of the computing power nodes;
[0189] The latency and energy consumption acquisition module 350 is used to acquire the latency index value and energy consumption index value corresponding to each candidate computing power node.
[0190] The computing power node determination module 360 is used to determine the target computing power node matching the image line feature extraction request from the candidate computing power nodes according to the computing power demand value, the latency index value and the energy consumption index value, so as to extract line features from the image to be processed by the preferred line feature extraction operator of the target computing power node.
[0191] In some embodiments of this application, the operator computing power demand estimation module 320 is further used for:
[0192] A specified number of the images to be processed are randomly selected as sample images and sent to each of the distributed computing power nodes respectively;
[0193] The image to be processed is extracted by each line feature extraction operator in the computing power node, and the sample computing power requirement value corresponding to each line feature extraction operator is obtained.
[0194] Based on the specified quantity, the total number of images to be processed, and the sample computing power requirement, the corresponding operator computing power requirement value is obtained when each line feature extraction operator performs line feature extraction on the image to be processed.
[0195] In some embodiments of this application, determining the computing power requirement value corresponding to the computing power node and the preferred line feature extraction operator based on the operator computing power requirement value includes:
[0196] The minimum value of the operator's computing power requirement is determined as the computing power requirement value corresponding to the computing power node, and the line feature extraction operator corresponding to the minimum value of the operator's computing power requirement is determined as the preferred line feature extraction operator for the computing power node.
[0197] In some embodiments of this application, the latency and energy consumption acquisition module 350 is further used for:
[0198] Obtain the network transmission paths corresponding to scheduling the image line feature extraction request to the candidate computing power node;
[0199] Preset latency information is obtained for each network transmission path, and the preset latency information is aggregated to obtain the latency index value corresponding to each candidate computing power node. The preset latency information includes one or more of the following: the transmission latency of the image line feature extraction request accessing the candidate computing power node, the processing latency of the candidate computing power node, the wide area network transmission latency from the candidate computing power node to the cloud data center, and the computing latency of the cloud data center; wherein the cloud data center is used to allocate line feature extraction tasks to the computing power nodes.
[0200] Obtain preset energy consumption information on each of the network transmission paths, and aggregate the preset energy consumption information to obtain the energy consumption index value corresponding to each candidate computing power node. The preset energy consumption information includes one or more of the following: wireless transmission energy consumption, energy consumption of the candidate computing power node, WAN energy consumption from the candidate computing power node to the cloud data center, and cloud data center energy consumption.
[0201] Optionally, the image line feature extraction request carries requirement option information, and the computing power node determination module 360 is further used for:
[0202] In response to the requirement option information indicating timeliness priority, the candidate computing node with the shortest latency matching the latency index value is selected as the computing node corresponding to the image line feature extraction request; or...
[0203] In response to the requirement option information indicating energy saving priority, the resource consumption index value corresponding to each candidate computing power node is obtained according to the computing power requirement value and the energy consumption index value; according to the resource consumption index value, the candidate computing power node with the least resource consumption is selected as the computing power node corresponding to the image line feature extraction request.
[0204] Optionally, the computing node determination module 360 is further configured to:
[0205] Based on the computing power requirement value and the energy consumption index value, obtain the resource consumption information corresponding to the candidate computing power node; and based on the latency index value, obtain the time consumption information corresponding to the candidate computing power node.
[0206] Output the resource consumption information and time consumption information corresponding to each candidate computing power node, so that the user can select the candidate computing power node based on the resource consumption information and the time consumption information;
[0207] The candidate computing power node selected by the user is used as the computing power node corresponding to the image line feature extraction request.
[0208] The image line feature extraction apparatus disclosed in this application is used to implement the image line feature extraction method described in this application. The specific implementation of each module of the apparatus will not be repeated here, but can be found in the specific implementation of the corresponding steps in the method embodiment.
[0209] This application discloses an image line feature extraction device. It acquires an image to be processed based on an image line feature extraction request; estimates the computational power requirement of each line feature extraction operator in a distributed computing node when performing line feature extraction on the image to be processed; determines the computational power requirement value corresponding to the computing node and a preferred line feature extraction operator based on the computational power requirement value; obtains candidate computing nodes from the computing nodes based on the computational power requirement value and the idle computing power of the computing nodes; acquires the latency index value and energy consumption index value corresponding to each candidate computing node; and determines the target computing node matching the image line feature extraction request from the candidate computing nodes based on the computational power requirement value, the latency index value, and the energy consumption index value, so that the preferred line feature extraction operator of the target computing node can be used to extract line features from the image to be processed, thereby improving the performance of image line feature extraction.
[0210] The image line feature extraction device disclosed in this application embodiment pre-constructs distributed computing power nodes and sets multiple line feature extraction operators on each computing power node. After receiving a user's image line feature extraction request, it can comprehensively analyze the computing power requirements matching the request and the energy consumption and latency when different feature extraction operators on each computing power node execute the feature extraction task corresponding to the image line feature extraction request. This serves as a reference for selecting computing power nodes, thereby enabling the selection of the computing power node with the best timeliness for line feature extraction of the image to be processed, which significantly improves the performance of image line feature extraction.
[0211] On the other hand, the image line feature extraction device disclosed in this application embodiment can also select the computing power node with the best energy saving effect to extract the line features of the image to be processed according to the user's needs, so as to fully meet the user's image line feature extraction needs.
[0212] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on its differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. For the apparatus embodiments, since they are fundamentally similar to the method embodiments, the description is relatively simple; relevant parts can be referred to the descriptions in the method embodiments.
[0213] The above provides a detailed description of a method and apparatus for extracting line features from an image. Specific examples have been used to illustrate the principles and implementation methods of this application. The description of the above embodiments is only for the purpose of helping to understand the method and its core idea. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of this application. Therefore, the content of this specification should not be construed as a limitation of this application.
[0214] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without any creative effort.
[0215] The various component embodiments of this application can be implemented in hardware, or as software modules running on one or more processors, or a combination thereof. Those skilled in the art will understand that microprocessors or digital signal processors (DSPs) can be used in practice to implement some or all of the functions of some or all of the components in the electronic device according to the embodiments of this application. This application can also be implemented as a device or apparatus program (e.g., a computer program and computer program product) for performing part or all of the methods described herein. Such a program implementing this application can be stored on a computer-readable medium, or can be in the form of one or more signals. Such signals can be downloaded from an Internet website, provided on a carrier signal, or provided in any other form.
[0216] For example, Figure 4An electronic device is shown that can implement the methods according to this application. The electronic device may be a PC, mobile terminal, personal digital assistant, tablet computer, etc. The electronic device conventionally includes a processor 410 and a memory 420, and program code 430 stored on the memory 420 and executable on the processor 410, which, when executing the program code 430, implements the methods described in the above embodiments. The memory 420 may be a computer program product or a computer-readable medium. The memory 420 may be an electronic memory such as flash memory, EEPROM (Electrically Erasable Programmable Read-Only Memory), EPROM, hard disk, or ROM. The memory 420 has a storage space 4201 for the program code 430 of a computer program for performing any of the method steps described above. For example, the storage space 4201 for the program code 430 may include various computer programs for implementing the various steps in the above methods. The program code 430 is computer-readable code. These computer programs can be read from or written to one or more computer program products. These computer program products include program code carriers such as hard disks, CDs, memory cards, or floppy disks. The computer program includes computer-readable code that, when executed on an electronic device, causes the electronic device to perform the method according to the above embodiments.
[0217] This application also discloses a computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps of the image line feature extraction method as described in this application.
[0218] Such a computer program product can be a computer-readable storage medium, which can have the same characteristics as... Figure 4 The memory 420 in the illustrated electronic device is similarly arranged with storage segments, storage spaces, etc. Program code can be stored, for example, in a compressed form on the computer-readable storage medium. The computer-readable storage medium is typically as shown in the reference... Figure 5 The portable or fixed storage unit is described above. Typically, the storage unit includes computer-readable code 430', which is code read by a processor and, when executed by the processor, implements the various steps of the method described above.
[0219] The terms "an embodiment," "embodiment," or "one or more embodiments" as used herein mean that a particular feature, structure, or characteristic described in connection with an embodiment is included in at least one embodiment of this application. Furthermore, please note that the examples of the phrase "in one embodiment" do not necessarily all refer to the same embodiment.
[0220] Numerous specific details are set forth in the specification provided herein. However, it will be understood that embodiments of this application may be practiced without these specific details. In some instances, well-known methods, structures, and techniques have not been shown in detail so as not to obscure the understanding of this specification.
[0221] In the claims, any reference signs placed between parentheses should not be construed as limiting the claims. The word "comprising" does not exclude the presence of elements or steps not listed in the claims. The word "a" or "an" preceding an element does not exclude the presence of a plurality of such elements. This application can be implemented by means of hardware comprising several different elements and by means of a suitably programmed computer. In a unit claim enumerating several means, several of these means may be embodied by the same item of hardware. The use of the words first, second, and third, etc., does not indicate any order. These words can be interpreted as names.
[0222] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application.
Claims
1. A method of extracting line features of an image, characterized by, include: Based on the image line feature extraction request, obtain the image to be processed; The computational power requirement of each line feature extraction operator in each distributed computing node is estimated when performing line feature extraction on the image to be processed; the computational power requirement is a quantitative indicator of the computational power required for a single computing node to perform line feature extraction on the image. Based on the computational power requirement value of the operator, determine the computational power requirement value corresponding to the computational power node and the preferred line feature extraction operator; Based on the computing power demand value and the idle computing power of the computing power nodes, candidate computing power nodes are obtained from the computing power nodes; Obtain the latency and energy consumption values corresponding to each candidate computing node; Based on the computing power requirement value, the latency index value, and the energy consumption index value, a target computing power node matching the image line feature extraction request is determined from the candidate computing power nodes, so as to extract line features from the image to be processed through the preferred line feature extraction operator of the target computing power node; The step of determining the computing power requirement value corresponding to the computing power node and the preferred line feature extraction operator based on the computing power requirement value of the operator includes: Determine the minimum value of the operator's computing power requirement, and use it as the computing power requirement value corresponding to the computing power node; The line feature extraction operator corresponding to the minimum value of the operator's computing power requirement is determined as the preferred line feature extraction operator for the computing power node.
2. The method of claim 1, wherein, The estimated computational power requirement of each line feature extraction operator in each distributed computing node when performing line feature extraction on the image to be processed includes: A specified number of the images to be processed are randomly selected as sample images and sent to each of the distributed computing power nodes. The image to be processed is extracted by each line feature extraction operator in the computing power node, and the sample computing power requirement value corresponding to each line feature extraction operator is obtained. Based on the specified quantity, the total number of images to be processed, and the sample computing power requirement, the corresponding operator computing power requirement value is obtained when each line feature extraction operator performs line feature extraction on the image to be processed.
3. The method according to claim 1 or 2, characterized in that, The step of obtaining the latency and energy consumption values corresponding to each candidate computing node includes: Obtain the network transmission paths corresponding to scheduling the image line feature extraction request to the candidate computing power node; Preset latency information is obtained for each network transmission path, and the preset latency information is aggregated to obtain the latency index value corresponding to each candidate computing power node. The preset latency information includes one or more of the following: the transmission latency of the image line feature extraction request accessing the candidate computing power node, the processing latency of the candidate computing power node, the wide area network transmission latency from the candidate computing power node to the cloud data center, and the computing latency of the cloud data center. Obtain preset energy consumption information on each of the network transmission paths, and aggregate the preset energy consumption information to obtain the energy consumption index value corresponding to each candidate computing power node. The preset energy consumption information includes one or more of the following: wireless transmission energy consumption, energy consumption of the candidate computing power node, WAN energy consumption from the candidate computing power node to the cloud data center, and cloud data center energy consumption.
4. The method according to claim 1 or 2, characterized in that, The image line feature extraction request carries requirement option information. The step of determining the target computing power node matching the image line feature extraction request from the candidate computing power nodes based on the computing power requirement value, the latency index value, and the energy consumption index value includes: In response to the requirement option information indicating timeliness priority, the candidate computing power node with the shortest latency matching the latency index value is selected as the target computing power node corresponding to the image line feature extraction request; or... In response to the requirement option information indicating energy saving priority, the resource consumption index value corresponding to each candidate computing power node is obtained according to the computing power requirement value and the energy consumption index value; according to the resource consumption index value, the candidate computing power node with the least resource consumption is selected as the target computing power node corresponding to the image line feature extraction request.
5. The method according to claim 1 or 2, characterized in that, The step of determining the target computing power node matching the image line feature extraction request from the candidate computing power nodes based on the computing power demand value, the latency index value, and the energy consumption index value includes: Based on the computing power requirement value and the energy consumption index value, obtain the resource consumption information corresponding to the candidate computing power node; and based on the latency index value, obtain the time consumption information corresponding to the candidate computing power node. Output the resource consumption information and time consumption information corresponding to each candidate computing power node, so that the user can select the candidate computing power node based on the resource consumption information and the time consumption information; The candidate computing power node selected by the user is used as the target computing power node corresponding to the image line feature extraction request.
6. An apparatus for extracting line features of an image, characterized by comprising: include: The image acquisition module is used to acquire the image to be processed based on the image line feature extraction request; The operator computing power requirement estimation module is used to estimate the operator computing power requirement value corresponding to each line feature extraction operator in each distributed computing power node when performing line feature extraction on the image to be processed; the operator computing power requirement value is the computing power quantitative index required for a single computing power node to perform line feature extraction on the image; The computing power node computing power requirement and optimization operator determination module is used to determine the computing power requirement value and the optimization line feature extraction operator corresponding to the computing power node based on the operator computing power requirement value; The candidate computing power node acquisition module is used to acquire candidate computing power nodes from the computing power nodes based on the computing power demand value and the idle computing power of the computing power nodes; The latency and energy consumption acquisition module is used to acquire the latency index value and energy consumption index value corresponding to each candidate computing power node; The computing power node determination module is used to determine the target computing power node matching the image line feature extraction request from the candidate computing power nodes according to the computing power demand value, the latency index value and the energy consumption index value, so as to extract line features from the image to be processed by the preferred line feature extraction operator of the target computing power node. The step of determining the computing power requirement value corresponding to the computing power node and the preferred line feature extraction operator based on the computing power requirement value of the operator includes: The minimum value of the operator's computing power requirement is determined as the computing power requirement value corresponding to the computing power node, and the line feature extraction operator corresponding to the minimum value of the operator's computing power requirement is determined as the preferred line feature extraction operator for the computing power node.
7. The apparatus of claim 6, wherein, The operator computing power demand estimation module is further used for: A specified number of the images to be processed are randomly selected as sample images and sent to each of the distributed computing power nodes. The image to be processed is extracted by each line feature extraction operator in the computing power node, and the sample computing power requirement value corresponding to each line feature extraction operator is obtained. Based on the specified quantity, the total number of images to be processed, and the sample computing power requirement, the corresponding operator computing power requirement value is obtained when each line feature extraction operator performs line feature extraction on the image to be processed.
8. An electronic device, comprising a memory, a processor, and program code stored in the memory and executable on the processor, characterized in that, When the processor executes the program code, it implements the line feature extraction method for the image according to any one of claims 1 to 5.
9. A computer-readable storage medium having stored thereon a program code, characterized in that, When the program code is executed by the processor, it implements the steps of the line feature extraction method for the image as described in any one of claims 1 to 5.
Citation Information
Patent Citations
Heterogeneous computing device virtualization method and system
CN113434261A
Task processing method and task processing device
CN114219189A