An application analysis and supervision system and method compatible with software architecture

By configuring thread supervision API and creating execution locks in a system compatible with software architecture, the problem of inconsistent task progress between different architectures is solved, synchronous execution and efficient management of tasks in a multi-architecture environment is achieved, and the stability of the system is improved. Execution efficiency.

CN119166301BActive Publication Date: 2025-02-18上海市大数据中心
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411200763.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-08-29
Publication Date
2025-02-18
Estimated Expiration
2044-08-29

AI Technical Summary

Technical Problem

In software systems compatible with different architectures, due to the difference in instruction set and execution efficiency of ARM and x86 architectures, the same task will have inconsistent progress problems on different architectures, resulting in unbalanced task scheduling, difficulty in data synchronization and waste of resources, increasing system complexity, resulting in unbalanced task scheduling, difficulty in data synchronization and waste of resources, and increasing system complexity and maintenance costs.

Method used

By configuring and deploying the thread supervision API, monitor task execution progress in different architectures in real time and create execution locks to ensure tasks are executed simultaneously in different architectures. At the same time, by creating a thread migration map set and using a status tracker, the migration of threads between different architectures is judged and managed.

Benefits of technology

Effectively solve the problem of progress inconsistency between different architectures, ensure that tasks are executed in a coordinated and consistent manner in a multi-architecture environment, simplify monitoring development and debugging operations, reduce the complexity of system integration, and improve the execution efficiency and stability of the system. .

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119166301B_ABST
    Figure CN119166301B_ABST
Patent Text Reader

Abstract

The present invention discloses an application analysis and supervision system and method for compatible software architectures, and relates to the technical field of compatible software architecture applications. The present invention configures and deploys a thread supervision API and creates an execution lock to monitor the execution progress of tasks in different software architectures in real time, ensure the synchronous execution of tasks in a multi-architecture environment, avoid resource competition and scheduling failure, judge and manage the migration of threads between different software architectures, ensure the efficiency and accuracy of task execution, reduce the complexity of system integration, ensure the synchronization of task execution and data consistency, perform thread migration judgment and status tracking in a multi-architecture environment, effectively improve the execution accuracy of the system, avoid resource waste caused by insufficient resources or large differences in software architecture performance, ensure the coordination of tasks in different software architectures, support the expansion of different software architectures, improve the flexibility and adaptability of the system, and adapt to diversified computing platform requirements.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of compatible software architecture application, and in particular to an application analysis and supervision system and method for a compatible software architecture. Background Art

[0002] With the diversification of computing platforms, compatibility with different architectures (such as ARM and x86) is becoming increasingly important in software systems. The ARM architecture is widely used in mobile devices and embedded systems for its high energy efficiency and low cost, while the x86 architecture dominates high-performance computing and desktop applications. Software systems compatible with different architectures can run on different hardware platforms, ensuring the wide applicability of applications, reducing development and maintenance costs, and improving the flexibility and scalability of the system. In today's diversified computing environment, this compatibility helps companies respond to different market demands and maintain competitive advantages, especially in the field of information technology innovation, which is even more critical.

[0003] In software systems compatible with different architectures, due to differences in instruction sets and execution efficiency between ARM and x86 architectures, the same task may have inconsistent progress on different architectures. This inconsistency may lead to unbalanced task scheduling and affect overall system performance, especially in applications with high real-time requirements. In addition, inconsistent progress can also cause data synchronization difficulties and waste resources, increasing system complexity and maintenance costs. Therefore, solving this problem is crucial to ensure that tasks run smoothly in a multi-architecture environment. Summary of the invention

[0004] The purpose of the present invention is to provide an application analysis and supervision system and method compatible with software architecture to solve the problems raised in the prior art.

[0005] To achieve the above object, the present invention provides the following technical solution: an application analysis and supervision method compatible with software architecture, the application analysis and supervision method comprising the following steps:

[0006] Step S1, configuring and deploying the thread supervision API in the compatible software architecture, and real-time monitoring the thread execution progress of the tasks corresponding to each software architecture in the compatible software architecture;

[0007] Step S1-1, configuring monitoring parameters of the thread supervision API, and integrating the thread supervision API into various modules of the compatible software architecture;

