CN111258629B - Mobile phone code transcoding method, storage medium, electronic equipment and system - Google Patents

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

Info

Publication number
CN111258629B
CN111258629B CN201811458039.2A CN201811458039A CN111258629B CN 111258629 B CN111258629 B CN 111258629B CN 201811458039 A CN201811458039 A CN 201811458039A CN 111258629 B CN111258629 B CN 111258629B
Authority
CN
China
Prior art keywords
mobile phone
codes
transcoded
variable
memory
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.)
Active
Application number
CN201811458039.2A
Other languages
Chinese (zh)
Other versions
CN111258629A (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
Suzhou Xindiandian Information 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 Suzhou Xindiandian Information Technology Co ltd filed Critical Suzhou Xindiandian Information 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

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 application discloses a mobile phone code transcoding method, a storage medium, electronic equipment and a system, and relates to the field of application development of Internet mobile terminals. The method comprises the following steps: a variable of the structure type stored in the memory of the handset is created. Traversing the variable, and establishing a corresponding relation between an identification key and each item storage address in the variable to obtain a conversion index, wherein the identification keys are different. Storing dictionary type codes to be transcoded on the mobile phone into the variables, traversing all the identification keys, obtaining storage addresses of the dictionary type codes to be transcoded according to the index, and extracting codes stored in a memory of the mobile phone according to the storage addresses. The application can quickly convert the codes in the mobile phone into binary codes.

Description

Mobile phone code transcoding method, storage medium, electronic equipment and system
Technical Field
The application 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
The computer is not aware of human language, it can only operate according to a given program, and it can not recognize letters, characters, etc. when it is operated at the bottom, it is calculated and operated by conversion between two states, for example, the number 0,1 is represented by the on-off state of the circuit and the voltage level. I.e., the underlying computer is actually running in binary.
Therefore, when a programmer writes a code, the code is usually converted into a binary code understood by a computer through predetermined software and submitted to the computer, and the computer reads the binary code and then executes the binary code.
Along with the rapid development of mobile terminals of mobile phones, a lot of codes needing to be converted are also generated in mobile development, but data of dictionary types and other structural body types are generally used on mobile phones, when the dictionary types are converted into binary systems by the system, the corresponding table-entry-pair conversion mode and the like are generally adopted, and the conversion efficiency is low. As the requirements of users on the performance of mobile phones are higher, a method for transcoding mobile phones is needed to quickly transcode the data of the structure type on the mobile phones.
Disclosure of Invention
Aiming at the defects in the prior art, the application 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 application provides a method for transcoding mobile phone codes, for converting codes in an IOS system into binary, including:
creating a variable of the structure type stored in the memory of the mobile phone;
traversing the variable, and establishing a corresponding relation between an identification key and each item storage address in the variable to obtain a conversion index, wherein the identification keys are different;
storing dictionary type codes to be transcoded on the mobile phone into the variables, traversing all the identification keys, obtaining storage addresses of the dictionary type codes to be transcoded according to the index, and extracting codes stored in a memory of the mobile phone according to the storage addresses.
As a preferred embodiment of the present application,
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 codes to be transcoded on the mobile phone are legal or not.
As a preferred embodiment of the present application,
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 or not:
if yes, storing dictionary type codes to be transcoded on the mobile phone into the variables, traversing storage addresses corresponding to all identification keys through index, and extracting data in a mobile phone memory according to the mobile phone memory addresses to obtain transcoded codes;
if not, splitting 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 all storage addresses corresponding to the identification keys through index, extracting data in the mobile phone memory according to the mobile phone memory addresses to obtain transcoded sub-codes, and splicing all transcoded sub-codes according to the original splitting order to obtain transcoded codes, wherein N is an integer greater than 1.
As a preferred embodiment of the present application,
and storing dictionary type codes to be transcoded on the mobile phone into variables in a data stream form, and taking out the codes after transcoding.
As a preferred embodiment of the present application,
the structure type is a dictionary type.
As a preferred embodiment of the present application,
variable traversal of the dictionary type using an energy identification keyandobjectsusingblock function in the IOS system.
As a preferred embodiment of the present application,
traversing all storage addresses corresponding to the identification keys through index, and extracting data in a mobile phone memory according to the mobile phone memory addresses, wherein the method 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 application provides a mobile phone code transcoding system, including:
the creation module is used for creating a variable of the structure type stored in the memory of the mobile phone;
the index module is used for traversing the variable, establishing a corresponding relation between the identification key and each item storage address in the variable, and obtaining a conversion index;
the conversion module is used for storing dictionary type codes to be transcoded on the mobile phone into the variables, traversing all the identification keys, obtaining storage addresses of the dictionary type codes to be transcoded according to the index, and extracting codes stored in a memory of the mobile phone according to the storage addresses.
In a third aspect, embodiments of the present application further provide a storage medium having stored thereon a computer program which, when executed by a processor, implements the method in the embodiments of the first aspect.
In a fourth aspect, an embodiment of the present application further provides an electronic device, including a memory and a processor, where the memory stores a computer program running on the processor, and the processor implements the method in the embodiment of the first aspect when executing the computer program.
Compared with the prior art, the application has the advantages that:
the application relates to a mobile phone code transcoding method, a storage medium, an electronic device and a system, which are characterized in that firstly, a storage address mapping in a mobile phone memory is established, then codes in the mobile phone are obtained and are directly stored in the mobile phone memory in a binary form by utilizing a storage system existing in the mobile phone, then the codes in the binary form are directly taken out through the storage address mapping, and after the storage address mapping is established, the codes are converted only through two steps of storage and extraction, thereby being very fast and efficient.
Drawings
For a clearer description of the technical solutions of the embodiments of the present application, the following description will be given for a brief description of the drawings corresponding to the embodiments, and it is obvious that the drawings in the following description are some embodiments of the present application, and other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a flowchart showing steps of a mobile phone code transcoding method according to the present application;
fig. 2 is a schematic diagram of a mobile phone code transcoding system according to the present application.
In the figure: 1-creation module, 2-indexing module, 3-conversion module.
Detailed Description
Embodiments of the present application are described in further detail below with reference to the accompanying drawings.
Referring to fig. 1, the embodiment of the application provides a mobile phone code transcoding method, a storage medium, an electronic device and a system, which can convert codes on a mobile phone into binary codes in a memory through storing and converting the binary codes into binary conversion structures through establishing a mapping relation in the memory, and then directly extract the binary codes, so that the method and the system are more rapid and efficient.
In order to achieve the technical effects, the general idea of the application is as follows:
creating a variable of the structure type stored in the memory of the mobile phone;
traversing the variable, and establishing a corresponding relation between an identification key and each item storage address in the variable to obtain a conversion index;
storing dictionary type codes to be transcoded on the mobile phone into the variables, traversing all the identification keys, obtaining storage addresses of the dictionary type codes to be transcoded according to the index, and extracting codes stored in a memory of the mobile phone according to the storage addresses.
In summary, the storage system on the mobile phone is actually stored in a binary form at the bottom layer, that is, the storage extraction in each operation process is converted. Therefore, when the storage space is established, the application firstly finds the storage address and establishes the mapping, after the codes are stored in the storage space, the codes are not converted through the mobile phone system, but the converted binary codes are directly extracted from the storage space through the mapping relation, the actual use steps are that the mapping relation is established, the codes are continuously put into the storage space, and then the binary conversion can be completed through extraction.
In order to better understand the above technical solution, the following detailed description is provided in connection with specific embodiments.
Example 1
The embodiment of the application provides a mobile phone code transcoding method, which comprises the following steps:
s1: a variable of the structure type stored in the memory of the handset is created.
In an IOS system, code passes through a declaration of a construct variable, and when the code is run, the handset creates a memory space in memory for storing the construct variable. In the bottom layer of the mobile phone hardware, the form of the actual stored data is binary, i.e. the variable of the structure body in the mobile phone memory is created here, and a way of converting the code filled in the variable into binary storage by using the mobile phone system is actually established.
For example, a variable of NSMutData type is created from declarations at the IOS system, named buffer.
S2: traversing the variable, and establishing a corresponding relation between an identification key and each item storage address in the variable to obtain a conversion index, wherein the identification keys are different.
Although the codes filled in the variables are finally stored in the memory of the mobile phone in a binary form, if the binary codes in the memory are still extracted from the mobile phone system at the upper layer of the mobile phone, the mobile phone system is converted into the original code form again. Therefore, a "channel" is needed that can directly extract the binary form code from the memory, so the variables of the built structure type are traversed, and then the correspondence between the identification key and the storage address of each entry in the variables is built, so as to obtain the conversion index. Namely, the entries in the mechanism body variables are stored in the memory to be corresponding to an identification key. When a binary code of a specific item is needed, the storage address of the item can be found only through the identification key, and then the code stored in the binary form can be directly extracted from the memory of the mobile phone through the storage address.
It should be noted that, the representation key value may be a string of characters or a string of numbers, so long as the storage addresses in the mobile phone can be in one-to-one correspondence, so that the subsequent extraction can be directly extracted through the key value.
As a preferred embodiment, the traversing all the storage addresses corresponding to the keys by index, and extracting the 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 by pointer variable in the code, the memory address in the memory of the mobile phone is generally continuously stored, and the code can obtain the memory address one by continuously adding one through the pointer variable, and further extract the data stored in the memory.
For example, the variables are traversed using the universal function enumeratekeysAndObjectsUsingBlock in the IOS, and the order value key and the stored value in the structure variable are fetched. And (3) forcibly converting the key value into an NSString type, and simultaneously saving the corresponding relation between the key and the value in an Encodeelement type variable Index in one IOS system, thereby completing the establishment of the Index.
It should be noted that, the enumeratekeysIndObjectsUsingBlock is a generic function provided for the IOS system, which is used for traversing the variable of the data block mode and returning the corresponding index relationship between the key value and the data object.
S3: storing dictionary type codes to be transcoded on the mobile phone into the variables, traversing all the identification keys, obtaining storage addresses of the dictionary type codes to be transcoded according to the index, and extracting codes stored in a memory of the mobile phone according to the storage addresses.
The hardware storage information is stored in a binary form, and the application directly extracts codes in the hardware storage address, namely the codes stored in the binary form and provides the codes for users. If extracted from the system surface, the mobile phone will convert the binary back to the original code form and provide it to the user.
After the construction of the structure body variable and the mapping of the storage address are completed, the code can be filled in the structure body variable, the code is converted into binary by a mobile phone system and stored in a memory of the mobile phone, finally the storage address is found by the known key value according to the mapping relation of the storage address, and the code in the address is extracted. And extracting codes in a binary form from the memory of the mobile phone one by one, thus completing the conversion of the mobile phone.
For example, an encodieitem type variable OutPutData is constructed, a pointer is established to point to a storage address in the index, after the numerical value of the pointer to the storage address is fetched, the numerical value of the pointer is added one to point to the next storage address, the numerical value in the next storage address is fetched again, the pointer is added one continuously in sequence, the binary codes stored correspondingly in the storage address are extracted continuously from the mobile phone memory, and the binary codes are stored in the OutPutData, so that binary conversion of the codes is completed. The addition of one loop may be a for loop, which loops a number of index entries in the EncodeItem.
As an alternative embodiment, before storing the dictionary type code to be transcoded on the mobile phone into the variable, checking whether the dictionary type code to be transcoded on the mobile phone is legal is also included.
When the dictionary type code to be transcoded is stored in the variable of the mobile phone, the code needs to be checked, such as whether the code type accords with the variable of the created structure type, and if the code type does not accord with the variable of the created structure type, the code can be wrong after being stored.
As a preferred embodiment, when the dictionary type code to be transcoded on the mobile phone is stored into the variable, checking whether the data size of the dictionary type code to be transcoded on the mobile phone is larger than the variable:
if yes, storing dictionary type codes to be transcoded on the mobile phone into the variables, traversing storage addresses corresponding to all keys through index, and extracting data in a mobile phone memory according to the mobile phone memory addresses to obtain transcoded codes;
if not, splitting 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 all storage addresses corresponding to the identification keys through index, extracting data in the mobile phone memory according to the mobile phone memory addresses to obtain transcoded sub-codes, and splicing all transcoded sub-codes according to the original splitting order to obtain 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 the variable of the structure type is created on the mobile phone, the size of the created variable occupied in the memory of the mobile phone is smaller than the code to be converted, that is, if too many codes are forcedly stored into the memory of the mobile phone, the storage overflows, the codes are lost, and errors and even crashes are generated.
After judgment before storage, codes to be converted are smaller than the storage space, so that the conversion can be directly performed, and the efficiency is quite high. When the code to be converted is larger than the storage space, the code can be carried out in times, so that the whole steps are ensured not to be wrong, 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 the form of data streams, and the transcoded codes are obtained after being taken out.
When the codes are stored in the mobile phone memory in real time, the codes are taken out in real time through the built-up memory mapping, the codes are guaranteed to be converted into binary codes in real time through the built-up memory mapping in a data stream mode, the codes converted into the binary codes are extracted from the memory in real time through the built-up memory address mapping, the operation is quicker and quicker, and meanwhile the problem that the size of the codes exceeds the size of the preset memory storage space is avoided.
As a preferred embodiment, the structure type of the variables stored in the memory of the handset is the dictionary type in the IOS system.
Further, the dictionary type variables are traversed using an Enumerateekeyyand objectSusingblock function in the ISO system. When the energy keyyand object traversal block traverses a large number of arrays, compared with other traversal functions such as for-in the IOS system, the traversal function can be more concise and faster.
Based on the same inventive concept, the present application provides a second embodiment, and the specific implementation manner thereof is as follows.
Example two
As shown in fig. 2, an embodiment of the present application provides a mobile phone code horse grabbing system, which is characterized in that it includes:
the creation module 1 is used for creating a variable of a structure type stored in a memory of the mobile phone;
the index module 2 is used for traversing the variable, establishing a corresponding relation between the key and each item storage address in the variable, and obtaining a conversion index;
and the conversion module 3 is used for storing dictionary type codes to be transcoded on the mobile phone into the variables, traversing all the identification keys, obtaining the storage address of the dictionary type codes to be transcoded according to the index, and extracting codes stored in the memory of the mobile phone according to the storage address.
The various modifications and specific examples of the foregoing method embodiments are equally applicable to the system of the present embodiment, and those skilled in the art will be aware of the implementation of the system of the present embodiment through the foregoing detailed description of the method, so they will not be described in detail herein for brevity of description.
Based on the same inventive concept, the present application provides an embodiment three.
Example III
A third embodiment of the present application provides a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, implements a mobile phone code transcoding method as provided by any of the embodiments of the present application, the method comprising:
creating a variable of the structure type stored in the memory of the mobile phone;
traversing the variable, and establishing a corresponding relation between a key and each item storage address in the variable to obtain a conversion index;
storing dictionary type codes to be transcoded on the mobile phone into the variables, traversing all the identification keys, obtaining storage addresses of the dictionary type codes to be transcoded according to the index, and extracting codes stored in a memory of the mobile phone according to the storage addresses.
The computer storage media of embodiments of the application may take the form of 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 a combination of any of the foregoing. 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 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.
The computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, either in baseband or as part of a carrier wave. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination of the foregoing. 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 of the present application may be written in one or more programming languages, including an object oriented programming language such as Java, smalltalk, C ++ 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 kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computer (for example, through the Internet using an Internet service provider).
Note that the above is only a preferred embodiment of the present application and the technical principle applied. It will be understood by those skilled in the art that the present application 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 application. Therefore, while the application has been described in connection with the above embodiments, the application is not limited to the embodiments, but may be embodied in many other equivalent forms without departing from the spirit or scope of the application, which is set forth in the following claims.
Based on the same inventive concept, the present application provides a fourth embodiment.
Example IV
The fourth embodiment of the present application also provides an electronic device, including a memory and a processor, where the memory stores a computer program running on the processor, and where the processor implements all or part of the method steps in the first embodiment when executing the computer program.
The processor may be a central processing unit (Central Processing Unit, CPU), other general purpose processors, digital signal processors (Digital Signal Processor, DSP), application specific integrated circuits (Application Specific Integrated Circuit, ASIC), off-the-shelf programmable gate arrays (Field-Programmable Gate Array, FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, or the like. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like that is a control center of the computer device, connecting various parts of the overall computer device using various interfaces and lines.
The memory may be used to store the computer program and/or modules, and the processor may implement various functions of the computer device by running or executing the computer program 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 (such as a sound playing function, an image playing function, etc.) required for at least one function, 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 Card (Flash Card), at least one disk storage device, a Flash memory device, or other volatile solid state storage device.
In general, the mobile phone code transcoding method, the storage medium, the electronic device and the system provided by the embodiment of the application can convert codes on a mobile phone into binary codes in a memory through establishing a mapping relation in the memory, and then directly extract the binary codes to obtain a binary conversion structure, thereby being more rapid and efficient.
It will be appreciated by those skilled in the art that embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, magnetic disk storage, optical storage, and the like) having computer-usable program code embodied therein.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations 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 modifications and variations can be made to the present application without departing from the spirit or scope of the application. Thus, it is intended that the present application also include such modifications and alterations insofar as they come within the scope of the appended claims or the equivalents thereof.

Claims (9)

1. A method for transcoding mobile phone codes, which is used for converting codes in an IOS system into binary, is characterized in that the method comprises the following steps:
creating a variable of the structure type stored in the memory of the mobile phone;
traversing the variable, and establishing a corresponding relation between an identification key and each item storage address in the variable to obtain a conversion index, wherein the identification keys are different;
storing dictionary type codes to be transcoded on the mobile phone into the variables, traversing all the identification keys, obtaining storage addresses of the dictionary type codes to be transcoded according to the index, and extracting codes stored in a memory of the mobile phone according to the storage addresses;
the method comprises the steps that an entry in a variable corresponds to a storage address in a memory and an identification key, when a binary code of a specific entry is needed, the storage address of the entry can be found only through the identification key, and then the code stored in the binary form is directly extracted from the memory of the mobile phone through the storage address;
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 dictionary type codes to be transcoded on the mobile phone into the variables, traversing storage addresses corresponding to all identification keys through index, and extracting data in a mobile phone memory according to the mobile phone memory addresses to obtain transcoded codes;
if not, splitting 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 all storage addresses corresponding to the identification keys through index, extracting data in the mobile phone memory according to the mobile phone memory addresses to obtain transcoded sub-codes, and splicing all transcoded sub-codes according to the original splitting order to obtain transcoded codes, wherein N is an integer greater than 1.
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 codes to be transcoded on the mobile phone are legal or not.
3. The method of claim 1, wherein:
and storing dictionary type codes to be transcoded on the mobile phone into variables in a data stream form, and taking out the codes after transcoding.
4. The method of claim 1, wherein:
the structure type is a dictionary type.
5. The method of claim 4, wherein:
variable traversal of the dictionary type using an energy identification keyandobjectsusingblock function in the IOS system.
6. The method of claim 1, wherein:
traversing all storage addresses corresponding to the identification keys through index, and extracting data in a mobile phone memory according to the mobile phone memory addresses, wherein the method specifically comprises the following steps:
and creating a pointer variable, and extracting data corresponding to the storage address through the pointer variable.
7. A storage medium having a computer program stored thereon, characterized by: the computer program, when executed by a processor, implements the method of any of claims 1 to 6.
8. 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 one of claims 1 to 6.
9. A mobile phone code transcoding system is characterized in that:
the creation module is used for creating a variable of the structure type stored in the memory of the mobile phone;
the index module is used for traversing the variable, establishing a corresponding relation between the identification key and each item storage address in the variable, and obtaining a conversion index;
the conversion module is used for storing dictionary type codes to be transcoded on the mobile phone into the variables, traversing all the identification keys, obtaining the storage address of the dictionary type codes to be transcoded according to the index, and extracting codes stored in a memory of the mobile phone according to the storage address;
the method comprises the steps that an entry in a variable corresponds to a storage address in a memory and an identification key, when a binary code of a specific entry is needed, the storage address of the entry can be found only through the identification key, and then the code stored in the binary form is directly extracted from the memory of the mobile phone through the storage address;
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 dictionary type codes to be transcoded on the mobile phone into the variables, traversing storage addresses corresponding to all identification keys through index, and extracting data in a mobile phone memory according to the mobile phone memory addresses to obtain transcoded codes;
if not, splitting 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 all storage addresses corresponding to the identification keys through index, extracting data in the mobile phone memory according to the mobile phone memory addresses to obtain transcoded sub-codes, and splicing all transcoded sub-codes according to the original splitting order to obtain transcoded codes, wherein N is an integer greater than 1.
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 CN111258629A (en) 2020-06-09
CN111258629B true 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 (4)

* 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
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

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
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
US9021454B2 (en) * 2012-11-08 2015-04-28 Unisys Corpoation Operand and limits optimization for binary translation system
JP5967618B2 (en) * 2013-04-17 2016-08-10 インターナショナル・ビジネス・マシーンズ・コーポレーションInternational Business Machines Corporation Method for optimizing binary code of a language having access to binary-coded decimal variables, and computer and computer program thereof
US10067951B2 (en) * 2014-02-19 2018-09-04 Samsung Electronics Co, Ltd Method for creating binary code and electronic device thereof

Patent Citations (4)

* 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
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 (1)

* Cited by examiner, † Cited by third party
Title
MMKV--基于 mmap 的 iOS 高性能通用 key-value 组件;微信终端开发团队;《https://cloud.tencent.com/developer/article/1066229》;20180320;全文第1-5页 *

Also Published As

Publication number Publication date
CN111258629A (en) 2020-06-09

Similar Documents

Publication Publication Date Title
CN111724169B (en) Service processing system, service processing method, device and equipment
CN108334609B (en) Method, device, equipment and storage medium for realizing JSON format data access in Oracle
CN111770063B (en) Derivation and verification method, device and equipment for digital identity information
CN113254445B (en) Real-time data storage method, device, computer equipment and storage medium
CN112084179B (en) Data processing method, device, equipment and storage medium
CN113570030A (en) Data processing method, device, equipment and storage medium
CN112631924A (en) Automatic testing method and device, computer equipment and storage medium
CN112784112A (en) Message checking method and device
CN110673851B (en) Intelligent contract operation method and device and electronic equipment
CN111124541B (en) Configuration file generation method, device, equipment and medium
CN111258629B (en) Mobile phone code transcoding method, storage medium, electronic equipment and system
CN114449063B (en) Message processing method, device and equipment
CN107368557B (en) Page editing method and device
CN111324645A (en) Data processing method and device for block chain
CN112905464B (en) Application running environment data processing method and device
CN109120509A (en) A kind of method and device that information is collected
CN111026800B (en) Data export method and device, electronic equipment and storage medium
CN114495081A (en) Text recognition method and device, readable medium and electronic equipment
CN109407974B (en) Electronic device, picture deleting method based on mixed binary code and storage medium
CN114817124A (en) Inter-multi-core microcontroller mapping method, device and computer-readable storage medium
CN109670152B (en) HL7V3 analysis method, storage medium, electronic equipment and system
CN112363693A (en) Code text processing method, device, equipment and storage medium
CN117151648B (en) Approval process processing method, device, equipment and storage medium
CN111967273B (en) Dialog management system, method and rule engine device
CN110727654B (en) Data extraction method and device for distributed system, server 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

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.

TA01 Transfer of patent application right
GR01 Patent grant
GR01 Patent grant