CN110895472A - Method and device for identifying service change - Google Patents

Method and device for identifying service change Download PDF

Info

Publication number
CN110895472A
CN110895472A CN201811069076.4A CN201811069076A CN110895472A CN 110895472 A CN110895472 A CN 110895472A CN 201811069076 A CN201811069076 A CN 201811069076A CN 110895472 A CN110895472 A CN 110895472A
Authority
CN
China
Prior art keywords
application version
module
service
current application
version
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201811069076.4A
Other languages
Chinese (zh)
Inventor
孙晓野
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Jingdong Century Trading Co Ltd
Beijing Jingdong Shangke Information Technology Co Ltd
Original Assignee
Beijing Jingdong Century Trading Co Ltd
Beijing Jingdong Shangke Information Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Jingdong Century Trading Co Ltd, Beijing Jingdong Shangke Information Technology Co Ltd filed Critical Beijing Jingdong Century Trading Co Ltd
Priority to CN201811069076.4A priority Critical patent/CN110895472A/en
Publication of CN110895472A publication Critical patent/CN110895472A/en
Pending legal-status Critical Current

Links

Images

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

Landscapes

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

Abstract

The invention discloses a method and a device for identifying service change, and relates to the technical field of computers. One embodiment of the method comprises: acquiring an online timestamp of a current application version, and determining a latest historical application version adjacent to the online timestamp; comparing codes in the current application version and the historical application version, and identifying a change code in the current application version; determining the change service in the current application version according to the corresponding relation between the code corresponding to the current application version and the service; wherein, the business is the minimum granularity of the operable execution of the current application version. The implementation method can automatically identify the business name corresponding to the modified code in the current version and the historical online version, and automatically add alarm monitoring to the identified changed business.

Description