[0008] Step S1-2, deploying the configured thread supervision API to a compatible software architecture, and using the thread supervision API to monitor the thread execution progress of tasks in each software architecture in real time;

[0009] By configuring the monitoring parameters of the thread monitoring API, you can better understand the thread execution status in different architectures, integrate the thread monitoring API into each module, and ensure the synchronization of task execution progress between modules. This can reduce the progress inconsistency problem between different architectures, ensure that tasks can be executed in a coordinated and consistent manner in different architectures, and simplify monitoring development and debugging operations, reducing the complexity of development and integration.

[0010] Step S2, create an execution lock, and add an execution lock to the task when it is ready to be executed, and the compatible software architecture only executes the task with the execution lock added, when the task is executed on one of the compatible software architectures, obtain the thread execution remaining amount of the other software architecture, record the software architecture where the task is executed as the advance software architecture, and record the software architecture where there is thread execution as the inert software architecture;

[0011] Step S2-1, create an execution lock. When a task is ready to be executed, add an execution lock to the task so that the execution lock is bound to the task, and only add an execution lock to one task at a time;

[0012] Step S2-2, using a compatible software architecture to execute the task with the execution lock added, when the task is executed on one of the compatible software architectures, obtaining the remaining thread execution amount of another software architecture through a thread supervision API;

[0013] Step S2-3, in the compatible software architecture, the software architecture where the task has been executed is recorded as the advance software architecture, and the software architecture with remaining thread execution is recorded as the inert software architecture;

[0014] The created execution lock is only added to one task at a time. When the compatible software architecture executes tasks, only the tasks with the added execution lock are read and executed. This can ensure the consistent execution progress of tasks in different software architectures and solve the problem of difficult data synchronization.

[0015] Step S3: Create a thread migration mapping set, perform thread migration condition judgment on threads to be executed in the inert software architecture, and map threads that meet the thread migration condition into the thread migration mapping set;

[0016] Step S3-1: Create a thread migration mapping set, and perform thread migration condition judgment on the threads to be executed in the lazy software architecture. The migration condition judgment calculation formula is as follows:

[0017] ;

[0018] In the formula, C represents the judgment value of the thread migration condition; Expressed as thread execution time on the advance software architecture; Expressed as thread execution time on lazy software architecture; It is expressed as the time required to complete the task when the task is not subject to resource constraints or architectural differences; K and L are both weight factors; Indicates the thread migration time required for thread migration execution;

[0019] Step S3-2, mapping threads with thread migration judgment condition value C>0 into the thread migration mapping set, and threads with thread migration judgment condition value C≤0 are not migrated and are executed by the inert software architecture;

[0020] By calculating and judging the migration conditions of threads to be executed on the lazy software architecture, the cost of thread migration execution is prevented from being greater than the cost of execution on the lazy software architecture. This effectively improves the efficiency of thread migration execution and avoids resource waste and problems of excessive task execution.

[0021] Step S4: construct a thread migration state tracker, and use the thread migration state tracker to track and mark the thread migration state in the thread migration mapping set;

[0022] Step S5, calling the advance software architecture to read the thread corresponding to the thread migration state in the thread migration mapping set, and performing migration execution on the acquired thread. After the thread execution is completed, the thread execution result is returned to the thread migration mapping set, and the thread state is tracked and marked using the thread migration state tracker;

[0023] Step S5-1, calling the advance software architecture to read the threads in the thread migration mapping set whose state is the migration pending state, and executing the threads. After the threads are executed, the thread execution results are returned to the thread migration mapping set;

[0024] Step S5-2: using the thread migration state tracker, changing the state of the thread executed by the advance software architecture from the migration pending state to the migration executed state;

[0025] By identifying the status of threads in the thread migration mapping set, it is possible to avoid the lazy software architecture obtaining threads in the migration pending state when obtaining thread results in the migration mapping set, or to avoid the advance software architecture obtaining threads in the migration executed state when obtaining threads in the migration mapping set, thereby achieving efficient thread acquisition and accelerating the speed and accuracy of software architecture processing threads.

