An information processing method and device, computer equipment and a storage medium

By decompiling and adjusting the application package, combined with static and dynamic detection, the runtime error caused by special characters in the application was resolved, achieving efficient and accurate character detection and stable application operation.

CN115658081BActive Publication Date: 2026-02-27BEIJING YOUZHUJU NETWORK TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211001370.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-08-19
Publication Date
2026-02-27
Estimated Expiration
2042-08-19

AI Technical Summary

Technical Problem

In existing technologies, applications often encounter runtime errors after release due to the presence of special characters. Manual detection is inefficient and inaccurate, and cannot effectively detect invisible characters such as zero-width characters.

Method used

By decompiling the application package, preset characters in the code to be detected are detected, and the initial code is adjusted when preset characters are detected until an application package without preset characters is generated. Static and dynamic preset character detection is performed before and after release.

Benefits of technology

This ensures that the released application package does not contain preset characters, improving the efficiency and accuracy of character detection, avoiding the impact of adding preset characters during code packaging, and detecting network request results during runtime to fully guarantee the normal operation of the application.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115658081B_ABST
    Figure CN115658081B_ABST
Patent Text Reader

Abstract

The present disclosure provides an information processing method, device, computer equipment and storage medium, wherein the method comprises: obtaining an application package to be published; decompiling the application package to determine the to-be-detected code corresponding to the application package; performing preset character detection on the to-be-detected code, and adjusting the initial code corresponding to the application package if the to-be-detected code contains a preset character; regenerating the application package based on the adjusted initial code, and returning to the step of determining the to-be-detected code corresponding to the application package until the to-be-detected code corresponding to the regenerated application package is detected to not contain a preset character; adding target code to the target application package corresponding to the to-be-detected code not containing a preset character, and publishing the target application package with the added target code.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present disclosure relates to the technical field of computer, and in particular, to an information processing method and device, computer equipment and storage medium. BACKGROUND

[0002] When developing an application program, due to the carelessness of the developer or the error of the development software, special characters that cannot run may be mixed in the source code or packaged code of the application program, resulting in running errors of the application program after being published.

[0003] In the related art, the developer can only manually check the source code of the application program during development, but the manual detection is low in efficiency and accuracy, and many special characters (such as zero-width characters) are invisible in most compilers or browsers and cannot be detected by the naked eye. Therefore, how to quickly and effectively detect the code of the application program becomes a problem to be solved. SUMMARY

[0004] The embodiments of the present disclosure at least provide an information processing method and device, computer equipment and storage medium.

[0005] In a first aspect, the embodiments of the present disclosure provide an information processing method, comprising:

[0006] obtaining an application program package to be published;

[0007] decompiling the application program package to determine the to-be-detected code corresponding to the application program package;

[0008] performing preset character detection on the to-be-detected code, and adjusting the initial code corresponding to the application program package in a case where the to-be-detected code contains a preset character;

[0009] regenerating the application program package based on the adjusted initial code, and returning to the step of determining the to-be-detected code corresponding to the application program package until it is detected that the to-be-detected code corresponding to the regenerated application program package does not contain a preset character;

[0010] adding a target code in the target application program package corresponding to the to-be-detected code which does not contain a preset character, and publishing the target application program package to which the target code is added, wherein the target code is used to intercept network requests in the running process of the target application program package to perform preset character detection on the request results corresponding to the network requests.

[0011] In a possible implementation, the preset character detection on the to-be-detected code comprises:

[0012] The to-be-detected code is matched with a plurality of preset characters stored in advance.

[0013] In a second aspect, the embodiments of the present disclosure further provide an information processing method, comprising:

[0014] An application package is acquired based on the information processing method in the first aspect or any possible implementation manner of the first aspect, and the application package is run; wherein the application package comprises application code and target code.

[0015] To-be-detected data generated in the running process of the application package is acquired based on the target code.

[0016] The to-be-detected data is detected for preset characters, and the to-be-detected data is processed based on the detection result.

[0017] In a possible implementation manner, the to-be-detected data generated in the running process of the application package is acquired based on the target code, comprising:

[0018] The network request sent in the running process of the application package is intercepted based on the target code.

[0019] The request result corresponding to the intercepted network request is listened to, and the returned request result is acquired.

[0020] In a possible implementation manner, the to-be-detected data is processed based on the detection result, comprising:

[0021] The preset characters in the to-be-detected data are deleted, and the to-be-detected data is processed according to the processing method corresponding to the to-be-detected data.

[0022] In a possible implementation manner, the method further comprises:

[0023] An update code generated in the running process of the application package is acquired.

[0024] The update code is detected for preset characters.

[0025] In a possible implementation manner, after the update code is detected for preset characters, the method further comprises:

[0026] In a case where any piece of code in the update code contains preset characters, the piece of code is taken as to-be-replaced code, and a replacement code corresponding to the to-be-replaced code is acquired.

[0027] The to-be-replaced code in the update code is updated to the replacement code.

[0028] In a third aspect, the embodiments of the present disclosure further provide an information processing device, comprising:

[0029] The first obtaining module is configured to obtain an application package to be published.

[0030] The determining module is configured to decompile the application package and determine the to-be-detected code corresponding to the application package.

[0031] The detecting module is configured to perform preset character detection on the to-be-detected code, and in a case where it is detected that the to-be-detected code contains a preset character, adjust the initial code corresponding to the application package.

[0032] The generating module is configured to regenerate an application package based on the adjusted initial code, and return to the step of determining the to-be-detected code corresponding to the application package until it is detected that the to-be-detected code corresponding to the regenerated application package does not contain a preset character.