Method and device for identifying service change
Technical Field
The present invention relates to the field of computer technologies, and in particular, to a method and an apparatus for identifying a service change.
Background
With the wide application of the internet, a computer application system architecture evolves from single-cluster cold-hot mutual backup to a multi-cluster distributed architecture so as to improve the system load capacity, reduce the coupling among modules and enhance the cohesion of the modules.
The existing applications generally adopt a distributed architecture, generally use an RPC (Remote Procedure call protocol) framework, and are generally assembled by a plurality of modules with different functions.
In the process of implementing the invention, the inventor finds that the prior art has at least the following problems:
1) the online version has more content changes, and the current universal code management tool git can only record the file level but not the service change level;
2) the monitoring platform needs to be manually configured by developers for monitoring each modified method, and the workload is overlarge and is more tedious; if the monitoring is not timely, the large-scale operation of the existing production can be influenced;
3) the submitted records (commit ID), tags and the like of the online versions are usually recorded manually, so that the problems of high cost and more errors of manual version maintenance exist.
Disclosure of Invention
In view of this, embodiments of the present invention provide a method and an apparatus for identifying a service change, which can at least solve the problems in the prior art that monitoring needs manual participation, and the workload is large and cumbersome for a service modified in an online version.
To achieve the above object, according to an aspect of an embodiment of the present invention, there is provided a method for identifying a service change, including:
acquiring an online timestamp of a current application version, and determining a latest historical application version adjacent to the online timestamp;
comparing codes in the current application version and the historical application version, and identifying changed codes in the current application version;
determining a change service in the current application version according to the corresponding relation between the code corresponding to the current application version and the service; wherein the service is the minimum granularity at which the current application version can be operated and executed.
Optionally, the comparing the codes in the current application version and the historical application version, and identifying a change code in the current application version include:
acquiring a module in the current application version, and determining identification information of the module; wherein the identification information includes at least a name of the module;
determining a history module corresponding to the identification information in the history application version according to the identification information, comparing the module with codes in the history module, and determining a change code in the module; or
And when the history module corresponding to the identification information does not exist in the history application version, determining all codes in the module as change codes.
Optionally, after determining the change service in the current application version, the method further includes:
transmitting the service information of the changed service to a monitoring platform so as to monitor the execution parameters of the changed service in the current application version based on the service information; and
and when receiving the alarm request transmitted by the monitoring platform, generating a corresponding alarm instruction and transmitting the alarm instruction to an alarm platform for alarm operation.
Optionally, the method further includes:
acquiring a module in the current application version, and determining an online branch of the module according to a module branch list corresponding to the application version;
and extracting the submission records corresponding to the current application version in the determined upper line branch, combining the obtained submission records and marking.
In order to achieve the above object, according to another aspect of the embodiments of the present invention, there is provided an apparatus for identifying a service change, including:
the version determining module is used for acquiring an online timestamp of the current application version and determining the latest historical application version adjacent to the online timestamp;
the code identification module is used for comparing codes in the current application version and the historical application version and identifying change codes in the current application version;
a service determining module, configured to determine a change service in the current application version according to a correspondence between a code corresponding to the current application version and a service; wherein the service is the minimum granularity at which the current application version can be operated and executed.
Optionally, the code recognition module is configured to:
acquiring a module in the current application version, and determining identification information of the module; wherein the identification information includes at least a name of the module;
determining a history module corresponding to the identification information in the history application version according to the identification information, comparing the module with codes in the history module, and determining a change code in the module; or
And when the history module corresponding to the identification information does not exist in the history application version, determining all codes in the module as change codes.
Optionally, the system further includes a service monitoring module, configured to:
transmitting the service information of the changed service to a monitoring platform so as to monitor the execution parameters of the changed service in the current application version based on the service information; and
and when receiving the alarm request transmitted by the monitoring platform, generating a corresponding alarm instruction and transmitting the alarm instruction to an alarm platform for alarm operation.
Optionally, the marking device further comprises a marking recording module, configured to:
acquiring a module in the current application version, and determining an online branch of the module according to a module branch list corresponding to the application version;
and extracting the submission records corresponding to the current application version in the determined upper line branch, combining the obtained submission records and marking.
To achieve the above object, according to still another aspect of the embodiments of the present invention, an electronic device for recognizing a service change is provided.
The electronic device of the embodiment of the invention comprises: one or more processors; a storage device, configured to store one or more programs, which when executed by the one or more processors, cause the one or more processors to implement any of the above-described methods for identifying a service change.
To achieve the above object, according to a further aspect of the embodiments of the present invention, there is provided a computer readable medium, on which a computer program is stored, the computer program, when being executed by a processor, implementing any one of the above-mentioned methods for identifying a service change.
According to the scheme provided by the invention, one embodiment of the invention has the following advantages or beneficial effects: the method can automatically identify the business name corresponding to the modified code in the current version and the historical online version, and automatically add alarm monitoring to the identified changed business.
Further effects of the above-mentioned non-conventional alternatives will be described below in connection with the embodiments.
Drawings
The drawings are included to provide a better understanding of the invention and are not to be construed as unduly limiting the invention. Wherein:
fig. 1 is a schematic main flow chart of a method for identifying service changes according to an embodiment of the present invention;
fig. 2 is a schematic diagram of main modules of an apparatus for identifying service changes according to an embodiment of the present invention;
FIG. 3 is an exemplary system architecture diagram in which embodiments of the present invention may be employed;
FIG. 4 is a schematic block diagram of a computer system suitable for use with a mobile device or server implementing an embodiment of the invention.
Detailed Description
Exemplary embodiments of the present invention are described below with reference to the accompanying drawings, in which various details of embodiments of the invention are included to assist understanding, and which are to be considered as merely exemplary. Accordingly, those of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the invention. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.
It should be noted that the embodiment of the present invention is applicable to an application system with function/service update, for example, a warehousing system and other application systems related to the warehousing system, and the present invention is described by taking the warehousing system as an example.
In addition, the invention is not only suitable for monitoring the on-line application version, but also can monitor the test version in the test environment. The online application version is fixed compared with the test version, and more effective data are managed, so that the invention is mainly described for the online application version.
Referring to fig. 1, a main flowchart of a method for identifying a service change according to an embodiment of the present invention is shown, which includes the following steps:
s101: acquiring an online timestamp of a current application version, and determining a latest historical application version adjacent to the online timestamp;
s102: comparing codes in the current application version and the historical application version, and identifying a change code in the current application version;
s103: determining the change service in the current application version according to the corresponding relation between the code corresponding to the current application version and the service; wherein, the business is the minimum granularity of the operable execution of the current application version.
In the above embodiment, in step S101, the version referred to in the present invention is an application version, which is an abstract concept, and is referred to as a version for simplification of the application version. As with the specific name of the commodity when it is put on shelf (e.g., the 2018 autumn money limited J brand bag), each time a new function is put on line, the application has a version number, e.g., V2.01, and the version name is usually defined by the staff according to the business content of each time the function is put on line.
The same application may have multiple historical versions, but the functionality of each version may not be identical. Each version is improved over the previous neighbouring most recent historical version, so the objects compared are the current version and the historical neighbouring most recent version.
The historical version is acquired mainly according to the time stamp of the online of the current version and the application name of the current version, such as online of X mall v1.00-2018.08.01 and online of X mall v 1.02-2018.08.14. And typically, the historical version is stored in an online server.
In step S102, due to the difference between the development environment, the test environment, and the online environment, the function improvement/change of the new application version online currently needs to be monitored compared with the historical application version, and if the execution is abnormal, an alarm prompt is presented.
For the latest online version, the module whose functionality is improved/changed is mainly obtained by comparing the code of the two application versions, specifically:
1) module for determining current version and historical version respectively and contained code
In the version management system, the online of one version is the online of the contained module, for example, the online of 2018.08.09X mall, including app (application), the online of background module 1 and background module 2.
The application program developed by Java language can pack the modules with fixed functions into a compressed file with jar as suffix to realize the designated functions. For example, module 1-receives the username and password, module 2-verifies that the username and password match.
For code, it is typically stored in git-server. Here, git is a code storage tool, but when the code is stored in the computer, the computer is easily damaged and the code is easily lost, so the git open source tool is usually used to store the code in the remote server, which is convenient for reading and storing management.
2) Comparing codes in the modules of the current version with the modules of the historical version, determining a change module with code change, calling a gitdiff command, and determining a change code;
the command form is as follows:
diff—git a/f1b/f1
index 6f8a38c..449b072 100644
---a/f1
+++b/f1
@@-1,7,+1,7@@
-a
+b
it should be noted that the number of modules on-line each time of the application version is not necessarily the same, and the stored positions are also not necessarily completely consistent, that is, the corresponding codes, the number of lines where the codes are located, and the like may be different.
In addition, the modules in the historical version and the current version need to be compared one by one in a targeted manner, mainly based on the names of the modules, and in general, the name of one functional module is not changed.
3) Before each application is online, the codes in the modules included in the application have a certain corresponding relationship with the method, such as a module-service-code table. Here, the service represents the minimum granularity of operable execution with respect to the execution method.
After the code is determined, the corresponding service, namely the part of the method/service is determined according to the table, and is changed compared with the historical version.
For example, the same application, module "package mail" at 2018.08.09, corresponds to module "package mail" at 2018.08.10, and identifies the existence of code replacement, deletion, etc., i.e., indicating that the function is updated and subsequently needs to be monitored; if the 'package mail' module does not exist in the history module, namely the 'package mail' module of 2018.08.10 is an additional module, and the package mail function is an additional function.
As an alternative to step 2), the number of rows of the change code in the corresponding module may be determined, and the changed service may be determined:
1) and reading the diff file by using a Java LineNumberReader, and determining the line number corresponding to the changed code. Matching a certain character pattern with the searched character string through a regular expression pattern ("+ \ \ w +"), and recording the number of change lines in a memory, such as [1,3,6], to indicate that codes of a first line, a third line and a sixth line are changed;
2) analyzing the changed code line number by using a java self-contained tools packet in JDK (Java Development kit) so as to analyze the initial line number and the ending line number of the service in the modified file;
specifically, compiling the class of the specified path by using a JavaCompailer class to obtain a compiled object; for example, a worker writes code that is translated into computer recognizable instructions, and the stack of code, safwseoierfuweorfj, is translated into: i eat about 11 o' clock today;
and analyzing the compiled object by using the JavaTask object to obtain a Compilation UnitTree object, circulating the Compilation UnitTree, accumulating the services/codes according to the time change sequence, and obtaining which service is changed and the starting line number and the ending line number of the service.
The JavaTask is an abstract tool, and the JavaCompiler translates codes by means of the JavaTask; for example, by sending the changed code line number 6 to the JavaTask, it is possible to know which service the changed code corresponds to.
3) Comparing the number of lines of the code change obtained in the step 1) with the number of lines corresponding to the service obtained in the step 2), wherein a service-code line number table can be provided to determine in which service the code falls. And determining the changed service information of the current version compared with the historical version because the service corresponds to the service.
In addition, it should be noted that the services are located in files, and one file is internally composed of different services, such as a timed shutdown function:
file generated by function development: java and java as timing power-off
The file shutdown, the business contained in the java is:
service 1{ checking whether the current system time is equal to a predetermined shutdown time };
service 2{ shutdown };
service 3{ calls service 1() }, calls service 2() }.
After determining to change the service/service, the service/service information modified by the current version compared with the historical version may be uniformly sent to the enterprise monitoring platform to monitor the execution parameters (e.g., execution duration, success of execution result, etc.) of the service by the current version.
Currently, each enterprise basically has a separate monitoring platform, and is usually independent of an application system, for example, by adding an AOP (Aspect Oriented Programming) annotation to a monitored service, an execution parameter of the service is monitored and recorded, so as to analyze the operation efficiency thereof.
If the monitoring platform monitors that the execution of the service is abnormal, the monitoring platform can execute alarm reminding; for example, the time from the beginning to the end of one service operation is recorded, and if the operation time exceeds 30s, an alarm is given, so that the control management of a new function and a new module is realized, and the error probability of the service operation is reduced.
However, some monitoring platforms do not have an alarm function, and at this time, an alarm instruction needs to be generated and transmitted to an alarm to alarm and remind.
In a version management system, for a current application version, identification information such as an application name, a version number, and the like of the current application version generally needs to be set by a worker through interface basic tool configuration, for example:
1) the application name is as follows: the application is mainly logged when being developed for the first time. In order to avoid confusion of subsequent application Management, the internal systems of the enterprise may be many, and the internal systems may be distinguished by using a name definition mode, such as an X mall, an X logistics, an X warehouse wms (route Management system) system, and the like;
2) modules and module names contained in the application: usually defined by business side, product type and product function, so as to design the transformation of APP and background code. For example, for a warehousing system, the modules involved may be: the system comprises remote service, a web terminal, a serial number management platform, a task asynchronous processing platform, a receipt receiving platform, a receipt message analyzing platform, a printing platform, a centralized configuration management platform and an inventory service platform.
3) Code storage git access address of each module: can be obtained through git-local (i.e. local git repository, client),
4) the method comprises the steps that a git user name and a password of a code warehouse can be accessed, and a JGIT third party jar package is used for testing to verify whether an application function can be normally connected and used; for example, a bank web login verifies that the entered username and password are correct. When the test result is correct/feasible/communicable, namely the test is passed, the service can be normally provided.
Before application online, the version number of the application needs to be appointed, so that recording and subsequent rollback are facilitated. For example, 2018/07/09, the version of the application that was online is problematic, and the full set is rolled back into the version that was prior to the online.
The specific implementation process comprises the following steps:
1) selecting an online application;
2) selecting corresponding modules to combine according to the online content; for example, the X mall v1.00 can purchase self-operated merchandise function, v1.02 can purchase third party store merchandise, v1.03 can use cash on delivery, and version 1.02 needs to be realized by developing 5000 lines of code and 100 files compared with version v 1.00.
Or inputting a corresponding code according to the changed service content, generating a method/file based on the code, packaging the code to generate a module, and then combining, deleting, adding or replacing the code with the history module, specifically determining according to the online content.
In addition, a module corresponding to the modified content exists, for example, a second killing module, and if the function needs to be added to the X mall, the module and the original history module are directly combined.
For example, the online version v2.00 of 2018/08/09X mall includes functions of background performance improvement and can support 1 hundred million users, and the upgrading only needs to be realized by improving/adding a background module; 2018/09/15 version v2.02 on line, this version has added the function of "11 o' clock second kill at night"; 2018/09/20 version v2.04 on line, the "11 o' clock second kill" function was deleted.
3) Determining an online branch where the module is located by using a JGIT acquisition module-branch list;
it should be noted that a branch is a concept of code management in a computer, and each branch contains a modification of different application content functions.
For example, different groups develop different new functions for the same application, and the branches of different functions are different, group a-white bar payment-branch A, B group-parcel post-branch B, and functions, codes and the like on different branches do not affect each other, thus reflecting the function of branch isolation.
In practice, the cost of "envelope mailing" may be too high, so that the carrier is not put on the carrier temporarily, and the method of putting the carrier on the carrier and branching the carrier is selected according to actual conditions. However, branch A, B is required if select function A, B comes on-line.
4) Obtaining a commit record (commit ID) under the determined upper line branch by using JGIT, selecting the commit ID of the upper line of the version, and marking the record; typically, the commit record is stored in a wiki, excel or word.
Thus, subsequently, the corresponding combination can be quickly found through the tag, for example:
label 1: function a + function B;
and 2, labeling: function a + function B + function C;
in code development, the tags correspond to combinations of modification files, and staged changes to version updates may be recorded. When a problem occurs after the version is on line, the historical version can be found, and the version is rolled back and on line again.
The method provided by the embodiment of the invention can automatically identify the method name/service name related in the modified Java code in the current version and the historical online version, and automatically add alarm monitoring to the identified method/service.
Referring to fig. 2, a schematic diagram of main modules of an apparatus 200 for identifying a service change according to an embodiment of the present invention is shown, including:
a version determining module 201, configured to obtain an online timestamp of a current application version, and determine a latest historical application version adjacent to the online timestamp;
a code identification module 202, configured to compare codes in the current application version and the historical application version, and identify a change code in the current application version;
a service determining module 203, configured to determine a change service in the current application version according to a correspondence between a code corresponding to the current application version and a service; wherein the service is the minimum granularity at which the current application version can be operated and executed.
In the device for implementing the present invention, the code recognition module 202 is configured to:
acquiring a module in the current application version, and determining identification information of the module; wherein the identification information includes at least a name of the module;
determining a history module corresponding to the identification information in the history application version according to the identification information, comparing the module with codes in the history module, and determining a change code in the module; or
And when the history module corresponding to the identification information does not exist in the history application version, determining all codes in the module as change codes.
The device for implementing the present invention further includes a service monitoring module 204 (not shown in the figure), configured to:
transmitting the service information of the changed service to a monitoring platform so as to monitor the execution parameters of the changed service in the current application version based on the service information; and
and when receiving the alarm request transmitted by the monitoring platform, generating a corresponding alarm instruction and transmitting the alarm instruction to an alarm platform for alarm operation.
The apparatus further includes a marking recording module 205 (not shown) for:
acquiring a module in the current application version, and determining an online branch of the module according to a module branch list corresponding to the application version;
and extracting the submission records corresponding to the current application version in the determined upper line branch, combining the obtained submission records and marking.
In addition, the specific implementation of the identification service modification apparatus according to the embodiment of the present invention has been described in detail in the above identification service modification method, and therefore, the repeated description is omitted here.
The device provided by the embodiment of the invention can automatically identify the method name/service name related in the modified Java code in the current version and the historical online version, and automatically add alarm monitoring to the identified method/service.
Fig. 3 illustrates an exemplary system architecture 300 to which a service change identifying method or service change identifying apparatus according to an embodiment of the present invention may be applied.
As shown in fig. 3, the system architecture 300 may include terminal devices 301, 302, 303, a network 304, and a server 305 (by way of example only). The network 304 serves as a medium for providing communication links between the terminal devices 301, 302, 303 and the server 305. Network 304 may include various connection types, such as wired, wireless communication links, or fiber optic cables, to name a few.
The user may use the terminal device 301, 302, 303 to interact with the server 305 via the network 304 to receive or send messages or the like. The terminal devices 301, 302, 303 may have installed thereon various communication client applications, such as shopping-like applications, web browser applications, search-like applications, instant messaging tools, mailbox clients, social platform software, etc. (by way of example only).
The terminal devices 301, 302, 303 may be various electronic devices having a display screen and supporting web browsing, including but not limited to smart phones, tablet computers, laptop portable computers, desktop computers, and the like.
The server 305 may be a server providing various services, such as a background management server (for example only) providing support for shopping-like websites browsed by users using the terminal devices 301, 302, 303. The backend management server may analyze and perform other processing on the received data such as the product information query request, and feed back a processing result (for example, target push information, product information — just an example) to the terminal device.
It should be noted that the identification service change method provided by the embodiment of the present invention is generally executed by the server 305, and accordingly, the identification service change device is generally installed in the server 305.
It should be understood that the number of terminal devices, networks, and servers in fig. 3 is merely illustrative. There may be any number of terminal devices, networks, and servers, as desired for implementation.
Referring now to FIG. 4, a block diagram of a computer system 400 suitable for use with a terminal device implementing an embodiment of the invention is shown. The terminal device shown in fig. 4 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present invention.
As shown in fig. 4, the computer system 400 includes a Central Processing Unit (CPU)401 that can perform various appropriate actions and processes in accordance with a program stored in a Read Only Memory (ROM)402 or a program loaded from a storage section 408 into a Random Access Memory (RAM) 403. In the RAM 403, various programs and data necessary for the operation of the system 400 are also stored. The CPU 401, ROM 402, and RAM 403 are connected to each other via a bus 404. An input/output (I/O) interface 405 is also connected to bus 404.
The following components are connected to the I/O interface 405: an input section 406 including a keyboard, a mouse, and the like; an output section 407 including a display device such as a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and the like, and a speaker; a storage section 408 including a hard disk and the like; and a communication section 409 including a network interface card such as a LAN card, a modem, or the like. The communication section 409 performs communication processing via a network such as the internet. A driver 410 is also connected to the I/O interface 405 as needed. A removable medium 411 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is mounted on the drive 410 as necessary, so that a computer program read out therefrom is mounted into the storage section 408 as necessary.
In particular, according to the embodiments of the present disclosure, the processes described above with reference to the flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method illustrated in the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network through the communication section 409, and/or installed from the removable medium 411. The computer program performs the above-described functions defined in the system of the present invention when executed by a Central Processing Unit (CPU) 401.
It should be noted that the computer readable medium shown in the present invention can be a computer readable signal medium or a computer readable storage medium or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present invention, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In the present invention, however, a computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, fiber optic cable, RF, etc., or any suitable combination of the foregoing.
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present invention. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams or flowchart illustration, and combinations of blocks in the block diagrams or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The modules described in the embodiments of the present invention may be implemented by software or hardware. The described modules may also be provided in a processor, which may be described as: a processor includes a version determination module, a code identification module, and a business determination module. Where the names of these modules do not in some cases constitute a limitation on the module itself, for example, a code recognition module may also be described as a "module that recognizes change code".
As another aspect, the present invention also provides a computer-readable medium that may be contained in the apparatus described in the above embodiments; or may be separate and not incorporated into the device. The computer readable medium carries one or more programs which, when executed by a device, cause the device to comprise:
acquiring an online timestamp of a current application version, and determining a latest historical application version adjacent to the online timestamp;
comparing codes in the current application version and the historical application version, and identifying changed codes in the current application version;
determining a change service in the current application version according to the corresponding relation between the code corresponding to the current application version and the service; wherein the service is the minimum granularity at which the current application version can be operated and executed.
According to the technical scheme of the embodiment of the invention, the method name/service name related in the modified Java code in the current version and the historical online version can be automatically identified, and the alarm monitoring is automatically added to the identified method/service.
The above-described embodiments should not be construed as limiting the scope of the invention. Those skilled in the art will appreciate that various modifications, combinations, sub-combinations, and substitutions can occur, depending on design requirements and other factors. Any modification, equivalent replacement, and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims (10)

