CN111258629A - Mobile phone code transcoding method, storage medium, electronic device and system - Google Patents

Mobile phone code transcoding method, storage medium, electronic device and system Download PDF

Info

Publication number
CN111258629A
CN111258629A CN201811458039.2A CN201811458039A CN111258629A CN 111258629 A CN111258629 A CN 111258629A CN 201811458039 A CN201811458039 A CN 201811458039A CN 111258629 A CN111258629 A CN 111258629A
Authority
CN
China
Prior art keywords
mobile phone
codes
transcoded
memory
variable
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.)
Granted
Application number
CN201811458039.2A
Other languages
Chinese (zh)
Other versions
CN111258629B (en
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.)
Suzhou Xindiandian Information Technology Co ltd
Original Assignee
Wuhan Douyu Network Technology Co 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 Wuhan Douyu Network Technology Co Ltd filed Critical Wuhan Douyu Network Technology Co Ltd
Priority to CN201811458039.2A priority Critical patent/CN111258629B/en
Publication of CN111258629A publication Critical patent/CN111258629A/en
Application granted granted Critical
Publication of CN111258629B publication Critical patent/CN111258629B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/75Structural analysis for program understanding
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/40Transformation of program code
    • G06F8/52Binary to binary
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Telephone Function (AREA)

Abstract

The invention discloses a mobile phone code transcoding method, a storage medium, electronic equipment and a system, and relates to the field of application development of an internet mobile terminal. The method comprises the following steps: and creating variables of the structure type stored in the memory of the mobile phone. And traversing the variables, and establishing a corresponding relation between the identification keys and the storage addresses of the entries in the variables to obtain the conversion index, wherein the identification keys are different. And storing the dictionary type codes to be transcoded on the mobile phone into the variable, traversing all the identification keys, obtaining the storage addresses of the dictionary type codes to be transcoded according to the index, and extracting the codes stored in the mobile phone memory according to the storage addresses. The invention can quickly convert the codes in the mobile phone into binary codes.

Description

