Memory data processing method and device, equipment and storage medium

By using the proc file system and mmap function in the Android system to generate random memory addresses and write verification information, it solves the problem of difficulty in copyright protection of live broadcast content, improves the security of data writing, and prevents tampering and piracy of illegal products. Live streaming happens.

CN118779096APending Publication Date: 2024-10-15WUHAN OUYUE ONLINE TV CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202410756844.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-13
Publication Date
2024-10-15

AI Technical Summary

Technical Problem

The copyright protection of live broadcast content is difficult to effectively implement, resulting in a large number of pirated live streams spreading on the Internet. Black producers tamper with data collection methods to conduct pirated streams, infringing on the legitimate rights and interests of copyright owners.

Method used

By using the proc file system path in the Android system to read the memory information of the current process, calling the system function mmap to allocate memory, and generating an intermediate memory address based on random numbers, writing the verification memory information to the intermediate memory address, improving the efficiency of data writing. Concealment to prevent illegal tampering.

Benefits of technology

It enhances the security of data writing, prevents illegal tampering, effectively protects the copyright of live broadcast content, and reduces the occurrence of pirated live streams.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118779096A_ABST
    Figure CN118779096A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a memory data processing method and device, equipment and a storage medium. The concealment of memory data writing can be provided. The method comprises the following steps: determining a target path of a target file system corresponding to a target application program; reading verification memory information of a current process corresponding to the target application program and a memory address of a target memory based on the target path, wherein the target memory is a memory which is distributed by calling a system function mmap and is written into the verification memory information; generating an intermediate memory address corresponding to the target memory according to a first random number and the memory address of the target memory; and writing the verification memory information into the intermediate memory address according to a second random number.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of data processing, and in particular to a method, device, equipment and storage medium for processing memory data. Background Art

[0002] With the rapid development of the Internet live broadcast industry, the copyright issue of live broadcast content has become increasingly prominent. At present, although some technical means have been used to protect the copyright of live broadcast, there are still a large number of pirated live broadcast streams that are spread wantonly on the Internet, seriously damaging the legitimate rights and interests of copyright owners.

[0003] As the confrontation between live streaming platforms and the black industry escalates, the current basic data collection methods are often easily tampered with by the black industry, and then the live streaming is stolen based on the tampered content. Summary of the invention

[0004] The embodiments of the present invention provide a method, device, equipment and storage medium for processing memory data, which can improve the concealment of memory data writing.

[0005] A first aspect of the present invention provides a method for processing memory data, comprising:

[0006] Determine a target path of a target file system corresponding to a target application;

[0007] Reading the verification memory information of the current process corresponding to the target application and the memory address of the target memory based on the target path, wherein the target memory is allocated by calling the system function mmap and the verification memory information is written into the memory;

[0008] Generate an intermediate memory address corresponding to the target memory according to the first random number and the memory address of the target memory;

[0009] The verification memory information is written into the intermediate memory address according to the second random number.

[0010] A second aspect of the present invention provides a method for processing memory data, comprising:

[0011] A determination module, used to determine a target path of a target file system corresponding to a target application;

[0012] A reading module, used for reading the verification memory information of the current process corresponding to the target application and the memory address of the target memory based on the target path, wherein the target memory is allocated by calling the system function mmap and the verification memory information is written into the memory;

[0013] A generating module, configured to generate an intermediate memory address corresponding to the target memory according to a first random number and a memory address of the target memory;

[0014] A read-write module is used to write the verification memory information into the intermediate memory address according to a second random number.

[0015] In a possible design, the read-write module is specifically used for:

[0016] Generate a long integer of a preset byte length according to the second random number, and determine the long integer as initial data;

[0017] Merging the initial data with the verification memory information to obtain merged write information;

[0018] The merged write information is written into the intermediate memory address, and a preset timer is started to perform cyclic increment counting on the merged write information.

[0019] In a possible design, the read-write module is further used to read the process memory information of the target application according to the target path;

