CN116828023A - Multi-android system data acquisition method, device, equipment and medium - Google Patents

Multi-android system data acquisition method, device, equipment and medium Download PDF

Info

Publication number
CN116828023A
CN116828023A CN202210278393.7A CN202210278393A CN116828023A CN 116828023 A CN116828023 A CN 116828023A CN 202210278393 A CN202210278393 A CN 202210278393A CN 116828023 A CN116828023 A CN 116828023A
Authority
CN
China
Prior art keywords
data
socket
identifier
kernel
data acquisition
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202210278393.7A
Other languages
Chinese (zh)
Inventor
杨枫
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Chengdu TD Tech Ltd
Original Assignee
Chengdu TD Tech Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Chengdu TD Tech Ltd filed Critical Chengdu TD Tech Ltd
Priority to CN202210278393.7A priority Critical patent/CN116828023A/en
Publication of CN116828023A publication Critical patent/CN116828023A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/14Session management
    • H04L67/141Setup of application sessions
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/16Implementation or adaptation of Internet protocol [IP], of transmission control protocol [TCP] or of user datagram protocol [UDP]
    • H04L69/161Implementation details of TCP/IP or UDP/IP stack architecture; Specification of modified or new header fields
    • H04L69/162Implementation details of TCP/IP or UDP/IP stack architecture; Specification of modified or new header fields involving adaptations of sockets based mechanisms

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Security & Cryptography (AREA)
  • Stored Programmes (AREA)

Abstract

The application provides a method, a device, equipment and a medium for acquiring data of a multi-android system. The kernel acquires corresponding data according to the data identifier in the data acquisition request, searches for a corresponding socket according to the identifier of the socket in the data acquisition request, and returns the data to the system through the socket. According to the method and the device, through different sockets, data required by different android systems can be returned to the corresponding android systems, and a plurality of systems can acquire kernel data simultaneously.

Description