[0026] Step S6, calling the lazy software architecture to read and merge the threads that have been executed in the thread migration mapping set. When the threads in the thread migration mapping set, the advance software architecture and the lazy software architecture are all executed, release the execution lock added to the task in step S2 and execute the next task.

[0027] Step S6-1, calling the lazy software architecture to read the thread execution results in the thread migration mapping set whose state is the migration executed state, and verifying and merging the thread execution results with the corresponding data in its own architecture;

[0028] Step S6-2, after the lazy software architecture has read the thread execution results in the thread migration mapping set, the threads in the thread migration mapping set whose status is migration executed are destroyed. When the threads in the thread migration mapping set, the advance software architecture, and the lazy software architecture are all executed, the task execution is completed, the resources occupied by the thread and the execution lock added to the task in step S2 are released, and the next task is executed;

[0029] By calling the lazy software architecture to read and merge the executed threads, the task execution results are ensured to be accurate. When all threads have completed execution, the system automatically destroys the executed threads and releases the occupied resources and task execution locks. This mechanism can optimize the accuracy and efficiency of task execution, avoid wasting system resources, ensure that the system smoothly enters the next task execution stage, and improve the overall performance and task processing capabilities of multi-architecture compatible systems.

[0030] Furthermore, in step S4, a thread migration state tracker is constructed, and thread migration states in the thread migration mapping set are tracked and marked by the thread migration state tracker, and threads to be executed in the thread migration mapping set are tracked and marked as migration to be executed state, and threads that have been executed are tracked and marked as migration executed state.

[0031] Further, an application analysis and supervision system compatible with software architecture includes a thread supervision module, an execution lock module, a thread migration judgment module, a thread migration mapping module, a thread state tracking marking module and a thread execution merging module;

[0032] The thread supervision module includes a thread log recording unit, a thread resource scheduling unit, a thread parameter configuration unit and a thread execution progress unit; the thread log recording unit is used to record the execution log of the thread, and the thread execution log includes the state change, performance data and abnormal situation of the thread execution; the thread resource scheduling unit is used to manage the memory resources, file handle resources, network connection resources used by the thread, and schedule the execution order of the thread, and allocate CPU time slices based on the thread priority, dependency and resource availability; the thread parameter configuration unit is used to set and adjust the execution parameters of the thread; the thread execution progress unit is used to obtain and record the progress of the thread execution in real time;

[0033] Each thread in the system is assigned a priority. The priority is set by the operating system or application based on the importance and urgency of the thread, and is assigned by the system's logic for executing threads. The system will try to arrange dependent threads in close time slices to reduce waiting time and resource competition. When allocating CPU time slices, the system considers not only the thread priority, but also the currently available system resources memory and I / O bandwidth.

[0034] The execution lock module includes a task locking unit, an execution lock releasing unit and a timeout processing unit; the task locking unit is used to lock the task to be executed, and through locking, control the subsequent tasks to not be able to jump in the queue for execution, so that the compatible software architecture only executes one task at a time, and controls the execution progress of tasks in different software architectures; the execution lock releasing unit is used to unlock the task and release resources after the compatible software architecture completes the task execution; the timeout processing unit is used to handle the situation where the execution lock times out on the task. When a task does not release the lock within the specified time, the timeout processing unit will automatically unlock and take corresponding measures to prevent system resources from being occupied for a long time;

[0035] The thread migration judgment module includes a performance evaluation unit, a thread migration condition judgment unit and a thread resource matching unit; the performance evaluation unit is used to evaluate the execution efficiency of the current thread on different architectures by comparing the execution performance of the thread on the source architecture and the target architecture; the thread migration condition judgment unit is used to judge whether the thread meets the migration condition according to the thread execution time, resource utilization rate and architecture performance difference; the thread resource matching unit is used to evaluate the resource situation of the target architecture to ensure that the target architecture has sufficient computing resources and memory space to execute the migrated thread;

[0036] The thread migration mapping module includes a thread mapping unit and a thread mapping storage unit; the thread mapping unit is used to map threads from the inert software architecture to the thread migration mapping set; the thread mapping storage unit is used to store threads mapped by the thread mapping unit;