[0033] The publishing module is configured to add a target code in a target application package corresponding to the to-be-detected code that does not contain a preset character, and publish the target application package to which the target code is added, wherein the target code is used to intercept a network request in a running process of the target application package, so as to perform preset character detection on a request result corresponding to the network request.

[0034] In a possible implementation, when performing preset character detection on the to-be-detected code, the detecting module is configured to:

[0035] Match the to-be-detected code with a plurality of preset characters stored in advance.

[0036] In a fourth aspect, the embodiments of the present disclosure further provide an information processing device, comprising:

[0037] The second obtaining module is configured to obtain a target application package published based on the information processing method of the first aspect or any possible implementation of the first aspect, and run the target application package; wherein the target application package contains application program code and a target code.

[0038] The third obtaining module is configured to obtain to-be-detected data generated in a running process of the target application package based on the target code.

[0039] The processing module is configured to perform preset character detection on the to-be-detected data, and perform processing on the to-be-detected data based on a detection result.

[0040] In a possible implementation, when obtaining the to-be-detected data generated in the running process of the target application package based on the target code, the third obtaining module is configured to:

[0041] intercept a network request sent by the target application package during running based on the target code;

[0042] monitor a request result corresponding to the intercepted network request, and obtain a returned request result.

[0043] In a possible implementation, when processing the to-be-detected data based on the detection result, the processing module is configured to:

[0044] delete a preset character in the to-be-detected data, and process the to-be-detected data according to the processing method corresponding to the to-be-detected data.

[0045] In a possible implementation, the processing module is further configured to:

[0046] obtain an update code generated by the target application package during running;

[0047] perform preset character detection on the update code.

[0048] In a possible implementation, after performing the preset character detection on the update code, the processing module is further configured to:

[0049] in a case where any piece of code in the update code contains a preset character, take the piece of code as to-be-replaced code, and obtain a replacement code corresponding to the to-be-replaced code;

[0050] update the to-be-replaced code in the update code to the replacement code.

[0051] In a fifth aspect, the embodiments of the present disclosure further provide a computer device, including a processor, a memory, and a bus, the memory stores machine readable instructions executable by the processor, when the computer device is running, the processor and the memory communicate through the bus, and the machine readable instructions are executed by the processor to perform the steps of the first aspect or any possible implementation of the first aspect, or perform the steps of the second aspect or any possible implementation of the second aspect.

[0052] In a sixth aspect, the embodiments of the present disclosure further provide a computer readable storage medium, the computer readable storage medium stores a computer program, when the computer program is run by a processor, the steps of the first aspect or any possible implementation of the first aspect, or the steps of the second aspect or any possible implementation of the second aspect are executed.

[0053] The information processing method, device, computer device and storage medium provided by the embodiments of the present disclosure can perform preset character detection on the to-be-detected code obtained by decompiling the application package, so that the source code of the application package or the preset characters generated in the packaging process of the application package can be checked, and then the initial code can be adjusted according to the detected preset characters, the application package is regenerated, and it is detected again whether the to-be-detected code corresponding to the regenerated application package contains the preset characters, the above process is repeatedly executed until the to-be-detected code corresponding to the regenerated application package does not contain the preset characters, and finally the generated application package is published, so that it can be ensured that the published application package does not contain the preset characters, and the efficiency and accuracy of character detection are greatly improved by using the method of automatically detecting to-be-detected characters. In addition, since the preset character detection is performed on the to-be-detected code obtained by decompiling the application package, the addition of the preset characters in the code packaging process can be avoided, and the running of the application program is further affected. Further, the target code added in the target application package can intercept the network request of the target application package in the running process, and the request result received by the target application package in the running process can be detected for the preset characters, so that it can be ensured that the application program will not receive the request result containing the preset characters in the running process. Therefore, the method provided by the present disclosure can comprehensively guarantee the running of the application program by performing static preset character detection before publishing the application package and dynamic preset character detection on the network request result after publishing the application package.

[0054] In order to make the above objectives, characteristics and advantages of the present disclosure more obvious and easy to understand, the following preferred embodiments are specifically described below, and the accompanying drawings are described in detail as follows. BRIEF DESCRIPTION OF DRAWINGS

[0055] In order to more clearly illustrate the technical solutions of the embodiments of the present disclosure, the following will briefly introduce the drawings needed to be used in the embodiments. The drawings herein are incorporated into the specification and form a part of the specification, which illustrate the embodiments consistent with the present disclosure, and are used to explain the technical solutions of the present disclosure together with the specification. It should be understood that the following drawings only show some embodiments of the present disclosure, and therefore should not be regarded as a limitation on the scope, and other related drawings can also be obtained by those skilled in the art without creative labor.

[0056] Figure 1 A flowchart of an information processing method provided by some embodiments of the present disclosure is shown;

[0057] Figure 2 A flowchart of another information processing method provided by some embodiments of the present disclosure is shown;

[0058] Figure 3A schematic diagram showing a specific flow of an information processing method provided by some embodiments of the present disclosure is shown.

[0059] Figure 4 A schematic diagram showing an architecture of an information processing apparatus provided by some embodiments of the present disclosure is shown.

[0060] Figure 5 A schematic diagram showing an architecture of another information processing apparatus provided by some embodiments of the present disclosure is shown.

[0061] Figure 6 A schematic diagram showing a structure of a computer device provided by some embodiments of the present disclosure is shown.

[0062] Figure 7 A schematic diagram showing a structure of another computer device provided by some embodiments of the present disclosure is shown. DETAILED DESCRIPTION

