CN115344330A - Data transmission method and device, application processing method and device, and electronic device - Google Patents

Data transmission method and device, application processing method and device, and electronic device Download PDF

Info

Publication number
CN115344330A
CN115344330A CN202211036694.5A CN202211036694A CN115344330A CN 115344330 A CN115344330 A CN 115344330A CN 202211036694 A CN202211036694 A CN 202211036694A CN 115344330 A CN115344330 A CN 115344330A
Authority
CN
China
Prior art keywords
data
target
processing
array
preset
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
CN202211036694.5A
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.)
CCB Finetech Co Ltd
Original Assignee
CCB Finetech 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 CCB Finetech Co Ltd filed Critical CCB Finetech Co Ltd
Priority to CN202211036694.5A priority Critical patent/CN115344330A/en
Publication of CN115344330A publication Critical patent/CN115344330A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/448Execution paradigms, e.g. implementations of programming paradigms
    • G06F9/4488Object-oriented
    • G06F9/449Object-oriented method invocation or resolution
    • G06F9/4491Optimising based on receiver type
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/955Retrieval from the web using information identifiers, e.g. uniform resource locators [URL]
    • G06F16/9566URL specific, e.g. using aliases, detecting broken or misspelled links
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/10Text processing
    • G06F40/12Use of codes for handling textual entities
    • G06F40/151Transformation
    • G06F40/154Tree transformation for tree-structured or markup documents, e.g. XSLT, XSL-FO or stylesheets

Abstract

The disclosure provides a data transmission method and device, an application processing method and device and electronic equipment, which can be applied to the technical field of operation and maintenance data processing. The data transmission method comprises the following steps: acquiring first data to be processed, wherein the first data has a preset data format and comprises a plurality of arrays, and the arrays are used for representing processing rules respectively associated with different applications; traversing a plurality of arrays in the first data, and performing escape processing on the first array containing the special characters of the preset type to obtain second data, wherein the second data comprises the arrays obtained after the escape processing and the arrays which are not subjected to the escape processing; and transmitting the second data to the target program in a command line mode so as to call the target program to execute application processing on the target application according to the target array in the second data.

Description