[0037] The thread state tracking and marking module includes a thread state collection unit, a state marking unit and a state query unit; the thread state collection unit is used to collect the execution state of the threads in the migration mapping set in real time; the state marking unit is used to mark and update the state of the threads in the thread migration mapping set according to the thread execution status; the state query unit is used to provide a query interface, and query the marking information of the thread state through the query interface;

[0038] The thread execution merging module includes a thread execution result collection unit, a result merging unit and a result returning unit; the execution result collection unit is used to collect the result data of each thread after execution in different software architectures; the result merging unit is used to merge the execution results of different threads to form a complete task execution result; the result returning unit is used to centrally return the execution results of each thread in different software architectures to the thread migration mapping set.

[0039] Compared with the prior art, the present invention has the following beneficial effects: by configuring and deploying thread supervision APIs and creating execution locks, the present invention monitors the execution progress of tasks in different architectures in real time, ensures the synchronous execution of tasks in a multi-architecture environment, and avoids resource competition and scheduling imbalance; by creating a thread migration mapping set and using a state tracker, the migration of threads between different architectures is judged and managed, ensuring the efficiency and accuracy of task execution;

[0040] 1. The present invention configures and deploys the thread supervision API, monitors the execution progress of the thread in real time, and integrates it into each module, which simplifies the development and debugging process, reduces the complexity of system integration, and ensures the synchronization of task execution and data consistency.

[0041] 2. The present invention effectively improves the execution efficiency of the system by performing thread migration and state tracking in a multi-architecture environment, avoids resource waste caused by insufficient resources or large differences in architecture performance, and ensures the coordination and consistency of tasks in different architectures.

[0042] 3. The present invention avoids the execution confusion and progress inconsistency of threads in a multi-architecture environment by setting execution locks, as well as the design of thread migration judgment and thread state tracking marks, and improves the stability of the system. At the same time, it supports the expansion of different architectures, improves the flexibility and adaptability of the system, and adapts to the needs of diversified computing platforms. BRIEF DESCRIPTION OF THE DRAWINGS

[0043] Figure 1 A flowchart of an application analysis and supervision method compatible with a software architecture according to the present invention;

[0044] Figure 2 A schematic diagram of the structure of an application analysis and supervision system compatible with a software architecture according to the present invention. DETAILED DESCRIPTION

[0045] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0046] Embodiment 1: Figure 1 As shown, the present invention provides a technical solution, an application analysis and supervision method compatible with software architecture, and the application analysis and supervision method comprises the following steps:

[0047] Step S1, configuring and deploying the thread supervision API in the compatible software architecture, and real-time monitoring the thread execution progress of the tasks corresponding to each software architecture in the compatible software architecture;

[0048] Step S1-1, configuring monitoring parameters of the thread supervision API, and integrating the thread supervision API into various modules of the compatible software architecture;

[0049] Step S1-2, deploying the configured thread supervision API to a compatible software architecture, and using the thread supervision API to monitor the thread execution progress of tasks in each software architecture in real time;

[0050] For example, the video processing task is divided into two parts: video decoding (performed on ARM) and video encoding (performed on x86). The decoding task on ARM takes 10 seconds, and the encoding task on x86 takes 15 seconds;

[0051] Configure and deploy the thread supervision API. The thread ID of the ARM architecture is 101, and the thread ID of the x86 architecture is 201.

[0052] Second 1: The CPU usage of ARM thread 101 is 30%, and the execution time is 1 second; the CPU usage of x86 thread 202 is 50%, and the execution time is 1 second.

[0053] 5th second: The status of ARM thread 101 is running, and the execution time is 5 seconds; the status of x86 thread 202 is running, and the execution time is 5 seconds.

[0054] 10th second: ARM thread 101 completes, x86 thread 202 is still executing.

[0055] Step S2, create an execution lock, and add an execution lock to the task when it is ready to be executed, and the compatible software architecture only executes the task with the execution lock added, when the task is executed on one of the compatible software architectures, obtain the thread execution remaining amount of the other software architecture, record the software architecture where the task is executed as the advance software architecture, and record the software architecture where there is thread execution as the inert software architecture;