Multi-android system data acquisition method, device, equipment and medium
Technical Field
The application relates to the field of android system data processing, in particular to a method, a device, equipment and a medium for acquiring data of a multi-android system.
Background
With rapid development of technology, more and more functions can be realized for terminal devices such as smart phones and tablets provided with an android system. The terminal equipment is developed from original equipment which can only be provided with one android system to equipment which can be provided with a plurality of android systems.
In the prior art, for the case that only one android system is installed on a terminal device, when the android system wants to acquire data in a kernel, a data acquisition request can be sent to the kernel, and the kernel can return the data to the system. In the case of installing a plurality of android systems, when the kernel receives a plurality of data acquisition requests, the kernel can only return data to one of the systems.
In summary, in the existing multi-android system data acquisition method, when a plurality of systems acquire kernel data at the same time, only one system can acquire data, and at present, no scheme has yet been available for enabling a plurality of systems to acquire kernel data at the same time.
Disclosure of Invention
The embodiment of the application provides a method, a device, equipment and a medium for acquiring data of a multi-android system, which are used for solving the problem.
In a first aspect, an embodiment of the present application provides a method for acquiring data of a multiple android system, which is applied to a terminal device, where the terminal device may operate multiple android systems, and the method includes:
any android system sends a data acquisition request to the kernel of the terminal equipment, wherein the data acquisition request comprises the identification of a socket corresponding to the system and the data identification of data to be acquired;
the kernel acquires data corresponding to the data identifier according to the data identifier;
and the kernel returns the data corresponding to the data identifier to the system through the socket corresponding to the identifier of the socket.
In one embodiment, the method further comprises:
the kernel judges whether a socket corresponding to the socket identifier exists in the kernel according to the socket identifier;
correspondingly, the returning the data corresponding to the data identifier to the system through the socket corresponding to the identifier of the socket includes:
if the socket corresponding to the socket identifier exists in the kernel, returning the data corresponding to the data identifier to the system through the socket.
In a specific embodiment, the returning the data corresponding to the data identifier to the system through the socket corresponding to the identifier of the socket further includes:
if the socket corresponding to the socket identifier does not exist in the kernel, creating the socket corresponding to the socket identifier, and returning the data corresponding to the data identifier to the system through the socket.
In one embodiment, the method further comprises:
if the data received by the system is wrong, a data error message is sent to the kernel;
and the kernel recreates the socket corresponding to the socket identifier according to the data error message, and returns the data corresponding to the data identifier to the system through the recreated socket.
In a specific embodiment, before the any android system sends the data acquisition request to the kernel of the terminal device, the method further includes:
and creating a socket corresponding to the system in each system, and setting an identifier corresponding to the socket.
In a second aspect, an embodiment of the present application provides a data acquisition device for a multi-android system, including:
the sending module is used for sending a data acquisition request to the kernel of the multi-android system data acquisition device by any android system, wherein the data acquisition request comprises the identification of a socket corresponding to the system and the data identification of data to be acquired;
the processing module is used for the kernel to acquire data corresponding to the data identifier according to the data identifier;
the sending module is further configured to return, by using the kernel, data corresponding to the data identifier to the system through a socket corresponding to the identifier of the socket.
In a specific embodiment, the processing module is further configured to determine, according to the identifier of the socket, whether a socket corresponding to the identifier of the socket exists in the kernel;
the sending module is specifically configured to return, if a socket corresponding to the identifier of the socket exists in the kernel, data corresponding to the data identifier to the system through the socket.
In a third aspect, an embodiment of the present application provides a terminal device, including:
the processor, the memory, the interactive interface;
the memory is used for storing executable instructions of the processor;
wherein the processor is configured to perform the multi-android system data acquisition method of any one of the first aspects via execution of the executable instructions.
In a fourth aspect, an embodiment of the present application provides a readable storage medium, on which a computer program is stored, where the computer program when executed by a processor implements the method for acquiring data in a multi-android system according to any one of the first aspects.
In a fifth aspect, an embodiment of the present application provides a computer program product, including a computer program, where the computer program is executed by a processor to implement the method for acquiring data in a multi-android system according to any one of the first aspect.
According to the method, the device, the equipment and the medium for acquiring the data of the multi-android system, which are provided by the embodiment of the application, when any android system wants to acquire the data in the kernel, a data acquisition request is sent to the kernel. The kernel acquires corresponding data according to the data identifier in the data acquisition request, searches for a corresponding socket according to the identifier of the socket in the data acquisition request, and returns the data to the system through the socket. According to the method and the device, through different sockets, data required by different android systems can be returned to the corresponding android systems, and a plurality of systems can acquire kernel data simultaneously.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions of the prior art, the drawings that are needed in the embodiments or the description of the prior art will be briefly described below, it will be obvious that the drawings in the following description are some embodiments of the present application, and that other drawings can be obtained according to these drawings without inventive effort to a person skilled in the art.
Fig. 1 is a schematic flow chart of a first embodiment of a data acquisition method of a multi-android system provided by the application;
fig. 2 is a schematic flow chart of a second embodiment of a data acquisition method of a multi-android system provided by the application;
fig. 3 is a schematic flow chart of a third embodiment of a data acquisition method of a multi-android system provided by the application;
fig. 4 is a schematic structural diagram of an embodiment of a data acquisition device of a multi-android system according to the present application;
fig. 5 is a schematic structural diagram of a terminal device provided by the present application.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the embodiments of the present application more apparent, the technical solutions of the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present application, and it is apparent that the described embodiments are some embodiments of the present application, but not all embodiments of the present application. All other embodiments, which are made by a person skilled in the art based on the embodiments of the application in light of the present disclosure, are intended to be within the scope of the application.
The terms "first," "second," "third," "fourth" and the like in the description and in the claims and in the above drawings, if any, are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate such that the embodiments of the application described herein may be implemented in sequences other than those illustrated or otherwise described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
Along with rapid development of technology, the development of the android system is more and more, and terminal equipment provided with the android system is more and more, and the development of only one android system to a plurality of android systems can be performed on one terminal equipment. When the android system is running, data in the kernel is usually required to be acquired to display or make statistics to a user.
For terminal equipment provided with an android system, the android system can send a data acquisition request to the kernel, and the kernel can return data required by the system to the system. For the terminal device provided with a plurality of android systems, when the plurality of android systems need to acquire the data in the kernel at the same time, a data acquisition request is sent to the kernel, and the kernel can only return the data to one of the systems, because only one part of the data in the kernel can be acquired by one system, the plurality of systems cannot acquire the kernel data at the same time.
Aiming at the problems in the prior art, the inventor finds that in the process of researching the data acquisition of the multi-android system, the data in the kernel can be acquired simultaneously by a plurality of android systems through different sockets. For multiple android systems, a corresponding socket is created in each system. When the system needs to acquire data, the system sends a data acquisition request to the kernel, the kernel acquires the data according to the data identification in the data acquisition request, and then the corresponding socket searched in the kernel according to the identification of the socket in the data acquisition request returns the data required by the system to the system through the socket in the kernel and the socket in the system. Based on the inventive concept, the multi-android system data acquisition scheme is designed.
The following describes an application scenario of the multi-android system data acquisition method provided by the embodiment of the present application, where an exemplary application scenario may include: terminal equipment, a plurality of android systems and a kernel.
In this application scenario, a plurality of android systems are installed in the terminal device, only one of the systems is used when the user uses the terminal device, and system switching can be performed when other systems are intended to be used. However, no matter which system is used by the user, a system which is not used by other users is also operated on the terminal device, and in general, the system has a setting of acquiring kernel data at regular time, which may be the case that a plurality of systems need to acquire data in the kernel at the same time.
Before the system acquires the kernel data, a corresponding socket is created in each system, and the socket is started to monitor. When the system acquires kernel data for the first time, a data acquisition request is sent to the kernel, wherein the data acquisition request comprises a socket identifier corresponding to the system and a data identifier of the data to be acquired. The kernel acquires corresponding data according to the data identification, and judges whether a socket corresponding to the socket identification exists in the kernel according to the socket identification. Because the data is acquired for the first time, the socket corresponding to the identifier of the socket does not exist in the kernel, the socket corresponding to the identifier of the socket needs to be created in the kernel, after the creation is completed, the socket in the kernel sends a connection request to the socket of the system according to the identifier of the socket of the system, and after the socket of the system monitors the connection request, the socket of the system establishes connection with the socket in the kernel. And the kernel returns the data to the system through the socket of the system and the socket in the kernel.
When the system acquires the kernel data after acquiring the kernel data for the first time, the system sends a data acquisition request to the kernel. The kernel acquires corresponding data according to the data identification, and then judges whether a socket corresponding to the socket identification exists in the kernel according to the socket identification. In general, when kernel data is acquired for the first time, a socket corresponding to the identifier of the socket is already created in the kernel, and the socket of the system is connected with the socket in the kernel, so that the kernel judges that the socket corresponding to the identifier of the socket exists in the kernel, and the data is directly returned to the system through the socket of the system and the socket in the kernel. If judging that the socket corresponding to the identifier of the socket does not exist in the kernel, creating the socket corresponding to the identifier of the socket, and establishing connection between the socket of the system and the socket in the kernel, so that the kernel returns data to the system through the socket of the system and the socket in the kernel.
In addition, if the data received by the system is erroneous, the system may send a data error message to the kernel. The kernel can recreate the socket corresponding to the identifier of the socket, and return the data corresponding to the data identifier to the system through the recreated socket.
It should be noted that, the terminal device is a device capable of installing and running a plurality of android systems. Terminal devices include, but are not limited to, means for communicating via a data connection/network and/or via a wireless interface, e.g., means for a cellular network, a wireless local area network (Wireless Local Area Network, simply: WLAN). Terminal devices arranged to communicate over a wireless interface may be referred to as "wireless communication terminals", "wireless terminals" or "mobile terminals". Examples of mobile terminals include, but are not limited to, satellites or cellular telephones; a personal communications system (Personal Communications System, abbreviated as PCS) terminal that may combine a cellular radiotelephone with data processing, facsimile, and data communications capabilities; personal digital processing (Personal Digital Assistant, abbreviated PDA) that may include a radiotelephone, pager, internet/intranet access, web browser, organizer, calendar, and/or a global positioning system (Global Positioning System, abbreviated GPS) receiver; and conventional laptop and/or palmtop receivers or other electronic devices that include a radiotelephone transceiver. May refer to an access terminal, remote terminal, mobile device, user terminal, wireless communication device. The access terminal may be a cellular telephone, a cordless telephone, a session initiation protocol (Session Initiation Protocol, SIP) phone, a wireless local loop (Wireless Local Loop, WLL) station, a PDA, a handheld device with wireless communication capabilities, a computing device or other processing device connected to a wireless modem, an in-vehicle device, a wearable device, a terminal device in a 5G network, a terminal device in a satellite network or a terminal device in a future evolved PLMN, etc., without limitation.
It should be noted that the application scenario is only an illustration of an application scenario provided by the embodiment of the present application, and the embodiment of the present application does not limit the actual forms of various devices included in the application scenario, and may be set according to actual requirements in specific applications of the scheme.
The technical scheme of the application is described in detail through specific embodiments. It should be noted that the following embodiments may be combined with each other, and the same or similar concepts or processes may not be described in detail in some embodiments.
Fig. 1 is a schematic flow chart of a first embodiment of a method for acquiring data in a multi-android system, as shown in fig. 1, where the method for acquiring data in a multi-android system specifically includes the following steps:
s101: and any android system sends a data acquisition request to the kernel of the terminal equipment.
The terminal equipment is provided with a plurality of android systems, each system can acquire data in the kernel, a socket corresponding to the system is created in each system, and an identifier corresponding to the socket is set.
In this step, after each system creates a socket, when any system wants to acquire data in the kernel, the android system sends a data acquisition request to the kernel of the terminal device through an ioctrol command, where the data acquisition request includes an identifier of the socket corresponding to the system and a data identifier of the data to be acquired.
It should be noted that, the identifier of the socket and the data identifier may be numbers, letters, or a combination of numbers and letters. The identifier of the socket may be a, B, or A1, for example. The data identifier may be 001, 2 or 01A. The embodiment of the application does not limit the identifiers of the sockets and the data identifiers, and can be set according to actual conditions.
S102: and the kernel acquires data corresponding to the data identifier according to the data identifier.
In this step, after the system sends a data acquisition request to the kernel, since the kernel stores data, each data has a data identifier corresponding to the data identifier, and the kernel can acquire the data corresponding to the data identifier according to the data identifier.
Illustratively, data identifier 1 represents central processing unit (Central Processing Unit, CPU for short) runtime and data identifier 2 represents CPU power consumption. Two android systems are installed and operated on the terminal equipment, namely a system A and a system B, the system A and the system B both send data acquisition requests to the kernel, the data in the data acquisition requests sent by the system A are identified as 1, and the data in the data acquisition requests sent by the system B are identified as 2. The kernel obtains the CPU running time and the CPU power consumption according to the data identifiers in the two data obtaining requests.
It should be noted that, the above examples are only examples of obtaining data corresponding to the data identifier by the kernel, and the embodiments of the present application do not limit the data identifier, the number of systems, the correspondence between the data identifier and the data, and may be set and determined according to practical situations.
S103: and the kernel returns the data corresponding to the data identifier to the system through the socket corresponding to the identifier of the socket.
In this step, after the kernel acquires the data corresponding to the data identifier, the kernel searches for the corresponding socket in the kernel according to the identifier of the socket, and then the kernel returns the data corresponding to the data identifier to the system through the socket corresponding to the identifier of the socket.
Illustratively, a data identifier of 1 represents CPU runtime and a data identifier of 2 represents CPU power consumption. Three android systems are installed and operated on the terminal equipment, the three android systems are respectively a first system, a second system and a third system, the identification of a socket in the first system is A, the identification of a socket in the second system is B, the identification of a socket in the third system is C, the first system, the second system and the third system all send data acquisition requests to the inner core, the data identification in the data acquisition requests sent by the first system is 1, the data identification in the data acquisition requests sent by the second system is 2, and the data identification in the data acquisition requests sent by the third system is 2. The kernel obtains the CPU running time and the CPU power consumption according to the data identifiers in the three data obtaining requests. And the kernel searches three sockets in the kernel according to the identifiers of the sockets, and corresponds to the three systems respectively, the kernel returns the CPU running time to the system A through the socket corresponding to the A, the kernel returns the CPU power consumption to the system B through the socket corresponding to the B, and the kernel returns the CPU power consumption to the system C through the socket corresponding to the C.
It should be noted that, the above examples are only examples of data in the system acquisition kernel, and the embodiments of the present application do not limit the data identifier, the number of systems, the identifier of the socket, the correspondence between the data identifier and the data, and may be set and determined according to practical situations.
According to the data acquisition method of the multi-android system, the socket is created in the system, and when the system wants to acquire data in the kernel, a data acquisition request is sent to the kernel. The kernel acquires corresponding data according to the data identifier in the data acquisition request, and searches the corresponding socket in the kernel according to the identifier of the socket in the data acquisition request. And then the data is returned to the system through the socket. Compared with the prior art that the terminal equipment is provided with a plurality of android systems to run, the android systems can acquire data in the kernel at the same time, only one system can acquire the data.
Fig. 2 is a schematic flow chart of a second embodiment of a data acquisition method of a multi-android system, as shown in fig. 2, on the basis of the foregoing embodiment, after a system sends a data acquisition request to a kernel, the data acquisition method of the multi-android system further includes the following steps:
s201: and the kernel judges whether the socket corresponding to the socket identifier exists in the kernel according to the socket identifier.
In this step, after any android system sends a data acquisition request to the kernel, the data acquisition request includes the identifier of the socket corresponding to the system and the data identifier of the data to be acquired, and the kernel determines whether the socket corresponding to the identifier of the socket exists in the kernel according to the identifier of the socket, so that the subsequent kernel determines whether to create the socket according to the determination result.
The core may acquire the data corresponding to the data identifier and determine the order of the sockets corresponding to the identifier of the socket in the core, and then determine whether the sockets corresponding to the identifier of the socket exist in the core; judging whether a socket corresponding to the socket identifier exists in the kernel, and acquiring data corresponding to the data identifier; the method can also be that the data corresponding to the data identifier is obtained and the socket corresponding to the identifier for judging whether the socket exists in the kernel is executed simultaneously. The embodiment of the application does not limit the sequence of the socket corresponding to the data obtained by the kernel and the identifier for judging whether the socket exists in the kernel, and can be set according to actual conditions.
S202: if the socket corresponding to the socket identifier exists in the kernel, returning the data corresponding to the data identifier to the system through the socket.
In the step, after the kernel judges whether the socket corresponding to the socket identifier exists in the kernel, if the socket corresponding to the socket identifier exists in the kernel, the kernel returns the data corresponding to the data identifier to the system through the socket.
It should be noted that, when the system acquires the data of the kernel for the first time, the kernel creates a socket corresponding to the socket identifier, the socket in the kernel establishes a connection with the socket in the system, and the socket and the connection relationship in the kernel are generally maintained. When the system acquires the data in the kernel again, the kernel judges that the socket corresponding to the identification of the socket exists in the kernel, and then the data corresponding to the data identification is returned to the system through the socket in the kernel and the socket in the system.
S203: if the socket corresponding to the socket identifier does not exist in the kernel, the socket corresponding to the socket identifier is created, and then the data corresponding to the data identifier is returned to the system through the socket.
In the step, after the kernel judges whether a socket corresponding to the socket identifier exists in the kernel, if the socket corresponding to the socket identifier does not exist in the kernel, the socket corresponding to the socket identifier is created, and then data corresponding to the data identifier is returned to the system through the socket.
When the system acquires the kernel data for the first time, the socket in the system is in a monitoring state, the kernel judges that the socket corresponding to the socket identifier does not exist in the kernel, the socket corresponding to the socket identifier is created in the kernel, the socket in the kernel sends a connection request to the socket in the system, and after the socket in the system monitors, the socket in the kernel is connected with the socket in the system. And the kernel returns the data corresponding to the data identifier to the system through the socket in the kernel and the socket in the system. After the socket in the kernel and the socket in the system are connected, the socket in the kernel may disappear due to faults and other reasons, and in this case, when the system acquires kernel data, the kernel judges that the socket corresponding to the socket identifier does not exist in the kernel, further creates the socket corresponding to the socket identifier, and returns the data corresponding to the data identifier to the system through the socket.
According to the multi-android system data acquisition method provided by the embodiment, the kernel judges whether a socket corresponding to the identification of the socket exists in the kernel, and when the socket exists, the data is returned to the system directly through the socket; when the socket identification does not exist, the socket corresponding to the socket identification is created, and then the data is returned to the system through the socket, so that the system is effectively ensured to receive the data.
Fig. 3 is a schematic flow chart of a third embodiment of the data acquisition method of the multi-android system, as shown in fig. 3, where the data acquisition method of the multi-android system further includes the following steps:
s301: if the data received by the system is wrong, a data error message is sent to the kernel.
In this step, after the kernel returns data to the system, if the data received by the system is in error, which means that the data transmission fails, the data needs to be retransmitted, and the system will send a data error message to the kernel, so that the subsequent kernel can recreate the socket.
It should be noted that the data error message may be an error code composed of numbers, an error code composed of letters, or an error code composed of numbers and letters. The embodiment of the application does not limit the data error message and can be set according to actual conditions.
S302: the kernel recreates the socket corresponding to the socket identifier according to the data error message, and returns the data corresponding to the data identifier to the system through the recreated socket.
In the step, after the system sends the data error message, the problem may be caused by the socket in the kernel, the kernel recreates the socket corresponding to the socket identifier according to the data error message, the socket in the kernel establishes connection with the socket in the system, and the data corresponding to the data identifier is returned to the system through the recreated socket.
Optionally, the kernel may further retrieve data according to the data identifier, and return the retrieved data to the system through the re-created socket.
According to the multi-android system data acquisition method, when the data is sent in error, the system sends the data error message to the kernel, the kernel reestablishes the socket and sends the data again, and therefore the system is effectively guaranteed to acquire correct data.
The following are examples of the apparatus of the present application that may be used to perform the method embodiments of the present application. For details not disclosed in the embodiments of the apparatus of the present application, please refer to the embodiments of the method of the present application.
Fig. 4 is a schematic structural diagram of an embodiment of a data acquisition device of a multi-android system according to the present application; as shown in fig. 4, the multi-android system data acquisition apparatus 40 includes:
a sending module 41, configured to send, by any android system, a data acquisition request to a kernel of the data acquisition device of the multiple android systems, where the data acquisition request includes an identifier of a socket corresponding to the system and a data identifier of data to be acquired;
the processing module 42 is configured to obtain, by the kernel according to the data identifier, data corresponding to the data identifier;
the sending module 41 is further configured to return, by using the kernel, data corresponding to the data identifier to the system through a socket corresponding to the identifier of the socket.
Further, the processing module 42 is further configured to determine, according to the identifier of the socket, whether a socket corresponding to the identifier of the socket exists in the kernel;
further, the sending module 41 is specifically configured to return, if there is a socket corresponding to the identifier of the socket in the kernel, data corresponding to the data identifier to the system through the socket.
Further, the processing module 42 is further configured to create a socket corresponding to the socket identifier if the socket corresponding to the socket identifier does not exist in the kernel.
Further, the sending module 41 is specifically further configured to return data corresponding to the data identifier to the system through the socket.
Further, the sending module 41 is further configured to send a data error message to the kernel if the data received by the system is in error;
further, the processing module 42 is further configured to recreate a socket corresponding to the socket identifier according to the data error message by the kernel;
further, the sending module 41 is further configured to return, to the system, data corresponding to the data identifier through the socket that is created again.
The multi-android system data acquisition device provided in this embodiment is configured to execute the technical scheme of the terminal device in any one of the foregoing method embodiments, and its implementation principle and technical effect are similar, and are not described herein again.
Fig. 5 is a schematic structural diagram of a terminal device provided by the present application. As shown in fig. 5, the terminal device 50 includes:
a processor 51, a memory 52, and an interaction interface 53;
the memory 52 is configured to store executable instructions of the processor 51;
wherein the processor 51 is configured to execute the technical solution of the terminal device in any of the method embodiments described above via execution of the executable instructions.
Alternatively, the memory 52 may be separate or integrated with the processor 51.
Optionally, when the memory 52 is a device independent from the processor 51, the terminal device 50 may further include:
and a bus for connecting the devices.
The terminal device is configured to execute the technical scheme of the terminal device in any of the foregoing method embodiments, and its implementation principle and technical effects are similar, and are not described herein again.
The embodiment of the application also provides a readable storage medium, on which a computer program is stored, which when being executed by a processor, implements the technical solution provided by any of the foregoing method embodiments.
The embodiment of the application also provides a computer program product, which comprises a computer program, wherein the computer program is used for realizing the technical scheme provided by any one of the method embodiments when being executed by a processor.
Those of ordinary skill in the art will appreciate that: all or part of the steps for implementing the method embodiments described above may be performed by hardware associated with program instructions. The foregoing program may be stored in a computer readable storage medium. The program, when executed, performs steps including the method embodiments described above; and the aforementioned storage medium includes: various media that can store program code, such as ROM, RAM, magnetic or optical disks.
Finally, it should be noted that: the above embodiments are only for illustrating the technical solution of the present application, and not for limiting the same; although the application has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some or all of the technical features can be replaced equivalently; such modifications and substitutions do not depart from the spirit of the application.

