A data processing method, a storage medium and an electronic device
Patent Information
- Application Number
- CN202210771593.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-06-30
- Publication Date
- 2026-09-18
- Estimated Expiration
- 2042-06-30
AI Technical Summary
[0005]本申请提供一种数据处理方法、存储介质及电子装置,用以解决现有技术中传统的人工智能应用处理响应延时的缺陷
[0039] This application provides a data processing method, storage medium, and electronic device that determines a target terminal device for executing a data processing request based on the processing performance information of each candidate terminal device in a local area network (LAN). The data processing request is then executed based on the target terminal device. This means the execution of the data processing request can be completed within the LAN without uploading to a cloud platform. Therefore, the data processing process eliminates the time-consuming information transmission between the terminal device and the cloud platform, significantly reducing data processing time and improving the timeliness of data processing responses.
Smart Images

Figure CN117376360B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of data processing technology, and in particular to a data processing method, storage medium, and electronic device. Background Technology
[0002] The rapid development of cloud computing has led to the migration of many artificial intelligence applications to cloud platforms. Because cloud platforms host a large number of hardware applications, technologies such as virtualization can be used to achieve unified allocation and scheduling of computing power, significantly reducing computing costs.
[0003] However, traditional cloud computing requires uploading local data processing requests to the cloud platform for processing and then returning the results. The time spent on network transmission causes a significant delay in data processing requests, which does not have the timely response characteristics required by today's artificial intelligence applications. Furthermore, even if the cloud platform is equipped with computing units with excellent computing power, the time spent on round-trip transmission means that traditional cloud computing cannot achieve a timely response.
[0004] Therefore, how to solve the response latency problem in artificial intelligence applications remains an urgent issue to be addressed. Summary of the Invention
[0005] This application provides a data processing method, storage medium, and electronic device to address the shortcomings of traditional artificial intelligence application processing response latency in the prior art.
[0006] This application provides a data processing method, which is applied to any terminal device in a local area network, including:
[0007] Obtain data processing requests and determine the request processing end based on public network quality and / or the request type of the data processing request;
[0008] When the request processing end is a local area network, the target terminal device for executing the data processing request is determined based on the processing performance information of each candidate terminal device in the local area network.
[0009] The data processing request is sent to the target terminal device to request the target terminal device to execute the data processing request.
[0010] According to a data processing method provided in this application, the step of determining the request processing end based on public network quality and / or the request type of the data processing request includes:
[0011] Based on the quality of the public network and the accuracy and response requirements corresponding to the request type of the data processing request, the request processing end is determined.
[0012] According to a data processing method provided in this application, determining the target terminal device for executing the data processing request based on the processing performance information of each candidate terminal device in the local area network includes:
[0013] Based on the request type of the data processing request, determine the response priority of the data processing request;
[0014] Based on the performance scores of each candidate terminal device and the response priority of the data processing request, a target terminal device for executing the data processing request is matched from the candidate terminal devices. The performance score is obtained by evaluating the processing performance information of the candidate terminal devices.
[0015] According to a data processing method provided in this application, the performance score is determined based on the following steps:
[0016] The performance score is obtained by weighted summation of at least two of the processor core count, computing frequency, and storage capacity in the processing performance information.
[0017] According to a data processing method provided in this application, determining the response priority of the data processing request based on the request type of the data processing request includes:
[0018] Based on the urgency status of the data processing request, the initial priority of the data processing request is determined, wherein the initial priority of the urgency status is higher than the initial priority of the urgency status is lower.
[0019] Based on the request type of the data processing request under the same initial priority, determine the type priority of the data processing request under the initial priority;
[0020] Based on the computational load of data processing requests under the same priority type, the computational priority of the data processing request under that priority type is determined;
[0021] The response priority of the data processing request is determined based on the initial priority and type priority of the data processing request, or based on the initial priority, type priority and calculation priority of the data processing request.
[0022] According to a data processing method provided in this application, the step of matching a target terminal device for executing the data processing request from the candidate terminal devices based on the performance scores of each candidate terminal device and the response priority of the data processing request includes:
[0023] The candidate terminal devices are sorted in descending order of performance score to obtain a candidate terminal sequence.
[0024] The data processing requests are sorted in descending order of response priority to obtain a request sequence;
[0025] Based on the order of arrangement, the candidate terminal devices in the candidate terminal sequence are matched with the data processing requests in the request sequence to obtain the target terminal device for executing the data processing request.
[0026] According to a data processing method provided in this application, the step of determining the target terminal device for executing the data processing request based on the processing performance information of each candidate terminal device in the local area network further includes:
[0027] Obtain the processing enable status of each terminal device in the local area network, wherein the processing enable status is available or disabled;
[0028] The terminal devices whose processing enable state is available are identified as the candidate terminal devices.
[0029] According to a data processing method provided in this application, after sending the data processing request to the target terminal device, the method further includes:
[0030] Waiting for the preset time;
[0031] If no data processing result is received from the target terminal device within the preset time period, the target terminal device for executing the data processing request is re-determined based on the processing performance information of each candidate terminal device in the local area network.
[0032] This application also provides a data processing apparatus, including:
[0033] The acquisition unit is used to acquire data processing requests and determine the request processing end based on the quality of the public network and / or the request type of the data processing request;
[0034] The terminal determination unit is used to determine the target terminal device for executing the data processing request based on the processing performance information of each candidate terminal device in the local area network when the request processing terminal is a local area network.
[0035] An execution unit is configured to send the data processing request to the target terminal device to request the target terminal device to execute the data processing request.
[0036] This application also provides an electronic device including a memory and a processor, wherein the memory stores a computer program and the processor is configured to execute the data processing method described above through the computer program.
[0037] This application also provides a computer-readable storage medium comprising a stored program, wherein the program, when executed, implements any of the data processing methods described above.
[0038] This application also provides a computer program product, including a computer program that, when executed by a processor, implements any of the data processing methods described above.
[0039] This application provides a data processing method, storage medium, and electronic device that determines a target terminal device for executing a data processing request based on the processing performance information of each candidate terminal device in a local area network (LAN). The data processing request is then executed based on the target terminal device. This means the execution of the data processing request can be completed within the LAN without uploading to a cloud platform. Therefore, the data processing process eliminates the time-consuming information transmission between the terminal device and the cloud platform, significantly reducing data processing time and improving the timeliness of data processing responses. Attached Figure Description
[0040] 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.
[0041] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0042] Figure 1 This is a schematic diagram of the hardware environment for an interaction method of a smart device according to an embodiment of this application;
[0043] Figure 2 This is one of the flowcharts illustrating the data processing method provided in this application;
[0044] Figure 3 This is the second flowchart illustrating the data processing method provided in this application;
[0045] Figure 4 This is a schematic diagram of the data processing apparatus provided in this application;
[0046] Figure 5 This is a schematic diagram of the electronic device provided in this application. Detailed Implementation
[0047] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present application, and not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative effort should fall within the scope of protection of the present application.
[0048] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0049] According to one aspect of the embodiments of this application, a data processing method is provided. This data processing method is widely applicable to whole-house intelligent digital control application scenarios such as smart homes, smart home ecosystems, and intelligencehouse ecosystems. Optionally, in this embodiment, the above-mentioned data processing method can be applied to, for example... Figure 1 The hardware environment shown consists of terminal device 102 and server 104. For example... Figure 1 As shown, server 104 is connected to terminal device 102 via a network and can be used to provide services (such as application services) to the terminal or clients installed on the terminal. A database can be set up on the server or independently of the server to provide data storage services for server 104. Cloud computing and / or edge computing services can be configured on the server or independently of the server to provide data processing services for server 104.
[0050] The aforementioned network may include, but is not limited to, at least one of the following: wired network, wireless network. The aforementioned wired network may include, but is not limited to, at least one of the following: wide area network, metropolitan area network, local area network. The aforementioned wireless network may include, but is not limited to, at least one of the following: Wi-Fi (Wireless Fidelity), Bluetooth. The terminal device 102 may not be limited to PC, mobile phone, tablet computer, smart air conditioner, smart range hood, smart refrigerator, smart oven, smart stove, smart washing machine, smart water heater, smart washing equipment, smart dishwasher, smart projector, smart TV, smart clothes rack, smart curtains, smart audio-visual equipment, smart socket, smart speaker, smart speaker box, smart fresh air equipment, smart kitchen and bathroom equipment, smart bathroom equipment, smart robot vacuum cleaner, smart window cleaning robot, smart mopping robot, smart air purifier, smart steam oven, smart microwave oven, smart water heater, smart air purifier, smart water dispenser, smart door lock, etc.
[0051] Based on the above embodiments, this application provides a data processing method. Figure 2 This is one of the flowcharts illustrating the data processing method provided in this application, such as... Figure 2 As shown, the method is applied to any terminal device in a local area network, and the method includes:
[0052] Step 110: Obtain the data processing request and determine the request processing end based on the public network quality and / or the request type of the data processing request.
[0053] Specifically, a local area network (LAN) can include multiple terminal devices. These devices can be connected via gateway devices such as routers or smart gateways. For example, a LAN can include smart speakers, smart refrigerators, smart TVs, and smart door locks in a household. Any terminal device in the LAN can receive data processing requests. These requests can be security verification requests, control requests, or query requests. Data processing requests can be input by the user through voice, touch, gestures, or buttons, or they can be transmitted to the terminal device by other terminal devices in the LAN after receiving the request. This application does not specifically limit the scope of these requests.
[0054] After receiving the data processing request, the request processing endpoint can be determined based on the public network quality and / or the request type. Here, "public network" refers to the network quality of the public network, as opposed to a local area network (LAN). The public network can be a wide area network (WAN), a metropolitan area network (MAN), etc. The terminal device needs to communicate with the cloud platform through the public network. Public network quality refers to the network quality of the public network, which can be represented by parameters such as response time, network jitter, and packet loss rate. The data processing request type can be multiple, such as voice recognition requests, control requests, and query requests. It is understood that different data processing request types will have different accuracy and response requirements. The request processing endpoint can be a LAN or a cloud platform; this embodiment does not specifically limit this.
[0055] Understandably, the better the quality of the public network and the lower the transmission latency, the greater the likelihood that the cloud platform will be used as the request processing end to meet the data processing response time requirement. Conversely, the worse the quality of the public network and the higher the transmission latency, the less likely the cloud platform will be used as the request processing end to meet the data processing response time requirement, and thus the local area network is more likely to be used as the request processing end.
[0056] Furthermore, the higher the requirement for timely response in a data processing request, the more likely it is to use a local area network (LAN) as the processing end; the lower the requirement for timely response, the more likely it is to use a cloud platform; the higher the requirement for processing accuracy, the more likely it is to use a cloud platform; and the lower the requirement for processing accuracy, the more likely it is to use a LAN.
[0057] When determining the request processing end, it can be obtained based on the quality of the public network, the request type of the data processing request, or a combination of the above two. This application embodiment does not specifically limit this.
[0058] Step 120: If the request processing end is a local area network, determine the target terminal device for executing the data processing request based on the processing performance information of each candidate terminal device in the local area network.
[0059] Specifically, when the request processing end is a local area network (LAN), after obtaining the data processing request, the target terminal device for executing the data processing request can be determined based on the processing performance information of each candidate terminal device in the LAN. Here, each candidate terminal device is a terminal device that may subsequently become the target terminal device; there can be one or more, and this embodiment does not specifically limit this. The target terminal device thus selected is the terminal device in the LAN that has the capability to process the data processing request.
[0060] The processing performance information here can reflect the data processing capabilities of each candidate terminal device, and may include at least one of the following: number of processor cores, computing frequency, and storage capacity. The target terminal device here is the terminal device that ultimately executes the data processing request, and may be one or more. This application embodiment does not specifically limit this.
[0061] Step 130: Send the data processing request to the target terminal device to request the target terminal device to execute the data processing request.
[0062] Specifically, the terminal device sends a data processing request to the target terminal device to request the target terminal device to execute the data processing request. After receiving the data processing request, the target terminal device can perform data processing.
[0063] The method provided in this application determines the target terminal device for executing data processing requests based on the processing performance information of each candidate terminal device in a local area network. The data processing request is then executed based on the target terminal device. In other words, the execution of the data processing request can be completed in the local area network without uploading to the cloud platform. Therefore, there is no time-consuming information transmission between the terminal device and the cloud platform during the data processing process, which greatly reduces the time consumption of data processing and improves the timeliness of data processing response.
[0064] Based on the above embodiments, step 110 includes:
[0065] Based on the quality of the public network and the accuracy and response requirements corresponding to the request type of the data processing request, the request processing end is determined.
[0066] Specifically, based on the quality of the public network and the accuracy and response requirements corresponding to the request type of the data processing request, the request processing end can be determined. Here, the accuracy requirement corresponding to the request type of the data processing request refers to the level of accuracy required for the data processing result, and the response requirement corresponding to the request type of the data processing request refers to the level of response time required for the data processing result.
[0067] It is understandable that different request processing terminals will be determined based on different public network qualities and the accuracy and response requirements corresponding to different data processing request types.
[0068] For example, when determining whether a data processing request is executed by a local area network (LAN) or a cloud platform, the quality of the public network can be taken into account. If the public network quality is good, it can be determined that the request processing end is a cloud platform. If the public network quality is average or poor, and the data processing request has high requirements for data processing response time, it can be determined that the request processing end is a LAN.
[0069] For example, since the data processing capabilities of local terminal devices on a local area network (LAN) are not strong, but data processing on the LAN can reduce network transmission time, data processing requests with lower precision requirements and higher response requirements can be identified as originating from the LAN.
[0070] For example, while cloud platforms have excellent data processing capabilities, the time spent on network transmission when uploading data processing requests from the local area network to the cloud platform for processing and returning results causes a significant delay in the data processing requests. Therefore, for data processing requests with high precision requirements for the request type and low response requirements for the corresponding request type, the request processing end can be identified as the cloud platform.
[0071] The method provided in this application embodiment determines the request processing end by taking into account the quality of the public network and the accuracy and response requirements corresponding to the request type of the data processing request, thereby matching the most suitable processing end for the execution of the data processing request to improve the user experience.
[0072] Based on the above embodiments, step 120, which involves determining the target terminal device for executing the data processing request based on the processing performance information of each candidate terminal device in the local area network, includes:
[0073] Step 121: Determine the response priority of the data processing request based on the request type of the data processing request.
[0074] Specifically, different types of data processing requests have different requirements for data processing response time, and correspondingly, the response priorities of data processing requests are different. For example, security verification requests have a higher priority than control requests, and control requests have a higher priority than query requests.
[0075] Step 122: Based on the performance scores of each candidate terminal device and the response priority of the data processing request, a target terminal device for executing the data processing request is matched from the candidate terminal devices. The performance score is obtained by evaluating the processing performance information of the candidate terminal devices.
[0076] Specifically, the performance score is obtained by evaluating the processing performance information of the candidate terminal device. The performance score here is obtained by weighted summation of the number of processor cores, computing frequency, and storage capacity contained in the processing performance information. The performance evaluation here refers to the process of calculating the performance score. It can be understood that the stronger the processing performance reflected by the processing performance information, the higher the performance score.
[0077] Once any terminal device in the local area network obtains the performance scores and response priorities of each candidate terminal device, it can match the target terminal device for executing the data processing request based on the ranking of these two scores. For example, the candidate terminal device with the highest performance score can be used as the target terminal device for the data processing request with the highest response priority, the candidate terminal device with the second highest performance score can be used as the target terminal device for the data processing request with the second highest response priority, the candidate terminal device with the third highest performance score can be used as the target terminal device for the data processing request with the third highest response priority, and so on.
[0078] Based on the above embodiments, the performance score is determined based on the following steps:
[0079] The performance score is obtained by weighted summation of at least two of the processor core count, computing frequency, and storage capacity in the processing performance information.
[0080] Specifically, at least two of the processor core count, computing frequency, and storage capacity in the processing performance information are weighted and summed to obtain a performance score. The processor core count here may include the number of GPU (Graphics Processing Unit) cores, the number of CPU (Central Processing Unit) cores, or the NPU (Neural Processor Unit). The computing frequency here may be the single-core computing frequency. The storage capacity here may include the video memory capacity or the RAM capacity. This application embodiment does not specifically limit this.
[0081] For example, the performance score can be obtained based on the following formula:
[0082] p = Number of processor cores * p1 + Single-core computing frequency * p2 + Storage capacity * p3
[0083] Where p is the performance score, and p1, p2, and p3 are weighting coefficients.
[0084] Based on the above embodiments, step 122 includes:
[0085] Step 1221: Based on the urgency status of the data processing request, determine the initial priority of the data processing request, wherein the initial priority of the urgency status is higher than the initial priority of the urgency status is lower.
[0086] Step 1222: Based on the request types of data processing requests under the same initial priority, determine the type priority of the data processing request under the initial priority;
[0087] Step 1223: Based on the computational complexity of data processing requests under the same type priority, determine the computational priority of the data processing request under the same type priority.
[0088] Specifically, the initial priority of a data processing request can be determined based on its urgency status. Here, the urgency status indicates whether the data processing request itself requires expedited processing. It is understood that an initial priority with a "yes" urgency status is higher than an initial priority with a "no" urgency status, and an initial priority with a "yes" urgency status is the highest priority for a data processing request.
[0089] Based on the urgency status, data processing requests can be divided into two categories: there may be multiple data processing requests with a "yes" urgency status, and there may also be multiple data processing requests with a "no" urgency status. For multiple data processing requests with the same initial priority, the request type can be compared to determine their priority. Different types of data processing requests will have different type priorities. For example, for home appliance control requests and voice query requests, both with a "no" urgency status (meaning both have the same initial priority), the home appliance control request requires a higher data processing response speed; therefore, its type priority is higher than that of the voice query request.
[0090] Furthermore, there may be multiple data processing requests with the same initial priority and the same type priority. In this case, the computational load of each data processing request can be calculated, and based on the computational load of each data processing request, the computational priority of each data processing request under the type priority can be determined. For different computational loads of data processing requests, there will be different computational priorities, and the larger the computational load of the data processing request, the higher the computational priority.
[0091] For example, consider smart air conditioner control requests and smart refrigerator control requests where both are in an expedited state (no). This means both requests have the same initial priority and the same priority type. Since data processing requests with higher computational loads require more processing time, they are processed first. However, the computational load of the smart air conditioner control request is greater than that of the smart refrigerator control request, so the smart air conditioner control request is processed first. Therefore, for smart air conditioner control requests and smart refrigerator control requests with the same initial priority and priority type, the computational priority of the smart air conditioner control request is higher than that of the smart refrigerator control request.
[0092] Step 1224: Determine the response priority of the data processing request based on the initial priority and type priority of the data processing request, or based on the initial priority, type priority and calculation priority of the data processing request.
[0093] Understandably, for data processing requests with the same initial priority but different types, the response priority of the data processing request can be determined directly based on the initial priority and type priority of the data processing request.
[0094] For data processing requests of the same initial priority and type, it is necessary to calculate the computational load of the data processing request. That is, the response priority of the data processing request can only be determined based on the initial priority, type priority, and computational priority of the data processing request.
[0095] Based on the above embodiments, step 122 includes:
[0096] Step 122-1: Sort the candidate terminal devices according to their performance scores from high to low to obtain a candidate terminal sequence;
[0097] Step 122-2: Sort the data processing requests according to the response priority from high to low to obtain a request sequence.
[0098] Specifically, the performance scores obtained by evaluating the processing performance information of each candidate terminal device are sorted in descending order to obtain a candidate terminal sequence. The candidate terminal sequence has a specific order, meaning that in the candidate terminal sequence, the candidate terminal device with the higher performance score is ranked before the candidate terminal device with the lower performance score.
[0099] Correspondingly, the response priority of a data processing request can be determined based on its initial priority and type priority, or based on its initial priority, type priority, and computation priority. The response priorities of the data processing requests can then be sorted in descending order to obtain a request sequence. This request sequence has a sequential order; that is, in the request sequence, data processing requests with higher response priorities are placed before those with lower response priorities.
[0100] Step 122-3: Match the candidate terminal devices in the candidate terminal sequence with the data processing requests in the request sequence based on the arrangement order to obtain the target terminal device for executing the data processing request.
[0101] Specifically, after obtaining the candidate terminal sequence and the request sequence, the candidate terminal devices in the candidate terminal sequence can be matched with the data processing requests in the request sequence based on the order of arrangement to obtain the target terminal device used to execute the data processing request.
[0102] For example, the candidate terminal sequence can be a smart door lock, a smart robot vacuum cleaner, or a smart refrigerator, and the request sequence can be a security verification request, a control request, or a query request. The smart door lock in the candidate terminal sequence can be matched with the security verification request in the request sequence, the smart robot vacuum cleaner in the candidate terminal sequence can be matched with the control request in the request sequence, and the smart refrigerator in the candidate terminal sequence can be matched with the query request in the request sequence. Correspondingly, the target terminal device used to execute the data processing request can be a smart door lock, a smart robot vacuum cleaner, or a smart refrigerator. This application embodiment does not specifically limit this.
[0103] Based on the above embodiments, the method further includes the following steps before step 120:
[0104] Step 120-1: Obtain the processing enable status of each terminal device in the local area network, wherein the processing enable status is available or disabled;
[0105] Step 120-2: The terminal devices whose processing enable state is available are identified as the candidate terminal devices.
[0106] Specifically, before determining candidate terminal devices, it is necessary to obtain the processing enable status of each terminal device in the local area network. The processing enable status here refers to whether each terminal device can be used to execute data processing requests within the local area network. The processing enable status is either available or disabled.
[0107] It is understandable that only terminal devices with the processing enable state enabled can be identified as candidate terminal devices, while terminal devices with the processing enable state disabled cannot be identified as candidate terminal devices.
[0108] Based on the above embodiments, step 130 is followed by:
[0109] Step 131, wait for the preset time;
[0110] Step 132: If no data processing result is received from the target terminal device within the preset time period, the target terminal device for executing the data processing request is re-determined based on the processing performance information of each candidate terminal device in the local area network.
[0111] Specifically, after sending the data processing request to the target terminal device, a preset time period needs to be waited for. This preset time period can be a fixed value, such as 0.5 seconds, 1 second, or 1.5 seconds. This embodiment of the application does not specifically limit this. If any terminal device in the local area network receives the data processing result returned by the target terminal device within the preset time period, it indicates that no abnormality has occurred.
[0112] If any terminal device in the local area network does not receive the data processing result returned by the target terminal device within a preset time period, it indicates an abnormality. In this case, the response priority of the data processing request can be determined first based on the initial priority and type priority of the data processing request, or based on the initial priority, type priority and calculation priority of the data processing request. Then, based on the performance score of each candidate terminal device and the response priority of the data processing request, the target terminal device for executing the data processing request is re-matched from each candidate terminal device.
[0113] Based on the above embodiments, Figure 3 This is the second flowchart illustrating the data processing method provided in this application, as shown below. Figure 3 As shown, the method is applied to any terminal device in a local area network, and the method includes:
[0114] Specifically, any terminal device in the local area network (LAN) obtains a data processing request, then obtains the processing enable status of each terminal device in the LAN, which is either enabled or disabled, and selects the terminal devices whose processing enable status is enabled.
[0115] Then, the performance scores obtained by evaluating the processing performance information of each candidate terminal device are sorted in descending order to obtain a candidate terminal sequence. Correspondingly, the response priority of the data processing request can be determined based on the initial priority and type priority of the data processing request, or based on the initial priority, type priority, and computation priority of the data processing request, and the response priorities of the data processing requests can be sorted in descending order to obtain a request sequence.
[0116] After obtaining the candidate terminal sequence and the request sequence, the candidate terminal devices in the candidate terminal sequence can be matched with the data processing requests in the request sequence based on the order of arrangement to obtain the target terminal device for executing the data processing request, and then the processing enable status of the target terminal device is updated to disabled.
[0117] After sending the data processing request to the target terminal device, a preset time period is required. If any terminal device in the local area network does not receive the data processing result returned by the target terminal device within the preset time period, an abnormality is indicated. At this time, the response priority of the data processing request can be determined first based on the initial priority and type priority of the data processing request, or based on the initial priority, type priority, and calculation priority of the data processing request. Then, based on the performance score of each candidate terminal device and the response priority of the data processing request, the target terminal device for executing the data processing request is re-matched from each candidate terminal device.
[0118] If any terminal device in the local area network receives the data processing result returned by the target terminal device within a preset time period, it indicates that no abnormality has occurred. At this time, the processing enable status of the target terminal device is updated to available, and the data processing process ends.
[0119] The data processing apparatus provided in this application is described below. The data processing apparatus described below can be referred to in correspondence with the data processing method described above.
[0120] Based on the above embodiments, Figure 4 This is a schematic diagram of the data processing apparatus provided in this application, such as... Figure 4 As shown, the data processing device includes:
[0121] The acquisition unit 410 is used to acquire a data processing request and determine the request processing end based on the public network quality and / or the request type of the data processing request.
[0122] The terminal determination unit 420 is configured to determine the target terminal device for executing the data processing request based on the processing performance information of each candidate terminal device in the local area network when the request processing terminal is a local area network.
[0123] The execution unit 430 is configured to send the data processing request to the target terminal device to request the target terminal device to execute the data processing request.
[0124] The data processing apparatus provided in this application determines the target terminal device for executing the data processing request based on the processing performance information of each candidate terminal device in the local area network. The data processing request is then executed based on the target terminal device. In other words, the execution of the data processing request can be completed in the local area network without uploading to the cloud platform. Therefore, there is no time-consuming information transmission between the terminal device and the cloud platform in the data processing process, which greatly reduces the data processing time and improves the timeliness of the data processing response.
[0125] Based on any of the above embodiments, the acquisition unit includes:
[0126] Based on the quality of the public network and the accuracy and response requirements corresponding to the request type of the data processing request, the request processing end is determined.
[0127] Based on any of the above embodiments, the terminal determination unit includes:
[0128] The response priority subunit is used to determine the response priority of the data processing request based on the request type of the data processing request.
[0129] The matching subunit is used to match a target terminal device for executing the data processing request from the candidate terminal devices based on the performance scores of each candidate terminal device and the response priority of the data processing request. The performance score is obtained by evaluating the processing performance information of the candidate terminal devices.
[0130] Based on any of the above embodiments, the performance score is determined based on the following steps:
[0131] The performance score is obtained by weighted summation of at least two of the processor core count, computing frequency, and storage capacity in the processing performance information.
[0132] Based on any of the above embodiments, the response priority subunit is specifically used for:
[0133] Based on the urgency status of the data processing request, the initial priority of the data processing request is determined, wherein the initial priority of the urgency status is higher than the initial priority of the urgency status is lower.
[0134] Based on the request type of the data processing request under the same initial priority, determine the type priority of the data processing request under the initial priority;
[0135] Based on the computational load of data processing requests under the same priority type, the computational priority of the data processing request under that priority type is determined;
[0136] The response priority of the data processing request is determined based on the initial priority and type priority of the data processing request, or based on the initial priority, type priority and calculation priority of the data processing request.
[0137] Based on any of the above embodiments, the matching subunit is specifically used for:
[0138] The candidate terminal devices are sorted in descending order of performance score to obtain a candidate terminal sequence.
[0139] The data processing requests are sorted in descending order of response priority to obtain a request sequence;
[0140] Based on the order of arrangement, the candidate terminal devices in the candidate terminal sequence are matched with the data processing requests in the request sequence to obtain the target terminal device for executing the data processing request.
[0141] Based on any of the above embodiments, the step of determining the target terminal device unit further includes:
[0142] Obtain the processing enable status of each terminal device in the local area network, wherein the processing enable status is available or disabled;
[0143] The terminal devices whose processing enable state is available are identified as the candidate terminal devices.
[0144] Based on any of the above embodiments, the request unit is followed by:
[0145] Waiting for the preset time;
[0146] If no data processing result is received from the target terminal device within the preset time period, the target terminal device for executing the data processing request is re-determined based on the processing performance information of each candidate terminal device in the local area network.
[0147] Figure 5 An example is a schematic diagram of the physical structure of an electronic device, such as... Figure 5As shown, the electronic device may include a processor 510, a communications interface 520, a memory 530, and a communication bus 540, wherein the processor 510, communications interface 520, and memory 530 communicate with each other via the communication bus 540. The processor 510 can invoke logical instructions in the memory 530 to execute a data processing method, which includes: acquiring a data processing request and determining a request processing end based on the quality of the public network and / or the request type of the data processing request; if the request processing end is a local area network (LAN), determining a target terminal device for executing the data processing request based on the processing performance information of each candidate terminal device in the LAN; and sending the data processing request to the target terminal device to request the target terminal device to execute the data processing request.
[0148] Furthermore, the logical instructions in the aforementioned memory 530 can be implemented as software functional units and, when sold or used as independent products, can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0149] On the other hand, this application also provides a computer program product, which includes a computer program that can be stored on a computer-readable storage medium. When the computer program is executed by a processor, the computer is able to execute the data processing method provided by the above methods. The method includes: acquiring a data processing request and determining a request processing end based on the quality of the public network and / or the request type of the data processing request; if the request processing end is a local area network, determining a target terminal device for executing the data processing request based on the processing performance information of each candidate terminal device in the local area network; and sending the data processing request to the target terminal device to request the target terminal device to execute the data processing request.
[0150] In another aspect, this application also provides a computer-readable storage medium, the computer-readable storage medium including a stored program, wherein the program executes the data processing method provided by the above methods when it runs, the method comprising: acquiring a data processing request, and determining a request processing end based on the public network quality and / or the request type of the data processing request; if the request processing end is a local area network, determining a target terminal device for executing the data processing request based on the processing performance information of each candidate terminal device in the local area network; and sending the data processing request to the target terminal device to request the target terminal device to execute the data processing request.
[0151] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without any creative effort.
[0152] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus necessary general-purpose hardware platforms, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in the various embodiments or some parts of the embodiments.
[0153] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application.
Claims
1. A data processing method, characterized by, The method is applied to any terminal device in a local area network, and the method includes: Obtain the data processing request and determine the request processing end based on the public network quality and / or the request type of the data processing request; When the request processing end is a local area network, the target terminal device for executing the data processing request is determined based on the processing performance information of each candidate terminal device in the local area network. The data processing request is sent to the target terminal device to request the target terminal device to execute the data processing request; Also includes: Based on the request type of the data processing request, determine the response priority of the data processing request; Determining the response priority of the data processing request based on the request type includes: Based on the expedited status of the data processing request, the initial priority of the data processing request is determined, with the initial priority of a request in the expedited status being higher than the initial priority of a request in the expedited status being negative; the expedited status is used to identify whether the data processing request itself needs expedited processing. Based on the request type of the data processing request under the same initial priority, determine the type priority of the data processing request under the initial priority; Based on the computational load of data processing requests under the same priority type, the computational priority of the data processing request under that priority type is determined; The response priority of the data processing request is determined based on the initial priority and type priority of the data processing request, or based on the initial priority, type priority and calculation priority of the data processing request.
2. The data processing method according to claim 1, characterized in that, The process of determining the request processing end based on public network quality and / or the request type of the data processing request includes: Based on the quality of the public network and the accuracy and response requirements corresponding to the request type of the data processing request, the request processing end is determined.
3. The data processing method according to claim 1 or 2, characterized in that, The step of determining the target terminal device for executing the data processing request based on the processing performance information of each candidate terminal device in the local area network includes: Based on the performance scores of each candidate terminal device and the response priority of the data processing request, a target terminal device for executing the data processing request is matched from the candidate terminal devices. The performance score is obtained by evaluating the processing performance information of the candidate terminal devices.
4. The data processing method according to claim 3, characterized in that, The performance score is determined based on the following steps: The performance score is obtained by weighted summation of at least two of the processor core count, computing frequency, and storage capacity in the processing performance information.
5. The data processing method according to claim 3, characterized in that, The step of matching a target terminal device for executing the data processing request from among the candidate terminal devices based on the performance scores of each candidate terminal device and the response priority of the data processing request includes: The candidate terminal devices are sorted in descending order of performance score to obtain a candidate terminal sequence. The data processing requests are sorted in descending order of response priority to obtain a request sequence; Based on the order of arrangement, the candidate terminal devices in the candidate terminal sequence are matched with the data processing requests in the request sequence to obtain the target terminal device for executing the data processing request.
6. The data processing method according to claim 1 or 2, characterized in that, The step of determining the target terminal device for executing the data processing request based on the processing performance information of each candidate terminal device in the local area network further includes: Obtain the processing enable status of each terminal device in the local area network, wherein the processing enable status is available or disabled; The terminal devices whose processing enable state is available are identified as the candidate terminal devices.
7. The data processing method according to claim 1 or 2, characterized in that, The step of sending the data processing request to the target terminal device further includes: Waiting for the preset time; If no data processing result is received from the target terminal device within the preset time period, the target terminal device for executing the data processing request is re-determined based on the processing performance information of each candidate terminal device in the local area network.
8. A data processing apparatus, characterized in that, include: The acquisition unit is used to acquire data processing requests and determine the request processing end based on the quality of the public network and / or the request type of the data processing request; The terminal determination unit is used to determine the target terminal device for executing the data processing request based on the processing performance information of each candidate terminal device in the local area network when the request processing terminal is a local area network. An execution unit is configured to send the data processing request to the target terminal device to request the target terminal device to execute the data processing request; It also includes a response priority determination unit, which specifically includes: A response priority determination subunit is used to determine the response priority of the data processing request based on the request type of the data processing request; The subunit for determining response priority is specifically used for: Based on the expedited status of the data processing request, the initial priority of the data processing request is determined, with the initial priority of a request in the expedited status being higher than the initial priority of a request in the expedited status being negative; the expedited status is used to identify whether the data processing request itself needs expedited processing. Based on the request type of the data processing request under the same initial priority, determine the type priority of the data processing request under the initial priority; Based on the computational load of data processing requests under the same priority type, the computational priority of the data processing request under that priority type is determined; The response priority of the data processing request is determined based on the initial priority and type priority of the data processing request, or based on the initial priority, type priority and calculation priority of the data processing request.
9. A computer-readable storage medium, characterized in that, The computer-readable storage medium includes a stored program, wherein the program, when executed, performs the method of any one of claims 1 to 7.
10. An electronic device comprising a memory and a processor, characterized in that, The memory stores a computer program, and the processor is configured to execute the method of any one of claims 1 to 7 through the computer program.
Citation Information
Patent Citations
Power Interne-of-Things system and data processing method thereof
CN112804280A
Calculation request processing method, intelligent terminal, cloud server, equipment and medium
CN114253710A