Method and apparatus for managing application on the basis of concern, device, and medium
By obtaining the application's call stack and analyzing the chain based on key features and machine learning models, the problem of managing multiple subdivided functions in existing technologies is solved, achieving refined application management and improved security.
Patent Information
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- BEIJING ZITIAO NETWORK TECH CO LTD
- Filing Date
- 2024-12-11
- Publication Date
- 2026-06-18
AI Technical Summary
Existing technologies struggle to effectively identify and manage the concerns of multiple subdivided functions in application management, resulting in an inability to effectively meet application operation expectations, particularly posing potential risks in areas such as data security.
By obtaining the application's call stack, key links are extracted based on predetermined key features to determine the second point of interest. Machine learning models are then used to analyze the links and text descriptions, and identification statements are inserted to manage the application's running status, thereby achieving refined management of the application.
It improves the efficiency and accuracy of application management, enables more granular management of application functions, reduces security risks, and ensures that applications meet their intended functions.
Smart Images

Figure CN2024138542_18062026_PF_FP_ABST
Abstract
Description
Methods, apparatus, devices, and media for managing applications based on concerns. Technical Field
[0001] Implementations of this disclosure generally relate to application management, and in particular to methods, apparatus, devices, and computer-readable storage media for managing applications based on concerns. Background Technology
[0002] Applications can implement multiple functionalities. As these functionalities become more complex, it becomes necessary to check whether these functionalities meet expectations during application runtime. Aspect-Oriented Programming (AOP) has been proposed to address this. In AOP, developers can define concerns to specify the functionalities they want to manage. Concerns may need to be identified from multiple dimensions to manage the application in a more granular way. However, the sheer number of subdivided functionalities involved in an application's runtime makes it difficult to effectively identify one or more concerns that correspond to the application's management goals. Summary of the Invention
[0003] In a first aspect of this disclosure, a method for managing an application based on concerns is provided. In this method, a call stack corresponding to a first concern in the application is obtained. The first concern corresponds to a first function of concern among multiple functions of the application. The call stack includes multiple chains, and the chains point to a code segment in the application's code corresponding to the first concern. A set of key chains is obtained from the multiple chains based on predetermined key features. Based on the set of key chains, at least one second concern in the application is determined. The at least one second concern corresponds to at least one second function associated with the first function among multiple functions. Based on the second concern, the runtime state of the application is managed.
[0004] In a second aspect of this disclosure, an apparatus for managing an application based on concerns is provided. The apparatus includes: a stack acquisition module configured to acquire a call stack corresponding to a first concern in the application, the first concern corresponding to a first function of concern among a plurality of functions of the application, the call stack including a plurality of links, the links of the plurality of links pointing to a code segment in the application code corresponding to the first concern; a link acquisition module configured to acquire a set of key links from the plurality of links based on predetermined key features; a determination module configured to determine at least one second concern in the application based on the set of key links, the at least one second concern corresponding to at least one second function associated with the first function among a plurality of functions; and a management module configured to manage the runtime state of the application based on at least one second concern.
[0005] In a third aspect of this disclosure, an electronic device is provided. The electronic device includes: at least one processing unit; and at least one memory coupled to the at least one processing unit and storing instructions for execution by the at least one processing unit, the instructions causing the electronic device to perform the method according to a first aspect of this disclosure when executed by the at least one processing unit.
[0006] In a fourth aspect of this disclosure, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a processor, causes the processor to implement the method according to a first aspect of this disclosure.
[0007] In a fifth aspect of this disclosure, a computer program product is provided, comprising a computer program that, when executed by a processor, implements the method according to a first aspect of this disclosure.
[0008] It should be understood that the content described in this content section is not intended to limit the key or essential features of the implementation of this disclosure, nor is it intended to restrict the scope of this disclosure. Other features of this disclosure will become readily apparent from the following description. Attached Figure Description
[0009] In the following detailed description, the above and other features, advantages, and aspects of the various implementations of this disclosure will become more apparent, taken in conjunction with the accompanying drawings. In the accompanying drawings, the same or similar reference numerals denote the same or similar elements, wherein:
[0010] Figure 1 shows a block diagram of an application environment according to one implementation of the present disclosure;
[0011] Figure 2 shows a block diagram of some implementations of this disclosure for managing applications based on concerns;
[0012] Figure 3 shows a block diagram of determining the link based on key features according to some implementations of this disclosure;
[0013] Figure 4 shows a block diagram of the structure of the attribute set according to some implementations of this disclosure;
[0014] Figure 5 shows a block diagram for determining text descriptions according to some implementations of this disclosure;
[0015] Figure 6 shows a block diagram illustrating the use of machine learning models to determine the text interpretation of a link according to some implementations of this disclosure;
[0016] Figure 7 shows a block diagram of code for managing applications based on identifier statements according to some implementations of this disclosure;
[0017] Figure 8 shows a block diagram of a multi-dimensional aspect according to some implementations of this disclosure;
[0018] Figure 9 shows a block diagram of a process for managing an application based on multi-dimensional aspects, according to some implementations of this disclosure;
[0019] Figure 10 shows a flowchart of a method for managing applications based on concerns, according to some implementations of this disclosure;
[0020] Figure 11 shows a block diagram of an apparatus for managing applications based on concerns, according to some implementations of this disclosure; and
[0021] Figure 12 shows a block diagram of a device capable of implementing various implementations of the present disclosure. Detailed Implementation
[0022] Implementations of this disclosure will now be described in more detail with reference to the accompanying drawings. While some implementations of this disclosure are shown in the drawings, it should be understood that this disclosure can be implemented in various forms and should not be construed as limited to the implementations set forth herein. Rather, these implementations are provided to provide a more thorough and complete understanding of this disclosure. It should be understood that the accompanying drawings and implementations of this disclosure are for illustrative purposes only and are not intended to limit the scope of protection of this disclosure.
[0023] In the description of the implementation methods disclosed herein, the term "comprising" and similar terms should be understood as open inclusion, i.e., "including but not limited to". The term "based on" should be understood as "at least partially based on". The term "one implementation" or "the implementation" should be understood as "at least one implementation". The term "some implementations" should be understood as "at least some implementations". Other explicit and implicit definitions may also be included below. As used herein, the term "model" can represent the relationships between various data. For example, the aforementioned relationships can be obtained based on various currently known and / or future-developed technical solutions.
[0024] It is understood that the data involved in this technical solution (including but not limited to the data itself, the acquisition or use of the data) shall comply with the requirements of relevant laws, regulations and related provisions.
[0025] It is understood that before using the technical solutions disclosed in each implementation of this disclosure, users should be informed of the types, scope of use, and usage scenarios of the personal information involved in this disclosure through appropriate means in accordance with relevant laws and regulations, and user authorization should be obtained.
[0026] For example, upon receiving a user's active request, a prompt message is sent to the user to explicitly inform them that the requested operation will require the acquisition and use of the user's personal information. This allows the user to independently choose whether to provide personal information to the software or hardware, such as the electronic device, application, server, or storage medium performing the operations of this disclosed technical solution, based on the prompt message.
[0027] As an optional but non-restrictive implementation, in response to a user's active request, a prompt message can be sent to the user, for example, via a pop-up window, where the prompt message can be presented in text format. Furthermore, the pop-up window can also include a selection control allowing the user to choose whether to "agree" or "disagree" to provide personal information to the electronic device.
[0028] It is understood that the above notification and user authorization process are merely illustrative and do not constitute a limitation on the implementation of this disclosure. Other methods that comply with relevant laws and regulations may also be applied to the implementation of this disclosure.
[0029] The term "in response to" as used herein refers to a state in which a corresponding event occurs or a condition is satisfied. It will be understood that the timing of subsequent actions performed in response to such event or condition is not necessarily strongly correlated with the time when the event occurs or the condition is met. For example, in some cases, subsequent actions may be performed immediately upon the occurrence of the event or the fulfillment of the condition; while in others, they may be performed some time after the occurrence of the event or the fulfillment of the condition.
[0030] Example Environment
[0031] Applications can implement multiple functions. As the functions of applications become more complex, it is necessary to check whether the various functions during application operation meet expectations, for example, whether there are potential data security risks, etc. Referring to Figure 1, which describes the environment in which the application is executed, Figure 1 shows a block diagram 100 of an application environment according to one implementation of this disclosure. As shown in Figure 1, the example environment may include a terminal device 110. In this example environment, the terminal device 110 may run an application 120 that supports user interface interaction. Application 120 may be any suitable type of application for user interface interaction, examples of which may include, but are not limited to, media applications or other suitable applications. User 140 may interact with application 120 via terminal device 110 and / or its attached devices. In the environment of Figure 1, if application 120 is active, terminal device 110 can present an interface 150 for supporting user interface interaction through application 120.
[0032] In some implementations, terminal device 110 communicates with server 130 to provide services to application 120. Terminal device 110 can be any type of mobile terminal, fixed terminal, or portable terminal, including mobile phones, desktop computers, laptop computers, notebook computers, netbook computers, tablet computers, media computers, multimedia tablets, personal communication system (PCS) devices, personal navigation devices, personal digital assistants (PDAs), audio / video players, digital cameras / camcorders, positioning devices, television receivers, radio receivers, e-book devices, gaming devices, or any combination thereof, including accessories and peripherals of these devices or any combination thereof. In some implementations, terminal device 110 can also support any type of user-facing interface (such as "wearable" circuitry).
[0033] Server 130 can be a standalone physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, content delivery networks, and big data and artificial intelligence platforms. Server 130 may include, for example, computing systems / servers such as mainframes, edge computing nodes, computing devices in a cloud environment, etc. Server 130 can provide backend services for applications 120 that support content presentation in terminal device 110.
[0034] A communication connection can be established between server 130 and terminal device 110. This communication connection can be established via wired or wireless means. The communication connection may include, but is not limited to, Bluetooth, mobile network, Universal Serial Bus, and Wi-Fi connections; the implementation of this disclosure is not limited in this respect. In the implementation of this disclosure, server 130 and terminal device 110 can perform signaling interaction through their communication connection. It should be understood that the structure and function of various elements in the environment are described for illustrative purposes only and do not imply any limitation on the scope of this disclosure.
[0035] In the context of this disclosure, application 120 can perform various tasks, such as, but not limited to, video applications, short video applications, social networking applications, music applications, media sharing applications, communication applications, and so on. As the number of applications increases and their functionality becomes more complex, data security issues are receiving increasing attention. Applications can implement multiple functions, and as these functions become more complex, it is necessary to check whether various functions meet expectations during application runtime. In AOP, developers can set concerns to specify the functions they wish to focus on. During development, concerns need to be identified from multiple dimensions to manage the application in a more granular way. However, a large number of subdivided functions may be involved during application runtime, making it difficult to effectively identify one or more concerns corresponding to the application management objectives.
[0036] Application Management Overview
[0037] To at least partially address the shortcomings of the prior art, according to one implementation of this disclosure, a method for managing applications based on concerns is proposed. Here, the functionality of the application may involve one or more actions performed by the application. For example, one or more code segments of the application can perform an action. Actions may correspond to events in the application's log data; for example, in response to performing an action, a corresponding code execution link can be recorded in the log data, which can be simply referred to as a link.
[0038] Referring to Figure 2, which describes an overview of one implementation of the present disclosure, Figure 2 shows a block diagram 200 for managing an application based on concerns according to some implementations of the present disclosure. As shown in Figure 2, a call stack 240 corresponding to a first concern 210 in application 120 can be obtained. Here, the first concern 210 corresponds to a first function of concern among multiple functions of the application, and the call stack 240 may include multiple links, one of which (e.g., link 242) may point to a code segment in the application's code corresponding to the first concern 210.
[0039] A set of key links 250 can be obtained from multiple links based on predetermined key features. In the context of this disclosure, a set of "XX" may include one or more "XX". Specifically, links 224 and 222 may respectively represent different identified key links. It should be understood that log data may include a massive number of links, some of which provide auxiliary functions and do not directly involve the concerns, while some links may directly involve the concerns, such as causing security risks, and therefore need to be analyzed. Based on a set of key links 250, at least one second concern in the application is determined, such as a second concern 220. At least one second concern corresponds to at least one second function associated with the first function among multiple functions, and the application's operational state can be managed based on at least one second concern. In the following, only a single second concern is used as an example to describe the specific details of this disclosure; alternatively and / or additionally, multiple second concerns may exist, and each second concern may be handled in a similar manner.
[0040] According to some implementations of this disclosure, a concern can represent any functionality that is desired to be addressed. For example, a first concern 210 can represent the functionality of accessing certain data (e.g., data A) in the application, and a second concern can represent the conditions under which that data is accessed. For example, suppose that accessing data A under certain conditions (e.g., condition B1) may involve potential security risks, while accessing data A under other conditions (e.g., condition B2) does not involve security risks. In this case, according to existing AOP technical solutions, simply prohibiting access to data A may result in access to data A being prohibited under both condition B1 and condition B2, thereby causing the application to fail to achieve its intended functionality.
[0041] Using the implementation method disclosed herein, the first point of concern can serve as an entry point for discovering other potential points of concern, thereby obtaining more potential points of concern. In this way, concerns can be identified from multiple dimensions to allow for more granular application management. Specifically, the second point of concern can correspond to a function in the application involving condition B1. The application can be managed to prohibit access to data A only when condition B1 is met, thereby reducing security risks. This allows users to further refine more details that may lead to security risks, facilitating the management of application functions.
[0042] Detailed process of application management
[0043] Having outlined some implementations according to this disclosure, further details regarding the approach to managing applications based on concerns will be described below. AOP is a programming paradigm that allows developers to abstract functions that span multiple classes (such as logging, transaction management, security checks, etc.) into independent modules called aspects. AOP improves code reusability and maintainability by decoupling these functions from core business logic.
[0044] Specifically, an aspect encapsulates logical units of pointcuts and advice. It contains a set of join points and the logic (advice) executed at those join points. An aspect typically contains one or more pointcuts and one or more advices. Pointcuts define which join points are affected by the aspect, while advice defines the specific operations that should be performed at those join points. The purpose of aspects is to separate cross-cutting concerns (such as logging, transaction management, etc.) from business logic, allowing these concerns to be managed and maintained independently of the business logic. A pointcut represents a subset of join points, defining which join points are affected by one or more advices in the aspect. Pointcuts are typically defined using pointcut expressions, which can match method names, method parameters, class names, annotations, etc.
[0045] Concerns can be identified based on AOP. It should be understood that although Figure 2 only schematically shows the first concern 210, alternatively and / or additionally, one or more concerns can be identified based on pointcuts and / or aspects in AOP. In the process of obtaining multiple links, multiple call stacks associated with multiple functions of the application can be obtained from log data. Furthermore, a set of links for executing functions among the multiple call stacks can be extracted from the call stacks. See Figure 3 for further details, which shows a block diagram 300 of determining links based on key features according to some implementations of this disclosure. As shown in Figure 3, call stack 310 may correspond to one or more events and may be reported by the application. Call stack 310 may include multiple links, such as links 242, 311, 312, 313, 314, etc.
[0046] The call stack 310 can be traversed in a top-down direction 330. This allows for prioritizing the traversal of the most recent log data, enabling the detection of whether recent functionality meets expectations, such as identifying potential security risks. Alternatively and / or additionally, the call stack can be traversed in the opposite direction. According to some implementations of this disclosure, the call stack can be represented in various formats and points to a function-related code segment within the application's code. For example, a call stack could be represented as com.***.os01.***.control01.onClick and associated with an event related to clicking the control control01; another example could be com.***.os01.***.control02.onClick and associated with an event related to clicking the control control02, and so on.
[0047] According to some implementations of this disclosure, key feature 320 may include various types, such as at least one of the following: user interaction 321, page feature 322, component lifecycle 323, application lifecycle 324, or callback 325. See Table 1 for further details on key features.
[0048] Table 1 Examples of Key Features
[0049] According to some implementations of this disclosure, a set of key links can be extracted from multiple links in the call stack based on key features. In the context of this disclosure, for ease of description, the extracted key links can be referred to as keyframes. Specifically, in the process of determining multiple key links from multiple links based on key features, at least one key link for performing a function can be determined from the multiple links based on the key features. Each call stack can be processed in a similar manner as described in Figure 3, thereby obtaining at least one key link corresponding to each call stack. Then, the at least one key link corresponding to each call stack can be combined to determine multiple key links. In other words, multiple keyframes can be determined, and these keyframes can correspond to various functions of the application. Here, a function can correspond to one or more keyframes.
[0050] According to some implementations of this disclosure, in the process of obtaining a set of key links from the multiple links based on the key features, text filtering can be performed on a set of links using the key features to determine at least one key link. Specifically, keywords corresponding to the key features can be determined separately, and then key frames can be extracted through text filtering. For example, keywords corresponding to user interactions may include onClick, onDraw, etc.; and keywords corresponding to component lifecycles and application lifecycles may include onCreate, onResume, etc. Keywords can be searched in each link of the call stack, and links containing the keywords can be extracted. Using some implementations of this disclosure, key links can accurately identify functions related to data security, thereby providing a solid foundation for protecting data security.
[0051] Alternatively and / or additionally, in the process of obtaining a set of key links from the plurality of links based on the key features, at least one key link can be determined based on the distance between the set of links and the key features. Specifically, the text distance between the link and the keyword feature can be determined by a predetermined text processing algorithm, thereby extracting keyframes.
[0052] It should be understood that there can be a many-to-many relationship between links and key features. For example, a link may include multiple keywords corresponding to different key features; alternatively and / or additionally, multiple links may include the same keyword. Using some implementations of this disclosure, multiple keyframes to be analyzed can be accurately extracted by traversal, avoiding omissions.
[0053] According to some implementations of this disclosure, in determining a second concern in an application, a set of attributes associated with a set of critical links can be identified. This set of attributes includes the critical links within the set of critical links, and at least one attribute associated with each critical link. Subsequently, at least one second concern is determined based on at least one attribute. This set of attributes can be referred to as technical facts, used to describe various aspects of the relevant technology of the critical links.
[0054] Referring to Figure 4 for further details regarding the attribute set, Figure 4 shows a block diagram 400 of the structure of the attribute set according to some implementations of this disclosure. As shown in Figure 4, the attribute set may include a keyframe 411 and at least one attribute of the keyframe. Specifically, at least one attribute may include at least any of the following associated with the critical link: path of the network request 412, domain 413, service node 414, client 415, stack 416, and ID 418. Alternatively and / or additionally, at least one attribute may include a text description 417 (e.g., a second text description, for example, for describing a second function in the application).
[0055] Here, keyframe 411 refers to the extracted key link, such as com.***.os01.***.control01.onClick in the example above, etc. Path 412 can represent, for example, the path of a network request associated with this keyframe, such as a path " / app / plugin / config" on the server, etc. Domain 413 can represent the address of the corresponding domain, such as "api-boot / ***.com", etc. Service node 414 can represent a node on the server used to provide services, such as "app.***.api", etc. Client 415 can represent the client device running the application, such as "device01", etc. Stack 416 can represent the corresponding call stack, for example, pointing to the stack entry address "stack01", etc. ID 418 can represent the identifier of this attribute set.
[0056] According to some implementations of this disclosure, text description 417 can be represented in natural language and used to describe functionality. Specifically, the text description may include at least one of the following associated with the functionality: a scenario, indicating the initiator that triggers the functionality; or a triggering reason, indicating at least one of the following: interactive behavior, changes in page or application cycles, or page changes. A scenario may, for example, represent a specific page (e.g., a Fragment), an action (Activity), a business function, a business scenario, or a function, etc., involved in the functionality. A triggering reason may represent a specific reason in the application that leads to the functionality, such as user interactive behavior, changes in page or application cycles, or page changes, etc. Using some implementations of this disclosure, the text description can provide richer information about the functionality of the application, thereby facilitating the determination of the specific meaning of the functionality.
[0057] According to some implementations of this disclosure, a set of textual interpretations for a set of key links can be determined based on a database associated with the application. Based on this set of textual interpretations, a textual description for describing functionality can be determined. See Figure 5 for more information; Figure 5 shows a block diagram 500 for determining the textual description for functionality according to some implementations of this disclosure.
[0058] As shown in Figure 5, during the operation of application 120, a set of key links associated with functions can be extracted from the log data 510 of application 120, such as link 512, etc. The application may have an associated database 520, which may include various functions related to the application's code. Database 520 may store various knowledge defined in the application, and database 520 may be defined by the application's developers. Based on the database 520 associated with application 120, various textual explanations (e.g., including textual explanation 530, etc.) can be determined for each link. Specifically, one link may correspond to one textual explanation describing the corresponding function of that link. Further, based on a set of textual explanations, a textual description 540 describing the function can be determined. Here, the textual description 540 is expressed in natural language. Specifically, the textual description 540 may include various aspects, such as the scenario and / or triggering reason related to the function, etc.
[0059] In applications involving large amounts of code and complex functionality, a vast number of functions may exist, making it difficult to determine the specific content of each function through manual analysis. Using the implementation method disclosed herein, the specific content of each function in the application can be automatically analyzed based on a database, thereby significantly reducing the workload of manual analysis and improving the efficiency and accuracy of application management. Specifically, machine learning models can be used to perform the management process; for example, language models can be used to understand and interpret one or more key links, thereby achieving automated interpretation of the application's key functions.
[0060] According to some implementations of this disclosure, the database may include a mapping between links and text interpretations. See Table 2 for further details, which shows examples of such mappings.
[0061] Table 2 Examples of mapping relationships
[0062] As shown in Table 2, strings represent strings in a link, and text explanations include the corresponding text explanations for that link. It should be understood that different applications can have their own databases, and these databases can be defined by the application developers. Alternatively and / or additionally, different applications can share the same database, thereby allowing for more general management of the different functionalities of different applications.
[0063] According to some implementations of this disclosure, in determining a set of text interpretations for a set of key links, the text interpretations associated with the key links can be determined based on mapping relationships. Each key link can be processed in a similar manner to determine the text interpretations associated with all keyframes.
[0064] Specifically, the database can be searched for strings within the link, and a corresponding text explanation can be provided upon detecting a particular string. It should be understood that a link can include one or more strings; for example, a link might include "inbox" and "click," in which case the text explanation could include, for example, "inbox" or "click." It should also be understood that the text explanation may only include a discrete set of descriptive terms related to the function; these descriptive terms are merely intermediate data. Since the mapping relationship includes the functional descriptions corresponding to each string in the link, the corresponding text explanations can be extracted from each keyframe in this way and used as the basis for generating the text description.
[0065] According to some implementations of this disclosure, in determining the text interpretation associated with a link, at least one string can be determined based on the delimiters in the link. Furthermore, at least one string can be matched in the mapping relationship to determine the text interpretation. For example, an example link can be represented as: com.***.os01.***.inbox.onClick. In this case, the delimiter "dot" can be used to divide the link into multiple strings: com, ***, os01, ***, inbox, onClick. Based on the mapping relationship shown in Table 2, it can be determined that the link includes the string "inbox," thereby determining that the text interpretation includes: inbox.
[0066] According to some implementations of this disclosure, in the process of determining a string, the string can be split into multiple substrings. For example, the string "onClick" can be split into the substrings "on" and "click", thereby determining that the link further includes "click", and thus determining that the text interpretation includes: inbox, click. As another example, the string "ProfileTab***" can be split into: "profile", "tab", and "***". Specifically, the splitting can be performed according to the capitalization of the characters in the string, or the capitalization can be ignored. Alternatively and / or additionally, partial matching can be performed; for example, assuming the mapping relationship includes a long string (including string 1 and string 2), matching string 1 and / or string 2 can be assigned in the link. In this way, it is convenient to process the link in a more refined manner, thereby improving the accuracy of text interpretation.
[0067] According to some implementations of this disclosure, text interpretations can be determined in various ways. For example, text interpretations can be determined by text analysis or by calling a machine learning model. In determining a set of text interpretations for a set of links, prompt words can be identified. These prompt words can instruct the machine learning model to determine a set of text interpretations for a set of links based on mapping relationships. Furthermore, the machine learning model's response to the prompt words can be received. See Figure 6 for further details, which shows a block diagram 600 of determining text interpretations for links using a machine learning model according to some implementations of this disclosure. As shown in Figure 6, a set of key links 610 can include multiple links. Prompt words 620 can be determined, which can be used to call a machine learning model 630 to output a corresponding set of text interpretations based on a set of key links 610 and a database 520. Prompt words 620 can have different structures; see Table 3 for examples of prompt words.
[0068] Table 3 Examples of prompt words
[0069] As shown in Table 3, part 1 can specify the task to be performed by the machine learning model, part 2 can specify relevant examples for performing the task, and part 3 can specify one or more keyframes to be processed. The prompt word can be input into the machine learning model, which will then invoke the mapping relationships in database 520 to output text explanations for each keyword. Utilizing some implementation methods of this disclosure, the powerful processing capabilities of the machine learning model can be leveraged to analyze the strings in the keyframes, thereby providing corresponding text explanations.
[0070] According to some implementations of this disclosure, a machine learning model can be used to process a set of text interpretations to determine the corresponding text description. In this case, the prompt words further instruct the machine learning model to determine the text description used to describe the function based on the set of text interpretations. Specifically, Table 4 shows examples of prompt words used to determine the text description.
[0071] Table 4 Examples of prompt words
[0072] As shown in Table 4, part 1 can specify the task to be performed by the machine learning model, part 2 can specify relevant examples for performing the task, and part 3 can specify a set of text interpretations to be processed. The prompt word can be input into the machine learning model so that it can output the corresponding text description. Using some implementations of this disclosure, the powerful processing capabilities of the machine learning model can be invoked to obtain text descriptions of functions represented in natural language based on each text interpretation.
[0073] According to some implementations of this disclosure, the prompt words may include more complex structures. For example, the prompt words may include: task description, steps, examples, and input data. Specifically, the task description may specify the task to be performed by the machine learning model, the steps may specify one or more steps required to perform the specified task, the examples may include one or more examples related to the task description (e.g., including input data and output data), and the input data may include the data to be processed that will be fed into the machine learning model.
[0074] According to some implementations of this disclosure, prompt words can be generated, and the steps specify that the following two steps are performed by a machine learning model: determining a set of text interpretations based on the call stack and the database, and determining the text description of the function based on the set of text interpretations.
[0075] Table 5 Examples of prompt words
[0076] As shown in Table 5, part 1 can specify the task to be performed by the machine learning model, part 2 can specify multiple steps (step 1 and step 2) to perform the task, part 3 can specify relevant examples to perform the task, and part 4 can specify multiple keyframes to be processed. The prompt word can be input into the machine learning model, at which point the machine learning model outputs the corresponding text description. Using some implementation methods of this disclosure, the powerful processing capabilities of the machine learning model can be invoked to obtain a text description of the function in natural language based on various text interpretations.
[0077] According to some implementations of this disclosure, the methods described above can be executed on server 130 and / or any other computing device as shown in Figure 1. Using the implementations of this disclosure, the specific content of each function of the application can be automatically analyzed based on database 520, thereby greatly reducing the workload of manual analysis and improving the efficiency and accuracy of application management. Specifically, using some implementations of this disclosure can improve analysis efficiency. Compared to traditional manual analysis methods, the technical solution of this disclosure can greatly improve analysis efficiency by automatically extracting keyframes and using machine learning models to provide interpretations.
[0078] By utilizing some implementation methods of this disclosure, the accuracy of analysis can be improved. Manual analysis is easily influenced by subjective factors, leading to inaccurate results. The technical solution of this disclosure, based on call stacks and powerful machine learning models, can improve the accuracy and consistency of analysis. Furthermore, the technical solution of this disclosure can adapt to complex functional patterns. For complex application functions, traditional methods struggle to accurately extract and interpret key information. The technical solution of this disclosure can better adapt to complex functional patterns, providing a more comprehensive and accurate functional description. Furthermore, the technical solution of this disclosure can improve versatility, thus being applicable to various types of applications and functions.
[0079] Based on some implementation methods of this disclosure, it is possible to determine whether a certain function needs attention from the text description. If it is determined that the function needs attention, it can be set as the second point of concern. Continuing the example above, suppose the first point of concern involves the function of accessing data A, and accessing data A under condition B1 may cause potential security risks. In this case, the functions in the application related to condition B1 can be set as the second point of concern. Using some implementation methods of this disclosure, the second point of concern can be found in the chain of the first point of concern. In this way, more details related to the first point of concern can be determined, thereby improving the granularity of application management.
[0080] The specific process for determining a second concern has been described above. Once a second concern has been determined, at least one second identifier statement corresponding to at least one second concern can be invoked. Specifically, to manage the runtime state of the application, at least one second identifier statement corresponding to at least one second concern can be inserted into the application's code so that the runtime state can be managed based on at least one second identifier statement during the execution of the application's code. See Figure 7 for further details, which shows a block diagram 700 of managing application code based on identifier statements according to some implementations of this disclosure.
[0081] As shown in Figure 7, the application code 710 may include multiple functions (e.g., function FUNC1), and each function may include multiple lines of code, such as line1, ..., line i, ..., line n. An identifier statement 730 can be inserted into the code 710 at a position corresponding to the attribute set (e.g., line i). When execution reaches this position, the identifier statement 730 can automatically report the application's running status at that position during the application's code execution. According to some implementations of this disclosure, the position corresponding to the attribute set 720 can be automatically determined in the code, and the identifier statement 730 can be inserted at that position.
[0082] Alternatively and / or additionally, instead of modifying code 710, the AOP management mechanism can be invoked to establish an association between a specified location (e.g., line i) in code 710 and the identification statement 730. This association allows the application to invoke the identification statement when it reaches the specified location, thereby providing the relevant application state. In this way, the application's runtime state can be determined using the identification statement 730 without modifying the application's code.
[0083] According to some implementations of this disclosure, at least one second identifier statement can provide a second text description, and the application's running state can be determined based on the second text description during the process of managing the application's running state based on at least one second identifier statement. Referring again to Figure 7, a report 740 can be provided, which may include the ID 418 of attribute set 720, and text description 417, etc. Using some implementations of this disclosure, the application's state can be determined in real time during the application's operation. For example, in the above example, assuming text description 417 indicates that data A is read when condition B1 is met, then report 740 can indicate: code "line i" makes condition B1 satisfied, and the application is reading data A.
[0084] According to some implementations of this disclosure, at least one second concern is located upstream of the first concern in the call stack. Specifically, at least one second concern can be determined upstream of the first concern according to the chronological order in which various functions in the application are executed. In this way, upstream concerns that will affect the running state of the downstream first concern can be determined chronologically, thereby supporting the adjustment of the application's objectives by controlling at least one second concern.
[0085] According to some implementations of this disclosure, adjustment requests for adjusting the runtime state can be determined based on the runtime state; and in response to receiving an adjustment request for adjusting the runtime state, a key link corresponding to the adjustment request can be provided to indicate the code segment in the application's code to be adjusted. Specifically, assuming an adjustment request for adjusting a first point of concern is received, a link corresponding to accessed data A can be provided, which at this time points to the code segment in the code to be adjusted, for example, line j in a function. In this way, potential code segments to be adjusted can be automatically provided to developers, thereby facilitating developers to update the application's code.
[0086] According to some implementations of this disclosure, an adjustment request can trigger the addition of control conditions to the code segment to be adjusted. These control conditions include at least one of the following: access conditions, data encryption, or data anonymization. Continuing the example above, assuming that accessing data A may pose a potential risk, control conditions for accessing data A can be added. For example, an access condition can be added that specifies that access to data A is only allowed if condition B2 is met, and access to data A is prohibited if condition B1 is met. Alternatively, data encryption techniques can be used to improve the security level of the accessed data, thereby preventing potential leakage risks. Furthermore, data anonymization operations can be performed on the accessed data A; for example, perturbation factors can be added to data A, or generalization processing can be performed to remove potentially risky parts of data A, and so on. Using some implementations of this disclosure, the potential risks of an application can be reduced in a simpler and more effective way, improving application security and making the application more in line with its intended function.
[0087] It should be understood that the above description of the application management process only uses the function of accessing data as an example of concern. Alternatively and / or additionally, concerns may point to different functions in the application. See Figure 8 for more details, which shows a block diagram 800 of multi-dimensional aspects according to some implementations of this disclosure. As shown in Figure 8, to improve the application's data security 820, multiple aspects may be included in AOP, such as network aspects 821, API aspects 822, etc. More pointcuts of concern can be identified upstream of the call chain, starting from network aspects 821, API aspects 822, etc., and along the call chain direction 810. Specifically, the business components of concern 811, page behaviors 812, user behaviors 813, triggers 814, lifecycles 815, and business behaviors 816, etc., can be identified. Furthermore, pointcuts can be used to construct aspects, thereby expanding the dimensions of the aspects.
[0088] As shown on the right side of Figure 8, starting from a single-dimensional aspect, the call chain can be traced, new pointcuts can be discovered, and the dimensions of the aspect can be increased. The various steps of managing applications based on multi-dimensional aspects have been described above. The overall process of this disclosure is described below with reference to Figure 9. Figure 9 shows a block diagram 900 of a process for managing applications based on multi-dimensional aspects according to some implementations of this disclosure. As shown in Figure 9, one or more aspects can be started from, for example, from single-dimensional aspects 910, ..., 912, to obtain the call stacks of the aforementioned aspects (e.g., 920, etc.). At block 930, keyframes and text interpretations can be extracted from the call stack, and more pointcuts can be discovered by identifying statements (e.g., pointcuts 940, 942, ..., and 944, etc.). At block 950, pointcuts can be added to the AOP system to form multi-dimensional aspects 960. Furthermore, at block 970, multi-dimensional aspects can be used to manage the application; for example, control conditions can be added to the application to make the application's running state more consistent with expectations.
[0089] By utilizing the implementation method disclosed herein, the primary concern can be used as an entry point to discover other potential concerns, thereby obtaining more potential concerns. In this way, concerns can be identified from multiple dimensions, enabling more granular application management.
[0090] Example process
[0091] Figure 10 illustrates a flowchart of a method 1000 for managing an application based on concerns, according to some implementations of this disclosure. At block 1010, a call stack corresponding to a first concern in the application is obtained. The first concern corresponds to a first function of concern among multiple functions of the application. The call stack includes multiple chains, and the chains point to code segments in the application's code corresponding to the first concern. Based on predetermined key features, a set of key chains is obtained from the multiple chains. Based on the set of key chains, at least one second concern in the application is determined. The at least one second concern corresponds to at least one second function associated with the first function among multiple functions. Based on the at least one second concern, the runtime state of the application is managed.
[0092] According to some implementations of this disclosure, managing the runtime state of an application based on at least one second concern includes: during the execution of the application's code, calling at least one second identification statement corresponding to at least one second concern; and during the execution of the application's code, managing the runtime state based on the second identification statement.
[0093] According to some implementations of this disclosure, determining at least one second concern in an application includes: determining a set of attributes associated with a set of critical links, the set of attributes including the critical links in the set of critical links and at least one attribute associated with the critical links; and determining at least one second concern based on at least one attribute.
[0094] According to some implementations of this disclosure, at least one attribute includes a second text description for describing at least one second function in the application. The second text description is expressed in natural language and includes at least one of the following associated with the at least one second function: a scenario, indicating the initiator that triggers the second function; or a triggering reason, indicating at least one of the following: interactive behavior, changes in page cycle or application cycle, or page changes.
[0095] According to some implementations of this disclosure, at least one second identification statement is used to provide a second text description, and managing the application's runtime state based on the second identification statement includes: determining the application's runtime state based on the second text description; determining an adjustment request for adjusting the runtime state based on the runtime state; and in response to receiving an adjustment request for adjusting the runtime state, providing a link corresponding to the adjustment request to indicate the code segment in the application's code to be adjusted.
[0096] According to some implementations of this disclosure, the adjustment request is used to add control conditions to the application's code, including at least one of the following: access control, data encryption, or data anonymization.
[0097] According to some implementations of this disclosure, determining at least one second concern in an application includes: determining a set of textual interpretations of a set of key links based on a database associated with the application; and determining a second textual description for describing at least one second function based on the set of textual interpretations.
[0098] According to some implementations of this disclosure, the database includes a mapping relationship between links and text interpretations, and a set of text interpretations for determining a set of key links includes: for a key link in a set of key links, determining the text interpretation associated with the key link based on the mapping relationship.
[0099] According to some implementations of this disclosure, obtaining a set of key links from multiple links based on key features includes at least one of the following: using key features to perform text filtering on multiple links to determine a set of key links; or determining a set of key links based on the distance between multiple links and key features.
[0100] According to some implementations of this disclosure, at least one second concern is located upstream of the first concern in the call stack.
[0101] Example devices and equipment
[0102] Figure 11 shows a block diagram of an apparatus 1100 for managing an application based on concerns, according to some implementations of the present disclosure. The apparatus includes: a stack acquisition module 1110 configured to acquire a call stack corresponding to a first concern in the application, the first concern corresponding to a first function of concern among a plurality of functions of the application, the call stack including a plurality of links, the links of the plurality of links pointing to a code segment in the application code corresponding to the first concern; a link acquisition module 1120 configured to acquire a set of key links from the plurality of links based on predetermined key features; a determination module 1130 configured to determine at least one second concern in the application based on the set of key links, the at least one second concern corresponding to at least one second function associated with the first function among a plurality of functions; and a management module 1140 configured to manage the runtime state of the application based on at least one second concern.
[0103] According to some implementations of this disclosure, the management module is further configured to manage the running state of the application based on at least one second concern, including: during the execution of the application's code, calling at least one second identification statement corresponding to at least one second concern; and during the execution of the application's code, managing the running state based on at least one second identification statement.
[0104] According to some implementations of this disclosure, the determining module is further configured to: determine a set of attributes associated with a set of critical links, the set of attributes including the critical links in the set of critical links and at least one attribute associated with the critical links; and determine at least one second concern based on at least one attribute.
[0105] According to some implementations of this disclosure, at least one attribute includes a second text description for describing a second function in the application. The second text description is expressed in natural language and includes at least one of the following associated with the second function: a scenario, indicating the initiator that triggers the second function; or a triggering reason, indicating at least one of the following: interactive behavior, page cycle or application cycle change, page change.
[0106] According to some implementations of this disclosure, at least one second identification statement is used to provide a second text description, and the management module is further configured to: determine the running state of the application based on the second text description; determine an adjustment request for adjusting the running state based on the running state; and in response to receiving an adjustment request for adjusting the running state, provide a link corresponding to the adjustment request to indicate the code segment in the application's code to be adjusted.
[0107] According to some implementations of this disclosure, the adjustment request is used to add control conditions to the application's code, including at least one of the following: access control, data encryption, or data anonymization.
[0108] According to some implementations of this disclosure, the determining module is further configured to: determine a set of textual interpretations of a set of key links based on a database associated with the application; and determine a textual description for describing the functionality based on the set of textual interpretations.
[0109] According to some implementations of this disclosure, the database includes a mapping relationship between links and text interpretations, and a determination module is further configured to: for a critical link in a set of critical links, determine the text interpretation associated with the critical link based on the mapping relationship.
[0110] According to some implementations of this disclosure, the link acquisition module is further configured to perform at least one of the following: using key features to perform text filtering on multiple links to determine a set of key links; or determining a set of key links based on the distance between multiple links and key features.
[0111] According to some implementations of this disclosure, at least one second concern is located upstream of the first concern in the call stack.
[0112] Figure 12 shows a block diagram of a device 1200 capable of implementing various implementations of the present disclosure. It should be understood that the computing device 1200 shown in Figure 12 is merely exemplary and should not constitute any limitation on the functionality and scope of the implementations described herein. The computing device 1200 shown in Figure 12 can be used to implement the methods described above.
[0113] As shown in Figure 12, computing device 1200 is in the form of a general-purpose computing device. Components of computing device 1200 may include, but are not limited to, one or more processors or processing units 1210, memory 1220, storage devices 1230, one or more communication units 1240, one or more input devices 1250, and one or more output devices 1260. Processing unit 1210 may be a physical or virtual processor and is capable of performing various processes according to programs stored in memory 1220. In a multiprocessor system, multiple processing units execute computer-executable instructions in parallel to improve the parallel processing capability of computing device 1200.
[0114] Computing device 1200 typically includes multiple computer storage media. Such media can be any available media accessible to computing device 1200, including but not limited to volatile and non-volatile media, removable and non-removable media. Memory 1220 can be volatile memory (e.g., registers, cache, random access memory (RAM)), non-volatile memory (e.g., read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory), or some combination thereof. Storage device 1230 can be removable or non-removable media and can include machine-readable media, such as flash drives, disks, or any other media that can be used to store information and / or data (e.g., training data for training) and can be accessed within computing device 1200.
[0115] The computing device 1200 may further include additional removable / non-removable, volatile / non-volatile storage media. Although not shown in FIG12, disk drives for reading or writing from removable, non-volatile disks (e.g., "floppy disks") and optical disk drives for reading or writing from removable, non-volatile optical disks may be provided. In these cases, each drive may be connected to a bus (not shown) via one or more data media interfaces. The memory 1220 may include a computer program product 1225 having one or more program modules configured to perform various methods or actions of various implementations of the present disclosure.
[0116] The communication unit 1240 enables communication with other computing devices via a communication medium. Additionally, the functionality of the components of the computing device 1200 can be implemented as a single computing cluster or multiple computing machines capable of communicating via communication connections. Therefore, the computing device 1200 can operate in a networked environment using logical connections to one or more other servers, networked personal computers (PCs), or another network node.
[0117] Input device 1250 can be one or more input devices, such as a mouse, keyboard, trackball, etc. Output device 1260 can be one or more output devices, such as a monitor, speaker, printer, etc. Computing device 1200 can also communicate with one or more external devices (not shown) via communication unit 1240 as needed. These external devices include storage devices, display devices, etc., and can communicate with one or more devices that enable user interaction with computing device 1200, or with any device (e.g., network card, modem, etc.) that enables computing device 1200 to communicate with one or more other computing devices. Such communication can be performed via input / output (I / O) interface (not shown).
[0118] According to an implementation of this disclosure, a computer-readable storage medium is provided, on which computer-executable instructions are stored, wherein the computer-executable instructions are executed by a processor to implement the method described above. According to an implementation of this disclosure, a computer program product is also provided, which is tangibly stored on a non-transitory computer-readable medium and includes computer-executable instructions, which are executed by a processor to implement the method described above. According to an implementation of this disclosure, a computer program product is provided, on which a computer program is stored, which, when executed by a processor, implements the method described above.
[0119] Various aspects of this disclosure are described herein with reference to flowchart illustrations and / or block diagrams of methods, apparatuses, devices, and computer program products implemented according to this disclosure. It should be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer-readable program instructions.
[0120] These computer-readable program instructions can be provided to a processing unit of a general-purpose computer, a special-purpose computer, or other programmable data processing apparatus to produce a machine such that, when executed by the processing unit of the computer or other programmable data processing apparatus, they create means for implementing the functions / actions specified in one or more blocks of the flowchart and / or block diagram. These computer-readable program instructions can also be stored in a computer-readable storage medium that causes a computer, programmable data processing apparatus, and / or other device to operate in a particular manner. Thus, the computer-readable medium storing the instructions comprises an article of manufacture that includes instructions for implementing aspects of the functions / actions specified in one or more blocks of the flowchart and / or block diagram.
[0121] Computer-readable program instructions can be loaded onto a computer, other programmable data processing apparatus, or other device to cause a series of operational steps to be performed on the computer, other programmable data processing apparatus, or other device to produce a computer-implemented process, thereby causing the instructions that execute on the computer, other programmable data processing apparatus, or other device to perform the functions / actions specified in one or more boxes of a flowchart and / or block diagram.
[0122] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this disclosure. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of an instruction, which contains one or more executable instructions for implementing the specified logical function. In some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutive blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, may be implemented using a dedicated hardware-based system that performs the specified function or action, or using a combination of dedicated hardware and computer instructions.
[0123] Various implementations of this disclosure have been described above. These descriptions are exemplary and not exhaustive, nor are they limited to the disclosed implementations. Many modifications and variations will be apparent to those skilled in the art without departing from the scope and spirit of the described implementations. The terminology used herein is chosen to best explain the principles, practical applications, or improvements to technology in the market, or to enable others skilled in the art to understand the various implementations disclosed herein.
Claims
1. A method for managing applications based on concerns, comprising: Obtain the call stack corresponding to a first concern in the application, the first concern corresponding to a first concern among multiple functions of the application, the call stack including multiple links, and the links among the multiple links pointing to the code segment in the application code corresponding to the first concern; Based on predetermined key features, a set of key links is obtained from the plurality of links; Based on the set of key links, at least one second concern in the application is determined, and the at least one second concern corresponds to at least one second function associated with the first function among the plurality of functions; as well as The application's operational status is managed based on the at least one second concern.
2. The method of claim 1, wherein managing the operational state of the application based on the at least one second concern comprises: During the execution of the application's code, at least one second identification statement corresponding to the at least one second concern is invoked; as well as During the execution of the application's code, the execution state is managed based on the at least one second identifier statement.
3. The method of claim 2, wherein determining the at least one second point of concern in the application comprises: Determine a set of attributes associated with the set of critical links, the set of attributes including the critical links in the set of critical links, and at least one attribute associated with the critical links; as well as The at least one second point of interest is determined based on the at least one attribute.
4. The method of claim 3, wherein the at least one attribute includes a second text description for describing the at least one second function in the application, the second text description being expressed in natural language and including at least one of the following associated with the at least one second function: The scenario refers to the initiator that triggers the at least one second function; or The triggering reason indicates at least one of the following: interactive behavior, changes in the page cycle or application cycle, or changes to the page.
5. The method of claim 4, wherein the at least one second identifier statement is used to provide the second text description, and managing the running state of the application based on the at least one second identifier statement includes: The running state of the application is determined based on the second text description; Based on the operating state, determine the adjustment request for adjusting the operating state; as well as In response to receiving an adjustment request for adjusting the running state, a link corresponding to the adjustment request is provided to indicate the code segment in the application's code that needs to be adjusted.
6. The method of claim 5, wherein the adjustment request is used to add control conditions to the code of the application, the control conditions including at least one of the following: access control, data encryption, or data anonymization.
7. The method of claim 4, wherein determining the at least one second point of concern in the application comprises: Based on the database associated with the application, a set of textual interpretations of the set of key links are determined; as well as Based on the set of text interpretations, a second text description for describing the at least one second function is determined.
8. The method of claim 7, wherein the database includes a mapping relationship between links and text interpretations, and determining the set of text interpretations for the set of key links includes: For each critical link in the set of critical links, the text interpretation associated with the critical link is determined based on the mapping relationship.
9. The method of claim 1, wherein obtaining a set of key links from the plurality of links based on the key features comprises at least one of the following: Using the aforementioned key features, text filtering is performed on the multiple links to identify the set of key links; or The set of key links is determined based on the distances between multiple links and the key features.
10. The method of claim 1, wherein at least one second concern is located upstream of the first concern in the call stack.
11. An apparatus for managing applications based on concerns, comprising: The stack acquisition module is configured to acquire the call stack corresponding to a first concern in the application, the first concern corresponding to a first function of concern among multiple functions of the application, the call stack including multiple links, and the links among the multiple links pointing to the code segment in the application code corresponding to the first concern. The link acquisition module is configured to acquire a set of key links from the plurality of links based on predetermined key features; The determination module is configured to determine at least one second concern in the application based on the set of key links, the at least one second concern corresponding to at least one second function associated with the first function among the plurality of functions; as well as The management module is configured to manage the running status of the application based on the at least one second concern.
12. An electronic device, comprising: At least one processing unit; as well as At least one memory, coupled to the at least one processing unit and storing instructions for execution by the at least one processing unit, the instructions causing the electronic device to perform the method according to any one of claims 1 to 10 when executed by the at least one processing unit.
13. A computer-readable storage medium having stored thereon computer instructions that, when executed by a processor, cause the processor to perform the method according to any one of claims 1 to 10.
14. A computer instruction product comprising computer instructions, wherein the computer instructions, when executed by a processor, implement the method according to any one of claims 1 to 10.