Claims (10)

1. A method for acquiring data of a multi-android system, which is applied to a terminal device, wherein the terminal device can operate a plurality of android systems, the method comprising:
any android system sends a data acquisition request to the kernel of the terminal equipment, wherein the data acquisition request comprises the identification of a socket corresponding to the system and the data identification of data to be acquired;
the kernel acquires data corresponding to the data identifier according to the data identifier;
and the kernel returns the data corresponding to the data identifier to the system through the socket corresponding to the identifier of the socket.
2. The method according to claim 1, wherein the method further comprises:
the kernel judges whether a socket corresponding to the socket identifier exists in the kernel according to the socket identifier;
correspondingly, the returning the data corresponding to the data identifier to the system through the socket corresponding to the identifier of the socket includes:
if the socket corresponding to the socket identifier exists in the kernel, returning the data corresponding to the data identifier to the system through the socket.
3. The method according to claim 2, wherein the returning the data corresponding to the data identifier to the system through a socket corresponding to the identifier of the socket further includes:
if the socket corresponding to the socket identifier does not exist in the kernel, creating the socket corresponding to the socket identifier, and returning the data corresponding to the data identifier to the system through the socket.
4. A method according to any one of claims 1 to 3, further comprising:
if the data received by the system is wrong, a data error message is sent to the kernel;
and the kernel recreates the socket corresponding to the socket identifier according to the data error message, and returns the data corresponding to the data identifier to the system through the recreated socket.
5. The method of claim 1, wherein before the any android system sends a data acquisition request to the kernel of the terminal device, the method further comprises:
and creating a socket corresponding to the system in each system, and setting an identifier corresponding to the socket.
6. The utility model provides a many android system data acquisition device which characterized in that includes:
the sending module is used for sending a data acquisition request to the kernel of the multi-android system data acquisition device by any android system, wherein the data acquisition request comprises the identification of a socket corresponding to the system and the data identification of data to be acquired;
the processing module is used for the kernel to acquire data corresponding to the data identifier according to the data identifier;
the sending module is further configured to return, by using the kernel, data corresponding to the data identifier to the system through a socket corresponding to the identifier of the socket.
7. The device of claim 6, wherein the processing module is further configured to determine, according to the identifier of the socket, whether a socket corresponding to the identifier of the socket exists in the core;
the sending module is specifically configured to return, if a socket corresponding to the identifier of the socket exists in the kernel, data corresponding to the data identifier to the system through the socket.
8. A terminal device, comprising:
the processor, the memory, the interactive interface;
the memory is used for storing executable instructions of the processor;
wherein the processor is configured to perform the multi-android system data acquisition method of any one of claims 1 to 5 via execution of the executable instructions.
9. A readable storage medium having stored thereon a computer program, wherein the computer program when executed by a processor implements the multi-android system data acquisition method of any one of claims 1 to 5.
10. A computer program product comprising a computer program for implementing the multi-android system data acquisition method of any one of claims 1 to 5 when executed by a processor.
CN202210278393.7A 2022-03-21 2022-03-21 Multi-android system data acquisition method, device, equipment and medium Pending CN116828023A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210278393.7A CN116828023A (en) 2022-03-21 2022-03-21 Multi-android system data acquisition method, device, equipment and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210278393.7A CN116828023A (en) 2022-03-21 2022-03-21 Multi-android system data acquisition method, device, equipment and medium

