Calculation function module sharing method and device and storage medium
By obtaining and comparing the logical distances of the computing function modules on the edge computing device, selecting modules whose logical distance is less than the preset threshold and registering functions, the problem of excessive router storage resource occupation is solved, and the resource occupation and delay reduction is achieved.
Patent Information
- Application Number
- CN202411603818.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-11
- Publication Date
- 2025-03-07
AI Technical Summary
Router storage resources are occupied a lot, resulting in excessive resource utilization in the computing resource collaboration between edge computing devices.
By acquiring the logical distances of the multiple computing functional modules, a calculation functional module whose logical distance is less than a preset distance threshold is determined, and its function registration information is sent to the second network device to reduce the occupation of storage resources and reduce task processing delay.
The information related to the computing function module stored in the network device is reduced, the utilization of storage resources is reduced, and the delay when edge computing devices assist in processing tasks is reduced.
Smart Images

Figure CN119576600A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of edge computing technology, and in particular to a method, device and storage medium for sharing a computing function module. Background Art
[0002] Road test edge computing equipment is aimed at the general perception needs of multiple categories of smart highways, providing perception data services with relatively low latency and higher accuracy. However, in traditional technologies, tasks with high latency requirements are mainly completed by the local computing power of edge computing equipment. If the computing power reserved during planning and construction is insufficient, it will lead to insufficient business processing capabilities.
[0003] Currently, multiple edge computing devices can be coordinated through network devices (such as routers), and other nearby edge computing devices with limited computing resources can reuse idle computing resources for task computing. However, in this process, the router will store a large amount of information about edge computing devices, occupying the router's storage resources. Summary of the invention
[0004] The present application provides a method, device and storage medium for sharing a computing function module, which are used to solve the problem of a large amount of router storage resources being occupied.
[0005] In order to achieve the above objectives, this application adopts the following technical solutions:
[0006] In the first aspect, the present application provides a method for sharing a computing function module. In the method, the logical distance of multiple first computing function modules is obtained, and the logical distance is used to reflect the time consumed by the computing function module to process a business request. The multiple first computing function modules are deployed in at least one edge computing device. Based on the logical distance of the multiple first computing function modules, at least one second computing function module is determined from the multiple first computing function modules, and the logical distance of the second computing function module is less than a preset distance threshold. Function registration information of at least one second computing function module is sent to a second network device.
[0007] Based on the above technical solution, the logical distances of multiple first computing function modules are obtained, and the logical distances are used to reflect the time consumed by the computing function modules to process business requests. The multiple first computing function modules are deployed on at least one edge computing device. Based on the logical distances of the multiple first computing function modules, at least one second computing function module is determined from the multiple first computing function modules, and the logical distance of the second computing function module is less than the preset distance threshold. The function registration information of the second computing function module is sent to the second network device. In this way, the relevant information of the computing function modules stored in the network device can be reduced, and the occupancy of storage resources is reduced. In addition, by sending a computing function module with a smaller logical distance to the second network device, the delay when the second network device assists in processing tasks through edge computing devices under other network devices can be reduced.
[0008] In one possible design, a function forwarding message sent by a third network device is received, and the function forwarding message includes: an initial logical distance and a number of jumps between each first computing function module and the third network device. Based on the initial logical distance and the number of jumps of each first computing function module, an updated logical distance of each first computing function module is generated, and the updated logical distance is used to indicate the logical distance between the first network device.
[0009] In one possible design, the third network device includes: a router and / or an edge computing device; the plurality of first computing function modules include: at least one third computing function module and / or at least one fourth computing function module; the initial logical distance of the third computing function module is stored in the router, and the fourth computing function module is deployed in the edge computing device. In the case where the third network device is a router, the initial logical distance is less than a preset distance threshold.
[0010] In one possible design, based on the initial logical distance and the number of jumps of each first computing function module, a first logical distance of each first computing function module is generated. A network quality parameter is obtained, and the network quality parameter is used to indicate the network quality between the first network device and the third network device. Based on the network quality parameter, a second logical distance is determined. Based on the first logical distance and the second logical distance, an updated logical distance of each first computing function module is generated.
[0011] In one possible design, a function call request sent by a fourth network device is received, and the function call request is used to request to call a target computing function module among multiple first computing function modules. Based on the function call request, a business processing request is sent to a target edge computing device where the target computing function module is deployed. The calculation result sent by the target edge computing device is received, and the calculation result is sent to the fourth network device.
[0012] In a possible design, the function registration information includes: an identifier of the computing function module and a uniform resource locator system of the computing function module.
[0013] In a second aspect, the present application provides a device for sharing a computing function module, the device comprising: an acquisition unit, a processing unit, and a sending unit.
[0014] An acquisition unit is used to acquire the logical distances of multiple first computing function modules, where the logical distances are used to reflect the time taken by the computing function modules to process service requests, and the multiple first computing function modules are deployed on at least one edge computing device. A processing unit is used to determine at least one second computing function module from the multiple first computing function modules based on the logical distances of the multiple first computing function modules, where the logical distance of the second computing function module is less than a preset distance threshold. A sending unit is used to send function registration information of at least one second computing function module to a second network device.
[0015] In a third aspect, the present application provides a shared device for a computing function module, the device comprising: a processor and a memory; the processor and the memory are coupled; the memory is used to store one or more programs, the one or more programs including computer execution instructions, and when the shared device for the computing function module is running, the processor executes the computer execution instructions stored in the memory to implement the method described in the first aspect and any possible implementation of the first aspect.
[0016] In a fourth aspect, the present application provides a computer-readable storage medium, which stores instructions. When the instructions are executed on a computer, the computer executes the method described in the above-mentioned first aspect and any possible implementation of the first aspect.
[0017] In a fifth aspect, the present application provides a chip, comprising a processor and a communication interface, wherein the communication interface and the processor are coupled, and the processor is used to run a computer program or instructions to implement the method described in the first aspect and any possible implementation of the first aspect.
[0018] In a sixth aspect, the present application provides a computer program product comprising instructions, which, when executed by a computer, enables the computer to execute the method described in the above-mentioned first aspect and any possible implementation manner of the first aspect.
[0019] In the above scheme, the technical problems that can be solved and the technical effects achieved by the shared device of the computing function module, computer equipment, computer storage medium, chip or computer program product can be referred to the technical problems and technical effects solved by the above-mentioned first aspect, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] Figure 1 A system architecture diagram of a communication system provided in an embodiment of the present application;
[0021] Figure 2 A system architecture diagram of a sharing system of computing function modules provided in an embodiment of the present application;
[0022] Figure 3 A flowchart of a method for sharing a computing function module provided in an embodiment of the present application;
[0023] Figure 4 A flowchart of another method for sharing a computing function module provided in an embodiment of the present application;
[0024] Figure 5 A flowchart of another method for sharing a computing function module provided in an embodiment of the present application;
[0025] Figure 6 A system architecture diagram of another communication system provided in an embodiment of the present application;
[0026] Figure 7 A schematic diagram of the structure of a device for sharing a computing function module provided in an embodiment of the present application;
[0027] Figure 8 A schematic diagram of the structure of another device for sharing computing function modules provided in an embodiment of the present application;
[0028] Fig. 9 A conceptual partial view of a computer program product provided for an embodiment of the present application. DETAILED DESCRIPTION
[0029] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0030] The terms “first” and “second” in the description and claims of the present application are used to distinguish different objects rather than to describe a specific order of the objects.
[0031] In addition, the terms "including" and "having" and any variations thereof mentioned in the description of this application are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or modules is not limited to the listed steps or modules, but may optionally include other steps or modules that are not listed, or may optionally include other steps or modules that are inherent to these processes, methods, products or devices.
[0032] In addition, in the embodiments of the present application, words such as "exemplary" or "for example" are used to indicate examples, illustrations or descriptions. Any embodiment or design described as "exemplary" or "for example" in the present application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "exemplary" or "for example" is intended to present concepts in a specific way.
[0033] With the vigorous development of new technologies such as cloud computing, big data, blockchain, and the Internet of Things, vehicle-road collaboration and autonomous driving, as the product of the combination of the traditional transportation industry and new technologies, have become an important support for smart transportation. The construction of smart highways is an important part of smart transportation, and "cloud-network-edge-end" has gradually become the new generation of smart highway technology architecture. In the new technology architecture, the role of "edge" has become more and more prominent, and the application scenarios have become more and more extensive.
[0034] In the smart intersection scenario of the transportation industry, edge computing devices can collect massive data from various sensing devices at the intersection, analyze and process the traffic conditions at the perceived intersection, including queue length, parking speed, travel speed, etc., and adjust the timing of traffic lights according to the degree of congestion, thereby improving the travel speed of urban traffic intersections.
[0035] Edge computing devices (such as roadside computing units) provide an edge computing service. Its edge computing architecture, in coordination with central computing resources, complements and optimizes central computing capabilities. It focuses on video perception and has rich perception capabilities such as target detection, attribute extraction, and event detection. It provides perception data services with relatively low latency and higher accuracy for the general perception needs of multiple categories of smart highways. It acquires real-time video to detect and analyze related events such as parking, congestion, and illegal lane changes, and outputs traffic parameters such as vehicle flow, average speed, time occupancy, space occupancy, headway, headway, and queue length. It realizes beyond-visual-range navigation based on digital twin capabilities, plays an important role in application scenarios such as autonomous driving, vehicle-road collaboration, and vehicle networking, and is widely used in intelligent traffic management in scenarios such as highways, viaducts, tunnels, and bridges. In traditional technologies, tasks with high latency requirements are mainly completed by the local computing power of edge computing devices, and tasks with low time requirements are transmitted back to the cloud for computing in a cloud-edge collaborative manner.
[0036] For example, Figure 1 As shown, the edge computing device 101 is connected to the perception device 102. For example, the edge computing device 101 may be a road side unit (RSU), and the perception device 102 may be a millimeter wave radar, a camera, etc. The perception device 102 may collect data from each vehicle. The edge computing device 101 may process the data. Alternatively, the edge computing device may transmit the data to the cloud control platform through the network, and the cloud control platform 103 may process the data.
[0037] However, the current construction method requires that the demand for computing power for low-latency computing tasks be planned according to road conditions at the beginning of construction, and a portion of computing power must be reserved, which increases the difficulty and cost of construction. In addition, if road facilities change after construction, the computing tasks may change, and the computing power of the edge computing equipment used before may not match the current road conditions, resulting in insufficient or wasted computing power. In addition, when short-term sudden traffic phenomena such as traffic jams and surrounding activities occur, the computing power will increase suddenly. If the computing power reserved during planning and construction is insufficient, the business processing capacity will be insufficient.
[0038] Therefore, how to improve the collaboration between edge computing devices and reduce resource usage during the collaboration process has become a technical problem that needs to be solved urgently.
[0039] In order to solve the above technical problems, an embodiment of the present application provides a method for sharing a computing function module. In this method, the logical distances of multiple first computing function modules are obtained, and the logical distances are used to reflect the time consumed by the computing function modules to process business requests. The multiple first computing function modules are deployed on at least one edge computing device. Based on the logical distances of the multiple first computing function modules, at least one second computing function module is determined from the multiple first computing function modules, and the logical distance of the second computing function module is less than the preset distance threshold. The function registration information of the second computing function module is sent to the second network device. In this way, the relevant information of the computing function modules stored in the network device can be reduced, and the occupancy of storage resources is reduced. In addition, by sending computing function modules with smaller logical distances to other network devices, the delay when other edge computing devices assist in processing tasks can be reduced.
[0040] The implementation environment of the embodiments of the present application is introduced below.
[0041] like Figure 2 As shown, a sharing system of a computing function module provided in an embodiment of the present application includes: multiple network devices 201 and multiple edge computing devices 202. The network devices 201 can be interconnected in a serial, tree, mesh, etc. manner, and the edge computing device 202 is mounted under the network device 201.
[0042] The network device 201 can manage the edge computing device 202. For example, the network device 201 can store the device information of the edge computing device 202. The network device 201 can also send the stored device information to other network devices. In addition, the network device 201 can receive the function call request of the edge computing device 202 and forward the function call request through other network devices 201 to complete the coordination between the edge computing devices.
[0043] Exemplarily, the network device 201 may be a router, a gateway (such as an NFaaS gateway), or other network devices.
[0044] The edge computing device 202 can process the computing task. The edge computing device can include at least one computing function module, which can process the computing task.
[0045] In one possible design, each network device 201 is connected to at least one edge computing device 202 .
[0046] The embodiments of the present application are described in detail below in conjunction with the accompanying drawings.
[0047] like Figure 3 As shown, a method for sharing a computing function module provided in an embodiment of the present application includes:
[0048] S301. A first network device obtains logical distances of multiple first computing function modules.
[0049] The logical distance is used to reflect the time taken by the computing function module to process a business request, and multiple first computing function modules are deployed on at least one edge computing device.
[0050] It should be noted that the time taken by the computing function module to process a service request refers to the sum of the time taken by the computing function module to transmit the service request from the request end to the computing function module and the time taken by the computing function module to execute the computing task corresponding to the service request. The logical distance is proportional to the time taken by the computing function module to process the service request. The larger the logical distance, the longer the time taken by the computing function module to process the service request. The smaller the logical distance, the shorter the time taken by the computing function module to process the service request.
[0051] In one possible design, each edge computing device is deployed with at least one computing function module.
[0052] It should be noted that the computing function module refers to a module having computing functions, or having function computing services, or having a microservice application programming interface (Application Programming Interface, API), or having a dynamic function library. The present application embodiment does not limit the computing function module. For example, the computing function module can be a vehicle detection module, a pedestrian detection module, a license plate recognition module, etc.
[0053] In an embodiment of the present application, at least one edge computing device may be connected to a first network device. At least one edge computing device includes a first type of device and / or a second type of device. The first type of device is a network device directly connected to the first network device. The second type of device may be connected to the first network device through other network devices.
[0054] It should be noted that the first type of device being directly connected to the first network device means that the first device can directly send messages to the first network device. The second type of device being connected to the first network device through other network devices means that the second type of device can send messages to the first network device through other network devices.
[0055] Exemplarily, the first type device a can be configured with the address of gateway 1 and send a message to gateway 1. Alternatively, the first type device b can be directly connected to gateway 1, and the first type device b can broadcast a message. The second type device b is directly connected to gateway 2, and gateway 2 is connected to gateway 1, and the second type device b can be connected to gateway 1 through gateway 2.
[0056] In a possible implementation manner, the first network device stores logical distances of multiple first computing function modules, and the logical distance stored in the first network device is used to indicate the logical distance between the computing function module and the first network device.
[0057] It should be noted that the embodiment of the present application does not limit the logical distance. For example, the logical distance can be 1, 1.5, 3, 10, etc.
[0058] In some embodiments, the first network device may obtain status information and processing capabilities of multiple fifth computing function modules, and the status information is used to indicate whether other edge computing devices can call the computing function module. The status information includes available status information and unavailable status information, and the processing capability is used to indicate the ability to perform computing tasks. The first network device may determine multiple first computing function modules from multiple fifth computing function modules based on the status information and processing capabilities of the multiple fifth computing function modules.
[0059] S302: The first network device determines at least one second computing function module from the multiple first computing function modules based on the logical distances of the multiple first computing function modules.
[0060] Wherein, the logical distance of the second calculation function module is less than a preset distance threshold;
[0061] In a possible implementation, the logical distances of the plurality of first computing function modules are compared with a preset distance threshold, and then the first computing function module whose distance is less than the preset distance threshold is used as the second computing function module.
[0062] For example, if the plurality of first computing function modules include: computing function module a, computing function module b and computing function module c. The logical distance of computing function module a is 10, the logical distance of computing function module b is 2, and the logical distance of computing function module c is 1.5. If the preset distance threshold is 3, computing function module b and computing function module c can be used as the second computing function module.
[0063] S303. The first network device sends function registration information of at least one second computing function module to the second network device.
[0064] The function registration information may include at least one of the following: a logical distance, an identifier of a computing function module, and a uniform resource locator (URL) of the computing function module.
[0065] It should be noted that the embodiment of the present application does not limit the identifier of the computing function module. For example, the identifier of the computing function module can be a name, ID, etc.
[0066] In an embodiment of the present application, the first network device stores an identifier of a second network device connected to the first network device. The first network device can send function registration information of at least one second computing function module to the second network device based on the identifier of the second network device. The second network device is the next hop device of the first network device.
[0067] Exemplarily, the identifier of the second network device may be an iPv4 address, an ipv6 address, or the like.
[0068] In a possible implementation, the first network device may encapsulate the identifier, logical distance, and uniform resource locator system of each second computing function module into a first routing advertisement message, and send the first routing advertisement message to the second network device.
[0069] Based on the above technical solution, it can be known that the logical distances of multiple first computing function modules are obtained, and the logical distances are used to reflect the time consumed by the computing function modules to process business requests. Multiple first computing function modules are deployed on at least one edge computing device. Based on the logical distances of multiple first computing function modules, at least one second computing function module is determined from multiple first computing function modules, and the logical distance of the second computing function module is less than the preset distance threshold. The function registration information of the second computing function module is sent to the second network device. In this way, the relevant information of the computing function modules stored in the network device can be reduced, and the occupancy of storage resources is reduced. In addition, by sending a computing function module with a smaller logical distance to the second network device, the delay when the second network device assists in processing tasks through edge computing devices under other network devices can be reduced.
[0070] like Figure 4 As shown, a method for sharing a computing function module provided in an embodiment of the present application, in which S302 may include:
[0071] S401. A first network device receives a function forwarding message sent by a third network device.
[0072] The function forwarding message includes: the initial logical distance and the number of jumps between each first computing function module and the third network device. The initial logical distance refers to the logical distance between the first computing function module and the third network device, and the number of jumps refers to the number of jumps required for the message to jump from the source node to the destination node along the route.
[0073] For example, if network device a is directly connected to network device b, the number of jumps in the function forwarding message sent by network device a to network device b is 1.
[0074] It should be noted that, usually, the number of jumps is 1.
[0075] In an embodiment of the present application, the third network device may include: a router and / or an edge computing device. The plurality of first computing function modules include: at least one third computing function module and / or at least one fourth computing function module. The initial logical distance of the third computing function module is stored in the router, and the fourth computing function module is deployed in the edge computing device.
[0076] In some embodiments, when the third network device is a router, the third network device is the previous hop device of the first network device, and the function forwarding message is a routing announcement message. The third network device can send a second routing announcement message to the first network device, and the second routing announcement message includes function registration information and the number of jumps of at least one third computing function module. Wherein, when the third network device is a router, the initial logical distance is less than the preset distance threshold.
[0077] It is understandable that when the third network device is a router, the third network device can selectively select computing function modules with initial logical distances less than a preset distance threshold to share with the first network device, thereby reducing the time spent by the first network device in calling the computing function module through the third network device.
[0078] In some embodiments, when the third network device includes an edge computing device, the function forwarding message is a function registration message, and the initial logical distance is 0. That is, the edge computing device is a device mounted under the first network device. The third network device can send a function registration message to the first network device, and the function registration message includes function registration information of at least one fourth computing function module.
[0079] In some embodiments, after the first network device receives the function forwarding message sent by the third network device, the function registration information may be stored in the routing table.
[0080] Exemplarily, as shown in Table 1, it shows the routing table stored in the first network device.
[0081] Table 1
[0082] name Logical distance Next hop network device Computing function module 1 3 The address of network device a Computational function module 2 2 The address of network device b Computational function module 3 2.5 The address of network device b
[0083] Among them, the next-hop network device refers to the next-hop device of the first network device in the route when accessing the computing function module. That is, the logical distance between computing function module 1 and the first network device is 3, and calling computing function module 1 requires forwarding the request to network device a. The logical distance between computing function module 2 and the first network device is 2, and calling computing function module 2 requires forwarding the request to network device b. The logical distance between computing function module 3 and the first network device is 2.5, and calling computing function module 3 requires forwarding the request to network device b.
[0084] Exemplarily, the address of the network device may be an IPv4 address, an IPv6 address, or the like.
[0085] In some embodiments, the first network device may also update stored function registration information of each computing function module.
[0086] Exemplarily, the function registration information of each computing function module may be added, modified, or deleted.
[0087] S402: The first network device generates an updated logical distance of each first computing function module based on the initial logical distance and the number of jumps of each first computing function module.
[0088] The updated logical distance is used to indicate the logical distance to the first network device.
[0089] In a possible implementation, the first network device may obtain a target distance increment based on the number of jumps and a preset distance increment, where the preset distance increment is used to indicate the logical distance increased by one jump. Afterwards, the first network device generates an updated logical distance for each first computing function module based on the sum of the initial logical distance of each first computing function module and the target distance increment.
[0090] For example, if the jump count is 1, the preset distance increment is 1, and the initial logical distance is 0, the updated logical distance is 1. If the jump count is 1, the preset distance increment is 1, and the initial logical distance is 2, the updated logical distance is 3.
[0091] It is understandable that after the first network device receives the function forwarding message sent by the third network device, it can generate the updated logical distance of each first computing function module based on the initial logical distance and the number of jumps. In this way, it is convenient for the first network device to select the computing function module for assistance according to the latest logical distance, thereby improving the accuracy of the selection.
[0092] like Figure 5 As shown, a method for sharing a computing function module provided in an embodiment of the present application, in which S402 may include:
[0093] S501. The first network device generates a first logical distance for each first computing function module based on an initial logical distance and a jump count of each first computing function module.
[0094] It should be noted that the process of generating the first logical distance may refer to the description of generating the updated logical distance in S402 in the above embodiment, which will not be described in detail here.
[0095] S502: The first network device obtains a network quality parameter.
[0096] The network quality parameter is used to indicate the network quality between the first network device and the third network device. The network quality parameter may include at least one of the following parameters: delay, delay jitter, packet loss rate, bandwidth, etc.
[0097] S503: The first network device determines a second logical distance based on the network quality parameter.
[0098] In a possible implementation manner, the second logical distance is determined based on each parameter and a weight corresponding to the parameter.
[0099] For example, if the delay jitter, packet loss rate, and bandwidth are x1, x2, and x3 respectively, the corresponding weight coefficients are a1, a2, and a3 respectively. The second logical distance value is Y=a1*x1+a2*x2+a3*x3.
[0100] S504: The first network device generates an updated logical distance for each first calculation function module based on the first logical distance and the second logical distance.
[0101] In the embodiment of the present application, the updated logical distance is the sum of the first logical distance and the second logical distance.
[0102] Exemplarily, if the first logical distance is 1 and the second logical distance is 2.5, the updated logical distance is 3.5.
[0103] It can be understood that, based on the initial logical distance and the number of jumps of each first computing function module, the first logical distance of each first computing function module is generated. After that, the network quality parameter is obtained, and the second logical distance is determined based on the network quality parameter. Then, based on the first logical distance and the second logical distance, the updated logical distance of each first computing function module is generated. In other words, the updated logical distance takes into account the number of jumps and the network quality. In this way, the time spent by the computing function module to process the service request can be more truly reflected.
[0104] In some embodiments, the first network device may receive a function call request sent by the fourth network device, and the function call request is used to request to call a target computing function module among multiple first computing function modules. Afterwards, the first network device may send a business processing request to the target edge computing device where the target computing function module is deployed based on the function call request, and the business processing request is used to instruct to calculate the target computing task. Then, the target edge interpretation device may call the target edge computing device to calculate the target computing task in response to the business processing request to obtain a calculation result. Afterwards, the target edge computing device may send the calculation result to the first network device, and the first network device may send the calculation result to the fourth network device.
[0105] It is understandable that after receiving the function call request sent by the fourth network device, the first network device can call the mounted target edge computing module to assist in completing the computing task. In this way, each edge computing device can assist each other, thereby improving resource utilization.
[0106] The following is an introduction to the embodiments of the present application with reference to specific examples. Figure 6As shown, gateway 1 is connected to edge computing device 1, and gateway 2 is connected to edge computing device 2. Gateway 1 and gateway 2 both include: a function registration module, a function routing table, an information notification module, and a routing forwarding module. The function registration module is used to obtain the function registration information of the computing function module in the mounted edge computing device, and store the function registration information in the function routing table. The information passing module is used to transmit the function registration information of each computing function module with other network devices (such as gateways), and update the function registration information in other network devices to the function routing table. The routing forwarding module is used to forward function call requests and calculation results. Edge computing device 1 and edge computing device 2 both include at least one computing function module and a function publishing module.
[0107] For example, the edge computing device 1 includes a vehicle detection module and a pedestrian detection module. The edge computing device 1 can send a function registration message to the gateway 1 through the function publishing module. The function registration module of the gateway 1 can add the function registration information of the vehicle detection module and the function registration information of the pedestrian detection module to the function routing table. In addition, the information notification module can send the function registration information stored in the function routing table of the gateway 1 to the gateway 2.
[0108] For another example, the edge computing device 2 also includes a remote call proxy module. The business application in the edge computing device 2 can send a call request to the remote call proxy module, and the remote call proxy module sends a function call request to the gateway 2. After that, the gateway 2 can send a function call request to the gateway 1 through the routing forwarding module, and the routing forwarding module in the gateway 1 sends a business processing request to the remote call proxy module in the edge computing device 1. After that, the edge computing device 1 can call the corresponding computing function module to perform the computing task and obtain the computing result. Then, the computing result is transmitted to the edge computing device 2 along the original path.
[0109] It should be noted that the address of the gateway can be configured in the remote call proxy module, so that the developers of each application can complete the interaction with the gateway without configuring the address of the connected gateway.
[0110] The above mainly introduces the solution provided by the embodiment of the present application from the perspective of the method. It is understandable that in order to realize the above functions, the shared device of the computing function module includes a hardware structure and / or software module corresponding to the execution of each function. Those skilled in the art should easily realize that, in combination with the steps of the shared method of the computing function module of each example described in the embodiment disclosed in this application, the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a function is executed in the form of hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0111] The embodiment of the present application also provides a sharing device of a computing function module. The sharing device of the computing function module can be a network device, a CPU in the above network device, a sharing module in the above network device for sharing the computing function module, or a client in the above network device for sharing the computing function module.
[0112] The embodiment of the present application can divide the shared device of the computing function module into functional modules or functional units according to the above method example. For example, each functional module or functional unit can be divided corresponding to each function, or two or more functions can be integrated into one processing module. The above integrated module can be implemented in the form of hardware or in the form of software functional modules or functional units. Among them, the division of modules or units in the embodiment of the present application is schematic, which is only a logical function division, and there may be other division methods in actual implementation.
[0113] The present application embodiment provides a device for sharing a computing function module. Figure 7 As shown, the sharing device of the computing function module may include: an acquisition unit 701, a processing unit 702 and a sending unit 703.
[0114] The acquisition unit 701 is used to acquire the logical distance of multiple first computing function modules, the logical distance is used to reflect the time consumed by the computing function module to process the service request, and the multiple first computing function modules are deployed in at least one edge computing device. The processing unit 702 is used to determine at least one second computing function module from the multiple first computing function modules based on the logical distance of the multiple first computing function modules, and the logical distance of the second computing function module is less than a preset distance threshold. The sending unit 703 is used to send the function registration information of at least one second computing function module to the second network device.
[0115] In a possible design, the computing function module further includes a receiving unit 704, which is used to receive a function forwarding message sent by a third network device, and the function forwarding message includes: the initial logical distance and the number of jumps between each first computing function module and the third network device. The processing unit 702 is also used to generate an updated logical distance for each first computing function module based on the initial logical distance and the number of jumps of each first computing function module, and the updated logical distance is used to indicate the logical distance between the first network device.
[0116] In one possible design, the third network device includes: a router and / or an edge computing device; the plurality of first computing function modules include: at least one third computing function module and / or at least one fourth computing function module; the initial logical distance of the third computing function module is stored in the router, and the fourth computing function module is deployed in the edge computing device. In the case where the third network device is a router, the initial logical distance is less than a preset distance threshold.
[0117] In one possible design, the processing unit 702 is further used to generate a first logical distance for each first computing function module based on the initial logical distance and the number of jumps of each first computing function module. The acquisition unit 701 is further used to acquire a network quality parameter, which is used to indicate the network quality between the first network device and the third network device. The processing unit 702 is further used to determine the second logical distance based on the network quality parameter. The processing unit 702 is further used to generate an updated logical distance for each first computing function module based on the first logical distance and the second logical distance.
[0118] In one possible design, the receiving unit 704 is further used to receive a function call request sent by a fourth network device, where the function call request is used to request to call a target computing function module among multiple first computing function modules. The sending unit 703 is further used to send a business processing request to a target edge computing device where the target computing function module is deployed based on the function call request. The receiving unit 704 is further used to receive a calculation result sent by the target edge computing device. The sending unit 703 is further used to send the calculation result to the fourth network device.
[0119] In a possible design, the function registration information includes: an identifier of the computing function module and a uniform resource locator system of the computing function module.
[0120] Figure 8 8 is a schematic diagram of a computing function module sharing device according to an exemplary embodiment. The computing function module sharing device may include a processor 802, and the processor 802 is used to execute application code to implement the computing function module sharing method in this application.
[0121] The processor 802 may be a central processing unit (CPU), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits for controlling the execution of the program of the present application.
[0122] like Figure 8 As shown, the sharing device of the computing function module may further include a memory 803. The memory 803 is used to store application program codes for executing the solution of the present application, and the execution is controlled by the processor 802.
[0123] The memory 803 may be a read-only memory (ROM) or other types of static storage devices that can store static information and instructions, a random access memory (RAM) or other types of dynamic storage devices that can store information and instructions, or an electrically erasable programmable read-only memory (EEPROM), a compact disc read-only memory (CD-ROM) or other optical disc storage, optical disc storage (including compressed optical disc, laser disc, optical disc, digital versatile disc, Blu-ray disc, etc.), a magnetic disk storage medium or other magnetic storage device, or any other medium that can be used to carry or store the desired program code in the form of instructions or data structures and can be accessed by a computer, but is not limited thereto. The memory 803 may exist independently and be connected to the processor 802 via the bus 804. The memory 803 may also be integrated with the processor 802.
[0124] like Figure 8 As shown, the shared device of the computing function module may further include a communication interface 801, wherein the communication interface 801, the processor 802, and the memory 803 may be coupled to each other, for example, via a bus 804. The communication interface 801 is used to exchange information with other devices, for example, to support information exchange between the shared device of the computing function module and other devices.
[0125] It should be pointed out that Figure 8 The device structure shown in the figure does not constitute a limitation on the shared device of the computing function module, except Figure 8 In addition to the components shown, the shared device of the computing function module may include more or fewer components than shown, or combine certain components, or arrange the components differently.
[0126] In actual implementation, the functions implemented by the processing unit can be Figure 8 The processor 802 shown calls the program code in the memory 803 to implement.
[0127] The present application also provides a computer-readable storage medium, on which instructions are stored, and when the instructions in the computer-readable storage medium are executed by a processor of a computer device, the computer can execute the sharing method of the computing function module provided in the above-mentioned embodiment. For example, the computer-readable storage medium can be a memory 803 including instructions, and the above instructions can be executed by a processor 802 of a computer device to complete the above method. Optionally, the computer-readable storage medium can be a non-temporary computer-readable storage medium, for example, a non-temporary computer-readable storage medium can be a ROM, RAM, CD-ROM, magnetic tape, floppy disk, optical data storage device, etc.
[0128] Fig. 9 A conceptual partial view of a computer program product provided by an embodiment of the present application is schematically shown, where the computer program product includes a computer program for executing a computer process on a computing device.
[0129] In one embodiment, the computer program product is provided using a signal bearing medium 900. The signal bearing medium 900 may include one or more program instructions that, when executed by one or more processors, may provide the above-described Figure 2-Figure 5 Thus, for example, reference to Figure 2 In the embodiment shown in , one or more features of S201 to S203 may be undertaken by one or more instructions associated with the signal bearing medium 900. In addition, Fig. 9 The program instructions in also describe example instructions.
[0130] In some examples, the signal bearing medium 900 may include a computer readable medium 901, such as, but not limited to, a hard drive, a compact disk (CD), a digital video disk (DVD), a digital tape, a memory, a read-only memory (ROM) or a random access memory (RAM), and the like.
[0131] In some implementations, signal bearing medium 900 may include computer recordable medium 902 such as, but not limited to, memory, read / write (R / W) CD, R / W DVD, and the like.
[0132] In some implementations, signal bearing medium 900 may include communication medium 903 such as, but not limited to, digital and / or analog communication media (eg, fiber optic cables, waveguides, wired communication links, wireless communication links, etc.).
[0133] The signal bearing medium 900 may be communicated by a wireless form of communication medium 903. The one or more program instructions may be, for example, computer executable instructions or logic implemented instructions.
[0134] In some examples, the shared device of computing function modules can be configured to provide various operations, functions, or actions in response to one or more program instructions through computer-readable medium 901, computer-recordable medium 902, and / or communication medium 903.
[0135] Through the description of the above implementation methods, technical personnel in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional modules is used as an example. In actual applications, the above-mentioned functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above.
[0136] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic, for example, the division of modules or units is only a logical function division, and there may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another device, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0137] The units described as separate components may or may not be physically separated, and the components shown as units may be one physical unit or multiple physical units, that is, they may be located in one place or distributed in multiple different places. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.
[0138] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0139] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a readable storage medium. Based on this understanding, the technical solution of the embodiment of the present application is essentially or the part that contributes to the prior art or the full classification part or part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium, including a number of instructions to enable a device (which can be a single-chip microcomputer, chip, etc.) or a processor (processor) to execute the full classification part or part of the steps of each embodiment method of the present application. The aforementioned storage medium includes various media that can store program codes, such as-U disk, mobile hard disk, ROM, RAM, disk or CD.
[0140] The above are only specific implementations of the present application, but the protection scope of the present application is not limited thereto, and any changes or substitutions within the technical scope disclosed in the present application should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
Claims
1. A method for sharing a computing function module, characterized in that: Applied to a first network device, the method comprises: Acquire a logical distance of a plurality of first computing function modules, where the logical distance is used to reflect the time taken by the computing function modules to process a service request, and the plurality of first computing function modules are deployed on at least one edge computing device; Based on the logical distances of the plurality of first computing function modules, determining at least one second computing function module from the plurality of first computing function modules, wherein the logical distance of the second computing function module is less than a preset distance threshold; Sending function registration information of the at least one second computing function module to the second network device.
2. The method according to claim 1, characterized in that: The obtaining of the logical distances of the plurality of first calculation function modules comprises: receiving a function forwarding message sent by a third network device, wherein the function forwarding message includes: an initial logical distance and a jump number between each of the first computing function modules and the third network device; Based on the initial logical distance of each first computing function module and the number of jumps, an updated logical distance of each first computing function module is generated, where the updated logical distance is used to indicate the logical distance between the first network device and the first computing function module.
3. The method according to claim 2, characterized in that The third network device includes: a router and / or an edge computing device; the plurality of first computing function modules include: at least one third computing function module and / or at least one fourth computing function module; the initial logical distance of the third computing function module is stored in the router, and the fourth computing function module is deployed in the edge computing device; When the third network device is a router, the initial logical distance is less than the preset distance threshold.
4. The method according to claim 2, characterized in that: The step of generating an updated logical distance of each of the first computing function modules based on the initial logical distance of each of the first computing function modules and the number of jumps includes: Based on the initial logical distance of each of the first computing function modules and the number of jumps, generating a first logical distance of each of the first computing function modules; Acquire a network quality parameter, where the network quality parameter is used to indicate a network quality between the first network device and the third network device; Based on the network quality parameter, determining a second logical distance; Based on the first logical distance and the second logical distance, an updated logical distance of each of the first calculation function modules is generated.
5. The method according to claim 1, characterized in that The method further comprises: receiving a function call request sent by a fourth network device, wherein the function call request is used to request to call a target computing function module among the plurality of first computing function modules; Based on the function call request, sending a service processing request to a target edge computing device where the target computing function module is deployed; Receive the calculation result sent by the target edge computing device, and send the calculation result to the fourth network device.
6. The method according to claim 1, characterized in that The function registration information includes: an identifier of a computing function module and a uniform resource locator system of the computing function module.
7. A device for sharing computing function modules, characterized in that: Applied to a first network device, the apparatus comprises: an acquisition unit, configured to acquire a logical distance of a plurality of first computing function modules, wherein the logical distance is used to reflect the time consumed by the computing function modules for processing a service request, and the plurality of first computing function modules are deployed on at least one edge computing device; a processing unit, configured to determine at least one second computing function module from the plurality of first computing function modules based on the logical distances of the plurality of first computing function modules, wherein the logical distance of the second computing function module is less than a preset distance threshold; A sending unit is used to send the function registration information of the at least one second computing function module to the second network device.
8. A device for sharing computing function modules, characterized in that: include: Processor and memory; The processor is coupled to the memory; The memory is used to store one or more programs, and one or more of the programs include computer execution instructions. When the shared device of the computing function module is running, the processor executes the computer execution instructions stored in the memory to enable the shared device of the computing function module to perform the method as described in any one of claims 1-6.
9. A computer-readable storage medium, wherein instructions are stored in the computer-readable storage medium, characterized in that: When a computer executes the instruction, the computer performs the method according to any one of claims 1 to 6.
10. A computer program product comprising instructions, characterized in that When the instructions are executed by a computing device, the computing device is caused to perform the method according to any one of claims 1 to 6.