[0063] To make the objectives, technical solutions, and advantages of the embodiments of the present disclosure clearer, the following will be combined with the accompanying drawings for the embodiments of the present disclosure to clearly and completely describe the technical solutions of the embodiments of the present disclosure. Obviously, the described embodiments are only a part of the embodiments of the present disclosure, rather than all the embodiments. The components of the embodiments of the present disclosure described and shown in the accompanying drawings can be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present disclosure provided in the accompanying drawings is not intended to limit the scope of the claimed present disclosure, but only represents selected embodiments of the present disclosure. Based on the embodiments of the present disclosure, all other embodiments obtained by those skilled in the art without creative work fall within the scope of protection of the present disclosure.

[0064] When developing an application program, due to the carelessness of the developer or the error of the developed software, special characters that cannot run may be mixed in the source code of the application program or the packaged code, causing the application program to run incorrectly after being published.

[0065] In the related art, the developer can only manually check the source code of the application program during development. However, manual detection is low in efficiency and accuracy, and many special characters (such as zero-width characters) are invisible in most compilers or browsers and cannot be detected by the naked eye. Moreover, even if the source code does not contain special characters, the generated application package may still contain special characters due to the mistakes of the developer or the errors of the packaging program during the process of packaging the source code to generate an application package. Therefore, how to quickly and effectively detect the code of the application program becomes a problem to be solved.

[0066] Based on the above research, the information processing method, device, computer equipment and storage medium provided by the present disclosure can detect the preset characters in the to-be-detected code decompiled from the application package, so as to check the source code of the application package or the preset characters generated in the packaging process of the application package. Then, the initial code can be adjusted according to the detected preset characters, the application package is regenerated, and it is detected again whether the to-be-detected code corresponding to the regenerated application package contains the preset characters. The above process is repeatedly executed until the to-be-detected code corresponding to the regenerated application package does not contain the preset characters, and the finally generated application package is published. Therefore, it can be ensured that the published application package does not contain the preset characters, and the efficiency and accuracy of character detection are greatly improved by using the method of automatically detecting to-be-detected characters. In addition, since the preset character detection is performed on the to-be-detected code decompiled from the application package, the addition of the preset characters in the code packaging process can be avoided, thereby affecting the running of the application. Further, the target code added in the target application package can intercept the network request of the target application package in the running process, and the request result received by the target application package in the running process can be detected for the preset characters, so as to ensure that the application will not receive the request result containing the preset characters in the running process. Therefore, the method provided by the present disclosure can comprehensively guarantee the running of the application by performing static preset character detection before the application package is published and dynamic preset character detection on the network request result after the application package is published.

[0067] It should be noted that similar reference numerals and letters refer to similar items throughout the accompanying drawings, and therefore, once an item is defined in one drawing, it is not necessary to further define and explain it in subsequent drawings.

[0068] The term "and / or" in this document merely describes an associated relationship, which means that there can be three relationships, for example, A and / or B can represent three cases of A alone, A and B together, and B alone. In addition, the term "at least one" in this document means any one of a plurality or any combination of at least two of a plurality, for example, including at least one of A, B and C can mean including any one or more elements selected from the set consisting of A, B and C.

[0069] It can be understood that before using the technical solutions disclosed by the embodiments of the present disclosure, the type of personal information involved in the present disclosure, the use range, the use scene and the like should be informed to the user and the authorization of the user should be obtained by a proper way according to the relevant laws and regulations.

[0070] For example, in response to receiving an active request of a user, a prompt information is sent to the user to explicitly prompt the user that the operation requested to be performed by the user will need to acquire and use personal information of the user. Thus, the user can autonomously select whether to provide the personal information to the software or hardware such as an electronic device, an application program, a server or a storage medium, etc. performing the operation of the technical solution of the present disclosure according to the prompt information.

[0071] As an optional but non-limiting implementation, in response to receiving an active request of a user, the prompt information can be sent to the user in the form of a pop-up window, and the prompt information can be presented in the form of text in the pop-up window. In addition, the pop-up window can also carry a selection control for the user to select "agree" or "disagree" to provide the personal information to the electronic device.

[0072] It can be understood that the above notification and acquisition of user authorization process is only illustrative and does not limit the implementation of the present disclosure, and other ways that meet the relevant laws and regulations can also be applied to the implementation of the present disclosure.

[0073] For the convenience of understanding the present embodiment, first, a kind of information processing method disclosed by the present embodiment is introduced in detail, the execution subject of the information processing method provided by the present embodiment is generally computer equipment with certain computing power, which is for example first user end, the first user end includes development end or test end, the first user end illustratively can be personal computer, tablet computer, smart phone etc., in a possible application scenario, the first user end can be developer user end. In some possible implementation ways, the information processing method can be realized by the way that processor calls computer readable instruction stored in memory.

[0074] Referring to Figure 1 Fig. 1 shows a flowchart of the information processing method provided by the present embodiment, and the method comprises steps 101-105, wherein:

[0075] Step 101, acquiring an application package to be published;

[0076] Step 102, decompiling the application package to determine the to-be-detected code corresponding to the application package;

[0077] Step 103, performing preset character detection on the to-be-detected code, and in the case that the to-be-detected code contains preset characters, adjusting the initial code corresponding to the application package;

[0078] Step 104, regenerate the application package based on the adjusted initial code, and return to the step of determining the to-be-detected code corresponding to the application package until it is detected that the to-be-detected code corresponding to the regenerated application package does not contain the preset character;

[0079] Step 105, add a target code in the target application package corresponding to the to-be-detected code not containing the preset character, and publish the target application package with the added target code, wherein the target code is used to intercept network requests in the running process of the target application package, so as to detect the request results corresponding to the network requests.

