Data transfer method and device, computer program product and readable storage medium

The method and device allow for the normal transfer of memory information from abnormal communication processor systems to a storage space, enhancing diagnostic capabilities and stability testing by transferring memory information through an application processor.

CN119127812APending Publication Date: 2024-12-13SPREADTRUM COMMUNICATION (SHANGHAI) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411082991.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-07
Publication Date
2024-12-13

AI Technical Summary

Technical Problem

Existing systems in communication processors of smart terminal devices may become abnormal, making it impossible to dump memory information and locate the cause of abnormalities during system stability tests.

Method used

A method and device that transfers memory information from a target system in a communication processor to a preset storage space via an application processor, enabling normal transfer even when the target system fails, using a configuration file and lock mechanisms to manage device nodes and read/write operations.

Benefits of technology

Enables the efficient transfer and storage of memory information for diagnostic purposes, facilitating the identification of system abnormalities and improving stability testing efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119127812A_ABST
    Figure CN119127812A_ABST
Patent Text Reader

Abstract

The invention discloses a data transfer method and device, a computer program product and a readable storage medium. The data transfer method comprises the steps that it is determined that memory information of a target system is subjected to transfer operation; the target system is a system in a communication processor; acquiring memory information of the target system from a kernel; and transferring the memory information of the target system to a preset storage space. By adopting the scheme, when the system in the communication processor is abnormal, the memory information of the abnormal system can be transferred.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of Android technology, and in particular to a data transfer method and device, a computer program product, and a readable storage medium. Background Art

[0002] When smart terminal devices are used for a long time, some systems in the communication processor (CP) may be abnormal. By collecting the system's memory information, locating the system's abnormal information, and then optimizing the abnormal information in subsequent version upgrades, the system stability of smart terminal devices can be improved.

[0003] However, when some systems in the communication processor are abnormal, it may be impossible to dump memory information. Summary of the invention

[0004] The purpose of the present invention is at least to provide a data transfer method and device, a computer program product, and a readable storage medium, which can transfer the memory information of the system with the abnormality when an abnormality occurs in the system of the communication processor.

[0005] In a first aspect, the present invention provides a data transfer method, comprising: determining to transfer memory information of a target system; the target system is a system in a communication processor; obtaining the memory information of the target system from a kernel; and transferring the memory information of the target system to a preset storage space.

[0006] When it is determined to transfer the memory information of the target system, the stored memory information of the target system is obtained from the kernel, and the memory information of the target system is stored in a preset storage space. The memory information of the target system is transferred through the application processor, so when the target system fails, the memory information of the target system can be transferred normally.

[0007] Optionally, the data transfer method also includes: obtaining and parsing a configuration file, the configuration file including memory information of at least one first system; the first system is a system in the communication processor, and the first system includes the target system; and storing the memory information of the at least one first system in the kernel.

[0008] Optionally, the determining to perform a transfer operation on the memory information of the target system includes: detecting that an abnormality occurs in the target system, and determining to perform a transfer operation on the memory information of the target system.

[0009] Optionally, determining to perform a transfer operation on the memory information of the target system includes: receiving a transfer instruction, and determining to perform a transfer operation on the memory information of the target system; the transfer instruction includes identification information of the target system.

[0010] Based on the dump instructions input by the tester, the memory information of the target system is dumped. A control interface for the dump operation is provided, and the tester can determine which systems' memory information is dumped according to the needs.

[0011] Optionally, obtaining the memory information of the target system from the kernel includes: write-locking a target device node corresponding to the target system; setting a memory information number corresponding to the target system; releasing the write lock of the target device node and opening the target device node; read-locking the target device node; reading the memory information corresponding to the target system based on the memory information number; and releasing the read lock of the target device.

[0012] Optionally, after storing the memory information of the at least one first system in the kernel, it also includes: receiving a read instruction, the read instruction being used to read the memory information of the target system; performing a read lock on the target device node, and reading the memory information of the target system from the kernel; and releasing the read lock on the target device node.

[0013] Optionally, the configuration file is an extensible markup language xml file.

[0014] Optionally, storing the memory information of the at least one first system in the kernel includes: obtaining the memory information of the at least one first system from the xml file; write-locking the first device node and writing the memory information of the at least one first system into the kernel; the first device node is the device node corresponding to the first system; and releasing the write lock on the first device node.

[0015] In a second aspect, the present invention provides a data transfer device, comprising: a determination unit, used to determine to perform a transfer operation on the memory information of a target system; the target system is a system in a communication processor; an acquisition unit, used to obtain the memory information of the target system from a kernel; and a transfer unit, used to transfer the memory information of the target system to a preset storage space.

