CN108536467A - Location processing method, device, terminal device and the storage medium of code - Google Patents

Location processing method, device, terminal device and the storage medium of code Download PDF

Info

Publication number
CN108536467A
CN108536467A CN201810307291.7A CN201810307291A CN108536467A CN 108536467 A CN108536467 A CN 108536467A CN 201810307291 A CN201810307291 A CN 201810307291A CN 108536467 A CN108536467 A CN 108536467A
Authority
CN
China
Prior art keywords
code
new version
display layer
end display
information
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201810307291.7A
Other languages
Chinese (zh)
Other versions
CN108536467B (en
Inventor
赵慧
陈蛟
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
China United Network Communications Group Co Ltd
Original Assignee
China United Network Communications Group 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 China United Network Communications Group Co Ltd filed Critical China United Network Communications Group Co Ltd
Priority to CN201810307291.7A priority Critical patent/CN108536467B/en
Publication of CN108536467A publication Critical patent/CN108536467A/en
Application granted granted Critical
Publication of CN108536467B publication Critical patent/CN108536467B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/71Version control; Configuration management
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/72Code refactoring

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Security & Cryptography (AREA)
  • Stored Programmes (AREA)
  • User Interface Of Digital Computer (AREA)

Abstract

The application provides a kind of location processing method of code, device, terminal device and storage medium, this method:Obtain the new version information and legacy version information of intended application, new version information includes new version interface image and the corresponding new version front end of new version interface image shows that layer identification code, legacy version information include that the corresponding legacy version interface image of intended application and the corresponding legacy version front end of legacy version interface image show layer identification code;According to new version information and legacy version information, determine that the first distinctive information of new version interface image and legacy version interface image and new version front end show that layer identification code shows the second distinctive information of layer identification code with legacy version front end;According to the first distinctive information and the second distinctive information, layer identification code, which carries out localization process, to be shown to new version front end.Developer can be made to be quickly found out new version front end and show the part that layer identification code shows that layer identification code is changed with respect to legacy version front end, the development efficiency of developer is improved, effectively save cost.

Description

Code positioning processing method and device, terminal equipment and storage medium
Technical Field
The present application relates to the field of internet technologies, and in particular, to a method and an apparatus for positioning and processing a code, a terminal device, and a storage medium.
Background
With the rapid development of internet technology, various applications become the basis for meeting the network requirements of people, and with the continuous change of the requirements of people, the functions of the applications also need to be improved continuously, so that developers need to modify codes to complete the development of new versions.
In the process of developing a new version, some functions may be added, deleted or modified compared with the old version, and after the new version is developed, the functions may need to be further improved, at this time, if a new developer improves the functions, the new developer needs to be familiar with a code frame for a long time, especially in the case of software iterative development, the codes corresponding to the contents of the functions are too much and scattered, so that the new developer cannot easily find the codes corresponding to the corresponding functions.
In the prior art, developers usually find modified function codes by searching line by line, so that the time cost and the labor cost are high, and the development efficiency is low. Therefore, how to effectively search the codes corresponding to the application functions becomes an urgent technical problem to be solved.
Disclosure of Invention
The application provides a code positioning processing method and device, terminal equipment and a storage medium, and aims to overcome the defects that in the prior art, a change code is searched manually line by line, the efficiency is low, the time cost is high and the like.
A first aspect of the present application provides a method for positioning and processing a code, including:
acquiring new version information and old version information of a target application, wherein the new version information comprises a new version interface image and a new version front end display layer code corresponding to the new version interface image, and the old version information comprises an old version interface image corresponding to the target application and an old version front end display layer code corresponding to the old version interface image;
according to the new version information and the old version information, determining first difference information of the new version interface image and the old version interface image and second difference information of the new version front end display layer code and the old version front end display layer code;
and positioning the new version front end display layer code according to the first difference information and the second difference information.
Another aspect of the present application provides a code positioning processing apparatus, including:
the system comprises an acquisition module, a display module and a display module, wherein the acquisition module is used for acquiring new version information and old version information of a target application, the new version information comprises a new version interface image and a new version front end display layer code corresponding to the new version interface image, and the old version information comprises an old version interface image corresponding to the target application and an old version front end display layer code corresponding to the old version interface image;
the determining module is used for determining first difference information of the new version interface image and the old version interface image and second difference information of the new version front-end display layer code and the old version front-end display layer code according to the new version information and the old version information;
and the processing module is used for positioning the new version front end display layer code according to the first difference information and the second difference information.
Yet another aspect of the present application provides a terminal device, including: at least one processor and memory;
the memory stores a computer program; the at least one processor executes the computer program stored by the memory to implement the method as described above.
Yet another aspect of the application provides a computer readable storage medium having stored therein a computer program which, when executed, implements a method as described above. .
According to the code positioning processing method, the code positioning processing device, the terminal equipment and the storage medium, the new version front end display layer code is positioned according to the first difference information of the new version interface image and the old version interface image and the second difference information of the new version front end display layer code and the old version front end display layer code, so that a developer can quickly find a part of the new version front end display layer code which is modified relative to the old version front end display layer code, the development efficiency of the developer is improved, and the labor cost and the time cost are effectively saved.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly introduced below, and it is obvious that the drawings in the following description are some embodiments of the present application, and for those skilled in the art, other drawings can be obtained according to these drawings without inventive exercise.
Fig. 1 is a schematic flowchart of a code positioning processing method according to an embodiment of the present application;
fig. 2 is a schematic flowchart of a code positioning processing method according to another embodiment of the present application;
FIG. 3 is a schematic diagram illustrating the interface image comparison between the new version and the old version according to an embodiment of the present application;
fig. 4 is a schematic diagram of a corresponding relationship provided in an embodiment of the present application;
fig. 5 is a schematic structural diagram of a device for positioning and processing codes according to an embodiment of the present application;
fig. 6 is a schematic structural diagram of a terminal device according to an embodiment of the present application.
With the above figures, there are shown specific embodiments of the present application, which will be described in more detail below. These drawings and written description are not intended to limit the scope of the disclosed concepts in any way, but rather to illustrate the concepts of the disclosure to those skilled in the art by reference to specific embodiments.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present application clearer, 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 some embodiments of the present application, but not all 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.
The terms referred to in this application are explained first:
the application comprises the following steps: the system refers to a client application program which can be installed on an intelligent terminal such as a mobile phone, a tablet computer, a desktop computer and the like, and is used for displaying a certain interface to a user and realizing interaction with the user so as to realize functions such as communication, entertainment, payment and the like, such as WeChat, QQ, payment treasure and the like.
Front-end display layer code: the code is used for generating display functions of a display interface after execution.
Interface image: the image is obtained by means of screen capture and the like, and an interface is displayed by the application.
A code segment: the code is composed of one or more lines of code and packaged into a small whole body, and is used for defining or describing the attributes of one block displayed on the interface, such as a top code segment packaged by a keyword such as struct, model and the like, and the definition code of the attributes of the top to be displayed is included in the code, such as the position, the size, the length and the width of the top on the display interface.
Furthermore, the terms "first", "second", etc. are used for descriptive purposes only and are not to be construed as indicating or implying relative importance or implicitly indicating the number of technical features indicated. In the description of the following examples, "plurality" means two or more unless specifically limited otherwise.
The following several specific embodiments may be combined with each other, and details of the same or similar concepts or processes may not be repeated in some embodiments. Embodiments of the present invention will be described below with reference to the accompanying drawings.
Example one
The embodiment provides a code positioning processing method, which is used for providing code positioning for developers so that the developers can quickly find modified codes. The execution subject of this embodiment is a positioning processing device of a code, and the device may be disposed in a terminal device, and the terminal device may include but is not limited to a desktop computer, a notebook computer, and a tablet computer.
As shown in fig. 1, a schematic flow chart of a code positioning processing method provided in this embodiment is shown, where the method includes:
step 101, new version information and old version information of a target application are obtained, the new version information comprises a new version interface image and a new version front end display layer code corresponding to the new version interface image, and the old version information comprises an old version interface image corresponding to the target application and an old version front end display layer code corresponding to the old version interface image.
Specifically, when a developer newly adds a software development project of an application and the function of the application is improved by a previous developer on the basis of an old version, the developer needs to know what modifications the previous developer has made to the code of the old version front-end display layer, and the positioning processing device of the code provided by the application can be used for positioning the code. The device can be fused in a framework of a development project, provides an entrance for developers and can be independent of the development project. The device can be provided with an interface for interacting with a developer, when the developer needs to perform code positioning, the new version information and the old version information of the target application can be input or uploaded to the device, and the device can acquire the new version information and the old version information of the target application. The new version information comprises a new version interface image and a new version front end display layer code corresponding to the new version interface image, and the old version information comprises an old version interface image corresponding to the target application and an old version front end display layer code corresponding to the old version interface image. Specifically, a new version interface image and an old version interface image of the target application can be obtained through screen capture of a mobile phone or a computer, a new version front end display layer code and an old version front end display layer code can be uploaded to the device in a text format, and the device obtains corresponding codes from a text.
And 102, determining first difference information of the new version interface image and the old version interface image and second difference information of the new version front-end display layer code and the old version front-end display layer code according to the new version information and the old version information.
Specifically, after the new version information and the old version information of the target application are obtained, first distinguishing information of the new version interface image and the old version interface image and second distinguishing information of the new version front-end display layer code and the old version front-end display layer code can be determined according to the new version information and the old version information, namely, which parts are added, deleted or modified in the new version interface image and the old version interface image, and which code segments are added, deleted or modified in the new version front-end display layer code and the old version front-end display layer code are determined.
And 103, positioning the front-end display layer code of the new version according to the first distinguishing information and the second distinguishing information.
Specifically, after the first distinguishing information and the second distinguishing information are determined, the new version front-end display layer code may be located according to the first distinguishing information and the second distinguishing information. I.e. determining the location of the added, deleted or modified code section in the new version front end display layer code and providing or displaying relevant information to the developer.
According to the code positioning processing method provided by the embodiment, the new version front end display layer code is positioned according to the first difference information of the new version interface image and the old version interface image and the second difference information of the new version front end display layer code and the old version front end display layer code, so that a developer can quickly find a part of the new version front end display layer code which is modified relative to the old version front end display layer code, the development efficiency of the developer is improved, and the labor cost and the time cost are effectively saved.
Example two
This embodiment further supplements and explains the positioning processing method of the code provided in the first embodiment.
As shown in fig. 2, a schematic flow chart of the code positioning processing method provided in this embodiment is shown.
As a practical manner, on the basis of the first embodiment, optionally, the step 102 specifically includes:
step 1021, comparing the new version interface image with the old version interface image by adopting an image recognition algorithm, and determining first difference information of the new version interface image and the old version interface image.
Specifically, after a new version interface image and an old version interface image of a target application are acquired, an image recognition algorithm is adopted to compare the new version interface image with the old version interface image, and determine which parts are added, deleted or modified in the new version interface image compared with the old version interface image. The image recognition algorithm may be any implementable algorithm in the prior art, and may specifically be a Scale-invariant feature transform (SIFT) algorithm, a Speeded Up Robust Features (Speeded Up Robust Features) algorithm, a Binary Robust Independent basic Features (Binary Robust Elementary Features) algorithm, an object FAST and Robust BRIEF (FAST and Robust BRIEF) -based algorithm, and the like, which are not limited herein.
Illustratively, as shown in fig. 3, a schematic diagram of the interface image comparison of the new version and the old version is provided for the present embodiment. Compared with the old version interface image, the new version interface image is additionally provided with an advertisement module for displaying advertisement information.
And 1022, comparing the new version front end display layer code with the old version front end display layer code line by line, and determining second difference information of the new version front end display layer code and the old version front end display layer code.
Specifically, after the new version front end display layer code and the old version front end display layer code of the target application are obtained, the new version front end display layer code and the old version front end display layer code can be compared line by line, and it is determined which code segments are added, deleted or modified in comparison with the old version front end display layer code. During comparison, the start and the end of the code segment can be judged according to a preset rule, for example, a common keyword or name (such as struct, model, top, bar and the like) which represents a code segment in the code is collected and arranged as a keyword library in advance, a certain start judgment rule and an end judgment rule are set, the start of a code segment is represented when the start judgment rule is met, the end of a code segment is represented when the end judgment rule is met, a code segment is determined by the start judgment rule, and the code segment which is different from the code segment of the old version of the front-end display layer code is determined by taking the code segment as a unit.
It should be noted that step 1021 and step 1022 are parallel steps, and are not in sequence.
As another implementable manner, on the basis of the first embodiment, optionally, the step 103 specifically includes:
step 1031, determining a corresponding relationship between the first distinguishing information and the second distinguishing information according to a preset rule.
Specifically, after the first difference information and the second difference information are determined, the corresponding relationship between the first difference information and the second difference information, that is, the corresponding relationship between the difference between the interface images of the new version and the difference between the interface images of the old version and the interface images of the code segments, may be determined according to a preset rule. The first difference information represents the change of the display function of the new version interface relative to the old version interface, and the second difference information represents the change of the display function caused by the different code segments.
And 1032, positioning the new version front-end display layer code according to the corresponding relation between the first distinguishing information and the second distinguishing information.
Specifically, after the correspondence between the first difference information and the second difference information is determined, the position of the added, deleted, or modified code segment in the front-end display layer code of the new version may be determined according to the correspondence between the first difference information and the second difference information, and the related information may be provided or displayed to the developer.
Optionally, step 1031 may specifically include:
if the first difference information includes a first image block and the second difference information includes one or more code segments, the first image block corresponds to the one or more code segments.
If the first difference information includes one or more image blocks and the second difference information includes the first code segment, the one or more image blocks correspond to the first code segment.
If the first distinguishing information comprises a plurality of image blocks and the second distinguishing information comprises a plurality of code segments, one code segment in the front-end display layer code of the new version is reserved in sequence, other code segments are converted into the same code as the front-end display layer code of the old version, a corresponding first interface image is obtained, and a second image block of the first interface image, which is different from the interface image of the old version, is obtained; the second image block corresponds to the reserved code segment.
Specifically, if the first difference information includes the first image block, the second difference information includes one or more code segments, which indicates that a change of the one or more code segments results in a change of the first image block, that is, indicates that a previous developer has modified the one or more code segments on the basis of the layer code displayed at the front end of the old version, so that the generated new version interface generates a difference of the first image block compared with the old version interface. A first flag may be set for the first image block and the first flag may be assigned to the one or more code segments causing the change.
Similarly, if the first difference information includes one or more image blocks, and the second difference information includes a first code segment indicating that a change of the first code segment results in a change of the one or more image blocks on the interface image, a second identifier may be set, where the second identifier corresponds to the one or more image blocks and the first code segment.
If the first distinguishing information comprises a plurality of image blocks and the second distinguishing information comprises a plurality of code segments, which indicate that the new version is modified more than the old version, one code segment in the front-end display layer code of the new version can be reserved in sequence, other code segments are converted into the same as the front-end display layer code of the old version, a corresponding first interface image is obtained, a second image block of the first interface image different from the interface image of the old version is obtained, and the second image block is one of the image blocks; the second image block corresponds to the reserved code segment. And changing a code segment for reservation, repeating the process, determining the corresponding relation between each image block and each code segment according to the above, and carrying out corresponding identification.
Optionally, one of the code segments (for example, the third code segment) of the new version of the front-end display layer code may be sequentially changed to be the same as the old version of the front-end display layer code, other different code segments are reserved, the corresponding second interface image is obtained, and it is obtained which image block of the plurality of image blocks is changed compared with the new version of the interface image, for example, when the third image block is changed, it indicates that the third code segment corresponds to the third image block. I.e. a change of the third code segment results in a change of the third image block.
Exemplarily, as shown in fig. 4, a schematic diagram of the correspondence provided for the present embodiment is shown. In case one, if only image block X is in the first difference information and only code segment Y is in the second difference information, then X in the interface is caused by the change of Y code segment. In case two, if only image block X is in the first difference information and code segments Y1, Y2 are in the second difference information, change X in the interface is caused by two code segments Y1, Y2. In case three, if there are image blocks X1 and X2 in the first difference information and only code segment Y in the second difference information, then X1 and X2 in the interface are both caused by the change of Y code segment. In case four, if the first difference information includes image blocks X1 and X2, and the second difference information includes code segments Y1 and Y2, then the Y1 is transformed to be the same as the old version, only the Y2 code segment is reserved, and it is seen which of the X1 and X2 is changed with respect to the new version interface image, if the X1 is changed, the changed X1 is caused by the transformed code segment Y1, and the X2 is caused by the other Y2. In case five, if there are multiple change points such as the image blocks Xi, Xj … Xn in the first difference information and multiple different points such as the code segments Yi, Yj … Ym in the second difference information, the above manner can be adopted to retain the unique different code segments or transform the unique same code segments to find the image block with the corresponding interface image change. Therefore, the interface image change points can automatically search the corresponding changed code segments.
Optionally, step 1032 may specifically include:
displaying the code segments corresponding to the image blocks in a display mode different from other code segments in the front-end display layer code of the new version; or acquiring the position information of the code segment corresponding to each image block in the front-end display layer code of the new version and displaying the position information.
Specifically, after the correspondence between the changed image block and the changed code segment is determined, the changed image block and the changed code segment may be displayed in a display manner different from that of other code segments in the front-end display layer code of the new version, for example, the changed code segment may be highlighted, and the corresponding image block identifier may be displayed while the changed code segment is highlighted according to the correspondence, or the image of the corresponding image block may be directly displayed. Or, a positioning document may be generated, the distinguished image block image, the corresponding identifier, and the position information of the code segment corresponding to the image block are recorded in the positioning document, and a developer may open the positioning document to view the image block image. The position information of the code segment can be a starting line and an ending line of the code segment in the front-end display layer code of the new version, or the whole code segment can be directly searched by a developer from the front-end display layer code of the new version quickly according to the position information of the code segment.
It should be noted that the respective implementable modes in the present embodiment may be implemented individually, or may be implemented in combination in any combination without conflict, and the present application is not limited thereto.
According to the code positioning processing method provided by the embodiment, the new version front end display layer code is positioned according to the first difference information of the new version interface image and the old version interface image and the second difference information of the new version front end display layer code and the old version front end display layer code, so that a developer can quickly find a part of the new version front end display layer code which is modified relative to the old version front end display layer code, the development efficiency of the developer is improved, and the labor cost and the time cost are effectively saved.
EXAMPLE III
The present embodiment provides a code positioning processing apparatus, configured to execute the code positioning processing method of the first embodiment.
As shown in fig. 5, it is a schematic structural diagram of the code positioning processing apparatus provided in this embodiment. The code location processing means 30 comprises an acquisition module 31, a determination module 32 and a processing module 33.
The obtaining module 31 is configured to obtain new version information and old version information of the target application, where the new version information includes a new version interface image and a new version front end display layer code corresponding to the new version interface image, and the old version information includes an old version interface image corresponding to the target application and an old version front end display layer code corresponding to the old version interface image; the determining module 32 is configured to determine first difference information between the new version interface image and the old version interface image and second difference information between the new version front-end display layer code and the old version front-end display layer code according to the new version information and the old version information; the processing module 33 is configured to perform positioning processing on the new version front-end display layer code according to the first difference information and the second difference information.
The specific manner in which the respective modules perform operations has been described in detail in relation to the apparatus in this embodiment, and will not be elaborated upon here.
According to the positioning processing device for the codes, the new version front end display layer codes are positioned according to the first difference information of the new version interface images and the old version interface images and the second difference information of the new version front end display layer codes and the old version front end display layer codes, so that developers can quickly find out the modified part of the new version front end display layer codes relative to the old version front end display layer codes, the development efficiency of the developers is improved, and the labor cost and the time cost are effectively saved.
Example four
This embodiment further supplements the description on the positioning processing apparatus of the code provided in the third embodiment.
As an implementable manner, on the basis of the third embodiment, optionally, the determining module is specifically configured to:
comparing the new version interface image with the old version interface image by adopting an image recognition algorithm, and determining first difference information of the new version interface image and the old version interface image; and comparing the new version front end display layer code with the old version front end display layer code line by line, and determining second distinguishing information of the new version front end display layer code and the old version front end display layer code.
As another implementable manner, on the basis of the third embodiment, optionally, the processing module is specifically configured to:
determining the corresponding relation between the first distinguishing information and the second distinguishing information according to a preset rule; and positioning the new version front-end display layer code according to the corresponding relation between the first distinguishing information and the second distinguishing information.
Optionally, the processing module is specifically configured to:
if the first difference information comprises a first image block and the second difference information comprises one or more code segments, the first image block corresponds to the one or more code segments; if the first distinguishing information comprises one or more image blocks and the second distinguishing information comprises a first code segment, the one or more image blocks correspond to the first code segment; if the first distinguishing information comprises a plurality of image blocks and the second distinguishing information comprises a plurality of code segments, one code segment in the front-end display layer code of the new version is reserved in sequence, other code segments are converted into the same code as the front-end display layer code of the old version, a corresponding first interface image is obtained, and a second image block of the first interface image, which is different from the interface image of the old version, is obtained; the second image block corresponds to the reserved code segment.
Optionally, the processing module is specifically configured to:
displaying the code segments corresponding to the image blocks in a display mode different from other code segments in the front-end display layer code of the new version; or acquiring the position information of the code segment corresponding to each image block in the front-end display layer code of the new version and displaying the position information.
The specific manner in which the respective modules perform operations has been described in detail in relation to the apparatus in this embodiment, and will not be elaborated upon here.
It should be noted that the respective implementable modes in the present embodiment may be implemented individually, or may be implemented in combination in any combination without conflict, and the present application is not limited thereto.
According to the positioning processing device of the codes, the positioning processing is carried out on the new version front end display layer codes according to the first difference information of the new version interface images and the old version interface images and the second difference information of the new version front end display layer codes and the old version front end display layer codes, so that developers can quickly find out the modified part of the new version front end display layer codes relative to the old version front end display layer codes, the development efficiency of the developers is improved, and the labor cost and the time cost are effectively saved.
EXAMPLE five
The present embodiment provides a terminal device, configured to execute the code positioning processing method provided in the foregoing embodiment.
As shown in fig. 6, is a schematic structural diagram of the terminal device provided in this embodiment. The terminal device 50 includes: at least one processor 51 and memory 52;
the memory stores a computer program; at least one processor executes the computer program stored in the memory to implement the payment processing method provided by the above-described embodiments.
According to the terminal equipment of the embodiment, the new version front end display layer codes are positioned according to the first difference information of the new version interface images and the old version interface images and the second difference information of the new version front end display layer codes and the old version front end display layer codes, so that developers can quickly find out the modified part of the new version front end display layer codes relative to the old version front end display layer codes, the development efficiency of the developers is improved, and the labor cost and the time cost are effectively saved.
EXAMPLE six
The present embodiment provides a computer-readable storage medium, in which a computer program is stored, and when the computer program is executed, the method provided by any one of the above embodiments is implemented.
According to the computer-readable storage medium of the embodiment, the new version front-end display layer codes are positioned according to the first difference information of the new version interface image and the old version interface image and the second difference information of the new version front-end display layer codes and the old version front-end display layer codes, so that developers can quickly find out the modified part of the new version front-end display layer codes relative to the old version front-end display layer codes, the development efficiency of the developers is improved, and the labor cost and the time cost are effectively saved.
In the several embodiments provided in the present application, it should be understood that the disclosed apparatus and method may be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the units is only one logical division, and other divisions may be realized in practice, for example, a plurality of units or components may be combined or integrated into another system, 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.
The 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, or in a form of hardware plus a software functional unit.
The integrated unit implemented in the form of a software functional unit may be stored in a computer readable storage medium. The software functional unit is stored in a storage medium and includes several instructions to enable a computer device (which may be a personal computer, a server, or a network device) or a processor (processor) to execute some steps of the methods according to the embodiments of the present application. And the aforementioned storage medium includes: various media capable of storing program codes, such as a usb disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk.
It is obvious to those skilled in the art that, for convenience and simplicity of description, the foregoing division of the functional modules is merely used as an example, and in practical applications, the above function distribution may be performed by different functional modules according to needs, that is, the internal structure of the device is divided into different functional modules to perform all or part of the above described functions. For the specific working process of the device described above, reference may be made to the corresponding process in the foregoing method embodiment, which is not described herein again.
Finally, it should be noted that: the above embodiments are only used for illustrating the technical solutions of the present application, and not for limiting 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 or all of the technical features may be equivalently replaced; and the modifications or the substitutions do not make the essence of the corresponding technical solutions depart from the scope of the technical solutions of the embodiments of the present application.

Claims (12)

1. A method for positioning and processing a code, comprising:
acquiring new version information and old version information of a target application, wherein the new version information comprises a new version interface image and a new version front end display layer code corresponding to the new version interface image, and the old version information comprises an old version interface image corresponding to the target application and an old version front end display layer code corresponding to the old version interface image;
according to the new version information and the old version information, determining first difference information of the new version interface image and the old version interface image and second difference information of the new version front end display layer code and the old version front end display layer code;
and positioning the new version front end display layer code according to the first difference information and the second difference information.
2. The method of claim 1, wherein determining first difference information between the new version interface image and the old version interface image and second difference information between the new version front-end display layer code and the old version front-end display layer code according to the new version information and the old version information comprises:
comparing the new version interface image with the old version interface image by adopting an image identification algorithm, and determining first difference information of the new version interface image and the old version interface image;
and comparing the new version front end display layer code with the old version front end display layer code line by line, and determining second distinguishing information of the new version front end display layer code and the old version front end display layer code.
3. The method according to claim 1 or 2, wherein the positioning the new version front-end display layer code according to the first difference information and the second difference information comprises:
determining a corresponding relation between the first distinguishing information and the second distinguishing information according to a preset rule;
and positioning the new version front end display layer code according to the corresponding relation between the first distinguishing information and the second distinguishing information.
4. The method according to claim 3, wherein the determining the corresponding relationship between the first difference information and the second difference information according to a preset rule comprises:
if the first difference information comprises a first image block and the second difference information comprises one or more code segments, the first image block corresponds to the one or more code segments;
if the first distinguishing information comprises one or more image blocks and the second distinguishing information comprises a first code segment, the one or more image blocks correspond to the first code segment;
if the first distinguishing information comprises a plurality of image blocks and the second distinguishing information comprises a plurality of code segments, one code segment in the front-end display layer code of the new version is reserved in sequence, other code segments are converted into the same code as the front-end display layer code of the old version, a corresponding first interface image is obtained, and a second image block of the first interface image different from the interface image of the old version is obtained; the second image block corresponds to the reserved code segment.
5. The method according to claim 4, wherein the positioning the new version front-end display layer code according to the correspondence between the first difference information and the second difference information includes:
displaying the code segments corresponding to the image blocks in the front-end display layer code of the new version in a display mode different from that of other code segments; or,
and acquiring and displaying the position information of the code segment corresponding to each image block in the front-end display layer code of the new version.
6. A device for locating and processing a code, comprising:
the system comprises an acquisition module, a display module and a display module, wherein the acquisition module is used for acquiring new version information and old version information of a target application, the new version information comprises a new version interface image and a new version front end display layer code corresponding to the new version interface image, and the old version information comprises an old version interface image corresponding to the target application and an old version front end display layer code corresponding to the old version interface image;
the determining module is used for determining first difference information of the new version interface image and the old version interface image and second difference information of the new version front-end display layer code and the old version front-end display layer code according to the new version information and the old version information;
and the processing module is used for positioning the new version front end display layer code according to the first difference information and the second difference information.
7. The apparatus of claim 6, wherein the determining module is specifically configured to:
comparing the new version interface image with the old version interface image by adopting an image identification algorithm, and determining first difference information of the new version interface image and the old version interface image;
and comparing the new version front end display layer code with the old version front end display layer code line by line, and determining second distinguishing information of the new version front end display layer code and the old version front end display layer code.
8. The apparatus according to claim 6 or 7, wherein the processing module is specifically configured to:
determining a corresponding relation between the first distinguishing information and the second distinguishing information according to a preset rule;
and positioning the new version front end display layer code according to the corresponding relation between the first distinguishing information and the second distinguishing information.
9. The apparatus of claim 8, wherein the processing module is specifically configured to:
if the first difference information comprises a first image block and the second difference information comprises one or more code segments, the first image block corresponds to the one or more code segments;
if the first distinguishing information comprises one or more image blocks and the second distinguishing information comprises a first code segment, the one or more image blocks correspond to the first code segment;
if the first distinguishing information comprises a plurality of image blocks and the second distinguishing information comprises a plurality of code segments, one code segment in the front-end display layer code of the new version is reserved in sequence, other code segments are converted into the same code as the front-end display layer code of the old version, a corresponding first interface image is obtained, and a second image block of the first interface image different from the interface image of the old version is obtained; the second image block corresponds to the reserved code segment.
10. The apparatus of claim 9, wherein the processing module is specifically configured to:
displaying the code segments corresponding to the image blocks in the front-end display layer code of the new version in a display mode different from that of other code segments; or,
and acquiring and displaying the position information of the code segment corresponding to each image block in the front-end display layer code of the new version.
11. A terminal device, comprising: at least one processor and memory;
the memory stores a computer program; the at least one processor executes the memory-stored computer program to implement the method of any of claims 1-5.
12. A computer-readable storage medium, characterized in that a computer program is stored in the computer-readable storage medium, which computer program, when executed, implements the method of any of claims 1-5.
CN201810307291.7A 2018-04-08 2018-04-08 Code positioning processing method and device, terminal equipment and storage medium Active CN108536467B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810307291.7A CN108536467B (en) 2018-04-08 2018-04-08 Code positioning processing method and device, terminal equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810307291.7A CN108536467B (en) 2018-04-08 2018-04-08 Code positioning processing method and device, terminal equipment and storage medium

Publications (2)

Publication Number Publication Date
CN108536467A true CN108536467A (en) 2018-09-14
CN108536467B CN108536467B (en) 2021-11-02

Family

ID=63483289

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810307291.7A Active CN108536467B (en) 2018-04-08 2018-04-08 Code positioning processing method and device, terminal equipment and storage medium

Country Status (1)

Country Link
CN (1) CN108536467B (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109871205A (en) * 2018-12-15 2019-06-11 中国平安人寿保险股份有限公司 GUI code method of adjustment, device, computer installation and storage medium
CN111147608A (en) * 2020-01-17 2020-05-12 南通大学 Laboratory simulation system combining virtuality and reality and working method thereof
CN111638903A (en) * 2020-05-08 2020-09-08 北京达佳互联信息技术有限公司 Method and device for generating difference information of different software versions
CN111831279A (en) * 2019-04-22 2020-10-27 华为技术有限公司 Interface code generation method and device
CN112650483A (en) * 2020-12-28 2021-04-13 京东数字科技控股股份有限公司 Method and device for restoring design draft, computer equipment and storage medium

Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101799752A (en) * 2009-12-31 2010-08-11 深圳联友科技有限公司 Method and system for positioning HTML page control variations
US8336030B1 (en) * 2009-09-11 2012-12-18 The Mathworks, Inc. System and method for coding standard testing
CN103207874A (en) * 2012-01-17 2013-07-17 腾讯科技(深圳)有限公司 Updated webpage content prompting method and system
US20130229666A1 (en) * 2012-03-05 2013-09-05 Canon Kabushiki Kaisha Information processing apparatus and information processing method
CN103365967A (en) * 2013-06-21 2013-10-23 百度在线网络技术(北京)有限公司 Automatic difference detection method and device based on crawler
CN103544213A (en) * 2013-09-16 2014-01-29 青岛英网资讯股份有限公司 Network content upgrading detection assessment method and system
CN104516633A (en) * 2014-11-19 2015-04-15 微梦创科网络科技(中国)有限公司 User interface element management method and device
CN104615787A (en) * 2015-03-06 2015-05-13 中国建设银行股份有限公司 Method and device for updating interface display
CN106021103A (en) * 2016-05-16 2016-10-12 南京大学 Code change-based mobile application test script automatic maintenance method
CN106919431A (en) * 2015-12-25 2017-07-04 航天信息股份有限公司 Code comparison method, equipment and system in continuous integrating
CN107436846A (en) * 2017-08-04 2017-12-05 网易(杭州)网络有限公司 Method of testing, device, calculate readable storage medium storing program for executing and computing device

Patent Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8336030B1 (en) * 2009-09-11 2012-12-18 The Mathworks, Inc. System and method for coding standard testing
CN101799752A (en) * 2009-12-31 2010-08-11 深圳联友科技有限公司 Method and system for positioning HTML page control variations
CN103207874A (en) * 2012-01-17 2013-07-17 腾讯科技(深圳)有限公司 Updated webpage content prompting method and system
US20130229666A1 (en) * 2012-03-05 2013-09-05 Canon Kabushiki Kaisha Information processing apparatus and information processing method
CN103365967A (en) * 2013-06-21 2013-10-23 百度在线网络技术(北京)有限公司 Automatic difference detection method and device based on crawler
CN103544213A (en) * 2013-09-16 2014-01-29 青岛英网资讯股份有限公司 Network content upgrading detection assessment method and system
CN104516633A (en) * 2014-11-19 2015-04-15 微梦创科网络科技(中国)有限公司 User interface element management method and device
CN104615787A (en) * 2015-03-06 2015-05-13 中国建设银行股份有限公司 Method and device for updating interface display
CN106919431A (en) * 2015-12-25 2017-07-04 航天信息股份有限公司 Code comparison method, equipment and system in continuous integrating
CN106021103A (en) * 2016-05-16 2016-10-12 南京大学 Code change-based mobile application test script automatic maintenance method
CN107436846A (en) * 2017-08-04 2017-12-05 网易(杭州)网络有限公司 Method of testing, device, calculate readable storage medium storing program for executing and computing device

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
ZHANG XU 等: "Novel No-search Fractal Image Compression Method on Texture Feature", 《IN PROCEEDING OF THE 2013 INTERNATIONAL CONFERENCE ON MECHATRONIC SCIENCES, ELECTRIC ENGINEERING AND COMPUTER》 *
韩晓光: "恶意代码检测关键技术研究", 《中国优秀博士学位论文全文数据库信息科技辑》 *

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109871205A (en) * 2018-12-15 2019-06-11 中国平安人寿保险股份有限公司 GUI code method of adjustment, device, computer installation and storage medium
CN109871205B (en) * 2018-12-15 2023-07-18 中国平安人寿保险股份有限公司 Interface code adjustment method, device, computer device and storage medium
CN111831279A (en) * 2019-04-22 2020-10-27 华为技术有限公司 Interface code generation method and device
CN111147608A (en) * 2020-01-17 2020-05-12 南通大学 Laboratory simulation system combining virtuality and reality and working method thereof
CN111638903A (en) * 2020-05-08 2020-09-08 北京达佳互联信息技术有限公司 Method and device for generating difference information of different software versions
CN111638903B (en) * 2020-05-08 2023-05-30 北京达佳互联信息技术有限公司 Method and device for generating difference information of different software versions
CN112650483A (en) * 2020-12-28 2021-04-13 京东数字科技控股股份有限公司 Method and device for restoring design draft, computer equipment and storage medium

Also Published As

Publication number Publication date
CN108536467B (en) 2021-11-02

Similar Documents

Publication Publication Date Title
CN108536467B (en) Code positioning processing method and device, terminal equipment and storage medium
CN110383274B (en) Method, device, system, storage medium, processor and terminal for identifying equipment
CN109308681B (en) Image processing method and device
CN111049878B (en) Method, device, electronic device and storage medium for visualizing micro-service call chain
CN109040960A (en) A kind of method and apparatus for realizing location-based service
KR101062929B1 (en) Method, terminal, and computer-readable recording medium for supporting collection of object included in the image which is taken
CN111290931B (en) Method and device for visually displaying buried point data
CN112612690B (en) User interface information processing method and device, electronic equipment and storage medium
CN112487871B (en) Handwriting data processing method and device and electronic equipment
CN108597034B (en) Method and apparatus for generating information
JP2024502516A (en) Data annotation methods, apparatus, systems, devices and storage media
CN112286879B (en) Metadata-based data asset construction method and device
CN112486337B (en) Handwriting graph analysis method and device and electronic equipment
WO2021196551A1 (en) Image retrieval method and apparatus, computer device, and storage medium
KR102282284B1 (en) Method, apparatus, device, and storage medium for providing visual representation of set of objects
CN110909155B (en) Book order generation method, calculation device and computer storage medium
CN116028048A (en) Script generation method and device, electronic equipment and storage medium
US20170277722A1 (en) Search service providing apparatus, system, method, and computer program
JP2014142783A (en) Information processing apparatus and program
CN110765296A (en) Image searching method, terminal device and storage medium
CN106062747A (en) Information interface generation
CN109522429A (en) Method and apparatus for generating information
CN112487875B (en) Handwriting patterning method and device and electronic equipment
CN114266233A (en) Form generation method, device, equipment and medium
CN112579846A (en) Visualization method and system for user behavior track

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
GR01 Patent grant
GR01 Patent grant