1. A method for identifying a service change, comprising:
acquiring an online timestamp of a current application version, and determining a latest historical application version adjacent to the online timestamp;
comparing codes in the current application version and the historical application version, and identifying changed codes in the current application version;
determining a change service in the current application version according to the corresponding relation between the code corresponding to the current application version and the service; wherein the service is the minimum granularity at which the current application version can be operated and executed.
2. The method of claim 1, wherein comparing the code in the current application version and the historical application version to identify changed code in the current application version comprises:
acquiring a module in the current application version, and determining identification information of the module; wherein the identification information includes at least a name of the module;
determining a history module corresponding to the identification information in the history application version according to the identification information, comparing the module with codes in the history module, and determining a change code in the module; or
And when the history module corresponding to the identification information does not exist in the history application version, determining all codes in the module as change codes.
3. The method of claim 1, further comprising, after the determining change traffic in the current application version:
transmitting the service information of the changed service to a monitoring platform so as to monitor the execution parameters of the changed service in the current application version based on the service information; and
and when receiving the alarm request transmitted by the monitoring platform, generating a corresponding alarm instruction and transmitting the alarm instruction to an alarm platform for alarm operation.
4. The method of claim 1, further comprising:
acquiring a module in the current application version, and determining an online branch of the module according to a module branch list corresponding to the application version;
and extracting the submission records corresponding to the current application version in the determined upper line branch, combining the obtained submission records and marking.
5. An apparatus for identifying a service change, comprising:
the version determining module is used for acquiring an online timestamp of the current application version and determining the latest historical application version adjacent to the online timestamp;
the code identification module is used for comparing codes in the current application version and the historical application version and identifying change codes in the current application version;
a service determining module, configured to determine a change service in the current application version according to a correspondence between a code corresponding to the current application version and a service; wherein the service is the minimum granularity at which the current application version can be operated and executed.
6. The apparatus of claim 5, wherein the code recognition module is configured to:
acquiring a module in the current application version, and determining identification information of the module; wherein the identification information includes at least a name of the module;
determining a history module corresponding to the identification information in the history application version according to the identification information, comparing the module with codes in the history module, and determining a change code in the module; or
And when the history module corresponding to the identification information does not exist in the history application version, determining all codes in the module as change codes.
7. The apparatus of claim 5, further comprising a traffic monitoring module configured to:
transmitting the service information of the changed service to a monitoring platform so as to monitor the execution parameters of the changed service in the current application version based on the service information; and
and when receiving the alarm request transmitted by the monitoring platform, generating a corresponding alarm instruction and transmitting the alarm instruction to an alarm platform for alarm operation.
8. The apparatus of claim 5, further comprising a marking recording module to:
acquiring a module in the current application version, and determining an online branch of the module according to a module branch list corresponding to the application version;
and extracting the submission records corresponding to the current application version in the determined upper line branch, combining the obtained submission records and marking.
9. An electronic device, comprising:
one or more processors;
a storage device for storing one or more programs,
when executed by the one or more processors, cause the one or more processors to implement the method of any one of claims 1-4.
10. A computer-readable medium, on which a computer program is stored, which, when being executed by a processor, carries out the method according to any one of claims 1-4.
CN201811069076.4A 2018-09-13 2018-09-13 Method and device for identifying service change Pending CN110895472A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811069076.4A CN110895472A (en) 2018-09-13 2018-09-13 Method and device for identifying service change

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811069076.4A CN110895472A (en) 2018-09-13 2018-09-13 Method and device for identifying service change