[0016] In a third aspect, the present invention further provides a computer-readable storage medium, which is a non-volatile storage medium or a non-transient storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the steps of any of the above-mentioned data transfer methods are executed.

[0017] In a fourth aspect, the present invention further provides a computer program product, comprising a computer program / instruction, which implements the steps of any of the above-mentioned data transfer methods when executed by a processor.

[0018] In a fifth aspect, the present invention also provides another data transfer device, comprising a memory and a processor, wherein the memory stores a computer program that can be executed on the processor, and the processor executes the steps of any of the above-mentioned data transfer methods when running the computer program. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] Figure 1 is a flow chart of a data transfer method in an embodiment of the present invention;

[0020] Figure 2 is a structural diagram of a software system in an embodiment of the present invention;

[0021] Figure 3 It is a structural schematic diagram of a data transfer device in an embodiment of the present invention. DETAILED DESCRIPTION

[0022] In the prior art, when performing a system stability test on an intelligent terminal device, some systems in the communication processor may have stability problems, which may cause these systems to become abnormal. By dumping the memory information of the system where the abnormality occurs, the cause of the abnormality can be located. However, when an abnormality occurs, the system may not be able to dump its corresponding memory information, which may result in the inability to locate the cause of the abnormality.

[0023] In the embodiment of the present invention, when it is determined to perform a transfer operation on the memory information of the target system, the already stored memory information of the target system is obtained from the kernel, and the memory information of the target system is stored in a preset storage space. The transfer of the memory information of the target system is implemented by the application processor, so when a failure occurs in the target system, the memory information of the target system can be normally transferred.

[0024] In order to make the above-mentioned objects, features and beneficial effects of the present invention more obvious and easy to understand, specific embodiments of the present invention are described in detail below with reference to the accompanying drawings.

[0025] In a specific implementation, the data transfer method provided in the following steps 101 to 103 may be executed by an application processor (AP) having a data processing function in the smart terminal device.

[0026] In the following embodiments, unless otherwise stated, the "system" may refer to a hardware system in a communication processor. Specifically, the "system" described in the following embodiments may include a modem system, a sensor system, a positioning system, and the like.

[0027] The embodiment of the present invention provides a data transfer method, referring to Figure 1 , the following is a detailed description through specific steps.

[0028] In the embodiment of the present invention, the following data transfer method can be regarded as a software system, and the software system can be run by an application processor (AP) in the intelligent terminal device. In other words, the following data transfer method is run in the application processor.

[0029] Step 101, determining to perform a transfer operation on the memory information of the target system.

[0030] In the embodiment of the present invention, the target system may be any system in the communication processor. The number of the target systems may be one or more.

[0031] In a specific implementation, the terminal device can detect whether to trigger the transfer operation of the memory information of the target system. When it is detected that the transfer operation of the memory information of the target system is triggered, the following step 102 can be executed.

[0032] In some embodiments, the tester can interact with the shell and input a transfer instruction through the human-machine input interface of the intelligent terminal device, and the transfer instruction can include the identification information of the target system. When the transfer instruction is received, it can be determined to trigger the transfer operation of the memory information of the target system.

[0033] In other embodiments, when an abnormality is detected in a certain system, the system where the abnormality occurs can be determined to be a target system, thereby triggering a transfer operation of the memory information of the target system.

[0034] Step 102, obtaining memory information of the target system from the kernel.

[0035] In the embodiment of the present invention, the kernel may store memory information of at least one first system. The first system mentioned above is any system in the communication processor. The first system may include a target system.

[0036] That is to say, the memory information of multiple systems may be pre-stored in the kernel. When it is determined to perform a transfer operation on the memory information of the target system, the memory information of the target system may be obtained from the kernel.

[0037] In an embodiment of the present invention, a configuration file may be obtained in advance, and the obtained configuration file may be parsed. The configuration file may include memory information of at least one first system. Thus, by parsing the configuration file, the memory information of at least one first system may be obtained, and the memory information of at least one first system may be stored in the kernel.

[0038] In a specific implementation, after acquiring the memory information of the first system from the configuration information, the first device node corresponding to the first system may be write-locked, the memory information of the first system may be written into the kernel, and then the write lock of the first device node may be released.

[0039] In a specific implementation, a device node can be an interface between an application running in an application processor and a kernel driver. In a Linux system, a device node is a special file type located in the / dev directory. In a Linux system, all physical devices are abstracted as files, and the files of these hardware devices are represented by device nodes.

[0040] In a specific implementation, the steps of obtaining the configuration file and parsing the configuration file may be performed before step 102 , or may also be performed before step 101 .

