Data forwarding method, apparatus, device, and storage medium
By obtaining computing resource configuration information from within the forwarding device and determining the target computing resources for data processing, the problem of low data interaction efficiency of the forwarding device is solved, and more efficient data interaction and processing are achieved.
Patent Information
- Application Number
- CN202211531328.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-01
- Publication Date
- 2026-01-27
- Estimated Expiration
- 2042-12-01
AI Technical Summary
In existing technologies, forwarding devices only have forwarding functions and lack data processing capabilities, resulting in low data interaction efficiency and a mismatch between computing resources and data processing, thus reducing processing efficiency.
The system obtains computing resource configuration information within the forwarding device, determines the target computing resources corresponding to each stage of processing, processes the target data using the internal computing resources, and forwards the processed data to the next-hop device.
By processing data within the forwarding device, data forwarding time is reduced, data interaction efficiency is improved, and the efficiency of processing at each stage is enhanced.
Smart Images

Figure CN116155913B_ABST
Abstract
Description
Technical Field
[0001] This application relates to communication technology, and more particularly to a data forwarding method, apparatus, device, and storage medium. Background Technology
[0002] With the development of communication technology, users have increasingly higher requirements for communication. In order to ensure that users can communicate smoothly and exchange data, it is necessary to optimize the forwarding equipment that forwards data between user terminals.
[0003] In the prior art, after the forwarding device receives the target data to be forwarded, it will call computing resources to perform a series of processing on the target data. After the computing resources complete the processing, the processed data will be sent to the forwarding device. Then the forwarding device will finally obtain the data to be forwarded to the next hop device. Finally, the forwarding device will send the data to be forwarded to the next hop device, thus realizing the data interaction between users.
[0004] In existing technologies, forwarding devices only have forwarding capabilities and lack data processing capabilities. When target data is transmitted to the forwarding device, the device relies on external computing resources to process it. The data must be forwarded between the forwarding device and these external computing resources, resulting in a long data forwarding process and low efficiency for data interaction between users. Furthermore, the external computing resources do not consider the characteristics of the data when processing it, leading to a mismatch between the computing resources available and the data being processed, further reducing processing efficiency. Summary of the Invention
[0005] This application provides a data forwarding method, apparatus, device, and storage medium to solve the problem of low efficiency in data interaction between users and reduced data processing efficiency.
[0006] Firstly, this application provides a data forwarding method, including:
[0007] Obtain the target data to be forwarded;
[0008] Obtain pre-stored computing resource configuration information corresponding to the sequential processing of the target data in multiple stages;
[0009] The target computing resources for each stage of processing are determined based on the configuration information of each computing resource. The target computing resources are the computing resources inside the forwarding device.
[0010] The target data is processed sequentially at corresponding stages using the target computing resources to obtain the processed data;
[0011] The processed data is then forwarded to the next-hop device.
[0012] In one approach, the computing resource configuration information includes configuration information for the unpacking stage and configuration information for the packaging stage;
[0013] The step of determining the target computing resources corresponding to each stage of processing based on the configuration information of each computing resource includes:
[0014] The first target computing resource is determined based on the configuration information of the unblocking business phase; the first target computing resource is the computing resource corresponding to the unblocking phase.
[0015] The third target computing resource is determined based on the configuration information of the encapsulation business stage; the third target computing resource is the computing resource corresponding to the encapsulation stage.
[0016] In one approach, the target data is of image data or video data, and the computing resource configuration information further includes image processing stage configuration information;
[0017] Based on the configuration information of each computing resource, the target computing resources corresponding to each stage of processing are determined, including:
[0018] The second target computing resource is determined based on the image processing stage configuration information, and the second target computing resource is the computing resource corresponding to the image processing stage.
[0019] In one approach, determining the first target computing resource based on the unblocking business phase configuration information includes:
[0020] The first stage computing resource group is determined based on the unblocking business stage configuration information; the first stage computing resource group contains multiple first computing resource identifiers, and the type of the first computing resource is a central processing unit;
[0021] Idle first computing resource identifiers are determined from a plurality of first computing resource identifiers based on the latest pre-stored task work order; the task work order contains computing resource identifiers that are in a working state;
[0022] The first idle computing resource is designated as the first target computing resource.
[0023] In one approach, determining the second target computing resource based on the image processing stage configuration information includes:
[0024] The second-stage computing resource group is determined based on the image processing stage configuration information; the second-stage computing resource group contains multiple second computing resource identifiers, and the type of the second computing resource is an image processor.
[0025] Idle second computing resource identifiers are determined from multiple second computing resource identifiers based on the latest pre-stored task work order;
[0026] The idle second computing resource is identified as the second target computing resource.
[0027] In one approach, determining the third target computing resource based on the encapsulation service stage configuration information includes:
[0028] Based on the configuration information of the encapsulation business stage, it is determined that the third target computing resource is consistent with the first target computing resource;
[0029] The first target computing resource is designated as the third target computing resource.
[0030] In one approach, the step of using target computing resources to process the target data sequentially at corresponding stages to obtain processed data includes:
[0031] The target data is desealed using the first target computing resources to obtain the desealed data;
[0032] In response to the fact that the unsealed data contains image processing stage identification information, the second target computing resources are used to process the unsealed data according to the image processing stage to obtain data after the image processing stage.
[0033] The data after the image processing stage is encapsulated using a third target computing resource to obtain the processed data.
[0034] In one approach, after desealing the target data using a first target computing resource to obtain the desealed data, the method further includes:
[0035] In response to the fact that the unsealed data does not contain image processing stage identification information, a third target computing resource is used to encapsulate the unsealed data to obtain the processed data.
[0036] In one approach, the unsealed data includes a sender's user identifier and a receiver's user identifier;
[0037] After obtaining the unsealing data, the process also includes:
[0038] Retrieve the pre-stored data flow table;
[0039] The data forwarding path is determined based on the sender's user identifier and the receiver's user identifier;
[0040] Determine the next-hop device and sending port based on the data forwarding path;
[0041] The step of forwarding the processed data to the next-hop device includes:
[0042] The processed data is forwarded to the next-hop device using the sending port.
[0043] Secondly, this application provides a data forwarding apparatus, the apparatus comprising:
[0044] The first acquisition module is used to acquire the target data to be forwarded;
[0045] The second acquisition module is used to acquire pre-stored computing resource configuration information corresponding to the sequential processing of the target data in multiple stages.
[0046] The determination module is used to determine the target computing resources corresponding to each stage of processing based on the configuration information of each computing resource. The target computing resources are the computing resources inside the forwarding device.
[0047] The processing module is used to process the target data sequentially using the target computing resources of each target at the corresponding stage to obtain the processed data;
[0048] The forwarding module is used to forward the processed data to the next-hop device.
[0049] Thirdly, this application provides an electronic device, including: a processor, and a memory communicatively connected to the processor;
[0050] The memory stores computer-executed instructions;
[0051] The processor executes computer execution instructions stored in the memory to implement the method as described in the first aspect or any of the above methods.
[0052] Fourthly, this application provides a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, are used to implement the method described in the first aspect or any of the above-described methods.
[0053] This application provides a data forwarding method, apparatus, device, and storage medium, specifically including: acquiring target data to be forwarded; acquiring pre-stored computing resource configuration information corresponding to multiple stages of processing of the target data; determining the target computing resources corresponding to each stage of processing based on the computing resource configuration information, wherein the target computing resources are computing resources within the forwarding device; using each target computing resource to sequentially process the target data at the corresponding stage to obtain processed data; and forwarding the processed data to the next-hop device. The data forwarding apparatus of this application first acquires the target data to be forwarded, then acquires pre-stored computing resource configuration information corresponding to multiple stages of processing. The data forwarding apparatus determines the target computing resources corresponding to each stage of processing based on the computing resource configuration information. Since the target computing resources are computing resources within the forwarding device, and the target data itself is located within the forwarding device, when processing the target data at each stage, the target data is forwarded within the forwarding device and forwarded to the internal target computing resources, thereby realizing data processing at each stage. Because the target data is forwarded and processed within the forwarding device, the time required for the entire data forwarding of the target data is reduced, thereby improving the efficiency of data interaction between users. Meanwhile, since the target computing resources are determined based on the configuration information of each computing resource, the target computing resources of each stage are more in line with the processing of the corresponding stage. Therefore, the target computing resources of each stage are more in line with the actual situation of the corresponding stage. Thus, when the target data is processed using the target computing resources adapted to each stage, the processing time can be reduced. Therefore, the efficiency of processing the data of the corresponding stage can be improved in each stage. After the target data is processed, the entire forwarding process takes less time to forward the processed data to the next hop device. Attached Figure Description
[0054] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.
[0055] Figure 1 An application scenario diagram of a data forwarding method provided in this application;
[0056] Figure 2 A flowchart illustrating a data forwarding method provided in Embodiment 1 of this application;
[0057] Figure 3 This is a flowchart illustrating a data forwarding method provided in Embodiment 2 of this application;
[0058] Figure 4 This is a flowchart illustrating a data forwarding method provided in Embodiment 3 of this application;
[0059] Figure 5This is a flowchart illustrating a data forwarding method provided in Embodiment 4 of this application;
[0060] Figure 6 This is a flowchart illustrating a data forwarding method provided in Embodiment 5 of this application;
[0061] Figure 7 This is a schematic diagram of a data forwarding device provided in Embodiment Six of this application;
[0062] Figure 8 This is a schematic diagram of the structure of an electronic device provided in Embodiment 7 of this application.
[0063] The accompanying drawings illustrate specific embodiments of this application, which will be described in more detail below. These drawings and descriptions are not intended to limit the scope of the concept in any way, but rather to illustrate the concept of this application to those skilled in the art through reference to particular embodiments. Detailed Implementation
[0064] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numbers in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this application as detailed in the appended claims.
[0065] In the prior art, after the forwarding device receives the target data to be forwarded, it will call computing resources to perform a series of processing on the target data. After the computing resources complete the processing, the processed data will be sent to the forwarding device. Then the forwarding device will finally obtain the data to be forwarded to the next hop device. Finally, the forwarding device will send the data to be forwarded to the next hop device, thus realizing the data interaction between users.
[0066] In existing technologies, forwarding devices only have forwarding capabilities and lack data processing capabilities. When target data is transmitted to the forwarding device, the device relies on external computing resources to process it. The data must be forwarded between the forwarding device and these external computing resources, resulting in a long data forwarding process and low efficiency for data interaction between users. Furthermore, the external computing resources do not consider the characteristics of the data when processing it, leading to a mismatch between the computing resources available and the data being processed, further reducing processing efficiency.
[0067] To address the shortcomings of existing technologies, the inventors of this solution have creatively designed a new approach. This solution provides a data forwarding method. To solve the problem of low efficiency in data interaction between users, the data forwarding device of this application first acquires the target data to be forwarded, and then acquires pre-stored computing resource configuration information corresponding to multiple processing stages. The data forwarding device determines the target computing resources corresponding to each processing stage based on the computing resource configuration information. Since the target computing resources are internal computing resources of the forwarding device, when each target computing resource is used to process the target data at the corresponding stage, the time for sending the target data to the target computing resource can be reduced, thereby improving the efficiency of target data processing. Simultaneously, since the computing resource configuration information is determined based on the target computing resources for each stage, the target computing resources for each stage are compatible with the processing of each stage. Therefore, the target computing resources are more suitable, and using the suitable target computing resources to process the target data is more efficient, thus more smoothly achieving the forwarding of the processed data to the next-hop device.
[0068] The following describes the application scenarios of the data forwarding method, apparatus, device, and storage medium provided in this application.
[0069] Figure 1 This is a diagram illustrating an application scenario for a data forwarding method provided in this application. For example... Figure 1 As shown in the diagram, the application scenario includes a user device 101, a forwarding device 102, and a next-hop device 103. The forwarding device 102 includes a data forwarding unit 104, and the data forwarding unit 104 includes a storage area 105.
[0070] In this context, user equipment 101 is the device that sends the target data to be forwarded, and can be a mobile phone or other device. Forwarding device 102 is a device with data forwarding capabilities. Next-hop device 103 can be the next forwarding device or the end user equipment receiving the target data; there are no restrictions here.
[0071] User equipment 101 is communicatively connected to forwarding device 102, and forwarding device 102 is communicatively connected to next-hop device 103. The communication connection can be a wired connection or a wireless connection.
[0072] Specifically, user equipment 101 needs to interact with the end user equipment receiving the target data. User equipment 101 sends the target data to be forwarded to forwarding device 102. Then, forwarding device 102 receives the target data and transmits it to data forwarding device 104. Next, data forwarding device 104 retrieves the pre-stored computing resource configuration information corresponding to the sequential multi-stage processing of the target data from storage area 105, and determines the target computing resources corresponding to each stage based on the computing resource configuration information. The target computing resources are located inside forwarding device 102. Furthermore, each stage of processing is performed using the target computing resources to obtain the processed data.
[0073] Furthermore, the data forwarding device 104 will send the processed data to the next-hop device 103.
[0074] It should be noted that the forwarding device 102 contains multiple types of computing resource groups, and each computing resource group contains multiple computing resources, such as a central processing unit.
[0075] The data forwarding method provided in this application aims to solve the above-mentioned technical problems of the prior art.
[0076] The technical solution of this application and how the technical solution of this application solves the above-mentioned technical problems are described in detail below with specific embodiments. These specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described again in some embodiments. The embodiments of this application will now be described with reference to the accompanying drawings.
[0077] Example 1
[0078] Figure 2 This is a flowchart illustrating a data forwarding method provided in Embodiment 1 of this application. The executing entity of this embodiment is a data forwarding device, such as... Figure 2 As shown, the specific steps are as follows.
[0079] S201, Obtain the target data to be forwarded.
[0080] The target data to be forwarded is the data that will ultimately be sent to the user equipment receiving the data. It should be noted that, in order to comply with network protocols, the target data is encapsulated before being transmitted over the network.
[0081] Specifically, the data forwarding device can obtain the target data to be forwarded from the user equipment that sent the data.
[0082] S202, Obtain the pre-stored computing resource configuration information corresponding to the sequential processing of target data in multiple stages.
[0083] The computing resource configuration information pertains to the computing resource configuration at each processing stage. This configuration information is pre-configured and sent to the data forwarding device via the management server. The management server is the device used to configure the computing resources. The computing resource configuration information is stored in the storage area of the data forwarding device.
[0084] Specifically, the data forwarding device obtains the computing resource configuration information corresponding to multiple stages of processing from the storage area.
[0085] S203, determine the target computing resources corresponding to each stage of processing based on the configuration information of each computing resource. The target computing resources are the computing resources inside the forwarding device.
[0086] It should be noted that different computing resources may be required for each stage of processing, depending on the type of business at each stage.
[0087] The forwarding device deploys various types of computing resources, and the target computing resources are determined from the computing resources inside the forwarding device.
[0088] Specifically, the data forwarding device determines the computing resources corresponding to each stage of processing based on the configuration information of each computing resource, and then identifies the computing resource as the target computing resource corresponding to that stage.
[0089] For example, if the computing resource configuration information at a certain stage is computing resource group 1, then computing resource group 1 will be determined as the target computing resource for that stage.
[0090] S204, using the target computing resources of each target to process the target data in the corresponding stages in sequence to obtain the processed data.
[0091] Specifically, different target computing resources may be used for processing at different stages, and the processed data is obtained after all stages are completed.
[0092] S205 forwards the processed data to the next-hop device.
[0093] This embodiment provides a data forwarding method, specifically including: acquiring target data to be forwarded; acquiring pre-stored computing resource configuration information corresponding to multiple stages of processing of the target data; determining the target computing resources corresponding to each stage of processing based on the computing resource configuration information, wherein the target computing resources are computing resources within the forwarding device; using each target computing resource to sequentially process the target data at the corresponding stage to obtain processed data; and forwarding the processed data to the next-hop device. In this embodiment, the data forwarding device first acquires the target data to be forwarded, then acquires pre-stored computing resource configuration information corresponding to multiple stages of processing. The data forwarding device determines the target computing resources corresponding to each stage of processing based on the computing resource configuration information. Since the target computing resources are computing resources within the forwarding device, and the target data itself is located within the forwarding device, when processing of the target data at each stage is required, the target data is forwarded within the forwarding device and forwarded to the internal target computing resources, thereby realizing data processing at each stage. Because the target data is processed by forwarding within the forwarding device, the overall data forwarding time is reduced, thereby improving the efficiency of data interaction between users. Meanwhile, since the target computing resources are determined based on the configuration information of each computing resource, the target computing resources at each stage are more in line with the processing of the corresponding stage. Therefore, the target computing resources at each stage are more in line with the actual situation of the corresponding stage. Thus, using the appropriate target computing resources to process the target data can reduce the processing time. Therefore, the efficiency of processing the data at each stage can be improved. After the target data is processed, the entire forwarding process takes less time to forward the processed data to the next hop device.
[0094] Example 2
[0095] This application embodiment is a further refinement of the above embodiment one. The computational resource configuration information in this embodiment includes configuration information for the unpacking stage and configuration information for the packaging stage.
[0096] The unsealing phase configuration information specifies the computing resources used when unsealing data. The purpose of unsealing is to obtain the unsealed data.
[0097] The encapsulation phase configuration information specifies the computing resources used when encapsulating data. The purpose of encapsulation is to ensure that data is forwarded between forwarding devices in accordance with network protocol specifications.
[0098] This embodiment is an optional method for determining the target computing resources corresponding to each stage of processing based on the configuration information of each computing resource. The specific content is as follows.
[0099] The first target computing resource is determined based on the configuration information of the unblocking business phase; the first target computing resource is the computing resource corresponding to the unblocking phase.
[0100] Specifically, if the data forwarding device determines that the configuration information of the unblocking service stage is the first stage computing resource group, then the data forwarding device can identify all computing resources in the first stage computing resource group as the computing resources corresponding to the unblocking stage, which is the first target computing resource.
[0101] In one approach, this method is an optional way to determine the first target computing resource based on the configuration information of the unblocking business phase. Figure 3 This is a flowchart illustrating a data forwarding method provided in Embodiment 2 of this application.
[0102] S301, determine the first-stage computing resource group based on the unblocking business stage configuration information; the first-stage computing resource group contains multiple first computing resource identifiers, and the type of the first computing resource is a central processing unit.
[0103] The first-stage computing resource group is a collection of multiple first computing resources, which includes multiple first computing resource identifiers. The type of the first computing resource is a central processing unit, so the first-stage computing resource group is a central processing unit group.
[0104] Specifically, the configuration information during the unblocking business phase includes the first-stage computing resource group. For example, the first-stage computing resource group (CPU1-CPU10) represents CPU1 to CPU10 forming the first-stage computing resource group.
[0105] S302, determine the idle first computing resource identifier from multiple first computing resource identifiers based on the latest pre-stored task work order; the task work order contains computing resource identifiers that are in a working state.
[0106] The latest task order is the one most recent to the current time. Understandably, if the computing resources of the forwarding device were previously idle but are now occupied due to business needs, the data forwarding device will update the task orders with these computing resources, resulting in the latest task orders. Task orders can be stored in the storage area of the data forwarding device.
[0107] There can be multiple idle first computing resources, and there is no restriction here.
[0108] Specifically, the data forwarding device retrieves the latest task order from its own storage area and identifies the computing resource identifier that is in working status from the latest task order. Then, the data forwarding device identifies the idle first computing resource identifier from a plurality of first computing resource identifiers.
[0109] S303, the idle first computing resource is identified as the first target computing resource.
[0110] For example, if the data forwarding device determines that the first idle computing resources are CPU1-CPU2, then CPU1-CPU2 will be identified as the first target computing resources.
[0111] In one approach, the data forwarding device can determine the corresponding number of first target computing resources from the available first computing resources based on the volume of the target data.
[0112] For example, if the target data volume is greater than or equal to a preset first volume, then a first preset number of first computing resources are determined from the idle first computing resources as the first target computing resources; if the target data volume is less than a preset second volume, then a second preset number of first computing resources are determined from the idle first computing resources as the first target computing resources; if the target data volume is between the first preset volume and the preset second volume, then a third preset number of first computing resources are determined from the idle first computing resources as the first target computing resources. Similarly, the target computing resources corresponding to other stages can be determined using this method, which will not be elaborated here.
[0113] When determining the first target computing resource based on the unblocking business phase configuration information, this method specifically includes: determining a first-phase computing resource group based on the unblocking business phase configuration information; the first-phase computing resource group contains multiple first computing resource identifiers, and the type of the first computing resource is a central processing unit; determining an idle first computing resource identifier from the multiple first computing resource identifiers based on the latest pre-stored task work order; the task work order contains computing resource identifiers that are in a working state; and determining the idle first computing resource as the first target computing resource. In this embodiment, the data forwarding device first determines the first-stage computing resource group based on the unblocking service stage configuration information. This first-stage computing resource group contains multiple first computing resources. Then, it determines the idle first computing resources based on the latest task work order. Since the task work order contains identifiers of computing resources in a working state and is the latest task work order, it better reflects the current situation. Therefore, the data forwarding device accurately identifies the idle first computing resource identifier and determines the idle first computing resource as the first target computing resource, ensuring the accuracy of the first target computing resource. The obtained first target computing resource is idle, which speeds up target data processing and improves processing efficiency. Furthermore, the type of this first computing resource is a central processing unit (CPU), which meets the computing resource requirements for data unblocking. Therefore, the determined first target computing resource also matches the data processing situation of the corresponding stage, making the first target computing resource more suitable for the corresponding stage.
[0114] The third target computing resource is determined based on the configuration information of the encapsulation business stage; the third target computing resource is the computing resource corresponding to the encapsulation stage.
[0115] Specifically, if the data forwarding device determines that the content of the encapsulation service stage configuration information is the third stage computing resource group, then the data forwarding device can identify all computing resources in the third stage computing resource group as the computing resources corresponding to the uncapsulation stage, which are the third target computing resources.
[0116] In one approach, this method is an optional way to determine the third target computing resource based on the configuration information of the encapsulation business stage, as detailed below.
[0117] Based on the configuration information of the encapsulation business stage, it is determined that the computing resources of the third target are consistent with those of the first target.
[0118] Specifically, the data forwarding device reads the encapsulation service stage configuration information, which indicates that the third target computing resources are consistent with the first target computing resources.
[0119] It should be noted that the types and quantities of computing resources required for the unpacking and packaging operations can be the same, therefore the computing resources for the third target can be the same as those for the first target.
[0120] The computing resources for the first objective are designated as the computing resources for the third objective.
[0121] This method, when determining the third target computing resource based on the encapsulation service stage configuration information, specifically includes: determining that the third target computing resource is consistent with the first target computing resource based on the encapsulation service stage configuration information; and determining the first target computing resource as the third target computing resource. In this embodiment, since encapsulation and decapsulation are two relative services, the data forwarding device will determine that the third target computing resource is consistent with the first target computing resource based on the encapsulation service stage configuration information, thereby determining the first target computing resource as the third target computing resource. This saves time in determining the third computing resource and also achieves full utilization of computing resources.
[0122] This embodiment provides a data forwarding method. The computing resource configuration information includes configuration information for the unpacking stage and configuration information for the encapsulation stage. When determining the target computing resources corresponding to each stage based on the configuration information, the method specifically includes: determining a first target computing resource based on the unpacking stage configuration information; the first target computing resource is the computing resource corresponding to the unpacking stage; determining a third target computing resource based on the encapsulation stage configuration information; the third target computing resource is the computing resource corresponding to the encapsulation stage. In this embodiment, the data forwarding device determines the corresponding target computing resources for different stages based on different computing resource configuration information. The data forwarding device determines the first target computing resource based on the unpacking stage configuration information and simultaneously determines the third target computing resource based on the encapsulation stage configuration information, thereby obtaining the computing resources corresponding to the unpacking stage and the encapsulation stage respectively. This embodiment can accurately obtain the target computing resources corresponding to the unpacking stage and the encapsulation stage by relying on the computing resource configuration information.
[0123] Example 3
[0124] This embodiment is a further refinement of any of the above embodiments. The data type of the target data in this embodiment is image data or video data, and the computing resource configuration information also includes image processing stage configuration information.
[0125] Image data refers to data in image format.
[0126] Among them, video data refers to data in video format.
[0127] This embodiment is an optional method for determining the target computing resources corresponding to each stage of processing based on the configuration information of each computing resource. The specific content is as follows.
[0128] The second target computing resource is determined based on the image processing stage configuration information. The second target computing resource is the computing resource corresponding to the image processing stage.
[0129] Specifically, if the data forwarding device determines that the content of the image processing stage configuration information is the second stage computing resource group, then the data forwarding device can identify all computing resources in the second stage computing resource group as the computing resources corresponding to the image processing stage, which are the second target computing resources.
[0130] This embodiment provides a data forwarding method. The target data type in this embodiment is image data or video data, and the computing resource configuration information also includes image processing stage configuration information. When determining the target computing resource corresponding to each processing stage based on the computing resource configuration information, the method specifically includes: determining a second target computing resource based on the image processing stage configuration information. The second target computing resource is the computing resource corresponding to the image processing stage. In this embodiment, the data forwarding device determines the second target computing resource based on the image processing stage configuration information, thus determining the second target computing resource as the computing resource corresponding to the image processing stage. Therefore, the data forwarding device in this embodiment can accurately determine the second target computing resource based on the image processing stage configuration information. Since the computing resources included in the image processing stage configuration information are specifically provided for image processing, the second target computing resource is suitable for image processing and therefore better meets the needs of image processing.
[0131] In one way, Figure 4 This is a flowchart illustrating a data forwarding method provided in Embodiment 3 of this application. This method is an optional approach for determining the second target computing resource based on image processing stage configuration information, such as... Figure 4 As shown, the specific steps are as follows.
[0132] S401, determine the second-stage computing resource group based on the image processing stage configuration information; the second-stage computing resource group contains multiple second computing resource identifiers, and the type of the second computing resource is an image processor.
[0133] S402, determine the idle second computing resource identifier from multiple second computing resource identifiers based on the latest pre-stored task work order.
[0134] S403, the idle second computing resource is identified as the second target computing resource.
[0135] The specific implementation method is similar to that in Example 2 in determining the first target computing resource, and will not be described in detail here.
[0136] When determining the second target computing resource based on the image processing stage configuration information, this method specifically includes: determining a second-stage computing resource group based on the image processing stage configuration information; the second-stage computing resource group contains multiple second computing resource identifiers, and the type of the second computing resource is an image processor; determining an idle second computing resource identifier from the multiple second computing resource identifiers based on the latest pre-stored task work order; and determining the idle second computing resource as the second target computing resource. In this embodiment, the data forwarding device determines the second-stage computing resource group through the image processing stage configuration information. Then, it identifies the computing resources in a working state from the latest task order. The data forwarding device then identifies the idle second computing resource identifier from multiple second computing resource identifiers. To ensure the second target computing resource is idle, this embodiment determines the working computing resources from the task order. Since the task order is up-to-date, the obtained working computing resources are also up-to-date, thus conforming to the actual situation. The data forwarding device accurately obtains the idle second computing resource identifier and identifies the idle second computing resource as the second target computing resource. Because the second target computing resource is idle, it speeds up the processing of target data, improving processing efficiency. Simultaneously, this second target computing resource is an image processor, which meets the data processing and computing requirements of this stage. Therefore, the second target computing resource conforms to the data processing situation of the corresponding stage, making it more suitable for the corresponding stage.
[0137] Example 4
[0138] Figure 5 This is a flowchart illustrating a data forwarding method provided in Embodiment 4 of this application. This embodiment is an optional method that uses target computing resources to sequentially process target data at corresponding stages to obtain processed data. Figure 5 As shown, the specific steps are as follows.
[0139] S501, the first target computing resources are used to decapsulate the target data to obtain decapsulated data.
[0140] Specifically, the data forwarding device sends the target data to the first target computing resource, which then decrypts the target data to obtain the decrypted data.
[0141] S502, in response to the fact that the unsealed data contains image processing stage identification information, the second target computing resources are used to process the unsealed data according to the image processing stage to obtain the data after the image processing stage.
[0142] Among them, the image processing stage identification information is information that reflects the type of target data. The image processing stage identification information can be image feature values or video feature values, or other information that can indicate that the target data is image data or video data, and there are no restrictions here.
[0143] Specifically, if there is image processing stage identification information in the unsealed data, the data forwarding device will transmit the target data to the second target computing resource, and the second target computing resource will perform image processing on the unsealed data, for example, processing the image resolution according to regulations, etc., to obtain the data after the image processing stage.
[0144] S503 uses third-target computing resources to encapsulate the data after the image processing stage to obtain the processed data.
[0145] Specifically, the data forwarding device sends the data after the image processing stage to the third target computing resource, which then encapsulates the data. The encapsulated data can then be forwarded between forwarding devices to obtain the processed data.
[0146] This embodiment provides a data forwarding method. When target data is processed sequentially at corresponding stages using various target computing resources to obtain processed data, the method specifically includes: using a first target computing resource to decapsulate the target data to obtain decapsulated data; responding to the fact that the decapsulated data contains image processing stage identifier information, using a second target computing resource to process the decapsulated data according to the image processing stage to obtain data after the image processing stage; and using...
[0147] The third target computing resource encapsulates the data after the image processing stage to obtain the processed data. In this embodiment, the data forwarding device uses the first target computing resource to decapsulate the target data, thereby obtaining the decapsulated data.
[0148] In response to the image processing stage identifier information contained in the unsealed data, a second target computing resource will be used to perform image processing on the unsealed data. Then, a third target computing resource will be used to encapsulate the data after the image processing stage. After processing by the target computing resources corresponding to each stage, the processed data can be obtained. This is because each stage has its own target...
[0149] The computing resources are matched to the processing work at the corresponding stage, so that the processing can be carried out by the appropriate target computing resources, and thus the processed data can be obtained more efficiently.
[0150] In one approach, the target data is decapsulated using the first target computing resources to obtain the decapsulated data. This is an optional approach, as detailed below.
[0151] Since the unsealed data does not contain image processing stage identification information, a third-party target computing resource is used to encapsulate and process the unsealed data to obtain the processed data.
[0152] 5. Specifically, the data forwarding device will respond if the unsealed data does not contain image processing stage identification information, then the data forwarding...
[0153] The transmitting device transmits the desealed data to a third target computing resource, which then performs encapsulation processing to obtain the processed data.
[0154] This method, after using the first target computing resources to decapsulate the target data to obtain the decapsulated data, has...
[0155] The body includes: in response to the fact that the unsealed data does not contain image processing stage identification information, using third-party target computing resources to encapsulate the unsealed data to obtain processed data. In this embodiment, the data forwarding device responds to the fact that the unsealed data does not contain image processing stage identification information.
[0156] The first type of data contains image processing stage identifier information, and then a third-party target computing resource is used to encapsulate and process the unsealed data. The second type does not contain image processing stage identifier information, indicating that image processing is not required for the unsealed data; therefore, a third-party target computing resource is used for processing to obtain the processed data.
[0157] Example 5
[0158] 5. The data unblocked in this embodiment includes the sender's user identifier and the receiver's user identifier;
[0159] Among them, the sender user identifier is the identifier of the user equipment that sends the data.
[0160] Among them, the recipient user identifier is the identifier of the user equipment receiving the data.
[0161] Figure 6 This is a flowchart illustrating a data forwarding method provided in Embodiment 5 of this application. This embodiment represents an optional approach after obtaining the unblocked data, such as... Figure 6 As shown, the specific steps are as follows.
[0162] 0S601, retrieve the pre-stored data flow table.
[0163] Among them, the data flow table is the data forwarding strategy. Each forwarding device has a corresponding data flow table, which is sent by the management server to each forwarding device and stored in the storage area.
[0164] Understandably, the data flow table contains the data forwarding paths between users.
[0165] Specifically, the data forwarding device retrieves the pre-stored data flow table from the storage area.
[0166] S602 determines the data forwarding path based on the sender's user identifier and the receiver's user identifier.
[0167] The data forwarding path includes at least one forwarding device identifier. For example, the data forwarding path may be: user equipment sending data - forwarding device 1 - forwarding device 2 - user equipment receiving data.
[0168] Specifically, the data forwarding device determines the data forwarding path between user equipment based on the sender's user identifier and the receiver's user identifier, and then determines the forwarding device in the data forwarding path.
[0169] S603 determines the next-hop device and sending port based on the data forwarding path.
[0170] The sending port refers to the port from the current forwarding device to the next-hop device after processing the data. In other words, the sending port connects to the next-hop device.
[0171] Specifically, the data forwarding device reads the data forwarding path, determines the next-hop device identifier and the sending port identifier in the data forwarding path, and then the data forwarding device determines the next-hop device and the sending port.
[0172] In one approach, this method is an optional way to forward the processed data to the next-hop device, as detailed below.
[0173] The processed data is forwarded to the next-hop device using the sending port.
[0174] This embodiment provides a data forwarding method. The decrypted data contains a sender's user identifier and a receiver's user identifier. After obtaining the decrypted data, the method specifically includes: acquiring a pre-stored data flow table; determining a data forwarding path based on the sender's user identifier and the receiver's user identifier; determining the next-hop device and sending port based on the data forwarding path; and forwarding the processed data to the next-hop device, specifically including: using the sending port to forward the processed data to the next-hop device. In this embodiment, the data forwarding device acquires a pre-stored data flow table. Because the decrypted data contains the sender's user identifier and the receiver's user identifier, the data forwarding path can be determined. Therefore, the data forwarding device can accurately determine the next-hop device and sending port from the data forwarding path, which facilitates the smooth transmission of the processed data from the sending port to the next-hop device.
[0175] Example 6
[0176] The following are embodiments of the apparatus described in this application. Figure 7 This is a schematic diagram of a data forwarding device provided in Embodiment Six of this application. Figure 7 As shown, the device 700 includes the following modules.
[0177] The first acquisition module 701 is used to acquire the target data to be forwarded.
[0178] The second acquisition module 702 is used to acquire pre-stored computing resource configuration information corresponding to the sequential processing of target data in multiple stages.
[0179] The determination module 703 is used to determine the target computing resources corresponding to each stage of processing based on the configuration information of each computing resource. The target computing resources are the computing resources inside the forwarding device.
[0180] The processing module 704 is used to process the target data sequentially using the target computing resources of each target to obtain the processed data.
[0181] The forwarding module 705 is used to forward the processed data to the next-hop device.
[0182] In one approach, the computing resource configuration information includes configuration information for the unpacking stage and configuration information for the packaging stage; the determining module 703, when determining the target computing resources corresponding to each stage of processing based on the computing resource configuration information, is specifically used for:
[0183] The first target computing resource is determined based on the configuration information of the unblocking business phase; the first target computing resource is the computing resource corresponding to the unblocking phase; the third target computing resource is determined based on the configuration information of the encapsulation business phase; the third target computing resource is the computing resource corresponding to the encapsulation phase.
[0184] In one approach, the target data is image data or video data, and the computing resource configuration information also includes image processing stage configuration information; the determining module 703, when determining the target computing resources corresponding to each processing stage based on the computing resource configuration information, is specifically used for:
[0185] The second target computing resource is determined based on the image processing stage configuration information. The second target computing resource is the computing resource corresponding to the image processing stage.
[0186] In one approach, the determining module 703, when determining the first target computing resource based on the unblocking business stage configuration information, is specifically used for:
[0187] The first-stage computing resource group is determined based on the configuration information of the unblocking business phase; the first-stage computing resource group contains multiple first computing resource identifiers, and the type of the first computing resource is a central processing unit; the idle first computing resource identifier is determined from the multiple first computing resource identifiers based on the latest pre-stored task work order; the task work order contains computing resource identifiers that are in working status; the idle first computing resource is determined as the first target computing resource.
[0188] In one approach, the determining module 703, when determining the second target computing resources based on the image processing stage configuration information, is specifically used for:
[0189] The second-stage computing resource group is determined based on the image processing stage configuration information; the second-stage computing resource group contains multiple second computing resource identifiers, and the type of the second computing resource is an image processor; the idle second computing resource identifier is determined from the multiple second computing resource identifiers based on the latest pre-stored task work order; the idle second computing resource is determined as the second target computing resource.
[0190] In one approach, module 703, when determining the third target computing resource based on the encapsulation business stage configuration information, is specifically used for:
[0191] Based on the configuration information of the encapsulation business stage, it is determined that the third target computing resource is consistent with the first target computing resource; the first target computing resource is then determined as the third target computing resource.
[0192] In one approach, the processing module 704, when using each target computing resource to sequentially process the target data at corresponding stages to obtain the processed data, is specifically used for:
[0193] The target data is decapsulated using a first target computing resource to obtain decapsulated data; in response to the image processing stage identification information contained in the decapsulated data, the image processing stage corresponding processing is performed on the decapsulated data using a second target computing resource to obtain data after the image processing stage; and the data after the image processing stage is encapsulated using a third target computing resource to obtain processed data.
[0194] In one embodiment, after processing module 704 uses the first target computing resources to decapsulate the target data to obtain decapsulated data, it is further configured to:
[0195] Since the unsealed data does not contain image processing stage identification information, a third-party target computing resource is used to encapsulate and process the unsealed data to obtain the processed data.
[0196] In one approach, the desealed data includes a sender user identifier and a receiver user identifier. After obtaining the desealed data, the second acquisition module 702 is further configured to acquire a pre-stored data flow table. The determination module is further configured to determine the data forwarding path based on the sender user identifier and the receiver user identifier. The determination module is further configured to determine the next-hop device and the sending port based on the data forwarding path. The forwarding module 705, when forwarding the processed data to the next-hop device, is specifically configured to use the sending port to forward the processed data to the next-hop device.
[0197] Example 7
[0198] Figure 8 This is a schematic diagram of the structure of an electronic device provided in Embodiment Seven of this application. Figure 8 As shown, the electronic device 800 may include a processor 801 and a memory 802 communicatively connected to the processor 801. The memory 802 stores computer-executable instructions; the processor 801 executes the computer-executable instructions stored in the memory 802 to implement any of the method embodiments in Examples 1 to 5 above. The specific implementation methods and technical effects are similar and will not be repeated here.
[0199] In this embodiment, the memory 802 and the processor 801 are connected via a bus. The bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. The bus can be divided into address bus, data bus, control bus, etc. For ease of representation, Figure 8 The bus is represented by a single thick line, but this does not mean that there is only one bus or one type of bus.
[0200] Example 8
[0201] This application provides a computer-readable storage medium storing computer-executable instructions. When executed by a processor, the computer-executable instructions are used to implement any one of the method embodiments in Embodiments 1 to 5 above. The specific implementation methods and technical effects are similar, and will not be repeated here.
[0202] Other embodiments of this application will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of this application that follow the general principles of this application and include common knowledge or customary techniques in the art not disclosed herein. The specification and examples are to be considered exemplary only, and the true scope and spirit of this application are indicated by the following claims.
[0203] It should be understood that this application is not limited to the precise structure described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of this application is limited only by the appended claims.
Claims
1. A data forwarding method, applied to a data forwarding device, characterized in that, The method includes: Obtain the target data to be forwarded; Obtain pre-stored computing resource configuration information corresponding to the sequential processing of the target data in multiple stages, wherein the computing resource configuration information is stored in the storage area of the data forwarding device, and the data forwarding device is a forwarding device. The target computing resources for each stage of processing are determined based on the configuration information of each computing resource, wherein the target computing resources are the computing resources inside the forwarding device; The target data is processed sequentially at corresponding stages using the target computing resources to obtain the processed data; The processed data is forwarded to the next-hop device; The process of using each target computing resource to sequentially process the target data at corresponding stages to obtain processed data includes: The target data is desealed using the first target computing resources to obtain the desealed data; In response to the fact that the unsealed data contains image processing stage identification information, the second target computing resources are used to process the unsealed data according to the image processing stage to obtain data after the image processing stage. The data after the image processing stage is encapsulated using a third target computing resource to obtain the processed data.
2. The method according to claim 1, characterized in that, The computing resource configuration information includes configuration information for the unpacking stage and configuration information for the packaging stage; The step of determining the target computing resources corresponding to each stage of processing based on the configuration information of each computing resource includes: The first target computing resource is determined based on the configuration information of the unblocking business phase; the first target computing resource is the computing resource corresponding to the unblocking phase. The third target computing resource is determined based on the configuration information of the encapsulation business stage; the third target computing resource is the computing resource corresponding to the encapsulation stage.
3. The method according to claim 2, characterized in that, The target data is of image data or video data, and the computing resource configuration information also includes image processing stage configuration information; Based on the configuration information of each computing resource, the target computing resources corresponding to each stage of processing are determined, including: The second target computing resource is determined based on the image processing stage configuration information, and the second target computing resource is the computing resource corresponding to the image processing stage.
4. The method according to claim 2, characterized in that, The step of determining the first target computing resource based on the configuration information of the unblocking business stage includes: The first stage computing resource group is determined based on the unblocking business stage configuration information; the first stage computing resource group contains multiple first computing resource identifiers, and the type of the first computing resource is a central processing unit; Idle first computing resource identifiers are determined from a plurality of first computing resource identifiers based on the latest pre-stored task work order; the task work order contains computing resource identifiers that are in a working state; The first idle computing resource is designated as the first target computing resource.
5. The method according to claim 3, characterized in that, The step of determining the second target computing resource based on the image processing stage configuration information includes: The second-stage computing resource group is determined based on the image processing stage configuration information; the second-stage computing resource group contains multiple second computing resource identifiers, and the type of the second computing resource is an image processor. Idle second computing resource identifiers are determined from multiple second computing resource identifiers based on the latest pre-stored task work order; The idle second computing resource is identified as the second target computing resource.
6. The method according to claim 2, characterized in that, The step of determining the third target computing resource based on the configuration information of the encapsulation business stage includes: Based on the configuration information of the encapsulation business stage, it is determined that the third target computing resource is consistent with the first target computing resource; The first target computing resource is designated as the third target computing resource.
7. The method according to claim 1, characterized in that, After using the first target computing resources to decapsulate the target data to obtain the decapsulated data, the process further includes: In response to the fact that the unsealed data does not contain image processing stage identification information, a third target computing resource is used to encapsulate the unsealed data to obtain the processed data.
8. The method according to claim 7, characterized in that, The unsealed data includes the sender's user identifier and the receiver's user identifier; After obtaining the unsealing data, the process also includes: Retrieve the pre-stored data flow table; The data forwarding path is determined based on the sender's user identifier and the receiver's user identifier; Determine the next-hop device and sending port based on the data forwarding path; The step of forwarding the processed data to the next-hop device includes: The processed data is forwarded to the next-hop device using the sending port.
9. A data forwarding device, characterized in that, The device includes: The first acquisition module is used to acquire the target data to be forwarded; The second acquisition module is used to acquire pre-stored computing resource configuration information corresponding to the sequential processing of the target data in multiple stages. The computing resource configuration information is stored in the storage area of the data forwarding device, which is a forwarding device. The determination module is used to determine the target computing resources corresponding to each stage of processing based on the configuration information of each computing resource. The target computing resources are the computing resources inside the forwarding device. The processing module is used to process the target data sequentially using the target computing resources of each target in the corresponding stages to obtain the processed data; The forwarding module is used to forward the processed data to the next-hop device; The processing module, when using each target computing resource to sequentially process the target data at corresponding stages to obtain the processed data, is specifically used for: The target data is desealed using the first target computing resources to obtain the desealed data; In response to the fact that the unsealed data contains image processing stage identification information, the second target computing resources are used to process the unsealed data according to the image processing stage to obtain data after the image processing stage. The data after the image processing stage is encapsulated using a third target computing resource to obtain the processed data.
10. An electronic device, comprising: A processor, and a memory communicatively connected to the processor; The memory stores computer-executed instructions; The processor executes computer execution instructions stored in the memory to implement the method as described in any one of claims 1-8.
11. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-executable instructions, which, when executed by a processor, are used to implement the method as described in any one of claims 1-8.
Citation Information
Patent Citations
Service processing method, Internet of Things charging infrastructure system and storage medium
CN110275771A