[0080] The following is a detailed description of the above steps:

[0081] For steps 101 and 102,

[0082] The application package can be a program installation package of multiple file types, such as an executable file (exe file) of a computer application, an Android application package (APK), and the like.

[0083] Specifically, after the application package is decompiled, a decompiled code for generating the application package can be obtained. The to-be-detected code can be at least part of the decompiled code. The decompiled code can be the same as the initial code (also referred to as source code) for generating the application package, or different from the initial code if the initial code is mixed with a preset character in the process of packaging the application package. Therefore, by detecting the to-be-detected code, it can be detected whether the initial code or the initial code is mixed with a preset character in the packaging process.

[0084] For step 103,

[0085] The preset character is used to represent a harmful character affecting program running. The preset character will affect the execution of normal code due to incompatibility or presence in the middle of normal code. The preset character can be a zero-width character, such as "200b".

[0086] In one possible implementation, when the to-be-detected code is detected for the preset character, the to-be-detected code can be matched with a plurality of preset characters stored in advance.

[0087] Specifically, it can be detected whether the to-be-detected code contains the pre-stored preset characters, and a first detection result can be generated, which can include a first target character present in the to-be-detected code and position information of the first target character. Here, a preset character list containing a plurality of preset characters can be pre-acquired, and the preset character list stored in the first user terminal can be called when preset character monitoring is performed on the to-be-detected code. The preset character list can be the same list as the preset character list in the above embodiments.

[0088] In a possible implementation, the preset character list can be acquired from a server, and the preset character list can be updated by staff. When preset character detection is performed on the first user terminal or at a preset time interval, the first user terminal can re-acquire the preset character list from the server or update the preset character list stored in the first user terminal according to the updated preset character list in the server.

[0089] In a possible implementation, when it is detected that the to-be-detected code does not contain preset characters, the application package can be released.

[0090] In a possible implementation, when it is detected that the to-be-detected code contains preset characters, the initial code corresponding to the application package is adjusted. Specifically, the first target character in the initial code can be found according to the position information of the first target character in the to-be-detected code, and the first target character in the initial code can be deleted when the initial code corresponding to the application package is adjusted.

[0091] Here, if the initial code does not contain the first target character, it indicates that the first target character is generated in subsequent processing (such as a process of packaging the initial code to generate an application package) of the initial code. Therefore, when the first target character cannot be found in the initial code, the initial code corresponding to the application package can not be adjusted, and the application package can be regenerated based on the initial code directly.

[0092] For step 104,

[0093] Specifically, after the initial code is adjusted, the preset character is not included in the adjusted initial code, but after other processing of the initial code (such as in the process of packaging to generate an application package), the regenerated application package may again be mixed with the preset character due to the mistake of the developer or the error of the computer (such as a compiler). Therefore, it is still necessary to perform preset character detection, initial code adjustment, and regeneration of an application package on the regenerated application package again, that is, return to the steps of steps 102-104. Until the regenerated application package corresponding to the to-be-detected code does not include the preset character, step 105 is performed.

[0094] For step 105,

[0095] The target code can obtain a network request generated by an application, and can intercept and decrypt a request result corresponding to the network request sent by a server to the application according to the network request.

[0096] In a possible implementation, when the target application package corresponding to the to-be-detected code not including the preset character is published, the target application package can be sent to a server, and other user terminals can obtain the target application package from the server and install the target application package. For example, the target application package can be published to an application store, and other user terminals can download the target application package from the application store and then install the target application package.

[0097] Because the target application package includes the target code, after the user installs the target application package, the target code can start to intercept and decrypt a network request sent by the target application package in a running process and a request result received by the target application package, and perform preset character detection on the network request and the network request result, to ensure that the network request does not include the preset character, so that the server receiving the network request can correctly respond to the network request, and it can be ensured that the received request result does not include the preset character, so that the target application can correctly perform subsequent processing (such as displaying to-be-displayed content included in the request result) based on the received request result.

[0098] Based on the same inventive concept, the embodiments of the present disclosure also provide an information processing method, which is applied to a second user terminal, which can be a personal computer, a tablet computer, a smart phone, and the like, and in a possible application scenario, the second user terminal is a use terminal of an application, and the second user terminal includes the first user terminal; as shown in Figure 2 As shown in the figure, a flowchart of an information processing method provided by the embodiments of the present disclosure is shown, and the method includes steps 201-203, where:

[0099] In step 201, a target application package published based on the information processing method described in the above embodiments is acquired and run; wherein the target application package contains application code and target code.

[0100] In step 202, based on the target code, data to be detected generated in the running process of the target application package is acquired.

[0101] In step 203, preset character detection is performed on the data to be detected, and based on the detection result, the data to be detected is processed.

[0102] The following is a detailed description of the above steps:

[0103] For step 201,

[0104] The application code represents code for installing the target application, and the target code is the code for intercepting network requests in the running process of the target application package as described in the above embodiments.

[0105] Specifically, when acquiring the target application package, the second user terminal can download the target application package from a server, or receive a target application package sent by a first user terminal. In the case where the second user terminal is the first user terminal, the target application package can be directly run after the target application package is generated according to the above embodiments. Then, after acquiring the target application package, the target application package can be run.

[0106] For step 202,

[0107] The data to be detected can include network requests to be sent generated by the target application, and request results corresponding to the network requests to be received by the target application. For example, the network request can be a web content acquisition request generated by the target application, and the request result can be video content to be displayed in a web page sent by a server.