[0041] In some embodiments, the tester may generate a configuration file in advance and store the configuration file before performing a system stability test on the smart terminal device. During the initialization phase of the stability test on the smart terminal device, the configuration file is read and parsed. The tester may configure the memory information of the first system, the number of the first system, the identification information of the first system, etc. in the configuration file.

[0042] In some embodiments, the configuration file may be an Extensible Markup Language (XML) format file.

[0043] In a specific implementation, the XML parsing function can be implemented by calling the expat external library to parse the configuration file in XML format.

[0044] In an embodiment of the present invention, when the memory information of the target system is obtained from the kernel, the target device node corresponding to the target system may be write-locked first. After that, the memory information number corresponding to the target system is set, the write lock on the target device node is released, and the target device node is opened. The target device node is read-locked, and the memory information corresponding to the target system is read from the memory based on the memory information number, and the read lock on the target device is released.

[0045] Step 103: transfer the memory information of the target system to a preset storage space.

[0046] In the embodiment of the present invention, a storage space may be preset, and the storage space may be an external storage space independent of the communication processor, or may be a storage space inside the communication processor.

[0047] After obtaining the memory information of the target system from the memory, the memory information of the target system can be transferred to the preset storage space. The tester can obtain the memory information of the target system from the preset storage space through shell interactive instructions.

[0048] In an embodiment of the present invention, a tester can input a shell instruction in a Linux operating system, and the shell instruction is a read instruction, and the read instruction can be used to read the memory information of the target system. After receiving the read instruction, the target device node can be read locked, and the memory information of the target system can be read from the kernel. After completing the reading of the memory information of the target system, the read lock of the target device node is released. After completing the reading of the memory information of the target system, the read memory information of the target system can be output, so that the tester can intuitively know the memory information of the target system, thereby improving the efficiency of locating the cause of the failure of the target system.

[0049] For example, the read instruction is used to read the memory information of the modem system. After receiving the read instruction, the target device node corresponding to the modem system is read locked. The memory information corresponding to the modem system is read, and after the reading is completed, the read lock of the target device node corresponding to the modem system is released.

[0050] In the embodiment of the present invention, the software system can be divided into a driving module, a parsing module and a debugging module according to functions.

[0051] Reference Figure 2 , a structural diagram of a software system in an embodiment of the present invention is given. The software system includes a driver module 201, a parsing module 202 and a debugging module 203. In some scenarios, the driver module 201 can be called a kernel state, and the parsing module 202 and the debugging module 203 can be called a user state.

[0052] In a specific implementation, the driver module 201 can expose the memory information of the first system to the debugging module 203 in the following directory: first device node / dev / cp_dump. The driver module 201 can implement read operations, write operations, close operations, input and output control operations, etc. on the first device node.

[0053] The above-mentioned parsing module 202 can be used to obtain and parse the configuration file, and store the memory information of the first system in the configuration file in the kernel.

[0054] The above-mentioned debugging module 203 can be coupled to the human-machine input interface of the intelligent terminal device, and then receive the shell command input by the tester, obtain the memory information of the target system, and transfer it to the preset storage space.

[0055] Therefore, the tester can use shell instructions to determine which target system or systems to select and transfer memory information; or, the tester can select the memory information of one or some target systems to facilitate the tester to locate the target system where the abnormality occurs and then determine the cause of the abnormality.

[0056] In summary, the memory information of the target system is transferred through the application processor, so when a failure occurs in the target system, the memory information of the target system can be transferred normally.

[0057] Reference Figure 3 , a data transfer device 30 in an embodiment of the present invention is provided, comprising: a determination unit 301, an acquisition unit 302 and a transfer unit 303, wherein:

[0058] A determination unit 301 is used to determine whether to perform a transfer operation on the memory information of a target system; the target system is a system in a communication processor;

[0059] An acquisition unit 302 is used to acquire the memory information of the target system from the kernel;

[0060] The transfer unit 303 is used to transfer the memory information of the target system to a preset storage space.

[0061] In a specific implementation, the specific execution process of the above-mentioned determination unit 301, acquisition unit 302 and transfer unit 303 can correspond to step 101 to step 103, which will not be repeated here.

[0062] In a specific implementation, the above-mentioned data transfer device 30 may correspond to a chip with a data processing function in a terminal device, or to a chip module with a data processing function in a terminal device, or to a terminal device.

[0063] In a specific implementation, each module / unit included in each device or product described in the above embodiments may be a software module / unit or a hardware module / unit, or may be partly a software module / unit and partly a hardware module / unit.