[0056] Step S2-1, create an execution lock. When a task is ready to be executed, add an execution lock to the task so that the execution lock is bound to the task, and only add an execution lock to one task at a time;

[0057] Step S2-2, using a compatible software architecture to execute the task with the execution lock added, when the task is executed on one of the compatible software architectures, obtaining the remaining thread execution amount of another software architecture through a thread supervision API;

[0058] Step S2-3, in the compatible software architecture, the software architecture where the task has been executed is recorded as the advance software architecture, and the software architecture with remaining thread execution is recorded as the inert software architecture;

[0059] Step S3: Create a thread migration mapping set, perform thread migration condition judgment on threads to be executed in the inert software architecture, and map threads that meet the thread migration condition into the thread migration mapping set;

[0060] Step S3-1: Create a thread migration mapping set, and perform thread migration condition judgment on the threads to be executed in the lazy software architecture. The migration condition judgment calculation formula is as follows:

[0061] ;

[0062] In the formula, C represents the judgment value of the thread migration condition; Expressed as thread execution time on the advance software architecture; Expressed as thread execution time on lazy software architecture; It is expressed as the time required to complete the task when the task is not subject to resource constraints or architectural differences; K and L are both weight factors; Indicates the thread migration time required for thread migration execution, such as data copying, thread context switching, etc.;

[0063] For example, the system is,ARM architecture, which has high resource utilization, and the x86 architecture, which has a faster execution speed.,The ARM architecture system has a longer thread execution time due to the architectural characteristics,,while the x86 architecture system has a shorter execution time for the same thread;

[0064] Setting conditions: The execution time of a thread on an ARM architecture system is = 30ms, and the execution time on the x86 architecture system is = 10ms, the time it takes to complete the task without resource constraints or architectural differences =50ms, assuming weight factor K is 0.7, L is 0.3, thread migration cost The time is 5ms, and the migration condition is determined by the calculation formula:

[0065] C=0.7*(30-10)+0.3*(50-10)-5=21ms

[0066] According to the conditions, if C>0 is satisfied, the thread on the ARM architecture system is migrated and mapped to the x86 architecture system for execution.

[0067] Step S4: construct a thread migration state tracker, and use the thread migration state tracker to track and mark the thread migration state in the thread migration mapping set;

[0068] Step S5, calling the advance software architecture to read the thread corresponding to the thread migration state in the thread migration mapping set, and performing migration execution on the acquired thread. After the thread execution is completed, the thread execution result is returned to the thread migration mapping set, and the thread state is tracked and marked using the thread migration state tracker;

[0069] Step S5-1, calling the advance software architecture to read the threads in the thread migration mapping set whose state is the migration pending state, and executing the threads. After the threads are executed, the thread execution results are returned to the thread migration mapping set;

[0070] Step S5-2: using the thread migration state tracker, changing the state of the thread executed by the advance software architecture from the migration pending state to the migration executed state;

[0071] Step S6, calling the lazy software architecture to read and merge the threads that have been executed in the thread migration mapping set. When the threads in the thread migration mapping set, the advance software architecture and the lazy software architecture are all executed, release the execution lock added to the task in step S2 and execute the next task.

[0072] Step S6-1, calling the lazy software architecture to read the thread execution results in the thread migration mapping set whose state is the migration executed state, and verifying and merging the thread execution results with the corresponding data in its own architecture;

[0073] Step S6-2, after the lazy software architecture has read the thread execution results in the thread migration mapping set, the threads in the thread migration mapping set whose status is migration executed are destroyed. When the threads in the thread migration mapping set, the advance software architecture, and the lazy software architecture are all executed, the task execution is completed, the resources occupied by the thread and the execution lock added to the task in step S2 are released, and the next task is executed;

[0074] For example, there are tasks A and B, and task A is sorted before task B. Task A is executed in a compatible software architecture that is compatible with the ARM architecture system and the x86 architecture system. It takes 10ms for task A to execute in the ARM architecture system and 5ms for task A to execute in the x86 architecture system. When task A is ready to execute, the created execution lock will add a binding to it. When the compatible software architecture is running, task A with the execution lock is obtained. Task B cannot compete with task A for system resources. When the x86 architecture system completes the execution of task A, the progress of task A in the ARM architecture system is read, and the threads that meet the thread migration conditions are migrated for execution. After the threads are executed, the thread execution results are returned, and the threads in the ARM architecture system, the thread migration mapping set, and the x86 architecture system are judged. When the threads are all executed, the execution lock added to task A is released, the system resources are released, and preparations are made for the execution of the next task.