[0108] In one possible implementation, when acquiring the data to be detected generated in the running process of the target application package based on the target code, the network request sent in the running process of the target application package can be intercepted based on the target code; then the request result corresponding to the intercepted network request is listened to, and the returned request result is acquired.

[0109] Specifically, the target code can intercept a network request and a request result, and acquire a key for decrypting the request result corresponding to the network request by intercepting the network request. The encrypted request result can be decrypted by using the key, so that the content of the request result, i.e., the to-be-detected data, can be viewed.

[0110] For step 203,

[0111] Specifically, when the preset character detection is performed on the to-be-detected data, the to-be-detected data can be matched with a plurality of preset characters stored in advance. Specifically, it can be detected whether the to-be-detected data contains the plurality of preset characters stored in advance, and a detection result can be generated. The detection result can include a second target character present in the to-be-detected data and position information of the second target character.

[0112] Here, a preset character list containing a plurality of preset characters can be acquired in advance. When the preset character detection is performed on the to-be-detected data, the preset character list stored in the second user terminal can be called. The preset character list can be the same list as the preset character list in the above embodiment.

[0113] In a possible implementation, the preset character list can be acquired from a server. The preset character list can be updated and adjusted by a staff. When the preset character detection is performed on the second user terminal or every preset time, the second user terminal can reacquire the preset character list from the server, or update the preset character list stored in the second user terminal according to the updated preset character list in the server.

[0114] In a possible implementation, when the to-be-detected data is processed based on the detection result, the preset character in the to-be-detected data can be deleted, and the to-be-detected data is processed according to the processing method corresponding to the to-be-detected data.

[0115] Specifically, the second target character can be found from the to-be-detected data according to the position information of the second target character in the detection result, and the second target character (i.e., the preset character in the to-be-detected data) can be deleted. Then, based on the to-be-detected data after the second target character is deleted, subsequent processing is continued. For example, if the to-be-detected data is a network request generated by the target application program, the network request can be sent to a server. If the to-be-detected data is a request result received from the server, the content in the request result can be displayed by the target application program.

[0116] In a possible implementation, the application package can also generate update code during running, and the update code can be subjected to preset character detection. The update code can include the called code and the dynamically generated code, because the target application can call new code (such as calling a plug-in) or dynamically generate some code during running.

[0117] Specifically, when the update code is subjected to preset character detection, the update code can be decompiled first, and then the decompiled update code can be matched with the preset characters stored in advance to obtain a second detection result. The second detection result can include the preset characters (hereinafter referred to as third target characters) in the decompiled update code and position information of the third target characters. Here, the decompiled update code can also be subjected to preset character detection by calling the preset character list, and the method for obtaining the preset character list is not described herein.

[0118] In a possible implementation, after the update code is subjected to preset character detection, if any piece of code in the update code is detected to contain a preset character, the piece of code can be regarded as a code to be replaced, and a replacement code corresponding to the code to be replaced can be obtained; and then the code to be replaced in the update code can be updated to the replacement code.

[0119] Specifically, the code to be replaced in the update code that contains a preset character can be determined according to the position information of the third target characters in the second detection result. When the replacement code corresponding to the code to be replaced is obtained, the code to be replaced and / or file name information of the code to be replaced, index information of the code to be replaced, and the like can be sent to a server or a first user terminal, and the replacement code sent by the server or the first user terminal can be received. When the code to be replaced is updated to the replacement code, the replacement code can replace the code to be replaced, or the code to be replaced can be disabled (not deleted) and replaced by the replacement code for execution.

[0120] In a possible implementation, configuration content generated or stored by the target application package can also be obtained, and the configuration content can be subjected to preset character detection. If the configuration content is detected to contain a preset character, the preset character in the configuration content can be deleted. The configuration content can include rules for data selection (such as receiving data 1 to run data A, and receiving data 2 to run data B), a trust list (such as a domain name white list, an application program black list, and the like), setting information of an application program (such as a setting for display and a setting for download), and the like.

[0121] Specifically, when detecting the preset character, the configuration content can be matched with a plurality of preset characters stored in advance to obtain a detection result of the configuration content, and then the preset character in the configuration content can be deleted according to the detection result of the configuration content.

[0122] Finally, taking the first user terminal as a development terminal and the second user terminal as a user terminal as an example, a specific flow of the above information processing method is described as a whole, as shown in Figure 3

[0123] Step 301: The development terminal generates an application package to be published based on an initial code.

[0124] Step 302: The development terminal decompiles the application package to determine the code to be detected corresponding to the application package.

[0125] Step 303: The development terminal matches the code to be detected with a plurality of preset characters stored in advance to detect whether the code to be detected contains a preset character.

[0126] If yes, step 304 is performed.

[0127] If no, step 306 is performed.

[0128] Here, the developer can dynamically update and maintain a preset character list storing the plurality of preset characters through the development terminal to perform preset character detection.

[0129] Step 304: The development terminal adjusts the initial code corresponding to the application package.

[0130] Step 305: The development terminal regenerates an application package based on the adjusted initial code and returns to step 302.

[0131] Step 306: The development terminal adds target code to the target application package in which the code to be detected does not contain a preset character.

[0132] The target code is used to intercept network requests of the target application package in a running process to perform preset character detection on a request result corresponding to the network request.

[0133] Step 307: The development terminal publishes the target application package to which the target code is added.

[0134] Step 308: The user terminal acquires the target application package and runs the target application package.

[0135] ​Step 309, the user terminal intercepts the network request sent by the target application package in the running process based on the target code, listens to the request result corresponding to the intercepted network request, then obtains the returned request result, and performs preset character detection on the request result to obtain the detection result of the request result.

[0136] Specifically, when performing preset character detection on the request result, the request result can be matched with a plurality of preset characters stored in advance to obtain the detection result of the request result.

[0137] Step 310, the user terminal obtains the update code generated by the target application package in the running process, performs preset character detection on the update code, and obtains the detection result of the update code.

[0138] Specifically, after obtaining the update code generated by the target application package in the running process, the update code can be first decompiled, and then the decompiled update code is matched with a plurality of preset characters stored in advance to obtain the detection result of the update code.

[0139] Step 311, the user terminal processes the request result based on the detection result of the request result, and the user terminal processes the update code based on the detection result of the update code.

[0140] Specifically, the processing of the request result includes: in the case that the request result contains preset characters, deleting the preset characters in the request result, and finally continuing to execute subsequent operations based on the request result after deleting the preset characters; in the case that the request result does not contain preset characters, continuing to execute subsequent operations based on the request result.

[0141] The processing of the update code includes: in the case that any piece of code in the update code contains preset characters, taking the piece of code as a to-be-replaced code, obtaining a replacement code corresponding to the to-be-replaced code, updating the to-be-replaced code in the update code to the replacement code, and finally continuing to execute subsequent operations based on the replacement code; in the case that any piece of code in the update code does not contain preset characters, continuing to execute subsequent operations based on the update code.

[0142] The information processing method provided in the embodiments of the present disclosure can perform preset character detection on the to-be-detected code of the application package that is decompiled, so that the source code of the application package or the preset characters generated in the packaging process of the application package can be checked, and then the initial code can be adjusted according to the detected preset characters, the application package is regenerated, and it is detected again whether the to-be-detected code corresponding to the regenerated application package contains the preset characters, the above process is repeatedly executed until the to-be-detected code corresponding to the regenerated application package does not contain the preset characters, and finally the generated application package is published, so that it can be ensured that the published application package does not contain the preset characters, and the efficiency and accuracy of character detection are greatly improved by using the method of automatically detecting to-be-detected characters. In addition, since the preset character detection is performed on the to-be-detected code of the decompiled application package, the addition of the preset characters in the code packaging process can be avoided, and the running of the application program is further affected. Further, the target code added in the target application package can intercept the network request of the target application package in the running process, and the request result received by the target application package in the running process can be detected for the preset characters, so that it can be ensured that the application program will not receive the request result containing the preset characters in the running process. Therefore, the method provided in the present disclosure can comprehensively guarantee the running of the application program by performing static preset character detection before publishing the application package and dynamic preset character detection on the network request result after publishing the application package.

[0143] Those skilled in the art can understand that in the above method of the specific implementation, the writing order of each step does not mean a strict execution order and does not constitute any limitation on the implementation process. The specific execution order of each step should be determined by its function and possible internal logic.

[0144] Based on the same inventive concept, the embodiments of the present disclosure also provide an information processing device corresponding to the information processing method. Since the principle of solving problems of the device in the embodiments of the present disclosure is similar to the above-mentioned information processing method, the implementation of the device can be referred to the implementation of the method, and the repeated parts will not be described again.

[0145] Reference Figure 4 As shown in FIG. 4, an architecture schematic diagram of an information processing device provided in the embodiments of the present disclosure is shown, and the device comprises a first acquisition module 401, a determination module 402, a detection module 403, a generation module 404, and a publishing module 405.

[0146] The first acquisition module 401 is configured to acquire an application package to be published.

[0147] The determination module 402 is configured to decompile the application package and determine to-be-detected code corresponding to the application package.

[0148] The detection module 403 is configured to perform preset character detection on the to-be-detected code, and adjust the initial code corresponding to the application package if it is detected that the to-be-detected code contains preset characters.

[0149] The generation module 404 is configured to regenerate the application package based on the adjusted initial code, and return to performing the step of determining the to-be-detected code corresponding to the application package until it is detected that the to-be-detected code corresponding to the regenerated application package does not contain preset characters.

[0150] The publishing module 405 is configured to add a target code in the target application package corresponding to the to-be-detected code that does not contain preset characters, and publish the target application package to which the target code is added, where the target code is used to intercept network requests in the running process of the target application package, and perform preset character detection on request results corresponding to the network requests.

[0151] In a possible implementation, when performing preset character detection on the to-be-detected code, the detection module 403 is configured to:

[0152] match the to-be-detected code with a plurality of preset characters stored in advance.

[0153] corresponding to Figure 2 According to the information processing method shown in the embodiments of the present disclosure, an information processing device is provided, and the information processing method is performed by the information processing device. Figure 5 As shown in the embodiments of the present disclosure, an architecture schematic diagram of an information processing device is provided, and the device includes a second acquisition module 501, a third acquisition module 502, and a processing module 503.

[0154] The second acquisition module 501 is configured to acquire a target application package published based on the information processing method described in the above embodiments, and run the target application package, where the target application package contains application code and a target code.

[0155] The third acquisition module 502 is configured to acquire to-be-detected data generated in the running process of the target application package based on the target code.

[0156] The processing module 503 is configured to perform preset character detection on the to-be-detected data, and perform processing on the to-be-detected data based on the detection result.

[0157] In a possible implementation, when acquiring the to-be-detected data generated in the running process of the target application package based on the target code, the third acquisition module 502 is configured to:

[0158] intercept a network request sent by the target application package during running based on the target code;

[0159] monitor a request result corresponding to the intercepted network request, and obtain the returned request result.

[0160] In a possible implementation, the processing module 503, when processing the to-be-detected data based on the detection result, is configured to:

[0161] delete a preset character in the to-be-detected data, and process the to-be-detected data according to the processing method corresponding to the to-be-detected data.

[0162] In a possible implementation, the processing module 503 is further configured to:

[0163] obtain an update code generated by the target application package during running;

[0164] perform preset character detection on the update code.

[0165] In a possible implementation, after performing the preset character detection on the update code, the processing module 503 is further configured to:

[0166] in a case where it is detected that any piece of code in the update code contains a preset character, taking the piece of code as to-be-replaced code, and obtaining a replacement code corresponding to the to-be-replaced code;

[0167] updating the to-be-replaced code in the update code to the replacement code.

[0168] The description of the processing procedure of each module in the apparatus and the interaction procedure between the modules can refer to the related description in the foregoing method embodiments, and will not be described in detail here.

[0169] Based on the same technical concept, the present disclosure also provides a computer device. Referring to FIG. 6, Figure 6 As shown in FIG. 6, a structural schematic diagram of a computer device 600 provided by an embodiment of the present disclosure includes a processor 601, a memory 602, and a bus 603. The memory 602 is configured to store execution instructions, including an internal memory 6021 and an external memory 6022. The internal memory 6021 is also referred to as an internal storage, and is configured to temporarily store operation data in the processor 601 and exchange data with the external memory 6022 such as a hard disk. The processor 601 exchanges data with the external memory 6022 through the internal memory 6021. When the computer device 600 is running, the processor 601 and the memory 602 communicate through the bus 603, so that the processor 601 executes the following instructions:

[0170] obtain an application package to be published;

[0171] decompile the application package to determine the to-be-detected code corresponding to the application package;

[0172] perform preset character detection on the to-be-detected code, and in a case where it is detected that the to-be-detected code contains a preset character, adjust the initial code corresponding to the application package;

[0173] re-generate an application package based on the adjusted initial code, and return to the step of determining the to-be-detected code corresponding to the application package until it is detected that the to-be-detected code corresponding to the re-generated application package does not contain a preset character;

[0174] add target code to a target application package in which the corresponding to-be-detected code does not contain a preset character, and publish the target application package to which the target code is added, wherein the target code is used to intercept a network request in a running process of the target application package to perform preset character detection on a request result corresponding to the network request.

[0175] In a possible implementation, in the instructions executed by the processor 601, the preset character detection on the to-be-detected code includes:

[0176] matching the to-be-detected code with a plurality of preset characters stored in advance.

[0177] Based on the same technical concept, the present disclosure also provides a computer device. Referring to FIG. 7, Figure 7 The computer device 700 provided by the present disclosure includes a processor 701, a memory 702, and a bus 703. The memory 702 is used to store execution instructions, including an internal memory 7021 and an external memory 7022. The internal memory 7021 is also called an internal memory, which is used to temporarily store operation data in the processor 701 and exchange data with the external memory 7022 such as a hard disk. The processor 701 exchanges data with the external memory 7022 through the internal memory 7021. When the computer device 700 is running, the processor 701 and the memory 702 communicate through the bus 703, so that the processor 701 executes the following instructions:

[0178] obtaining a target application package published based on the information processing method described in the above embodiments, and running the target application package; wherein the target application package contains application program code and target code;

[0179] obtaining to-be-detected data generated in a running process of the target application package based on the target code;

[0180] The preset character detection is performed on the to-be-detected data, and the to-be-detected data is processed based on a detection result.

[0181] In a possible implementation, the instructions executed by the processor 701 include the following.

[0182] The network request sent by the target application package during running is intercepted based on the target code.

[0183] The request result corresponding to the intercepted network request is listened to, and the returned request result is acquired.

[0184] In a possible implementation, the instructions executed by the processor 701 include the following.

[0185] The preset character in the to-be-detected data is deleted, and the to-be-detected data is processed according to a processing method corresponding to the to-be-detected data.

[0186] In a possible implementation, the instructions executed by the processor 701 include the following.

[0187] The update code generated by the target application package during running is acquired.

[0188] The update code is subjected to preset character detection.

[0189] In a possible implementation, the instructions executed by the processor 701 include the following after the update code is subjected to preset character detection.

[0190] In a case where any piece of code in the update code contains a preset character, the piece of code is taken as to-be-replaced code, and a replacement code corresponding to the to-be-replaced code is acquired.

[0191] The to-be-replaced code in the update code is updated to the replacement code.

[0192] The present disclosure also provides a computer-readable storage medium having a computer program stored thereon, where the computer program, when executed by a processor, performs the steps of the information processing method described in the above method embodiments. The storage medium can be a volatile or non-volatile computer-readable storage medium.

[0193] The present disclosure also provides a computer program product carrying a program code, where the program code includes instructions for performing the steps of the information processing method described in the above method embodiments. Details can be found in the above method embodiments, which will not be described herein again.

[0194] The computer program product can be implemented by hardware, software or a combination thereof. In an optional embodiment, the computer program product is embodied in a computer storage medium. In another optional embodiment, the computer program product is embodied in a software product, such as a software development kit (SDK) or the like.

[0195] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working process of the system and device described above can refer to the corresponding process in the foregoing method embodiments, which will not be repeated here. In several embodiments provided in the present disclosure, it should be understood that the disclosed system, device and method can be implemented in other ways. The device embodiments described above are merely schematic, for example, the division of the units is only a logical function division, and actual implementation can have another division manner, for example, a plurality of units or components can be combined or integrated into another system, or some features can be omitted or not executed. In addition, the coupling or direct coupling or communication connection between the units shown or discussed can be indirect coupling or communication connection through some communication interfaces, devices or units, which can be electrical, mechanical or other forms.