Mobile phone code transcoding method, storage medium, electronic device and system
Technical Field
The invention relates to the field of application development of internet mobile terminals, in particular to a mobile phone code transcoding method, a storage medium, electronic equipment and a system.
Background
When the computer runs, the language of a human is not understood, the computer can only run according to a set program, and when the computer runs at the bottom layer, letters, characters and the like can not be recognized, the computer calculates and runs through conversion between two states, such as the corresponding number 0, 1 uses the on-off of a circuit, and the high and low of voltage are expressed. I.e., the computer bottom layer is actually running in binary.
Therefore, after a programmer writes code, the code is converted into binary code that can be understood by a computer through predetermined software, and then the binary code is submitted to the computer, and the computer reads the binary code and then runs the binary code.
With the rapid development of mobile terminals of mobile phones, many codes which need to be converted also appear in mobile development, but data of structure types such as dictionary types and the like are generally used on mobile phones, and when a system converts the dictionary types into binary systems, a one-to-one pairing conversion and the like corresponding to a tabulation are generally adopted, but the conversion efficiency is not high. As the requirements of users on the performance of mobile phones become higher and higher, a mobile phone transcoding method is urgently needed to rapidly transcode the data of the structure type on the mobile phone.
Disclosure of Invention
Aiming at the defects in the prior art, the invention aims to provide a mobile phone code transcoding method, a storage medium, electronic equipment and a system, which can quickly convert codes in a mobile phone into binary codes.
To achieve the above object, in a first aspect, an embodiment of the present invention provides a method for transcoding a code of a mobile phone, which is used to convert a code in an IOS system into a binary system, and includes:
creating variables of the structure type stored in a memory of the mobile phone;
traversing the variables, and establishing a corresponding relation between an identification key and each entry storage address in the variables to obtain a conversion index, wherein the identification keys are different;
and storing the dictionary type codes to be transcoded on the mobile phone into the variable, traversing all the identification keys, obtaining the storage addresses of the dictionary type codes to be transcoded according to the index, and extracting the codes stored in the mobile phone memory according to the storage addresses.
As a preferred embodiment of the method according to the present invention,
before storing the dictionary type codes to be transcoded on the mobile phone into the variables, the method further comprises the following steps:
and checking whether the dictionary type code to be transcoded on the mobile phone is legal or not.
As a preferred embodiment of the method according to the present invention,
when the dictionary type codes to be transcoded on the mobile phone are stored into the variable, checking whether the data size of the dictionary type codes to be transcoded on the mobile phone is larger than the variable:
if yes, storing the dictionary type codes to be transcoded on the mobile phone into the variable, traversing all storage addresses corresponding to the identification keys through indexes, and extracting data in the mobile phone memory corresponding to the mobile phone memory address to obtain transcoded codes;
if not, dividing the dictionary type code to be transcoded on the mobile phone into N sub-codes according to the data size of the variable, storing one sub-code into the variable each time, traversing the storage addresses corresponding to all the identification keys through indexes, extracting data in a mobile phone memory corresponding to the mobile phone memory address to obtain the transcoded sub-codes, and splicing all the transcoded sub-codes according to the original splitting sequence to obtain the transcoded codes, wherein N is an integer greater than 1.
As a preferred embodiment of the method according to the present invention,
and storing the dictionary type codes to be transcoded on the mobile phone in a data stream mode into variables and taking out the variables to obtain transcoded codes.
As a preferred embodiment of the method according to the present invention,
the structure type is a dictionary type.
As a preferred embodiment of the method according to the present invention,
traversing variables of the dictionary type using an Enumerate-identified keyandobjectsumingblock function in the IOS system.
As a preferred embodiment of the method according to the present invention,
traversing the storage addresses corresponding to all the identification keys through the index, and extracting data in the mobile phone memory corresponding to the mobile phone memory address specifically comprises the following steps:
and creating a pointer variable, and extracting data corresponding to the storage address through the pointer variable.
In a second aspect, an embodiment of the present invention provides a mobile code transcoding system, which includes:
the creating module is used for creating variables of the structure types stored in the memory of the mobile phone;
the index module is used for traversing the variables, establishing a corresponding relation between the identification key and each entry storage address in the variables, and obtaining a conversion index;
and the conversion module is used for storing the dictionary type codes to be transcoded on the mobile phone into the variable, traversing all the identification keys, obtaining the storage addresses of the dictionary type codes to be transcoded according to the index, and extracting the codes stored in the memory of the mobile phone according to the storage addresses.
In a third aspect, an embodiment of the present invention further provides a storage medium, where a computer program is stored on the storage medium, and when being executed by a processor, the computer program implements the method in the embodiment of the first aspect.
In a fourth aspect, an embodiment of the present invention further provides an electronic device, which includes a memory and a processor, where the memory stores a computer program running on the processor, and the processor executes the computer program to implement the method in the first aspect.
Compared with the prior art, the invention has the advantages that:
the invention relates to a mobile phone code transcoding method, a storage medium, electronic equipment and a system, which firstly establish storage address mapping in a mobile phone memory, then acquire a code in the mobile phone and directly store the code in a binary system form in the mobile phone memory by utilizing a storage system existing in the mobile phone, then directly take out the code in the binary system form through the mapping of the storage address, and after the storage address mapping is established, only two steps of storage and extraction are needed for subsequent code conversion, so that the method is very quick and efficient.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings corresponding to the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and it is obvious for those skilled in the art that other drawings can be obtained according to these drawings without creative efforts.
FIG. 1 is a flowchart of the steps of a transcoding method for mobile phone codes according to the present invention;
fig. 2 is a schematic structural diagram of a mobile code transcoding system according to the present invention.
In the figure: 1-creating module, 2-indexing module and 3-converting module.
Detailed Description
Embodiments of the present invention will be described in further detail below with reference to the accompanying drawings.
Referring to fig. 1, embodiments of the present invention provide a method, a storage medium, an electronic device, and a system for transcoding a mobile phone code, which can convert a code on a mobile phone into a binary code in a memory by establishing a mapping relationship in the memory, and then directly extract the binary code to obtain a binary converted structure, thereby achieving higher efficiency.
In order to achieve the technical effects, the general idea of the application is as follows:
creating variables of the structure type stored in a memory of the mobile phone;
traversing the variable, and establishing a corresponding relation between the identification key and each entry storage address in the variable to obtain a conversion index;
and storing the dictionary type codes to be transcoded on the mobile phone into the variable, traversing all the identification keys, obtaining the storage addresses of the dictionary type codes to be transcoded according to the index, and extracting the codes stored in the mobile phone memory according to the storage addresses.
In summary, the storage system on the mobile phone actually stores in a binary form at the bottom layer, that is, the storage and extraction in each operation process are converted, the conversion system provided in the mobile phone storage system stores in the memory, that is, the code converted into the binary form, but because the conversion system is located at the bottom layer of the mobile phone system, the mobile phone system is remembered at the code level to extract the code form before being converted into the storage by the mobile phone system again. Therefore, when a storage space is established, the storage address is found and mapping is established, after the code is stored in the storage space, the converted binary code is directly extracted from the storage space through the mapping relation without being converted through a mobile phone system, the actual using steps are that the mapping relation is established, the code is continuously put into the storage space subsequently, and then the binary code is extracted to complete binary conversion.
In order to better understand the technical solution, the following detailed description is made with reference to specific embodiments.
Example one
The embodiment of the invention provides a mobile phone code transcoding method, which comprises the following steps:
s1: and creating variables of the structure type stored in the memory of the mobile phone.
In the IOS system, a code declares a structure variable, and when the code is run, a mobile phone creates a storage space for storing the structure variable in a memory. In the bottom layer of the mobile phone hardware, the form of actually stored data is binary, that is, a variable of a structural body in a mobile phone memory is created, and a mode of converting a code filled in the variable into binary storage by using a mobile phone system is actually established.
For example, an NSMutData type variable named buffer is created by declaration at the IOS system.
S2: and traversing the variables, and establishing a corresponding relation between the identification keys and the storage addresses of the entries in the variables to obtain the conversion index, wherein the identification keys are different.
Although the code filled in the variable is finally stored in the binary form in the memory of the mobile phone, if the binary code in the memory is still extracted from the mobile phone system on the upper layer of the mobile phone, the mobile phone system will be converted into the original code form again. Therefore, a "channel" capable of directly extracting the binary code from the memory is required, so that the established variable of the structure type is traversed, and then the correspondence between the identifier key and the storage address of each entry in the variable is established to obtain the conversion index. That is, the entry in the mechanism body variable is corresponding to the storage address in the memory and an identification key. When a specific binary code is needed, the storage address of the entry can be found only through the identification key, and the code stored in the binary form can be directly extracted from the mobile phone memory through the storage address.
It should be noted that the key value may be a string of character strings or a string of numbers, as long as the storage address in the mobile phone can be in one-to-one correspondence, so that the subsequent extraction can be directly performed by the key value.
As a preferred embodiment, traversing the storage addresses corresponding to all keys through the index, and extracting data in the mobile phone memory corresponding to the mobile phone memory address specifically includes:
and creating a pointer variable, and extracting data corresponding to the storage address through the pointer variable.
The key value is pointed and extracted through a pointer variable in the code, the storage addresses in the memory of the mobile phone are generally stored continuously, and through the pointer variable, the code can continuously add one to obtain the storage addresses one by one and further extract data stored in the memory.
For example, the variable is traversed by using a general function enumerate keysan dobjects using block in the IOS, and the sequential value key and the stored value in the variable of the structure are fetched. And forcibly converting the key value into an NSString type, storing the corresponding relation between the key and the value into the variable by using an EncodeItem type variable Index in an IOS (input/output system), and finishing the establishment of the Index.
It should be noted that the enumerate keyany and object using block is a general function provided by the IOS system, and is used for traversing the variables of the data block pattern and returning the corresponding index relationship between the key value and the data object.
S3: and storing the dictionary type codes to be transcoded on the mobile phone into the variable, traversing all the identification keys, obtaining the storage addresses of the dictionary type codes to be transcoded according to the index, and extracting the codes stored in the mobile phone memory according to the storage addresses.
The hardware storage information is stored in binary form, and the invention directly extracts the code in the hardware storage address, namely the code stored in binary form and provides the code to the user. If extracted from the system surface, the handset will convert the binary back to the original code form and provide it to the user.
After the creation of the structure body variable and the mapping of the storage address are completed, the code can be filled into the structure body variable, the code is converted into a binary system through a mobile phone system and stored in a memory of a mobile phone, finally, the storage address is found through the mapping relation of the storage address and the known key value, and then the code in the address is extracted. The binary codes are extracted from the mobile phone memory one by one, and the conversion of the mobile phone is completed.
For example, an EncodeItem type variable OutPutData is constructed, a pointer is established to point to a storage address in an index, after a numerical value of the pointer pointing to the storage address is taken out, the numerical value of the pointer is added with one to point to a next storage address, then the numerical value in the next storage address is taken out, the pointer is sequentially and continuously added with one, binary codes correspondingly stored in the storage address are continuously extracted from a mobile phone memory, the binary codes are stored into the OutPutData, and binary conversion of the codes is completed. The plus-one loop may be a for loop, the number of loops being the number of index entries in the EncodeItem.
As an optional embodiment, before storing the dictionary-type codes to be transcoded on the mobile phone into the variable, the method further comprises checking whether the dictionary-type codes to be transcoded on the mobile phone are legal.
When the dictionary type code to be transcoded is stored in the variable of the mobile phone, the code also needs to be checked, for example, whether the code type conforms to the variable of the created structure type, if not, errors can be caused after the code is stored.
As a preferred embodiment, when storing the dictionary-type codes to be transcoded on the mobile phone into the variable, checking whether the data size of the dictionary-type codes to be transcoded on the mobile phone is larger than the variable:
if yes, storing the dictionary type codes to be transcoded on the mobile phone into the variable, traversing the storage addresses corresponding to all keys through indexes, and extracting data in the mobile phone memory corresponding to the mobile phone memory address to obtain transcoded codes;
if not, dividing the dictionary type code to be transcoded on the mobile phone into N sub-codes according to the data size of the variable, storing one sub-code into the variable each time, traversing the storage addresses corresponding to all the identification keys through indexes, extracting data in a mobile phone memory corresponding to the mobile phone memory address to obtain the transcoded sub-codes, and splicing all the transcoded sub-codes according to the original splitting sequence to obtain the transcoded codes, wherein N is an integer greater than 1.
That is, the code to be converted may be a large batch of execution files, and when a variable of the structure type is created on the mobile phone, the size of the variable that may be created in the mobile phone memory is smaller than the code to be converted, that is, if too many codes are forced to be stored in the mobile phone memory, the storage overflow and the code loss may be caused, and an error or even a crash may be generated.
After judgment is carried out before storage, codes needing to be converted are smaller than storage space, conversion can be directly carried out, and efficiency is high. When the code to be converted is larger than the storage space, the conversion can be carried out in times, so that the whole step is ensured not to make mistakes, and the method is safer and more reliable.
Further, the dictionary type codes to be transcoded on the mobile phone are stored into variables in a data stream mode, and the variables are taken out to obtain transcoded codes.
When the codes are stored in the memory of the mobile phone in real time, the codes are taken out in real time through the established mapping in the memory, the codes are guaranteed to be converted into binary systems in real time through the storage in the memory in a data stream mode, the codes converted into the binary systems are extracted from the storage in real time through the established mapping of the storage addresses, the operation is quicker and quicker, and meanwhile, the situation that the code size exceeds the size of a preset memory storage space is avoided.
As a preferred embodiment, the structure type of the variable stored in the memory of the mobile phone is a dictionary type in the IOS system.
Further, the variables of the dictionary type are traversed using the EnumerateKeyandobjectSusingblock function in the ISO system. When the EnumerateKeyandbjectSusingblock walks a large number of arrays, the traversal function can be achieved more simply and more quickly compared with other traversal functions such as for-in the IOS system.
Based on the same inventive concept, the present application provides the second embodiment, which is as follows.
Example two
As shown in fig. 2, an embodiment of the present invention provides a mobile phone code horse-catching system, which is characterized in that the system includes:
the system comprises a creating module 1, a calculating module and a calculating module, wherein the creating module is used for creating variables of structure types stored in a memory of the mobile phone;
the index module 2 is used for traversing the variables, establishing a corresponding relation between the key and each entry storage address in the variables, and obtaining a conversion index;
and the conversion module 3 is used for storing the dictionary type codes to be transcoded on the mobile phone into the variable, traversing all the identification keys, obtaining the storage addresses of the dictionary type codes to be transcoded according to the index, and extracting the codes stored in the memory of the mobile phone according to the storage addresses.
Various modifications and specific examples in the foregoing method embodiments are also applicable to the system of the present embodiment, and the detailed description of the method is clear to those skilled in the art, so that the detailed description is omitted here for the sake of brevity.
Based on the same inventive concept, the present application provides the third embodiment.
EXAMPLE III
A third embodiment of the present invention provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements a method for transcoding a mobile code, the method including:
creating variables of the structure type stored in a memory of the mobile phone;
traversing the variable, and establishing a corresponding relation between the key and each entry storage address in the variable to obtain a conversion index;
and storing the dictionary type codes to be transcoded on the mobile phone into the variable, traversing all the identification keys, obtaining the storage addresses of the dictionary type codes to be transcoded according to the index, and extracting the codes stored in the mobile phone memory according to the storage addresses.
Computer storage media for embodiments of the invention may employ any combination of one or more computer-readable media. The computer readable medium may be a computer readable signal medium or a computer readable storage medium. The computer-readable storage medium may be, for example but not limited to: an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples (a non-exhaustive list) of the computer readable storage medium would include the following: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the context of this document, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
A computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device.
Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, fiber optic cable, RF, etc., or any suitable combination of the foregoing.
Computer program code for carrying out operations for aspects of the present invention may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, Smalltalk, C + + or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider).
It is to be noted that the foregoing is only illustrative of the preferred embodiments of the present invention and the technical principles employed. It will be understood by those skilled in the art that the present invention is not limited to the particular embodiments described herein, but is capable of various obvious changes, rearrangements and substitutions as will now become apparent to those skilled in the art without departing from the scope of the invention. Therefore, although the present invention has been described in greater detail by the above embodiments, the present invention is not limited to the above embodiments, and may include other equivalent embodiments without departing from the spirit of the present invention, and the scope of the present invention is determined by the scope of the appended claims.
Based on the same inventive concept, the present application provides the fourth embodiment.
Example four
The fourth embodiment of the present invention further provides an electronic device, which includes a memory and a processor, where the memory stores a computer program running on the processor, and the processor executes the computer program to implement all or part of the method steps in the first embodiment.
The Processor may be a Central Processing Unit (CPU), other general purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), an off-the-shelf Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic, discrete hardware components, etc. The general purpose processor may be a microprocessor or the processor may be any conventional processor or the like which is the control center for the computer device and which connects the various parts of the overall computer device using various interfaces and lines.
The memory may be used to store the computer programs and/or modules, and the processor may implement various functions of the computer device by running or executing the computer programs and/or modules stored in the memory and invoking data stored in the memory. The memory may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required by at least one function (such as a sound playing function, an image playing function, etc.), and the like; the storage data area may store data (such as audio data, video data, etc.) created according to the use of the cellular phone, etc. In addition, the memory may include high speed random access memory, and may also include non-volatile memory, such as a hard disk, a cell phone memory, a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), at least one magnetic disk storage device, a Flash memory device, or other volatile solid state storage device.
Generally, the mobile phone code transcoding method, the storage medium, the electronic device and the system provided by the embodiment of the invention can convert codes on a mobile phone into binary codes in a memory through storage by establishing a mapping relation in the memory, and then directly extract the binary codes to obtain a binary conversion structure, so that the efficiency is higher.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, optical storage, and the like) having computer-usable program code embodied therein.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
It will be apparent to those skilled in the art that various changes and modifications may be made in the present invention without departing from the spirit and scope of the invention. Thus, if such modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include such modifications and variations.

Claims (10)

1. A mobile phone code transcoding method is used for converting codes in an IOS system into binary systems, and is characterized by comprising the following steps:
creating variables of the structure type stored in a memory of the mobile phone;
traversing the variables, and establishing a corresponding relation between an identification key and each entry storage address in the variables to obtain a conversion index, wherein the identification keys are different;
and storing the dictionary type codes to be transcoded on the mobile phone into the variable, traversing all the identification keys, obtaining the storage addresses of the dictionary type codes to be transcoded according to the index, and extracting the codes stored in the mobile phone memory according to the storage addresses.
2. The method of claim 1, wherein:
before storing the dictionary type codes to be transcoded on the mobile phone into the variables, the method further comprises the following steps:
and checking whether the dictionary type code to be transcoded on the mobile phone is legal or not.
3. The method of claim 1, wherein:
when the dictionary type codes to be transcoded on the mobile phone are stored into the variable, checking whether the data size of the dictionary type codes to be transcoded on the mobile phone is larger than the variable:
if yes, storing the dictionary type codes to be transcoded on the mobile phone into the variable, traversing all storage addresses corresponding to the identification keys through indexes, and extracting data in the mobile phone memory corresponding to the mobile phone memory address to obtain transcoded codes;
if not, dividing the dictionary type code to be transcoded on the mobile phone into N sub-codes according to the data size of the variable, storing one sub-code into the variable each time, traversing the storage addresses corresponding to all the identification keys through indexes, extracting data in a mobile phone memory corresponding to the mobile phone memory address to obtain the transcoded sub-codes, and splicing all the transcoded sub-codes according to the original splitting sequence to obtain the transcoded codes, wherein N is an integer greater than 1.
4. The method of claim 3, wherein:
and storing the dictionary type codes to be transcoded on the mobile phone in a data stream mode into variables and taking out the variables to obtain transcoded codes.
5. The method of claim 1, wherein:
the structure type is a dictionary type.
6. The method of claim 5, wherein:
traversing variables of the dictionary type using an Enumerate-identified keyandobjectsumingblock function in the IOS system.
7. The method of claim X, wherein:
traversing the storage addresses corresponding to all the identification keys through the index, and extracting data in the mobile phone memory corresponding to the mobile phone memory address specifically comprises the following steps:
and creating a pointer variable, and extracting data corresponding to the storage address through the pointer variable.
8. A storage medium having a computer program stored thereon, characterized in that: the computer program, when executed by a processor, implements the method of any one of claims 1 to 7.
9. An electronic device comprising a memory and a processor, the memory having stored thereon a computer program that runs on the processor, characterized in that: the processor, when executing the computer program, implements the method of any of claims 1 to 7.
10. A mobile phone code transcoding system is characterized in that:
the creating module is used for creating variables of the structure types stored in the memory of the mobile phone;
the index module is used for traversing the variables, establishing a corresponding relation between the identification key and each entry storage address in the variables, and obtaining a conversion index;
and the conversion module is used for storing the dictionary type codes to be transcoded on the mobile phone into the variable, traversing all the identification keys, obtaining the storage addresses of the dictionary type codes to be transcoded according to the index, and extracting the codes stored in the memory of the mobile phone according to the storage addresses.
CN201811458039.2A 2018-11-30 2018-11-30 Mobile phone code transcoding method, storage medium, electronic equipment and system Active CN111258629B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811458039.2A CN111258629B (en) 2018-11-30 2018-11-30 Mobile phone code transcoding method, storage medium, electronic equipment and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811458039.2A CN111258629B (en) 2018-11-30 2018-11-30 Mobile phone code transcoding method, storage medium, electronic equipment and system

