Communication performance optimization method, electronic equipment and computer readable storage medium
By using a dual-machine communication system with master and slave processors, tasks and cache space are dynamically classified and optimized, solving the computing power and power consumption requirements of AI glasses and realizing a low-power, high-performance AI glasses communication protocol.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- GOERTEK INC
- Filing Date
- 2025-12-24
- Publication Date
- 2026-04-28
AI Technical Summary
Traditional stand-alone systems cannot meet the computing power and power consumption requirements of AI glasses, necessitating an efficient and reliable dual-machine communication protocol to improve the performance of wearable devices.
Through a dual-machine communication system between the main processor and the slave processor, the task list is dynamically obtained. The task categories and cache space categories are classified according to the urgency and complexity of the tasks. Execution positions and priorities are assigned to different task categories, and the data is dynamically adjusted in conjunction with the cache space categories.
It significantly improves communication efficiency and system flexibility, achieving a balance between low power consumption and high performance, and enhancing resource utilization.
Smart Images

Figure CN121935009A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of communication technology, and in particular to communication performance optimization methods, electronic devices, and computer-readable storage media. Background Technology
[0002] AI (Artificial Intelligence) glasses, as an emerging wearable device, need to integrate multiple functional modules, including environmental perception, human-computer interaction, data processing, and wireless communication. The collaborative work of these modules places high demands on communication protocols.
[0003] Currently, traditional stand-alone systems can no longer meet the computing power and power consumption requirements of AI glasses, so dual-systems have become a better option. Summary of the Invention
[0004] The main objective of this application is to provide a communication performance optimization method, an electronic device, and a computer-readable storage medium, aiming to solve the technical problem of how to improve the working performance of wearable devices through a dual-system approach.
[0005] To achieve the above objectives, this application provides a communication performance optimization method. This method is applied to a dual-machine communication system in which a master processor and a slave processor communicate based on a preset communication protocol. The communication performance optimization method includes: Dynamically retrieve pending tasks from the task list; The task category and cache space category of the pending tasks are determined based on their urgency and complexity. The execution location and priority of the pending tasks are determined according to the task category. The data in the cache space is dynamically adjusted according to the cache space category.
[0006] In one embodiment, determining the task category and cache space category of the pending task based on its urgency and complexity includes: The task categories and cache space categories of the pending tasks that need to be processed immediately are determined as real-time tasks and real-time data caches; The task category and cache space category of the pending tasks that can be processed with delay are determined as non-real-time tasks and non-real-time data cache. The task categories and cache space categories of the pending tasks that require complex calculations from the processor are identified as AI tasks and AI model caches.
[0007] In one embodiment, determining the execution location of the pending task based on the task category includes: If the task category is a real-time task or a non-real-time task, the execution location of the pending task is determined to be the main processor. If the task category is the AI task, the execution location of the pending task is determined to be the slave processor.
[0008] In one embodiment, determining the task priority of the pending task based on the task category includes: The task priority of the real-time task is determined as the first priority, the task priority of the AI task is determined as the second priority, and the task priority of the non-real-time task is determined as the third priority. The first priority is higher than the second priority, and the second priority is higher than the third priority.
[0009] In one embodiment, the communication performance optimization method further includes: Obtain current system status information and / or user request information; The task priority of the pending tasks associated with the current system status information and / or the user demand information is dynamically adjusted.
[0010] In one embodiment, the dynamic adjustment of the task priority of the pending tasks associated with the current system state information and / or the user demand information includes at least one of the following: If the current system status information includes a battery level below a preset power threshold, the task priority of the non-real-time task is removed to suspend the execution of the non-real-time task. If the user demand information includes enabling AI functionality, the task priority of the AI task will be adjusted to the first priority. If the current system status information includes network anomalies, the task priority of the pending tasks involving network data transmission shall be reduced.
[0011] In one embodiment, dynamically adjusting the data in the cache space according to the cache space category includes at least one of the following: If the available space in the cache is less than a preset cache threshold, the data in the non-real-time data cache, the AI model cache, and the real-time data cache are deleted in sequence until the available space is greater than or equal to the preset cache threshold. The data in the non-real-time data cache is compressed.
[0012] In one embodiment, the communication performance optimization method further includes: Based on historical data, predict user demand data and store the user demand data in the cache space in advance.
[0013] In addition, to achieve the above objectives, this application also provides an electronic device, the electronic device comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, the computer program being configured to implement the steps of the communication performance optimization method as described above.
[0014] In addition, to achieve the above objectives, this application also provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the steps of the communication performance optimization method described above.
[0015] This application proposes a communication performance optimization method, an electronic device, and a computer-readable storage medium. In this communication performance optimization method, dynamic acquisition and classification of pending tasks in the task list are achieved through dual-machine communication between the main processor and the slave processor. Different execution positions and task priorities are assigned to pending tasks of different task categories, fully utilizing the advantages of the main processor and the slave processor, significantly improving communication efficiency and system flexibility, and achieving a balance between low power consumption and high performance. Furthermore, by combining the cache space category corresponding to the task category with dynamic adjustment of the data in the cache space, intelligent optimization of the cache space can be achieved from multiple aspects, significantly improving resource utilization. Attached Figure Description
[0016] 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, the drawings described below are only a part of the embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0017] Figure 1 A flowchart illustrating a communication performance optimization method provided in an embodiment of this application; Figure 2 for Figure 1 A detailed flowchart of step S30; Figure 3 Additional flowchart illustrating a communication performance optimization method provided in this application embodiment; Figure 4 for Figure 3 A detailed flowchart of step S35; Figure 5 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation
[0018] In the following description, specific details such as particular system architectures and techniques are set forth for illustrative purposes and not for limitation, in order to provide a thorough understanding of the embodiments of this application. However, those skilled in the art will understand that the embodiments of this application can also be implemented in other embodiments without these specific details. In other instances, detailed descriptions of well-known systems, apparatuses, circuits, and methods are omitted so as not to obscure the description of the embodiments of this application with unnecessary detail.
[0019] AI (Artificial Intelligence) glasses, as an emerging wearable device, need to integrate multiple functional modules, including environmental perception, human-computer interaction, data processing, and wireless communication. The collaborative work of these modules places high demands on communication protocols. Currently, traditional stand-alone systems can no longer meet the computing power and power consumption requirements of AI glasses. Therefore, a dual-system has become a better choice, and designing an efficient and reliable dual-system communication protocol is crucial to the performance of AI glasses.
[0020] Based on this, embodiments of this application provide a communication performance optimization method, an electronic device, and a computer-readable storage medium. Through dual-machine communication between the main processor and the slave processor, the method achieves dynamic acquisition and classification of tasks in the task list, and assigns corresponding execution positions and task priorities to tasks of different task categories. This fully utilizes the advantages of the main processor and the slave processor, significantly improving communication efficiency and system flexibility, achieving a balance between low power consumption and high performance. Furthermore, by combining the cache space category corresponding to the task category with dynamic adjustment of the data in the cache space, the method can achieve intelligent optimization of the cache space from multiple aspects, significantly improving resource utilization.
[0021] The communication performance optimization method, electronic device, and computer-readable storage medium provided in this application are specifically described through the following embodiments. First, the communication performance optimization method in this application is described.
[0022] This application provides a communication performance optimization method, referring to... Figure 1 , Figure 1 This is a flowchart illustrating a communication performance optimization method provided in an embodiment of this application. This method can be applied to a dual-machine communication system where a master processor and a slave processor communicate based on a preset communication protocol. Figure 1 As shown, the communication performance optimization method provided in this embodiment includes steps S10 to S30.
[0023] In this embodiment, the main processor can be an MCU (Microcontroller Unit), and the slave processor can be a SoC (System on Chip). An MCU is a control-oriented chip characterized by low power consumption and high real-time performance, suitable for tasks such as sensor data acquisition and simple control logic. An SoC is a chip integrating multiple functional modules, possessing powerful computing capabilities and flexibility, suitable for handling complex data processing and artificial intelligence algorithms. In a dual-machine communication system composed of these two components, the MCU and SoC need to cooperate closely to complete various tasks. For example, the MCU can collect data from environmental sensors and send this data to the SoC for processing. The SoC can run complex AI algorithms and send the processing results back to the MCU for display or other operations. Therefore, a suitable dual-machine communication protocol is needed.
[0024] As an example, in this embodiment, the preset communication protocol can be implemented in the following way: 1) At the physical layer, MCUs and SoCs use high-speed serial interfaces, such as SPI (Serial Peripheral Interface), I2C (Inter-Integrated Circuit), and UART (Universal Asynchronous Receiver / Transmitter), for physical connection. Among them, SPI is a high-speed serial interface with advantages such as full-duplex communication, high transmission rate, and simple hardware, making it suitable for communication between MCUs and SoCs.
[0025] 2) At the data link layer, the format of the data frame is defined, including start bit, address bit, data bit, parity bit, and stop bit, using the following format: Start bit: 1 byte, indicating the start of the data frame, e.g., 0xFF; Address bit: 1 byte, indicating the address of the target device, e.g., 0x01 for MCU address, 0x02 for SoC address; Data bits: N bytes, indicating the actual data transmitted, where N is a positive integer; Parity bit: 1 byte, used to verify the correctness of the data, e.g., CRC-8 check; Stop bit: 1 byte, indicating the end of the data frame, e.g., 0xFE.
[0026] 3) At the application layer, define specific application scenarios and data exchange formats, such as the following data types: Sensor data: The MCU sends sensor data to the SoC every second, including temperature, humidity, light intensity, battery level, button presses, power consumption data, etc.; Control commands: Control commands sent by the SoC to the MCU, such as display content (displaying temperature information), sound prompts (playing prompt sounds), etc.; AI model data: The SoC sends processed AI model data to the MCU, such as face recognition results, speech recognition results, etc.; System status: The MCU sends system status information to the SoC, such as battery level, memory usage, etc.
[0027] Step S10: Dynamically retrieve the tasks to be done from the task list; Step S20: Determine the task category and cache space category of the pending tasks based on their urgency and complexity. Step S30: Determine the execution location and priority of the pending tasks based on the task category; Step S40: Dynamically adjust the data in the cache space according to the cache space category.
[0028] In this embodiment, since the MCU, acting as the main processor, has lower power consumption, while the SoC, acting as the slave processor, has higher power consumption, the communication performance optimization method can be executed by the main processor. The main processor can dynamically obtain all pending tasks from the system's task list and then categorize them according to their urgency and complexity. The cache space required to execute each pending task can also be categorized accordingly, allowing for the allocation of appropriate pending tasks to the main and slave processors, thus fully utilizing the advantages of the dual-machine system. After determining the execution location of each pending task, task priorities can be assigned, enabling both the main and slave processors to prioritize the execution of relatively important pending tasks. Simultaneously, the main processor can dynamically adjust the data in the cache space based on the cache space category to ensure the smooth execution of all pending tasks.
[0029] In some feasible embodiments, step S20 above may include: Step S21: Determine the task category and cache space category of the pending tasks that need to be processed immediately as real-time tasks and real-time data cache; Step S22: Determine the task category and cache space category of the pending tasks that can be delayed as non-real-time tasks and non-real-time data cache; Step S23: The task category and cache space category of the pending tasks that require complex calculations from the processor are determined as AI tasks and AI model caches.
[0030] In this embodiment, the main processor can classify tasks that require immediate processing, such as sensor data acquisition and camera photo capture events, as real-time tasks, and categorize the corresponding cache space as real-time data cache. The real-time data cache is used to store the data required by the real-time tasks, such as sensor data. Tasks that can be delayed, such as data uploads and software updates, are classified as non-real-time tasks, and the corresponding cache space is categorized as non-real-time data cache. The non-real-time data cache is used to store the data required by the non-real-time tasks, such as data to be uploaded. Tasks that require complex calculations from the processor, such as face recognition and speech recognition, are classified as AI tasks, and the corresponding cache space is categorized as AI model cache. The AI model cache is used to store the model parameters and intermediate results required by the AI tasks.
[0031] As an example, the main processor can also set the space size of the real-time data cache, AI model cache, and non-real-time data cache to 1MB, 2MB, and 4MB, respectively.
[0032] Reference Figure 2 In some feasible embodiments, the step of determining the execution location of the pending task according to the task category in step S30 above may specifically include: Step S31: If the task type is a real-time task or a non-real-time task, determine the execution location of the pending task as the main processor. Step S32: If the task category is AI task, determine the execution location of the pending task as the processor.
[0033] In this embodiment, since neither real-time nor non-real-time tasks rely on large computing power, they can both be executed by a low-power main processor, while AI tasks rely on large computing power, so they can be executed by a high-performance slave processor.
[0034] As an example, when the communication performance optimization method provided in this embodiment is applied to AI glasses, the MCU running RTOS (Real Time Operated System) can be responsible for low-power real-time tasks such as power charging management, Bluetooth communication with mobile phones, and button and status management, while the SoC running Android can be responsible for high-computing visual scenarios such as taking pictures and recording videos.
[0035] Reference Figure 2 In some feasible embodiments, the step of determining the task priority of the pending task according to the task category in step S30 above may specifically include: Step S33: The task priority of real-time tasks is determined as the first priority, the task priority of AI tasks is determined as the second priority, and the task priority of non-real-time tasks is determined as the third priority; wherein, the first priority is higher than the second priority, and the second priority is higher than the third priority.
[0036] In this embodiment, the first priority is the highest priority, the second priority is next, and the third priority is the lowest priority. As an example, this embodiment defaults to setting the task priority of real-time tasks as the highest priority, the task priority of AI tasks as the next highest priority, and the task priority of non-real-time tasks as the lowest priority. However, the task priorities of various pending tasks can be flexibly adjusted according to the specific scenarios and needs in actual applications, and this embodiment does not impose any restrictions on this.
[0037] Reference Figure 3 In some feasible embodiments, the communication performance optimization method may further include: Step S34: Obtain current system status information and / or user requirement information; Step S35: Dynamically adjust the task priority of pending tasks associated with the current system status information and / or user demand information.
[0038] In this embodiment, the main processor can determine the current state of the system based on the current system state information, and can also determine the current needs of the user based on the user needs information, thereby dynamically adjusting the default task priority settings so that the actual execution order of pending tasks is more in line with the current application scenario and / or meets the user needs.
[0039] Reference Figure 4 In some feasible embodiments, step S35 may specifically include at least one of the following: Step S351: If the current system status information includes a battery level lower than a preset power threshold, delete the task priority of non-real-time tasks to suspend the execution of the non-real-time tasks. Step S352: If the user requirement information includes enabling the AI function, adjust the task priority of the AI task to the first priority. Step S353: If the current system status information includes network anomalies, reduce the task priority of pending tasks involving network data transmission.
[0040] In this embodiment, the current system status information can be battery level, memory usage, network status, etc. When the preset battery threshold is 20%, the dynamic adjustment method of task priority can be to further reduce the priority of non-real-time tasks when the battery level is below 20%, or even delete their task priority to achieve the purpose of pausing the execution of non-real-time tasks and saving power. When the network condition is poor, the task priority of tasks such as "data upload" can be reduced. The AI function can be the face recognition function. In order to respond to user needs in a timely manner, tasks that meet the user's needs can be executed first. Therefore, the priority of the face recognition AI task can be temporarily increased to the highest priority.
[0041] In some feasible embodiments, step S40 above may specifically include at least one of the following: Step S41: If the available space in the cache is less than the preset cache threshold, delete the data in the non-real-time data cache, AI model cache and real-time data cache in sequence until the available space is greater than or equal to the preset cache threshold. Step S42: Compress the data in the non-real-time data cache.
[0042] In this embodiment, the preset cache threshold can be 5%, 10%, etc. When the available cache space is less than the preset cache threshold, it indicates that the available space is insufficient. At this time, an appropriate cache replacement strategy, such as LRU (Least Recently Used) or FIFO (First Input First Output), can be used to determine which data needs to be evicted. For example, data in the non-real-time data cache can be evicted first. If the available space is still insufficient, data in the AI model cache can be evicted further. If the available space is still insufficient, data in the real-time cache can be evicted further, until the available space is greater than or equal to the preset cache threshold, that is, there is enough available space to execute subsequent pending tasks. In addition, the available space can also be expanded by data compression, such as ZIP compression of non-real-time data, to reduce the cache space occupied.
[0043] In some feasible embodiments, the communication performance optimization method may further include: Step S50: Predict user demand data based on historical data and store the user demand data in the cache space in advance.
[0044] In this embodiment, the data in the cache space can also be dynamically adjusted by data prefetching. That is, based on the user's usage habits and the system's historical operation data, the data that the user may need can be predicted and loaded into the cache in advance. For example, if it is determined from historical data that the user frequently uses the face recognition function, the face recognition model can be loaded into the AI model cache in advance. As another example, if the user frequently uses the music function or weather forecast at a certain time, the relevant data can be loaded into the non-real-time data cache in advance.
[0045] This embodiment provides a communication performance optimization method, which can establish a low-latency control channel between the MCU and SoC through SPI, and transmit image and video streams between the SoC and other terminal devices through WiFi P2P. Through hierarchical power domain management, cross-processor command protocol, data plane / control plane separation, state machine and energy-aware scheduling, it achieves both low power consumption and high performance, significantly improves the communication efficiency, system flexibility and resource utilization of the dual-machine communication system, thereby enhancing the user experience.
[0046] Furthermore, embodiments of this application also provide an electronic device, which includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to perform the communication performance optimization method in any of the above embodiments.
[0047] The following is for reference. Figure 5 The diagram illustrates a structural schematic of an electronic device suitable for implementing embodiments of this application. The electronic devices in these embodiments may include, but are not limited to, mobile terminals such as AI glasses, mobile phones, laptops, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (Portable Application Descriptions), PMPs (Portable Media Players), in-vehicle terminals (e.g., in-vehicle navigation terminals), and fixed terminals such as digital TVs and desktop computers. Figure 5 The electronic device shown is merely an example and should not impose any limitation on the functionality and scope of use of the embodiments of this application.
[0048] like Figure 5As shown, the electronic device may include a processing unit 1001 (e.g., a central processing unit, a graphics processing unit, etc.), which can perform various appropriate actions and processes according to a program stored in a read-only memory 1002 or a program loaded from a storage device 1003 into a random access memory 1004. The random access memory 1004 also stores various programs and data required for the operation of the electronic device. The processing unit 1001, the read-only memory 1002, and the random access memory 1004 are interconnected via a bus 1005. An input / output interface 1006 is also connected to the bus. Typically, the following systems can be connected to the input / output interface 1006: input devices 1007 including, for example, touchscreens, touchpads, keyboards, mice, image sensors, microphones, accelerometers, gyroscopes, etc.; output devices 1008 including, for example, liquid crystal displays (LCDs), speakers, vibrators, etc.; storage devices 1003 including, for example, magnetic tapes, hard disks, etc.; and communication devices 1009. The communication device 1009 allows the electronic device to communicate wirelessly or wiredly with other devices to exchange data. Although the diagrams show electronic devices with various systems, it should be understood that it is not required to implement or have all of the systems shown. More or fewer systems may be implemented alternatively.
[0049] Specifically, according to the embodiments disclosed in this application, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments disclosed in this application include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via a communication device, or installed from storage device 1003, or installed from read-only memory 1002. When the computer program is executed by processing device 1001, it performs the functions defined in the methods of the embodiments disclosed in this application.
[0050] The beneficial effects of the electronic device provided in this application are the same as those of the communication performance optimization method provided in the above embodiments, and other technical features of the electronic device are the same as those disclosed in the method of the previous embodiment, and will not be repeated here.
[0051] It should be understood that the various parts disclosed in this application can be implemented using hardware, software, firmware, or a combination thereof. In the description of the above embodiments, specific features, structures, materials, or characteristics can be combined in any suitable manner in one or more embodiments or examples.
[0052] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
[0053] Furthermore, embodiments of this application also provide a computer-readable storage medium, which may be a non-volatile computer-readable storage medium, on which a computer program is stored, and which, when executed by a processor, implements the communication performance optimization method provided in any of the above embodiments.
[0054] The computer-readable storage medium provided in this application may be, for example, a USB flash drive, but is not limited to, electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems or devices, or any combination thereof. More specific examples of computer-readable storage media may include, but are not limited to: electrical connections having one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof. In this embodiment, the computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system or device. The program code contained on the computer-readable storage medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (Radio Frequency), etc., or any suitable combination thereof.
[0055] The aforementioned computer-readable storage medium may be included in an electronic device or may exist independently without being assembled into an electronic device.
[0056] The aforementioned computer-readable storage medium carries one or more programs, which, when executed by an electronic device, enable the electronic device to implement the aforementioned communication performance optimization method.
[0057] Computer program code for performing the operations of this application can be written in one or more programming languages or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, and C++, and conventional procedural programming languages such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a Local Area Network (LAN) or a Wide Area Network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0058] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this application. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.
[0059] The modules described in the embodiments of this application can be implemented in software or hardware. The names of the modules do not necessarily limit the functionality of the unit itself.
[0060] The readable storage medium provided in this embodiment is a computer-readable storage medium, which stores computer-readable program instructions (i.e., computer programs) for executing the above-described communication performance optimization method. The beneficial effects of the computer-readable storage medium provided in this application are the same as the beneficial effects of the communication performance optimization method provided in the above-described embodiments, and will not be repeated here.
[0061] Furthermore, this application also provides a computer program product, including a computer program, which, when executed by a processor, implements the communication performance optimization method provided in any of the above embodiments.
[0062] The computer program product provided in this embodiment belongs to the same technical concept as the communication performance optimization method proposed in the above embodiments. Compared with related technologies, the beneficial effects of the computer program product provided in this application are the same as the beneficial effects of the communication performance optimization method provided in the above embodiments, and will not be elaborated here.
[0063] It should be noted that although a logical order is shown in the flowchart, in some cases, the steps shown or described may be performed in a different order than that shown in the flowchart. The terms "first," "second," etc., in the specification, claims, and drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence.
[0064] It should also be understood that references to "one embodiment" or "some embodiments" in the specification of embodiments of this application mean that one or more embodiments of this application include the specific features, structures, or characteristics described in connection with that embodiment. Therefore, the phrases "in one embodiment," "in some embodiments," "in other embodiments," "in still other embodiments," etc., appearing in different parts of this specification do not necessarily refer to the same embodiment, but rather mean "one or more, but not all, embodiments," unless otherwise specifically emphasized. The terms "comprising," "including," "having," and variations thereof all mean "including but not limited to," unless otherwise specifically emphasized.
[0065] The above describes some implementation methods of the embodiments of this application. However, the embodiments of this application are not limited to the above implementation methods. Those skilled in the art can make various equivalent modifications or substitutions without departing from the spirit of the embodiments of this application. All such equivalent modifications or substitutions are included within the scope defined by the claims of the embodiments of this application.
Claims
1. A method for optimizing communication performance, characterized in that, The communication performance optimization method is applied to a dual-machine communication system in which a master processor and a slave processor communicate with each other based on a preset communication protocol. The communication performance optimization method includes: Dynamically retrieve pending tasks from the task list; The task category and cache space category of the pending tasks are determined based on their urgency and complexity. The execution location and priority of the pending tasks are determined according to the task category. The data in the cache space is dynamically adjusted according to the cache space category.
2. The communication performance optimization method as described in claim 1, characterized in that, The step of determining the task category and cache space category of the pending task based on its urgency and complexity includes: The task categories and cache space categories of the pending tasks that need to be processed immediately are determined as real-time tasks and real-time data caches; The task category and cache space category of the pending tasks that can be processed with delay are determined as non-real-time tasks and non-real-time data cache. The task categories and cache space categories of the pending tasks that require complex calculations from the processor are identified as AI tasks and AI model caches.
3. The communication performance optimization method as described in claim 2, characterized in that, Determining the execution location of the pending task based on the task category includes: If the task category is a real-time task or a non-real-time task, the execution location of the pending task is determined to be the main processor. If the task category is the AI task, the execution location of the pending task is determined to be the slave processor.
4. The communication performance optimization method as described in claim 2, characterized in that, Determining the task priority of the pending task based on the task category includes: The task priority of the real-time task is determined as the first priority, the task priority of the AI task is determined as the second priority, and the task priority of the non-real-time task is determined as the third priority. The first priority is higher than the second priority, and the second priority is higher than the third priority.
5. The communication performance optimization method as described in claim 4, characterized in that, The communication performance optimization method further includes: Obtain current system status information and / or user request information; The task priority of the pending tasks associated with the current system status information and / or the user demand information is dynamically adjusted.
6. The communication performance optimization method as described in claim 5, characterized in that, The dynamic adjustment of the task priority of the pending tasks associated with the current system status information and / or the user demand information includes at least one of the following: If the current system status information includes a battery level below a preset power threshold, the task priority of the non-real-time task is removed to suspend the execution of the non-real-time task. If the user demand information includes enabling AI functionality, the task priority of the AI task will be adjusted to the first priority. If the current system status information includes network anomalies, the task priority of the pending tasks involving network data transmission shall be reduced.
7. The communication performance optimization method as described in claim 2, characterized in that, The step of dynamically adjusting the data in the cache space according to the cache space category includes at least one of the following: If the available space in the cache is less than a preset cache threshold, the data in the non-real-time data cache, the AI model cache, and the real-time data cache are deleted in sequence until the available space is greater than or equal to the preset cache threshold. The data in the non-real-time data cache is compressed.
8. The communication performance optimization method according to any one of claims 1 to 7, characterized in that, The communication performance optimization method further includes: Based on historical data, predict user demand data and store the user demand data in the cache space in advance.
9. An electronic device, characterized in that, The electronic device includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, the computer program being configured to implement the steps of the communication performance optimization method as described in any one of claims 1 to 8.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the steps of the communication performance optimization method as described in any one of claims 1 to 8.