[0075] Construct a thread migration state tracker, and use the thread migration state tracker to track and mark the thread migration state in the thread migration mapping set, mark the threads to be executed in the thread migration mapping set as the migration pending state, and mark the threads that have been executed as the migration executed state.

[0076] Embodiment 2, as Figure 2 As shown, the present invention provides an application analysis and supervision system compatible with software architecture, the application analysis and supervision system includes a thread supervision module, an execution lock module, a thread migration judgment module, a thread migration mapping module, a thread state tracking marking module and a thread execution merging module;

[0077] The thread supervision module includes a thread log recording unit, a thread resource scheduling unit, a thread parameter configuration unit and a thread execution progress unit; the thread log recording unit is used to record the execution log of the thread, and the thread execution log includes the state change, performance data and abnormal situation of the thread execution; the thread resource scheduling unit is used to manage the memory resources, file handle resources, network connection resources used by the thread, and schedule the execution order of the thread, and allocate CPU time slices based on the thread priority, dependency and resource availability; the thread parameter configuration unit is used to set and adjust the execution parameters of the thread; the thread execution progress unit is used to obtain and record the progress of the thread execution in real time;

[0078] The execution lock module includes a task locking unit, an execution lock releasing unit and a timeout processing unit; the task locking unit is used to lock the task to be executed, and through locking, control the subsequent tasks to not be able to jump in the queue for execution, so that the compatible software architecture only executes one task at a time, and controls the execution progress of tasks in different software architectures; the execution lock releasing unit is used to unlock the task and release resources after the compatible software architecture completes the task execution; the timeout processing unit is used to handle the situation where the execution lock times out on the task. When a task does not release the lock within the specified time, the timeout processing unit will automatically unlock and take corresponding measures to prevent system resources from being occupied for a long time;

[0079] The thread migration judgment module includes a performance evaluation unit, a thread migration condition judgment unit and a thread resource matching unit; the performance evaluation unit is used to evaluate the execution efficiency of the current thread on different architectures by comparing the execution performance of the thread on the source architecture and the target architecture; the thread migration condition judgment unit is used to judge whether the thread meets the migration condition according to the thread execution time, resource utilization rate and architecture performance difference; the thread resource matching unit is used to evaluate the resource situation of the target architecture to ensure that the target architecture has sufficient computing resources and memory space to execute the migrated thread;

[0080] The thread migration mapping module includes a thread mapping unit and a thread mapping storage unit; the thread mapping unit is used to map threads from the inert software architecture to the thread migration mapping set; the thread mapping storage unit is used to store threads mapped by the thread mapping unit;

[0081] The thread state tracking and marking module includes a thread state collection unit, a state marking unit and a state query unit; the thread state collection unit is used to collect the execution state of the threads in the migration mapping set in real time; the state marking unit is used to mark and update the state of the threads in the thread migration mapping set according to the thread execution status; the state query unit is used to provide a query interface, and query the marking information of the thread state through the query interface;

[0082] The thread execution merging module includes a thread execution result collection unit, a result merging unit and a result returning unit; the execution result collection unit is used to collect the result data of each thread after execution in different software architectures; the result merging unit is used to merge the execution results of different threads to form a complete task execution result; the result returning unit is used to centrally return the execution results of each thread in different software architectures to the thread migration mapping set.

[0083] It will be apparent to those skilled in the art that the invention is not limited to the details of the exemplary embodiments described above and that the invention can be implemented in other specific forms without departing from the spirit or essential features of the invention. Therefore, the embodiments should be considered exemplary and non-limiting in all respects, and the scope of the invention is defined by the appended claims rather than the foregoing description, and it is intended that all variations falling within the meaning and scope of the equivalent elements of the claims be included in the invention. Any reference numeral in a claim should not be considered as limiting the claim to which it relates.

Claims