[0020] Determine a memory address set including a preset name based on the process memory information, wherein the preset name is associated with the target memory;

[0021] Monitoring a target value of a target memory address read in each cycle in a plurality of cycles, wherein the target memory address is any one of the memory address sets;

[0022] Eliminate the memory addresses whose target values ​​read between any two adjacent cycles in the memory address set do not conform to a preset rule, so as to obtain the intermediate memory address;

[0023] The verification memory information is read based on the intermediate memory address, and the verification memory information is reported to the platform server.

[0024] In a possible design, the target value of the target memory address read in each cycle in the multiple cycles monitored by the read / write module includes:

[0025] Reading a target value of the target memory address at intervals of the preset byte length within a first cycle, wherein the first cycle is any one cycle within a plurality of cycles;

[0026] The target value of the target memory address is read at intervals of the preset byte length within a second cycle, and the second cycle is a cycle adjacent to the first cycle among the multiple cycles.

[0027] In a possible design, the read / write module removes the memory addresses whose target values ​​read between any two adjacent cycles in the memory address set do not conform to a preset rule, so as to obtain the intermediate memory address, including:

[0028] Determine a first target value corresponding to a preset byte set in the first cycle and a second target value corresponding to the preset byte set in the second cycle, wherein the preset byte set is a byte set corresponding to any preset byte length in the target memory address;

[0029] Memory addresses whose difference between the first target value and the second target value is not a preset threshold in the memory address set are eliminated to obtain the intermediate memory address.

[0030] In a possible design, the reading module is specifically used for:

[0031] Read each line of content in the target file system through the target path;

[0032] Parsing each line of content to obtain the memory address and name information included in each line of content;

[0033] Determine the SO file whose name information includes a shared object SO suffix;

[0034] The memory address of the SO file and the name information of the SO file are determined as the verification memory information.

[0035] In a possible design, the read-write module is also used for:

[0036] Determine the theoretical loading order of SOs in the target application;

[0037] Get the actual loading order of SO in the target application;

[0038] If the theoretical loading order does not match the actual loading order, it is determined that the target application has been tampered with by a black industry.

[0039] A third aspect of an embodiment of the present invention provides an electronic device, including a memory and a processor, wherein the processor is used to implement the steps of the method for processing memory data as described in the first aspect when executing a computer management program stored in the memory.

[0040] A fourth aspect of an embodiment of the present invention provides a computer-readable storage medium on which a computer management program is stored. When the computer management program is executed by a processor, the steps of the method for processing memory data as described in the first aspect above are implemented.

[0041] In summary, it can be seen that in the embodiments provided by the present application, the memory data processing device can read the memory information of the current process through the path of the proc file system of the Android system, and read the memory address of the write verification memory information allocated by the system function mmap, and generate an intermediate memory address according to the first random number and the memory address of the target memory, and write the verification memory information to the intermediate memory address according to the second random number. Therefore, the memory address for writing the verification memory information is randomly generated, and after 1 writes the data, this address is not recorded, so that this address will not have an address reference in our entire program. At the same time, when writing the intermediate memory address, it is written according to the random number, which can make the writing of data safer and not easily tampered by black industries. BRIEF DESCRIPTION OF THE DRAWINGS

[0042] Figure 1 A schematic diagram of a flow chart of a method for processing memory data provided by an embodiment of the present invention;

[0043] Figure 2 A schematic diagram of multiple lines of content read by a memory data processing device provided in an embodiment of the present invention;

[0044] Figure 3 A schematic diagram of a virtual structure of a memory data processing device provided by an embodiment of the present invention;

[0045] Figure 4 A schematic diagram of the hardware structure of a memory data processing device provided by an embodiment of the present invention;

[0046] Figure 5 A schematic diagram of an embodiment of an electronic device provided by an embodiment of the present invention;