Data transmission method and device, application processing method and device, and electronic device
Technical Field
The disclosure belongs to the technical field of operation and maintenance data processing, and particularly relates to a data transmission method and device, an application processing method and device, equipment, a medium and a program product.
Background
In the operation and maintenance process of the service cluster, an automatic scheduler is usually executed to execute operation and maintenance logic, and in the process of calling a program, related data needs to be transmitted to the program.
Disclosure of Invention
In view of the foregoing, the present disclosure provides a data transmission method and apparatus, an application processing method and apparatus, a device, a medium, and a program product.
In one aspect of the present disclosure, a data transmission method is provided, including:
acquiring first data to be processed, wherein the first data has a preset data format and comprises a plurality of arrays, and the arrays are used for representing processing rules respectively associated with different applications;
traversing a plurality of arrays in the first data, and performing escape processing on the first array containing the special characters of the preset type to obtain second data, wherein the second data comprises the arrays obtained after the escape processing and the arrays which are not subjected to the escape processing;
and transmitting the second data to the target program in a command line mode so as to call the target program to execute application processing on the target application according to the target array in the second data.
According to an embodiment of the present disclosure, wherein performing escape processing on the first type array containing the predetermined type of special characters comprises: and traversing a plurality of characters in the first array, and converting the special characters of the preset type in the first array into preset substitute characters.
According to an embodiment of the present disclosure, wherein the predetermined type of special character includes at least one of: the space character and the apostrophe character are used for converting the special characters of the preset type in the first array into preset replacing characters, and the method comprises the following steps:
converting space characters in the first type array into first preset replacing characters;
converting the one-quotation mark characters in the first array into second preset replacing characters;
the first preset substitute character and the second preset substitute character are different from other characters except the special character in the first data.
According to an embodiment of the present disclosure, wherein performing the escaping process on the first type array containing the special characters of the predetermined type further comprises: and adding a preset identifier to the first type array after the escape.
According to an embodiment of the present disclosure, wherein: the predetermined data format is a JSON format.
Another aspect of the present disclosure provides an application processing method, including:
receiving second data transmitted in a command line mode, wherein the second data is data obtained after the first data is subjected to escape processing, the first data and the second data adopt a preset data format, the first data and the second data comprise a plurality of arrays, and the arrays are used for representing processing rules respectively associated with different applications;
and executing application processing on the target application according to the target array in the second data.
According to an embodiment of the present disclosure, performing application processing on the target application according to the target array in the second data includes:
under the condition that a preset identifier is added to the target array, performing reverse sense processing on the target array added with the preset identifier to obtain a reverse sense target array so as to perform application processing on the target application according to the reverse sense target array, wherein the preset replacing characters are included in the target array added with the preset identifier; and
and in the case that the target array is not added with the preset identifier, executing application processing on the target application according to the target array which is not added with the preset identifier.
According to the embodiment of the disclosure, the obtaining of the denoised target array after performing the denotation processing on the target array added with the preset identifier comprises: traversing the plurality of characters in the target array to which the preset identifier is added, and converting the preset substitute character into a special character of a predetermined type.
According to the embodiment of the disclosure, the plurality of arrays in the second data include parameter values under a plurality of preset parameters, and the plurality of preset parameters include an application identifier, a time window length, a keyword, and an alarm trigger threshold;
according to the target array in the second data, executing application processing on the target application comprises:
acquiring operation and maintenance log data of the target application associated with the target application identifier, wherein the operation and maintenance log data comprises a plurality of target keywords;
analyzing the operation and maintenance log data of the target application to obtain the number of target keywords in the target time window length;
and sending an alarm to the target application under the condition that the number of the target keywords in the target time window length reaches a target alarm triggering threshold value according to the target array.
Another aspect of the disclosure provides a data transmission apparatus, which includes an obtaining module, an escaping module, and a transmission module.
The device comprises an acquisition module, a processing module and a processing module, wherein the acquisition module is used for acquiring first data to be processed, the first data has a preset data format, the first data comprises a plurality of arrays, and the arrays are used for representing processing rules respectively associated with different applications;
the escape module is used for traversing a plurality of arrays in the first data and performing escape processing on a first array containing special characters of a preset type to obtain second data, wherein the second data comprises the arrays obtained after the escape processing and the arrays which are not subjected to the escape processing;
and the transmission module is used for transmitting the second data to the target program in a command line mode so as to call the target program to execute application processing on the target application according to the target array in the second data.
According to an embodiment of the disclosure, the escape module includes a conversion unit, configured to traverse a plurality of characters in the first type array, and convert a predetermined type of special character in the first type array into a preset substitute character.
According to an embodiment of the present disclosure, wherein the predetermined type of special character includes at least one of: the space character and the single quotation mark character, and the conversion unit comprises a first conversion subunit and a second conversion subunit.
The first conversion subunit is used for converting the space characters in the first type array into first preset substitute characters;
the second conversion subunit is used for converting the one-quotation mark characters in the first array into second preset substitute characters; wherein the first preset substitute character and the second preset substitute character are different from other characters except the special character in the first data.
According to the embodiment of the disclosure, the escaping module further includes an adding unit, configured to add a preset identifier to the escaped first-class array.
According to an embodiment of the present disclosure, wherein the predetermined data format is a JSON format.
Another aspect of the disclosure provides an application processing apparatus, which includes a receiving module and a handling module.
The receiving module is used for receiving second data transmitted in a command line mode, wherein the second data is obtained by performing escape processing on first data, the first data and the second data adopt a preset data format, the first data and the second data comprise a plurality of arrays, and the arrays are used for representing processing rules respectively associated with different applications;
and the processing module is used for executing application processing on the target application according to the target array in the second data.
According to an embodiment of the present disclosure, a handling module includes an inverse sense unit, an execution unit.
The reverse sense unit is used for performing reverse sense processing on the target array added with the preset identifier to obtain a reverse sense target array under the condition that the preset identifier is added to the target array, so as to perform application processing on the target application according to the reverse sense target array, wherein the target array added with the preset identifier comprises preset substitute characters; and
and the execution unit is used for executing application processing on the target application according to the target array which is not added with the preset identifier under the condition that the preset identifier is not added to the target array.
According to an embodiment of the present disclosure, the reverse meaning unit includes a third conversion subunit configured to traverse a plurality of characters in the target array to which the preset identifier is added, and convert the preset substitute character into a predetermined type of special character.
According to the embodiment of the disclosure, the plurality of arrays in the second data include parameter values under a plurality of preset parameters, and the plurality of preset parameters include an application identifier, a time window length, a keyword, and an alarm trigger threshold;
the treatment module includes:
the acquisition unit acquires operation and maintenance log data of the target application associated with the target application identifier, wherein the operation and maintenance log data comprises a plurality of target keywords;
the analysis unit is used for analyzing the operation and maintenance log data of the target application to obtain the number of target keywords in the target time window length;
and the alarm unit sends an alarm to the target application under the condition that the number of the target keywords in the length of the target time window reaches a target alarm triggering threshold value according to the target array.
Another aspect of the present disclosure provides an electronic device including: one or more processors; a memory for storing one or more programs, wherein the one or more programs, when executed by the one or more processors, cause the one or more processors to perform the above-described data transmission method or application processing method.
Another aspect of the present disclosure also provides a computer-readable storage medium having stored thereon executable instructions, which when executed by a processor, cause the processor to perform the above-described data transmission method or application processing method.
Another aspect of the present disclosure also provides a computer program product comprising a computer program which, when executed by a processor, implements the above-described data transmission method or application processing method.
Drawings
The foregoing and other objects, features and advantages of the disclosure will be apparent from the following description of embodiments of the disclosure, taken in conjunction with the accompanying drawings of which:
fig. 1 schematically illustrates an application scenario diagram of a data transmission method, apparatus, device, medium, and program product according to embodiments of the present disclosure;
fig. 2 schematically shows a flow chart of a data transmission method according to an embodiment of the present disclosure;
FIG. 3 schematically shows a flow diagram of an application processing method according to an embodiment of the present disclosure;
FIG. 4 schematically illustrates a flow diagram of a method of performing application processing on a target application, in accordance with an embodiment of the present disclosure;
fig. 5 schematically shows a block diagram of a data transmission apparatus according to an embodiment of the present disclosure;
fig. 6 schematically shows a block diagram of the structure of an application processing apparatus according to an embodiment of the present disclosure;
fig. 7 schematically shows a block diagram of an electronic device adapted to implement a data transmission method according to an embodiment of the present disclosure.
Detailed Description
Hereinafter, embodiments of the present disclosure will be described with reference to the accompanying drawings. It should be understood that the description is illustrative only and is not intended to limit the scope of the present disclosure. In the following detailed description, for purposes of explanation, numerous specific details are set forth in order to provide a thorough understanding of the embodiments of the disclosure. It may be evident, however, that one or more embodiments may be practiced without these specific details. Moreover, in the following description, descriptions of well-known structures and techniques are omitted so as to not unnecessarily obscure the concepts of the present disclosure.
The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the disclosure. The terms "comprises," "comprising," and the like, as used herein, specify the presence of stated features, steps, operations, and/or components, but do not preclude the presence or addition of one or more other features, steps, operations, or components.
All terms (including technical and scientific terms) used herein have the same meaning as commonly understood by one of ordinary skill in the art unless otherwise defined. It is noted that the terms used herein should be interpreted as having a meaning that is consistent with the context of this specification and should not be interpreted in an idealized or overly formal sense.
Where a convention analogous to "A, B and at least one of C, etc." is used, in general such a construction is intended in the sense one having skill in the art would understand the convention (e.g., "a system having at least one of A, B and C" would include, but not be limited to, systems that have a alone, B alone, C alone, a and B together, a and C together, B and C together, and/or A, B, C together, etc.).
During the operation of various types of servers, there are many scenarios that require invoking an automation program, for example, during the service cluster executing service, an automation scheduler is usually executed to execute corresponding processing, and further, during the service cluster operation and maintenance, an operation and maintenance logic is usually executed by executing the automation scheduler, and during the procedure of invoking the program, related data is usually transferred to the program in a command line manner (a command line generally refers to a command prompt, where a command prompt is a work prompt for prompting command input in an operating system, and there are differences between different operating systems).
In the process of implementing the present disclosure, it is found that, in the data transmission process, the problem of character data missing occurs in the character string data transmitted to the downstream, which results in the program being unable to run.
For example, in the related art, in the process of writing a script running program in a command line manner, the transferred parameters are processed by special characters, such as single quotation marks or double quotation marks, if the required parameters are directly transmitted, because data produced by a service system has dynamic uncertainty, namely simple and complex data, simple character strings may not have the problem of data loss, but for more complex character strings, the parameters are lost when being transmitted to the downstream, wherein the degrees of different operating system losses are different, so that the program availability is low, and the bit error rate is high.
In view of this, an embodiment of the present disclosure provides a data transmission method, including:
acquiring first data to be processed, wherein the first data has a preset data format and comprises a plurality of arrays, and the arrays are used for representing processing rules respectively associated with different applications;
traversing a plurality of arrays in the first data, and performing escape processing on the first array containing the special characters of the preset type to obtain second data, wherein the second data comprises the arrays obtained after the escape processing and the arrays which are not subjected to the escape processing;
and transmitting the second data to the target program in a command line mode so as to call the target program to execute application processing on the target application according to the target array in the second data.
Fig. 1 schematically illustrates an application scenario diagram of a data transmission method, apparatus, device, medium, and program product according to an embodiment of the present disclosure.
As shown in fig. 1, the application scenario 100 according to this embodiment may include terminal devices 101, 102, 103, a network 104, and a server 105. The network 104 serves as a medium for providing communication links between the terminal devices 101, 102, 103 and the server 105. Network 104 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 devices 101, 102, 103 to interact with the server 105 via the network 104 to receive or send messages or the like. The terminal devices 101, 102, 103 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 101, 102, 103 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 105 may be a server providing various services, such as a background management server (for example only) providing support for websites browsed by users using the terminal devices 101, 102, 103. The background management server may analyze and perform other processing on the received data such as the user request, and feed back a processing result (e.g., a webpage, information, or data obtained or generated according to the user request) to the terminal device.
In the application scenario of the embodiment of the present disclosure, a user may initiate a request to the server 105 through the terminal devices 101, 102, and 103, so as to invoke a target program to execute application processing on different applications. In response to the user request, the server 105 may execute the data transmission method of the embodiment of the present disclosure, acquire the data to be processed, perform escape processing on the data, and transmit the data to the target program in a command line manner, so that the target program is called to perform application processing on the target application according to the target array in the second data.
It should be noted that the data transmission method provided by the embodiment of the present disclosure may be generally executed by the server 105. Accordingly, the data transmission device provided by the embodiment of the present disclosure may be generally disposed in the server 105. The data transmission method provided by the embodiment of the present disclosure may also be performed by a server or a server cluster that is different from the server 105 and is capable of communicating with the terminal devices 101, 102, 103 and/or the server 105. Accordingly, the data transmission apparatus provided in the embodiments of the present disclosure may also be disposed in a server or a server cluster different from the server 105 and capable of communicating with the terminal devices 101, 102, 103 and/or the server 105.
It should be understood that the number of terminal devices, networks, and servers in fig. 1 is merely illustrative. There may be any number of terminal devices, networks, and servers, as desired for implementation.
The data transmission method of the disclosed embodiment will be described in detail below with fig. 2 to 7 based on the scenario described in fig. 1.
Fig. 2 schematically shows a flow chart of a data transmission method according to an embodiment of the present disclosure.
As shown in fig. 2, the data transmission method of this embodiment includes operations S201 to S203.
In operation S201, first data to be processed is acquired, where the first data has a predetermined data format, and the first data includes a plurality of arrays, and the arrays are used to represent processing rules respectively associated with different applications;
in operation S202, traversing a plurality of arrays in the first data, and performing escape processing on a first array including a predetermined type of special character to obtain second data, where the second data includes an array obtained after the escape processing and an array not subjected to the escape processing;
in operation S203, the second data is transferred to the target program in a command line manner so that the calling target program performs application processing on the target application according to the target array in the second data.
In the running process of various servers, there are many scenes that an automation program needs to be called, the calling of the automation program needs to transmit parameters to the program, generally, one automation program may respectively execute different processing for different applications, for example, in the process of executing a service by a service cluster, a data processing program is generally called to execute different data processing logics for different applications; for another example, in a service cluster operation and maintenance process, the operation and maintenance logic is usually executed by executing an automated scheduler, and therefore, the logic for executing the process cannot be written to the target program. The target program may be caused to perform different application processing according to data of different applications by dynamically passing in data characterizing the application processing rules to the target program.
According to an embodiment of the present disclosure, first data to be transmitted may be pre-stored in a database, and in operation S201, the first data to be processed may be obtained from the database, where the first data includes application processing logic associated with a plurality of applications, and specifically may include a plurality of arrays, and the plurality of arrays are used to represent processing rules respectively associated with different applications.
According to the embodiment of the disclosure, since the first data may include various special characters, such as a space, an apostrophe, etc., such characters may cause a data loss situation during the transmission of the command line. Accordingly, in operation S202, an escape process is performed on the first type array containing the predetermined type of special character, for example, the special character therein may be converted into a preset substitute character.
According to the embodiment of the present disclosure, in operation S203, the automated scheduling program directly transmits data to the target program in a command line manner, so that the target program can be called to perform different application processes on different applications. Specifically, the method of the embodiment of the present disclosure may be used in a server operation and maintenance scene, and in a service cluster operation and maintenance process, an automatic scheduler is executed to execute an operation and maintenance logic. In a scenario of a change again, the operations S201 to S203 may specifically be:
in operation S201, first alarm configuration data to be processed is obtained, where the first alarm configuration data has a predetermined data format, and the first alarm configuration data includes a plurality of arrays, and the arrays are used to represent alarm rules respectively associated with different applications;
in operation S202, traversing a plurality of arrays in the first alarm configuration data, and performing escape processing on a first array including a predetermined type of special characters to obtain second alarm configuration data, where the second alarm configuration data includes an array obtained after escape processing and an array not subjected to escape processing;
in operation S203, the second alarm configuration data is transmitted to the alarm program in a command line manner, so that the calling alarm program performs alarm handling on the target application according to the target array in the second alarm configuration data.
According to the embodiment of the disclosure, in the operation and maintenance process of the service cluster, different alarm handling modes are generally adopted for different applications, and therefore, the logic of alarm handling cannot be written in an alarm program. The alarm program may be caused to perform different alarm handling according to alarm configuration data of different applications by dynamically passing alarm configuration data characterizing alarm handling rules into the alarm program.
According to the embodiment of the present disclosure, first alarm configuration data to be transmitted may be stored in a database in advance, and in operation S201, the first alarm configuration data to be processed may be obtained from the database, where the first alarm configuration data includes alarm processing logic associated with multiple applications, and specifically may include multiple arrays, and the multiple arrays are used to represent alarm rules respectively associated with different applications.
According to the embodiment of the disclosure, for example, an array associated with a certain application in the first alarm configuration data to be transmitted may be characterized in that an alarm is triggered when the number of specific keywords reaches a preset threshold in a certain time window. The application identifier, the length of the time window, the keyword and the alarm trigger threshold are alarm configuration data to be transmitted.
According to the embodiment of the disclosure, since the first alarm configuration data may include various special characters, such as a space, an apostrophe, and the like, such characters may cause a data loss situation during the transmission of the command line. Accordingly, in operation S202, an escape process is performed on the first type array containing the predetermined type of special character, for example, the special character therein may be converted into a preset substitute character.
According to the embodiment of the disclosure, in operation S203, by directly transmitting the alarm configuration data to the alarm program in a command line manner through the automated scheduler, it may be implemented to call the alarm program to perform different alarm handling on different applications.
It should be noted that the data transmission method in the embodiment of the present disclosure is not limited to the above operation and maintenance alarm configuration data transmission scenario, and is applicable to any scenario requiring data transmission of an automation program.
According to the embodiment of the disclosure, because the data produced by the service system has dynamic uncertainty, for more complex configuration data, because of containing special characters, data loss can occur in the process of adopting command line parameter transmission, the configuration data is subjected to escape processing through an upstream data processing system, the special characters are converted and substituted, and are substituted by characters which can not be lost in the scene, so that the data loss can not occur in the process of transmitting the data in a command line mode, the technical problems of low program availability and high error rate are solved, the program availability is improved, and the service loss is reduced; the downstream target program can obtain accurate configuration information by carrying out reverse meaning after receiving the data, so that the subsequent accurate execution of application processing is facilitated, the timeliness and the accuracy of the application processing are improved, and the fault positioning and the fault processing are facilitated.
According to the embodiment of the disclosure, further, the first data adopts a JSON format, and JSON is used as a lightweight data exchange format, so that the transmission speed is high, and the processing is convenient. The predetermined types of special characters that may be included in the JSON formatted data include, but are not limited to, space characters, apostrophe characters, etc., which in the case of a command line may cause a data loss situation.
Performing escape processing on a first type array containing a predetermined type of special character includes: and traversing a plurality of characters in the first array, and converting the special characters of the preset type in the first array into preset substitute characters. The method specifically comprises the following steps: converting the space characters in the first type array into first preset replacing characters; converting the one-quotation mark characters in the first array into second preset replacing characters; the first preset substitute character and the second preset substitute character may be any characters without data loss in the context of the embodiment of the present disclosure (in the case of JSON data transmission in a command line), such as "%", "#", or a combination of the above characters with numbers or letters, such as "%5", "% a", and the like, it should be noted that the preset substitute characters need to be different from other characters in the first data except for the special characters.
According to the embodiment of the disclosure, by the method, different special characters are converted into different alternative characters, so that the problem of data transmission loss can be avoided, the problem of confusion of the reverse meaning in the subsequent process of the reverse meaning can be avoided, the transmission quality of data in the data transmission process is improved on the basis of ensuring that the data cannot be lost in the data transmission process, and the preset alternative characters are set to be different from other characters except the special characters in the first data, so that the data can be conveniently distinguished from the entity of the data.
According to an embodiment of the present disclosure, in the data transmission method, performing the escaping process on the first type array containing the special characters of the predetermined type may further include: and carrying out URL coding on a plurality of characters in the first array, and converting the special characters of the preset type in the first array through the URL coding. For example, the space character, the apostrophe character, etc. in the first array are converted into specific characters according to a given coding rule, for example, the combined characters of "%" and letters, numbers, etc., will not result in the loss of characters in the data transmission process.
For example, a JSON string sample to be transmitted: to { "key": "value test" }
The URL coding of the JSON character string can be realized through a URL coding packet provided by Java language, and the URL coding is a coding format, so that a URL coding algorithm can be realized through each coding language according to a coding principle.
The URL coding example implemented by Java is as follows:
String arg=″{\″key\″:\″value test\″}″;
java.net.URLEncoder.encode(arg,″utf-8″);
the result of the JSON character string after being coded by the URL is as follows:
%7B%22key%22%3A%22value+test%22%7D。
therefore, through the conversion, the space characters, the quotation mark characters and the like in the array characters to be transmitted can be converted into specific characters according to a set coding rule, and the characters cannot be lost in the data transmission process.
According to the embodiment of the disclosure, after the first array containing the special characters of the preset type is subjected to escape processing through the URL coding, the target array obtained after the URL coding is carried out is transmitted to a downstream target program.
After receiving the data, the downstream program needs to perform reverse sense processing, specifically, the downstream program performs reverse sense processing on the target array to obtain a reverse sense target array, which may be:
and URL decoding is carried out on a plurality of characters in the target array. Through URL decoding, a specific character in the target array can be restored to a character before data transmission. For example, a character combining "%" with letters or numerals is reduced to a space character or an apostrophe character.
Taking a Java program as an example, performing URL decoding may be performing:
java-jar test. Jar%7B% 22%3A%22value +22% 22%7D; the example is a java command line execution statement, test, jar is an executable jar packet, and the parameters at the back side are data encoded by the URL in the step one.
According to an embodiment of the present disclosure, wherein performing the escaping process on the first type array containing the special characters of the predetermined type further comprises: and adding a preset identifier to the first type array after the escape.
According to the embodiment of the present disclosure, since the first data includes a plurality of arrays associated with a plurality of applications, it is possible that not every array includes a special character, and therefore it is not necessary to perform escape processing on all arrays, and accordingly, the downstream program does not need to perform escape processing on all arrays included therein after receiving the second data. By adding the identifier to the array needing to be subjected to escape, after receiving the data, the downstream program determines whether the escape is needed according to the identifier without performing the escape on all the data, so that the speed of downstream data processing can be increased (the downstream program can determine whether the data identifier exists before performing the escape, and does not need the escape if the data identifier does not exist).
Another aspect of the present disclosure provides an application processing method, and fig. 3 schematically shows a flowchart of the application processing method according to an embodiment of the present disclosure.
As shown in fig. 3, the application processing method of this embodiment includes operations S301 to S302:
in operation S301, receiving second data transmitted in a command line manner, where the second data is obtained by performing escape processing on first data, and the first data and the second data adopt a predetermined data format, and the first data and the second data include a plurality of arrays, and the plurality of arrays are used to represent processing rules respectively associated with different applications;
in operation S302, application processing is performed on the target application according to the target array in the second data.
According to the embodiment of the disclosure, the application processing is performed on the target application, and the application processing may be performed on the target applications associated with the target arrays respectively for different target arrays. Each application is associated with a processing rule (corresponding to a set of arrays).
For example, in a scenario of operation and maintenance of a service cluster, the processing rule may be, for example, to issue an alarm to the target application when the number of predetermined keywords in a preset time window length reaches a preset alarm trigger threshold. The different applications may correspond to different processing rules respectively, correspond to different arrays, or partially apply and associate the same processing rules, depending on the specific service scenario. For example, the processing rule applying a association may be: in case the number of keywords "error" in the length of the "1 minute" time window reaches "100", an alarm is issued to application a. The processing rule applying the B association may be: and in the case that the number of the keywords 'error' in the length of the '2-minute' time window reaches '150', giving an alarm to the application B. The same processing rule may be associated between application a and application B.
According to the embodiment of the disclosure, for more complex configuration data, due to the fact that the configuration data contain special characters, data loss occurs in the process of adopting command line parameter transmission, the configuration data is subjected to escape processing through an upstream data processing system, the special characters are converted and replaced, and the characters which cannot be lost in the scene are replaced, so that in operation S301, second data received at the downstream is data subjected to escape processing on the configuration data by the upstream data processing system, and therefore data loss does not occur in the process of transmitting data in a command line mode, the technical problems of low program availability and high error rate are solved, the program availability is improved, and the service loss is reduced.
FIG. 4 schematically illustrates a flow diagram of a method of performing application processing on a target application, in accordance with an embodiment of the disclosure.
As shown in fig. 4, the method of executing the application process of this embodiment includes operations S401 to S402.
In operation S401, in a case that the target array is added with the preset identifier, performing an inverse sense processing on the target array added with the preset identifier to obtain an inverse sense target array, so as to perform an application processing on the target application according to the inverse sense target array, where the target array added with the preset identifier includes a preset substitute character;
in operation S402, in the case where the target array is not added with the preset identifier, the application process is performed on the target application according to the target array to which the preset identifier is not added.
According to an embodiment of the present disclosure, in operation S401, performing an inverse sense processing on the target array to which the preset identifier is added to obtain an inverse sense target array includes: traversing the plurality of characters in the target array added with the preset identifier, and converting the preset substitute character into a special character of a preset type. Because the upstream data processing system converts the special characters of the predetermined type in the first type array into the preset substitute characters in the process of carrying out the escape processing on the first data, for example: converting the space characters in the first type array into first preset replacing characters; and converting the one-way number characters in the first type array into second preset replacing characters. Thus, after the downstream program receives the data, the reverse sense may be performed by converting the predetermined substitute character into a predetermined type of special character. The method specifically comprises the following steps: converting the first preset substitute character back to a blank character; and converting the second preset substitute character back to the single quotation mark character so as to restore the original data format of the first data by reverse meaning.
According to the embodiment of the disclosure, since the upstream data processing system adds the data identifier after the array needing to be subjected to escape is subjected to escape, after the downstream program receives the second data, it is not necessary to perform escape on all arrays contained in the second data, whether the data identifier exists or not can be checked before performing escape, and if the data identifier does not exist, escape is not necessary, so that in the case that the target array is added with the preset identifier, the target array with the preset identifier needs to be subjected to escape processing to obtain the escape-subjected target array. After receiving the data, the downstream program determines whether to require escaping according to the data identification, and does not need to carry out escaping on all the data, thus improving the speed of downstream data processing.
According to the embodiment of the disclosure, in a service cluster operation and maintenance scene, the first data and the second data are alarm configuration data, a plurality of arrays in the second data and the first data include parameter values under a plurality of preset parameters, and the plurality of preset parameters include an application identifier, a time window length, a keyword and an alarm trigger threshold. That is, an array associated with an application in the data may be characterized in that an alarm is triggered when the number of specific keywords in a certain time window reaches a preset threshold. The application identifier, the length of the time window, the keyword, and the alarm trigger threshold are data to be transmitted.
For example, some data includes two arrays, as follows:
{″alarms″:[{″id″:″1″,″keywords″:″error″,″window″:60000,″num″:10},{″id″:″2″,″keywords″:″level:error|′exception′″,window″:60000,″num″:10}]};
in the above example, the respective parameters respectively represent the following meanings: "id" represents the application identifier, "keywords" represents the keyword, "window" represents the time window length, 60000 is milliseconds, and "num" represents the alarm trigger threshold.
According to the embodiment of the disclosure, in the operation and maintenance process, when an application program has a problem, the log information of the application program is read first, and because one program may be associated with a plurality of servers in the micro-service mode, and load balancing processing is performed on traffic, logs of a single application can appear in the plurality of servers. The log data of the servers respectively associated with the applications can be stored in different storage fragments through Hash operation, and the log data associated with the same application is stored in the same storage fragment, so that subsequent processing and analysis are facilitated. And then, the log data of the application can be read from a certain memory fragment and the log data is analyzed and processed to obtain key information of the log data, such as the number of target keywords in the target time window length, so as to obtain corresponding processing rules according to parameter values under a plurality of preset parameters included in the target array in the second data, so as to execute application processing on the target application according to the processing rules.
Specifically, according to the target array in the second data, executing the application processing on the target application includes: firstly, obtaining operation and maintenance log data of a target application associated with a target application identifier, wherein the operation and maintenance log data comprises a plurality of target keywords; then analyzing the operation and maintenance log data of the target application to obtain the number of target keywords in the target time window length; and finally, according to the target array, sending an alarm to the target application under the condition that the number of the target keywords in the target time window length reaches a target alarm triggering threshold value.
According to the embodiment of the disclosure, the downstream alarm program executes alarm processing on different applications according to different alarm rules by acquiring the alarm rules of the different applications, and the downstream alarm can acquire accurate configuration information, so that the timeliness and the accuracy of the alarm processing are improved, differential alarm processing on different applications is realized, and the fault positioning and the fault processing are facilitated in time.
According to the embodiments of the present disclosure, the following describes an exemplary data transmission method and an exemplary application processing method in the embodiments of the present disclosure, specifically as follows:
performing escape processing on JSON character string-first data to be transmitted:
for example, some data includes two arrays, as follows:
{″alarms″:[{″id″:″1″,″keywords″:″error″,″window″:60000,″num″:10},{″id″:″2″,″keywords″:″level:error|′exception′″,window″:60000,″num″:10}]};
in the above example, the respective parameters respectively represent the following meanings: "id" represents the application identifier, "keywords" represents the keyword, "window" represents the time window length, 60000 is milliseconds, and "num" represents the alarm trigger threshold.
The operation of transferring the JSON character string comprises the following steps:
operation 1, traversing the alarms array, acquiring the value of keywords therein, traversing the character string, and when meeting "", or "", escaping with% 0 and% 1 respectively, and finally obtaining the escaped data as follows:
{ "alarms": [ { "id": "1", "keywords": "error" }, { "id": "2", "keywords": "level: error%0|% l "," window ": 60000, "num": 10} ], "transform": { "arms": { "2": { "% 0": ","% 1 ": ""' } }; wherein, the data after escaping will have an extra transform mark, and the information which needs to be escaped is stored in the mark.
And 2, transferring the escaped data to a downstream program, and calling the task script through an automation program.
And operation 3, acquiring the escaped data by the program and inverting the escaped data, wherein the escaped data has an additional transform identifier and information which needs to be inverted is stored in the escaped data. Before performing the reverse sense, firstly, whether the array contains the identification of transform is judged.
For example, when the alarms in the data is acquired, firstly, judging whether a key in the transform exists as an alarms value, and if the key does not exist, directly using the alarms value; if yes, obtaining the value of alarms in transform: { "2": { "% 0": ","% 1 ": ""' } which is the data structure of a map, with a key of 2 representing the second set of numbers in the data of the alarms, and a value corresponding to a key of 2 being the object of a map structure, wherein the key is the character "% 0" or "% 1" after replacement, and the value is the character "" or "" before replacement;
the value of alarms [ { "id": "1", "keywords": "error" }, { "id": "2", "keywords": "level: error%0|%, 1 "} ]", which is reduced to:
[{″id″:″1″,″keywords″:″error″},
{″id″:″2″,″keywords″:″level:error|′exception′″}]
the reduction method comprises the following steps: traversing the alarms data, and taking out, according to whether the alarms in the subscript transform contains a corresponding value, in this example, for an array whose id is identified as "2": { "% 0": ","% 1 ": ""' }; traversing the string, replacing "% 0" with {% 0 "when encountering the same key value"% 0 "or"% 1 "as the rule described above: ","% 1 ": the value "" or "" in ""' } results in: level: error | 'exception'.
In the above example, the array with id "1" in the array of alarms is identified and transformed to indicate that there is no character to be converted, so no processing is required and the corresponding value is used directly.
According to the embodiment of the disclosure, the data after the disambiguation is verified, and the result is as follows: { "arms": [ { "id": "1", "keywords": "error" }, { "id": "2", "keywords": "level: error | 'exception' ", window": 60000, "num": 10} ], it can be seen that the data is the same as the first data before the escape, indicating that the data is correct.
In order to verify the effectiveness of the above-described data processing method of the embodiments of the present disclosure, the following exemplarily gives results of employing a conventional data processing method.
The result of not subjecting the first data to escape processing is simulated below by the just-previous data processing logic.
Sample A:
JSON sample: { "key": "value";
after passing in through the command line, the result is executed: { "key": "value";
sample B:
JSON sample: { "key": "value test" };
after passing in through the command line, the result is executed: { "key": "value }.
As can be seen from the above example, in sample a, the obtained execution result and the original data are consistent, whereas in sample B, the obtained execution result and the original data are inconsistent. The reason is that special characters are contained between value tests in sample B: the space is divided when the command is transmitted through the command line, and the space is mistaken for two parameters, so that the execution result is { "key": "value }.
Therefore, the problem of data loss in the process of directly transmitting the JSON character string parameter in the command line can be solved through the user-defined escape mode of the embodiment of the disclosure.
Based on the data transmission method, the disclosure also provides a data transmission device. The apparatus will be described in detail below with reference to fig. 5.
Fig. 5 schematically shows a block diagram of a data transmission apparatus according to an embodiment of the present disclosure.
As shown in fig. 5, the data transmission apparatus 500 of this embodiment includes an acquisition module 501, an escape module 502, and a transmission module 503.
The acquiring module 501 is configured to acquire first data to be processed, where the first data has a predetermined data format, and the first data includes a plurality of arrays, and the arrays are used to represent processing rules respectively associated with different applications;
an escape module 502, configured to traverse a plurality of arrays in the first data, and perform escape processing on a first type of array that includes a predetermined type of special character to obtain second data, where the second data includes an array obtained after escape processing and an array that is not subjected to escape processing;
a transmission module 503, configured to transmit the second data to the target program in a command line manner, so that the calling target program executes application processing on the target application according to the target array in the second data.
According to the embodiment of the disclosure, because the data produced by the service system has dynamic uncertainty, for the more complex configuration data, because the data contains special characters, data loss can occur in the process of adopting command line transmission, the configuration data is subjected to escape processing through the escape module 502, the special characters are converted and substituted, and the special characters are substituted by characters which can not be lost in the scene, so that the data loss can not occur in the process of transmitting the data in a command line mode, the technical problems of low program availability and high error rate are solved, the program availability is improved, and the service loss is reduced; the downstream target program can obtain accurate configuration information by carrying out reverse meaning after receiving the data, so that the subsequent accurate execution of application processing is facilitated, the timeliness and the accuracy of the application processing are improved, and the fault positioning and the fault processing are facilitated.
According to an embodiment of the disclosure, the escape module includes a conversion unit, configured to traverse a plurality of characters in the first type array, and convert a predetermined type of special character in the first type array into a preset substitute character.
According to an embodiment of the present disclosure, wherein the predetermined type of special character includes at least one of: the space character and the single quotation mark character, and the conversion unit comprises a first conversion subunit and a second conversion subunit.
The first conversion subunit is used for converting the space characters in the first type array into first preset substitute characters;
the second conversion subunit is used for converting the one-quotation mark characters in the first array into second preset substitute characters; wherein the first preset substitute character and the second preset substitute character are different from other characters except the special character in the first data.
According to the embodiment of the disclosure, the escaping module further includes an adding unit, configured to add a preset identifier to the escaped first-class array.
According to an embodiment of the present disclosure, wherein the predetermined data format is a JSON format.
Based on the above application processing method, another aspect of the present disclosure provides an application processing apparatus, and fig. 6 schematically shows a structural block diagram of the application processing apparatus according to an embodiment of the present disclosure.
As shown in fig. 6, the application processing apparatus 600 of this embodiment includes a receiving module 601 and a handling module 602.
The receiving module 601 is configured to receive second data transmitted in a command line manner, where the second data is obtained by performing escape processing on first data, the first data and the second data adopt a predetermined data format, and the first data and the second data include multiple arrays, and the multiple arrays are used to represent processing rules respectively associated with different applications;
a handling module 602, configured to perform application processing on the target application according to the target array in the second data.
According to the embodiment of the disclosure, for more complex configuration data, due to the fact that the configuration data contain special characters, data loss occurs in the process of adopting command line parameter transmission, the configuration data is subjected to escape processing through an upstream data processing system, the special characters are converted and replaced, and the characters which cannot be lost in the scene are replaced, so that second data received at the downstream are data subjected to escape processing on the configuration data through an upstream data processing system through a receiving module 601, and therefore data loss cannot occur in the process of transmitting data in a command line mode, the technical problems of low program availability and high error rate are solved, the program availability is improved, and the service loss is reduced. Performing accurate application processing on a target application may be accomplished by the handling module 602.
According to an embodiment of the present disclosure, a handling module includes an inverse sense unit, an execution unit.
The reverse sense unit is used for performing reverse sense processing on the target array added with the preset identifier to obtain a reverse sense target array under the condition that the preset identifier is added to the target array, so as to perform application processing on the target application according to the reverse sense target array, wherein the target array added with the preset identifier comprises preset substitute characters; and
and the execution unit is used for executing application processing on the target application according to the target array which is not added with the preset identifier under the condition that the preset identifier is not added to the target array.
According to an embodiment of the present disclosure, the reverse meaning unit includes a third conversion subunit configured to traverse a plurality of characters in the target array to which the preset identifier is added, and convert the preset substitute character into a predetermined type of special character.
According to the embodiment of the disclosure, the plurality of arrays in the second data include parameter values under a plurality of preset parameters, and the plurality of preset parameters include an application identifier, a time window length, a keyword, and an alarm trigger threshold;
the treatment module includes:
the acquisition unit acquires operation and maintenance log data of the target application associated with the target application identifier, wherein the operation and maintenance log data comprises a plurality of target keywords;
the analysis unit is used for analyzing the operation and maintenance log data of the target application to obtain the number of the target keywords in the length of the target time window;
and the alarm unit sends an alarm to the target application under the condition that the number of the target keywords in the length of the target time window reaches a target alarm triggering threshold value according to the target array.
According to the embodiment of the present disclosure, any of the obtaining module 501, the escaping module 502, the transmitting module 503, the receiving module 601, and the disposing module 602 may be combined and implemented in one module, or any one of them may be split into multiple modules. Alternatively, at least part of the functionality of one or more of these modules may be combined with at least part of the functionality of the other modules and implemented in one module. According to an embodiment of the present disclosure, at least one of the obtaining module 501, the escaping module 502, the transmitting module 503, the receiving module 601, and the disposing module 602 may be implemented at least partially as a hardware circuit, such as a Field Programmable Gate Array (FPGA), a Programmable Logic Array (PLA), a system on a chip, a system on a substrate, a system on a package, an Application Specific Integrated Circuit (ASIC), or may be implemented by hardware or firmware in any other reasonable manner of integrating or packaging a circuit, or implemented by any one of three implementations of software, hardware, and firmware, or implemented by a suitable combination of any several of them. Alternatively, at least one of the obtaining module 501, the escaping module 502, the transmitting module 503, the receiving module 601, the handling module 602 may be at least partly implemented as a computer program module, which when executed may perform a corresponding function.
Fig. 7 schematically shows a block diagram of an electronic device adapted to implement a data transmission method according to an embodiment of the present disclosure.
As shown in fig. 7, an electronic device 700 according to an embodiment of the present disclosure includes a processor 701, which can perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM) 702 or a program loaded from a storage section 708 into a Random Access Memory (RAM) 703. The processor 701 may include, for example, a general purpose microprocessor (e.g., a CPU), an instruction set processor and/or associated chipset, and/or a special purpose microprocessor (e.g., an Application Specific Integrated Circuit (ASIC)), among others. The processor 701 may also include on-board memory for caching purposes. The processor 701 may comprise a single processing unit or a plurality of processing units for performing the different actions of the method flows according to embodiments of the present disclosure.
In the RAM 703, various programs and data necessary for the operation of the electronic apparatus 700 are stored. The processor 701, the ROM 702, and the RAM 703 are connected to each other by a bus 704. The processor 701 performs various operations of the method flows according to the embodiments of the present disclosure by executing programs in the ROM 702 and/or the RAM 703. It is noted that the programs may also be stored in one or more memories other than the ROM 702 and RAM 703. The processor 701 may also perform various operations of method flows according to embodiments of the present disclosure by executing programs stored in the one or more memories.
Electronic device 700 may also include input/output (I/O) interface 705, which input/output (I/O) interface 705 is also connected to bus 704, according to an embodiment of the present disclosure. The electronic device 700 may also include one or more of the following components connected to the I/O interface 705: an input portion 706 including a keyboard, a mouse, and the like; an output section 707 including a display such as a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and the like, and a speaker; a storage section 708 including a hard disk and the like; and a communication section 709 including a network interface card such as a LAN card, a modem, or the like. The communication section 709 performs communication processing via a network such as the internet. A drive 710 is also connected to the I/O interface 705 as needed. A removable medium 711 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is mounted on the drive 710 as necessary, so that a computer program read out therefrom is mounted into the storage section 708 as necessary.
The present disclosure also provides a computer-readable storage medium, which may be contained in the apparatus/device/system described in the above embodiments; or may exist alone without being assembled into the device/apparatus/system. The computer-readable storage medium carries one or more programs which, when executed, implement the method according to an embodiment of the disclosure.
According to embodiments of the present disclosure, the computer-readable storage medium may be a non-volatile computer-readable storage medium, which may include, for example but is not limited to: 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), 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 disclosure, 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. For example, according to embodiments of the present disclosure, a computer-readable storage medium may include the ROM 702 and/or the RAM 703 and/or one or more memories other than the ROM 702 and the RAM 703 described above.
Embodiments of the present disclosure also include a computer program product comprising a computer program containing program code for performing the method illustrated in the flow chart. When the computer program product runs in a computer system, the program code is used for causing the computer system to realize the data transmission method provided by the embodiment of the disclosure.
The computer program performs the above-described functions defined in the system/apparatus of the embodiments of the present disclosure when executed by the processor 701. The systems, apparatuses, modules, units, etc. described above may be implemented by computer program modules according to embodiments of the present disclosure.
In one embodiment, the computer program may be hosted on a tangible storage medium such as an optical storage device, a magnetic storage device, or the like. In another embodiment, the computer program may also be transmitted in the form of a signal on a network medium, distributed, downloaded and installed via the communication section 709, and/or installed from the removable medium 711. The computer program containing program code may be transmitted using any suitable network medium, including but not limited to: wireless, wired, etc., or any suitable combination of the foregoing.
In such an embodiment, the computer program can be downloaded and installed from a network through the communication section 709, and/or installed from the removable medium 711. The computer program, when executed by the processor 701, performs the above-described functions defined in the system of the embodiment of the present disclosure. The above described systems, devices, apparatuses, modules, units, etc. may be implemented by computer program modules according to embodiments of the present disclosure.
In accordance with embodiments of the present disclosure, program code for executing computer programs provided by embodiments of the present disclosure may be written in any combination of one or more programming languages, and in particular, these computer programs may be implemented using high level procedural and/or object oriented programming languages, and/or assembly/machine languages. The programming language includes, but is not limited to, programming languages such as Java, C + +, python, the "C" language, or the like. The program code may execute entirely on the user computing device, partly on the user device, partly on a remote computing device, or entirely on the remote computing device or server. In the case of a remote computing device, the remote computing device may be connected to the user computing device through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computing device (e.g., through the internet using an internet service provider).
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 disclosure. 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.
Those skilled in the art will appreciate that various combinations and/or combinations of features recited in the various embodiments and/or claims of the present disclosure can be made, even if such combinations or combinations are not expressly recited in the present disclosure. In particular, various combinations and/or combinations of the features recited in the various embodiments and/or claims of the present disclosure may be made without departing from the spirit or teaching of the present disclosure. All such combinations and/or associations are within the scope of the present disclosure.
The embodiments of the present disclosure have been described above. However, these examples are for illustrative purposes only and are not intended to limit the scope of the present disclosure. Although the embodiments are described separately above, this does not mean that the measures in the embodiments cannot be used advantageously in combination. The scope of the disclosure is defined by the appended claims and equivalents thereof. Various alternatives and modifications can be devised by those skilled in the art without departing from the scope of the present disclosure, and such alternatives and modifications are intended to be within the scope of the present disclosure.

Claims (14)

1. A method of data transmission, comprising:
acquiring first data to be processed, wherein the first data has a preset data format and comprises a plurality of arrays, and the arrays are used for representing processing rules respectively associated with different applications;
traversing a plurality of arrays in the first data, and performing escape processing on a first array containing special characters of a preset type to obtain second data, wherein the second data comprises the arrays obtained after the escape processing and the arrays which are not subjected to the escape processing;
and transmitting the second data to a target program in a command line mode so as to call the target program to execute application processing on a target application according to a target array in the second data.
2. The method of claim 1, wherein the performing escape processing on the first type array containing the predetermined type of special characters comprises:
traversing a plurality of characters in the first array, and converting the special characters of the preset type in the first array into preset substitute characters.
3. The method of claim 2, wherein the predetermined type of special characters comprises at least one of: space characters and apostrophe characters, wherein the converting the special characters of the predetermined type in the first array into preset substitute characters comprises:
converting the space characters in the first type array into first preset substitute characters;
converting the apostrophe characters in the first type of array into second preset substitute characters;
wherein the first preset substitute character and the second preset substitute character are different from other characters except the special character in the first data.
4. The method of claim 2, wherein said performing escape processing on the first type array containing the predetermined type of special characters further comprises:
and adding a preset identifier to the escaped first array.
5. The method of claim 1, wherein:
the predetermined data format is a JSON format.
6. An application processing method, comprising:
receiving second data transmitted in a command line mode, wherein the second data is data obtained by performing escape processing on first data, the first data and the second data adopt a preset data format, the first data and the second data comprise a plurality of arrays, and the arrays are used for representing processing rules respectively associated with different applications;
and executing application processing on the target application according to the target array in the second data.
7. The method of claim 6, wherein performing application processing on a target application according to a target array in the second data comprises:
under the condition that a preset identifier is added to the target array, performing reverse sense processing on the target array added with the preset identifier to obtain a reverse sense target array so as to perform application processing on a target application according to the reverse sense target array, wherein the preset identifier added target array comprises preset substitute characters; and
and under the condition that the target array is not added with the preset identifier, executing application processing on the target application according to the target array which is not added with the preset identifier.
8. The method of claim 7, wherein the obtaining the denoised target array after performing the denotation processing on the target array added with the preset identifier comprises:
traversing a plurality of characters in the target array added with the preset identifiers, and converting the preset substitute characters into special characters of a preset type.
9. The method of claim 6, wherein the first data and the second data are alarm configuration data, and a plurality of arrays in the second data comprise parameter values under a plurality of preset parameters, wherein the plurality of preset parameters comprise application identification, time window length, keywords, and alarm trigger threshold;
the executing the application processing on the target application according to the target array in the second data comprises:
acquiring operation and maintenance log data of the target application associated with a target application identifier, wherein the operation and maintenance log data comprises a plurality of target keywords;
analyzing the operation and maintenance log data of the target application to obtain the number of the target keywords in the target time window length;
and sending an alarm to the target application under the condition that the number of the target keywords in the length of the target time window reaches a target alarm triggering threshold value according to the target array.
10. A data transmission apparatus comprising:
the device comprises an acquisition module, a processing module and a processing module, wherein the acquisition module is used for acquiring first data to be processed, the first data has a preset data format, the first data comprises a plurality of arrays, and the arrays are used for representing processing rules respectively associated with different applications;
the escape module is used for traversing a plurality of arrays in the first data and performing escape processing on a first array containing special characters of a preset type to obtain second data, wherein the second data comprises the arrays obtained after the escape processing and the arrays which are not subjected to the escape processing;
and the transmission module is used for transmitting the second data to a target program in a command line mode so as to call the target program to execute application processing on a target application according to a target array in the second data.
11. An application processing apparatus comprising:
the device comprises a receiving module, a processing module and a processing module, wherein the receiving module is used for receiving second data transmitted in a command line mode, the second data is obtained by performing escape processing on first data, the first data and the second data adopt a preset data format, the first data and the second data comprise a plurality of arrays, and the arrays are used for representing processing rules respectively associated with different applications;
and the processing module is used for executing application processing on the target application according to the target array in the second data.
12. An electronic device, comprising:
one or more processors;
a storage device to store one or more programs,
wherein the one or more programs, when executed by the one or more processors, cause the one or more processors to perform the method of any of claims 1-5, or any of claims 6-9.
13. A computer readable storage medium having stored thereon executable instructions which, when executed by a processor, cause the processor to perform the method of any one of claims 1 to 5, or any one of claims 6 to 9.
14. A computer program product comprising a computer program which, when executed by a processor, implements the method of any one of claims 1 to 5, or any one of claims 6 to 9.
CN202211036694.5A 2022-08-26 2022-08-26 Data transmission method and device, application processing method and device, and electronic device Pending CN115344330A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211036694.5A CN115344330A (en) 2022-08-26 2022-08-26 Data transmission method and device, application processing method and device, and electronic device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211036694.5A CN115344330A (en) 2022-08-26 2022-08-26 Data transmission method and device, application processing method and device, and electronic device

Publications (1)

Publication Number Publication Date
CN115344330A true CN115344330A (en) 2022-11-15

Family

ID=83954851

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211036694.5A Pending CN115344330A (en) 2022-08-26 2022-08-26 Data transmission method and device, application processing method and device, and electronic device

Country Status (1)

Country Link
CN (1) CN115344330A (en)

Similar Documents

Publication Publication Date Title
US10725751B2 (en) Generating a predictive data structure
CN111198813A (en) Interface testing method and device
US20130067100A1 (en) Multi-desktop interaction using nested remote desktop sessions
CN111338623B (en) Method, device, medium and electronic equipment for developing user interface
CN109656799B (en) Test method and device
CN115357761A (en) Link tracking method and device, electronic equipment and storage medium
CN116561013B (en) Testing method and device based on target service framework, electronic equipment and medium
CN113191889A (en) Wind control configuration method, configuration system, electronic device and readable storage medium
JP6199844B2 (en) Suspicious part estimation device and suspected part estimation method
CN115374207A (en) Service processing method and device, electronic equipment and computer readable storage medium
CN111338928A (en) Chrome-based browser testing method and device
CN113132400B (en) Business processing method, device, computer system and storage medium
CN115344330A (en) Data transmission method and device, application processing method and device, and electronic device
CN112783903B (en) Method and device for generating update log
CN113419740A (en) Program data stream analysis method and device, electronic device and readable storage medium
CN112084114A (en) Method and apparatus for testing an interface
CN108288135B (en) System compatibility method and device, computer readable storage medium and electronic equipment
CN115525362B (en) Parameter changing method and device based on kernel parameter adjusting platform of operating system
CN114491356B (en) Data acquisition method and device, computer storage medium and electronic equipment
CN112948269B (en) Information processing method, information processing apparatus, electronic device, and readable storage medium
CN113328885B (en) Network health degree evaluation method, device, electronic equipment, medium and program product
CN117152861A (en) Automatic inspection method, device, electronic equipment and computer readable medium
CN115190008A (en) Fault processing method, fault processing device, electronic device and storage medium
CN114266547A (en) Method, device, equipment, medium and program product for identifying business processing strategy
CN117749780A (en) Service data reporting method and related equipment

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