1. A method for application analysis and supervision compatible with software architecture, characterized by: The application analysis supervision method comprises the following steps: Step S1, configuring and deploying the thread supervision API in the compatible software architecture, and real-time monitoring the thread execution progress of the tasks corresponding to each software architecture in the compatible software architecture; Step S2, create an execution lock, and add an execution lock to the task when it is ready to be executed, and the compatible software architecture only executes the task with the execution lock added, when the task is executed on one of the compatible software architectures, obtain the thread execution remaining amount of the other software architecture, record the software architecture where the task is executed as the advance software architecture, and record the software architecture where there is thread execution as the inert software architecture; To create an execution lock, use a compatible software architecture to perform the following steps on the task with the execution lock added: Step S2-1, create an execution lock. When a task is ready to be executed, add an execution lock to the task so that the execution lock is bound to the task, and only add an execution lock to one task at a time; Step S2-2, using a compatible software architecture to execute the task with the execution lock added, when the task is executed on one of the compatible software architectures, obtaining the remaining thread execution amount of another software architecture through a thread supervision API; Step S2-3, in the compatible software architecture, the software architecture where the task has been executed is recorded as the advance software architecture, and the software architecture with remaining thread execution is recorded as the inert software architecture; Step S3: Create a thread migration mapping set, perform thread migration condition judgment on threads to be executed in the inert software architecture, and map threads that meet the thread migration condition into the thread migration mapping set; Step S4: construct a thread migration state tracker, and use the thread migration state tracker to track and mark the thread migration state in the thread migration mapping set; Step S5, calling the advance software architecture to read the thread corresponding to the thread migration state in the thread migration mapping set, and performing migration execution on the acquired thread. After the thread execution is completed, the thread execution result is returned to the thread migration mapping set, and the thread state is tracked and marked using the thread migration state tracker; Step S6, calling the lazy software architecture to read and merge the threads that have been executed in the thread migration mapping set. When the threads in the thread migration mapping set, the advance software architecture and the lazy software architecture are all executed, release the execution lock added to the task in step S2 and execute the next task.

2. The application analysis and supervision method of compatible software architecture according to claim 1 is characterized by: In step S1, the steps of monitoring the progress of the task threads corresponding to each software architecture in the compatible software architecture are as follows: Step S1-1, configuring monitoring parameters of the thread supervision API, and integrating the thread supervision API into various modules of the compatible software architecture; Step S1-2: deploy the configured thread supervision API to the compatible software architecture, and use the thread supervision API to monitor the thread execution progress of tasks in each software architecture in real time.

3. The application analysis and supervision method of compatible software architecture according to claim 2 is characterized by: The specific steps of step S3 are as follows: Step S3-1: Create a thread migration mapping set, and perform thread migration condition judgment on the threads to be executed in the lazy software architecture. The migration condition judgment calculation formula is as follows: ; In the formula, C represents the judgment value of the thread migration condition; Expressed as thread execution time on the advance software architecture; Expressed as thread execution time on lazy software architecture; It is expressed as the time required to complete the task when the task is not subject to resource constraints or architectural differences; K and L are both weight factors; Indicates the thread migration time required for thread migration execution; Step S3-2: Map threads with thread migration judgment condition value C>0 to the thread migration mapping set, and do not perform migration mapping on threads with thread migration judgment condition value C≤0, and execute them by the inert software architecture.

4. The application analysis and supervision method of compatible software architecture according to claim 3 is characterized by: In step S4, a thread migration state tracker is constructed, and thread migration states in the thread migration mapping set are tracked and marked by the thread migration state tracker, and threads to be executed in the thread migration mapping set are tracked and marked as migration to be executed state, and threads that have been executed are tracked and marked as migration executed state.

5. The application analysis and supervision method of compatible software architecture according to claim 4 is characterized by: In step S5, the specific steps of the advance software architecture reading and executing the thread are as follows: Step S5-1, calling the advance software architecture to read the threads in the thread migration mapping set whose state is the migration pending state, and executing the threads. After the threads are executed, the thread execution results are returned to the thread migration mapping set; Step S5-2: Use the thread migration state tracker to change the state of the thread that has been executed by the advance software architecture from the migration pending state to the migration executed state.