[0047] Figure 6 A schematic diagram of an embodiment of a computer-readable storage medium provided in an embodiment of the present invention. DETAILED DESCRIPTION

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

[0049] In the following description, specific embodiments of the present invention will be described with reference to steps and symbols performed by one or more computers, unless otherwise stated. Therefore, these steps and operations will be mentioned several times as being performed by a computer, and computer execution referred to herein includes operations by a computer processing unit of electronic signals representing data in a structured form. This operation converts the data or maintains it at a location in the computer's memory system, which can be reconfigured or otherwise change the operation of the computer in a manner familiar to testers in the field. The data structure maintained by the data is a physical location in the memory, which has specific characteristics defined by the data format. However, the principles of the present invention are described in the above text, which does not represent a limitation, and testers in the field will understand that the various steps and operations described below can also be implemented in hardware.

[0050] The principles of the present invention operate with many other general or special purpose computing, communication environments or configurations. Examples of well-known computing systems, environments and configurations suitable for use with the present invention may include, but are not limited to, handheld phones, personal computers, servers, multiprocessor systems, microcomputer-based systems, mainframe computers, and distributed computing environments, including any of the above systems or devices.

[0051] The terms "first", "second", and "third" in the present invention are used to distinguish different objects rather than to describe a specific order. In addition, the terms "include", "have", and any variations thereof are intended to cover non-exclusive inclusions.

[0052] In the Android system, different Android applications (referring to applications running in the Android system) will have different native layer SO functions and will be loaded into the memory at the same time. Therefore, the memory layout of each different application loaded into the SO must be different. Therefore, different Android applications can be distinguished based on obtaining the layout information of the SO in the memory. If an Android application developed by the black industry is used to play the video of the live broadcast platform, the live broadcast platform server can identify the black industry based on the memory layout information. At the same time, based on the memory layout information, the collected information can be hidden in the memory, so that it is hidden during collection and reported to the live broadcast platform server through policy search when reporting.

[0053] The following describes the memory data processing method from the perspective of the memory data processing device. Figure 1 , Figure 1 A flowchart of a method for processing memory data provided by an embodiment of the present invention includes:

[0054] 101. Determine a target path of a target file system corresponding to a target application.

[0055] In this embodiment, the memory data processing device can determine the target path of the target file system corresponding to the target application. The target application is an application in the Android system as an example. The target file system is the proc file system in the Android system, wherein proc is a pseudo file system that does not occupy disk space and is mounted to the memory by the kernel. It provides functions such as kernel configuration and process status output. In addition, the maps file under the directory name pid under the proc file system stores information about the process memory module. The target path is proc / self / maps. The method for determining the target path is not specifically limited here. It can be pre-stored in advance or obtained according to the user's instructions. Of course, it can also be obtained in other ways, as long as the target path of the target file system can be determined.

[0056] 102. Read the verification memory information of the current process corresponding to the target application and the memory address of the target memory based on the target path.

[0057] In this embodiment, after determining the target path, the memory data processing device can read the verification memory information of the current process corresponding to the target application and the memory address of the target memory based on the target path, wherein the target memory is allocated by calling the system function mmap and the verification memory information is written. For ease of understanding, how to read the verification memory information and how to determine the memory address of the target memory are described below:

[0058] 1. Read and verify the memory address;

[0059] The memory data processing device reads the verification memory information corresponding to the target application based on the target path, including:

[0060] Read each line of the target file system through the target path;

[0061] Parse each line of content to obtain the memory address and name information included in each line of content;

[0062] Determine the SO file whose name information includes the shared object SO suffix;

[0063] The memory address of the SO file and the name information of the SO file are determined as the verification memory information.

[0064] In this embodiment, the memory data processing device can read the proc / self / maps file to read each line of content therein, and each line of content is a unit. Figure 2 , Figure 2 A schematic diagram of each line of content read by the memory data processing device provided in an embodiment of the present invention, where each line of information is as follows:

[0065] The first column 201 represents the virtual address range corresponding to this part of the image file;

