Disclosure of Invention
The invention provides an optimization method and device of an update interface and a computer readable storage medium, and mainly aims to solve the problem of low update efficiency of the update interface.
In order to achieve the above object, the present invention provides a method for optimizing an update interface, including:
Receiving a request for version upgrading of a target application, and acquiring an update interface of the target application according to the request;
performing flow monitoring on the update interface to obtain flow information of the update interface;
Comparing the bandwidth peak value in the flow information with a preset bandwidth threshold value, and carrying out the following state modification on the update interface according to the comparison result:
when the bandwidth peak value is smaller than a preset bandwidth threshold value, modifying the non-updatable state of the updating interface into an updating state;
When the bandwidth peak value is greater than or equal to a preset bandwidth threshold value, modifying the update state of the update interface into an non-updatable state;
and acquiring the process log data of the state modification, and carrying out batch upgrade configuration on the update interface according to the flow information and the process log data to obtain an upgrade interface.
Optionally, the obtaining the update interface of the target application according to the request includes:
acquiring an interface protocol corresponding to the request;
Converting the parameter entering information and parameter exiting information in the interface protocol according to a preset description mode to obtain interface information;
and obtaining the updated interface according to the interface information.
Optionally, the performing flow monitoring on the update interface to obtain flow information of the update interface includes:
obtaining flow data of all interfaces of the target application according to a preset flow monitoring tool;
acquiring an interface ID of each interface, and classifying the flow data by using the interface ID to obtain classified flow;
and screening the classified flow by using a preset flow screening model to obtain the flow information of the updated interface.
Optionally, the performing flow monitoring on the update interface to obtain flow information of the update interface includes:
Obtaining an input data packet of the update interface according to a preset flow monitoring tool, and determining version information corresponding to the input data packet;
determining the data ID of the input data one by one according to the version information, and acquiring the output data of the input data according to the data ID;
And obtaining flow information of the update interface by using the input data and the output data.
Optionally, the comparing the bandwidth peak value in the traffic information with a preset bandwidth threshold value includes:
grouping the flow information according to a preset grouping basis to obtain grouping data;
Cutting off or zero filling is carried out on the grouping data one by one to obtain tidy data;
normalizing each group of the regular data, and forming a grouping byte matrix by using the normalized regular data;
Inputting the grouping byte matrix into a preset convolutional neural network to obtain the characteristic flow of the flow information, selecting a bandwidth peak value from the characteristic flow and performing difference calculation on the bandwidth peak value and a preset bandwidth threshold value;
when the difference of the bandwidth peak value minus the bandwidth threshold value is smaller than zero, the bandwidth peak value is smaller than a preset bandwidth threshold value;
and when the difference of the bandwidth peak value minus the bandwidth threshold value is larger than or equal to zero, the bandwidth peak value is larger than or equal to a preset bandwidth threshold value.
Optionally, the modifying the update state of the update interface to a non-updatable state includes:
acquiring a logic control code of the update interface, wherein an interface switch of the update interface can be controlled to be opened and closed through the logic control code;
When receiving the flow early warning sent by the flow monitoring tool, shielding the signal at the update interface by utilizing the logic control code, and modifying the update state of the update interface into an non-updatable state according to the signal.
Optionally, the batch upgrade configuration for the upgrade interface according to the flow information and the process log data, to obtain an upgrade interface, includes:
Extracting characteristics of the process log data to obtain a characteristic log;
Obtaining characteristic information according to the characteristic flow and the characteristic log, generating an upgrading table of the characteristic information according to a preset index, and extracting updating time information and updating number information of the updating interface by using the upgrading table;
Setting time parameters of the update interface according to the update time information to obtain a primary update interface;
And setting the number of people parameter of the primary updating interface according to the updated number of people information to obtain an updating interface.
In order to solve the above problems, the present invention further provides an optimization apparatus for updating an interface, the apparatus comprising:
the request module is used for receiving a request for version upgrading of the target application and acquiring an update interface of the target application according to the request;
the flow monitoring module is used for monitoring the flow of the update interface to obtain the flow information of the update interface;
The state modification module is used for comparing the bandwidth peak value in the flow information with a preset bandwidth threshold value, and carrying out the following state modification on the update interface according to a comparison result:
the first changing module is used for changing the non-updatable state of the updating interface into an updating state when the bandwidth peak value is smaller than a preset bandwidth threshold value;
The first changing module is used for changing the updating state of the updating interface into an non-updating state when the bandwidth peak value is larger than or equal to a preset bandwidth threshold value;
And the upgrade interface module is used for acquiring the process log data of the state modification, and carrying out batch upgrade configuration on the upgrade interface according to the flow information and the process log data to obtain an upgrade interface.
In order to solve the above-mentioned problems, the present invention also provides an electronic apparatus including:
at least one processor; and
A memory communicatively coupled to the at least one processor; wherein,
The memory stores a computer program executable by the at least one processor to enable the at least one processor to perform the method of optimizing the update interface described above.
In order to solve the above-mentioned problems, the present invention also provides a computer-readable storage medium having stored therein at least one computer program that is executed by a processor in an electronic device to implement the above-mentioned method of optimizing an update interface.
According to the embodiment of the invention, the flow monitoring is carried out on the updating interface, the flow information of the updating interface is obtained, the flow analysis can be better carried out on the updating interface, the bandwidth peak value related to the updating interface is obtained, the state change of the updating interface is carried out according to the bandwidth peak value, the state-modified process log data is obtained, the flow information and the process log data are analyzed, the number of users in different time periods can reach the peak value when downloading, the batch upgrading configuration of the updating interface is further completed, and the system paralysis caused by the software updating of all users is prevented. Therefore, the invention provides a method and a device for optimizing an update interface, electronic equipment and a computer readable storage medium, which can solve the problem of low update efficiency of the update interface.
Detailed Description
It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the scope of the invention.
The embodiment of the application provides an optimization method for updating an interface. The execution body of the method for updating the interface includes, but is not limited to, at least one of a server, a terminal, and the like, which can be configured to execute the method provided by the embodiment of the application. In other words, the method for optimizing the update interface may be performed by software or hardware installed in the terminal device or the server device, and the software may be a blockchain platform. The service end includes but is not limited to: a single server, a server cluster, a cloud server or a cloud server cluster, and the like. The server may be an independent server, or may be a cloud server that provides cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery networks (ContentDelivery Network, CDN), and basic cloud computing services such as big data and artificial intelligence platforms.
Referring to fig. 1, a flowchart of an optimization method for updating an interface according to an embodiment of the invention is shown. In this embodiment, the method for optimizing the update interface includes:
s1, receiving a request for version upgrading of a target application, and acquiring an update interface of the target application according to the request.
In an embodiment of the present invention, the obtaining, according to the request, an update interface of the target application includes: carrying out data analysis on the request to obtain a request data packet; and acquiring the access address in the request data packet, and acquiring the update interface of the target application by using the access address.
In detail, the request data packet comprises a request row, a message header and a message body, wherein the request row comprises a request type, a request resource path, a version and a type of a protocol in the first row of the request data packet, wherein when the request mode is get, the request parameter and the value are contained in the resource path, and when the request mode is post, the request parameter and the value are placed in the message body.
In an embodiment of the present invention, the obtaining, according to the request, an update interface of the target application includes: acquiring request parameters required by the verification interface according to the request; acquiring interface parameters of an interface type to be verified; calculating matching values of the request parameters and the interface parameters one by one, and obtaining target interface parameters when the matching values accord with a preset updating threshold value; and obtaining the updated interface of the target application by using the target interface parameters.
In detail, the request parameters required by the verification interface may be a protocol, version, request mode, resource specification, custom mode, upgrade mode, etc. of the interface to be verified;
in an embodiment of the present invention, the obtaining, according to the request, an update interface of the target application includes:
s21, acquiring an interface protocol corresponding to the request;
s22, converting the parameter entering information and the parameter exiting information in the interface protocol according to a preset description mode to obtain interface information;
s23, obtaining the update interface according to the interface information.
In detail, the interface to be acquired is an interface of other network platforms having a cooperative relationship with the network platform.
In detail, the converting the parameter entering information and parameter exiting information in the interface protocol according to a preset description mode to obtain interface information includes: determining parameter entering information and parameter exiting information of an interface to be acquired according to the interface protocol; the parameter entering information comprises a merchant identifier, a commodity number and an encrypted signature, and the parameter exiting information comprises an error code, error information and commodity information; for the same parameter, different network platform description modes are different; and determining the description modes of the parameter entering information and the parameter exiting information corresponding to the network platform from the mapping relation between the network platform and the parameter entering information and the parameter exiting information according to the network platform to which the interface to be acquired belongs, and converting the parameter entering information and the parameter exiting information of the network platform according to the preset description modes to obtain the interface information.
S2, carrying out flow monitoring on the updating interface to obtain flow information of the updating interface.
In the embodiment of the present invention, the performing flow monitoring on the update interface to obtain flow information of the update interface includes: obtaining flow data of all interfaces of the target application according to a preset flow monitoring tool; acquiring an interface ID of each interface, and classifying the flow data by using the interface ID to obtain classified flow; and screening the classified flow by using a preset flow screening model to obtain the flow information of the updated interface.
In detail, the flow monitoring tool includes Microsoft Network Monitor, umit, ADVANCED IP SCANNER, CAPSA FREE, the Dude, etc.;
In detail, classifying the flow data to obtain classified flow refers to sorting the flow data according to the use time, the target IP address, the peak frequency band, the number of users, and other attributes of the flow data, and recording analysis can be performed through an event table, a user attribute table, a target object table, and the like, wherein each record of the event table describes that a user completes a specific event at a certain time point and a certain place in a certain way, the user attribute table main body is a user, each user has a record, the attributes include user attributes (including platform, network, service provider, mobile phone model, region, and other natural attributes, user grade, whether the user grade is a large V, and other unnatural attributes), the user can be associated with the event table analysis through the user, the target object table is a target object, the target object is usually a main carrier of a service, such as a short video APP, the target object is a video, and the event table analysis can be associated through the target object.
In the embodiment of the present invention, the performing flow monitoring on the update interface to obtain flow information of the update interface includes:
Obtaining an input data packet of the update interface according to the flow monitoring tool, and determining version information corresponding to the input data packet; determining the data ID of the input data one by one according to the version information, and acquiring the output data of the input data according to the data ID; and obtaining flow information of the update interface by using the input data and the output data.
In detail, the version information includes, but is not limited to: the system version corresponding to the data packet, the path corresponding to the data packet, and the like.
S3, comparing the bandwidth peak value in the flow information with a preset bandwidth threshold value, and carrying out the following state modification on the update interface according to a comparison result:
In an embodiment of the present invention, comparing a bandwidth peak value in the traffic information with a preset bandwidth threshold value includes: grouping the flow information according to a preset grouping basis to obtain grouping data; cutting off or zero filling is carried out on the grouping data one by one to obtain tidy data; normalizing each group of the regular data, and forming a grouping byte matrix by using the normalized regular data; inputting the grouping byte matrix into a preset convolutional neural network to obtain the characteristic flow of the flow information, selecting a bandwidth peak value from the characteristic flow and performing difference calculation on the bandwidth peak value and a preset bandwidth threshold value; when the difference of the bandwidth peak value minus the bandwidth threshold value is smaller than zero, the bandwidth peak value is smaller than a preset bandwidth threshold value; and when the difference of the bandwidth peak value minus the bandwidth threshold value is larger than or equal to zero, the bandwidth peak value is larger than or equal to a preset bandwidth threshold value.
In detail, the bandwidth peak refers to the maximum value of the instantaneous traffic of the allowed station; the step of cutting off or zero filling is carried out on the grouping data one by one, the purpose of obtaining the ordered data is to form a grouping byte matrix to be used as the input of the CNN neural network, and the grouping data is required to be cut off or zero filling due to the fact that the sizes of all groups are inconsistent and the input dimension of the CNN neural network is considered to be unified; the normalization processing is performed on each group of the regular data, in order to improve training performance, the normalization is to limit the data to be processed to a certain range which is needed by the user after being processed through a certain algorithm, and in order to facilitate the subsequent data processing, the convergence is ensured to be accelerated when the program runs.
S4, when the bandwidth peak value is smaller than a preset bandwidth threshold value, modifying the non-updatable state of the updating interface into an updating state.
In an embodiment of the present invention, the modifying the non-updatable state of the update interface to the update state includes: acquiring a logic control code of the update interface, and controlling the opening and closing of an interface switch of the update interface through the logic control code; and opening the interface switch according to the updatable instruction sent by the flow monitoring tool, and modifying the updating interface from the non-updatable state to the updating state.
S5, when the bandwidth peak value is larger than or equal to a preset bandwidth threshold value, modifying the update state of the update interface into an non-updatable state.
In an embodiment of the present invention, the modifying the update status of the update interface to a non-updatable status includes: acquiring a logic control code of the update interface, wherein an interface switch of the update interface can be controlled to be opened and closed through the logic control code; when receiving the flow early warning sent by the flow monitoring tool, shielding the signal at the update interface by utilizing the logic control code, and modifying the update state of the update interface into an non-updatable state according to the signal.
In detail, under the condition that the server operates normally, various monitoring indexes are basically stabilized at a specific level, if the indexes exceed a certain threshold value, the system is likely to be in fault, and the flow early warning refers to a monitoring behavior that the monitoring system sends alarm information to related personnel when various technical indexes exceed an alarm threshold value during the operation of the website system.
In detail, the logic control code is utilized to shield the signal at the update interface, so that the request of a user for updating software can be blocked, and the overload of the flow is prevented.
S6, acquiring the process log data of the state modification, and carrying out batch upgrade configuration on the update interface according to the flow information and the process log data to obtain an upgrade interface.
In the embodiment of the present invention, the configuration for batch upgrade of the update interface according to the flow information and the process log data, to obtain an upgrade interface, includes:
S31, extracting characteristics of the process log data to obtain a characteristic log;
S32, obtaining characteristic information according to the characteristic flow and the characteristic log, generating an upgrade table of the characteristic information according to a preset index, and extracting update time information and update people number information of the update interface by using the upgrade table;
S33, setting time parameters of the update interface according to the update time information to obtain a primary update interface;
S34, setting the number of people parameter of the primary updating interface according to the updated number of people information to obtain an updating interface.
In detail, the process log data is a record of modifications made to the interface, including: state modification time, state modification state, state modification path, etc.; the preset index can be a time index and a person number index, and the characteristic information is classified and integrated according to the index.
According to the embodiment of the invention, the flow monitoring is carried out on the updating interface, the flow information of the updating interface is obtained, the flow analysis can be better carried out on the updating interface, the bandwidth peak value related to the updating interface is obtained, the state change of the updating interface is carried out according to the bandwidth peak value, the state-modified process log data is obtained, the flow information and the process log data are analyzed, the number of users in different time periods can reach the peak value when downloading, the batch upgrading configuration of the updating interface is further completed, and the system paralysis caused by the software updating of all users is prevented. Therefore, the invention provides the optimization method for updating the interface, which can solve the problem of low updating efficiency of the updating interface.
Fig. 4 is a functional block diagram of an apparatus for updating an interface according to an embodiment of the present invention.
The interface updating optimization apparatus 100 of the present invention may be installed in an electronic device. Depending on the implemented functions, the interface updating optimization apparatus 100 may include a request module 101, a flow monitoring module 102, a state modification module 103, a first modification module 104, a second modification module 105, and an upgrade interface module 106. The module of the invention, which may also be referred to as a unit, refers to a series of computer program segments, which are stored in the memory of the electronic device, capable of being executed by the processor of the electronic device and of performing a fixed function.
In the present embodiment, the functions concerning the respective modules/units are as follows:
The request module is used for receiving a request for version upgrading of the target application and acquiring an update interface of the target application according to the request;
the flow monitoring module is used for monitoring the flow of the update interface to obtain the flow information of the update interface;
the state modification module is configured to compare a bandwidth peak value in the flow information with a preset bandwidth threshold value, and perform the following state modification on the update interface according to a comparison result:
the first changing module is configured to change the non-updatable state of the update interface to an updated state when the bandwidth peak value is smaller than a preset bandwidth threshold value;
The second changing module is configured to change the update state of the update interface to an non-updatable state when the bandwidth peak value is greater than or equal to a preset bandwidth threshold value;
The upgrade interface module is used for acquiring the process log data of the state modification, and carrying out batch upgrade configuration on the upgrade interface according to the flow information and the process log data to obtain an upgrade interface.
Fig. 5 is a schematic structural diagram of an electronic device for implementing an optimization method for updating an interface according to an embodiment of the present invention.
The electronic device 1 may comprise a processor 10, a memory 11, a communication bus 12 and a communication interface 13, and may further comprise a computer program stored in the memory 11 and executable on the processor 10, such as an optimization program for updating the interface.
The processor 10 may be formed by an integrated circuit in some embodiments, for example, a single packaged integrated circuit, or may be formed by a plurality of integrated circuits packaged with the same function or different functions, including one or more central processing units (Central Processing Unit, CPU), microprocessors, digital processing chips, graphics processors, and combinations of various control chips. The processor 10 is a Control Unit (Control Unit) of the electronic device, connects various components of the entire electronic device using various interfaces and lines, executes or executes programs or modules stored in the memory 11 (for example, executes an update interface optimizing program or the like), and invokes data stored in the memory 11 to perform various functions of the electronic device and process data.
The memory 11 includes at least one type of readable storage medium including flash memory, a removable hard disk, a multimedia card, a card type memory (e.g., SD or DX memory, etc.), a magnetic memory, a magnetic disk, an optical disk, etc. The memory 11 may in some embodiments be an internal storage unit of the electronic device, such as a mobile hard disk of the electronic device. The memory 11 may also be an external storage device of the electronic device in other embodiments, such as a plug-in mobile hard disk, a smart memory card (SMART MEDIA CARD, SMC), a Secure Digital (SD) card, a flash memory card (FLASH CARD) or the like, which are provided on the electronic device. Further, the memory 11 may also include both an internal storage unit and an external storage device of the electronic device. The memory 11 may be used not only for storing application software installed in the electronic device and various types of data, such as code of an optimization program for updating an interface, but also for temporarily storing data that has been output or is to be output.
The communication bus 12 may be a peripheral component interconnect standard (PERIPHERAL COMPONENT INTERCONNECT, PCI) bus, or an extended industry standard architecture (Extended Industry Standard Architecture, EISA) bus, among others. The bus may be classified as an address bus, a data bus, a control bus, etc. The bus is arranged to enable a connection communication between the memory 11 and at least one processor 10 etc.
The communication interface 13 is used for communication between the electronic device and other devices, including a network interface and a user interface. Optionally, the network interface may include a wired interface and/or a wireless interface (e.g., WI-FI interface, bluetooth interface, etc.), typically used to establish a communication connection between the electronic device and other electronic devices. The user interface may be a Display (Display), an input unit such as a Keyboard (Keyboard), or alternatively a standard wired interface, a wireless interface. Alternatively, in some embodiments, the display may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, an OLED (Organic Light-Emitting Diode) touch, or the like. The display may also be referred to as a display screen or display unit, as appropriate, for displaying information processed in the electronic device and for displaying a visual user interface.
Only an electronic device having components is shown, and it will be understood by those skilled in the art that the structures shown in the figures do not limit the electronic device, and may include fewer or more components than shown, or may combine certain components, or a different arrangement of components.
For example, although not shown, the electronic device may further include a power source (such as a battery) for supplying power to the respective components, and preferably, the power source may be logically connected to the at least one processor 10 through a power management device, so that functions of charge management, discharge management, power consumption management, and the like are implemented through the power management device. The power supply may also include one or more of any of a direct current or alternating current power supply, recharging device, power failure detection circuit, power converter or inverter, power status indicator, etc. The electronic device may further include various sensors, bluetooth modules, wi-Fi modules, etc., which are not described herein.
It should be understood that the embodiments described are for illustrative purposes only and are not limited to this configuration in the scope of the patent application.
The optimization program of the update interface stored in the memory 11 of the electronic device 1 is a combination of instructions that, when executed in the processor 10, can implement:
Receiving a request for version upgrading of a target application, and acquiring an update interface of the target application according to the request;
performing flow monitoring on the update interface to obtain flow information of the update interface;
Comparing the bandwidth peak value in the flow information with a preset bandwidth threshold value, and carrying out the following state modification on the update interface according to the comparison result:
when the bandwidth peak value is smaller than a preset bandwidth threshold value, modifying the non-updatable state of the updating interface into an updating state;
When the bandwidth peak value is greater than or equal to a preset bandwidth threshold value, modifying the update state of the update interface into an non-updatable state;
and acquiring the process log data of the state modification, and carrying out batch upgrade configuration on the update interface according to the flow information and the process log data to obtain an upgrade interface.
In particular, the specific implementation method of the above instructions by the processor 10 may refer to the description of the relevant steps in the corresponding embodiment of the drawings, which is not repeated herein.
Further, the modules/units integrated in the electronic device 1 may be stored in a computer readable storage medium if implemented in the form of software functional units and sold or used as separate products. The computer readable storage medium may be volatile or nonvolatile. For example, the computer readable medium may include: any entity or device capable of carrying the computer program code, a recording medium, a U disk, a removable hard disk, a magnetic disk, an optical disk, a computer Memory, a Read-Only Memory (ROM).
The present invention also provides a computer readable storage medium storing a computer program which, when executed by a processor of an electronic device, can implement:
Receiving a request for version upgrading of a target application, and acquiring an update interface of the target application according to the request;
performing flow monitoring on the update interface to obtain flow information of the update interface;
Comparing the bandwidth peak value in the flow information with a preset bandwidth threshold value, and carrying out the following state modification on the update interface according to the comparison result:
when the bandwidth peak value is smaller than a preset bandwidth threshold value, modifying the non-updatable state of the updating interface into an updating state;
When the bandwidth peak value is greater than or equal to a preset bandwidth threshold value, modifying the update state of the update interface into an non-updatable state;
and acquiring the process log data of the state modification, and carrying out batch upgrade configuration on the update interface according to the flow information and the process log data to obtain an upgrade interface.
In the several embodiments provided in the present invention, it should be understood that the disclosed apparatus, device and method may be implemented in other manners. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the modules is merely a logical function division, and there may be other manners of division when actually implemented.
The modules described as separate components may or may not be physically separate, and components shown as modules may or may not be physical units, may be located in one place, or may be distributed over multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
In addition, each functional module in the embodiments of the present invention may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit. The integrated units can be realized in a form of hardware or a form of hardware and a form of software functional modules.
It will be evident to those skilled in the art that the invention is not limited to the details of the foregoing illustrative embodiments, and that the present invention may be embodied in other specific forms without departing from the spirit or essential characteristics thereof.
The present embodiments are, therefore, to be considered in all respects as illustrative and not restrictive, the scope of the invention being indicated by the appended claims rather than by the foregoing description, and all changes which come within the meaning and range of equivalency of the claims are therefore intended to be embraced therein. Any reference signs in the claims shall not be construed as limiting the claim concerned.
The blockchain is a novel application mode of computer technologies such as distributed data storage, point-to-point transmission, consensus mechanism, encryption algorithm and the like. The blockchain (Blockchain), essentially a de-centralized database, is a string of data blocks that are generated in association using cryptographic methods, each of which contains information from a batch of network transactions for verifying the validity (anti-counterfeit) of its information and generating the next block. The blockchain may include a blockchain underlying platform, a platform product services layer, an application services layer, and the like.
The embodiment of the application can acquire and process the related data based on the artificial intelligence technology. Wherein artificial intelligence (ARTIFICIAL INTELLIGENCE, AI) is the theory, method, technique, and application system that uses a digital computer or a digital computer-controlled machine to simulate, extend, and expand human intelligence, sense the environment, acquire knowledge, and use knowledge to obtain optimal results.
Furthermore, it is evident that the word "comprising" does not exclude other elements or steps, and that the singular does not exclude a plurality. A plurality of units or means recited in the system claims can also be implemented by means of software or hardware by means of one unit or means. The terms first, second, etc. are used to denote a name, but not any particular order.
Finally, it should be noted that the above-mentioned embodiments are merely for illustrating the technical solution of the present invention and not for limiting the same, and although the present invention has been described in detail with reference to the preferred embodiments, it should be understood by those skilled in the art that modifications and equivalents may be made to the technical solution of the present invention without departing from the spirit and scope of the technical solution of the present invention.