6. The application analysis and supervision method of compatible software architecture according to claim 5 is characterized by: The specific steps of step S6 are as follows: Step S6-1, calling the lazy software architecture to read the thread execution results in the thread migration mapping set whose state is the migration executed state, and verifying and merging the thread execution results with the corresponding data in its own architecture; Step S6-2: After the lazy software architecture has read the thread execution results in the thread migration mapping set, the threads in the thread migration mapping set whose status is migration executed are destroyed. When the threads in the thread migration mapping set, the advance software architecture and the lazy software architecture are all executed, the task execution is completed, the resources occupied by the thread and the execution lock added to the task in step S2 are released, and the next task is executed.

7. An application analysis and supervision system for compatible software architecture, which is applied to an application analysis and supervision method for compatible software architecture according to any one of claims 1 to 6, characterized in that: The application analysis and supervision system includes a thread supervision module and an execution lock module; The thread supervision module includes a thread log recording unit, a thread resource scheduling unit, a thread parameter configuration unit and a thread execution progress unit; the thread log recording unit is used to record the execution log of the thread, and the thread execution log includes the state change, performance data and abnormal situation of the thread execution; The thread resource scheduling unit is used to manage the memory resources, file handle resources, network connection resources used by the threads, and schedule the execution order of the threads, and allocate CPU time slices based on the thread priorities, dependencies and resource availability; The thread parameter configuration unit is used to set and adjust the execution parameters of the thread; The thread execution progress unit is used to obtain and record the progress of thread execution in real time; The execution lock module includes a task locking unit, an execution lock releasing unit and a timeout processing unit; the task locking unit is used to lock the task to be executed, and through locking, control the subsequent tasks from being queued for execution, so that the compatible software architecture only executes one task at a time, and controls the execution progress of the task in different software architectures; the execution lock releasing unit is used to unlock the task and release resources after the compatible software architecture completes the task execution; the timeout processing unit is used to handle the situation where the execution lock times out on the task. When a task does not release the lock within the specified time, the timeout processing unit will automatically unlock the lock and take corresponding measures to prevent system resources from being occupied for a long time.

8. The application analysis and supervision system compatible with software architecture according to claim 7, characterized in that: The application analysis and supervision system also includes a thread migration judgment module and a thread migration mapping module; The thread migration judgment module includes a performance evaluation unit, a thread migration condition judgment unit and a thread resource matching unit; The performance evaluation unit is used to evaluate the execution efficiency of the current thread on different architectures by comparing the execution performance of the thread on the source architecture and the target architecture; the thread migration condition judgment unit is used to judge whether the thread meets the migration condition according to the thread execution time, resource utilization and architecture performance difference; The thread resource matching unit is used to evaluate the resource situation of the target architecture to ensure that the target architecture has sufficient computing resources and memory space to execute the migrated threads; The thread migration mapping module includes a thread mapping unit and a thread mapping storage unit; The thread mapping unit is used to map threads from the lazy software architecture into the thread migration mapping set; The thread mapping storage unit is used to store threads mapped by the thread mapping unit.

9. The application analysis and supervision system compatible with software architecture according to claim 7, characterized in that: The application analysis and supervision system also includes a thread state tracking and marking module and a thread execution merging module; The thread state tracking and marking module includes a thread state acquisition unit, a state marking unit and a state query unit; The thread status collection unit is used to collect the execution status of threads in the migration mapping set in real time; The state marking unit is used to mark and update the state of the threads in the thread migration mapping set according to the thread execution status; The state query unit is used to provide a query interface, through which the mark information of the thread state is queried; The thread execution merging module includes a thread execution result collecting unit, a result merging unit and a result returning unit; The execution result collection unit is used to collect the result data of each thread after execution in different software architectures; the result merging unit is used to merge the execution results of different threads to form a complete task execution result; The result returning unit is used to centrally return the results of execution of each thread in different software architectures to the thread migration mapping set.

Citation Information

Patent Citations

  • Load balancing method based on program behaviour online analysis under heterogeneous multi-core environment

    CN102184125A

  • Data migration method and data migration system

    CN110532247A