Detailed Description
The following description of the embodiments of the present application will be made clearly and fully with reference to the accompanying drawings, in which it is evident that the embodiments described are only some, but not all, of the embodiments of the present application. All other embodiments, which can be made by one of ordinary skill in the art without undue burden from the present disclosure, are within the scope of the present disclosure.
In this specification, adjectives such as first and second may be used solely to distinguish one element or action from another element or action without necessarily requiring or implying any actual such relationship or order. Where the environment permits, reference to an element or component or step (etc.) should not be construed as limited to only one of the element, component, or step, but may be one or more of the element, component, or step, etc.
In the present specification, for convenience of description, the dimensions of the various parts shown in the drawings are not drawn in actual scale.
The application provides a debugging method of a mobile terminal, as shown in fig. 1, mainly comprising steps S101 to S103, and the details are as follows:
step S101: generating data to be debugged, wherein the data to be debugged comprises a plurality of sub-data and interval numbers, and the interval numbers are used for separating the plurality of sub-data.
In the embodiment of the application, the data to be debugged is generated by a Personal Computer (PC) serving as an upper computer, and is sent to the mobile terminal to be debugged to be used for positioning the problem of the mobile terminal to be debugged, wherein the data to be debugged comprises a plurality of sub-data and interval numbers, and the interval numbers are used for separating the sub-data. As an embodiment of the present application, generating the data to be debugged may be cutting the data to be debugged according to a preset length to obtain a plurality of initial cutting data, and then adding an interval number for separating a plurality of sub-data at the end of each initial cutting data of the plurality of initial cutting data.
Step S102: before the data to be debugged is sent each time, a plurality of sub-data are reassembled according to a preset mapping relation to obtain assembled data.
In the embodiment of the present application, the preset mapping relationship is determined by the manufacturer of the mobile terminal, and unless authorized, the relationship is generally not known to outsiders. As an embodiment of the present application, before sending data to be debugged each time, reassembling a plurality of sub-data according to a preset mapping relationship, where the obtaining of the assembled data may be: generating a new corresponding relation between the mobile terminal to be debugged and the interval number according to a preset mapping relation; and reassembling the plurality of sub-data according to the new corresponding relation to obtain assembled data, and storing the new corresponding relation to a cache. It should be noted that the new correspondence between the mobile terminal to be debugged and the interval number will be used when the data to be debugged is transmitted next time. Wherein, the above-mentioned several sub-data are reassembled according to the new corresponding relation, and the obtained assembly data may be: and reading the corresponding relation between the mobile terminal to be debugged and the interval number when the data to be debugged is transmitted last time from the cache, and then adding the new corresponding relation into the sub data before each interval number when a plurality of sub data are reassembled. Therefore, when the data to be debugged is required to be sent to the mobile terminal to be debugged, the data to be debugged only needs to be directly placed in an interval number distributed by the mobile terminal to be debugged, for example, the data to be debugged only needs to be placed in an interval number between the corresponding sub-data to generate one data to be sent to the three mobile terminals to be debugged (or the two mobile terminals to be debugged, or the mobile terminal to be debugged, therefore, the other interval number is actually an interval number of empty sub-data), or the other interval number is actually an interval number of two empty sub-data, and the data to be debugged only needs to be placed in the interval number between the corresponding sub-data to generate one data to be sent to the three mobile terminals to be debugged (or the two mobile terminals to be debugged, or the one mobile terminal to be debugged).
Taking the example that the data to be debugged includes 3 sub-data and interval numbers thereof, before each time the data to be debugged is sent, the sub-data are reassembled according to a preset mapping relationship, and the obtained assembled data can be described as follows, including steps S1 to S3:
step S1: setting a null data, namely that each sub-data interval number has no data, and storing the data to be debugged, which are to be sent to the three mobile terminals to be debugged, into a cache according to the new corresponding relation between the mobile terminals to be debugged and the interval number, wherein the new corresponding relation between the mobile terminals to be debugged and the interval number is the new corresponding relation between the mobile terminals to be debugged and the interval number in the data to be debugged, which is generated when the data to be debugged is sent last time, namely, the step S2 is executed last time. For example, when the data to be debugged is sent last time, the corresponding relation between the mobile terminal to be debugged (set to Ta, tb and Tc three mobile terminals to be debugged) and the interval number of the sub data (set to 1, 2 and 3 interval numbers of the sub data) generated in step S2 is TbTcTa, the mobile terminal to be debugged of the interval number of 1 st sub data in one piece of data to be debugged is Tb, the mobile terminal to be debugged of the interval number of 2 nd sub data is Tc, the mobile terminal to be debugged of the interval number of 3 rd sub data is Ta, then in step S1, a blank data is set first, the data to be sent to the three mobile terminals to be debugged are respectively and correspondingly placed in the interval numbers of the sub data, db represents the data to be sent to the mobile terminal to be debugged Tb, dc represents the data to be sent to the mobile terminal to be debugged Tc.
Step S2: and transforming the interval number of each sub data to generate a new corresponding relation between the mobile terminal to be debugged and the interval number in the data to be debugged.
As described above, the new correspondence between the mobile terminal to be debugged and the interval number in the data to be debugged is used when the data to be debugged is transmitted next time, that is, when step S1 is executed next time. In the embodiment of the present application, a new correspondence between a mobile terminal to be debugged and an interval number in data to be debugged needs to satisfy such requirements: the interval numbers of the sub-data are grouped into a set, and the data in the set are still data in the set after transformation and are mapped one by one, for example, for a piece of data to be debugged containing interval numbers of 3 sub-data, the transformation can be circularly right-shifted, namely 1- > 2, 2- > 3, 3- > 1. When the cyclic right shift is used as the transformation, if the corresponding relation between the sub-data interval number and the mobile terminal to be debugged in one piece of data to be debugged, which is sent at the time, is TbTc, the corresponding relation between the sub-data interval number and the mobile terminal to be debugged is the next time the data to be debugged is sent.
Step S3: and adding the corresponding relation between the debugger newly generated in the step S2 and the sub-data interval numbers into the data of each sub-data interval number.
For step S3, for example, if X represents that the mobile terminal to be debugged that receives the interval number of the present sub data (1 sub data interval number) should receive the X sub data interval number in the next stripe, Y represents that the mobile terminal to be debugged that receives the present sub data interval number (2 sub data interval number) should receive the Y sub data interval number in the next stripe, and Z represents that the mobile terminal to be debugged that receives the present sub data interval number (3 sub data interval number) should receive the Z sub data interval number in the next stripe, x=2, y=3, z=1 according to the aforementioned example of cyclic right shift.
Step S103: and sending the assembly data to enable the mobile terminal to be debugged to obtain the data to be debugged, which is to be received next time, according to the assembly data received at the time.
As an embodiment of the present application, the implementation of step S103 may be: and (3) sending the assembly data obtained in the step S102 so that the mobile terminal to be debugged analyzes the received assembly data, and obtaining the data to be debugged, which is to be received next time, from the interval number. Specifically, the mobile terminal to be debugged receives corresponding data to be debugged according to the interval number of the sub data where the next data to be debugged is contained in the data to be debugged obtained last time, then acquires the interval number of the sub data where the next data to be debugged is contained in the received data to be debugged, and stores the interval number of the sub data.
As can be seen from the above-mentioned debugging method of the mobile terminal illustrated in fig. 1, on one hand, after the assembly data is sent to the mobile terminal to be debugged, the mobile terminal to be debugged can obtain the data to be debugged to be received next time according to the assembly data received this time, so as to solve the problem that the mobile terminal in the prior art cannot be debugged after being sold; on the other hand, the sub-data are reassembled according to the preset mapping relation, and the preset mapping relation is generally unknown to outsiders, so that irrelevant personnel cannot debug the mobile terminal, and the safety of development information of the mobile terminal is ensured.
Please refer to fig. 2, which is a debugging device of a mobile terminal provided in the embodiment of the present application, where the device may be a device supporting wifi direct connection or a functional module therein. The apparatus illustrated in fig. 2 may include a generating module 201, an assembling module 202, and a transmitting module 203, which are described in detail below:
a generating module 201, configured to generate data to be debugged, where the data to be debugged includes a plurality of sub-data and an interval number, and the interval number is used to separate the plurality of sub-data;
an assembling module 202, configured to reassemble a plurality of sub-data according to a preset mapping relationship before sending the data to be debugged each time, to obtain assembled data;
and the sending module 203 is configured to send the assembly data, so that the mobile terminal to be debugged obtains the data to be debugged that is to be received next time according to the assembly data received this time.
Optionally, the generating module 201 illustrated in fig. 2 may include a cutting unit and an attaching unit, where:
the cutting unit is used for cutting the data to be debugged according to the preset length to obtain a plurality of initial cutting data;
an attaching unit for attaching an interval number at the end of each of the plurality of initial cut data.
Optionally, the assembly module 202 illustrated in fig. 2 may include a correspondence generating unit and a data reloading unit, where:
the corresponding relation generating unit is used for generating a new corresponding relation between the mobile terminal to be debugged and the interval number according to a preset mapping relation;
and the data reloading unit is used for reloading the plurality of sub-data according to the new corresponding relation to obtain the assembled data, and storing the new corresponding relation to the cache.
Alternatively, the data reloading unit of the above example may include a reading unit and a correspondence regenerating unit, wherein:
the reading unit is used for reading the corresponding relation between the mobile terminal to be debugged and the interval number when the data to be debugged is transmitted last time from the cache;
and the corresponding relation regenerating unit is used for adding the new corresponding relation into the sub data before each interval number when the plurality of sub data are reassembled.
Optionally, the sending module 203 illustrated in fig. 2 is specifically configured to send the assembly data, so that the mobile terminal to be debugged parses the assembly data received this time, and obtains the data to be debugged to be received next time from the interval number.
As can be seen from the above-mentioned debugging device of the mobile terminal illustrated in fig. 2, on one hand, after the assembly data is sent to the mobile terminal to be debugged, the mobile terminal to be debugged can obtain the data to be debugged to be received next time according to the assembly data received this time, so as to solve the problem that the mobile terminal in the prior art cannot be debugged after being sold; on the other hand, the sub-data are reassembled according to the preset mapping relation, and the preset mapping relation is generally unknown to outsiders, so that irrelevant personnel cannot debug the mobile terminal, and the safety of development information of the mobile terminal is ensured.
Fig. 3 is a schematic structural diagram of an apparatus according to an embodiment of the present application. As shown in fig. 3, the apparatus 3 of this embodiment mainly includes: a processor 30, a memory 31 and a computer program 32 stored in the memory 31 and executable on the processor 30, such as a program of a debugging method of a mobile terminal. The steps in the above-described embodiments of the debugging method of the mobile terminal, such as steps S101 to S103 shown in fig. 1, are implemented when the processor 30 executes the computer program 32. Alternatively, the processor 30 may implement the functions of the modules/units in the above-described device embodiments when executing the computer program 32, such as the functions of the generating module 201, the assembling module 202, and the transmitting module 203 shown in fig. 2.
Illustratively, the computer program 32 of the debugging method of the mobile terminal mainly comprises: generating data to be debugged, wherein the data to be debugged comprises a plurality of sub-data and interval numbers, and the interval numbers are used for separating the plurality of sub-data; before data to be debugged are sent each time, a plurality of sub-data are reassembled according to a preset mapping relation to obtain assembled data; and sending the assembly data to enable the mobile terminal to be debugged to obtain the data to be debugged, which is to be received next time, according to the assembly data received at the time.
The computer program 32 may be divided into one or more modules/units, which are stored in the memory 31 and executed by the processor 30 to complete the present application. One or more of the modules/units may be a series of computer program instruction segments capable of performing a specific function for describing the execution of the computer program 32 in the device 3. For example, the computer program 32 may be divided into functions of the generating module 201, the assembling module 202, and the transmitting module 203 (modules in the virtual device), each of which has the following specific functions: a generating module 201, configured to generate data to be debugged, where the data to be debugged includes a plurality of sub-data and an interval number, and the interval number is used to separate the plurality of sub-data; an assembling module 202, configured to reassemble a plurality of sub-data according to a preset mapping relationship before sending the data to be debugged each time, to obtain assembled data; and the sending module 203 is configured to send the assembly data, so that the mobile terminal to be debugged obtains the data to be debugged that is to be received next time according to the assembly data received this time.
The device 3 may include, but is not limited to, a processor 30, a memory 31. It will be appreciated by those skilled in the art that fig. 3 is merely an example of device 3 and is not intended to limit device 3, and may include more or fewer components than shown, or may combine certain components, or different components, e.g., a computing device may also include an input-output device, a network access device, a bus, etc.
The processor 30 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.
The memory 31 may be an internal storage unit of the device 3, such as a hard disk or a memory of the device 3. The memory 31 may also be an external storage device of the device 3, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card) or the like, which are provided on the device 3. Further, the memory 31 may also include both an internal storage unit of the device 3 and an external storage device. The memory 31 is used to store computer programs and other programs and data required by the device. The memory 31 may also be used to temporarily store data that has been output or is to be output.
It will be apparent to those skilled in the art that the above-described functional units and modules are merely illustrated for convenience and brevity of description, and in practical application, the above-described functional distribution may be performed by different functional units and modules according to needs, that is, the internal structure of the apparatus is divided into different functional units or modules to perform all or part of the above-described functions. The functional units and modules in the embodiment may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit, where the integrated units may be implemented in a form of hardware or a form of a software functional unit. In addition, specific names of the functional units and modules are only for convenience of distinguishing from each other, and are not used for limiting the protection scope of the present application. The specific working process of the units and modules in the above device may refer to the corresponding process in the foregoing method embodiment, which is not described herein again.
In the foregoing embodiments, the descriptions of the embodiments are emphasized, and in part, not described or illustrated in any particular embodiment, reference is made to the related descriptions of other embodiments.
Those of ordinary skill in the art will appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus/device and method may be implemented in other manners. For example, the apparatus/device embodiments described above are merely illustrative, e.g., the division of modules or units is merely a logical functional division, and there may be additional divisions when actually implemented, e.g., multiple units or components may be combined or integrated into another apparatus, or some features may be omitted or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection via interfaces, devices or units, which may be in electrical, mechanical or other forms.
The units described as separate units may or may not be physically separate, and units shown as units may or may not be physical units, may be located in one place, or may be distributed over a plurality of network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
In addition, each functional unit in each embodiment of the present application may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit. The integrated units may be implemented in hardware or in software functional units.
The integrated modules/units, if implemented in the form of software functional units and sold or used as stand-alone products, may be stored in a non-transitory computer readable storage medium. Based on such understanding, the present application may implement all or part of the flow of the method of the foregoing embodiment, or may be implemented by implementing relevant hardware by a computer program to instruct relevant hardware, where the computer program of the method of debugging a mobile terminal may be stored in a computer readable storage medium, where the computer program, when executed by a processor, may implement the steps of each embodiment of the foregoing method, that is, generate data to be debugged, where the data to be debugged includes a number of sub-data and an interval number, where the interval number is used to separate the number of sub-data; before data to be debugged are sent each time, a plurality of sub-data are reassembled according to a preset mapping relation to obtain assembled data; and sending the assembly data to enable the mobile terminal to be debugged to obtain the data to be debugged, which is to be received next time, according to the assembly data received at the time. Wherein the computer program comprises computer program code, which may be in the form of source code, object code, executable files or in some intermediate form, etc. The non-transitory computer readable medium may include: any entity or device capable of carrying computer program code, a recording medium, a USB flash disk, a removable hard disk, a magnetic disk, an optical disk, a computer Memory, a Read-Only Memory (ROM), a random access Memory (RAM, random Access Memory), an electrical carrier signal, a telecommunications signal, a software distribution medium, and so forth. It should be noted that the non-transitory computer readable medium may include content that is suitably scaled according to the requirements of jurisdictions in which the legislation and patent practice, such as in some jurisdictions, the non-transitory computer readable medium does not include electrical carrier signals and telecommunication signals according to the legislation and patent practice. The above embodiments are only for illustrating the technical solution of the present application, and are not limiting thereof; although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit and scope of the technical solutions of the embodiments of the present application, and are intended to be included in the scope of the present application. The foregoing detailed description of the embodiments has been presented for purposes of illustration and description, and it should be understood that the foregoing is by way of example only, and is not intended to limit the scope of the invention.