[0196] The units described as separate components can or can not be physically separate, and the components shown as units can or can not be physical units, that is, they can be located in one place, or can be distributed on a plurality of network units. According to actual needs, part or all of the units can be selected to achieve the purpose of the embodiment scheme.

[0197] In addition, each functional unit in each embodiment of the present disclosure can be integrated in one processing unit, or each unit can exist physically independently, or two or more units can be integrated in one unit.

[0198] If the functions are implemented in the form of software function units and sold or used as independent products, they can be stored in a nonvolatile computer readable storage medium executable by a processor. Based on this understanding, the technical solutions of the present disclosure essentially or the part that contributes to the prior art or part of the technical solutions can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes a number of instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in various embodiments of the present disclosure. The aforementioned storage medium includes: a U disk, a mobile hard disk, a read-only memory (Read-Only Memory, ROM), a random access memory (Random Access Memory, RAM), a magnetic disk or an optical disk, and various media that can store program codes.

[0199] Finally, it should be noted that: the above-described embodiments are only specific embodiments of the present disclosure, used to illustrate the technical solutions of the present disclosure, and not to limit them. The protection scope of the present disclosure is not limited thereto. Although the present disclosure has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that any person skilled in the art who is familiar with the technology in the art can still make modifications or easily think of changes to the technical solutions described in the foregoing embodiments, or make equivalent replacements to some of the technical features; and these modifications, changes or replacements do not cause the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present disclosure, and should be covered within the protection scope of the present disclosure. Therefore, the protection scope of the present disclosure should be subject to the protection scope of the claims.

Claims

1. An information processing method, characterized in that, include: Obtain the application package to be published; The application package is decompiled to determine the code to be detected corresponding to the application package; The code to be detected is subjected to preset character detection, and if the code to be detected contains preset characters, the initial code corresponding to the application package is adjusted. The application package is regenerated based on the adjusted initial code, and the process returns to the step of determining the code to be detected corresponding to the application package until it is detected that the code to be detected corresponding to the regenerated application package does not contain the preset characters. Add target code to the target application package whose corresponding code to be detected does not contain preset characters, and publish the target application package with the added target code. The target code is used to intercept network requests of the target application package during its operation, so as to perform preset character detection on the request results corresponding to the network requests.

2. The method according to claim 1, characterized in that, The preset character detection of the code to be detected includes: The code to be detected is matched with a plurality of pre-stored preset characters.

3. An information processing method, characterized in that, include: Obtain a target application package published based on the information processing method of claim 1 or 2, and run the target application package; wherein the target application package contains application code and target code; Based on the target code, obtain the data to be detected generated by the target application package during its operation; The data to be detected is subjected to preset character detection, and the data to be detected is processed based on the detection results.

4. The method according to claim 3, characterized in that, The step of obtaining the data to be detected generated by the target application package during runtime based on the target code includes: Based on the target code, intercept network requests sent by the target application package during its runtime; Listen to the intercepted network request and obtain the returned request result.

5. The method according to claim 3, characterized in that, The processing of the data to be detected based on the detection results includes: Delete the preset characters from the data to be detected, and process it according to the processing method corresponding to the data to be detected. The processing method for the data to be detected includes: continuing to perform subsequent processing based on the data to be detected after deleting the preset characters.

6. The method according to claim 3, characterized in that, The method further includes: Obtain the update code generated during the runtime of the target application package; The updated code is subjected to preset character detection.

7. The method according to claim 6, characterized in that, After performing preset character detection on the updated code, the method further includes: If any segment of the updated code is found to contain a preset character, the segment of code is taken as the code to be replaced, and the replacement code corresponding to the code to be replaced is obtained. The code to be replaced in the updated code is updated with the replacement code.

8. An information processing device, characterized in that, include: The first acquisition module is used to acquire the application package to be published. The determination module is used to decompile the application package and determine the code to be detected corresponding to the application package; The detection module is used to perform preset character detection on the code to be detected, and adjust the initial code corresponding to the application package when the code to be detected contains preset characters; The generation module is used to regenerate the application package based on the adjusted initial code and return to the step of determining the code to be detected corresponding to the application package until it is detected that the code to be detected corresponding to the regenerated application package does not contain the preset characters. The publishing module is used to add target code to the target application package whose corresponding code to be detected does not contain preset characters, and to publish the target application package with the added target code. The target code is used to intercept network requests of the target application package during its operation, so as to perform preset character detection on the request results corresponding to the network requests.

9. An information processing device, characterized in that, include: The second acquisition module is used to acquire a target application package published based on the information processing method of claim 1 or 2, and to run the target application package; wherein the target application package contains application code and target code; The third acquisition module is used to acquire the data to be detected generated by the target application package during its operation based on the target code; The processing module is used to perform preset character detection on the data to be detected, and to process the data to be detected based on the detection results.

10. A computer device, characterized in that, include: The computer device includes a processor, a memory, and a bus. The memory stores machine-readable instructions executable by the processor. When the computer device is running, the processor communicates with the memory via the bus. When the machine-readable instructions are executed by the processor, they perform the steps of the information processing method as described in claim 1 or 2, or the steps of the information processing method as described in any one of claims 3 to 7.

11. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, performs the steps of the information processing method as described in claim 1 or 2, or the steps of the information processing method as described in any one of claims 3 to 7.

Citation Information

Patent Citations

  • Methods and devices for uploading suspicious virus applications

    CN105224870B

  • Malicious application program detection method, system and device, equipment and storage medium

    CN111597557A