Data processing method and device, electronic equipment and storage medium

During the testing process of software applications, the variable parts in the log record and the constant parts in the configuration template are obtained and spliced ​​to generate target log data, which solves the performance consumption and code logic leakage risks caused by log printing, and improves information security.

CN119645820APending Publication Date: 2025-03-18BEIJING WODONG TIANJUN INFORMATION TECH CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311188098.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-09-14
Publication Date
2025-03-18

AI Technical Summary

Technical Problem

During the testing of software applications, when debugging code or locating problems through logs, more log printing will cause performance consumption and logs are readable, increasing the risk of code logic leakage after decompilation.

Method used

By responding to the business test request, the log records related to the business application to be tested are obtained, and when the log type is the first log type, the configuration template is determined from the locally stored business interface data template based on the matching identifier, and the initial log data and the data of the configuration template are spliced ​​to obtain the target log data.

Benefits of technology

It reduces the risk of reading core code logic through logs after the business application to be tested is decompiled, improves information security during the application process, and reduces performance consumption.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119645820A_ABST
    Figure CN119645820A_ABST
Patent Text Reader

Abstract

The invention provides a data processing method and device, electronic equipment and a storage medium, and can be applied to the technical field of computers. The method comprises the following steps: in response to a service test request, obtaining a log record related to a to-be-tested service application; under the condition that the log type of the log record is a first log type, determining a configuration template related to the log record from a plurality of service interface data templates stored in a local storage unit based on a matching identifier included in the log record; and performing data splicing based on the initial log data included in the log record and the configuration template to obtain target log data.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of computer technology, and more specifically, to a data processing method, device, electronic device and storage medium. Background Art

[0002] In the process of software application development, debugging code or locating problems through logs is a common testing method.

[0003] In the related art, completing the testing of software applications through logs generally requires printing more logs. On the one hand, printing more logs will bring certain performance consumption. On the other hand, because logs are easier to read, when the software application is decompiled, the core code logic of the software application may be read due to log leakage. Summary of the invention

[0004] In view of this, the present disclosure provides a data processing method, apparatus, electronic device, readable storage medium, and computer program product.

[0005] One aspect of the present disclosure provides a data processing method, including: in response to a business test request, obtaining log records related to a business application to be tested; when the log type of the log record is a first log type, based on a matching identifier included in the log record, determining a configuration template related to the log record from a plurality of business interface data templates stored in a local storage unit; and performing data splicing based on the initial log data included in the log record and the configuration template to obtain target log data.

[0006] According to an embodiment of the present disclosure, the above-mentioned initial log data includes multiple variable fields, and the above-mentioned configuration template includes multiple constant fields; the above-mentioned initial log data and the above-mentioned configuration template included in the above-mentioned log record are spliced ​​to obtain target log data, including: for the above-mentioned variable fields, based on the order of the above-mentioned variable fields in the above-mentioned initial log data, the target constant field is determined from the above-mentioned multiple constant fields; the above-mentioned variable field is combined with the above-mentioned target constant field to obtain the log field related to the above-mentioned variable field; and the log fields related to each of the above-mentioned multiple variable fields are spliced ​​to obtain the above-mentioned target log data.

[0007] According to an embodiment of the present disclosure, the above-mentioned matching identifier includes a business matching identifier and a log matching identifier; wherein, based on the matching identifier included in the above-mentioned log record, the configuration template related to the above-mentioned log record is determined from multiple business interface data templates stored in the local storage unit, including: based on the above-mentioned business matching identifier, determining the target business interface data template related to the above-mentioned log record from the above-mentioned multiple business interface data templates; and based on the above-mentioned log matching identifier, determining the above-mentioned configuration template related to the above-mentioned log record from multiple groups of key-value pair configuration templates included in the above-mentioned target business interface data template.

[0008] According to an embodiment of the present disclosure, the method further includes: in response to the business application to be tested being started, using a preset interface to read the business interface data template related to the business application to be tested from the configuration platform; and writing the business interface data template into the local storage unit.

[0009] According to an embodiment of the present disclosure, the above-mentioned use of a preset interface to read the above-mentioned business interface data template related to the above-mentioned business application to be tested from a configuration platform includes: calling the above-mentioned preset interface of the first server, wherein the above-mentioned first server is configured to respond to the above-mentioned preset interface being called, read the above-mentioned business interface data template from the above-mentioned configuration platform, and return the above-mentioned business interface data template.

[0010] According to an embodiment of the present disclosure, the method further includes: in response to the value of the test switch field indicating that the test is turned on, generating the service test request.

[0011] According to an embodiment of the present disclosure, the method further includes: in response to a scanning instruction, parsing the captured feature image to establish a long connection with the console, wherein the feature image includes a target pattern captured on the display interface of the console using an image acquisition unit; and updating the value of the test switch field to a value indicating that the test is turned on.

[0012] According to an embodiment of the present disclosure, the above-mentioned parsing of the collected characteristic image to establish a long connection with the console includes: based on the above-mentioned characteristic image, obtaining link information related to the above-mentioned characteristic image; parsing the above-mentioned link information to obtain task identification information, wherein the above-mentioned console is configured to establish a first sub-connection with the second server when it is in a running state, and generate the above-mentioned link information based on the above-mentioned task identification information returned by the above-mentioned second server through the above-mentioned first sub-connection, generate the above-mentioned target pattern based on the above-mentioned link information, and display the above-mentioned target pattern on the display interface of the above-mentioned console; establish a second sub-connection with the second server, and send the above-mentioned task identification information to the second server through the above-mentioned second sub-connection, wherein the above-mentioned second server is configured to determine the first sub-connection related to the above-mentioned second sub-connection based on the above-mentioned task identification information; and obtain a long connection with the console based on the first sub-connection related to the above-mentioned second sub-connection and the above-mentioned second sub-connection.

[0013] According to an embodiment of the present disclosure, the method further includes: sending the target log data to the console via a long connection with the console, wherein the console is configured to display the target log data on a display interface of the console.

[0014] According to an embodiment of the present disclosure, the method further includes: when the log type of the log record is the second log type, determining that the target log data is the initial log data included in the log record.

[0015] Another aspect of the present disclosure provides a data processing device, including: an acquisition module, used to obtain log records related to a business application to be tested in response to a business test request; a first determination module, used to determine a configuration template related to the log record from multiple business interface data templates stored in a local storage unit based on a matching identifier included in the log record when the log type of the log record is a first log type; and a splicing module, used to perform data splicing based on the initial log data included in the log record and the configuration template to obtain target log data.

[0016] Another aspect of the present disclosure provides an electronic device, comprising: one or more processors; and a memory for storing one or more instructions, wherein when the one or more instructions are executed by the one or more processors, the one or more processors implement the method described above.

[0017] Another aspect of the present disclosure provides a computer-readable storage medium storing computer-executable instructions, which are used to implement the above method when executed.

[0018] Another aspect of the present disclosure provides a computer program product, the computer program product comprising computer executable instructions, and the instructions are used to implement the above method when executed.

[0019] According to an embodiment of the present disclosure, when testing a business application to be tested, the log records generated by the business application to be tested during operation and the configuration template corresponding to the log records can be spliced ​​to obtain the target log data actually output. The log records generated by the business application to be tested during operation can only record the data of the variable part of the log data, and the configuration template can record the data of the constant part of the log data. By separating the constant part data and the variable part data of the log data and splicing them during testing, the risk of reading the core code logic through specific logs after the business application to be tested is decompiled can be effectively reduced, and the information security of the business application to be tested during the application process can be improved. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] The above and other objects, features and advantages of the present disclosure will become more apparent through the following description of the embodiments of the present disclosure with reference to the accompanying drawings, in which:

[0021] Figure 1 An exemplary system architecture to which the data processing method and apparatus according to an embodiment of the present disclosure can be applied is schematically shown.

[0022] Figure 2 The flowchart of the data processing method according to the embodiment of the present disclosure is schematically shown.

[0023] Figure 3 The flowchart of the client reading the service interface data template according to the embodiment of the present disclosure is schematically shown.

[0024] Figure 4 A schematic diagram schematically shows a display interface of a console before starting a test according to an embodiment of the present disclosure.

[0025] Figure 5 The following is a schematic diagram schematically showing a process of establishing a long connection between a client and a console according to an embodiment of the present disclosure.

[0026] Figure 6 The following is a schematic diagram schematically showing a log data processing flow according to an embodiment of the present disclosure.

[0027] Figure 7 A schematic diagram schematically shows a display interface of a console after a test is started according to an embodiment of the present disclosure.

[0028] Figure 8 The block diagram schematically shows a data processing device according to an embodiment of the present disclosure.

[0029] Fig. 9 A block diagram of an electronic device suitable for implementing a data processing method according to an embodiment of the present disclosure is schematically shown. DETAILED DESCRIPTION

[0030] Hereinafter, embodiments of the present disclosure will be described with reference to the accompanying drawings. However, it should be understood that these descriptions are exemplary only and are not intended to limit the scope of the present disclosure. In the following detailed description, for ease of explanation, many specific details are set forth to provide a comprehensive understanding of the embodiments of the present disclosure. However, it is apparent that one or more embodiments may also be implemented without these specific details. In addition, in the following description, descriptions of known structures and technologies are omitted to avoid unnecessary confusion of the concepts of the present disclosure.

[0031] The terms used herein are only for describing specific embodiments and are not intended to limit the present disclosure. The terms "comprise", "include", etc. used herein indicate the existence of the features, steps, operations and / or components, but do not exclude the existence or addition of one or more other features, steps, operations or components.

[0032] All terms (including technical and scientific terms) used herein have the meanings commonly understood by those skilled in the art, unless otherwise defined. It should be noted that the terms used herein should be interpreted as having a meaning consistent with the context of this specification, and should not be interpreted in an idealized or overly rigid manner.

[0033] When using expressions such as "at least one of A, B, and C, etc.", they should generally be interpreted according to the meaning of the expression commonly understood by those skilled in the art (for example, "a system having at least one of A, B, and C" should include but is not limited to a system having A alone, B alone, C alone, A and B, A and C, B and C, and / or A, B, C, etc.).

[0034] In the process of software application development, debugging code or locating problems through logs is a common testing method. The testing and debugging process of software applications usually requires the joint efforts of R&D personnel and testers. R&D personnel usually debug code through logs on IDE (Integrated Development Environment), while for testers, viewing logs through IDE requires a high learning cost. Therefore, debugging tools such as vConsole are often used in related technologies to achieve collaborative testing and debugging between R&D personnel and testers.

[0035] In the development scenarios of mobile applications, most scenarios involve Native development and H5 (HyperTextMarkup Language 5) development. Especially when the H5 page needs to be embedded in the Native page, the interaction between Native and JS (JavaScript) is essential. Although related debugging tools such as vConsole are widely used and have relatively complete functions, the tool can only be used for the web side and cannot interact with Native. Therefore, it cannot be used in scenarios where Native and JS need to interact.

[0036] In addition, when testing and debugging software applications, each key process in the software application code needs to output logs, and the output of more logs will affect the performance of the software application. On the other hand, even if the Android code can be configured for code obfuscation, the string cannot be obfuscated. Therefore, when the software application is decompiled, the string such as log is very easy to be read, resulting in an increased risk of the core code logic of the software application being read.

[0037] In view of this, the embodiments of the present disclosure provide a data processing method, device, electronic device and storage medium, which can achieve the purpose of obfuscation by splitting logs, so as to reduce the risk of code leakage by increasing the readability of the code through log content after the software application is decompiled.

[0038] Specifically, the data processing method includes: in response to a business test request, obtaining log records related to the business application to be tested; when the log type of the log record is the first log type, based on the matching identifier included in the log record, determining the configuration template related to the log record from multiple business interface data templates stored in a local storage unit; and performing data splicing based on the initial log data and the configuration template included in the log record to obtain target log data.

[0039] In the embodiments of the present disclosure, the collection, updating, analysis, processing, use, transmission, provision, disclosure, storage, etc. of the data involved (for example, including but not limited to user personal information) are in compliance with the provisions of relevant laws and regulations, are used for legitimate purposes, and do not violate public order and good morals. In particular, necessary measures are taken for user personal information to prevent illegal access to user personal information data and maintain the security of user personal information, network security, and national security.

[0040] In the embodiments of the present disclosure, the user's authorization or consent is obtained before obtaining or collecting the user's personal information.

[0041] Figure 1The exemplary system architecture to which the data processing method and apparatus according to the embodiments of the present disclosure can be applied is schematically shown. It should be noted that: Figure 1 What is shown is merely an example of a system architecture to which the embodiments of the present disclosure can be applied, in order to help those skilled in the art understand the technical content of the present disclosure, but it does not mean that the embodiments of the present disclosure cannot be used in other devices, systems, environments or scenarios.

[0042] like Figure 1 As shown, the system architecture 100 according to this embodiment may include terminal devices 101, 102, 103, a network 104 and a server 105. The network 104 is used to provide a medium for communication links between the terminal devices 101, 102, 103 and the server 105. The network 104 may include various connection types, such as wired and / or wireless communication links, etc.

[0043] Users can use terminal devices 101, 102, 103 to interact with server 105 through network 104 to receive or send messages, etc. Various communication client applications can be installed on terminal devices 101, 102, 103, such as shopping applications, web browser applications, search applications, instant messaging tools, email clients and / or social platform software, etc. (only as examples).

[0044] The terminal devices 101 , 102 , and 103 may be various electronic devices having a display screen and supporting web browsing, including but not limited to smart phones, tablet computers, laptop computers, and desktop computers.

[0045] The server 105 may be a server that provides various services. For example, the server 105 may be equipped with a configuration platform, and a user may configure a business interface data template of a business on the configuration platform.

[0046] It should be noted that the data processing method provided in the embodiment of the present disclosure can generally be executed by the terminal devices 101, 102, and 103. Accordingly, the data processing apparatus provided in the embodiment of the present disclosure can generally be set in the terminal devices 101, 102, and 103.

[0047] For example, when testing an application in terminal device 101, terminal device 101 can obtain the log records generated by the application during operation, and obtain the corresponding business interface data template from server 105 through network 104. Terminal device 101 can process the log records based on the business interface data template, obtain target log data, and display the target log data on terminal device 101.

[0048] It should be understood that Figure 1The number of terminal devices, networks and servers in the embodiment is only for illustration. Any number of terminal devices, networks and servers may be provided according to implementation requirements.

[0049] Figure 2 The flowchart of the data processing method according to the embodiment of the present disclosure is schematically shown.

[0050] like Figure 2 As shown, the method includes operations S201 to S203.

[0051] In operation S201 , in response to a service test request, log records related to a service application to be tested are obtained.

[0052] In operation S202, when the log type of the log record is the first log type, based on a matching identifier included in the log record, a configuration template related to the log record is determined from a plurality of service interface data templates stored in a local storage unit.

[0053] In operation S203, data splicing is performed based on the initial log data and the configuration template included in the log record to obtain target log data.

[0054] According to an embodiment of the present disclosure, the service test request may be a request generated by a client for starting to test the service application to be tested. The service test request may include identification information related to the service application to be tested.

[0055] According to the embodiments of the present disclosure, the service application to be tested may be an application based on various mobile operating systems, such as an Android application, an IOS application, etc., which is not limited herein.

[0056] According to an embodiment of the present disclosure, the log record related to the business application to be tested may include log data generated during the operation of the business application to be tested. Specifically, the business application to be tested may include multiple log collection points, and for each log collection point, each log collection point can output log data at a regular time. During the operation of the business application to be tested, the multiple log data output by each of the multiple log collection points can constitute the log record related to the business application to be tested.

[0057] According to an embodiment of the present disclosure, the log type of the log record may be related to the development environment of the business application to be tested. For example, if the development environment of the business application to be tested is Native, the log type of the log record generated by the business application to be tested is Native.

[0058] According to an embodiment of the present disclosure, the first log type may be, for example, a Native type, or may be other log types that are incompatible with a test tool in the related art.

[0059] According to an embodiment of the present disclosure, the local storage unit may be, for example, a cache or a hard disk of a client, which is not limited herein.

[0060] According to an embodiment of the present disclosure, a business interface data template can be pre-configured by business personnel on a configuration platform. A business interface data template can be configured for each business. Specifically, business personnel can configure a space for each business on the configuration platform and add access rights and related read and write permissions to the space for team members. Within the space, the business interface data template can be configured in JSON format according to the key-value format according to the needs of the specific business.

[0061] According to an embodiment of the present disclosure, when testing a business application to be tested, the log records generated by the business application to be tested during operation and the configuration template corresponding to the log records can be spliced ​​to obtain the target log data actually output. The log records generated by the business application to be tested during operation can only record the data of the variable part of the log data, and the configuration template can record the data of the constant part of the log data. By separating the constant part data and the variable part data of the log data and splicing them during testing, the risk of reading the core code logic through specific logs after the business application to be tested is decompiled can be effectively reduced, and the information security of the business application to be tested during the application process can be improved.

[0062] Reference below Figure 3 to Figure 7 , combined with specific embodiments Figure 2 The method shown is further explained.

[0063] According to an embodiment of the present disclosure, the service interface data template may be pre-stored in the configuration platform, and the service interface data template in the configuration platform may be configured by the service personnel themselves, which is not limited here.

[0064] According to an embodiment of the present disclosure, after the business application to be tested is started, the client can actively pull the business interface data template related to the business application to be tested from the configuration platform. Specifically, in response to the business application to be tested being started, the business interface data template related to the business application to be tested can be read from the configuration platform using a preset interface; and the business interface data template can be written into a local storage unit.

[0065] According to an embodiment of the present disclosure, the configuration platform may directly provide a data interface to the outside, and the client may read the business interface data template through the data interface.

[0066] According to an embodiment of the present disclosure, before reading the business interface data template, the configuration platform can also authenticate the client. Specifically, the configuration platform can be configured with an access control list (Access Control Lists, ACL), through which the configuration platform can determine whether the client has the read permission for the business interface data template, and allow the client to read the business interface data template if it is determined that the client has the read permission for the business interface data template. Alternatively, the configuration platform can be configured with an access control system, such as an RBAC (Role-Based Access Control) system, etc. The configuration platform can use the access control system to determine whether the role to which the client belongs has the read permission for the business interface data template, and allow the client to read the business interface data template if it is determined that the role to which the client belongs has the read permission for the business interface data template.

[0067] According to an embodiment of the present disclosure, as an optional implementation, the configuration platform may disclose the data interface to the first server. In this case, the preset interface may be the data interface of the first server, and the client may read the business interface data template through the first server.

[0068] Figure 3 The flowchart of the client reading the service interface data template according to the embodiment of the present disclosure is schematically shown.

[0069] like Figure 3 As shown, the client can call the preset interface of the first server. A websocket long connection can be established between the first server and the configuration platform. The first server can read the business interface data template from the configuration platform in response to the preset interface being called. After completing the reading of the business interface data template, the first server can return the business interface data template to the client through the preset interface.

[0070] According to an embodiment of the present disclosure, the first server can be configured with an access control list, an access control system, etc., for authenticating the client, and after determining that the client has passed the authentication, read the business interface data template from the configuration platform and return the business interface data template to the client.

[0071] According to an embodiment of the present disclosure, by using the first server as an intermediate device to complete the reading of business interface data, the authority management system can be separated from the business system in the configuration platform to isolate data risks that may arise during identity authentication and improve system security.

[0072] According to an embodiment of the present disclosure, a test switch may be configured in the business application to be tested, and the test switch may be represented by a test switch field. When the test switch is in the closed state, that is, the value of the test switch field represents stop test, such as false, the business application to be tested may be controlled not to output task logs during operation. Accordingly, when the test switch is turned on, that is, the value of the test switch field represents turn on test, such as true, the business application to be tested may be controlled to output task logs during operation. The test switch configured in the business application to be tested may be in the closed state by default.

[0073] According to an embodiment of the present disclosure, when starting a test task, the tester can open the console, and the console can display the target pattern on its display interface. The tester can use the image acquisition unit or other image acquisition device of the client to capture the target pattern on the display interface of the console to obtain a feature image. After receiving the feature image, the client can respond to the scanning instruction to parse the captured feature image to establish a long connection with the console; and update the value of the test switch field to a value indicating that the test is turned on.

[0074] According to an embodiment of the present disclosure, the feature image may be an image containing the target pattern.

[0075] Figure 4 A schematic diagram schematically shows a display interface of a console before starting a test according to an embodiment of the present disclosure.

[0076] like Figure 4 As shown, the display interface of the console may only include the target pattern and a brief description of the target pattern. The target pattern may be a QR code pattern, and accordingly, the brief description of the target pattern may be "Scan the target pattern to start the test". By scanning the feature image, the QR code pattern included in the feature image may be identified and processed to establish a long connection with the console.

[0077] Figure 5 The following is a schematic diagram schematically showing a process of establishing a long connection between a client and a console according to an embodiment of the present disclosure.

[0078] like Figure 5As shown, after the tester opens the debugging page, that is, when the console is in operation, a websocket connection can be established with the second server, that is, a first sub-connection with the second server is established. After the connection is successful, the second server can return the task identification information sessionId to the console. The console can generate a target pattern based on the task identification information returned by the second server through the first sub-connection. Specifically, the console can splice the task identification information sessionId to the query parameter of the opening page H5 connection provided by the client's log processing toolkit to generate link information, and can generate a target pattern based on the link information. The console can display the target pattern on the display interface of the console.

[0079] According to the embodiment of the present disclosure, after acquiring the feature image, the client can parse the feature image to obtain link information related to the feature image. Specifically, the target pattern can be determined from the feature image and the target pattern can be parsed to obtain the link information.

[0080] According to an embodiment of the present disclosure, the client may parse the link information to obtain the task identification information.

[0081] According to an embodiment of the present disclosure, the client connects a websocket connection with the second server, that is, establishes a second sub-connection with the second server, and through the second sub-connection, the client can send task identification information to the second server. Multiple first sub-connections can be configured between the console and the second server, and each first sub-connection can have unique task identification information. Therefore, after receiving the task identification information provided by the client, the second server can determine the first sub-connection related to the second sub-connection based on the task identification information.

[0082] According to an embodiment of the present disclosure, when it is determined that the second sub-connection and the first sub-connection related to the second sub-connection are established, a long connection with the console can be obtained based on the first sub-connection and the second sub-connection related to the second sub-connection.

[0083] According to an embodiment of the present disclosure, while establishing a long connection with the console, the log processing toolkit in the client can call the data interface to update the value of the test switch field to a value indicating that the test is turned on, that is, to update the value of the test switch field from false to true.

[0084] According to an embodiment of the present disclosure, the client may generate a service test request in response to the value of the test switch field indicating that the test is turned on.

[0085] According to an embodiment of the present disclosure, the business application to be tested can be run locally on the client. After receiving a business test request, the log processing toolkit configured in the client can obtain the log record of the business application to be tested, or, in response to the business test request, control the log processing toolkit to obtain the log record from the log of the business application to be tested by calling instructions.

[0086] According to an embodiment of the present disclosure, a configuration template can be obtained by matching from multiple business interface data templates using a matching representation. Specifically, the matching identifier may include a business matching identifier and a log matching identifier. Based on the matching identifier included in the log record, determining a configuration template related to the log record from multiple business interface data templates stored in a local storage unit may include the following operations:

[0087] Based on the business matching identifier, determine the target business interface data template related to log records from multiple business interface data templates; and based on the log matching identifier, determine the configuration template related to log records from multiple groups of key-value pair configuration templates included in the target business interface data template.

[0088] According to an embodiment of the present disclosure, each configured business interface data template may have a unique spatial name, that is, the spatial names of the business interface data templates of different businesses may be different, and the spatial name may be represented as a spatial identification identifier. Through the spatial identification identifier, a unique business interface data template may be determined. In the business interface data template, the spatial identification identifier of the template may be represented, for example, as "moudleName": "name1", indicating that the spatial identification identifier of the template is name1.

[0089] According to an embodiment of the present disclosure, the space of the business may include multiple groups of interface data configured in a key-value format. Accordingly, the configuration information "infos" part of the business interface data template may include multiple groups of key-value pair configuration templates. In each group of key-value pair configuration templates, the key can be used as a log matching identifier, and the value can be represented as a constant field. Through the log matching identifier, a unique key-value pair configuration template can be determined from the business interface data template. The multiple groups of key-value pair configuration templates included in the business interface data template can be represented as "infos": [{"key1": ["aa", "bb", "cc"]}, {key2": ["aaa", "bbb", "ccc"]}], which means that the business interface data template may include two groups of key-value pair configuration templates with log matching identifiers key1 and key2, respectively, and the constant fields included in the key-value pair configuration template key1 are aa, bb and cc, respectively, and the constant fields included in the key-value pair configuration template key2 are aaa, bbb and ccc, respectively.

[0090] According to an embodiment of the present disclosure, based on the above example, for example, the space identification identifier included in the log record may be name1, and the log matching identifier may be key1, then the configuration template related to the log record may be determined to be represented as "key1": ["aa", "bb", "cc"]. Accordingly, the configuration template includes multiple constant fields, namely aa, bb and cc.

[0091] According to an embodiment of the present disclosure, the initial log data may include multiple variable fields. Data splicing based on the initial log data and the configuration template may be to combine and splice multiple variable fields and multiple constant fields according to a certain rule. For example, multiple variable fields may correspond to multiple constant fields in an arrangement order, and then data splicing based on the initial log data and the configuration template included in the log record to obtain the target log data may include the following operations:

[0092] For variable fields, based on the order of the variable fields in the initial log data, a target constant field is determined from multiple constant fields; the variable field is combined with the target constant field to obtain a log field related to the variable field; and the log fields related to each of the multiple variable fields are concatenated to obtain target log data.

[0093] According to an embodiment of the present disclosure, the order of the variable fields in the initial log data may be the arrangement order of the variable fields in the multiple variable fields included in the initial log data. Using the order of the variable fields, a target constant field with the same order may be determined from multiple constant fields.

[0094] According to an embodiment of the present disclosure, the variable field and the target constant field are combined, for example, the target constant field is in front and the variable field is in the back. In the embodiment of the present disclosure, other splicing methods can also be configured, for example, the variable field is in front and the target constant field is in the back, which is not limited here.

[0095] According to the embodiments of the present disclosure, the splicing order used when splicing multiple log fields is not limited here. For example, the splicing can be completed based on the order of the variable fields or constant fields that constitute the log field in the original data, or the splicing can be performed based on a random order, which is not limited here.

[0096] According to an embodiment of the present disclosure, for example, the business matching identifier of the business interface data template corresponding to the log record may be name1, the log matching identifier of a certain log configured in the business interface data template may be key1, and the configuration content may be ["Start loading url=", "The current time is"]. The log record called by the client may be represented as XLog("name1", "key1", ["xxx: / / abc.com", "9:30"]). The constant fields included in the configuration template may be "Start loading url=" and "The current time is", and the variable fields included in the initial log data of the log record may be "xxx: / / abc.com" and "9:30", respectively. After data splicing, the resulting log may be "Start loading url=xxx: / / abc.com, The current time is 9:30".

[0097] According to an embodiment of the present disclosure, when the log type of the log record is the second log type, it can be determined that the target log data is the initial log data included in the log record.

[0098] According to an embodiment of the present disclosure, the second log type may be, for example, a Hook JS type, or other log types compatible with test tools in related technologies. When the log type of the log record is the second log type, the initial log data of the log record may be readable, so the initial log data of the log record may be directly displayed to the tester.

[0099] Figure 6 The following is a schematic diagram of a log data processing flow according to an embodiment of the present disclosure.

[0100] like Figure 6 As shown, before the test begins, business personnel can complete the configuration of the business interface data template by creating a business space, configuring constant data, and other operations on the configuration platform.

[0101] After the service application to be tested is started, the client can read the service interface data template from the configuration platform through a preset interface, and store the service interface data template in a local storage unit.

[0102] After the console is turned on, the target pattern can be displayed on the display interface. Testers can use the client to collect and parse the target pattern to establish a long connection between the client and the console, and update the value of the test switch field to true to generate a business test request and start processing log data.

[0103] The client can call the log processing toolkit to determine the log type of the log record. When it is determined that the log type of the log record is the first log type, the corresponding configuration template can be determined from the local storage unit by matching the identifier, and the log data can be spliced ​​based on the configuration template to obtain the target log data. When it is determined that the log type of the log record is the second log type, the initial log data included in the log record can be directly used as the target log data.

[0104] The client can send target log data to the console through a long connection with the console, and after receiving the target log data, the console can display the target log data on the display interface of the console. The display method can be, for example, scrolling display, which is not limited here.

[0105] Figure 7 A schematic diagram schematically shows a display interface of a console after a test is started according to an embodiment of the present disclosure.

[0106] like Figure 7 As shown, after the test is started, the console can display the received target log data in its log area one by one.

[0107] According to an embodiment of the present disclosure, the console may also be equipped with a plurality of controls on its display interface, such as a filter box control, a search box control, a clear control, etc. Using the filter box control, the tester may enter a keyword in the filter box to search for log data based on the keyword. Using the search box control, the tester may enter a keyword in the search box to filter and highlight the associated words in the log data. Using the clear control, the tester may click the request control to clear the log data of the previous page to avoid too much data affecting the visual effect.

[0108] Figure 8 The block diagram schematically shows a data processing device according to an embodiment of the present disclosure.

[0109] like Figure 8 As shown, the data processing device 800 includes an acquisition module 810 , a first determination module 820 and a splicing module 830 .

[0110] The acquisition module 810 is used to obtain log records related to the business application to be tested in response to the business test request;

[0111] a first determining module 820, configured to determine, when the log type of the log record is a first log type, a configuration template related to the log record from a plurality of business interface data templates stored in a local storage unit based on a matching identifier included in the log record; and

[0112] The splicing module 830 is used to perform data splicing based on the initial log data and the configuration template included in the log record to obtain target log data.

[0113] According to an embodiment of the present disclosure, the initial log data includes a plurality of variable fields, and the configuration template includes a plurality of constant fields;

[0114] According to an embodiment of the present disclosure, the splicing module 830 includes a first splicing unit, a second splicing unit and a third splicing unit.

[0115] A first splicing unit is used to determine a target constant field from a plurality of constant fields based on an order of the variable field in the initial log data for the variable field;

[0116] a second splicing unit, used to combine the variable field with the target constant field to obtain a log field related to the variable field; and

[0117] The third splicing unit is used to splice the log fields related to the multiple variable fields to obtain target log data.

[0118] According to an embodiment of the present disclosure, the matching identifier includes a business matching identifier and a log matching identifier;

[0119] According to an embodiment of the present disclosure, the first determining module 820 includes a first determining unit and a second determining unit.

[0120] A first determining unit, configured to determine a target service interface data template related to the log record from a plurality of service interface data templates based on the service matching identifier; and

[0121] The second determining unit is used to determine a configuration template related to the log record from a plurality of groups of key-value pair configuration templates included in the target business interface data template based on the log matching identifier.

[0122] According to an embodiment of the present disclosure, the data processing device 800 further includes a reading module and a writing module.

[0123] a reading module, configured to read a business interface data template related to the business application to be tested from the configuration platform using a preset interface in response to the business application to be tested being started; and

[0124] The writing module is used to write the business interface data template into the local storage unit.

[0125] According to an embodiment of the present disclosure, the reading module includes a reading unit.

[0126] The reading unit is used to call the preset interface of the first server, wherein the first server is configured to read the business interface data template from the configuration platform in response to the preset interface being called, and return the business interface data template.

[0127] According to an embodiment of the present disclosure, the data processing device 800 further includes a generating module.

[0128] The generating module is used for generating a service test request in response to the value of the test switch field indicating that the test is turned on.

[0129] According to an embodiment of the present disclosure, the data processing device 800 further includes a parsing module and an updating module.

[0130] a parsing module, configured to parse the acquired characteristic image in response to the scanning instruction to establish a long connection with the console, wherein the characteristic image includes a target pattern acquired by using an image acquisition unit to acquire the target pattern on the display interface of the console; and

[0131] The update module is used to update the value of the test switch field to a value indicating turning on the test.

[0132] According to an embodiment of the present disclosure, the parsing module includes a first parsing unit, a second parsing unit, a third parsing unit, and a fourth parsing unit.

[0133] A first parsing unit, configured to obtain link information related to the feature image based on the feature image;

[0134] a second parsing unit, configured to parse the link information to obtain task identification information, wherein the console is configured to establish a first sub-connection with the second server when in operation, and generate link information based on the task identification information returned by the second server through the first sub-connection, generate a target pattern based on the link information, and display the target pattern on a display interface of the console;

[0135] a third parsing unit, configured to establish a second sub-connection with the second server, and send task identification information to the second server through the second sub-connection, wherein the second server is configured to determine a first sub-connection related to the second sub-connection based on the task identification information; and

[0136] The fourth parsing unit is used to obtain a long connection with the console based on the first sub-connection and the second sub-connection related to the second sub-connection.

[0137] According to an embodiment of the present disclosure, the data processing device 800 further includes a sending module.

[0138] The sending module is used to send target log data to the console through a long connection with the console, wherein the console is configured to display the target log data on a display interface of the console.

[0139] According to an embodiment of the present disclosure, the data processing device 800 further includes a second determining module.

[0140] The second determination module is used to determine that the target log data is the initial log data included in the log record when the log type of the log record is the second log type.

[0141] According to the embodiments of the present invention, any one or more of the modules, submodules, units, and subunits, or at least part of the functions of any one of them can be implemented in one module. According to the embodiments of the present invention, any one or more of the modules, submodules, units, and subunits can be split into multiple modules for implementation. According to the embodiments of the present invention, any one or more of the modules, submodules, units, and subunits can be at least partially implemented as hardware circuits, such as field programmable gate arrays (FPGAs), programmable logic arrays (PLAs), systems on chips, systems on substrates, systems on packages, application specific integrated circuits (ASICs), or can be implemented by hardware or firmware in any other reasonable way of integrating or packaging the circuit, or implemented in any one of the three implementation methods of software, hardware, and firmware, or in any appropriate combination of any of them. Alternatively, according to the embodiments of the present invention, one or more of the modules, submodules, units, and subunits can be at least partially implemented as computer program modules, and when the computer program modules are run, the corresponding functions can be performed.

[0142] For example, any multiple of the acquisition module 810, the first determination module 820, and the splicing module 830 can be combined in one module / unit / subunit for implementation, or any one of the modules / units / subunits can be split into multiple modules / units / subunits. Alternatively, at least part of the functions of one or more of these modules / units / subunits can be combined with at least part of the functions of other modules / units / subunits and implemented in one module / unit / subunit. According to an embodiment of the present disclosure, at least one of the acquisition module 810, the first determination module 820, and the splicing module 830 can be at least partially implemented 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 can be implemented by hardware or firmware such as any other reasonable way of integrating or packaging the circuit, or by any one of the three implementation methods of software, hardware, and firmware, or by a suitable combination of any of them. Alternatively, at least one of the acquisition module 810, the first determination module 820 and the splicing module 830 may be at least partially implemented as a computer program module, and when the computer program module is executed, the corresponding function may be executed.

[0143] It should be noted that the data processing device part in the embodiments of the present disclosure corresponds to the data processing method part in the embodiments of the present disclosure. The description of the data processing device part specifically refers to the data processing method part, which will not be repeated here.

[0144] Fig. 9 A block diagram of an electronic device suitable for implementing a data processing method according to an embodiment of the present disclosure is schematically shown. Fig. 9 The electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.

[0145] like Fig. 9 As shown, the computer electronic device 900 according to the embodiment of the present disclosure includes a processor 901, which can perform various appropriate actions and processes according to the program stored in the read-only memory (ROM) 902 or the program loaded from the storage part 908 to the random access memory (RAM) 903. The processor 901 may include, for example, a general-purpose microprocessor (such as a CPU), an instruction set processor and / or a related chipset and / or a special-purpose microprocessor (for example, an application-specific integrated circuit (ASIC)), etc. The processor 901 may also include an onboard memory for caching purposes. The processor 901 may include a single processing unit or multiple processing units for performing different actions of the method flow according to the embodiment of the present disclosure.

[0146] In RAM 903, various programs and data required for the operation of electronic device 900 are stored. Processor 901, ROM 902 and RAM 903 are connected to each other via bus 904. Processor 901 performs various operations of the method flow according to the embodiment of the present disclosure by executing the program in ROM 902 and / or RAM 903. It should be noted that the program can also be stored in one or more memories other than ROM 902 and RAM 903. Processor 901 can also perform various operations of the method flow according to the embodiment of the present disclosure by executing the program stored in the one or more memories.

[0147] According to an embodiment of the present disclosure, the electronic device 900 may further include an input / output (I / O) interface 905, which is also connected to the bus 904. The electronic device 900 may further include one or more of the following components connected to the input / output (I / O) interface 905: an input portion 906 including a keyboard, a mouse, etc.; an output portion 907 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage portion 908 including a hard disk, etc.; and a communication portion 909 including a network interface card such as a LAN card, a modem, etc. The communication portion 909 performs communication processing via a network such as the Internet. A drive 910 is also connected to the input / output (I / O) interface 905 as needed. A removable medium 911, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 910 as needed, so that a computer program read therefrom is installed into the storage portion 908 as needed.

[0148] According to an embodiment of the present disclosure, the method flow according to an embodiment of the present disclosure can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a computer-readable storage medium, and the computer program contains a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication part 909, and / or installed from the removable medium 911. When the computer program is executed by the processor 901, the above-mentioned functions defined in the system of the embodiment of the present disclosure are executed. According to an embodiment of the present disclosure, the system, equipment, device, module, unit, etc. described above can be implemented by a computer program module.

[0149] The present disclosure also provides a computer-readable storage medium, which may be included in the device / apparatus / system described in the above embodiments; or may exist independently without being assembled into the device / apparatus / system. The above computer-readable storage medium carries one or more programs, and when the above one or more programs are executed, the method according to the embodiment of the present disclosure is implemented.

[0150] According to an embodiment of the present disclosure, the computer-readable storage medium may be a non-volatile computer-readable storage medium. For example, it may include, but is not limited to: a portable computer disk, 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 disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof. In the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program that may be used by or in combination with an instruction execution system, apparatus, or device.

[0151] For example, according to an embodiment of the present disclosure, the computer-readable storage medium may include the ROM 902 and / or the RAM 903 described above and / or one or more memories other than the ROM 902 and the RAM 903 .

[0152] The embodiments of the present disclosure also include a computer program product, which includes a computer program, which contains program code for executing the method provided by the embodiments of the present disclosure. When the computer program product runs on an electronic device, the program code is used to enable the electronic device to implement the data processing method provided by the embodiments of the present disclosure.

[0153] When the computer program is executed by the processor 901, the above functions defined in the system / device of the embodiment of the present disclosure are executed. According to the embodiment of the present disclosure, the system, device, module, unit, etc. described above can be implemented by a computer program module.

[0154] In one embodiment, the computer program may be based on a tangible storage medium such as an optical storage device, a magnetic storage device, etc. In another embodiment, the computer program may also be transmitted and distributed in the form of a signal on a network medium, and downloaded and installed through the communication part 909, and / or installed from a removable medium 911. The program code contained in the computer program may be transmitted using any appropriate network medium, including but not limited to: wireless, wired, etc., or any suitable combination of the above.

[0155] According to an embodiment of the present disclosure, the program code for executing the computer program provided by the embodiment of the present disclosure can be written in any combination of one or more programming languages. Specifically, these computing programs can be implemented using high-level process and / or object-oriented programming languages, and / or assembly / machine languages. Programming languages ​​include, but are not limited to, Java, C++, python, "C" language or similar programming languages. The program code can be executed entirely on the user computing device, partially on the user device, partially on the remote computing device, or entirely on the remote computing device or server. In the case of a remote computing device, the remote computing device can be connected to the user computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or can be connected to an external computing device (for example, using an Internet service provider to connect through the Internet).

[0156] The flowcharts and block diagrams in the accompanying drawings illustrate the possible architecture, functions and operations of the systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each box in the flowchart or block diagram may represent a module, a program segment, or a part of a code, and the above-mentioned module, program segment, or a part of the code contains one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box may also occur in an order different from that marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flowchart, and the combination of boxes in the block diagram or flowchart, can be implemented with a dedicated hardware-based system that performs the specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions. It can be understood by those skilled in the art that the features recorded in the various embodiments and / or claims of the present disclosure can be combined and / or combined in a variety of ways, even if such a combination or combination is not explicitly recorded in the present disclosure. In particular, without departing from the spirit and teaching of the present disclosure, the features described in the various embodiments and / or claims of the present disclosure may be combined and / or combined in a variety of ways. All of these combinations and / or combinations fall within the scope of the present disclosure.

[0157] The embodiments of the present disclosure are described above. However, these embodiments are only for illustrative purposes and are not intended to limit the scope of the present disclosure. Although the embodiments are described above separately, this does not mean that the measures in the various embodiments cannot be used in combination to advantage. The scope of the present disclosure is defined by the attached claims and their equivalents. Without departing from the scope of the present disclosure, those skilled in the art may make a variety of substitutions and modifications, which should all fall within the scope of the present disclosure.

Claims

1. A data processing method, comprising: Responding to a business test request, obtaining log records related to the business application to be tested; In a case where the log type of the log record is the first log type, based on a matching identifier included in the log record, determining a configuration template related to the log record from a plurality of service interface data templates stored in a local storage unit; as well as Data splicing is performed based on the initial log data included in the log record and the configuration template to obtain target log data.

2. The method according to claim 1, wherein: The initial log data includes a plurality of variable fields, and the configuration template includes a plurality of constant fields; The step of performing data splicing based on the initial log data included in the log record and the configuration template to obtain target log data includes: For the variable field, determining a target constant field from the plurality of constant fields based on the order of the variable field in the initial log data; combining the variable field with the target constant field to obtain a log field related to the variable field; and The log fields respectively related to the plurality of variable fields are concatenated to obtain the target log data.

3. The method according to claim 1, wherein: The matching identifier includes a business matching identifier and a log matching identifier; Wherein, based on the matching identifier included in the log record, determining the configuration template related to the log record from a plurality of service interface data templates stored in the local storage unit includes: Based on the service matching identifier, determining a target service interface data template related to the log record from the multiple service interface data templates; and Based on the log matching identifier, the configuration template related to the log record is determined from a plurality of groups of key-value pair configuration templates included in the target service interface data template.

4. The method according to claim 1, further comprising: In response to the service application to be tested being started, reading the service interface data template related to the service application to be tested from the configuration platform using a preset interface; as well as The service interface data template is written into the local storage unit.

5. The method according to claim 4, wherein: The using a preset interface to read the business interface data template related to the business application to be tested from the configuration platform includes: The preset interface of the first server is called, wherein the first server is configured to read the business interface data template from the configuration platform in response to the preset interface being called, and return the business interface data template.

6. The method according to claim 1, further comprising: In response to the value of the test switch field indicating turning on the test, the service test request is generated.

7. The method according to claim 6, further comprising: In response to the scanning instruction, parsing the acquired characteristic image to establish a long connection with the console, wherein the characteristic image includes a target pattern acquired by using an image acquisition unit to acquire the target pattern on the display interface of the console; and The value of the test switch field is updated to a value indicating turning on the test.

8. The method according to claim 7, wherein: The step of parsing the acquired characteristic image to establish a long connection with the console includes: Based on the feature image, obtaining link information related to the feature image; Parsing the link information to obtain task identification information, wherein the console is configured to establish a first sub-connection with the second server when in operation, and generate the link information based on the task identification information returned by the second server through the first sub-connection, generate the target pattern based on the link information, and display the target pattern on the display interface of the console; establishing a second sub-connection with a second server, and sending the task identification information to the second server through the second sub-connection, wherein the second server is configured to determine a first sub-connection related to the second sub-connection based on the task identification information; and A long connection with the console is obtained based on the first sub-connection related to the second sub-connection and the second sub-connection.

9. The method according to claim 7 or 8, further comprising: The target log data is sent to the console via a long connection with the console, wherein the console is configured to display the target log data on a display interface of the console.

10. The method according to any one of claims 1 to 8, further comprising: In a case where the log type of the log record is the second log type, the target log data is determined to be initial log data included in the log record.

11. A data processing device, comprising: An acquisition module, used to obtain log records related to the business application to be tested in response to a business test request; A first determination module, configured to determine, when the log type of the log record is a first log type, a configuration template related to the log record from a plurality of service interface data templates stored in a local storage unit based on a matching identifier included in the log record; as well as The splicing module is used to perform data splicing based on the initial log data included in the log record and the configuration template to obtain target log data.

12. An electronic device comprising: one or more processors; a memory for storing one or more instructions, Wherein, when the one or more instructions are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1 to 10.

13. A computer-readable storage medium having executable instructions stored thereon, wherein when the executable instructions are executed by a processor, the processor is enabled to implement the method according to any one of claims 1 to 10.

14. A computer program product, comprising computer executable instructions, which are used to implement the method of any one of claims 1 to 10 when executed.