[0066] The second column 202 represents the operations that can be performed on this part of the image file, x-execute, p-private, r-read, w-write;

[0067] The third column 203 represents the offset. The offset of this part of the image file in the process space;

[0068] The fourth column 204 represents the major device number and the minor device number of the image device;

[0069] The fifth column 205 represents the node number of the image file;

[0070] The sixth column 206 represents the absolute path of the image file.

[0071] The memory data processing device can parse each line of content, obtain the memory address and name information included in each line of content, and find out all the name information including the .so suffix, which is the path information of the corresponding SO. Through file name filtering, the required information in the memory can be found, such as all SO file lists of the target application, all Java heap memory, and all memory mapping areas.

[0072] It should be noted that the memory space is composed of: the code segment, data segment, BSS segment, heap, file mapping and anonymous mapping of the executable file, including vdso, library mapping, mmap mapped memory, stack, etc. Each type of data will be allocated to a different segment. For example, the SO corresponding to the target application will be allocated to the code segment. When obtaining the memory information, all SO information recorded by the target application can be obtained.

[0073] It should also be noted that for the Android system, memory is allocated from low address to high address, so when multiple SOs are loaded into the memory, the first loaded SO will be at the low address of the memory, and the later loaded SO will be at the high address of the memory. For the target application, the memory data processing device can deliberately set the theoretical loading order of the SO in the target application, so that the target application can be judged whether it has been tampered with or cheated by the black industry based on the actual loading order of the SO in the subsequent memory layout information. If the theoretical recorded order matches the actual loading order, it means that the target application has not been tampered with or cheated by the black industry. Otherwise, it is determined that it has been tampered with or cheated by the black industry.

[0074] 2. Determine the memory address of the target memory;

[0075] By analyzing the memory process, the memory allocated by calling the system mmap interface will be [anon] or the specific name may contain a file name similar to [anon:mmap]. If you need to allocate a section of memory to write hidden data, you can allocate memory by calling the system function mmap, and then write the data to be hidden, as follows:

[0076] void*mmap(void*addr,size_t length,int prot,int flags,int fd,off_toffset);

[0077] Parameter Description:

[0078] addr: input parameter, if the address is null, an address will be specified, if not null, the address will be used as the starting address of the mapping area;

[0079] length: the size of the mapping area;

[0080] prot: access properties, generally use PROT_READ, PROT_WRITE, PROT_READ|PROT_WRITE;

[0081] flags: This parameter determines whether the mapping update is visible to other processes mapping the same area;

[0082] fd: mapped file handle;

[0083] offset: The default value is 0, which means that the entire file is mapped. The offset is unknown and is an integer multiple of 4K when needed.

[0084] The specific memory data processing device can allocate a target memory of a preset size to the target application by calling the following function:

[0085] uint64_t*arr=(T*)mmap(NULL,size,PROT_READ|PROT_WRITE,

[0086] MAP_PRIVATE|MAP_ANONYMOUS,-1,0);

[0087] Thus, the memory data processing device can read the memory address of the target memory when reading the proc / self / maps process memory information.

[0088] 103. Generate an intermediate memory address corresponding to the target memory according to the first random number and the memory address of the target memory.

[0089] In this embodiment, after determining the target memory, the memory data processing device can generate an intermediate memory address corresponding to the target memory according to the first random number and the memory address of the target memory. That is, the memory data processing device can use the first random number to generate an intermediate memory address between the target memory address and the target memory address + the size of the target memory.

[0090] 104. Write the verification memory information into the intermediate memory address according to the second random number.