Publications (1)

Publication Number Publication Date
CN116828023A true CN116828023A (en) 2023-09-29

Family

ID=88117205

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210278393.7A Pending CN116828023A (en) 2022-03-21 2022-03-21 Multi-android system data acquisition method, device, equipment and medium

Country Status (1)

Country Link
CN (1) CN116828023A (en)

Similar Documents

Publication Publication Date Title
US7076269B2 (en) Radio communication system for notifying incommunicable state, and device and method used for the system
CN104660678A (en) Application data sharing method and device
CN112040071B (en) Number protection method, device and system and number calling method and device
CN111245709A (en) Message pushing method and device, electronic equipment and storage medium
CN114465998A (en) Multi-device file transmission method and device, terminal device and readable storage medium
CN112835632B (en) Method and equipment for calling end capability and computer storage medium
US20230413247A1 (en) Method for communication processing, terminal device, and non-transitory computer-readable storage medium
CN106155842B (en) A kind of data migration method and device
CN114741400A (en) Data synchronization and analysis method, device and terminal equipment
CN111294729A (en) Network switching method, device, equipment and medium of mobile terminal
CN111314555B (en) Communication method and device of mobile terminal, mobile terminal and storage medium
CN102523271B (en) Terminal and communication method and system thereof
CN116828023A (en) Multi-android system data acquisition method, device, equipment and medium
CN112433719B (en) Compiling method and device of application program, electronic equipment and storage medium
CN106375993B (en) Electronic equipment, electronic equipment searching system and method
CN111767451B (en) Searching method, electronic device and computer readable storage medium
CN109890016B (en) Method and device for supporting multiple applications to access Bluetooth equipment
CN114124275A (en) Time synchronization method, device, equipment and storage medium
CN112948225A (en) Link monitoring method and device, monitoring equipment and storage medium
JP2009284460A (en) Multimedia transmission system with cross-platform mobile communication platform
KR20130064418A (en) Server and method for providing matarials of template to device, and the device
CN111355852A (en) Method and equipment for acquiring contact number based on block chain
CN113542350B (en) Browsing state event downloading method, USIM, terminal and storage medium
CN113079550B (en) Mobile terminal control method and device and electronic equipment
CN112054933B (en) Network interrupt information processing method, device, terminal and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination