CN111078222A - Code conversion method, device, electronic equipment and storage medium - Google Patents

Code conversion method, device, electronic equipment and storage medium Download PDF

Info

Publication number
CN111078222A
CN111078222A CN201911298754.9A CN201911298754A CN111078222A CN 111078222 A CN111078222 A CN 111078222A CN 201911298754 A CN201911298754 A CN 201911298754A CN 111078222 A CN111078222 A CN 111078222A
Authority
CN
China
Prior art keywords
format
information content
code
encoding
coding
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201911298754.9A
Other languages
Chinese (zh)
Inventor
王启孟
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Mininglamp Software System Co ltd
Original Assignee
Beijing Mininglamp Software System 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 Beijing Mininglamp Software System Co ltd filed Critical Beijing Mininglamp Software System Co ltd
Priority to CN201911298754.9A priority Critical patent/CN111078222A/en
Publication of CN111078222A publication Critical patent/CN111078222A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/40Transformation of program code
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/40Transformation of program code
    • G06F8/41Compilation

Landscapes

  • Engineering & Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Document Processing Apparatus (AREA)

Abstract

The application provides a code conversion method, a device, an electronic device and a storage medium, wherein the method comprises the following steps: obtaining information content in a first encoding format; and responding to the preset input operation of a user to the input device, and converting the information content in the first coding format into the information content in the second coding format, wherein the first coding format is different from the second coding format. In the implementation process, the information content in the first coding format is converted into the information content in the second coding format in response to the preset input operation of the user on the input device, so that the coding conversion step is effectively simplified, and the problem that the step of converting the codes of the information content is complicated is solved.

Description

Code conversion method, device, electronic equipment and storage medium
Technical Field
The present application relates to the technical field of computer data processing and transcoding, and in particular, to a transcoding method, apparatus, electronic device, and storage medium.
Background
Coding refers to the code representing each group of data to be processed and analyzed by computer, wherein the code is the symbol representing the object, and the code can be represented by number, letter, special symbol or the combination of the three.
Most of the current coding tools are online coding tools, and the step of converting the known coding format using the online coding tools includes: firstly, a browser needs to be opened, a target website can be opened, the target website can realize a code conversion function, secondly, target content needing code conversion is obtained, the target content is copied and pasted in a content box of the target website, or the target content is uploaded to the target website, then a target code format is selected, and then code conversion is clicked, so that content corresponding to the target code format is obtained; as can be seen from the above steps, it is cumbersome to convert the encoding format of the information content.
Disclosure of Invention
An object of the embodiments of the present application is to provide a transcoding method, an apparatus, an electronic device, and a storage medium, which are used to solve the problem that the transcoding of information content is complicated.
The embodiment of the application provides a code conversion method, which comprises the following steps: obtaining information content in a first encoding format; and responding to a preset input operation of a user on an input device, and converting the information content in the first coding format into the information content in a second coding format, wherein the first coding format is different from the second coding format. In the implementation process, the information content in the first coding format is converted into the information content in the second coding format in response to the preset input operation of the user on the input device, so that the coding conversion step is effectively simplified, and the problem that the step of converting the codes of the information content is complicated is solved.
Optionally, in this embodiment of the present application, the obtaining of the information content in the first encoding format includes: determining the content read from the first file in the first coding format as the content in the first coding format; after the converting the information content in the first encoding format into the information content in the second encoding format, the method further includes: and storing the information content in the second encoding format into the first file. In the implementation process, the content read from the first file by the first encoding format is determined as the content of the first encoding format; the information content in the second coding format is stored in the first file, so that the step of code conversion of the target file is effectively simplified, and the problem that the step of code conversion of the information content is relatively complicated is solved.
Optionally, in this embodiment of the present application, the converting the information content in the first encoding format into the information content in the second encoding format includes: responding to the selection operation of a user on the code name of the second code format, and obtaining the code name of the second code format; and performing code conversion on the information content in the first coding format according to the coding name by using an executive program to obtain the information content in the second coding format. In the implementation process, the encoding name of the second encoding format is obtained; performing code conversion on the information content in the first coding format according to the coding name by using an executive program to obtain the information content in the second coding format; the user can select more coding formats corresponding to the coding names, so that the range of code conversion is increased.
Optionally, in this embodiment of the application, before the using the execution program performs transcoding on the information content in the first encoding format according to the encoding name, the method further includes: obtaining a code name of the first code format; and if the code name of the first code format is not the same as the code name of the second code format, executing the step of performing code conversion on the information content of the first code format by using the executive program according to the code name. In the implementation process, the encoding name of the first encoding format is obtained; if the code name of the first code format is not the same as the code name of the second code format, executing the step of performing code conversion on the information content of the first code format according to the code name by using an executive program; by judging that the source code is different from the target code, the conversion is carried out, so that the error probability of code conversion is effectively reduced.
Optionally, in an embodiment of the present application, the method further includes: and compiling a file written by a first language or/and a file written by a second language to obtain the executive program, wherein the first language is different from the second language. In the implementation process, an executive program is obtained by compiling a file written by a first language or/and a file written by a second language; when the file compiled program written in the first language cannot be executed, the file compiled program written in the second language can be executed, so that the fault tolerance of the executed program is improved, and the robustness of the executed program is improved.
Optionally, in this embodiment of the present application, after the converting the information content in the first encoding format into the information content in the second encoding format, the method further includes: storing the information content in the second encoding format into a second file; or storing the information content of the second encoding format into a clipboard, wherein the clipboard is a section of storage area provided for the convenience of operation by an operating system. In the implementation process, the information content in the second encoding format is stored into a second file; or storing the information content in the second coding format into the clipboard; the method effectively simplifies the code conversion step and solves the problem that the step of converting the codes of the information content is complicated.
Optionally, in an embodiment of the present application, the input device includes: a mouse or keyboard; the responding to the preset input operation of the user to the input device comprises the following steps: responding to the click operation of a popup menu aiming at the right mouse button; or in response to an operation of a shortcut key or a combination key of the keyboard being pressed. In the implementation process, the code conversion method is triggered through a right-click menu of a mouse or through a combination key of a keyboard, so that the code conversion step is effectively simplified, and the problem that the step of converting the codes of the information content is complicated is solved.
An embodiment of the present application further provides a transcoding device, including: the content obtaining module is used for obtaining the information content in the first coding format; and the code conversion module is used for responding to preset input operation of a user on input equipment and converting the information content in the first code format into the information content in the second code format, wherein the first code format is different from the second code format. In the implementation process, the information content in the first coding format is converted into the information content in the second coding format in response to the preset input operation of the user on the input device, so that the coding conversion step is effectively simplified, and the problem that the step of converting the codes of the information content is complicated is solved.
Optionally, in an embodiment of the present application, the content obtaining module includes: the content determining module is used for determining the content read from the first file in the first coding format as the content in the first coding format; the transcoding device further comprises: and the content storage module is used for storing the information content in the second encoding format into the first file.
Optionally, in an embodiment of the present application, the transcoding module includes: the first obtaining module is used for responding to the selection operation of a user on the code name of the second code format and obtaining the code name of the second code format; and the second obtaining module is used for performing code conversion on the information content in the first coding format according to the coding name by using an executive program to obtain the information content in the second coding format.
Optionally, in an embodiment of the present application, the transcoding device further includes: a third obtaining module, configured to obtain a code name of the first code format; and the conditional conversion module is used for executing the step of performing code conversion on the information content in the first coding format by using the execution program according to the coding name if the coding name in the first coding format is not the same as the coding name in the second coding format.
Optionally, in an embodiment of the present application, the transcoding device further includes: and the fourth obtaining module is used for obtaining the file written by the first language or/and the file written by the second language and compiling to obtain the executive program, wherein the first language is different from the second language.
Optionally, in an embodiment of the present application, the transcoding device further includes: the information storage module is used for storing the information content in the second encoding format into a second file; or storing the information content of the second encoding format into a clipboard, wherein the clipboard is a section of storage area provided for the convenience of operation by an operating system.
Optionally, in an embodiment of the present application, the input device includes: a mouse or keyboard; the transcoding module comprises: the response operation module is used for responding to the click operation of the pop-up menu aiming at the right mouse button; or in response to an operation of a shortcut key or a combination key of the keyboard being pressed.
An embodiment of the present application further provides an electronic device, including: a processor and a memory storing machine-readable instructions executable by the processor, the machine-readable instructions when executed by the processor performing the method as described above.
The embodiment of the present application also provides a storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the method as described above is executed.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are required to be used in the embodiments of the present application will be briefly described below, it should be understood that the following drawings only illustrate some embodiments of the present application and therefore should not be considered as limiting the scope, and that those skilled in the art can also obtain other related drawings based on the drawings without inventive efforts.
Fig. 1 is a schematic diagram of a transcoding method provided in an embodiment of the present application;
FIG. 2 is a diagram illustrating a right-click menu including at least one code name provided by an embodiment of the present application;
fig. 3 is a schematic diagram of a transcoding device provided in an embodiment of the present application;
fig. 4 is a schematic structural diagram of an electronic device provided in an embodiment of the present application.
Detailed Description
The technical solution in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application.
Before introducing the transcoding method provided by the embodiment of the present application, some concepts related to the embodiment of the present application are introduced, and some concepts related to the embodiment of the present application are as follows:
a server refers to a device that provides computing services over a network, such as: x86 server and non-x 86 server, non-x 86 server includes: mainframe, minicomputer, and UNIX server. Certainly, in a specific implementation process, the server may specifically select a mainframe or a minicomputer, where the mainframe refers to a dedicated processor that mainly supports a closed and dedicated device for providing Computing service of a UNIX operating system, and that uses Reduced Instruction Set Computing (RISC), single-length fixed-point instruction average execution speed (MIPS), and the like; a mainframe, also known as a mainframe, refers to a device that provides computing services using a dedicated set of processor instructions, an operating system, and application software.
It should be noted that the transcoding method provided in the embodiments of the present application may be executed by an electronic device, where the electronic device refers to a device terminal having a function of executing a computer program or the server described above, and the device terminal includes, for example: a smart phone, a Personal Computer (PC), a tablet computer, a Personal Digital Assistant (PDA), a Mobile Internet Device (MID), a network switch or a network router, and the like. It is understood that the electronic devices described above each include: if the electronic device is a server, the input device of the server comprises: mouse, keyboard, etc., the output device of server includes display etc. if electronic equipment is the equipment terminal, then the input device of equipment terminal includes: touch pens, touch screens, mice, keyboards, and the like; touch screens are, for example: a touch screen on a notebook computer or a displayable touch screen of a tablet computer, etc.
Before introducing the transcoding method provided in the embodiment of the present application, application scenarios applicable to the transcoding method are introduced, where the application scenarios include, but are not limited to: the code conversion method is used for code conversion of information contents in a file or a clipboard or information contents selected by a mouse, namely, the code format of the information contents is converted into another code format, or a combined shortcut key of a mouse right-click menu or a keyboard is used for triggering the code conversion method to code conversion of the information contents, and the like.
Please refer to fig. 1 for a schematic diagram of a transcoding method provided in the embodiment of the present application; the transcoding method may include the steps of:
step S110: the electronic device obtains information content in a first encoding format.
The encoding format refers to a format for encoding information stored in electronic equipment, and specific examples of the encoding format include: ASCII, ISO-8859-1, GB2312, GBK, UTF-8, UTF-16 and other formats; the encoding format here includes, for example, common information encoding formats: encoding formats such as MD5 and Base 64; the electronic device herein refers to the above-mentioned device terminal or the above-mentioned server having a function of executing the computer program.
The first coding format is the coding format of the information content needing coding conversion; the first encoding format herein may be, for example, any one of the encoding formats described above, and specifically includes: if the first encoding format is UTF-8, the information content of which the first encoding format is UTF-8 is obtained. The information content herein refers to the inherent meaning of information and also to the expression of the characteristics of things.
The above-described embodiment of obtaining information content in the first encoding format includes: obtaining information content in a file selected by a mouse, information content in a clipboard of the mouse or information content selected by the mouse; the embodiment of obtaining the information content in the mouse-selected file will be described in detail after step S120 is introduced.
Optionally, after the information content in the first encoding format is obtained, encoding may also be performed according to the encoding name of the specific target encoding format, and then after the information content in the first encoding format is obtained, that is, after step S110, the following steps may also be included:
step S111: the electronic device obtains an encoding name in a first encoding format.
The coding name refers to a specific name of a coding format, and each coding format has a corresponding name; the encoding name of the first encoding format is specifically, for example: ASCII, ISO-8859-1, GB2312, GBK, UTF-8 or UTF-16, etc.
Embodiments of obtaining the encoding name of the first encoding format are, for example: the electronic equipment reads and obtains the coding format of the information content in the pre-stored file, specifically, the coding format of the first file can be read as UTF-8, and UTF-8 is determined as the coding name of the first coding format.
After step S111, step S112 is performed: if the encoding name of the first encoding format is not the same as the encoding name of the second encoding format, step S120 is performed.
The second coding format is a target coding format which needs to be subjected to coding conversion; the second encoding format may be, for example, any one of the encoding formats described above, and specifically includes: if the first encoding format is UTF-8 and the encoding format needs to be converted into GBK, the GBK may be the target encoding format of the encoding conversion, that is, the GBK is the second encoding format; another example is: reading the information content of the first file in a UTF-8 encoding format, and converting the information content of the first file into Base64 encoding, wherein the Base64 encoding is a second encoding format; here, the second encoding format may be an encoding format different from the first encoding format described above.
The embodiment of obtaining the encoding name of the second encoding format is, for example: responding to the selection operation of the user, thereby obtaining the encoding name of the encoding format selected by the user; specifically, the user right clicks on the first file to display a list of code names, where the list of code names includes, for example: MD5 transcoding, Base32 transcoding, Base64 transcoding, and the like; and the user uses the input device to click one of the code names in the code name list by a left key to determine the code name as the code name of the second code format.
Embodiments of obtaining the encoding name of the second encoding format are, for example: responding to a preset shortcut key pressed by a user, and acquiring a code name in a second code format; the preset shortcut key can be set by the user, for example: pressing an 'M' key to indicate that the coding format selected by the user is MD5, and pressing a 'B' key to indicate that the coding format selected by the user is Base64 and the like; then correspondingly, pressing the "M" key obtains the code name of the second code format as MD5, pressing the "B" key obtains the code name of the second code format as Base64, etc.
If the encoding name of the first encoding format is not the same as the encoding name of the second encoding format, the information content of the first encoding format is encoded and converted according to the encoding name by using the execution program, for example: assuming that the UTF-8 is determined as the encoding name of the first encoding format, if the encoding name of the second encoding format is GBK, and the encoding name of the first encoding format is not the same as the encoding name of the second encoding format, the information content of the UTF-8 encoding format may be subjected to encoding conversion by using an execution program according to the encoding name to obtain the information content of the GBK encoding format, and the information content of the GBK encoding format may be determined as the information content of the second encoding format. The above-described embodiments are, for example: assuming that the encoding name of the first encoding format is determined to be Base64, if the encoding name of the second encoding format is MD5, the encoding name of the first encoding format is not the same as the encoding name of the second encoding format, the information content of the first encoding format may be converted into the MD5 format using an executive program.
In the implementation process, the encoding name of the first encoding format is obtained; if the code name of the first code format is not the same as the code name of the second code format, executing the step of performing code conversion on the information content of the first code format according to the code name by using an executive program; by judging that the source code is different from the target code, the conversion is carried out, so that the error probability of code conversion is effectively reduced.
After step S111, step S113 is performed: if the encoding name of the first encoding format is the same as the encoding name of the second encoding format and the encoding name is determined to be the preset encoding, step S120 is executed.
The preset code refers to a preset specific code name, where the preset code generally refers to a code name that can be repeatedly coded, and specifically includes: MD5, Base64, and Secure Hash Algorithm (SHA).
If the encoding name of the first encoding format is the same as the encoding name of the second encoding format, the information content of the first encoding format is encoded and converted according to the encoding name by using the execution program, for example: assuming that the encoding name of the first encoding format is Base64, if the encoding name of the second encoding format is Base64, where Base64 is encoded as the preset encoding, the encoding name of the first encoding format is not the same as the encoding name of the second encoding format, then the information content of the first encoding format may be converted into the Base64 format using an execution program. Specifically, assuming that the first string "ABC" is encoded by Base64 to obtain "QUJD", then Base64 encoding of "QUJD" encoded by Base64 may still be performed to obtain "UVVKRA ═ and the cycle continues.
After step S110, step S120 is performed: the electronic equipment responds to the preset input operation of a user on the input equipment, and the information content in the first coding format is converted into the information content in the second coding format.
An input device is a device that helps a user input information to an electronic device, and is also a variety of devices that input data and commands to a computer. The input device can be divided into: character input devices, sound input devices, image input devices, and the like; the sound input equipment is equipment which converts various external analog sound signals into digital sound signals after sampling and quantizing and inputs the digital sound signals into a computer; the image input device herein refers to a device for digitizing image information and inputting the digitized image information to a computer, and the image input device mainly includes a scanner, a digital camera, a camera, and the like; the input device includes: a stylus, touch screen, mouse or keyboard; touch screens are, for example: a touch screen on a notebook computer or a displayable touch screen of a tablet computer, etc.; the input devices here are, for example: paper tape input machine, soft keyboard, magnetic card machine, etc.
The preset input operation refers to a preset operation corresponding to a user, for example: clicking operation of the code name in a mouse menu list, wherein the menu list is preset and comprises the following steps: MD5 transcoding and Base64 transcoding, and so on; another example is: the simultaneous pressing operation of the combination keys of the keyboard takes the combination keys of the keyboard as shortcut keys, wherein the combination keys are as follows: the Ctrl key plus the M key, which indicates that the information content is MD5 transcoded, etc., may trigger an action of converting the information content in the first encoding format into the information content in the second encoding format. That is, the transcoding method may be triggered to transcode the information content using a right mouse button menu or a combination shortcut of a keyboard.
The above-described embodiments responding to a preset input operation of a user to an input device include: responding to the click operation of a popup menu aiming at the right button of the mouse; or in response to an operation in which a first key of the keyboard and a second key of the keyboard are simultaneously pressed, where the first key and the second key are different keys; in response to the above operations, the information content in the first encoding format is converted into the information content in the second encoding format. In the implementation process, the code conversion method is triggered through a right-click menu of a mouse or through a combination key of a keyboard, so that the code conversion step is effectively simplified, and the problem that the step of converting the codes of the information content is complicated is solved.
The above-mentioned implementation of converting the information content in the first encoding format into the information content in the second encoding format may include the following steps:
step S121: the electronic equipment responds to the selection operation of the user on the code name of the second code format, and obtains the code name of the second code format.
In response to the user's selection operation of the encoding name of the second encoding format, embodiments of obtaining the encoding name of the second encoding format include: responding to the selection operation of the user in the coding name list, and obtaining the coding name of the coding format selected by the user; specifically, the user right clicks on the first file to display a list of code names, where the list of code names includes, for example: MD5 transcoding, Base16 transcoding, Base32 transcoding, Base64 transcoding, etc., the user clicks one of the bases 64 transcoding in the list of coding names left with the input device, and determines the Base64 coding as the coding name in the second coding format.
Step S122: and performing code conversion on the information content in the first coding format according to the coding name by using an executive program to obtain the information content in the second coding format.
Please refer to fig. 2, which illustrates a diagram of a right-click menu including at least one code name provided in an embodiment of the present application; as shown, when the user right clicks on a first file (e.g., text), a list of encoding names is displayed, where the list of encoding names includes: MD5 transcoding, Base64 transcoding, and the like. The execution program refers to a program that can be executed on an electronic device, and the program can perform a transcoding function, and the execution program specifically includes: an executable file suffixed exe under the windows operating system, or an executable file suffixed bat, etc. Certainly, in a specific implementation process, if the code name is added to the right-click menu of the user mouse, the registry of the windows operating system needs to be changed, a file path of the execution program in the file system is added to the registry, and related parameters of the execution program are transferred, for example: the execution file exe-c MD5-d D:/test.txt; exe represents the file path of the execution file in the file system, c represents an encoding name parameter, namely the encoding name selected by the user in the menu list, MD5 represents the conversion of the content in the file into an MD5 encoding format, D represents the file path of the file to be encoded in the file system, and D:/test.
In the implementation process, the encoding name of the second encoding format is obtained; performing code conversion on the information content in the first coding format according to the coding name by using an executive program to obtain the information content in the second coding format; the user can select more coding formats corresponding to the coding names, so that the range of code conversion is increased.
The obtaining method of the execution program includes, for example: compiling a file written by a first language or/and a file written by a second language to obtain an execution program, wherein the first language and the second language include but are not limited to: python, JAVA, C + +, C, and/or golang, etc., where the first language is different from the second language; that is, the execution programs can be compiled from different programming languages. Obtaining an executive program by compiling a file written by a first language or/and a file written by a second language; when the file compiled program written in the first language cannot be executed, the file compiled program written in the second language can be executed, so that the fault tolerance of the executed program is improved, and the robustness of the executed program is improved.
In the implementation process, the information content in the first coding format is converted into the information content in the second coding format in response to the preset input operation of the user on the input device, so that the coding conversion step is effectively simplified, and the problem that the step of converting the codes of the information content is complicated is solved.
The above-mentioned implementation of obtaining information content in the file selected by the mouse, i.e. the implementation of step S110, may include the following steps:
step S114: the electronic equipment determines the content read from the first file in the first coding format as the information content in the first coding format.
The first file refers to a file requiring transcoding, for example: txt represents the file path of the encoded file in the file system, and the information content of the first file can be set according to the requirements of users.
The above embodiment of determining the content read from the first file in the first encoding format as the information content in the first encoding format specifically includes: and determining the content read from the first file by the UTF-8 encoding format as "ABC", determining the "ABC" as the information content of the first encoding format, encoding the "ABC" by Base64 to obtain "QUJD", and determining the "QUJD" as the information content of the second encoding format.
After the content read from the first file is converted into the second encoding format, the information content after the conversion may also be stored in the first file, and then after the information content in the first encoding format is converted into the information content in the second encoding format, that is, after step S120, the following steps may also be included:
step S123: the electronic equipment stores the information content in the second encoding format into the first file.
The above-mentioned embodiment of storing the information content in the second encoding format into the first file is, for example: determining "QUJD" as the information content of the second encoding format, and storing "QUJD" in the first file, i.e. storing "QUJD" in the D:/test.
In the implementation process, the content read from the first file by the first encoding format is determined as the content of the first encoding format; the information content in the second coding format is stored in the first file, so that the step of code conversion of the target file is effectively simplified, and the problem that the step of code conversion of the information content is relatively complicated is solved.
Alternatively, in addition to storing the information content after the conversion into the first file, the information content after the conversion may be stored into a second file different from the first file, and then the following steps may be included after step S120:
step S124: and the electronic equipment stores the information content in the second coding format into a second file.
The second file is a file different from the first file in a file system of the electronic device, and specifically includes: txt is the first file as described above, then the second file may be a D:/test1.txt file in the file system of the electronic device.
The above-mentioned embodiment of storing the information content in the second encoding format into the second file is, for example: determining "QUJD" as the information content of the second encoding format, and storing "QUJD" in the second file, i.e. storing "QUJD" in the D:/test1.txt file.
Optionally, in addition to storing the information content after the conversion into the first file or the second file, the information content may also be stored into the clipboard, and then the following steps may be included after step S120:
step S125: the electronic device stores the information content in the second encoding format in the clipboard.
A clipboard refers to a section of storage area provided by an operating system for ease of operation, such as: clipboards in windows operating systems, and the like.
The implementation principle and implementation manner of storing the information content in the second encoding format in the clipboard are similar or similar to the implementation principle and implementation manner of step S124, except that the information content in the second encoding format is stored in the second file only in step S124, and the information content in the second encoding format is stored in the clipboard, so the implementation manner and implementation principle of this step are not described here, and if it is not clear, the description of step S124 may be referred to.
In the implementation process, the information content in the second encoding format is stored into a second file; or storing the information content in the second coding format into the clipboard; the method effectively simplifies the code conversion step and solves the problem that the step of converting the codes of the information content is complicated.
Step S126: and the electronic equipment transmits the information content in the second coding format to the terminal equipment.
A terminal device, which is a device having a function of executing a computer program, and may be, for example, a tablet computer, a smart phone, a personal digital assistant, an e-book reader, or the like; or, the terminal device may also be an intelligent sound, a recording pen, a mobile phone, a remote controller, a personal computer, a network switch, a network router, or a desktop host, and specifically, for example: personal computer devices such as desktop computers or notebook computers.
The above-mentioned embodiment of the electronic device sending the information content in the second encoding format to the terminal device is, for example: the electronic device sends the information content in the second encoding format to the terminal device through a Transmission Control Protocol (TCP), which is also called a network communication Protocol and is the basis of the most basic Internet Protocol and the Internet, and consists of an IP Protocol in a network layer and a TCP Protocol in a transport layer. The communication may be based on transmission control protocol/internet protocol (TCP/IP) or may be based on hypertext transfer protocol.
The above embodiment of the electronic device sending the information content in the second encoding format to the terminal device is, for example: the electronic device sends the information content in the second encoding format to the terminal device through a hypertext Transfer Protocol (HTTP), where the HTTP is a simple request response Protocol, and the HTTP generally operates on a Transmission Control Protocol (TCP), and specifies what messages the client may send to the server and what responses the client may obtain.
The above embodiment of the electronic device sending the information content in the second encoding format to the terminal device is, for example: the electronic device transmits the information content in the second encoding format to the terminal device by wireless Communication, where the specific Communication method of wireless Communication may be Short Distance Communication (Short Distance Communication), and the specific Short Distance Communication method is, for example: bluetooth (Bluetooth), wireless local area network 802.11(Wi-Fi), and Infrared Data Association (IrDA); the communication may be performed by a short-range wireless communication method, and specific examples of the short-range wireless communication method include: ZigBee, Ultra wide band (Ultra WideBand), Near Field Communication (NFC), Global Positioning System (GPS), Digital Enhanced Cordless Telecommunications (DECT), and the like.
In the implementation process, the information content in the first coding format is converted into the information content in the second coding format in response to the preset input operation of the user on the input device, so that the coding conversion step is effectively simplified, and the problem that the step of converting the codes of the information content is complicated is solved.
Please refer to fig. 3 for a schematic diagram of a transcoding device provided in an embodiment of the present application; the embodiment of the present application provides a transcoding device 300, including:
a content obtaining module 310, configured to obtain information content in a first encoding format.
The code conversion module 320 is configured to convert the information content in the first code format into the information content in the second code format in response to a preset input operation of the input device by a user, where the first code format is different from the second code format.
Optionally, in an embodiment of the present application, the content obtaining module includes:
and the content determining module is used for determining the content read from the first file in the first coding format as the content in the first coding format.
The transcoding device further comprises:
and the content storage module is used for storing the information content in the second encoding format into the first file.
Optionally, in an embodiment of the present application, the transcoding module includes:
and the first obtaining module is used for responding to the selection operation of the user on the code name of the second code format to obtain the code name of the second code format.
And the second obtaining module is used for performing code conversion on the information content in the first coding format according to the coding name by using the executive program to obtain the information content in the second coding format.
Optionally, in an embodiment of the present application, the apparatus further includes:
and the third obtaining module is used for obtaining the code name of the first code format.
And the conditional conversion module is used for executing the step of performing code conversion on the information content in the first coding format according to the coding name by using the execution program if the coding name in the first coding format is not the same as the coding name in the second coding format.
Optionally, in an embodiment of the present application, the transcoding device further includes:
and the fourth obtaining module is used for compiling the file written by the first language or/and the file written by the second language to obtain the executive program, wherein the first language is different from the second language.
Optionally, in an embodiment of the present application, the transcoding device further includes:
the information storage module is used for storing the information content in the second coding format into a second file; or storing the information content in the second encoding format into a clipboard, wherein the clipboard is a section of storage area provided for the operating system to operate conveniently.
Optionally, in an embodiment of the present application, the input device includes: a mouse or keyboard; a transcoding module comprising:
the response operation module is used for responding to the click operation of the popup menu aiming at the right button of the mouse; or in response to an operation in which a first key of the keyboard and a second key of the keyboard are simultaneously pressed, the first key and the second key being different keys.
It should be understood that the apparatus corresponds to the above-mentioned transcoding method embodiment, and can perform the steps related to the above-mentioned method embodiment, and the specific functions of the apparatus can be referred to the above description, and the detailed description is appropriately omitted here to avoid redundancy. The device includes at least one software function that can be stored in memory in the form of software or firmware (firmware) or solidified in the Operating System (OS) of the device.
Please refer to fig. 4 for a schematic structural diagram of an electronic device according to an embodiment of the present application. An electronic device 400 provided in an embodiment of the present application includes: a processor 410 and a memory 420, the memory 420 storing machine-readable instructions executable by the processor 410, the machine-readable instructions when executed by the processor 410 performing the method as above.
The embodiment of the present application further provides a storage medium 430, where the storage medium 430 stores a computer program, and the computer program is executed by the processor 410 to perform the transcoding method as above.
The storage medium 430 may be implemented by any type of volatile or nonvolatile storage device or combination thereof, such as a Static Random Access Memory (SRAM), an Electrically Erasable Programmable Read-Only Memory (EEPROM), an Erasable Programmable Read-Only Memory (EPROM), a Programmable Read-Only Memory (PROM), a Read-Only Memory (ROM), a magnetic Memory, a flash Memory, a magnetic disk, or an optical disk.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus and method may be implemented in other ways. The apparatus embodiments described above are merely illustrative, and for example, the flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of apparatus, methods and computer program products according to various embodiments of the present application. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
In addition, functional modules in the embodiments of the present application may be integrated together to form an independent part, or each module may exist separately, or two or more modules may be integrated to form an independent part.
In this document, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions.
The above description is only an alternative embodiment of the embodiments of the present application, but the scope of the embodiments of the present application is not limited thereto, and any person skilled in the art can easily conceive of changes or substitutions within the technical scope of the embodiments of the present application, and all the changes or substitutions should be covered by the scope of the embodiments of the present application.

Claims (10)

1. A transcoding method, comprising:
obtaining information content in a first encoding format;
and responding to a preset input operation of a user on an input device, and converting the information content in the first coding format into the information content in a second coding format, wherein the first coding format is different from the second coding format.
2. The method of claim 1, wherein obtaining information content in the first encoding format comprises:
determining the content read from the first file in the first coding format as the content in the first coding format;
after the converting the information content in the first encoding format into the information content in the second encoding format, the method further includes:
and storing the information content in the second encoding format into the first file.
3. The method of claim 2, wherein converting the information content in the first encoding format to the information content in the second encoding format comprises:
responding to the selection operation of a user on the code name of the second code format, and obtaining the code name of the second code format;
and performing code conversion on the information content in the first coding format according to the coding name by using an executive program to obtain the information content in the second coding format.
4. The method of claim 3, further comprising, prior to said transcoding the information content in the first encoding format from the encoding name using an executive program:
obtaining a code name of the first code format;
and if the code name of the first code format is not the same as the code name of the second code format, executing the step of performing code conversion on the information content of the first code format by using the executive program according to the code name.
5. The method of claim 3, further comprising:
and compiling a file written by a first language or/and a file written by a second language to obtain the executive program, wherein the first language is different from the second language.
6. The method according to any of claims 1-5, further comprising, after said converting the information content in the first encoding format to the information content in the second encoding format:
storing the information content in the second encoding format into a second file; or
And storing the information content in the second encoding format into a clipboard, wherein the clipboard is a section of storage area provided for the convenience of operation by an operating system.
7. The method of any of claims 1-5, wherein the input device comprises: a mouse or keyboard; the responding to the preset input operation of the user to the input device comprises the following steps:
responding to the click operation of a popup menu aiming at the right mouse button; or
Responding to the operation that a shortcut key or a combination key of the keyboard is pressed.
8. A transcoding apparatus, comprising:
the content obtaining module is used for obtaining the information content in the first coding format;
and the code conversion module is used for responding to preset input operation of a user on input equipment and converting the information content in the first code format into the information content in the second code format, wherein the first code format is different from the second code format.
9. An electronic device, comprising: a processor and a memory, the memory storing machine-readable instructions executable by the processor, the machine-readable instructions, when executed by the processor, performing the method of any of claims 1 to 7.
10. A storage medium, having stored thereon a computer program which, when executed by a processor, performs the method of any one of claims 1 to 7.
CN201911298754.9A 2019-12-13 2019-12-13 Code conversion method, device, electronic equipment and storage medium Pending CN111078222A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911298754.9A CN111078222A (en) 2019-12-13 2019-12-13 Code conversion method, device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911298754.9A CN111078222A (en) 2019-12-13 2019-12-13 Code conversion method, device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN111078222A true CN111078222A (en) 2020-04-28

Family

ID=70315118

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911298754.9A Pending CN111078222A (en) 2019-12-13 2019-12-13 Code conversion method, device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN111078222A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112464621A (en) * 2020-11-30 2021-03-09 北京航星机器制造有限公司 Python-based application software format conversion implementation method and device

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102073623A (en) * 2009-11-25 2011-05-25 英业达股份有限公司 System and method for converting file coding
CN108780394A (en) * 2015-12-29 2018-11-09 英特尔公司 Hardware device and method for transform coding format
CN108886745A (en) * 2017-03-13 2018-11-23 华为技术有限公司 A kind of method, apparatus and terminal handling service set
US20190138284A1 (en) * 2017-11-03 2019-05-09 International Business Machines Corporation Self re-encoding interpreted application

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102073623A (en) * 2009-11-25 2011-05-25 英业达股份有限公司 System and method for converting file coding
CN108780394A (en) * 2015-12-29 2018-11-09 英特尔公司 Hardware device and method for transform coding format
CN108886745A (en) * 2017-03-13 2018-11-23 华为技术有限公司 A kind of method, apparatus and terminal handling service set
US20190138284A1 (en) * 2017-11-03 2019-05-09 International Business Machines Corporation Self re-encoding interpreted application

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112464621A (en) * 2020-11-30 2021-03-09 北京航星机器制造有限公司 Python-based application software format conversion implementation method and device

Similar Documents

Publication Publication Date Title
US8352962B2 (en) Managing application interactions using distributed modality components
RU2355044C2 (en) Sequential multimodal input
US9021507B2 (en) Dynamic use of data across multiple programs
US20080120448A1 (en) Remote mouse and keyboard using bluetooth
CN108292304B (en) Cross-application digital ink library
US7363027B2 (en) Sequential multimodal input
US20100004918A1 (en) Language translator having an automatic input/output interface and method of using same
JP2014089764A (en) Method for showing user interface element in application
KR101145385B1 (en) Data upload method using shortcut
JP2007251630A (en) Remote desktop displaying method
CN107959932B (en) Method and device for processing wireless access point information and computer readable storage medium
US20190295532A1 (en) Remote Generation of Executable Code for a Client Application Based on Natural Language Commands Captured at a Client Device
CN111078222A (en) Code conversion method, device, electronic equipment and storage medium
US20070268267A1 (en) Transmission apparatus and transmission method thereof
US20190227698A1 (en) Splitting and merging files via a motion input on a graphical user interface
KR20220061926A (en) Method and apparatus for switching skin of mini-program page, and electronic device
KR101432761B1 (en) Terminal and method for amendment letter thereof
US20040126017A1 (en) Grammar-determined handwriting recognition
US20190361534A1 (en) Interpreting and generating input and output gestures
KR20220092484A (en) Method and computer program for generating a menu model of a character user interface
KR20210154330A (en) Artificial intelligence interface system for dignose skin and method for advertisement platform
Kumar et al. Voice Based Email System for People with Visual Impairment
CN111209023A (en) Skill service updating method and device, electronic equipment and readable storage medium
CN110908781B (en) Android application program static analysis method based on multitasking mechanism
US11671529B2 (en) Cross-channel configurable navigation

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
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20200428

WD01 Invention patent application deemed withdrawn after publication