[0091] In this embodiment, the memory data processing device can generate a long integer of a preset byte length (the preset byte length can be, for example, 8 bytes, and of course it can also be adjusted according to actual conditions. The preset byte length that appears later is explained by taking 8 bytes as an example) according to the second random number, and determine the long integer as the initial data, and merge the initial data with the verification memory information to obtain the merged write information, and write the merged write information to the intermediate memory address (that is, write the verification memory information after 8 bytes). When verifying the memory information during writing, the preset timer can be started to increment the content of the intermediate memory address by 1 (or other values). The preset timer can be set to increment the content of the intermediate memory address by 1 every 100 milliseconds, and the cycle continues. When the preset timer ends, the cycle starts to increment from 0.

[0092] In one embodiment, the memory data processing device further performs the following operations:

[0093] Read the process memory information of the target application according to the target path;

[0094] Determine a memory address set including a preset name based on the process memory information, where the preset name is associated with the target memory;

[0095] Monitor a target value of a target memory address read in each cycle in a plurality of cycles, where the target memory address is any memory address in a memory address set;

[0096] Eliminate the memory addresses whose target values ​​read between any two adjacent cycles in the memory address set do not conform to the preset rules to obtain the intermediate memory addresses;

[0097] The memory information is read and verified based on the intermediate memory address, and the memory information is reported to the platform server.

[0098] In this embodiment, the memory data processing device can read the proc / self / maps process memory information, and filter out a memory address set with a preset name (the preset name is associated with the target memory, refer to the above description of the target memory, the preset name can be [anon] or the specific name may include a file name similar to [anon:mmap]) from the read process memory information. If the process memory information includes a memory with a file name of the preset name, the memory is the memory allocated by calling mmap. At this time, the memory data processing device can record the memory address of the memory, and finally form a memory address set;

[0099] After obtaining the memory address set, the memory data processing device monitors all memory addresses in the memory address set, monitors the target value of any memory address in the memory address set read in each cycle in multiple cycles, specifically, reads the target data of the target memory address at intervals of a preset byte length in a first cycle, the first cycle is any cycle in multiple cycles, and reads the target data of the target memory address at intervals of a preset byte length in a second cycle, the second cycle is a cycle adjacent to the first cycle in multiple cycles, that is, for all mmap memory addresses, reads the value therein every 8 bytes (preset byte length), monitors all the read values, and traverses all 8-byte values ​​every 110 milliseconds (110 milliseconds is defined as one cycle);

[0100] The memory data processing device can determine the first target data corresponding to the preset byte set in the first cycle and the second target value corresponding to the preset byte set in the second cycle. The preset byte set is a byte set corresponding to any preset byte length in the target memory address, that is, the target memory address includes multiple 8 bytes. Since the value therein is read every 8 bytes, the target memory address also includes the values ​​corresponding to the multiple preset byte sets. After traversing all the 8-byte values ​​every 110 milliseconds, it can be determined whether the difference between the new value generated by the preset byte set in the first cycle and the value generated by the preset byte set in the second cycle is a preset threshold. If not, the target memory address is eliminated and the execution is repeated until only one address value is screened out, which is the preset threshold value incremented every 110 milliseconds, indicating that the memory address where the hidden data (that is, the verification memory information) was previously written is found, that is, the intermediate memory address;

[0101] After determining the intermediate memory address, the memory data processing device can extract the verification memory information in the intermediate memory address and report the verification memory information to the platform server.

[0102] In summary, it can be seen that in the embodiments provided by the present application, the memory data processing device can read the memory information of the current process through the path of the proc file system of the Android system, and read the memory address of the write verification memory information allocated by the system function mmap, and generate an intermediate memory address according to the first random number and the memory address of the target memory, and write the verification memory information to the intermediate memory address according to the second random number. Therefore, the memory address for writing the verification memory information is randomly generated, and after 1 writes the data, this address is not recorded, so that this address will not have an address reference in our entire program. At the same time, when writing the intermediate memory address, it is written according to the random number, which can make the writing of data safer and not easily tampered by black industries.

[0103] The above describes the embodiment of the present invention from the perspective of a method for processing memory data. The following describes the embodiment of the present invention from the perspective of a device for processing memory data.

