Detailed Description
The technical solutions 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, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
In this specification, adjectives such as first and second may only be used to distinguish one element or action from another, without necessarily requiring or implying any actual such relationship or order. References to an element or component or step (etc.) should not be construed as limited to only one of the element, component, or step, but rather to one or more of the element, component, or step, etc., where the context permits.
In the present specification, the sizes of the respective portions shown in the drawings are not drawn in an actual proportional relationship for the convenience of description.
The present application provides a debugging method of a mobile terminal, as shown in fig. 1, which mainly includes steps S101 to S103, as detailed below:
step S101: and generating data to be debugged, wherein the data to be debugged comprises a plurality of subdata and interval numbers, and the interval numbers are used for separating the subdata.
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 locate the problem occurring in the mobile terminal to be debugged, the data to be debugged comprises a plurality of subdata and an interval number, wherein the interval number is used for separating the subdata. As an embodiment of the present application, the generating of the data to be debugged may be to cut the data to be debugged according to a preset length to obtain a plurality of initial cut data, and then add an interval number for separating a plurality of sub data at the end of each of the plurality of initial cut data.
Step S102: before the data to be debugged is sent each time, the sub-data are reassembled according to the preset mapping relation, and the assembled data are obtained.
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 unknown to outsiders. As an embodiment of the present application, before sending data to be debugged each time, the sub-data is reassembled according to a preset mapping relationship, and the obtained assembly 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 re-assembling the sub-data according to the new corresponding relation to obtain the 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 is used when the data to be debugged is sent next time. The reassembling the plurality of subdata according to the new corresponding relationship to obtain the 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 sent last time from the cache, and then adding the new corresponding relation to the subdata before each interval number when the subdata is reassembled. Thus, when the data to be debugged needs 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 allocated to the mobile terminal to be debugged, for example, if the data to be debugged includes 3 pieces of sub data and the interval numbers thereof, and the interval numbers of the three pieces of sub data are respectively and fixedly corresponding to the three mobile terminals to be debugged (or two mobile terminals to be debugged, and therefore, the other interval number is actually an interval number of null sub data, or one mobile terminal to be debugged, and therefore, the other two interval numbers are actually interval numbers of two pieces of null sub data, or the interval numbers of three pieces of null sub data), only the data to be debugged needs to be placed in the interval numbers of the corresponding sub data to generate one piece of data, and the data is sent to the three mobile terminals to be debugged (.
Still taking the data to be debugged including 3 pieces of sub data and the interval number thereof as an example, the above-mentioned re-assembling the sub data according to the preset mapping relationship before sending the data to be debugged each time to obtain the assembled data may be described as follows, including steps S1 to S3:
step S1: setting a null data, namely, all the subdata interval numbers have no data, storing the data to be debugged to be sent to the three mobile terminals to be debugged into a cache according to the new corresponding relationship between the mobile terminal to be debugged and the interval numbers, wherein the new corresponding relationship between the mobile terminal to be debugged and the interval numbers is the new corresponding relationship between the mobile terminal to be debugged and the interval numbers in the data to be debugged generated when the step S2 is executed last time after the data to be debugged is sent last time. For example, the correspondence relationship between the mobile terminal to be debugged (three mobile terminals to be debugged, Ta, Tb, and Tc) and the interval number of the sub data (three sub data interval numbers of 1, 2, and 3) generated in the step S2 when the data to be debugged is transmitted last time is TbTcTa, the mobile terminal to be debugged indicating the interval number of the 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 the 2 nd sub data is Tc, the mobile terminal to be debugged of the interval number of the 3 rd sub data is Ta, a null data is first set in step S1, the data to be sent to the three mobile terminals to be debugged are respectively put into the interval numbers of the sub data, wherein Db represents data sent to the to-be-debugged mobile terminal Tb, Dc represents data sent to the to-be-debugged mobile terminal Tc, and Da represents data sent to the to-be-debugged mobile terminal Ta.
Step S2: and transforming the interval number of each subdata 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 for the next time of sending the data to be debugged, that is, for the next time of executing step S1. In the embodiment of the present application, the new correspondence between the mobile terminal to be debugged and the interval number in the data to be debugged needs to satisfy the following requirements: grouping the interval numbers of the sub-data into a set, where the data in the set is still the data in the set after transformation and is in a one-to-one mapping, for example, for a piece of data to be debugged containing the interval numbers of 3 sub-data, the transformation may be a circular right shift, that is, 1 → 2, 2 → 3, 3 → 1. When the cycle right shift is used as the transformation, if the corresponding relationship between the sub data interval number and the mobile terminal to be debugged in one piece of data to be debugged sent this time is TbTcTa, the corresponding relationship between the sub data interval number and the mobile terminal to be debugged when the data to be debugged is sent next time is TaTbTc.
Step S3: the correspondence between the debugger newly generated in step S2 and the sub data interval number is added to the data of each sub data interval number.
For step S3, in order to simply combine the interval numbers of the sub-data in steps S2 and S1, for example, if X denotes that the mobile terminal to be debugged that receives the interval number of the own sub-data (sub-data interval number No. 1) should receive the sub-data interval number X in the next stripe, Y denotes that the mobile terminal to be debugged that receives the sub-data interval number (sub-data interval number No. 2) should receive the sub-data interval number Y in the next stripe, and Z denotes that the mobile terminal to be debugged that receives the sub-data interval number (sub-data interval number No. 3) should receive the sub-data interval number Z in the next stripe, X is 2, Y is 3, and Z is 1 according to the above example of moving right around the loop.
Step S103: and sending the assembly data so that 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.
As an embodiment of the present application, the implementation of step S103 may be: and sending the assembly data obtained in the step S102 so that the mobile terminal to be debugged can analyze the assembly data received this time, and obtain the data to be debugged 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 subdata interval number where the next data to be debugged, which is included in the data to be debugged obtained last time, is located, then obtains the interval number of the subdata where the next data to be debugged is located from the received data to be debugged, and stores the interval number of the subdata.
As can be seen from the 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 that the problem that the mobile terminal cannot be debugged after being sold in the prior art is solved; on the other hand, because the assembly data is obtained by re-assembling the subdata according to the preset mapping relation, and the preset mapping relation is generally unknown to outsiders, irrelevant personnel cannot debug the mobile terminal, and the safety of the development information of the mobile terminal is ensured.
Referring to fig. 2, a debugging apparatus of a mobile terminal according to an embodiment of the present application is provided, where the debugging apparatus may be a device supporting wifi direct connection or a function module therein. The apparatus illustrated in fig. 2 may include a generation module 201, an assembly module 202, and a transmission module 203, which are detailed as follows:
the generating module 201 is configured to generate data to be debugged, where the data to be debugged includes a plurality of subdata and an interval number, and the interval number is used to separate the plurality of subdata;
the assembling module 202 is configured to reassemble the sub-data according to a preset mapping relationship before sending the data to be debugged each time, so as to obtain assembled data;
the sending module 203 is configured to send the assembly data, so that the mobile terminal to be debugged obtains data to be debugged 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, wherein:
the cutting unit is used for cutting the data to be debugged according to a preset length to obtain a plurality of initial cutting data;
an appending unit for appending a space number at the end of each of the plurality of pieces 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 repacking unit is used for reassembling the sub data according to the new corresponding relation to obtain assembled data and storing the new corresponding relation to the cache.
Optionally, the data reloading unit of the above example may include a reading unit and a correspondence relation reloading 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 sent last time from the cache;
and the corresponding relation regenerating unit is used for adding a new corresponding relation to the sub data before each interval number when the 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 analyzes the assembly data received this time, and obtains the data to be debugged, which is to be received next time, from the interval number.
As can be seen from the debugging apparatus 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 that the problem that the mobile terminal cannot be debugged after being sold in the prior art is solved; on the other hand, because the assembly data is obtained by re-assembling the subdata according to the preset mapping relation, and the preset mapping relation is generally unknown to outsiders, irrelevant personnel cannot debug the mobile terminal, and the safety of the development information of the mobile terminal is ensured.
Fig. 3 is a schematic structural diagram of an apparatus provided in 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 processor 30, when executing the computer program 32, implements the steps in the above-described embodiments of the debugging method of the mobile terminal, such as the steps S101 to S103 shown in fig. 1. Alternatively, the processor 30, when executing the computer program 32, implements the functions of each module/unit in each apparatus embodiment described above, such as the functions of the generation module 201, the assembly module 202, and the transmission module 203 shown in fig. 2.
Illustratively, the computer program 32 of the debugging method of the mobile terminal mainly includes: generating data to be debugged, wherein the data to be debugged comprises a plurality of subdata and interval numbers, and the interval numbers are used for separating the subdata; before sending the data to be debugged each time, re-assembling the plurality of subdata according to a preset mapping relation to obtain assembled data; and sending the assembly data so that 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.
The computer program 32 may be partitioned into one or more modules/units, which are stored in the memory 31 and executed by the processor 30 to accomplish the present application. One or more of the modules/units may be a series of computer program instruction segments capable of performing specific functions, which are used to describe the execution of the computer program 32 in the device 3. For example, the computer program 32 may be divided into functions of the generation module 201, the assembly module 202, and the transmission module 203 (modules in the virtual device), and the specific functions of each module are as follows: the generating module 201 is configured to generate data to be debugged, where the data to be debugged includes a plurality of subdata and an interval number, and the interval number is used to separate the plurality of subdata; the assembling module 202 is configured to reassemble the sub-data according to a preset mapping relationship before sending the data to be debugged each time, so as to obtain assembled data; the sending module 203 is configured to send the assembly data, so that the mobile terminal to be debugged obtains data to be debugged 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. Those skilled in the art will appreciate that fig. 3 is merely an example of a device 3 and does not constitute a limitation of device 3 and may include more or fewer components than shown, or some components in combination, or different components, e.g., a computing device may also include input-output devices, network access devices, buses, etc.
The Processor 30 may be a Central Processing Unit (CPU), other general purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), an off-the-shelf Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic, discrete hardware components, etc. 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 provided on the device 3, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), and the like. 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 for storing 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, for convenience and brevity of description, only the above-mentioned division of the functional units and modules is illustrated, and in practical applications, the above-mentioned functions may be distributed as required to different functional units and modules, that is, the internal structure of the apparatus may be divided into different functional units or modules to implement all or part of the functions described above. Each functional unit and module in the embodiments may be integrated in one processing unit, or each unit may exist alone physically, or two or more units are integrated in one unit, and the integrated unit may be implemented in a form of hardware, or in a form of 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 processes of the units and modules in the above-mentioned apparatus may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the above embodiments, the descriptions of the respective embodiments have respective emphasis, and reference may be made to the related descriptions of other embodiments for parts that are not described or illustrated in a certain embodiment.
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 implementation. 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 ways. For example, the above-described apparatus/device embodiments are merely illustrative, and for example, a module or a unit may be divided into only one logic function, and may be implemented in other ways, for example, a plurality of units or components may be combined or integrated into another apparatus, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
Units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated modules/units, if implemented in the form of software functional units and sold or used as separate products, may be stored in a non-transitory computer readable storage medium. Based on such understanding, all or part of the processes in the method of the embodiments described above may also be implemented by instructing related hardware through a computer program, where the computer program of the debugging method of the mobile terminal may be stored in a computer readable storage medium, and when being executed by a processor, the computer program may implement the steps of the embodiments of the methods described above, that is, generating 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; before sending the data to be debugged each time, re-assembling the plurality of subdata according to a preset mapping relation to obtain assembled data; and sending the assembly data so that 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. Wherein the computer program comprises computer program code, which may be in the form of source code, object code, an executable file or some intermediate form, etc. The non-transitory computer readable medium may include: any entity or device capable of carrying computer program code, recording medium, U.S. disk, removable hard disk, magnetic disk, optical disk, computer Memory, Read-Only Memory (ROM), Random Access Memory (RAM), electrical carrier wave signals, telecommunications signals, software distribution media, and the like. It should be noted that the non-transitory computer readable medium may contain content that is subject to appropriate increase or decrease as required by legislation and patent practice in jurisdictions, for example, in some jurisdictions, non-transitory computer readable media does not include electrical carrier signals and telecommunications signals as subject to legislation and patent practice. The above embodiments are only used to illustrate the technical solutions of the present application, and not to limit the same; 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 solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; such modifications and substitutions do not substantially depart from the spirit and scope of the embodiments of the present application and are intended to be included within the scope of the present application. The above-mentioned embodiments, objects, technical solutions and advantages of the present application are described in further detail, it should be understood that the above-mentioned embodiments are merely exemplary embodiments of the present application, and are not intended to limit the scope of the present application, and any modifications, equivalent substitutions, improvements and the like made within the spirit and principle of the present application should be included in the scope of the present invention.