Publications (1)

Publication Number Publication Date
CN110895472A true CN110895472A (en) 2020-03-20

Family

ID=69785483

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811069076.4A Pending CN110895472A (en) 2018-09-13 2018-09-13 Method and device for identifying service change

Country Status (1)

Country Link
CN (1) CN110895472A (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111506339A (en) * 2020-05-29 2020-08-07 北京奇艺世纪科技有限公司 Method and device for processing change information of Software Development Kit (SDK)
CN111966353A (en) * 2020-08-13 2020-11-20 北京金山云网络技术有限公司 Job development method and device, electronic equipment and storage medium
CN112379888A (en) * 2020-12-02 2021-02-19 北京皮尔布莱尼软件有限公司 Code change analysis method
CN112650551A (en) * 2020-12-31 2021-04-13 中国农业银行股份有限公司 System function display method and device
CN112947991A (en) * 2021-03-30 2021-06-11 建信金融科技有限责任公司 Method and device for acquiring version difference code file, computer equipment and medium
CN113900680A (en) * 2020-07-06 2022-01-07 中国移动通信集团重庆有限公司 Code management method and device and computing equipment
CN115134270A (en) * 2022-06-28 2022-09-30 北京奇艺世纪科技有限公司 Code monitoring method, monitoring system, electronic device and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101286119A (en) * 2008-05-27 2008-10-15 华耀环宇科技(北京)有限公司 Method for determining function point changing through code analysis
US20160062765A1 (en) * 2014-09-02 2016-03-03 International Business Machines Corporation Identifying semantic differences between source code versions
CN106445476A (en) * 2015-08-11 2017-02-22 腾讯科技(深圳)有限公司 Code change information determination method and device and electronic equipment
CN106569844A (en) * 2016-09-23 2017-04-19 北京五八信息技术有限公司 Processing method, processing device and equipment for program code update
CN108197031A (en) * 2018-01-16 2018-06-22 挖财网络技术有限公司 The recognition methods of application program page correcting and device

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101286119A (en) * 2008-05-27 2008-10-15 华耀环宇科技(北京)有限公司 Method for determining function point changing through code analysis
US20160062765A1 (en) * 2014-09-02 2016-03-03 International Business Machines Corporation Identifying semantic differences between source code versions
CN106445476A (en) * 2015-08-11 2017-02-22 腾讯科技(深圳)有限公司 Code change information determination method and device and electronic equipment
CN106569844A (en) * 2016-09-23 2017-04-19 北京五八信息技术有限公司 Processing method, processing device and equipment for program code update
CN108197031A (en) * 2018-01-16 2018-06-22 挖财网络技术有限公司 The recognition methods of application program page correcting and device

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111506339A (en) * 2020-05-29 2020-08-07 北京奇艺世纪科技有限公司 Method and device for processing change information of Software Development Kit (SDK)
CN113900680A (en) * 2020-07-06 2022-01-07 中国移动通信集团重庆有限公司 Code management method and device and computing equipment
CN111966353A (en) * 2020-08-13 2020-11-20 北京金山云网络技术有限公司 Job development method and device, electronic equipment and storage medium
CN112379888A (en) * 2020-12-02 2021-02-19 北京皮尔布莱尼软件有限公司 Code change analysis method
CN112379888B (en) * 2020-12-02 2024-08-13 北京皮尔布莱尼软件有限公司 Code change analysis method
CN112650551A (en) * 2020-12-31 2021-04-13 中国农业银行股份有限公司 System function display method and device
CN112650551B (en) * 2020-12-31 2024-06-11 中国农业银行股份有限公司 System function display method and device
CN112947991A (en) * 2021-03-30 2021-06-11 建信金融科技有限责任公司 Method and device for acquiring version difference code file, computer equipment and medium
CN115134270A (en) * 2022-06-28 2022-09-30 北京奇艺世纪科技有限公司 Code monitoring method, monitoring system, electronic device and storage medium
CN115134270B (en) * 2022-06-28 2023-09-08 北京奇艺世纪科技有限公司 Code monitoring method, monitoring system, electronic equipment and storage medium

Similar Documents

Publication Publication Date Title
CN110895472A (en) Method and device for identifying service change
CN111324786B (en) Method and device for processing consultation problem information
CN111460129B (en) Method, device, electronic equipment and storage medium for generating identification
CN110851471A (en) Distributed log data processing method, device and system
CN114490272A (en) Data processing method and device, electronic equipment and computer readable storage medium
CN114844792A (en) Dynamic monitoring method, device, equipment and storage medium based on LUA language
CN112988583A (en) Method and device for testing syntax compatibility of database
CN112308590B (en) Parameter processing method and device, computing equipment and storage medium
CN110245059B (en) Data processing method, device and storage medium
CN109284452B (en) Electronic protocol online display method and device, electronic equipment and storage medium
CN111367531A (en) Code processing method and device
CN113157523B (en) Service monitoring method and device, computer equipment and storage medium
CN113762910A (en) Document monitoring method and device
CN116450622B (en) Method, apparatus, device and computer readable medium for data warehouse entry
CN110580216B (en) Application lifting method and device
CN112905197A (en) Information processing method, device and system, electronic equipment and storage medium
CN111212112A (en) Information processing method and device
CN112817562A (en) Service processing method and device
CN112732471B (en) Error correction method and error correction device for interface return data
CN112783903B (en) Method and device for generating update log
CN109688174A (en) A kind of virtual service implementation method and device based on more agents service
CN114143308A (en) File uploading information processing method and device, computer equipment and storage medium
CN114840429A (en) Method, apparatus, device, medium and program product for identifying version conflicts
CN113312900A (en) Data verification method and device
CN108509455B (en) Data table processing method and device

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