[0104] See also Figure 3 , a virtual structural diagram of a memory data processing device according to an embodiment of the present invention, the memory data processing device 300 comprises:

[0105] The determination module 301 is used to determine the target path of the target file system corresponding to the target application;

[0106] A reading module 302 is used to read the verification memory information of the current process corresponding to the target application and the memory address of the target memory based on the target path, wherein the target memory is allocated by calling the system function mmap and the verification memory information is written into the memory;

[0107] A generating module 303, configured to generate an intermediate memory address corresponding to the target memory according to a first random number and a memory address of the target memory;

[0108] The read / write module 304 is configured to write the verification memory information into the intermediate memory address according to the second random number.

[0109] In a possible design, the read-write module 304 is specifically used for:

[0110] Generate a long integer of a preset byte length according to the second random number, and determine the long integer as initial data;

[0111] Merging the initial data with the verification memory information to obtain merged write information;

[0112] The merged write information is written into the intermediate memory address, and a preset timer is started to perform cyclic increment counting on the merged write information.

[0113] In a possible design, the read-write module 304 is further used to read the process memory information of the target application according to the target path;

[0114] Determine a memory address set including a preset name based on the process memory information, wherein the preset name is associated with the target memory;

[0115] Monitoring a target value of a target memory address read in each cycle in a plurality of cycles, wherein the target memory address is any one of the memory address sets;

[0116] Eliminate the memory addresses whose target values ​​read between any two adjacent cycles in the memory address set do not conform to a preset rule, so as to obtain the intermediate memory address;

[0117] The verification memory information is read based on the intermediate memory address, and the verification memory information is reported to the platform server.

[0118] In a possible design, the target value of the target memory address read in each cycle in the multiple cycles monitored by the read / write module 304 includes:

[0119] Reading a target value of the target memory address at intervals of the preset byte length within a first cycle, wherein the first cycle is any one cycle within a plurality of cycles;

[0120] The target value of the target memory address is read at intervals of the preset byte length within a second cycle, and the second cycle is a cycle adjacent to the first cycle among the multiple cycles.

[0121] In a possible design, the read / write module 304 removes the memory addresses whose target values ​​read between any two adjacent cycles in the memory address set do not conform to a preset rule, so as to obtain the intermediate memory address including:

[0122] Determine a first target value corresponding to a preset byte set in the first cycle and a second target value corresponding to the preset byte set in the second cycle, wherein the preset byte set is a byte set corresponding to any preset byte length in the target memory address;

[0123] Memory addresses whose difference between the first target value and the second target value is not a preset threshold in the memory address set are eliminated to obtain the intermediate memory address.

[0124] In a possible design, the reading module 302 is specifically used for:

[0125] Read each line of content in the target file system through the target path;

[0126] Parsing each line of content to obtain the memory address and name information included in each line of content;

[0127] Determine the SO file whose name information includes a shared object SO suffix;

[0128] The memory address of the SO file and the name information of the SO file are determined as the verification memory information.

[0129] In a possible design, the read-write module 304 is further used for:

[0130] Determine the theoretical loading order of SOs in the target application;

[0131] Get the actual loading order of SO in the target application;

[0132] If the theoretical loading order does not match the actual loading order, it is determined that the target application has been tampered with by a black industry.

[0133] above Figure 3 The memory data processing device in the embodiment of the present invention has been described from the perspective of modular functional entities. The memory data processing device in the embodiment of the present invention is described in detail from the perspective of hardware processing. Figure 4 , a schematic diagram of an embodiment of a memory data processing device 400 in an embodiment of the present invention, the memory data processing device 400 comprises:

[0134] An input device 401, an output device 402, a processor 403 and a memory 404 (the number of the processor 403 can be one or more, Figure 4 In some embodiments of the present invention, the input device 401, the output device 402, the processor 403 and the memory 404 may be connected via a communication bus or other means, wherein: Figure 4 The communication bus connection is taken as an example.

[0135] Wherein, by calling the operation instruction stored in the memory 404, the processor 403 is used to perform the following steps:

[0136] Determine a target path of a target file system corresponding to a target application;

[0137] Reading the verification memory information of the current process corresponding to the target application and the memory address of the target memory based on the target path, wherein the target memory is allocated by calling the system function mmap and the verification memory information is written into the memory;

[0138] Generate an intermediate memory address corresponding to the target memory according to the first random number and the memory address of the target memory;

[0139] The verification memory information is written into the intermediate memory address according to the second random number.

[0140] By calling the operation instructions stored in the memory 404, the processor 403 is also used to execute Figure 1 Any method in the corresponding embodiment.

[0141] See also Figure 5 , Figure 5 A schematic diagram of an electronic device according to an embodiment of the present invention.

[0142] like Figure 5 As shown, an embodiment of the present invention provides an electronic device, including a memory 510, a processor 520, and a computer program 511 stored in the memory 510 and executable on the processor 520. When the processor 520 executes the computer program 511, the following steps are implemented:

[0143] Determine a target path of a target file system corresponding to a target application;

[0144] Reading the verification memory information of the current process corresponding to the target application and the memory address of the target memory based on the target path, wherein the target memory is allocated by calling the system function mmap and the verification memory information is written into the memory;

[0145] Generate an intermediate memory address corresponding to the target memory according to the first random number and the memory address of the target memory;

[0146] The verification memory information is written into the intermediate memory address according to the second random number.

[0147] In a specific implementation process, when the processor 520 executes the computer program 511, it can achieve Figure 1 Any implementation manner in the corresponding embodiments.

[0148] Since the electronic device introduced in this embodiment is a device used to implement a memory data processing device in the embodiment of the present invention, based on the method introduced in the embodiment of the present invention, technical personnel in this field can understand the specific implementation mode of the electronic device of this embodiment and its various variations. Therefore, how the electronic device implements the method in the embodiment of the present invention is not introduced in detail here. As long as the equipment used by technical personnel in this field to implement the method in the embodiment of the present invention is within the scope of protection of the present invention.

[0149] See also Figure 6 , Figure 6A schematic diagram of an embodiment of a computer-readable storage medium provided in an embodiment of the present invention.

[0150] like Figure 6 As shown, the embodiment of the present invention further provides a computer-readable storage medium 600, on which a computer program 611 is stored. When the computer program 611 is executed by a processor, the following steps are implemented:

[0151] Determine a target path of a target file system corresponding to a target application;

[0152] Reading the verification memory information of the current process corresponding to the target application and the memory address of the target memory based on the target path, wherein the target memory is allocated by calling the system function mmap and the verification memory information is written into the memory;

[0153] Generate an intermediate memory address corresponding to the target memory according to the first random number and the memory address of the target memory;

[0154] The verification memory information is written into the intermediate memory address according to the second random number.

[0155] In the specific implementation process, the computer program 611 is executed by the processor to achieve Figure 1 Any implementation manner in the corresponding embodiments.

[0156] It should be noted that in the above embodiments, the description of each embodiment has its own emphasis, and for parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0157] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0158] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded computer, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0159] These computer program instructions may also be stored in a computer readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer readable memory produce an article of manufacture including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0160] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.

[0161] The embodiment of the present invention also provides a computer program product, which includes computer software instructions. When the computer software instructions are executed on a processing device, the processing device executes the following Figure 1 The process in the corresponding embodiment.

[0162] The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present invention is generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions may be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions may be transmitted from one website site, computer, server or data center to another website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium may be any available medium that a computer can store or a data storage device such as a server or data center that includes one or more available media integrated. The available medium may be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid state disk (SSD)), etc.

[0163] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0164] In the several embodiments provided by the present invention, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There are other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms.

[0165] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0166] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0167] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), disk or optical disk and other media that can store program codes.