Publications (2)

Publication Number Publication Date
CN111258629A true CN111258629A (en) 2020-06-09
CN111258629B CN111258629B (en) 2023-08-11

Family

ID=70950299

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811458039.2A Active CN111258629B (en) 2018-11-30 2018-11-30 Mobile phone code transcoding method, storage medium, electronic equipment and system

Country Status (1)

Country Link
CN (1) CN111258629B (en)

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2005081408A1 (en) * 2004-02-13 2005-09-01 Utstarcom (China) Co., Ltd. A method of binary encode that adapts to structured data whose code is automatically generated
US20130318509A1 (en) * 2012-05-22 2013-11-28 International Business Machines Corporation Generating object code from a conjoined assembler directive
US20140115304A1 (en) * 2012-10-18 2014-04-24 Synopsys, Inc. Compressed instruction code storage
US20140130026A1 (en) * 2012-11-08 2014-05-08 Unisys Corporation Operand and limits optimization for binary translation system
US20140317608A1 (en) * 2013-04-17 2014-10-23 International Business Machines Corporation Method for optimizing binary code in language having access to binary coded decimal variable, and computer and computer program
CN104380250A (en) * 2014-05-21 2015-02-25 华为技术有限公司 A system and a method able to perform dynamic creation of attachable and demountable binary files
US20150234637A1 (en) * 2014-02-19 2015-08-20 Samsung Electronics Co., Ltd. Method for creating binary code and electronic device thereof
WO2016099742A1 (en) * 2014-12-18 2016-06-23 Intel Corporation Binary translation mechanism
CN107480068A (en) * 2017-08-22 2017-12-15 武汉斗鱼网络科技有限公司 Code integrity detection method, device, electric terminal and readable storage medium storing program for executing

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2005081408A1 (en) * 2004-02-13 2005-09-01 Utstarcom (China) Co., Ltd. A method of binary encode that adapts to structured data whose code is automatically generated
US20130318509A1 (en) * 2012-05-22 2013-11-28 International Business Machines Corporation Generating object code from a conjoined assembler directive
US20140115304A1 (en) * 2012-10-18 2014-04-24 Synopsys, Inc. Compressed instruction code storage
US20140130026A1 (en) * 2012-11-08 2014-05-08 Unisys Corporation Operand and limits optimization for binary translation system
US20140317608A1 (en) * 2013-04-17 2014-10-23 International Business Machines Corporation Method for optimizing binary code in language having access to binary coded decimal variable, and computer and computer program
US20150234637A1 (en) * 2014-02-19 2015-08-20 Samsung Electronics Co., Ltd. Method for creating binary code and electronic device thereof
CN104380250A (en) * 2014-05-21 2015-02-25 华为技术有限公司 A system and a method able to perform dynamic creation of attachable and demountable binary files
WO2016099742A1 (en) * 2014-12-18 2016-06-23 Intel Corporation Binary translation mechanism
CN107480068A (en) * 2017-08-22 2017-12-15 武汉斗鱼网络科技有限公司 Code integrity detection method, device, electric terminal and readable storage medium storing program for executing

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
TUGELE: "iOS中mmap的应用", 《HTTPS://BLOG.CSDN.NET/TUGELE/ARTICLE/DETAILS/84556314》 *
微信终端开发团队: "MMKV--基于 mmap 的 iOS 高性能通用 key-value 组件", 《HTTPS://CLOUD.TENCENT.COM/DEVELOPER/ARTICLE/1066229》 *