[0064] For example, for each device or product applied to or integrated in a chip, each module / unit contained therein may be implemented in the form of hardware such as circuits, or at least some of the modules / units may be implemented in the form of software programs, which run on a processor integrated inside the chip, and the remaining (if any) modules / units may be implemented in the form of hardware such as circuits; for each device or product applied to or integrated in a chip module, each module / unit contained therein may be implemented in the form of hardware such as circuits, and different modules / units may be located in the same component (such as a chip, circuit module, etc.) or different components of the chip module, or at least some of the modules / units may be implemented in the form of software programs. The element can be implemented in the form of a software program, which runs on a processor integrated inside the chip module, and the remaining (if any) modules / units can be implemented in the form of hardware such as circuits; for various devices and products applied to or integrated in the terminal, the various modules / units contained therein can be implemented in the form of hardware such as circuits, and different modules / units can be located in the same component (for example, chip, circuit module, etc.) or in different components in the terminal, or, at least some modules / units can be implemented in the form of a software program, which runs on a processor integrated inside the terminal, and the remaining (if any) modules / units can be implemented in the form of hardware such as circuits.

[0065] An embodiment of the present invention also provides a computer-readable storage medium, which is a non-volatile storage medium or a non-transient storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the data transfer method provided in any of the above embodiments are executed.

[0066] The present invention also provides a computer program product, including a computer program / instruction, which implements the steps of the data transfer method provided in any of the above embodiments when executed by a processor.

[0067] An embodiment of the present invention further provides another device, including a memory and a processor, wherein the memory stores a computer program that can be executed on the processor, and when the processor runs the computer program, the steps of the data transfer method provided in any of the above embodiments are executed.

[0068] A person skilled in the art may understand that all or part of the steps in the various methods of the above embodiments may be completed by instructing the relevant hardware through a program, and the program may be stored in a computer-readable storage medium, which may include: ROM, RAM, disk or CD, etc.

[0069] Although the present invention is disclosed as above, the present invention is not limited thereto. Any person skilled in the art can make various changes and modifications without departing from the spirit and scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the scope defined by the claims.

Claims

1. A data transfer method, characterized in that: include: Determine to transfer the memory information of the target system; The target system is a system in a communication processor; Obtaining memory information of the target system from the kernel; The memory information of the target system is transferred to a preset storage space.

2. The data transfer method according to claim 1, characterized in that: Also includes: Acquire and parse a configuration file, wherein the configuration file includes memory information of at least one first system; The first system is a system in the communication processor, and the first system includes the target system; Memory information of the at least one first system is stored in the kernel.

3. The data transfer method according to claim 2, characterized in that: The step of determining to transfer the memory information of the target system includes: It is detected that an abnormality occurs in the target system, and it is determined to perform a transfer operation on the memory information of the target system.

4. The data transfer method according to claim 2, characterized in that: The step of determining to transfer the memory information of the target system includes: A transfer instruction is received, and a transfer operation is determined to be performed on the memory information of the target system; the transfer instruction includes identification information of the target system.

5. The data transfer method according to claim 4, characterized in that: The acquiring the memory information of the target system from the kernel includes: Write-locking the target device node corresponding to the target system; Set the memory information number corresponding to the target system; Release the write lock of the target device node and open the target device node; Read-locking the target device node; and reading the memory information corresponding to the target system based on the memory information number; Releases the read lock on the target device.

6. The data transfer method according to claim 2, characterized in that: After storing the memory information of the at least one first system in the kernel, the method further includes: Receive a read instruction, where the read instruction is used to read memory information of the target system; The target device node is read-locked, and the memory information of the target system is read from the kernel; and the read lock on the target device node is released.

7. The data transfer method according to claim 2, characterized in that: The configuration file is an extensible markup language xml file.

8. The data transfer method according to claim 7, characterized in that: The storing the memory information of the at least one first system in the kernel includes: Acquire memory information of the at least one first system from the xml file; Write-locking a first device node, and writing memory information of the at least one first system into the kernel; the first device node is a device node corresponding to the first system; Release the write lock on the first device node.

9. A data transfer device, characterized in that: include: A determination unit, used for determining to perform a transfer operation on the memory information of the target system; The target system is a system in a communication processor; An acquisition unit, used for acquiring memory information of the target system from the kernel; The transfer unit is used to transfer the memory information of the target system to a preset storage space.

10. A computer-readable storage medium, wherein the computer-readable storage medium is a non-volatile storage medium or a non-transient storage medium, and a computer program is stored thereon, wherein: When the computer program is executed by a processor, the steps of the data transfer method according to any one of claims 1 to 8 are executed.

11. A computer program product comprising a computer program / instructions, characterized in that When the computer program / instructions are executed by a processor, the steps of the data transfer method according to any one of claims 1 to 8 are implemented.

12. A data transfer device, comprising a memory and a processor, wherein the memory stores a computer program that can be run on the processor, characterized in that: When the processor runs the computer program, the processor executes the steps of the data transfer method according to any one of claims 1 to 8.