[0168] As described above, the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features thereof may be replaced by equivalents. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A method for processing memory data, characterized in that: include: Determine a target path of a target file system corresponding to a target application; Reading the verification memory information of the current process corresponding to the target application and the memory address of the target memory based on the target path, wherein the target memory is allocated by calling the system function mmap and the verification memory information is written into the memory; Generate an intermediate memory address corresponding to the target memory according to the first random number and the memory address of the target memory; The verification memory information is written into the intermediate memory address according to the second random number.

2. The method according to claim 1, characterized in that: Writing the verification memory information into the intermediate memory address according to the second random number comprises: Generate a long integer of a preset byte length according to the second random number, and determine the long integer as initial data; Merging the initial data with the verification memory information to obtain merged write information; The merged write information is written into the intermediate memory address, and a preset timer is started to perform cyclic increment counting on the merged write information.

3. The method according to claim 2, characterized in that The method further comprises: Reading the process memory information of the target application according to the target path; Determine a memory address set including a preset name based on the process memory information, wherein the preset name is associated with the target memory; Monitoring a target value of a target memory address read in each cycle in a plurality of cycles, wherein the target memory address is any one of the memory address sets; Eliminate the memory addresses whose target values ​​read between any two adjacent cycles in the memory address set do not conform to a preset rule, so as to obtain the intermediate memory address; The verification memory information is read based on the intermediate memory address, and the verification memory information is reported to the platform server.

4. The method according to claim 3, characterized in that The target value of the target memory address read in each cycle of the monitoring multiple cycles includes: Reading a target value of the target memory address at intervals of the preset byte length within a first cycle, wherein the first cycle is any one cycle within a plurality of cycles; The target value of the target memory address is read at intervals of the preset byte length within a second cycle, and the second cycle is a cycle adjacent to the first cycle among the multiple cycles.

5. The method according to claim 4, characterized in that Eliminating the memory addresses whose target values ​​read between any two adjacent cycles in the memory address set do not conform to a preset rule to obtain the intermediate memory address includes: Determine a first target value corresponding to a preset byte set in the first cycle and a second target value corresponding to the preset byte set in the second cycle, wherein the preset byte set is a byte set corresponding to any preset byte length in the target memory address; Memory addresses whose difference between the first target value and the second target value is not a preset threshold in the memory address set are eliminated to obtain the intermediate memory address.

6. The method according to any one of claims 1 to 5, characterized in that The step of reading the verification memory information of the current process corresponding to the target application based on the target path includes: Read each line of content in the target file system through the target path; Parsing each line of content to obtain the memory address and name information included in each line of content; Determine the SO file whose name information includes a shared object SO suffix; The memory address of the SO file and the name information of the SO file are determined as the verification memory information.

7. The method according to any one of claims 1 to 5, characterized in that The method further comprises: Determine the theoretical loading order of SOs in the target application; Get the actual loading order of SO in the target application; If the theoretical loading order does not match the actual loading order, it is determined that the target application has been tampered with by a black industry.

8. A method for processing memory data, characterized in that: include: A determination module, used to determine a target path of a target file system corresponding to a target application; A reading module, used for reading the verification memory information of the current process corresponding to the target application and the memory address of the target memory based on the target path, wherein the target memory is allocated by calling the system function mmap and the verification memory information is written into the memory; A generating module, configured to generate an intermediate memory address corresponding to the target memory according to a first random number and a memory address of the target memory; A read-write module is used to write the verification memory information into the intermediate memory address according to a second random number.

9. An electronic device, characterized in that: include: A memory and a processor, wherein the processor is used to implement the memory data processing method as described in any one of claims 1 to 7 when executing a computer management program stored in the memory.

10. A computer-readable storage medium having a computer management program stored thereon, characterized in that: When the computer management program is executed by a processor, the method for processing memory data as described in any one of claims 1 to 7 is implemented.

Citation Information

Cited By

  • Data writing method and electronic equipment

    CN120973316A