Also Published As

Publication number Publication date
CN111258629B (en) 2023-08-11

Similar Documents

Publication Publication Date Title
CN108090198B (en) Graph database creating method, graph database creating device, graph database loading device, and graph database loading medium
CN112084179B (en) Data processing method, device, equipment and storage medium
CN112817657B (en) Application program starting item loading method, device, system and storage medium
CN111124541B (en) Configuration file generation method, device, equipment and medium
CN112784112A (en) Message checking method and device
CN111770063A (en) Derivation and verification method, device and equipment of digital identity information
CN115098186A (en) Project processing method and device, computer equipment and storage medium
JP7375089B2 (en) Method, device, computer readable storage medium and computer program for determining voice response speed
CN113391811A (en) Function compiling method and device, electronic equipment and computer readable storage medium
CN114721656A (en) Interface structure extraction method, device, medium and electronic equipment
CN107368557B (en) Page editing method and device
CN108153528B (en) Flow model expansion processing method and device, storage medium and electronic equipment
CN117290332A (en) Data migration verification method, device, equipment and storage medium
CN111258629B (en) Mobile phone code transcoding method, storage medium, electronic equipment and system
CN114449063B (en) Message processing method, device and equipment
CN115203674A (en) Automatic login method, system, device and storage medium for application program
CN114936539A (en) Text encoding and decoding method, apparatus, device and medium
CN114780346A (en) Method, device, storage medium and electronic equipment for acquiring program blockage information
CN114817124A (en) Inter-multi-core microcontroller mapping method, device and computer-readable storage medium
CN111026800B (en) Data export method and device, electronic equipment and storage medium
CN114070470A (en) Encoding and decoding method and device
CN112000667A (en) Method, apparatus, server and medium for retrieving tree data
CN110597517A (en) Method and device for dynamically analyzing mat file
CN108989813A (en) A kind of high efficiency of compression/decompression method, computer installation and storage medium
CN116595285B (en) Route generation method, device, computer equipment 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
TA01 Transfer of patent application right
TA01 Transfer of patent application right

Effective date of registration: 20230714

Address after: Unit G1-803, No. 88, Jinji Lake Avenue, Suzhou Industrial Park, Jiangsu 215000

Applicant after: Suzhou xindiandian Information Technology Co.,Ltd.

Address before: 430000 East Lake Development Zone, Wuhan City, Hubei Province, No. 1 Software Park East Road 4.1 Phase B1 Building 11 Building

Applicant before: WUHAN DOUYU NETWORK TECHNOLOGY Co.,Ltd.

GR01 Patent grant
GR01 Patent grant