A synchronization method, device, equipment and medium based on Android / Linux fusion system
By creating a new kernel interface and unified user interface in the android/linux fusion system, data synchronization between android user mode and linux user mode is realized, solving the problems of high resource consumption and poor universality in the existing technology, and improving synchronization Efficiency and stability.
Patent Information
- Application Number
- CN202411196494.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-29
- Publication Date
- 2024-11-15
- Estimated Expiration
- 2044-08-29
AI Technical Summary
In the Android/linux converged system, the existing technology cannot achieve efficient and easy-to-use data synchronization, mainly because the linux user cannot use semaphores normally, the file lock synchronization versatility is poor, and the socket synchronization scheme has high resource consumption and low performance. question.
Create a new kernel interface, kernel compatibility layer, and unified user mode interface, through these interfaces, drive data synchronization between the Android/linux converged system and the Linux user mode, and use the function of sys_futex/sys_sem_xxx/sys_semxxx system call.
It realizes efficient data synchronization, and solves the problems of universality, system resource consumption and stability, and has better performance and resource management than the existing technology.
Smart Images

Figure CN118733678B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology and provides a synchronization method, device, equipment and medium based on an Android / Linux fusion system. Background Art
[0002] As we all know, synchronization technology is a technology used in computer science to control the execution order between multiple tasks (processes). For a single operating system (OS), the underlying OS generally provides a common and efficient synchronization method for semaphores, such as the sem_xxx series of interfaces in the Android user state, and the sem_xxx series and semxxx series of interfaces in the Linux user state. In addition, if performance, versatility, resource consumption, and other issues are not considered, synchronization methods can also be formed based on various technologies such as file locks and sockets.
[0003] However, for the Android / Linux fusion system, although the Android user state can use semaphores normally, in the Linux user state, due to the incompatibility of runtime libraries (bionic library, glibc library), different implementation principles of Android / Linux semaphores, and different Android / Linux semaphore kernel interfaces, the Linux user state cannot use the semaphore function normally; the file lock synchronization solution has poor versatility and requires many prerequisites before it can be used; the socket synchronization solution has problems such as the trouble of creating and destroying socket services on both sides, increased system resource consumption, complex creation scheme, and low performance.
[0004] Therefore, how to achieve efficient and easy-to-use data synchronization based on the Android / Linux fusion system has become a problem that needs to be solved urgently. Summary of the invention
[0005] The present application provides a synchronization method, device, equipment and medium based on an Android / Linux fusion system, which is used to solve the problem that the prior art cannot achieve efficient and easy-to-use data synchronization based on an Android / Linux fusion system.
[0006] On the one hand, a synchronization method based on an Android / Linux fusion system is provided, the method comprising:
[0007] In the Android / Linux fusion system, a new kernel interface, a kernel compatibility layer and a unified user mode interface are created;
[0008] According to the new kernel interface, the kernel compatibility layer and the unified user state interface, the Android user state and the Linux user state in the Android / Linux fusion system are driven to synchronize data.
[0009] Optionally, the step of creating a new kernel interface, a kernel compatibility layer, and a unified user mode interface in the Android / Linux fusion system includes:
[0010] In the android / linux fusion system, a new syscall kernel interface, a kernel compatibility layer based on glibc version, a unified user state interface based on glibc version, and a unified user state interface based on bionic version are created.
[0011] Optionally, the step of creating a new syscall kernel interface, a kernel compatibility layer based on glibc version, a unified user state interface based on glibc version, and a unified user state interface based on bionicversion in the android / linux fusion system includes:
[0012] Creating a new syscall interface in the android kernel of the android / linux fusion system;
[0013] Creating a unified user state interface based on the bionic version in the Android user state of the Android / Linux fusion system;
[0014] A kernel compatibility layer based on the glibc version and a unified user mode interface based on the glibc version are created in the linux user mode of the android / linux fusion system.
[0015] Optionally, the step of driving the Android user state and the Linux user state in the Android / Linux fusion system to synchronize data according to the new kernel interface, the kernel compatibility layer and the unified user state interface includes:
[0016] For any process, according to the new syscall interface, obtain the key corresponding to the virtual address of any process;
[0017] According to the correspondence between each process and each key, a hash table is obtained;
[0018] According to the hash table, process search, process control and process virtual address mapping are performed.
[0019] Optionally, before driving the Android user state and the Linux user state in the Android / Linux fusion system to synchronize data according to the new kernel interface, the kernel compatibility layer and the unified user state interface, the method further includes:
[0020] According to the glibc version-based kernel compatibility layer, the new syscall interface is used in the Linux user state of the Android / Linux fusion system.
[0021] Optionally, before driving the Android user state and the Linux user state in the Android / Linux fusion system to synchronize data according to the new kernel interface, the kernel compatibility layer and the unified user state interface, the method further includes:
[0022] According to the unified user state interface based on the bionic version, a unified synchronization framework interface is provided in the Android user state of the Android / Linux fusion system, and the interface function is maintained in the Android user state.
[0023] Optionally, before driving the Android user state and the Linux user state in the Android / Linux fusion system to synchronize data according to the new kernel interface, the kernel compatibility layer and the unified user state interface, the method further includes:
[0024] According to the unified user state interface based on glibc version, a unified synchronization framework interface is provided in the Linux user state of the Android / Linux fusion system, and the interface function is maintained in the Linux user state.
[0025] On the one hand, a synchronization device based on an Android / Linux fusion system is provided, the device comprising:
[0026] An interface creation unit, used to create a new kernel interface, a kernel compatibility layer and a unified user mode interface in the Android / Linux fusion system;
[0027] A data synchronization unit is used to drive the Android user state and the Linux user state in the Android / Linux fusion system to synchronize data according to the new kernel interface, the kernel compatibility layer and the unified user state interface.
[0028] On the one hand, an electronic device is provided, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein any one of the above methods is implemented when the processor executes the computer program.
[0029] In one aspect, a computer storage medium is provided, on which computer program instructions are stored, and when the computer program instructions are executed by a processor, any of the above methods is implemented.
[0030] Compared with the prior art, the beneficial effects of this application are:
[0031] In this application, since the "new kernel interface, kernel compatibility layer and unified user state interface" are created to drive the Android user state and the Linux user state in the Android / Linux fusion system to synchronize data, compared with the existing technology, this application can solve the problems of versatility, system resource consumption, stability, etc. while ensuring efficient data synchronization by integrating the functions of the three types of system calls sys_futex / sys_sem_xxx / sys_semxxx. BRIEF DESCRIPTION OF THE DRAWINGS
[0032] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the related technologies, the drawings required for use in the embodiments or the related technical descriptions are briefly introduced below. Obviously, the drawings described below are only the embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying any creative work.
[0033] Figure 1 A schematic diagram of an application scenario provided for an embodiment of the present application;
[0034] Figure 2 A schematic diagram of a synchronization structure based on an Android / Linux fusion system provided in an embodiment of the present application;
[0035] Figure 3 A schematic diagram of a synchronization method based on an Android / Linux fusion system provided in an embodiment of the present application;
[0036] Figure 4 A schematic diagram of a performance test evaluation report provided in an embodiment of the present application;
[0037] Figure 5 A schematic diagram of a synchronization device based on an Android / Linux fusion system provided in an embodiment of the present application.
[0038] Markings in the figure: 10 - synchronization device based on Android / Linux fusion system, 101 - processor, 102 - memory, 103 - I / O interface, 104 - database, 50 - synchronization device based on Android / Linux fusion system, 501 - interface creation unit, 502 - data synchronization unit, 503 - function assignment unit. DETAILED DESCRIPTION
[0039] In order to make the purpose, technical scheme and advantages of the present application clearer, the technical scheme in the embodiment of the present application will be clearly and completely described below in conjunction with the drawings in the embodiment of the present application. Obviously, the described embodiment is only a part of the embodiment of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in the field without making creative work are within the scope of protection of the present application. In the absence of conflict, the embodiments in the present application and the features in the embodiments can be combined with each other arbitrarily. In addition, although the logical order is shown in the flow chart, in some cases, the steps shown or described can be performed in an order different from that here.
[0040] As we all know, synchronization technology is a technology used in computer science to control the execution order between multiple tasks (processes). For a single operating system (OS), the underlying OS generally provides a common and efficient synchronization method for semaphores, such as the sem_xxx series of interfaces in the Android user state, and the sem_xxx series and semxxx series of interfaces in the Linux user state. In addition, if performance, versatility, resource consumption, and other issues are not considered, synchronization methods can also be formed based on various technologies such as file locks and sockets.
[0041] However, for the Android / Linux fusion system, although the Android user state can use semaphores normally, in the Linux user state, due to the incompatibility of runtime libraries (bionic library, glibc library), different implementation principles of Android / Linux semaphores, and different Android / Linux semaphore kernel interfaces, the Linux user state cannot use the semaphore function normally; the file lock synchronization solution has poor versatility and requires many prerequisites before it can be used; the socket synchronization solution has problems such as the trouble of creating and destroying socket services on both sides, increased system resource consumption, complex creation scheme, and low performance.
[0042] Based on this, the embodiment of the present application provides a synchronization method based on an Android / Linux fusion system, in which, first, a new kernel interface, a kernel compatibility layer, and a unified user state interface can be created in the Android / Linux fusion system; then, the Android user state and the Linux user state in the Android / Linux fusion system can be driven to synchronize data according to the new kernel interface, the kernel compatibility layer, and the unified user state interface. Therefore, in the embodiment of the present application, since the Android user state and the Linux user state in the Android / Linux fusion system are driven to synchronize data through the created "new kernel interface, kernel compatibility layer, and unified user state interface", the present application can solve the problems of versatility, system resource consumption, stability, etc. while ensuring efficient data synchronization by integrating the functions of the three types of system calls sys_futex / sys_sem_xxx / sys_semxxx.
[0043] After introducing the design ideas of the embodiments of the present application, the following briefly introduces the application scenarios to which the technical solutions of the embodiments of the present application can be applied. It should be noted that the application scenarios introduced below are only used to illustrate the embodiments of the present application and are not limited. In the specific implementation process, the technical solutions provided by the embodiments of the present application can be flexibly applied according to actual needs.
[0044] like Figure 1 FIG. 1 is a schematic diagram of an application scenario provided by an embodiment of the present application. The application scenario may include a synchronization device 10 based on an Android / Linux fusion system.
[0045] Among them, the synchronization device 10 based on the android / linux fusion system can be used for data synchronization in the android / linux fusion system, for example, it can be a personal computer (PC), a server and a laptop. The synchronization device 10 based on the android / linux fusion system may include one or more processors 101, a memory 102, an I / O interface 103 and a database 104. Specifically, the processor 101 may be a central processing unit (CPU) or a digital processing unit, etc. The memory 102 may be a volatile memory, such as a random-access memory (RAM); the memory 102 may also be a non-volatile memory, such as a read-only memory, a flash memory, a hard disk drive (HDD) or a solid-state drive (SSD); or the memory 102 is any other medium that can be used to carry or store the desired program code in the form of instructions or data structures and can be accessed by a computer, but is not limited thereto. The memory 102 may be a combination of the above memories. The memory 102 may store some program instructions of the synchronization method based on the android / linux fusion system provided in the embodiment of the present application. When these program instructions are executed by the processor 101, they can be used to implement the steps of the synchronization method based on the android / linux fusion system provided in the embodiment of the present application, so as to solve the problem that the prior art cannot realize efficient and easy-to-use data synchronization based on the android / linux fusion system. The database 104 may be used to store data such as the android / linux fusion system, the virtual address of each process, the key, and the hash table involved in the solution provided in the embodiment of the present application.
[0046] In the embodiment of the present application, the synchronization device 10 based on the android / linux fusion system can obtain the interface creation program input by the staff through the I / O interface 103, and then the processor 101 of the synchronization device 10 based on the android / linux fusion system will implement efficient and easy-to-use data synchronization based on the android / linux fusion system according to the program instructions of the synchronization method based on the android / linux fusion system provided by the embodiment of the present application in the memory 102. In addition, the data of the android / linux fusion system, the virtual address, key, hash table and other data of each process can also be stored in the database 104.
[0047] like Figure 2 As shown, it is a schematic diagram of a synchronization structure based on an Android / Linux fusion system provided by an embodiment of the present application, wherein a newsyscall interface is created in the Android kernel state (Android kernel) of the Android / Linux fusion system, a unified user state interface (new.so) based on the bionic version is created in the Android user state of the Android / Linux fusion system, and a kernel compatibility layer (k-compat layer) based on the glibc version and a unified user state interface (new.so) based on the glibc version are created in the Linux user state of the Android / Linux fusion system.
[0048] Specifically, based on the new syscall interface, the virtual address of the process can be used to form a key, and then a hash table is formed with the key and thread / process resources. Furthermore, multiple processes can use the same virtual address to obtain process resources from the hash table, thereby controlling the running state of the process (running, waiting). In addition, since the virtual address of each process is completely independent, it is necessary to implement the virtual address correspondence between processes in the new syscall. Furthermore, combined with the functions of process search, control, and process virtual address mapping, the new syscall interface has the process synchronization function provided by the native operating system.
[0049] Since the new syscall interface is designed based on the Android kernel, it is very convenient to encapsulate and use the new syscall interface in the Android user state. Furthermore, in order to correctly use the new syscall function under the glibc environment, in the application, the kernel compatibility layer k-compat layer can be used in the Linux user state like the Android user state (compatible with the bionic mechanism).
[0050] In addition, the unified user-mode interface new.so can provide a unified synchronization framework interface in the Android / Linux fusion system (Android user mode, Linux user mode), and maintain the uniqueness of the interface function and implementation in the user mode. As a result, the same functions can be used between the Android system and the Linux system.
[0051] Of course, the method provided in the embodiment of the present application is not limited to Figure 1The application scenarios shown can also be used in other possible application scenarios, and the embodiments of the present application are not limited thereto. Figure 1 The functions that can be realized by each device in the application scenario shown will be described in the subsequent method embodiments, and will not be described in detail here. Below, the method of the embodiment of the present application will be introduced in conjunction with the accompanying drawings.
[0052] like Figure 3 As shown, it is a flow chart of a synchronization method based on an Android / Linux fusion system provided in an embodiment of the present application. The method is applied to an Android+Linux fusion system and can be Figure 1 The method is executed by the synchronization device 10 based on the Android / Linux fusion system. Specifically, the process of the method is described as follows.
[0053] Step 301: In the Android / Linux fusion system, a new kernel interface, a kernel compatibility layer and a unified user mode interface are created.
[0054] Specifically, in the Android / Linux fusion system, a new syscall kernel interface, a kernel compatibility layer based on the glibc version, a unified user mode interface based on the glibc version, and a unified user mode interface based on the bionic version can be created.
[0055] That is, Figure 2 As shown, a newsyscall interface can be created in the Android kernel of the Android / Linux fusion system; a unified user state interface based on the bionic version can be created in the Android user state of the Android / Linux fusion system; a kernel compatibility layer based on the glibc version and a unified user state interface based on the glibc version can be created in the Linux user state of the Android / Linux fusion system.
[0056] Step 302: According to the new kernel interface, kernel compatibility layer and unified user state interface, the Android user state and the Linux user state in the Android / Linux fusion system are driven to synchronize data.
[0057] In an embodiment of the present application, after creating new kernel interfaces, kernel compatibility layers, and unified user-mode interfaces, functions may also be assigned to these new kernel interfaces, kernel compatibility layers, and unified user-mode interfaces.
[0058] Specifically, for any process, the key corresponding to the virtual address of any process can be obtained according to the new syscall interface; then, the hash table can be obtained according to the correspondence between each process and each key. Furthermore, when performing data synchronization later, the process search, process control, and process virtual address mapping operations can be performed directly according to the hash table, that is, multiple processes can use the same virtual address to obtain process resources from the hash table to control the running status (running, waiting), etc. of the process.
[0059] As for the kernel compatibility layer k-compat layer, since the new syscall interface is designed based on the Android kernel, in the embodiment of the present application, the new syscall interface can be used normally (compatible with the Bionic mechanism) in the Linux user mode of the Android / Linux fusion system directly based on the kernel compatibility layer based on the glibc version, just like Bionic. That is, the purpose of the kernel compatibility layer of the glibc version is to provide a mechanism compatible with Bionic so that the staff can use the new syscall normally.
[0060] Regarding the unified user state interface, a unified user state interface is constructed in both the Android user state and the Linux user state of the Android / Linux fusion system.
[0061] Therefore, for the unified user state interface in the Android user state, a unified synchronization framework interface can be provided in the Android user state of the Android / Linux fusion system according to the unified user state interface based on the bionic version, and the interface function can be maintained in the Android user state.
[0062] For the unified user state interface in the Linux user state, a unified synchronization framework interface can be provided in the Linux user state of the Android / Linux fusion system according to the unified user state interface based on the glibc version, and the interface function can be maintained in the Linux user state.
[0063] Furthermore, after the new kernel interface, kernel compatibility layer and unified user state interface are created and given functions, the data synchronization between the Android user state and the Linux user state in the Android / Linux fusion system can be driven directly according to the new syscall kernel interface, the kernel compatibility layer based on the glibc version, the unified user state interface based on the glibc version and the unified user state interface based on the bionic version.
[0064] like Figure 2 As shown, in the Android user state, the user can access the new syscall interface created in the Android kernel through the unified user state interface of the bionic version based on the key written by the Android program, so as to obtain the process resources corresponding to the key from the hash table. Similarly, in the Linux user state, the user can access the new syscall interface created in the Android kernel through the unified user state interface of the glibc version based on the Linux program written in the key, so as to obtain the process resources corresponding to the key from the hash table. That is, both the Android user state and the Linux user state can obtain / store data from the new syscall interface to achieve data synchronization between the Android user state and the Linux user state. Specific embodiment 1:
[0066] The performance test and evaluation are carried out by taking file lock fcntl synchronization, socket synchronization and new syscall synchronization (the synchronization method of this application) as examples. Figure 4 The figure shows a schematic diagram of a performance test evaluation report provided in an embodiment of the present application.
[0067] from Figure 4 It can be seen that a total of 64 sets of data were counted, among which the socket synchronization method is the slowest synchronization method. In addition, since the performance test process fluctuates with the operation of the system, it is necessary to comprehensively observe the mean and median of fcntl synchronization, socket synchronization and new syscall synchronization. Based on this, it can be seen that the synchronization speed of the two solutions of fcntl synchronization and newsyscall synchronization is not much different.
[0068] However, since fcntl synchronization is on the file system, it must rely on file creation, deletion, opening, closing, sharing, permissions, etc. Therefore, compared with fcntl synchronization and socket synchronization, the new syscall synchronization technology of this application can solve the problems of versatility, system resource consumption, stability, etc. while ensuring efficient data synchronization performance.
[0069] To sum up, since the "new kernel interface, kernel compatibility layer and unified user state interface" are created to drive the Android user state and the Linux user state in the Android / Linux fusion system to synchronize data, compared with the prior art, this application can solve the problems of versatility, system resource consumption, stability, etc. while ensuring efficient data synchronization by integrating the functions of the three types of system calls sys_futex / sys_sem_xxx / sys_semxxx.
[0070] Based on the same inventive concept, the embodiment of the present application provides a synchronization device 50 based on an Android / Linux fusion system, such as Figure 5 As shown, the synchronization device 50 based on the Android / Linux fusion system includes:
[0071] The interface creation unit 501 is used to create a new kernel interface, a kernel compatibility layer and a unified user mode interface in the Android / Linux fusion system;
[0072] The data synchronization unit 502 is used to drive the Android user state and the Linux user state in the Android / Linux fusion system to synchronize data according to the new kernel interface, kernel compatibility layer and unified user state interface.
[0073] Optionally, the interface creation unit 501 is further configured to:
[0074] In the Android / Linux fusion system, create a new syscall kernel interface, a kernel compatibility layer based on the glibc version, a unified userland interface based on the glibc version, and a unified userland interface based on the bionic version.
[0075] Optionally, the interface creation unit 501 is further configured to:
[0076] Create a new syscall interface in the Android kernel of the Android / Linux fusion system;
[0077] Create a unified user mode interface based on the bionic version in the Android user mode of the Android / Linux fusion system;
[0078] Create a kernel compatibility layer based on glibc version and a unified user mode interface based on glibc version in the Linux user mode of the Android / Linux fusion system.
[0079] Optionally, the synchronization device 50 based on the Android / Linux fusion system further includes a function assignment unit 503, which is used to:
[0080] For any process, according to the new syscall interface, obtain the key corresponding to the virtual address of any process;
[0081] According to the correspondence between each process and each key, a hash table is obtained;
[0082] According to the hash table, process search, process control and process virtual address mapping are performed.
[0083] Optionally, the function assigning unit 503 is further configured to:
[0084] According to the kernel compatibility layer based on glibc version, the new syscall interface is used in the Linux user mode of the Android / Linux fusion system.
[0085] Optionally, the function assigning unit 503 is further configured to:
[0086] According to the unified user state interface based on the bionic version, a unified synchronization framework interface is provided in the Android user state of the Android / Linux fusion system, and the interface function is maintained in the Android user state.
[0087] Optionally, the function assigning unit 503 is further configured to:
[0088] According to the unified user state interface based on glibc version, a unified synchronization framework interface is provided in the Linux user state of the Android / Linux fusion system, and the interface function is maintained in the Linux user state.
[0089] The synchronization device 50 based on the android / linux fusion system can be used to perform Figure 3 The method executed in the embodiment shown in the figure, therefore, for the functions that can be realized by each functional module of the synchronization device 50 based on the android / linux fusion system, reference can be made to Figure 3 The description of the illustrated embodiment is not repeated in detail.
[0090] In some possible implementations, various aspects of the method provided in the present application may also be implemented in the form of a program part, which includes a program code. When the program part is run on a computer device, the program code is used to enable the computer device to execute the steps of the method according to various exemplary embodiments of the present application described above in this specification. For example, the computer device may execute the following steps: Figure 3 The method performed in the illustrated embodiment.
[0091] Those skilled in the art can understand that all or part of the steps of the above method embodiment can be completed by hardware related to program instructions, and the aforementioned program can be stored in a computer-readable storage medium. When the program is executed, the steps of the above method embodiment are executed; and the aforementioned storage medium includes: various media that can store program codes, such as mobile storage devices, read-only memory (ROM), random access memory (RAM), magnetic disks or optical disks. Alternatively, if the above integrated unit of the present invention is implemented in the form of a software function module and sold or used as an independent part, it can also be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the embodiment of the present invention can be essentially or in other words, the part that contributes to the prior art can be embodied in the form of a software part, which is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the methods described in various embodiments of the present invention. And the aforementioned storage medium includes: various media that can store program codes, such as mobile storage devices, ROM, RAM, magnetic disks or optical disks.
[0092] Although the preferred embodiments of the present application have been described, those skilled in the art may make additional changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications falling within the scope of the present application.
[0093] Obviously, those skilled in the art can make various changes and modifications to the present application without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is also intended to include these modifications and variations.
Claims
1. A synchronization method based on an Android / Linux fusion system, characterized in that: The method comprises: In the android / linux fusion system, a new kernel interface, a kernel compatibility layer and a unified user state interface are created; wherein, in the android / linux fusion system, the new kernel interface, the kernel compatibility layer and the unified user state interface are created, including: creating a new syscall interface in the android kernel of the android / linux fusion system; creating a unified user state interface based on the bionic version in the android user state of the android / linux fusion system; creating a kernel compatibility layer based on the glibc version and a unified user state interface based on the glibc version in the linux user state of the android / linux fusion system; According to the new kernel interface, the kernel compatibility layer and the unified user state interface, the Android user state in the Android / Linux fusion system is driven to synchronize data with the Linux user state; wherein, according to the new kernel interface, the kernel compatibility layer and the unified user state interface, the Android user state in the Android / Linux fusion system is driven to synchronize data with the Linux user state, including: according to the new kernel interface, the kernel compatibility layer and the unified user state interface, the Android user state in the Android / Linux fusion system is driven to synchronize data with the Linux user state; wherein, in the Android user state, the user writes to the key based on the Android program, and accesses the new syscall interface created in the Android kernel through the unified user state interface of the bionic version, so as to obtain the process resources corresponding to the key from the hash table; in the Linux user state, the user writes to the key based on the Linux program, and calls the kernel compatibility layer based on the glibc version through the unified user state interface of the glibc version, so as to access the new syscall interface created in the Android kernel, so as to obtain the process resources corresponding to the key from the hash table.
2. The method according to claim 1, characterized in that The step of driving the Android user state and the Linux user state in the Android / Linux fusion system to synchronize data according to the new kernel interface, the kernel compatibility layer and the unified user state interface comprises: For any process, according to the new syscall interface, obtain the key corresponding to the virtual address of any process; According to the correspondence between each process and each key, a hash table is obtained; According to the hash table, process search, process control and process virtual address mapping are performed.
3. The method according to claim 1, characterized in that Before driving the Android user state and the Linux user state in the Android / Linux fusion system to synchronize data according to the new kernel interface, the kernel compatibility layer and the unified user state interface, the method further includes: According to the glibc version-based kernel compatibility layer, the new syscall interface is used in the Linux user state of the Android / Linux fusion system.
4. The method according to claim 1, characterized in that Before driving the Android user state and the Linux user state in the Android / Linux fusion system to synchronize data according to the new kernel interface, the kernel compatibility layer and the unified user state interface, the method further includes: According to the unified user state interface based on the bionic version, a unified synchronization framework interface is provided in the Android user state of the Android / Linux fusion system, and the interface function is maintained in the Android user state.
5. The method according to claim 1, characterized in that Before driving the Android user state and the Linux user state in the Android / Linux fusion system to synchronize data according to the new kernel interface, the kernel compatibility layer and the unified user state interface, the method further includes: According to the unified user state interface based on glibc version, a unified synchronization framework interface is provided in the Linux user state of the Android / Linux fusion system, and the interface function is maintained in the Linux user state.
6. A synchronization device based on an Android / Linux fusion system, characterized in that: The device comprises: An interface creation unit is used to create a new kernel interface, a kernel compatibility layer and a unified user state interface in the Android / Linux fusion system; wherein, the creation of the new kernel interface, the kernel compatibility layer and the unified user state interface in the Android / Linux fusion system includes: creating a new syscall interface in the Android kernel of the Android / Linux fusion system; creating a unified user state interface based on the bionic version in the Android user state of the Android / Linux fusion system; creating a kernel compatibility layer based on the glibc version and a unified user state interface based on the glibc version in the Linux user state of the Android / Linux fusion system; A data synchronization unit, for driving the Android user state and the Linux user state in the Android / Linux fusion system to perform data synchronization according to the new kernel interface, the kernel compatibility layer and the unified user state interface; wherein, driving the Android user state and the Linux user state in the Android / Linux fusion system to perform data synchronization according to the new kernel interface, the kernel compatibility layer and the unified user state interface comprises: driving the Android user state and the Linux user state in the Android / Linux fusion system to perform data synchronization according to the new kernel interface, the kernel compatibility layer and the unified user state interface; wherein, in the Android user state, a user writes into a key based on an Android program, and accesses a new syscall interface created in the Android kernel through a unified user state interface of the bionic version, so as to obtain a process resource corresponding to the key from a hash table; and in the Linux user state, a user writes into a key based on a Linux program, and calls a kernel compatibility layer based on the glibc version through a unified user state interface of the glibc version, so as to access a new syscall interface created in the Android kernel, so as to obtain a process resource corresponding to the key from a hash table.
7. An electronic device, characterized in that: The device comprises: A memory for storing program instructions; A processor is used to call the program instructions stored in the memory, and execute any method according to claims 1-5 according to the obtained program instructions.
8. A storage medium, characterized in that: The storage medium stores computer-executable instructions, and the computer-executable instructions are used to enable a computer to execute any one of the methods in claims 1-5.
